Share via


IeXdi2Mem::GetLinearMemMapList (Windows Embedded CE 6.0)

1/5/2010

This method returns the supported linear memory map table.

Syntax

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

Parameters

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

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

Header eXDI2.h
Library ole32.lib, oleaut32.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IeXdi2Mem
IeXDI2 Interfaces