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.

    Wednesday, December 18, 2019 1:42 PM

All replies

  • Hi Awais Waheed,

    Thank you for posting here.

    According to your description, your issue is more related to WBF and Biometric, so I suggest you ask your question in related forums.

    You can also post your question in Where is the Forum For…? which can help you find the correct forum.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions.

    Thank you for your understanding.

    Best Regards

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 19, 2019 7:01 AM