问题描述
到目前为止,我已经实现了这样的测试功能
hr = WinBioEnumBiometricUnits(
WINBIO_TYPE_FACIAL_FEATURES,// Type of biometric unit
&unitSchema,// Array of unit schemas
&unitCount); // Count of unit schemas
if (Failed(hr))
{
wprintf_s(L"\n WinBioEnumBiometricUnits Failed. hr = 0x%x\n",hr);
goto e_Exit;
}
hr = WinBioOpenSession(
WINBIO_TYPE_FACIAL_FEATURES,// Service provider
WINBIO_POOL_SYstem,// Pool type
WINBIO_FLAG_DEFAULT,// Configuration and access
NULL,// Array of biometric unit IDs
0,// Count of biometric unit IDs
WINBIO_DB_DEFAULT,// Database ID
&sessionHandle // [out] Session handle
);
if (Failed(hr))
{
wprintf_s(L"\n WinBioOpenSession Failed. hr = 0x%x\n",hr);
goto e_Exit;
}
retry:
// Locate the biometric sensor and retrieve a WINBIO_IDENTITY object.
wprintf_s(L"\n Calling WinBioIdentify - Swipe finger on sensor...\n");
hr = WinBioIdentify(
sessionHandle,// Session handle
&unitId,// Biometric unit ID
&identity,// User SID
&subFactor,// Finger sub factor
&rejectDetail // Rejection information
);
我在 windows10 笔记本电脑上测试它,它有一个摄像头,我可以通过 windows hello 通过面部特征登录操作系统,WinBioEnumBiometricUnits
成功,计数为 1,WinBioOpenSession
也成功,但是WinBioIdentify
失败,错误码为WINBIO_E_INVALID_OPERATION-0x8009802C
,MSDN 说windows biometric framwork 暂时支持WINBIO_TYPE_FINGERPRINT
,doc 最后一次更新是2018 年,已经三年了,有没有小伙伴知道MS是否支持WINBIO_TYPE_FACIAL_FEATURES
类型,或者是否有其他用于面部特征验证的API,请告诉我,非常感谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)