ISupportErrorInfo::InterfaceSupportsErrorInfo method (oaidl.h)

Indicates whether an interface supports the IErrorInfo interface.

Syntax

HRESULT InterfaceSupportsErrorInfo(
  [in] REFIID riid
);

Parameters

[in] riid

An interface identifier (IID).

Return value

This method can return one of these values.

Return code Description
S_OK
The interface supports IErrorInfo.
S_FALSE
The interface does not support IErrorInfo.

Remarks

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 InterfaceSupportsErrorInfo returns 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 ISupportErrorInfo returns 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.

Requirements

Requirement Value
Target Platform Windows
Header oaidl.h

See also

ISupportErrorInfo