HRESULT SetDescription(
LPCOLESTR *szDescription
);
Sets the textual description of the error.
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. |
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."
hr = CreateErrorInfo(&pcerrinfo);
if (m_excepinfo.bstrDescription)
pcerrinfo->SetDescription(m_excepinfo.bstrDescription);