IBackgroundCopyError::GetErrorContextDescription method (bits.h)

Retrieves the description of the context in which the error occurred.

Syntax

HRESULT GetErrorContextDescription(
  [in]  DWORD  LanguageId,
  [out] LPWSTR *pContextDescription
);

Parameters

[in] LanguageId

Identifies the locale to use to generate the description. To create the language identifier, use the MAKELANGID macro. For example, to specify U.S. English, use the following code sample.

MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)

To retrieve the system's default user language identifier, use the following calls.

LANGIDFROMLCID(GetThreadLocale())

[out] pContextDescription

Null-terminated string that contains the description of the context in which the error occurred. Call the CoTaskMemFree function to free ppContextDescription when done.

Return value

This method returns the following HRESULT values, as well as others.

Return code Description
S_OK
Description of the context was successfully retrieved.
E_OUTOFMEMORY
Not enough memory is available to complete the operation.
E_INVALIDARG
The LanguageId parameter cannot be 0.
HRESULT_FROM_WIN32(ERROR_RESOURCE_LANG_NOT_FOUND)
No string is available for the locale.

Requirements

Requirement Value
Minimum supported client Windows XP
Minimum supported server Windows Server 2003
Target Platform Windows
Header bits.h
Library Bits.lib
DLL QmgrPrxy.dll

See also

IBackgroundCopyError::GetError

IBackgroundCopyError::GetErrorDescription

IBackgroundCopyError::GetFile