Windows C++ Library
|
The exception type thrown for COM errors. More...
#include <ComException.hpp>
Public Member Functions | |
ComException (HRESULT result, const tchar *operation) | |
Construction from a non-IErrorInfo supported error. | |
ComException (HRESULT result, const tstring &operation) | |
Construction from a non-IErrorInfo supported error. | |
template<typename T > | |
ComException (HRESULT result, IFacePtr< T > &object, const tchar *operation) | |
Construction from an IErrorInfo supported error. | |
virtual | ~ComException () throw () |
Destructor. | |
Public Attributes | |
HRESULT | m_result |
The underlying COM error code. | |
Protected Member Functions | |
ComException (HRESULT result) | |
Construction from an error code. | |
Static Protected Member Functions | |
static bool | extractErrorInfo (IUnknown *object, const IID &iid, tstring &source, tstring &description) |
Extract the ErrorInfo details from the COM object, if present. | |
Private Member Functions | |
void | formatError (HRESULT result, IUnknown *object, const IID &iid, const tchar *operation) |
Format the error using the IErrorInfo details. |
The exception type thrown for COM errors.
WCL::ComException::ComException | ( | HRESULT | result, |
const tchar * | operation | ||
) |
Construction from a non-IErrorInfo supported error.
Constructor for use with non-IErrorInfo errors.
The pszOperation parameter is used as the prefix for the message and the error code is appended.
WCL::ComException::ComException | ( | HRESULT | result, |
const tstring & | operation | ||
) |
Construction from a non-IErrorInfo supported error.
WCL::ComException::ComException | ( | HRESULT | result, |
IFacePtr< T > & | object, | ||
const tchar * | operation | ||
) | [inline] |
Construction from an IErrorInfo supported error.
WCL::ComException::~ComException | ( | ) | throw () [virtual] |
Destructor.
WCL::ComException::ComException | ( | HRESULT | result | ) | [protected] |
Construction from an error code.
bool WCL::ComException::extractErrorInfo | ( | IUnknown * | object, |
const IID & | iid, | ||
tstring & | source, | ||
tstring & | description | ||
) | [static, protected] |
Extract the ErrorInfo details from the COM object, if present.
void WCL::ComException::formatError | ( | HRESULT | result, |
IUnknown * | object, | ||
const IID & | iid, | ||
const tchar * | operation | ||
) | [private] |
Format the error using the IErrorInfo details.
HRESULT WCL::ComException::m_result |
The underlying COM error code.