ISupportErrorInfo:: InterfaceSupportsErrorInfo

Indicates whether a specific OLE DB interface on the object can return OLE DB error objects.

HRESULT InterfaceSupportsErrorInfo (
   REFIID   riid);

Parameters

riid

[in]
The IID of the interface in question.

Return Code

S_OK
The interface can return Automation error objects; therefore, it can return OLE DB error objects.

S_FALSE
The interface cannot return Automation error objects; therefore, it cannot return OLE DB error objects.

Comments

InterfaceSupportsErrorInfo is implemented on each OLE DB object that may return an error object, and identifies the interfaces on that object that may generate an OLE DB error object.

To retrieve an OLE DB error object, the consumer takes the following steps:

  1. The consumer calls QueryInterface to retrieve a pointer to ISupportErrorInfo.

  2. The consumer calls ISupportErrorInfo::InterfaceSupportsErrorInfo and passes it the IID of the OLE DB interface that returned the error.

  3. The consumer calls GetErrorInfo in the Automation DLL if InterfaceSupportsErrorInfo returns S_OK. GetErrorInfo returns an IErrorInfo interface pointer on the OLE DB error object. If InterfaceSupportsErrorInfo returns S_FALSE, the consumer should discard any error object returned by GetErrorInfo because it applies to a different method and interface.