Partager via


IOsAxsMem::SearchMemoryByProc (Windows CE 5.0)

Send Feedback

This method searches memory for a block that matches a given sequence.

HRESULT SearchMemoryByProc(  [in] DWORDProcID,  [in] LINEAR_MEM_MAP_TYPElmt,  [in] ADDRESS_TYPEAddressRangeStart,  [in] ADDRESS_TYPEAddressRangeEnd,  [in] DWORDdwNbElem,  [in] BYTEbAccessWidthInBytes,  [in, size_is(dwNbElem * bAccessWidthInBytes)] BYTE*pbSequenceToSearch,  [out] ADDRESS_TYPE **ppAddressFound);

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
  • AddressRangeStart
    Starting address of the memory block to be searched on the target device.

  • AddressRangeEnd
    Ending address (included) of the memory block to be searched on the target device.

  • dwNbElem
    Number of elements of bAccessWidthInBytes bytes to be searched in size of pbSequenceToSearch.

  • bAccessWidthInBytes
    Data width in bytes, where byte=1, word=2, dword=4, and so on.

  • pbSequenceToSearch
    Buffer containing the sequence to search.

    This value must be at least as large as dwNbElem.

    Warning

       

    The server should handle sequence buffers of at least 1 KB.

  • ppAddressFound
    Pointer to the first occurrence of the address that includes pbSequenceToSearch. If not found, returns a NULL pointer.

    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 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

To avoid resource leaking, use CoTaskMemFree to free the task memory used by the buffer for ppAddressFound.

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

Requirements

OS Version: Windows CE 5.0 and later.
Header: OsAccess.h.
Link Library: OSAXSC.lib.

See Also

IOsAxs Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.