EXCEPINFO structure (oaidl.h)

Describes an exception that occurred during IDispatch::Invoke.


typedef struct tagEXCEPINFO {
  WORD      wCode;
  WORD      wReserved;
  BSTR      bstrSource;
  BSTR      bstrDescription;
  BSTR      bstrHelpFile;
  DWORD     dwHelpContext;
  ULONG_PTR pvReserved;
  ULONG_PTR pfnDeferredFillIn;
  SCODE     scode;



The error code. Error codes should be greater than 1000. Either this field or the scode field must be filled in; the other must be set to 0.


Reserved. Should be 0.


The name of the exception source. Typically, this is an application name. This field should be filled in by the implementer of IDispatch.


The exception description to display. If no description is available, use null.


The fully qualified help file path. If no Help is available, use null.


The help context ID.


Reserved. Must be null.


Provides deferred fill-in. If deferred fill-in is not desired, this field should be set to null.


A return value that describes the error. Either this field or wCode (but not both) must be filled in; the other must be set to 0. (16-bit Windows versions only.)


Use the pfnDeferredFillIn field to enable an object to defer filling in the bstrDescription, bstrHelpFile, and dwHelpContext fields until they are needed. This field 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 fields 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.


Header oaidl.h