PIBIO_ENGINE_DISCARD_ENROLLMENT_FN回呼函式 (winbio_adapter.h)

由 Windows 生物特徵辨識架構呼叫,以從管線中刪除中繼註冊狀態資訊。

語法

PIBIO_ENGINE_DISCARD_ENROLLMENT_FN PibioEngineDiscardEnrollmentFn;

HRESULT PibioEngineDiscardEnrollmentFn(
  [in, out] PWINBIO_PIPELINE Pipeline
)
{...}

參數

[in, out] Pipeline

與執行作業之生物特徵辨識單位相關聯的 WINBIO_PIPELINE 結構的指標。

傳回值

如果函式成功,則會傳回S_OK。 如果函式失敗,它必須傳回下列 HRESULT 值來指出錯誤。

傳回碼 描述
E_POINTER
Pipeline參數不可為Null

備註

此函式的實作不應該將資訊儲存在生物特徵辨識單位資料庫中。

範例

下列虛擬程式碼顯示此函式的一個可能實作。 此範例不會編譯。 您必須調整它以符合您的用途。

//////////////////////////////////////////////////////////////////////////////////////////
//
// EngineAdapterDiscardEnrollment
//
// Purpose:
//      Deletes intermediate enrollment state information from the pipeline.
//
// Parameters:
//      Pipeline  - Pointer to a WINBIO_PIPELINE structure associated 
//                  with the biometric unit performing the operation
// 
static HRESULT
WINAPI
EngineAdapterDiscardEnrollment(
    __inout PWINBIO_PIPELINE Pipeline
    )
{
    HRESULT hr = S_OK;

    // Verify that the Pipeline parameter is not NULL.
    if (!ARGUMENT_PRESENT(Pipeline))
    {
        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 (_AdapterDestroyEnrollmentTemplate) to release
    // any objects attached to the enrollment object.
    _AdapterDestroyEnrollmentTemplate(
        context,
        &context->Enrollment
        );

    // If the _AdapterDestroyEnrollmentTemplate function does not reset the
    // InProgress data member, reset it here.
    context->Enrollment.InProgress = FALSE;

cleanup:

    return hr;
}

規格需求

   
最低支援的用戶端 Windows 7 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2008 R2 [僅限桌面應用程式]
目標平台 Windows
標頭 winbio_adapter.h (包含 Winbio_adapter.h)

另請參閱

外掛程式函式