COleControl::ThrowError

Signals the occurrence of an error in your control.

void ThrowError( 
   SCODE sc, 
   UINT nDescriptionID, 
   UINT nHelpID = -1  
); 
void ThrowError( 
   SCODE sc, 
   LPCTSTR pszDescription = NULL, 
   UINT nHelpID = 0  
);

Parameters

  • sc
    The status code value to be reported. For a complete list of possible codes, see the article ActiveX Controls: Advanced Topics.

  • nDescriptionID
    The string resource ID of the exception to be reported.

  • nHelpID
    The help ID of the topic to be reported on.

  • pszDescription
    A string containing an explanation of the exception to be reported.

Remarks

This function should only be called from within a Get or Set function for an OLE property, or the implementation of an OLE automation method. If you need to signal errors that occur at other times, you should fire the stock Error event.

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::FireError

COleControl::DisplayError

Other Resources

COleControl Members