ISupportErrorInfo:: InterfaceSupportsErrorInfo
Indicates whether a specific OLE DB interface on the object can return OLE DB error objects.
Syntax
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
ISupportErrorInfo::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:
The consumer calls QueryInterface to retrieve a pointer to ISupportErrorInfo.
The consumer calls ISupportErrorInfo::InterfaceSupportsErrorInfo and passes it the IID of the OLE DB interface that returned the error.
The consumer calls IErrorRecords::GetErrorInfo in the Automation DLL if ISupportErrorInfo::InterfaceSupportsErrorInfo returns S_OK. IErrorRecords::GetErrorInfo returns an IErrorInfo interface pointer on the OLE DB error object. If ISupportErrorInfo::InterfaceSupportsErrorInfo returns S_FALSE, the consumer should discard any error object returned by IErrorRecords::GetErrorInfo because it applies to a different method and interface.