this doesn't make much sense. instead you can iterate over the device tree,
find all the devices which have a problem code (no drivers installed), check
to see if the enumerator is "USB" and then do something about it. You can
get the descriptors from user mode, see usbview for details...
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"LEMAIRE Mathieu" <(E-Mail Removed)> wrote in message
news:enl0gm$7f9$(E-Mail Removed)...
>> the installation of the driver itself is not usually interesting, what is
>> interesting is the pnp devices it controls. anyways, you can use the
>> service control manager (SCM) to query for the service by name and get
>> its state if present. this will not tell you if it is loaded and running
>> though.
>
> I want to detect whther a USB driver is installed or not. Does every USB
> driver register services ?
>
>> what are you going to do once you have detected the driver? open one of
>> its devices?
>
> OK, what I want to do is :
> given descriptors of device (pid, vid....), check the installation status
> of the driver (or compatible ones) and install the driver if none is
> installed.
>
> How is that possible with the windows api ?
>
> Thank you,
>
> LEMAIRE Mathieu
|