Skip to content

Latest commit

 

History

History
104 lines (73 loc) · 3.18 KB

coleexception-class.md

File metadata and controls

104 lines (73 loc) · 3.18 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
COleException Class | Microsoft Docs
11/04/2016
cpp-windows
reference
COleException
AFXDISP/COleException
AFXDISP/COleException::Process
AFXDISP/COleException::m_sc
C++
COleException [MFC], Process
COleException [MFC], m_sc
2571e9fe-26cc-42f0-9ad9-8ad5b4311ec1
22
mikeblome
mblome
ghogen

COleException Class

Represents an exception condition related to an OLE operation.

Syntax

class COleException : public CException  

Members

Public Methods

Name Description
COleException::Process Translates a caught exception into an OLE return code.

Public Data Members

Name Description
COleException::m_sc Contains the status code that indicates the reason for the exception.

Remarks

The COleException class includes a public data member that holds the status code indicating the reason for the exception.

In general, you should not create a COleException object directly; instead, you should call AfxThrowOleException.

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

Inheritance Hierarchy

CObject

CException

COleException

Requirements

Header: afxdisp.h

COleException::m_sc

This data member holds the OLE status code that indicates the reason for the exception.

SCODE m_sc;  

Remarks

This variable's value is set by AfxThrowOleException.

For more information on SCODE, see Structure of COM Error Codes in the Windows SDK.

Example

[!code-cppNVC_MFCOleContainer#22]

COleException::Process

Call the Process member function to translate a caught exception into an OLE status code.

static SCODE PASCAL Process(const CException* pAnyException);

Parameters

pAnyException
Pointer to a caught exception.

Return Value

An OLE status code.

Remarks

Note

This function is static.

For more information on SCODE, see Structure of COM Error Codes in the Windows SDK.

Example

See the example for COleDispatchDriver::CreateDispatch.

See Also

MFC Sample CALCDRIV
CException Class
Hierarchy Chart