Returning Error Information
To return error information
Implement the ISupportErrorInfointerface.
To create an instance of the generic error object, call the CreateErrorInfo function.
To set its contents, use the ICreateErrorInfomethods.
To associate the error object with the current logical thread, call the SetErrorInfo function.
The following figure illustrates this procedure.
The error handling interfaces create and manage an error object, which provides information about the error. The error object is not the same as the object that encountered the error. It is a separate object associated with the current thread of execution.