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 |
|
reference |
|
|
|
2571e9fe-26cc-42f0-9ad9-8ad5b4311ec1 |
22 |
mikeblome |
mblome |
ghogen |
Represents an exception condition related to an OLE operation.
class COleException : public CException
Name | Description |
---|---|
COleException::Process | Translates a caught exception into an OLE return code. |
Name | Description |
---|---|
COleException::m_sc | Contains the status code that indicates the reason for the exception. |
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.
COleException
Header: afxdisp.h
This data member holds the OLE status code that indicates the reason for the exception.
SCODE m_sc;
This variable's value is set by AfxThrowOleException.
For more information on SCODE
, see Structure of COM Error Codes in the Windows SDK.
[!code-cppNVC_MFCOleContainer#22]
Call the Process member function to translate a caught exception into an OLE status code.
static SCODE PASCAL Process(const CException* pAnyException);
pAnyException
Pointer to a caught exception.
An OLE status code.
Note
This function is static.
For more information on SCODE
, see Structure of COM Error Codes in the Windows SDK.
See the example for COleDispatchDriver::CreateDispatch.