PIBIO_STORAGE_CLEAR_CONTEXT_FN 콜백 함수(winbio_adapter.h)
새 작업을 위해 생체 인식 단위의 처리 파이프라인을 준비하기 위해 Windows 생체 인식 프레임워크에서 호출됩니다. 이 함수는 엔진 컨텍스트에서 임시 데이터를 플러시하고 엔진 어댑터를 잘 정의된 초기 상태로 전환해야 합니다.
구문
PIBIO_STORAGE_CLEAR_CONTEXT_FN PibioStorageClearContextFn;
HRESULT PibioStorageClearContextFn(
[in, out] PWINBIO_PIPELINE Pipeline
)
{...}
매개 변수
[in, out] Pipeline
작업을 수행하는 생체 인식 단위와 연결된 WINBIO_PIPELINE 구조체에 대한 포인터입니다.
반환 값
함수가 성공하면 S_OK를 반환합니다. 함수가 실패하는 경우 오류를 나타내려면 다음 HRESULT 값 중 하나를 반환해야 합니다.
반환 코드 | 설명 |
---|---|
|
Pipeline 인수는 NULL일 수 없습니다. |
|
Pipeline 인수가 가리키는 WINBIO_PIPELINE 구조체의 StorageContext 멤버는 NULL입니다. |
설명
다음 스토리지 어댑터 컨텍스트 항목을 지워야 합니다.
- 결과 집합 - 가장 최근의 데이터베이스 쿼리 작업에서 생성된 레코드 컬렉션입니다.
- 결과 집합 커서 - 결과 집합 내의 현재 위치를 나타내는 표시기입니다. 이는 결과 집합을 반복하고 개별 레코드를 사용할 수 있도록 하는 데 사용됩니다.
예제
다음 의사 코드는 이 함수의 가능한 구현 중 하나를 보여 줍니다. 이 예제는 컴파일되지 않습니다. 목적에 맞게 조정해야 합니다.
/////////////////////////////////////////////////////////////////////////////////////////
//
// 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;
}
요구 사항
요구 사항 | 값 |
---|---|
지원되는 최소 클라이언트 | Windows 7 [데스크톱 앱만 해당] |
지원되는 최소 서버 | Windows Server 2008 R2 [데스크톱 앱만 해당] |
대상 플랫폼 | Windows |
헤더 | winbio_adapter.h(Winbio_adapter.h 포함) |