Does COM method return S_OK?

  • Thread starter Thread starter techie
  • Start date Start date
T

techie

I have an unmanaged VC++ application calls a COM object which will be
implemented in C#.

The VC++ call is:

BOOL res;
VERIFY( importFilt->Import(&res) == S_OK );

My C# method is:

public int Import()
{
// TODO: Add ValidatorImport.Import implementation
return iVal;
}

Will my VC++ code actually succeed? Does the C# Import() method return S_OK
by default? Or is the return value value iVal?
 
Will my VC++ code actually succeed? Does the C# Import() method return S_OK
by default?

Yes, as long as no exception is thrown.

Or is the return value value iVal?

No, that's returned through an extra [out,retval] parameter.



Mattias
 
Back
Top