IeXdi2Mem::GetLinearMemMapList (Windows CE 5.0)

Send Feedback

This method returns the supported linear memory map table.

HRESULT GetLinearMemMapList(  [out] DWORD *pdwNbTotalMemMapInList,  [out, size_is(,*pdwNbTotalMemMapInList)] MEMMAP_DESCRIPTION_TYPE **ppmmdTable);

Parameters

  • pdwNbTotalMemMapInList
    Total number of MEMMAP_DESCRIPTION_TYPE elements to be provided in ppmmdTable.

  • ppmmdTable
    Pointer to the table of MEMMAP_DESCRIPTION_TYPE elements that associate memory map ID, name, size, and possible access width.

    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 memory map is not implemented.
EXDI_E_COMMUNICATION Indicates a communication error between host driver and debugging target.

Remarks

Debugger clients such as Platform Builder use this method to acquire the set of memory map names and corresponding identifiers given as the scalar type LINEAR_MEM_MAP_TYPE.

The following table shows typical memory map identifier-name relationships.

Identifier Description
0 Virtual memory map
1 Physical memory map
2 Peripheral I/O registers
3 Custom map, used for machine-specific registers or addressable CPU register access

Platform Builder acquires this list when starting the debugger and connecting to the eXDI2 driver.

This list should be static.

To avoid resource leaking, use CoTaskMemFree to free the task memory used by the buffer for the MEMMAP_DESCRIPTION_TABLE elements that this function points to*.*

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

MEMMAP_DESCRIPTION_TYPE *ppmmdTable;
DWORD pdwNbTotalMemMapInList;
HRESULT hr = pieXdi2Mem->GetLinearMemMapList (&pdwNbTotalMemMapInList,
        &ppmmdTable);
if (SUCCEEDED (hr))
{
    // Use memory map ...
    for (DWORD i = 0; i < pdwNbTotalMemMapInList; ++i)
    {
        CoTaskMemFree (pmmd[i].szName);
        ppmmdTable[i].szName = 0;
    }
    CoTaskMemFree (ppmmdTable);
    ppmmdTable = 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.