How to access dll function?

BlitzMax Forums/BlitzMax Beginners Area/How to access dll function?

GW(Posted 2005) [#1]
Hi, I've searched the forums up and down but cant seem to find out how to access a function in a dll. I've created a dll and created the declarations but I still get errors when calling any functions. Its seems that any text I put after the 'Extern'
keyword (other than 'win32') just generates an error.

Anyone know?


TartanTangerine (was Indiepath)(Posted 2005) [#2]
Post some of your dll code and the decls.


TeraBit(Posted 2005) [#3]
If you see my .NET Classes post (Under BlitzMax Programming), the source code calls a DLL. That should help you on the way.


GW(Posted 2005) [#4]
Ok, I checked out the .Net gui. Am i to understand that to access a dll you need to hack up a C wrapper to use the functions? Bmax doesn't have any native support for using a dll?


TeaVirus(Posted 2005) [#5]
This thread got me on the right track.

http://www.blitzbasic.com/Community/posts.php?topic=41803

No C wrapper needed for what I was doing but your situation may differ.


TeraBit(Posted 2005) [#6]
I wrote a Set of C things that just supplied a StdCall function with various numbers of parameters.

Blitzmax does not have a special command for it, you need to write your own as it stands. I found my one to be easy enough once you know what's going on.