AfxThrowOleDispatchException

void AFXAPI AfxThrowOleDispatchException( WORD wCode, LPCSTR lpszDescription, UINT nHelpID = 0 );

void AFXAPI AfxThrowOleDispatchException( WORD wCode, UINT nDescriptionID, UINT nHelpID = -1 );

#include <afxdisp.h>

Parameters

wCode

An error code specific to your application.

lpszDescription

Verbal description of the error.

nDescriptionID

Resource ID for the verbal error description.

nHelpID

A help context for your application’s help (.HLP) file.

Remarks

Use this function to throw an exception within an OLE automation function. The information provided to this function can be displayed by the driving application (Microsoft Visual Basic or another OLE automation client application).

See Also   COleException