Share via


IeXdi2Mem::EnumAllCpuRegGroups (Windows Embedded CE 6.0)

1/5/2010

This method creates an enumeration list of all available groups of CPU registers.

Syntax

HRESULT EnumAllCpuRegGroups(
  [out] DWORD* pdwNbGroups,
  [out, size_is(,*pdwNbGroups)] CPU_REG_GROUP_STRUCT** ppscrg
);

Parameters

  • pdwNbGroups
    Number of groups of registers.
  • ppscrg
    Pointer to the array of CPU register group structures for each group.

    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_INVALIDARG

Indicates one or more invalid arguments.

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 for the CPU_REG_GROUP_STRUCT array that this function returns*.*

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

CPU_REG_GROUP_STRUCT *ppscrg;
DWORD pdwNbGroups;
HRESULT hr = pieXdi2Mem->EnumAllCpuRegGroups (&pdwNbGroups, &ppscrg);
if (SUCCEEDED (hr))
{
    // Use register groups ...
    for (DWORD i = 0; i < pdwNbGroups; ++i)
    {
        CoTaskMemFree (ppscrg[i].szRegGoupName);
        ppscrg[i].szRegGoupName = 0;
    }
    CoTaskMemFree (ppscrg);
    ppscrg = 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