ISupportErrorInfo:: InterfaceSupportsErrorInfo

OLE DB Programmer's Reference

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

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:

  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 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.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net