DLLs?
BlitzMax Forums/BlitzMax Beginners Area/DLLs?
| ||
| Stupid question, but I have hit a snag. How do I access a DLL in BMax? (DLL works fine with B+ but can't figure it out in BMax) Thank you in advance for any help. |
| ||
Something like this should do it...
' Declare functions (will point to DLL functions)...
Global InitGame (x, y, x) "win32"
' Load DLL...
lib = LoadLibraryA ("biglib.dll")
If lib
' Assign DLL function "DoStuff" to "InitGame" function...
InitGame = GetProcAddress (lib, "DoStuff")
If InitGame = Null Then Notify "Doh!"; End
' More...
EndIf
' Call function...
result = InitGame (1, 2, 3)
|
| ||
| Thank you, Mr. James :c) |