Partager via


IeXdi2Generic::GetErrorDescription (Windows CE 5.0)

Send Feedback

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

HRESULT GetErrorDescription(  HRESULT ErrorCode,  SHORT wLangLocalId,  LPOLESTR* pszErrorDescBOOL* 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 Values

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

OS Version: Windows CE 5.0 and later.
Header: eXDI2.h.
Link Library: ole32.lib, oleaut32.lib.

See Also

IeXDI2 Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.