Share via


ICreateErrorInfo::SetDescription (Compact 2013)

3/26/2014

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

See Also

Reference

ICreateErrorInfo