ホーム › Devices.BiometricFramework › PIBIO_STORAGE_CLEAR_CONTEXT_FN
PIBIO_STORAGE_CLEAR_CONTEXT_FN
コールバックシグネチャ
HRESULT PIBIO_STORAGE_CLEAR_CONTEXT_FN(
WINBIO_PIPELINE* Pipeline
);パラメーター
| フィールド | 型 | 説明 |
|---|---|---|
| Pipeline | WINBIO_PIPELINE* | 操作を実行する生体認証ユニットに関連付けられた WINBIO_PIPELINE 構造体へのポインター。 |
公式ドキュメント
Windows Biometric Framework から呼び出され、生体認証ユニットの処理パイプラインを新しい操作のために準備します。この関数は、エンジン コンテキストから一時的なデータをフラッシュし、エンジン アダプターを明確に定義された初期状態にする必要があります。
戻り値
関数が成功した場合は S_OK を返します。関数が失敗した場合は、エラーを示すために次のいずれかの HRESULT 値を返す必要があります。
| 戻り値 | 説明 |
|---|---|
| Pipeline 引数を NULL にすることはできません。 | |
| Pipeline 引数が指す WINBIO_PIPELINE 構造体の StorageContext メンバーが NULL です。 |
解説(Remarks)
次のストレージ アダプター コンテキストの項目をクリアする必要があります。
- 結果セット - 直近のデータベース クエリ操作によって生成されたレコードのコレクション。
- 結果セット カーソル - 結果セット内の現在位置を示すインジケーター。結果セットを反復処理し、個々のレコードを利用できるようにするために使用されます。
例
次の疑似コードは、この関数の実装例の 1 つを示しています。この例はそのままではコンパイルできません。目的に合わせて調整する必要があります。
/////////////////////////////////////////////////////////////////////////////////////////
//
// StorageAdapterClearContext
//
// Purpose:
// Prepare the processing pipeline of the biometric unit for a
// new operation.
//
// Parameters:
// Pipeline - Pointer to a WINBIO_PIPELINE structure associated with
// the biometric unit performing the operation.
//
static HRESULT
WINAPI
StorageAdapterClearContext(
__inout PWINBIO_PIPELINE Pipeline
)
{
HRESULT hr = S_OK;
// Verify that the Pipeline parameter is not NULL.
if (!ARGUMENT_PRESENT(Pipeline))
{
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)
{
hr = WINBIO_E_INVALID_DEVICE_STATE;
goto cleanup;
}
// Release data structures attached to the context. The following
// example code shows how to release structures that will likely
// be associated with your adapter context.
_ResultSetClearContents(&storageContext->ResultSet);
if (storageContext->RawRecordData != NULL)
{
_AdapterRelease(storageContext->RawRecordData);
storageContext->RawRecordData = NULL;
storageContext->PayloadBlob = NULL;
}
if (storageContext->DecryptedTemplate != NULL)
{
SecureZeroMemory(
storageContext->DecryptedTemplate,
storageContext->DecryptedTemplateSize
);
_AdapterRelease(storageContext->DecryptedTemplate);
storageContext->DecryptedTemplate = NULL;
storageContext->DecryptedTemplateSize = 0;
}
// TODO: Release any other allocated data structures attached
// to the context (not shown).
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)