Partager via


IeXdi2Generic::ReadClientScratchPad (Windows CE 5.0)

Send Feedback

This method enables a client to read back a memory block that contains miscellaneous data, or scratch pad, saved on the eXDI service by IeXdi2Generic::WriteClientScratchPad.

The scratch pad allocation is on per-client basis. Each client must provide a different GUID.

HRESULT ReadClientScratchPad(  [in] GUIDguidClient,  [out] DWORD* pdwBuffOutSize,  [out, size_is(,*pdwBuffOutSize)] BYTE** ppbBufferOut);

Parameters

  • guidClient
    GUID that identifies client.
  • pdwBuffOutSize
    Size of the scratch pad memory block.
  • ppbBufferOut
    Pointer to memory block that contains the scratch pad. The buffer for this value is allocated by CoTaskMemAlloc.

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.
E_OUTOFMEMORY Indicates an out of memory error.
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 buffer that this function uses to return the scratch pad, pdwBuffOutSize and ppbBufferOut.

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

DWORD pdwBuffOutSize;
BYTE *ppbBufferOut;
HRESULT hr = pieXdi2Generic->ReadClientScratchPad (guidClient, &pdwBuffOutSize, &ppbBufferOut);
if (SUCCEEDED (hr))
{
    // Use scratch pad...
    CoTaskMemFree (ppbBufferOut);
    ppbBufferOut = 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.