Share via


PIBIO_ENGINE_QUERY_INDEX_VECTOR_SIZE_FN función de devolución de llamada (winbio_adapter.h)

Llamado por Windows Biometric Framework para recuperar el tamaño del vector de índice utilizado por el adaptador del motor.

Sintaxis

PIBIO_ENGINE_QUERY_INDEX_VECTOR_SIZE_FN PibioEngineQueryIndexVectorSizeFn;

HRESULT PibioEngineQueryIndexVectorSizeFn(
  [in, out] PWINBIO_PIPELINE Pipeline,
  [out]     PSIZE_T IndexElementCount
)
{...}

Parámetros

[in, out] Pipeline

Puntero a una estructura de WINBIO_PIPELINE asociada a la unidad biométrica que realiza la operación.

[out] IndexElementCount

Dirección de una variable que recibe el número de elementos de matriz en el vector de índice.

Valor devuelto

Si la función se realiza correctamente, devuelve S_OK. Si se produce un error en la función, debe devolver uno de los siguientes valores HRESULT para indicar el error.

Código devuelto Descripción
E_POINTER
Un parámetro de puntero obligatorio es NULL.

Comentarios

El adaptador del motor usa el vector de índice para indexar las plantillas biométricas disponibles.

Ejemplos

El pseudocódigo siguiente muestra una posible implementación de esta función. El ejemplo no se compila. Debes adaptarlo para adaptarlo a tu propósito.

///////////////////////////////////////////////////////////////////////////////
//
// EngineAdapterQueryIndexVectorSize
//
// Purpose:
//      Called by the Windows Biometric Framework to retrieve the size of 
//      the index vector used by the engine adapter.
//
// Parameters:
//      Pipeline            - Pointer to a WINBIO_PIPELINE structure associated 
//                            with the biometric unit performing the operation.
//      IndexElementCount   - Address of a variable that receives the number of 
//                            elements in the index vector.
//
static HRESULT
WINAPI
EngineAdapterQueryIndexVectorSize(
    __inout PWINBIO_PIPELINE Pipeline,
    __out PSIZE_T IndexElementCount
    )
{
    HRESULT hr = S_OK;

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

    // Specify the number of index vector elements supported by your adapter. This can
    // be any positive value or zero. Return zero if your adapter does not support placing 
    // templates into buckets. That is, return zero if your adapter does not support index 
    // vectors.
    *IndexElementCount = NUMBER_OF_TEMPLATE_BINS;

cleanup:

    return hr;
}

Requisitos

   
Cliente mínimo compatible Windows 7 [solo aplicaciones de escritorio]
Servidor mínimo compatible Windows Server 2008 R2 [solo aplicaciones de escritorio]
Plataforma de destino Windows
Encabezado winbio_adapter.h (incluya Winbio_adapter.h)

Consulte también

Funciones de complemento