DLL creation, second attempt

BlitzMax Forums/BlitzMax Programming/DLL creation, second attempt

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

As I suspected the Notify function is a member of an instance called Driver(TSystemDriver)
My best guess is that the Driver-object never get's initialized when the app is run as a dll.

But since Notify is a wrapped method for the User32 MessageBoxA function you could use that API function directly instead.
Like this...


Framework BRL.Blitz

Extern "win32"
 Function MessageBoxA:Int(hWnd:Byte Ptr,lpText$z,lpCaption$z,uType:Int)
End Extern

Function DllMain(hinstDLL:Byte Ptr,fdwReason:Int,lpvReserved:Byte Ptr)"win32"
 Return True
End Function

Function AddIntegers:Int(a:Int,b:Int)"win32"	'EXPORT   
 MessageBoxA(Null,"The result of "+a+" + "+b+" = "+(a+b),"Result:",0)
End Function



[Edit]
And the Common Dialogue api(comdlg32, not linked by default) if you want fileopen/save requesters, printerselector and so on.