IBackgroundCopyError::GetErrorContextDescription method
Retrieves the description of the context in which the error occurred.
Syntax
HRESULT GetErrorContextDescription(
[in] DWORD LanguageId,
[out] LPWSTR *ppContextDescription
);
Parameters
LanguageId [in]
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())ppContextDescription [out]
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
Minimum supported client |
Windows 10, version 1709 [desktop apps only] |
Minimum supported server |
Windows Server 2016 [desktop apps only] |
Header |
Deliveryoptimization.h |
IDL |
DeliveryOptimization.idl |
Library |
Dosvc.lib |
DLL |
Dosvc.dll |
IID |
IID_IBackgroundCopyError is defined as 19C613A0-FCB8-4F28-81AE-897C3D078F81 |
See also
IBackgroundCopyError::GetError