ICreateErrorInfo::SetSource

This method sets the language-dependent programmatic identifier for the class or application that raised the error.

At a Glance

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

Syntax

HRESULT SetSource( LPCOLESTR szSource );

Parameters

szSource

Null-terminated string that contains the programmatic identifier in the form progname.objectname.

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

ICreateErrorInfo::SetSource should be used to identify the class or application that is the source of the error. The language for the returned programmatic identifierdepends 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);