Gettin a c# object from c++ code

Apr 4 2005 8:39 AM
Hi all. I have a program in c++ that uses a .dll (in c#). I have to get a return object in c++ from c#, like this: in c# code: public TheObject someFunction (some parameters...) { TheObject myObject; ... ... return myObject; } in c++ code: TheObject *myObject; myObject = someFunction (some parameters...); This doesnt work. It generate an execution exception. Somebody can help me? How can I get this object? CLR says the object has no reference. SystemNullReferenceException.... thanks!

Answers (2)