Share via


IeXdi2Generic::GetErrorDescription (Windows Embedded CE 6.0)

1/5/2010

This method returns a text description of an eXDI service error code.

Syntax

HRESULT GetErrorDescription(
  HRESULT ErrorCode,
  SHORT wLangLocalId,
  LPOLESTR* pszErrorDesc
  BOOL* pfRetryAvail
);

Parameters

  • ErrorCode
    [in] Error code returned from a previous call.
  • wLangLocalId
    [in] Language LocaleId that supports multiple languages on the client device.
  • pszErrorDesc
    [out] Pointer to the textual description of the nonstandard error. The buffer for this value is allocated by CoTaskMemAlloc.
  • pfRetryAvail
    [out] If TRUE, indicates the error can be retried.

Return Value

The following table shows return values for this method.

Value Description

S_OK

Indicates the function was successful.

E_FAIL

Indicates an unspecified failure.

E_NOTIMPL

Indicates the error code is not implemented.

E_INVALIDARG

Indicates one or more invalid arguments.

EXDI_E_COMMUNICATION

Indicates a communication error between host driver and debugging target.

Remarks

To avoid resource leaking, use CoTaskMemFree to free the task memory used by the buffers that this function uses to return values for pszErrorDesc and pfRetryAvail.

The following example shows how you might use CoTaskMemFree to release the memory held for the return buffers.

WORD wLang = 0x0409
LPOLESTR pszErrorDesc;
BOOL pfRetryAvail;
HRESULT hr = pieXdi2Generic->GetErrorDescription (hrErrorCode,
        wLang, &pszErrorDesc, &pfRetryAvail);
if (SUCCEEDED (hr))
{
    // Use error description.
    CoTaskMemFree (pszErrorDesc);
    pszErrorDesc = 0;
}

Requirements

Header eXDI2.h
Library ole32.lib, oleaut32.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IeXdi2Generic
IeXDI2 Interfaces