Yes, but i open the Screen in my Client PB source who also called my DLL.
I have written a little test DLL and a test client proggy, the problem is also here.
Download all files of my Test DLL
This is my Test DLL
ProcedureDLL Map_Init()
Init1=InitSprite()
UseJPEGImageDecoder()
#Sprite_Nummer=59999
Global Map_Ed$, Map_EdV$, Map_Tile_Size, Map_SizeX, Map_SizeY, Map_ItemLayer
Global Map_TileName$, Map_Title$, Map_Author$, Map_Comment$
ProcedureReturn #TRUE
EndProcedure
ProcedureDLL.w Map_LoadTiles(FileName.s)
Map_LoadTiles.w= LoadSprite(#Sprite_Nummer, FileName.s,0)
ProcedureReturn Map_LoadTiles.w
EndProcedure
ProcedureDLL Map_Sprite()
DisplaySprite(#Sprite_Nummer,0,0)
EndProcedure
And here my Client Proggy....
X= InitSprite()
X= InitKeyboard()
hWnd=OpenWindow(0,0,0,640,480,#PB_Window_SystemMenu|#PB_Window_WindowCentered,"Show Map Settings")
x=OpenWindowedScreen(hWnd,0,0,640,480,0,0,0)
SetFrameRate(100)
UseJPEGImageDecoder()
; Open my test Lib
x=OpenLibrary(1,"test.dll")
; Call the Init routines, also InitSprite in the DLL
x=CallFunction(1,"Map_Init")
; try to load the Sprite,
x=CallFunction(1,"Map_LoadTiles","c:\space.jpg")
MessageRequester("Test - Sprite Handle",Str(x), #MB_ICONINFORMATION)
; Display Sprite, on the Screen
ClearScreen(0,0,0)
If x<> 0 : CallFunction(1,"Map_Sprite") : EndIf
; nothing to do, only loop and loop and loop and loop....
Repeat
ExamineKeyboard() : Taste = KeyboardPushed(#PB_Key_Escape)
Event = WindowEvent()
Select Event
Case #PB_Event_CloseWindow
End
EndSelect
FlipBuffers()
Until (Taste<>0)
End