ICreateErrorInfo::SetDescription

This method sets a textual description of the error.

At a Glance

Header file: Oaidl.h
Windows CE versions: 2.0 and later

Syntax

HRESULT SetDescription( LPCOLESTR *szDescription );

Parameters

szDescription

Brief, null-terminated string that describes the error.

Return Values

One of the values described in the following table is returned.

Value Description
S_OK Success.
E_OUTOFMEMORY Insufficient memory to complete the operation.

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);