IModelObject::GetTypeInfo 方法 (dbgmodel.h)

GetTypeInfo 方法将返回给定对象的本机类型。 如果对象没有与其关联的本机类型信息(例如:它是固有类型信息等),调用仍会成功,但将返回 null。

语法

HRESULT GetTypeInfo(
  IDebugHostType **type
);

参数

type

此指针所表示对象的本机类型将作为 IDebugHostType 接口返回。

返回值

此方法返回指示成功或失败的 HRESULT。

言论

代码示例

在此示例中,将使用 IDebugHostType 接口

ComPtr<IModelObject> spObject; /* get an object */

ComPtr<IDebugHostType> spType;
if (SUCCEEDED(spObject->GetTypeInfo(&spType)) && spType != nullptr)
{
    // The object has a native type.  spType is such type.
}

要求

要求 价值
标头 dbgmodel.h

另请参阅

IModelObject 接口