This does work, but makes no sense. There seems to be a problem with dereferencing a pointer of a user defined type.
Import "-lsdl" Type SDL_Surface Field flags:Int Field format:Byte Ptr Field w:Int, h:Int Field pitch:Short Field __unused_align_1:Short Field pixels:Byte Ptr Field offset:Int Field hwdata:Byte Ptr Field clip_rect_x:Short Field clip_rect_y:Short Field clip_rect_w:Short Field clip_rect_h:Short Field unused1:Int Field locked:Int Field map:Byte Ptr Field format_version:Int Field refcount:Int End Type Extern "C" Function SDL_Init(Flags:Int) Function SDL_SetVideoMode:SDL_Surface Ptr (Width:Int, Height:Int, Depth:Int, Flags:Int) Function SDL_Flip(Screen:SDL_Surface Ptr) Function SDL_FillRect(dst:SDL_Surface Ptr, dstrect:Byte Ptr, color:Int) End Extern Const SDL_INIT_VIDEO = $00000020 Const SDL_HWSURFACE = $00000001 Const SDL_DOUBLEBUF = $40000000 Const SDL_FULLSCREEN = $80000000 If SDL_Init(SDL_INIT_VIDEO)=-1 End EndIf Print "Hello!" Local tmp:SDL_Surface Ptr = SDL_SetVideoMode(800,600,32,SDL_HWSURFACE|SDL_DOUBLEBUF) Try Local ScreenSurface : SDL_Surface = New SDL_Surface MemCopy ScreenSurface, tmp, SizeOf(ScreenSurface) Print ScreenSurface.w Print ScreenSurface.h Catch e : Object Print e.ToString(); End Try WaitKey Repeat SDL_FillRect(tmp,Null,$FFFFFF) SDL_Flip(tmp) FlushMem() Until KeyHit(KEY_ESCAPE)