Unable to capture image data using Windows Biometric Framework


I am developing a Biometric module using WBF. I am using the code given at Winbio CaptureSampleImage to get image data which is converted to a .bmp file and saved. I created a DLL file containing all the code related to my work with WBF. I am using this DLL in a Java Spring Boot Application using JNI. The jar created by this is run via a .vbs file as given below.

Set shellObj = CreateObject("Shell.Application")
shellObj.ShellExecute "C:\Program Files\Java\jre1.8.0_192\bin\java.exe", "-jar MyApp.jar", "", "runas", 0

"runas" is used to run jar as Administrator rights. "0" is used to set it invisible.

I have previously used the DLL in a Jar running as a service using WINSW. For this I included WinBio AcquireFocus after creating a session as mentioned in WinBio AcquireFocus and Winbio CaptureSampleImage and it works perfectly fine.

Now I have two scenerios.

1) I use the code provided in Winbio CaptureSampleImage. This approach gets stuck when following is called.

hr = WinBioCaptureSample(

that is no output is returned.

2) I use WinBio AcquireFocus like I did with my service.

This prompts error:

Code : 0x80070005 (Access Denied).

Common HRESULT values are given HERE. This is probably because AcquireFocus can not be used in Application such as mine.

asked on Stack Overflow Dec 18, 2019 by Awais Waheed • edited Dec 18, 2019 by Awais Waheed

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0