Skip to content

Latest commit

 

History

History
122 lines (91 loc) · 3.35 KB

File metadata and controls

122 lines (91 loc) · 3.35 KB
title COleException Class | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic reference
f1_keywords
COleException
AFXDISP/COleException
AFXDISP/COleException::Process
AFXDISP/COleException::m_sc
dev_langs
C++
helpviewer_keywords
COleException class
exceptions, OLE
ms.assetid 2571e9fe-26cc-42f0-9ad9-8ad5b4311ec1
caps.latest.revision 22
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

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