EngineAdapterGetEnrollmentStatus function

Called by the Windows Biometric Framework to determine whether the enrollment object is ready to be committed to the pipeline.

Syntax


HRESULT WINAPI EngineAdapterGetEnrollmentStatus(
  _Inout_ PWINBIO_PIPELINE      Pipeline,
  _Out_   PWINBIO_REJECT_DETAIL RejectDetail
);

Parameters

Pipeline [in, out]

Pointer to a WINBIO_PIPELINE structure associated with the biometric unit performing the operation.

RejectDetail [out]

A pointer to a WINBIO_REJECT_DETAIL value that receives additional information about the failure to update the enrollment object. If the last update was successful, you should set this variable to zero.

Return value

This function must return one of the following HRESULT values.

Return codeDescription
S_OK

The last update succeeded and no additional feature sets are required to complete the template.

E_POINTER

A mandatory pointer parameter is NULL.

WINBIO_E_BAD_CAPTURE

The feature set did not meet the internal enrollment requirements of the engine adapter. Further information about the failure is specified by the RejectDetail parameter.

WINBIO_E_INVALID_DEVICE_STATE

There is no enrollment in progress on this biometric unit.

WINBIO_I_MORE_DATA

The last update succeeded, but the engine adapter requires one or more additional feature sets before it can complete the enrollment template.

 

Examples

The following pseudocode shows one possible implementation of this function. The example does not compile. You must adapt it to suit your purpose.


//////////////////////////////////////////////////////////////////////////////////////////
//
// EngineAdapterGetEnrollmentStatus
//
// Purpose:
//      Determines whether the enrollment object is ready to be committed to 
//      the pipeline.
//
// Parameters:
//      Pipeline        - Pointer to a WINBIO_PIPELINE structure associated 
//                        with the biometric unit performing the operation
//      RejectDetail    - Receives additional information about the failure, 
//                        if any, to update the enrollment object.
//
static HRESULT
WINAPI
EngineAdapterGetEnrollmentStatus(
    __inout PWINBIO_PIPELINE Pipeline,
    __out PWINBIO_REJECT_DETAIL RejectDetail
    )
{
    HRESULT hr = S_OK;

    // Verify that pointer arguments are not NULL.
    if (!ARGUMENT_PRESENT(Pipeline) ||
        !ARGUMENT_PRESENT(RejectDetail))
    {
        hr = E_POINTER;
        goto cleanup;
    }

    // Retrieve the context from the pipeline.
    PWINBIO_ENGINE_CONTEXT context = 
           (PWINBIO_ENGINE_CONTEXT)Pipeline->EngineContext;

    // Return if an enrollment is not in progress. This example assumes that 
    // an enrollment object is part of your engine context structure.
    if (context->Enrollment.InProgress != TRUE)
    {
        hr = WINBIO_E_INVALID_DEVICE_STATE;
        goto cleanup;
    }

    // Call a custom function (_AdapterCheckEnrollmentStatus) that checks the state
    // of the enrollment object. If the enrollment object has a sufficient number
    // of samples, this function should return S_OK. If there are not enough 
    // samples, the function should return WINBIO_I_MORE_DATA. If the most recent 
    // call to EngineAdapterUpdateEnrollment resulted in a WINBIO_E_BAD_CAPTURE error, 
    // the function should return WINBIO_E_BAD_CAPTURE and specify extended error 
    // information in the RejectDetail parameter.
    hr = _AdapterCheckEnrollmentStatus(
            context,
            &context->Enrollment,
            RejectDetail
            );

cleanup:

    return hr;
}


Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Winbio_adapter.h (include Winbio_adapter.h)

See also

Plug-in Functions
EngineAdapterUpdateEnrollment

 

 

Show: