ICreateErrorInfo::SetDescription

HRESULT SetDescription(
  LPCOLESTR  *szDescription  
);
 

Sets the textual description of the error.

Parameter

szDescription
A brief, zero-terminated string that describes the error.

Return Value

The return value obtained from the returned HRESULT is one of the following:

Return value Meaning
S_OK Success.
E_OUTOFMEMORY Insufficient memory to complete the operation.

Comments

The text should be supplied in the language specified by the locale ID (LCID) that was passed to the method raising the error. For more information, see "LCID Attribute" in Chapter 8, "Type Libraries and the Object Description Language."

Example

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