Compartilhar via


ICreateErrorInfo::SetDescription

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method sets a textual description of the error.

Syntax

HRESULT SetDescription( 
  LPCOLESTR* szDescription
);

Parameters

  • szDescription
    [in] Brief, null-terminated string that describes the error.

Return Value

If the method succeeds, the return value is S_OK.

If there is insufficient memory to complete the operation, the return value is E_OUTOFMEMORY.

Remarks

The text should be supplied in the language specified by the locale identifier (LCID) that was passed to the method raising the error.

Example

hr = CreateErrorInfo(&pcerrinfo);
if (m_excepinfo.bstrDescription)
 pcerrinfo->SetDescription(m_excepinfo.bstrDescription);

Requirements

Header oaidl.h, oaidl.idl
Library oleaut32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

ICreateErrorInfo