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 object_com_error( HRESULT hr, IErrorInfo* perrinfo = NULL ) throw( );_com_error( const _com_error& that ) throw( );Constructs a _com_error object. The first constructor creates a new object given an HRESULT and optional IErrorInfo object. The second creates a copy of an existing _com_error object.
贴上来给你 -- MSDN 2003.July哦:) Microsoft SpecificA _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 object.Construction_com_error Constructs a _com_error object. Operatorsoperator = Assigns an existing _com_error object to another. Extractor FunctionsError 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. IErrorInfo FunctionsDescription Calls IErrorInfo::GetDescription function. HelpContext Calls IErrorInfo::GetHelpContext function. HelpFile Calls IErrorInfo::GetHelpFile function Source Calls IErrorInfo::GetSource function. GUID Calls IErrorInfo::GetGUID function. Format Message ExtractorErrorMessage Retrieves the string message for HRESULT stored in the _com_error object. ExepInfo.wCode to HRESULT MappersHRESULTToWCode Maps 32-bit HRESULT to 16-bit wCode. WCodeToHRESULT Maps 16-bit wCode to 32-bit HRESULT. Requirements Header: comdef.h Lib: comsupp.lib
Microsoft SpecificA _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 object.Construction_com_error Constructs a _com_error object. Operatorsoperator = Assigns an existing _com_error object to another. Extractor FunctionsError 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. IErrorInfo FunctionsDescription Calls IErrorInfo::GetDescription function.
HelpContext Calls IErrorInfo::GetHelpContext function.
HelpFile Calls IErrorInfo::GetHelpFile function
Source Calls IErrorInfo::GetSource function.
GUID Calls IErrorInfo::GetGUID function. Format Message ExtractorErrorMessage Retrieves the string message for HRESULT stored in the _com_error object. ExepInfo.wCode to HRESULT MappersHRESULTToWCode Maps 32-bit HRESULT to 16-bit wCode.
WCodeToHRESULT Maps 16-bit wCode to 32-bit HRESULT.
Requirements
Header: comdef.h
Lib: comsupp.lib