HRESULT SetSource(
LPCOLESTR szSource
);
Sets the language-dependent programmatic identifier (ProgID) for the class or application that raised 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. |
ICreateErrorInfo::SetSource should be used to identify the class or application that is the source of the error. The language for the returned ProgID depends on the locale identifier (LCID) that was passed to the method at the time of invocation.
hr = CreateErrorInfo(&pcerrinfo);
if (m_excepinfo.bstrSource)
pcerrinfo->SetSource(m_excepinfo.bstrSource);