IModelObject::GetTargetInfo 方法 (dbgmodel.h)
GetTargetInfo 方法實際上是 GetLocation 和 GetTypeInfo 方法的組合,可傳回抽象位置和指定物件的原生類型。
語法
HRESULT GetTargetInfo(
Location *location,
IDebugHostType **type
);
參數
location
這個指標所代表之原生物件的抽象位置將會在此傳回。
type
此指標所代表物件的原生類型將會在此傳回為 IDebugHostType 介面。
傳回值
此方法會傳回表示成功或失敗的 HRESULT。
言論
程式代碼範例
ComPtr<IModelObject> spObject; /* get an object */
Location loc;
ComPtr<IDebugHostType> spType;
if (SUCCEEDED(spObject->GetTargetInfo(&loc, &spType)))
{
// loc has a valid location
// spType has a valid type -- the type of the object
}
要求
要求 | 價值 |
---|---|
標頭 | dbgmodel.h |