ICreateErrorInfo::SetSource
A version of this page is also available for
4/8/2010
This method sets the language-dependent programmatic identifier for the class or application that raised the error.
Syntax
HRESULT SetSource(
LPCOLESTR szSource
);
Parameters
- szSource
[in] Null-terminated string that contains the programmatic identifier in the form progname.objectname.
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
SetSource should be used to identify the class or application that is the source of the error. The language for the returned programmatic identifier depends on the locale identifier (LCID) that was passed to the method at the time of invocation.
Example
hr = CreateErrorInfo(&pcerrinfo);
if (m_excepinfo.bstrSource)
pcerrinfo->SetSource(m_excepinfo.bstrSource);
Requirements
Header | oaidl.h, oaidl.idl |
Library | oleaut32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |