Re: USB device detection via query registry information



Pavel A. wrote:
Ben Voigt [C++ MVP] wrote:
.......
It's USB/serial converter, from FTDI (doesn't use communication
device class). Their driver is WHQL. I wouldn't doubt that their
driver is causing the problem since one version ago simply opening a
device on a multicore system was BSOD within 10 seconds. Which
doesn't totally absolve MS of responsibility. What's the good of
WHQL if even buggy drivers can be approved?

WHQL definitely does test on multicore machines.
Unlikely that a not SMP capable driver could pass.

Hmmm. Well, for some reason this driver did pass. Maybe some hardware
configurations avoid the buggy code (the same driver package supports
several different FTDI USB converter chips, and the virtual com port driver
can be loaded or not depending on settings in the EEPROM).


> I should be able to load the problem configuration in a kernel
debugger and
have debug output from my userland application showing the result of
the device interface open.

Maybe adding debug prints around calls to the driver in the app can
help. You can call DebugPrintEx from usermode so messages will appear
in windbg or crash dump. Below is what I use.

I appreciate the code snippet, however it isn't much good to trace my
CreateFile call unless I can also enable tracing on the serenum and sermouse
drivers, so I can log a total ordering of the different port open and close
events (assuming that these are included in the driver trace output at all).


Regards,
--PA

~~~~~~~~~~~~~ cut here ~~~~~~~~~~~~
#define _WIN32_WINNT 0x0501 // minimal platform: WinXP
#include <windows.h>

// Borrowed from DDK dpfilter.h
#define DPFLTR_ERROR_LEVEL 0
#define DPFLTR_WARNING_LEVEL 1
#define DPFLTR_TRACE_LEVEL 2
#define DPFLTR_INFO_LEVEL 3
#define DPFLTR_MASK 0x8000000

#define DPFLTR_IHVDRIVER_ID 77
#define DPFLTR_SYSTEM_ID 0
#define DPFLTR_VERIFIER_ID 93

extern ULONG ( __stdcall *f_vDbgPrintEx)( ULONG ComponentId, ULONG
Level, PCCH Format, va_list arglist);

void KernelDbgPrint( PCCH Fmt, ... )
{
ULONG n;
va_list arglist;

if( !vDbgPrintEx) ) {
FARPROC f;
HMODULE hm = _GLOBL_ GetModuleHandle(TEXT("ntdll.dll"));
f = _GLOBL_ GetProcAddress( hm, "vDbgPrintEx" );
if( !f ) return;
memcpy( &f_vDbgPrintEx, &f, sizeof(f) );
}

va_start( arglist, Fmt );
n = f_vDbgPrintEx( DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, Fmt,
arglist ); va_end( arglist );
}

~~~~~~~~~~ cut here ~~~~~~~~


.



Relevant Pages

  • Re: Driver Signing
    ... > driver of this chip and I include the driver installation procedure in our ... > I know this message is coming out because the driver didn't pass the WHQL ... [Rade Trimceski, MSFT] ... > windows XP logo". ...
    (microsoft.public.development.device.drivers)
  • Re: Driver Update
    ... Windows Hardware Quality Labs (WHQL) supports the Microsoft® Windows® ... kits, test information, and data for hardware testing driver signing. ... What is a "WHQL lab"? ...
    (microsoft.public.windowsupdate)
  • Re: How to disable file copy dialog while installation drivers? (more details)
    ... You can ask this question at WHQL support, they usually are very active and answer these questions accuratly. ... I just have one question if you can confirm that WHQL driver signing will really help us to suppress the dialog? ... whql does not garantee the drivers are bugs free. ...
    (microsoft.public.development.device.drivers)
  • Re: Driver installation warning, driver signing and WHQL
    ... The driver is already WHQL cedrtified. ... automatically during the software installation procedure. ... Windows complains about the driver and says it is not signed/certified ...
    (microsoft.public.development.device.drivers)
  • Re: Silent Driver Installation on windows XP
    ... I thought WHQL was for Windows Logo + signing. ... testing critical for installing drivers silently without admin privileges? ... must have a WHQL certificate, and that means you have to go through WHQL ... there is another twist: the driver binary must be ...
    (microsoft.public.development.device.drivers)