Recently I have been working with the Windows Biometric Framework (WBF) for some fingerprint scanner applications. One of the methods in the API is WinBioEnrollCommit.
I have been using the async calls of the API exclusively, and naturally I was calling the function WinBioEnrollCommit within the callback that was passed to WinBioEnrollCaptureWithCallback. This is slightly different from the only sample code that is provided with the MSDN documentation but I didn’t think twice about it as there is nothing mentioned about the requirements or threading characteristics of the framework and the callbacks.
So this lead to some very surprising application hangs or blocking in this call. It just would never return. However this could be related to the manufacturer implementation of the drivers.
Either way the solution was to move the WinBioEnrollCommit out of the callback function and into the same function that made the original call to WinBioEnrollCaptureWithCallback, while also making use of WinBioWait.
- On a another topic I have also found that none of the WBF API’s work correctly when run in an active x control when it is contained in the newer version of IE, 8 and above. There are some incompatibilities with the process architecture that s preventing any of the WBF calls from working correctly in that environment.
- Oh and WBF doesn’t really work over RDP.. strange