none
Unable to capture image data using Windows Biometric Framework RRS feed

  • Question

  • 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(
                sessionHandle,
                WINBIO_NO_PURPOSE_AVAILABLE,
                WINBIO_DATA_FLAG_RAW,
                &unitId,
                &sample,
                &sampleSize,
                &rejectDetail
                );

    that is no output is returned.

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

    This prompts error:

    Code : 0x80070005 (Access Denied).

     This is probably because AcquireFocus can not be used in Application such as mine.

    Thursday, December 19, 2019 9:01 AM

Answers