Partager via


IeXdi2Generic::GetTargetInfo (Windows Embedded CE 6.0)

1/5/2010

This method returns global information about the debugging target and the hardware probe or emulator.

Syntax

HRESULT GetTargetInfo(
  GLOBAL_TARGET_INFO_STRUCT2* pgti2
);

Parameters

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.

EXDI_E_COMMUNICATION

Indicates a communication error between host driver and debugging target.

Remarks

If the driver supports multiple CPU families, the CPU family field in GLOBAL_TARGET_INFO_STRUCT2 should be CPUF_UNK until the processor in the target can be clearly identified.

To avoid resource leaking, use CoTaskMemFree to free the task memory used by the buffers that this function uses to return values for szTargetName and szProbeName in GLOBAL_TARGET_INFO_STRUCT2.

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

GLOBAL_TARGET_INFO_STRUCT2 pgti2;
HRESULT hr = pieXdi2Generic->GetTargetInfo (&pgti2);
if (SUCCEEDED (hr))
{
    // Use information in pgti2;
    CoTaskMemFree (pgti2.szTargetName);
    pgti2.szTargetName = 0;
    CoTaskMemFree (pgti2.szProbeName);
    pgti2.szProbeName = 0;
}

Requirements

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

See Also

Reference

IeXdi2Generic
IeXDI2 Interfaces