Ciao LeftyG
welcome to thinBasic.
Yes you did it almost, only Alias must be outside string of the alias. And data type, docs seem telling that SDL_Init accepts an v and returns an Integer
Here an example. I do not know SDL but should work.
uses "console"
Const SDL_INIT_VIDEO = 32
Type Rect
x as single
y as single
w as single
h as integer
End Type
'https://wiki.libsdl.org/SDL_Init
Declare Function SDL_Init Lib "SDL2.dll" Alias "SDL_Init" (ByVal flags as UInt32) as Integer
'https://wiki.libsdl.org/SDL_Quit
Declare sub SDL_Quit Lib "SDL2.dll" Alias "SDL_Quit" ()
integer iResult
printl "Calling SDL_Init ..."
iResult = SDL_Init(SDL_INIT_VIDEO)
printl "Result: ", iResult
if iResult <> 0 Then
printl "An error occurred calling SDL_Init"
else
printl "Result was OK"
end if
WaitKey
SDL_Quit
Let me know.
Ciao
Eros
Bookmarks