Partager via


PIBIO_ENGINE_QUERY_PREFERRED_FORMAT_FN fonction de rappel (winbio_adapter.h)

Appelé par l’adaptateur de capteur sur l’unité biométrique pour déterminer le format de données d’entrée préféré par l’adaptateur moteur.

Syntaxe

PIBIO_ENGINE_QUERY_PREFERRED_FORMAT_FN PibioEngineQueryPreferredFormatFn;

HRESULT PibioEngineQueryPreferredFormatFn(
  [in, out] PWINBIO_PIPELINE Pipeline,
  [out]     PWINBIO_REGISTERED_FORMAT StandardFormat,
  [out]     PWINBIO_UUID VendorFormat
)
{...}

Paramètres

[in, out] Pipeline

Pointeur vers une structure WINBIO_PIPELINE associée à l’unité biométrique qui effectue l’opération.

[out] StandardFormat

Pointeur vers une structure de WINBIO_REGISTERED_FORMAT qui spécifie le format des données dans le membre StandardDataBlock de l’objet WINBIO_BIR . Le format est une paire nom/valeur inscrit en IBIA.

[out] VendorFormat

Pointeur vers un GUID qui reçoit le format défini par le fournisseur des données dans le membre VendorDataBlock de l’objet WINBIO_BIR .

Valeur retournée

Si la fonction réussit, elle retourne S_OK. Si la fonction échoue, elle doit retourner l’une des valeurs HRESULT suivantes pour indiquer l’erreur.

Code de retour Description
E_POINTER
Un paramètre de pointeur obligatoire est NULL.

Remarques

L’adaptateur de capteur appelle cette fonction pour déterminer le format de capture biométrique.

Exemples

Le pseudocode suivant montre une implémentation possible de cette fonction. L’exemple ne se compile pas. Vous devez l’adapter à votre objectif.

//////////////////////////////////////////////////////////////////////////////////////////
//
// EngineAdapterQueryPreferredFormat
//
// Purpose:
//      Called by the sensor adapter on the biometric unit to determine the 
//      input data format preferred by the engine adapter.
//
// Parameters:
//      Pipeline        - Pointer to a WINBIO_PIPELINE structure associated 
//                        with the biometric unit performing the operation.
//      StandardFormat  - Pointer to a WINBIO_REGISTERED_FORMAT structure 
//                        that specifies the format of the data in the 
//                        StandardDataBlock member of the WINBIO_BIR object. 
//                        The format is an IBIA-registered name/value pair.
//      VendorFormat    - Pointer to a GUID that receives the vendor-defined 
//                        format of the data in the VendorDataBlock member of 
//                        the WINBIO_BIR object.
//
static HRESULT
WINAPI
EngineAdapterQueryPreferredFormat(
    __inout PWINBIO_PIPELINE Pipeline,
    __out PWINBIO_REGISTERED_FORMAT StandardFormat,
    __out PWINBIO_UUID VendorFormat
    )
{
   HRESULT hr = S_OK;

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

   // Specify the preferred data formats.
   StandardFormat->Owner = WINBIO_ANSI_381_FORMAT_OWNER;
   StandardFormat->Type = WINBIO_ANSI_381_FORMAT_TYPE;
   *VendorFormat = VENDOR_UUID_VALUE;

cleanup:

    return hr;
}

Configuration requise

   
Client minimal pris en charge Windows 7 [applications de bureau uniquement]
Serveur minimal pris en charge Windows Server 2008 R2 [applications de bureau uniquement]
Plateforme cible Windows
En-tête winbio_adapter.h (include Winbio_adapter.h)

Voir aussi

Fonctions de plug-in