How can i run a DLL?

BlitzMax Forums/BlitzMax Beginners Area/How can i run a DLL?

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.

Ok, your dll use the standard calling convention.(Just checked your sourcecode)

Add "win32" to the end of your function declaration.
Like this...
Local func:Int (v1:Int, v2:Int) "win32"

that should take care of the problem.
I don't know which calling convention BMax uses by default but by adding "win32" you tell Bmax to use stdcall for this function.

Found this interesting article about calling conventions...
http://www.angelcode.com/dev/callconv/callconv.html