Skip to content

Latest commit

 

History

History
121 lines (76 loc) · 4.23 KB

coledispatchexception-class.md

File metadata and controls

121 lines (76 loc) · 4.23 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: COleDispatchException Class
COleDispatchException Class
11/04/2016
COleDispatchException
AFXDISP/COleDispatchException
AFXDISP/COleDispatchException::m_dwHelpContext
AFXDISP/COleDispatchException::m_strDescription
AFXDISP/COleDispatchException::m_strHelpFile
AFXDISP/COleDispatchException::m_strSource
AFXDISP/COleDispatchException::m_wCode
COleDispatchException [MFC], m_dwHelpContext
COleDispatchException [MFC], m_strDescription
COleDispatchException [MFC], m_strHelpFile
COleDispatchException [MFC], m_strSource
COleDispatchException [MFC], m_wCode
0e95c8be-e21a-490c-99ec-181c6a9a26d0

COleDispatchException Class

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

Syntax

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

COleDispatchException::m_dwHelpContext

Identifies a help context in your application's help (.HLP) file.

DWORD m_dwHelpContext;

Remarks

This member is set by the function AfxThrowOleDispatchException when an exception is thrown.

Example

See the example for COleDispatchDriver::CreateDispatch.

COleDispatchException::m_strDescription

Contains a verbal error description, such as "Disk full."

CString m_strDescription;

Remarks

This member is set by the function AfxThrowOleDispatchException when an exception is thrown.

Example

See the example for COleDispatchDriver::CreateDispatch.

COleDispatchException::m_strHelpFile

The framework fills in this string with the name of the application's help file.

CString m_strHelpFile;

COleDispatchException::m_strSource

The framework fills in this string with the name of the application that generated the exception.

CString m_strSource;

Example

See the example for COleDispatchDriver::CreateDispatch.

COleDispatchException::m_wCode

Contains an error code specific to your application.

WORD m_wCode;

Remarks

This member is set by the function AfxThrowOleDispatchException when an exception is thrown.

See also

MFC Sample CALCDRIV
CException Class
Hierarchy Chart
COleDispatchDriver Class
COleException Class