EXCEPINFO
This structure describes an exception that occurred during IDispatch::Invoke.
typedef struct FARSTRUCT tagEXCEPINFO {
unsigned short wCode;
unsigned short wReserved;
BSTR bstrSource;
BSTR bstrDescription;
BSTR bstrHelpFile;
unsigned long dwHelpContext;
void FAR *pvReserved;
HRESULT (STDAPICALLTYPE FAR *pfnDeferredFillIn)
(struct tagEXCEPINFO FAR *);
SCODE scode;
} EXCEPINFO;
Members
- wCode
Code that identifies the error. Error codes should be greater than 1000. Either this member or the return value member must be filled in; the other must be set to 0. - wReserved
Reserved; set to 0. - bstrSource
Unicode string that contains the textual, human-readable name of the source of the exception. Typically, this is an application name. This member should be filled in by the implementor of IDispatch. - bstrDescription
Unicode string that contains the textual, human-readable description of the error intended for the customer. If no description is available, use NULL. - bstrHelpFile
Unicode string that contains the fully qualified drive, path, and file name of a Help file with more information about the error. If no Help is available, use NULL. - dwHelpContext
Specifies the Help context identifier of the topic within the Help file. This member should be filled in if and only if the bstrHelpFile member is not NULL. - pvReserved
Reserved; set to NULL. - pfnDeferredFillIn
Pointer to a function that takes an EXCEPINFO structure as an argument and returns an HRESULT value. Pass NULL to not use deferred fill-in of the EXCEPINFO structure. For more information, see Remarks. - scode
Return value describing the error. Either this member or wCode (but not both) must be filled in; the other must be set to 0. For use with 16-bit versions only.
Remarks
Use the pfnDeferredFillIn member to allow an object to defer filling in the bstrDescription, bstrHelpFile, and dwHelpContext members until they are needed. This member might be used, for example, if loading the string for the error is a time-consuming operation. To use deferred fill-in, the object puts a function pointer in this slot and does not fill any of the other members except wCode, which is required.
To get additional information, the caller passes the EXCEPINFO structure back to the pexcepinfo callback function, which fills in the additional information. When the ActiveX object and the ActiveX client are in different processes, the ActiveX object calls pfnDeferredFillIn before returning to the controller.
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Oaidl.h.
See Also
Automation Structures | IDispatch::Invoke
Last updated on Wednesday, April 13, 2005
© 2005 Microsoft Corporation. All rights reserved.