Ok, Here's a Method I have wrapped for BlitzMax, which I believe I have wrapped incorrectly.
c++
bmx
I'm getting an unhandled memory exception on it though. I know that Ha->GetBodyPosition returns a cTV_3DVECTOR, that's correct. But normally when I get objects back from my C++ wrapped functions, get them back as Blah* not just Blah. Could this be the problem? If so, what can I do? I can't just change the return type of the C++ function to cTV_3DVECTOR* because it complains that the function return type does not match ( because, as I said, Ha->GetBodyPosition returns a cTV_3DVECTOR, not a cTV_3DVECTOR*
c++
extern "C" __cdecl cTV_3DVECTOR CTVPhysics_GetBodyPosition(CTVPhysics* Ha,int rigidBodyIndex) { return Ha->GetBodyPosition(rigidBodyIndex); }
bmx
Function CTVPhysics_GetBodyPosition:Byte Ptr(Ha:Byte Ptr,rigidBodyIndex:Int)
I'm getting an unhandled memory exception on it though. I know that Ha->GetBodyPosition returns a cTV_3DVECTOR, that's correct. But normally when I get objects back from my C++ wrapped functions, get them back as Blah* not just Blah. Could this be the problem? If so, what can I do? I can't just change the return type of the C++ function to cTV_3DVECTOR* because it complains that the function return type does not match ( because, as I said, Ha->GetBodyPosition returns a cTV_3DVECTOR, not a cTV_3DVECTOR*