IDebugHostType::GetFunctionParameterTypeAt 方法 (dbgmodel.h)
GetFunctionParameterTypeAt 方法會將 i-th 自變數的類型傳回函式。
語法
HRESULT GetFunctionParameterTypeAt(
ULONG64 i,
IDebugHostType **parameterType
);
參數
i
要擷取自變數類型的函式自變數清單中的以零起始的索引。
parameterType
函式的i-th自變數類型將會在這裡傳回。
傳回值
此方法會傳回表示成功或失敗的 HRESULT。
言論
範例程式代碼
ComPtr<IDebugHostType> spType; /* get a type for a function (see FindTypeByName) */
// enumerate (in order) the types of parameters the function takes
ULONG64 count;
if (SUCCEEDED(spType->GetFunctionParameterTypeCount(&count)))
{
for (ULONG64 i = 0; i < count; ++i)
{
ComPtr<IDebugHostType> spParamType;
if (SUCCEEDED(spType->GetFunctionParameterTypeAt(i, &spParamType)))
{
// spParamType is the type symbol for the type of parameter the
// function takes at position i in the argument list.
}
}
}
要求
要求 | 價值 |
---|---|
標頭 | dbgmodel.h |