memory access violaton when call dll

Blitz3D Forums/Blitz3D Beginners Area/memory access violaton when call 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.

1) If your function is named "TestDLL" Blitz will have a hard time finding it given that you're telling it to call a function named "Test". But that's not what is causing the MAV. I guess you jsut incorrectly copied your code in your post.
2) You need to declare the function as 'extern "C"'. Still not the reason for the MAV though
3) the signature of your function is wrong. It should be Test( const void *in,int in_size,void *out,int out_sz );
*this* is what causes your MAV, most probably.

You'd have spotted all of the above by yourself by just looking at the doc:
http://blitzbasic.com/b3ddocs/command.php?name=calldll&ref=goto

In addition I suggest you use userlibs instead of CallDLL:
http://blitzbasic.com/sdkspecs/sdkspecs/userlibs_specs.txt