IeXdi2Mem::EnumAllCpuRegGroups (Windows CE 5.0)
This method creates an enumeration list of all available groups of CPU registers.
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 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_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
OS Version: Windows CE 5.0 and later.
Header: eXDI2.h.
Link Library: ole32.lib oleaut32.lib.
See Also
Send Feedback on this topic to the authors