我一直在尝试制作FireBreath插件,用扫描仪捕获指纹。此代码仅作为控制台应用程序运行(减去增强线程)。
bool GopripFPrintAPI::winCaptureFPrint(const FB::JSObjectPtr& callback)
{
boost::thread t(boost::bind(&GopripFPrintAPI::WBFCapture_thread, this, callback));
return true;
}
int GopripFPrintAPI::WBFCapture_thread(const FB::JSObjectPtr& callback)
{
unsigned long resultHandle = 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.
resultHandle = 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
);
// Capture a biometric sample.
wprintf_s(L"\n Calling WinBioCaptureSample - Swipe sensor...\n");
resultHandle = WinBioCaptureSample(
sessionHandle,
WINBIO_NO_PURPOSE_AVAILABLE,
WINBIO_DATA_FLAG_RAW,
&unitId,
&sample,
&sampleSize,
&rejectDetail
);
...
}
正确调用winCaptureFPrint()启动WBFCapture_thread()并停止等待WinBioCaptureSample()但是使用指纹扫描程序没有任何方法winBioCaptureSample()似乎没有从扫描程序获取信号。我一直认为这可能是一个焦点问题所以我试过了
resultHandle = WinBioAcquireFocus()
但总是失败。它给出了一般访问被拒绝错误E_ACCESSDENIED。 我不知道Firelight在焦点方面有什么东西,或者我做错了什么?
答案 0 :(得分:0)
安装生物识别设备Authentec,以便传感器能够收听您的代码
答案 1 :(得分:0)
以管理员身份运行Visual Studio,它应该可以运行。