I'm calling a COM written in C++ from a .NET code written in C#.
The COM interface methods return HRESULT to indicate whether the call was successful.
However, when I look at the interface methods in C#, they claim to be void functions.
How do I pick up the HRESULTs from the COM then?
STDMETHOIMP CMyCOMObject::XMyCOMInterface::MyMethod()
{
METHOD_PROLOGUE(CMyCOMObject, MyCOMInterface);
return S_OK;
}
void Foo()
{
MyCOM.IMyCOMInterface m_myCOM = new MyCOM.IMyCOMInterface;
int nOut = m_myCOM.MyMethod();
}