[RESOLVED] Calling C# function w/out param doesn't work
I have a C# function
Code:
SomeFunction(out MyObject obj)
When I call this function from Managed C++
Code:
MyObject ^mObj = nullptr;
SomeFunction(mObj);
After "SomeFunction" is called mObj is still equal to null.
I have verified in the debugger that SomeFunction retrieves the object properly so it shouldn't be null.
How come and how do I fix this?
Thanks!
Re: Calling C# function w/out param doesn't work
I found the problem... actually my example above wasn't entirely accurate.
"SomeFunction" takes an interface as a parameter, not an object.
This code works below:
Code:
IMyObject ^myIntfObject = nullptr;
SomeFunction(myIntfObject);
MyObject ^myObj = (MyObject^)myIntfObject;