Share via


IeXdi2Mem::GetStdRegAlias (Windows Embedded CE 6.0)

1/5/2010

This method returns the CPU specific register that corresponds to a specified standard register.

Syntax

HRESULT GetStdRegAlias(
  LPOLESTR szStdRegName,
  LPOLESTR* pszRegName
);

Parameters

  • szStdRegName
    [in] Standard register name.

    The following table shows possible values for szStdRegName.

    Value Description

    sStdReg_SP

    Register that contains the stack pointer

    StdReg_IP

    Register that contains the instruction pointer

    StdReg_FP

    Register that contains the frame pointer

    StdReg_RA

    Register that contains the return address

  • pszRegName
    [out] Pointer to the corresponding CPU-specific register name.

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_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 debugging target.

Remarks

The buffer for szStdRegName is allocated by CoTaskMemAlloc.

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

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

LPOLESTR szStdRegName;
HRESULT hr = pieXdi2Mem->GetStdRegAlias (SZ_STD_REG_SP, &szStdRegName);
if (SUCCEEDED (hr))
{
    // Use cpu specific register name ...
    CoTaskMemFree (szStdRegName);
    szStdRegName = 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