共用方式為


IDebugHostType::GetFunctionParameterTypeCount 方法 (dbgmodel.h)

GetFunctionParameterTypeCount 方法會傳回函式接受的自變數數目。 請注意,此計數中不會考慮 C++以省略號為基礎的省略號自變數標記。 必須透過 GetFunctionVarArgsKind 方法偵測到這類是否存在。 這隻會在省略號之前包含自變數。

語法

HRESULT GetFunctionParameterTypeCount(
  ULONG64 *count
);

參數

count

函式的自變數數目(忽略變數自變數省略號)將會在這裡傳回。 每個個別自變數的類型都可以透過 GetFunctionParameterTypeAt 方法取得。

傳回值

此方法會傳回表示成功或失敗的 HRESULT。

言論

範例程式代碼

ComPtr<IDebugHostType> spType; /* get a type for a function (see FindTypeByName) */

ULONG64 count;
if (SUCCEEDED(spType->GetFunctionParameterTypeCount(&count)))
{
    // count is the number of parameters the function takes.  This does not 
    // include any ellipsis for variable arguments.
}

要求

要求 價值
標頭 dbgmodel.h

另請參閱

IDebugHostType 介面