ホーム › Devices.BiometricFramework › PIBIO_STORAGE_GET_RECORD_COUNT_FN
PIBIO_STORAGE_GET_RECORD_COUNT_FN
コールバックシグネチャ
HRESULT PIBIO_STORAGE_GET_RECORD_COUNT_FN(
WINBIO_PIPELINE* Pipeline,
UINT_PTR* RecordCount
);パラメーター
| フィールド | 型 | 説明 |
|---|---|---|
| Pipeline | WINBIO_PIPELINE* | 操作を実行するバイオメトリックユニットに関連付けられた WINBIO_PIPELINE 構造体へのポインター。 |
| RecordCount | UINT_PTR* | 結果セットに含まれるテンプレートレコードの数を受け取る変数へのポインター。 |
公式ドキュメント
パイプラインの結果セットに含まれるテンプレートレコードの数を取得するために、Windows Biometric Framework またはエンジンアダプターによって呼び出されます。
戻り値
関数が成功した場合は S_OK を返します。関数が失敗した場合は、エラーを示すために次のいずれかの HRESULT 値を返す必要があります。
| 戻り値 | 説明 |
|---|---|
| 必須のポインター引数が NULL です。 | |
| クエリは成功しましたが、一致するレコードが見つかりませんでした。 | |
| パイプラインオブジェクトの StorageContext メンバーが NULL であるか、FileHandle メンバーが有効ではありません。 |
解説(Remarks)
現在結果セットに含まれているレコードの数は、直近に呼び出された 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;
}
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)