Windows Biometric Framework API 指纹识别
2016-09-08 11:46
1301 查看
一 相关链接
非常详细的demo code ,可以直接编译 Client Application Functions
错误代码的定义 Client Error Codes
函数说明
WinBioEnrollBegin function
二 环境
用的是win1064系统,VS2012编译环境
三 注意
1 WinBioOpenSession的第三个参数Flags [in] ,capture 和enroll的设定不同HRESULT CaptureSample()
{
HRESULT hr = S_OK;
WINBIO_SESSION_HANDLE sessionHandle = NULL;
WINBIO_UNIT_ID unitId = 0;
WINBIO_REJECT_DETAIL rejectDetail = 0;
PWINBIO_BIR sample = NULL;
SIZE_T sampleSize = 0;
// Connect to the system pool.
hr = WinBioOpenSession(
WINBIO_TYPE_FINGERPRINT, // Service provider
WINBIO_POOL_SYSTEM, // Pool type
WINBIO_FLAG_RAW, // Access: Capture raw data
NULL, // Array of biometric unit IDs
0, // Count of biometric unit IDs
WINBIO_DB_DEFAULT, // Default database
&sessionHandle // [out] Session handle
);
WINBIO_DATA_FLAG_RAW (Return the sample exactly as it was captured by the sensor.)
我用capturesample前几次可以用的,但多试几次就挂了,WinBioOpenSession拒绝访问
2 LocateSensor( )
这个函数有个bug,硬体问题不会报错。
hr = WinBioLocateSensor( sessionHandle, &unitId);
//hr=0x0
//我们的芯片VDD pin断了,这个函数会马上返回来,不会等待按手指。但是返回值还是0x0。
3 HRESULT EnrollSysPool( BOOL discardEnrollment, WINBIO_BIOMETRIC_SUBTYPE subFactor)
同步登记功能 ,subFactor用来指定指纹保存的位置,就是identify时显示的手指,宽字符指针
hr = WinBioEnrollBegin(
sessionHandle, // Handle to open biometric session
subFactor, // Finger to create template for
unitId // Biometric unit ID
);
winbio_types.h 中定义的:
#define WINBIO_ANSI_381_POS_RH_INDEX_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)2)
注意:
1)不能多次保存同一个subFactor ,会报错 “ WINBIO_E_DUPLICATE_ENROLLMENT
0x8009801C ” 。
“The specified identity and sub-factor are already enrolled in the database.”
2)同一个手指不能保存两次,即使是不同的subFactor也不行,会报错 “ WINBIO_E_DUPLICATE_TEMPLATE 0x8009802B ”
“The data in a biometric template matches that of another template already in the database.”
登记后不知道怎么清除指纹信息,我是用系统自带的账号设置(设置-》账户-》指纹登录)来清除的,
非常详细的demo code ,可以直接编译 Client Application Functions
错误代码的定义 Client Error Codes
函数说明
WinBioEnrollBegin function
二 环境
用的是win1064系统,VS2012编译环境
三 注意
1 WinBioOpenSession的第三个参数Flags [in] ,capture 和enroll的设定不同HRESULT CaptureSample()
{
HRESULT hr = S_OK;
WINBIO_SESSION_HANDLE sessionHandle = NULL;
WINBIO_UNIT_ID unitId = 0;
WINBIO_REJECT_DETAIL rejectDetail = 0;
PWINBIO_BIR sample = NULL;
SIZE_T sampleSize = 0;
// Connect to the system pool.
hr = WinBioOpenSession(
WINBIO_TYPE_FINGERPRINT, // Service provider
WINBIO_POOL_SYSTEM, // Pool type
WINBIO_FLAG_RAW, // Access: Capture raw data
NULL, // Array of biometric unit IDs
0, // Count of biometric unit IDs
WINBIO_DB_DEFAULT, // Default database
&sessionHandle // [out] Session handle
);
WINBIO_DATA_FLAG_RAW (Return the sample exactly as it was captured by the sensor.)
我用capturesample前几次可以用的,但多试几次就挂了,WinBioOpenSession拒绝访问
2 LocateSensor( )
这个函数有个bug,硬体问题不会报错。
hr = WinBioLocateSensor( sessionHandle, &unitId);
//hr=0x0
//我们的芯片VDD pin断了,这个函数会马上返回来,不会等待按手指。但是返回值还是0x0。
3 HRESULT EnrollSysPool( BOOL discardEnrollment, WINBIO_BIOMETRIC_SUBTYPE subFactor)
同步登记功能 ,subFactor用来指定指纹保存的位置,就是identify时显示的手指,宽字符指针
hr = WinBioEnrollBegin(
sessionHandle, // Handle to open biometric session
subFactor, // Finger to create template for
unitId // Biometric unit ID
);
winbio_types.h 中定义的:
#define WINBIO_ANSI_381_POS_RH_INDEX_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)2)
注意:
1)不能多次保存同一个subFactor ,会报错 “ WINBIO_E_DUPLICATE_ENROLLMENT
0x8009801C ” 。
“The specified identity and sub-factor are already enrolled in the database.”
2)同一个手指不能保存两次,即使是不同的subFactor也不行,会报错 “ WINBIO_E_DUPLICATE_TEMPLATE 0x8009802B ”
“The data in a biometric template matches that of another template already in the database.”
登记后不知道怎么清除指纹信息,我是用系统自带的账号设置(设置-》账户-》指纹登录)来清除的,
相关文章推荐
- Windows Biometric Framework API 指纹识别
- [Windows 7 安全新功能] Windows 7 的指纹识别:简约而不简单
- Windows 手势识别API .
- Windows 7 RC API Code Pack for .NET Framework 最新版代码下载
- 安卓学习笔记(20)-指纹识别API的简单运用与问题总结
- Android 6.0指纹识别相关API
- Windows 手势识别API
- 分享一个指纹识别和虹膜识别API技术接口的平台
- (原)Windows下编译指纹识别的Rel_4.1.0库
- Android指纹识别API讲解,一种更快更好的用户体验
- 分分钟开启Windows 7内置指纹识别功能
- 分享一个指纹识别和虹膜识别API技术接口的平台
- Android开发学习之路-指纹识别api
- RFT API初涉——之解决RFT无法识别windows对话框的问题
- 指纹识别分析之framework初始化流程
- Windows 7 RC API Code Pack for .NET Framework 最新版代码下载
- 因在Windows 8.1中微软没有对版本API进行更新 导致桌面软件识别版本号为6.2.9200
- 分分钟开启Windows 7内置指纹识别功能
- Android指纹识别API初试