IDebugHostType::GetPointerKind 方法 (dbgmodel.h)
對於屬於指標的類型,GetPointerKind 方法會傳回指標的類型。 這是由 PointerKind 列舉所定義,而且是下列其中一個值:
列舉 | 意義 |
---|---|
PointerStandard | 表示標準 C/C++指標 -- a * |
PointerReference | 指出 C/C++ 參考 (不論 const 是否) - & |
PointerRValueReference | 指出 C/C++右值參考 (不論 const 是否) -- && |
PointerCXHat | 指出C++/CX hat Managed 指標 (不論 const 是否) -- a ^ |
語法
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...
}
要求
要求 | 價值 |
---|---|
標頭 | dbgmodel.h |