Error in user YAML: (<unknown>): did not find expected ',' or ']' while parsing a flow sequence at line 11 column 22
---
title: "_com_error Class | Microsoft Docs"
ms.custom: ""
ms.date: "11/04/2016"
ms.reviewer: ""
ms.suite: ""
ms.technology: ["cpp-language"]
ms.tgt_pltfrm: ""
ms.topic: "language-reference"
f1_keywords: ["_com_error"]
dev_langs: ["C++"]
helpviewer_keywords: ["[""_com_error class [C++]""]"]
ms.assetid: 70dafa69-b1fb-4a5c-9249-e857e0793d42
caps.latest.revision: 10
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"]
---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.
| _com_error | Constructs a _com_error object. |
| operator = | Assigns an existing _com_error object to another. |
| 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. |
| 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. |
| ErrorMessage | Retrieves the string message for HRESULT stored in the _com_error object. |
| HRESULTToWCode | Maps 32-bit HRESULT to 16-bit wCode. |
| WCodeToHRESULT | Maps 16-bit wCode to 32-bit HRESULT. |
END Microsoft Specific
Header: comdef.h
Lib: comsuppw.lib or comsuppwd.lib (see /Zc:wchar_t (wchar_t Is Native Type) for more information)