WinBiometricDotNet icon indicating copy to clipboard operation
WinBiometricDotNet copied to clipboard

Capture a sample with data flag other than RAW

Open BigBadaboom opened this issue 4 years ago • 7 comments

Thanks for the library.

It appears that, if I want to capture a sample with CaptureSample or CaptureSampleWithCallback, I am stuck with purpose NO_PURPOSE and data flag RAW. Is that the case, or is there a way to do it that I am not spotting?

BigBadaboom avatar Mar 22 '21 15:03 BigBadaboom

@BigBadaboom Your issue may be https://social.msdn.microsoft.com/Forums/en-US/e217132f-0cb8-4043-910d-06072d87aae1/windows-biometric-framework-capturesamplewithcallback-failing-with-enotimpl-on-windows-10?forum=wdk

takuya-takeuchi avatar Mar 23 '21 02:03 takuya-takeuchi

@takuya-takeuchi Thanks for the reply. But no. My problem is completely different. Basically the opposite.

Your wrapper around CaptureSample() and CaptureSampleWithCallback() hardwire the values of the purpose and flags parameters.

                var hr = SafeNativeMethods.WinBioCaptureSample(session.Handle,
                                                               SafeNativeMethods.WINBIO_NO_PURPOSE_AVAILABLE,
                                                               SafeNativeMethods.WINBIO_DATA_FLAG_RAW,
                                                               out var unitId,
                                                               out var sample,
                                                               out var sampleSize,
                                                               out var rejectDetail);

I want to be able to pass different values for purpose and flags.

BigBadaboom avatar Mar 23 '21 06:03 BigBadaboom

I understand what you hope.

You want to pass the following valaues, right? https://docs.microsoft.com/en-us/windows/win32/api/winbio/nf-winbio-winbiocapturesamplewithcallback

So I can add new argment to CaptureSample and CaptureSampleWithCallback

takuya-takeuchi avatar Mar 23 '21 12:03 takuya-takeuchi

@BigBadaboom Is it satisfied your requirements? https://github.com/takuya-takeuchi/WinBiometricDotNet/pull/22

If no problem, I will release as 0.9.1

Thanks.

takuya-takeuchi avatar Mar 23 '21 13:03 takuya-takeuchi

P.S. I hope you build and test it before I release.

takuya-takeuchi avatar Mar 23 '21 13:03 takuya-takeuchi

Yes. That's exactly what I need. Thanks for the quick response!

If you merge that change, I am happy to try testing it.

Thanks.

BigBadaboom avatar Mar 23 '21 14:03 BigBadaboom

@BigBadaboom 0.9.1 has released

takuya-takeuchi avatar Mar 26 '21 14:03 takuya-takeuchi