description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||
---|---|---|---|---|---|---|---|
Learn more about: _com_error Class |
_com_error Class |
11/17/2022 |
|
|
70dafa69-b1fb-4a5c-9249-e857e0793d42 |
Microsoft Specific
A _com_error
object represents an exception condition detected by the error-handling wrapper functions in the header files generated from the type library or by one of the COM support classes. The _com_error
class encapsulates the HRESULT
error code and any associated IErrorInfo Interface
object.
Name | Description |
---|---|
_com_error |
Constructs a _com_error object. |
Name | Description |
---|---|
operator = |
Assigns an existing _com_error object to another. |
Name | Description |
---|---|
Error |
Retrieves the HRESULT passed to the constructor. |
ErrorInfo |
Retrieves the IErrorInfo object passed to the constructor. |
WCode |
Retrieves the 16-bit error code mapped into the encapsulated HRESULT . |
Name | Description |
---|---|
Description |
Calls IErrorInfo::GetDescription function. |
HelpContext |
Calls IErrorInfo::GetHelpContext function. |
HelpFile |
Calls IErrorInfo::GetHelpFile function |
Source |
Calls IErrorInfo::GetSource function. |
GUID |
Calls IErrorInfo::GetGUID function. |
Name | Description |
---|---|
ErrorMessage |
Retrieves the string message for HRESULT stored in the _com_error object. |
Name | Description |
---|---|
HRESULTToWCode |
Maps 32-bit HRESULT to 16-bit wCode . |
WCodeToHRESULT |
Maps 16-bit wCode to 32-bit HRESULT . |
END Microsoft Specific
Header: <comdef.h>
Library: comsuppw.lib
or comsuppwd.lib
(for more information, see /Zc:wchar_t
(wchar_t is native type))