Partager via


IeXdi2Generic::GetTargetInfo (Windows CE 5.0)

Send Feedback

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

HRESULT GetTargetInfo(  GLOBAL_TARGET_INFO_STRUCT2* pgti2);

Parameters

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.
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

OS Version: Windows CE 5.0 and later.
Header: eXDI2.h.
Link Library: ole32.lib, oleaut32.lib.

See Also

IeXDI2 Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.