ISupportErrorInfo::InterfaceSupportsErrorInfo Function

Indicates whether or not an interface supports the IErrorInfointerface.

HRESULT InterfaceSupportsErrorInfo(
  REFIID  riid
);

riid

Pointer to an interface identifier (IID).

The return value obtained from the returned HRESULT is one of the following:

Return value

Meaning

S_OK

Interface supports IErrorInfo.

S_FALSE

Interface does not supportIErrorInfo.

Objects that support the IErrorInfo interface must also implement this interface.

Programs that receive an error return value should call QueryInterface to get a pointer to the ISupportErrorInfo

interface, and then call InterfaceSupportsErrorInfo with the riid of the interface that returned the return value. If InterfaceSupportsErrorInforeturns S_FALSE, then the error object does not represent an error returned from the caller, but from somewhere else. In this case, the error object can be considered incorrect and should be discarded.

If ISupportErrorInforeturns S_OK, use the GetErrorInfo function to get a pointer to the error object.

For an example that demonstrates implementing InterfaceSupportsErrorInfo, see the ErrorInfo.cpp file in the COM Fundamentals Lines sample shipped with the Platform SDK.

Show: