ICreateErrorInfo::SetSource

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

HRESULT SetSource( 
  LPCOLESTR szSource
);

Parameters

  • szSource
    [in] Null-terminated string that contains the programmatic identifier in the form progname.objectname.

Return Values

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

OS Versions: Windows CE 2.0 and later.
Header: Oaidl.h, Oaidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

ICreateErrorInfo

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.