I have a .NET library in my C ++ program using the following methods, but not an exhaustive list:
CorBindToRuntimeEx()
GetDefaultDomain()
CreateInstance()
GetIDsOfNames()
And finally, a challenge Invoke().
This works great for base types, enumerations, strings, and arrays. However, I cannot figure out how to convey the structure. Here is the skeleton of what I have now:
public class AStruct
{
public int i1;
public string s1;
public double d1;
}
public AStruct getAStruct();
HRESULT hr = assembly->Invoke (id_getAStruct, ...);
The return value OUT PARAMfor this function is VARIANTwith a type VT_DISPATCH.
When I look retVal.pdispValin my debugger, I see that the contents of my structure are not close to this address. I would like to use varIDis.pdispVal->QueryInterface()to access my structure, but I have no idea what it IIDis and how to find it.
, .NET, Reflector. , .NET, , .
, .NET ++ COM?
.