Hello All.
I have a c++ class not defined with the ref keyword

class CMsg {...}

I'm trying to create an instance of CMsg using Reflection, as follows:
Assembly^ assembly = Assembly::GetAssembly(CMsg::typeid);
System::Object^ msg = assembly->CreateInstance("SIMsgs.CMsg");

Well, it works, I get a CMsg, but as a _reference_, while I need a pointer....
Since CMsg is not a "ref" class I can't cast the return value to CMsg, and so can't call its methods. I can see it's member in the debugger, but can't reach them.

For example this line:
CMsg ^cmsg = (CMsg ^)msg;

Create the following complication errors:
Error 1 error C3699: '^' : cannot use this indirection on type 'SIMsgs::CMsg' e:\projects\Secure1\pkg\Server\SIMsgs\MsgGenerator.cpp 34
Error 2 error C3699: '^' : cannot use this indirection on type 'SIMsgs::CMsg' e:\projects\Secure1\pkg\Server\SIMsgs\MsgGenerator.cpp 34
Error 3 error C2440: 'type cast' : cannot convert from 'System::Object ^' to 'SIMsgs::CMsg *' e:\projects\Secure1\pkg\Server\SIMsgs\MsgGenerator.cpp 34

Anyway to get a (CMsg *) out of the return value of CreateInstance()?
Any other solution?

Thank you very much and in advance,
Roee Oz