Share via


COleDispatchException Class

Handles exceptions specific to the OLE IDispatch interface, which is a key part of OLE automation.

class COleDispatchException : public CException

Members

Public Data Members

Name

Description

COleDispatchException::m_dwHelpContext

Help context for error.

COleDispatchException::m_strDescription

Verbal error description.

COleDispatchException::m_strHelpFile

Help file to use with m_dwHelpContext.

COleDispatchException::m_strSource

Application that generated the exception.

COleDispatchException::m_wCode

IDispatch-specific error code.

Remarks

Like the other exception classes derived from the CException base class, COleDispatchException can be used with the THROW, THROW_LAST, TRY, CATCH, AND_CATCH, and END_CATCH macros.

In general, you should call AfxThrowOleDispatchException to create and throw a COleDispatchException object.

For more information on exceptions, see the articles Exception Handling (MFC) and Exceptions: OLE Exceptions.

Inheritance Hierarchy

CObject

CException

COleDispatchException

Requirements

Header: afxdisp.h

See Also

Reference

CException Class

Hierarchy Chart

COleDispatchDriver Class

COleException Class

Concepts

MFC Sample CALCDRIV