IDebugHostType2::GetPointerKind 方法 (dbgmodel.h)
对于属于指针的类型,GetPointerKind 方法返回指针的类型。 这由 PointerKind 枚举定义,是以下值之一:
枚举 | 含义 |
---|---|
PointerStandard | 指示标准 C/C++ 指针 - * |
PointerReference | 指示 C/C++ 引用 (const 是否) -- & |
PointerRValueReference | 指示 c/C++ rvalue 引用 (const 是否) -- && |
PointerCXHat | 指示 C++/CX hat 托管指针 (const 是否) - ^ |
语法
HRESULT GetPointerKind(
PointerKind *pointerKind
);
参数
pointerKind
指针类型将在此处返回, (作为 PointerKind 枚举中的值。
返回值
此方法返回指示成功或失败的 HRESULT。
注解
示例代码
ComPtr<IDebugHostType> spType; /* get a type for something that's a pointer
or reference (see FindTypeByName) */
PointerKind pk;
if (SUCCEEDED(spType->GetPointerKind(&pk)))
{
// pk indicates the kind of pointer:
// PointerStandard (it's a '*')
// PointerReference (it's a '&')
// etc...
}
要求
要求 | 值 |
---|---|
Header | dbgmodel.h |
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈