Export (0) Print
Expand All

EngineAdapterUpdateEnrollment function

Called by the Windows Biometric Framework to add the current feature set to the enrollment object.

Syntax


HRESULT WINAPI EngineAdapterUpdateEnrollment(
  _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]

Pointer to a WINBIO_REJECT_DETAIL value that receives additional information about the failure to update the enrollment object. If the update succeeds, this value should be set 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.


//////////////////////////////////////////////////////////////////////////////////////////
//
// EngineAdapterUpdateEnrollment
//
// Purpose:
//      Adds the current feature set to the enrollment object.
//
// 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
EngineAdapterUpdateEnrollment(
    __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 ||
        context->FeatureSet == NULL)
    {
        hr = WINBIO_E_INVALID_DEVICE_STATE;
        goto cleanup;
    }

    // Call a custom function (_AdapterMergeFeatureSetWithEnrollment) to merge
    // the current feature set in the pipeline with the contents of the
    // enrollment object.
    // If the custom function cannot process the feature set, return 
    // WINBIO_E_BAD_CAPTURE and specify extended error information in the 
    // RejectDetail parameter.
    hr = _AdapterMergeFeatureSetWithEnrollment(
            context,
            context->FeatureSet,
            context->FeatureSetSize,
            &context->Enrollment,
            RejectDetail
            );
    if (SUCCEEDED(hr))
    {
        ++context->Enrollment.SampleCount;

        // Determine whether the enrollment object is ready to be committed
        // to the pipeline.
        hr = EngineAdapterGetEnrollmentStatus(Pipeline);
    }

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
EngineAdapterGetEnrollmentStatus

 

 

Community Additions

ADD
Show:
© 2015 Microsoft