COleControl::FireError

void FireError( SCODE scode, LPCTSTR lpszDescription, UINT nHelpID = 0 );

Parameters

scode

The status code value to be reported. For a complete list of possible codes, see the article  ActiveX Controls: Advanced Topics in Visual C++ Programmer’s Guide.

lpszDescription

The description of the error being reported.

nHelpID

The Help ID of the error being reported.

Remarks

Call this function to fire the stock Error event. This event provides a way of signalling, at appropriate places in your code, that an error has occurred within your control. Unlike other stock events, such as Click or MouseMove, Error is never fired by the framework.

To report an error that occurs during a property get function, property set function, or automation method, call COleControl::ThrowError.

The implementation of an OLE control's Stock Error event uses an SCODE value. If your control uses this event, and is intended to be used in Visual Basic 4.0, you will receive errors because the SCODE value is not supported in Visual Basic.

To fix this, manually change the SCODE parameter in the control's .ODL file to a long. In addition, any custom event, method, or property that uses an SCODE parameter also causes the same problem.

COleControl OverviewClass MembersHierarchy Chart

See Also   COleControl::DisplayError