Share via


IOsAxsMem::ReadMemoryByProc (Windows Embedded CE 6.0)

1/5/2010

This method reads a block of data from linear memory.

Syntax

HRESULT ReadMemoryByProc(
  [in] DWORD ProcID,
  [in] LINEAR_MEM_MAP_TYPE lmt,
  [in] ADDRESS_TYPE Address,
  [in] DWORD dwNbElemToRead,
  [in] BYTE bAccessWidthInBytes,
  [out, size_is(dwNbElemToRead* bAccessWidthInBytes)] BYTE* pbReadBuffer,
  [out] DWORD* pdwNbElementEffectRead
);

Parameters

  • ProcID
    Identifier of the process of interest.
  • lmt
    Linear memory map type.

    The following memory map types are used by convention:

    Value Description

    LMM_VIRT, 0

    Virtual memory

    LMM_PHYS, 1

    Physical memory

    LMM_IO, 2

    Peripheral I/O

    3 and higher

    Free for custom use

  • Address
    Starting address of the data buffer to be accessed on the target.
  • dwNbElemToRead
    Number of elements of bAccessWidthInBytes bytes to be accessed.
  • bAccessWidthInBytes
    Data width in bytes, where byte=1, word=2, dword=4, and so on.
  • pbReadBuffer
    Buffer where the result of reading is written.

    This buffer must at least as large as dwNbElemToRead.

    Note

    The server should handle buffers of at least 64 KB.

  • pdwNbElementEffectRead
    Returns the number of the element effectively read.

    A client can use this value to speed up a query, in case of an access violation (EXDI_E_ACCESSVIOLATION) in the range of addresses.

    If an entire range is not accessible, the returned value should be 0 to avoid making a query with small granularity.

Return Value

The following table shows return values for this method.

Value Description

S_OK

Indicates the function was successful and all breakpoints were created.

E_FAIL

Indicates an unspecified failure.

E_OUTOFMEMORY

Indicates an out of memory error.

E_INVALIDARG

Indicates one or more invalid arguments.

EXDI_E_COMMUNICATION

Indicates a communication error between host driver and target device.

Remarks

The memory content returned to this function should not contain artifacts of software breakpoints or of other modifications of the memory produced by the debugging activity of the driver, probe, or target.

In general, the driver internal mechanism should be transparent to the client.

Requirements

Header OsAccess.h
Library OSAXSC.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IOsAxsMem
IOsAxs Interfaces