다음을 통해 공유


PIBIO_ENGINE_QUERY_SAMPLE_HINT_FN 콜백 함수(winbio_adapter.h)

Windows 생체 인식 프레임워크에서 등록 템플릿을 생성하는 데 엔진 어댑터에 필요한 올바른 샘플 수를 검색하기 위해 호출됩니다.

구문

PIBIO_ENGINE_QUERY_SAMPLE_HINT_FN PibioEngineQuerySampleHintFn;

HRESULT PibioEngineQuerySampleHintFn(
  [in, out] PWINBIO_PIPELINE Pipeline,
  [out]     PSIZE_T SampleHint
)
{...}

매개 변수

[in, out] Pipeline

작업을 수행하는 생체 인식 단위와 연결된 WINBIO_PIPELINE 구조체에 대한 포인터입니다.

[out] SampleHint

필요한 샘플 수를 수신하는 변수에 대한 포인터입니다.

반환 값

함수가 성공하면 S_OK를 반환합니다. 함수가 실패하는 경우 오류를 나타내려면 다음 HRESULT 값 중 하나를 반환해야 합니다.

반환 코드 설명
E_POINTER
필수 포인터 매개 변수는 NULL입니다.
WINBIO_E_UNSUPPORTED_PROPERTY
엔진 어댑터는 이 속성을 지원하지 않습니다.

설명

엔진 어댑터에 다양한 상황에서 다른 수의 샘플이 필요한 경우 가장 큰 수를 반환해야 합니다. 예를 들어 지문 엔진에서 엄지 손가락보다 검지 손가락에 더 많은 살짝 밀기를 필요로 하는 경우 인덱스 손가락에 필요한 숫자를 반환합니다.

SampleHint 매개 변수에서 반환되는 값은 필요한 올바른 샘플 수를 지정합니다. 잘못된 캡처로 인해 등록 중에 필요한 실제 샘플 수가 지정된 수보다 클 수 있습니다.

예제

다음 의사 코드는 이 함수의 가능한 구현 중 하나를 보여 줍니다. 이 예제는 컴파일되지 않습니다. 목적에 맞게 조정해야 합니다.

//////////////////////////////////////////////////////////////////////////////////////////
//
// EngineAdapterQuerySampleHint
//
// Purpose: 
//      Retrieves the number of correct samples required by the engine adapter 
//      to construct an enrollment template.
//
// Parameters:
//      Pipeline    - Pointer to a WINBIO_PIPELINE structure associated 
//                    with the biometric unit performing the operation. 
//      SampleHint  - Pointer to a variable that receives the number of 
//                    required samples.
//
static HRESULT
WINAPI
EngineAdapterQuerySampleHint(
    __inout PWINBIO_PIPELINE Pipeline,
    __out PSIZE_T SampleHint
    )
{
    // Verify that pointer arguments are not NULL.
    if (!ARGUMENT_PRESENT(Pipeline) ||
        !ARGUMENT_PRESENT(SampleHint))
    {
        hr = E_POINTER;
        goto cleanup;
    }

    // The sample hint specified here is a constant but can also be a 
    // function of the hardware model or the device settings depending
    // on your adapter.
    // If your adapter does not support this feature, return
    // WINBIO_E_UNSUPPORTED_PROPERTY.
    *SampleHint = SAMPLES_REQUIRED_FOR_ENROLLMENT;

cleanup:

    return hr;
}

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows 7 [데스크톱 앱만 해당]
지원되는 최소 서버 Windows Server 2008 R2 [데스크톱 앱만 해당]
대상 플랫폼 Windows
헤더 winbio_adapter.h(Winbio_adapter.h 포함)

추가 정보

EngineAdapterAcceptSampleData

플러그 인 함수