Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.devices
Thread: Get device driver files

HTVi
TV Discussion Newsgroups

Get device driver files
Q33NY 10/29/2008 3:07:02 PM
Hi guys i am trying to build a tool similar to device manager. Till now i am
able to enumerate all the devices in the system(the properties i need for
each device) using setupapi functions. what i can't accomplish is get list
the installed driver files for each device like when pressing "driver
details" button in device manager. The close i could get is an inf file, and
a section name in that inf file related to the driver.

I tried the other way around: get the list of installed drivers using the 3
psapi functions(but GetDeviceDriverFileNameW returns the file name in
different ways:"\windows\system32\drivers....", "system32\drivers....",
"\SystemRoot\system32\drivers...", "\??\c:\windows\system32\drivers\..." and
so on. for some files it just returns the file name with no leading path.

The latter approach needs a lot of extra file name processing in order to
get the physical path for the driver file, and it is useless since even if i
had the complete list of driver files in form of:"c:\windows....." i don't
know how to link them to the devices list, so this approach seems useless.

The only way that i see now is parse the inf files and build the driver
files list(based on "CopyFiles, Include, Needs...." directives), but this
also seems a difficult job(although setupapi offers an superior layer for
processing inf files, i think it is based on GetPrivateProfileString API
series) and i was wondering isn't there some APIs which could retrieve the
list of needed files based on the inf file and the section name?

PS: When playing with device manager i was monitoring file system and
registry, and seems that devmgr.dll which is used by mmc when displaying
devices, is reading from the registry the inf file name for the device, the
section name and is accessing the inf file.


Regards,
Cristi Fati.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen