PIBIO_ENGINE_QUERY_INDEX_VECTOR_SIZE_FN コールバック関数 (winbio_adapter.h)

エンジン アダプターによって使用されるインデックス ベクターのサイズを取得するために、Windows 生体認証フレームワークによって呼び出されます。

構文

PIBIO_ENGINE_QUERY_INDEX_VECTOR_SIZE_FN PibioEngineQueryIndexVectorSizeFn;

HRESULT PibioEngineQueryIndexVectorSizeFn(
  [in, out] PWINBIO_PIPELINE Pipeline,
  [out]     PSIZE_T IndexElementCount
)
{...}

パラメーター

[in, out] Pipeline

操作を実行する生体認証ユニットに関連付けられている WINBIO_PIPELINE 構造体へのポインター。

[out] IndexElementCount

インデックス ベクター内の配列要素の数を受け取る変数のアドレス。

戻り値

関数が成功した場合は、S_OK を返します。 関数が失敗した場合は、次のいずれかの HRESULT 値を返してエラーを示す必要があります。

リターン コード 説明
E_POINTER
必須のポインター パラメーターは NULL です

解説

インデックス ベクトルは、エンジン アダプターによって使用され、使用可能な生体認証テンプレートのインデックスを作成します。

次の擬似コードは、この関数の 1 つの可能な実装を示しています。 この例はコンパイルされません。 目的に合わせて調整する必要があります。

///////////////////////////////////////////////////////////////////////////////
//
// EngineAdapterQueryIndexVectorSize
//
// Purpose:
//      Called by the Windows Biometric Framework to retrieve the size of 
//      the index vector used by the engine adapter.
//
// Parameters:
//      Pipeline            - Pointer to a WINBIO_PIPELINE structure associated 
//                            with the biometric unit performing the operation.
//      IndexElementCount   - Address of a variable that receives the number of 
//                            elements in the index vector.
//
static HRESULT
WINAPI
EngineAdapterQueryIndexVectorSize(
    __inout PWINBIO_PIPELINE Pipeline,
    __out PSIZE_T IndexElementCount
    )
{
    HRESULT hr = S_OK;

    // Verify that pointer arguments are not NULL.
    if (!ARGUMENT_PRESENT(Pipeline) ||
        !ARGUMENT_PRESENT(IndexElementCount))
    {
        hr = E_POINTER;
        goto cleanup;
    }

    // Specify the number of index vector elements supported by your adapter. This can
    // be any positive value or zero. Return zero if your adapter does not support placing 
    // templates into buckets. That is, return zero if your adapter does not support index 
    // vectors.
    *IndexElementCount = NUMBER_OF_TEMPLATE_BINS;

cleanup:

    return hr;
}

要件

   
サポートされている最小のクライアント Windows 7 [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows Server 2008 R2 [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー winbio_adapter.h (Winbio_adapter.h を含む)

関連項目

プラグイン関数