コールバック関数PIBIO_STORAGE_GET_RECORD_COUNT_FN (winbio_adapter.h)
Windows 生体認証フレームワークまたはエンジン アダプターによって呼び出され、パイプライン結果セット内のテンプレート レコードの数を取得します。
構文
PIBIO_STORAGE_GET_RECORD_COUNT_FN PibioStorageGetRecordCountFn;
HRESULT PibioStorageGetRecordCountFn(
[in, out] PWINBIO_PIPELINE Pipeline,
[out] PSIZE_T RecordCount
)
{...}
パラメーター
[in, out] Pipeline
操作を実行する生体認証ユニットに関連付けられている WINBIO_PIPELINE 構造体へのポインター。
[out] RecordCount
結果セット内のテンプレート レコードの数を受け取る変数へのポインター。
戻り値
関数が成功した場合は、S_OK を返します。 関数が失敗した場合は、エラーを示すために次のいずれかの HRESULT 値を返す必要があります。
リターン コード | 説明 |
---|---|
|
必須のポインター引数は NULL です。 |
|
クエリは成功しましたが、一致するレコードが見つかりませんでした。 |
|
パイプライン オブジェクトの StorageContext メンバーが NULL であるか、 FileHandle メンバーが無効です。 |
解説
結果セット内の現在のレコード数は、 StorageAdapterQueryByContent 関数または StorageAdapterQueryBySubject 関数の最新の呼び出しによって決まります。
例
次の擬似コードは、この関数の 1 つの可能な実装を示しています。 この例はコンパイルされません。 目的に合わせて調整する必要があります。
/////////////////////////////////////////////////////////////////////////////////////////
//
// StorageAdapterGetRecordCount
//
// Purpose:
// Retrieves the number of template records in the pipeline result set.
//
// Parameters:
// Pipeline - Pointer to a WINBIO_PIPELINE structure associated with
// the biometric unit performing the operation.
// RecordCount - Pointer to a variable that receives the number of template
// records in the result set.
//
static HRESULT
WINAPI
StorageAdapterGetRecordCount(
__inout PWINBIO_PIPELINE Pipeline,
__out PSIZE_T RecordCount
)
{
HRESULT hr = S_OK;
// Verify that pointer arguments are not NULL.
if (!ARGUMENT_PRESENT(Pipeline) ||
!ARGUMENT_PRESENT(RecordCount))
{
hr = E_POINTER;
goto cleanup;
}
// Retrieve the context from the pipeline.
PWINBIO_STORAGE_CONTEXT storageContext = (PWINBIO_STORAGE_CONTEXT)Pipeline->StorageContext;
// Verify the pipeline state.
if (storageContext == NULL || storageContext->FileHandle == INVALID_HANDLE_VALUE)
{
hr = WINBIO_E_INVALID_DEVICE_STATE;
goto cleanup;
}
// Call a custom function (_ResultSetGetCount) to retrieve the number of
// records that the most recent query left in the result set.
hr = _ResultSetGetCount( &storageContext->ResultSet, RecordCount);
cleanup:
return hr;
}
要件
サポートされている最小のクライアント | Windows 7 [デスクトップ アプリのみ] |
サポートされている最小のサーバー | Windows Server 2008 R2 [デスクトップ アプリのみ] |
対象プラットフォーム | Windows |
ヘッダー | winbio_adapter.h (Winbio_adapter.h を含む) |
関連項目
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示