I am trying to understand how to check for a COM error when I am using a C++ COM client. I realise that HRESULT can be checked but what confuses me is exposed methods that also specify a parameter of type [retval,out].
For a COM object that returns eg. a BSTR via [retval, out] the call would be as follows. And I don't see how can also get an HRESULT returned?
BSTR b = ComObject->Foo();
ie. how do I check for COM failure of the above line? Where is the HRESULT?
All the examples I see of implemented COM methods seem to ALWAYS return S_OK. As if the methods never fail?