CComCoClass::Error

The CComCoClass::Error method sets up the IErrorInfo interface to provide error information to the client. In order to call Error, your object must implement the ISupportErrorInfo interface.

Syntax

static HRESULT Error( LPCOLESTR lpszDesc, const IID& iid = GUID_NULL, HRESULT hRes = 0 );
static HRESULT Error( LPCOLESTR lpszDesc, DWORD dwHelpID, LPCOLESTR lpszHelpFile, const IID& iid = GUID_NULL, HRESULT hRes = 0 );
static HRESULT Error( LPCSTR lpszDesc, const IID& iid = GUID_NULL, HRESULT hRes = 0 );
static HRESULT Error( LPCSTR lpszDesc, DWORD dwHelpID, LPCSTR lpszHelpFile, const IID& iid = GUID_NULL, HRESULT hRes = 0 );
static HRESULT Error( UINT nID, const IID& iid = GUID_NULL, HRESULT hRes = 0, HINSTANCE hInst = _Module.GetResourceInstance( ) );
static HRESULT Error( UINT nID, DWORD dwHelpID, LPCOLESTR lpszHelpFile, const IID& iid = GUID_NULL, HRESULT hRes = 0, HINSTANCE hInst = _Module.GetResourceInstance( ) );

At a Glance

Header file: Atlcom.h
Platforms:
Versions: 2.0 and later
Complete documentation: Visual C++ documentation

See Also

CComCoClass Overview, CComCoClass Methods, IErrorInfo, ISupportErrorInfo, ISupportErrorInfoImpl