Objects that are invoked through virtual function table (VTBL) binding need to use the Automation error handling interfaces and API functions to define and return error information. In addition to the API functions, the interfaces include the following:
This chapter covers the error handling interfaces. The member functions of each interface are listed in the following table.
Category | Member function | Purpose |
---|---|---|
IErrorInfo | GetDescription | Returns a textual description of the error. |
GetGUID | Returns the globally unique identifier (GUID) for the interface that defined the error. | |
GetHelpContext | Returns the Help context identifier (ID) for the error. | |
GetHelpFile | Returns the path of the Help file that describes the error. | |
GetSource | Returns the programmatic identifier (ProgID) for the class or application that returned the error. | |
ICreateErrorInfo | SetDescription | Sets a textual description of the error. |
SetGUID | Sets the GUID for the interface that defined the error. | |
SetHelpContext | Sets the Help context ID for the error. | |
SetHelpFile | Sets the path of the Help file that describes the error. | |
SetSource | Sets the ProgID for the class or application that returned the error. | |
ISupportErrorInfo | InterfaceSupportsErrorInfo | Indicates whether an interface supports the IErrorInfo interface. |
Error handling functions | CreateErrorInfo | Creates a generic error object. |
GetErrorInfo | Retrieves and clears the current error object. | |
SetErrorInfo | Sets the current error object. |