IBackgroundCopyError::GetErrorDescription method (bits.h)

Retrieves the error text associated with the error.

Syntax

HRESULT GetErrorDescription(
  [in]  DWORD  LanguageId,
  [out] LPWSTR *pErrorDescription
);

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] pErrorDescription

Null-terminated string that contains the error text associated with the error. Call the CoTaskMemFree function to free ppErrorDescription when done.

Return value

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

Return code Description
S_OK
Description of the error 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.

Remarks

You can also call the IBackgroundCopyManager::GetErrorDescription method to retrieve the error text associated with an error code.

Descriptions for HTTP errors are localized.

Windows XP/2000:  Descriptions for HTTP errors are not localized.

Examples

See the example code in the Handling Errors topic.

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::GetErrorContextDescription

IBackgroundCopyError::GetFile

IBackgroundCopyManager::GetErrorDescription