I'm having trouble trying to get that to work..
DLLTest2.bmx
DllCaller2.bmx
DLLTest2.def
I get "Unhandled Memory Exception Error" when trying to call "GetData( data )".
DLLTest2.bmx
Strict Framework brl.blitz Function GetData( output:Int Var) output = 10 EndFunction
DllCaller2.bmx
Strict Framework brl.blitz Import pub.win32 Global data:Int = 0 Local Library = LoadLibraryA ( "DLLTest2.dll" ) If Not Library WriteStdout "Library not found!~n" Return EndIf Local GetData ( A ) = GetProcAddress ( Library , "GetData" ) If Not Getdata WriteStdout "GetData function not found!~n" Return EndIf GetData( data ) WriteStdout data FreeLibrary Library Extern "Win32" Function FreeLibrary ( Library ) EndExtern
DLLTest2.def
EXPORTS GetData=bb_GetData
I get "Unhandled Memory Exception Error" when trying to call "GetData( data )".