PIBIO_ENGINE_QUERY_INDEX_VECTOR_SIZE_FN回调函数 (winbio_adapter.h)
由 Windows 生物识别框架调用以检索引擎适配器使用的索引向量的大小。
语法
PIBIO_ENGINE_QUERY_INDEX_VECTOR_SIZE_FN PibioEngineQueryIndexVectorSizeFn;
HRESULT PibioEngineQueryIndexVectorSizeFn(
[in, out] PWINBIO_PIPELINE Pipeline,
[out] PSIZE_T IndexElementCount
)
{...}
参数
[in, out] Pipeline
指向与执行操作的生物识别单元关联的 WINBIO_PIPELINE 结构的指针。
[out] IndexElementCount
接收索引向量中数组元素数的变量的地址。
返回值
如果函数成功,则返回S_OK。 如果函数失败,它必须返回以下 HRESULT 值之一来指示错误。
返回代码 | 说明 |
---|---|
|
强制指针参数为 NULL。 |
注解
引擎适配器使用索引向量为可用的生物识别模板编制索引。
示例
以下伪代码演示了此函数的一种可能实现。 该示例不编译。 必须根据自己的目的调整它。
///////////////////////////////////////////////////////////////////////////////
//
// 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;
}
要求
最低受支持的客户端 | Windows 7 [仅限桌面应用] |
最低受支持的服务器 | Windows Server 2008 R2 [仅限桌面应用] |
目标平台 | Windows |
标头 | winbio_adapter.h (包括 Winbio_adapter.h) |
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈