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
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