microsoft / Windows-driver-samples

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
Microsoft Public License
6.75k stars 4.89k forks source link

Biometrics driver code error. #346

Open JinZhuXing opened 5 years ago

JinZhuXing commented 5 years ago

I think biometrics driver project have some code errors. Please see my change and fix it. Thanks. image

jnmronquillo commented 5 years ago

Many Thanks @JinZhuXing I got my Device started correctly (without the yellow exclamation mark) after some debugging at startup before the process stop.

I'd like to add a small contribution:

Before the end of the method: CBiometricDevice::CreateUsbIoTargets add a condition: The variable m_pIUsbInterruptPipe must me not null because is used later in the code.

image

Also the next code is harcoded for usb devices that have only one interface (My device has two):

hr = pIUsbTargetDevice->RetrieveUsbInterface(0, &pIUsbInterface);

Here is a snnipet where I implemented a for loop to iterate through the number of interfaces and initialize all three variables, bingo!