> According to your replies, though, with limitations of the INF file (1 device class only), we were considering using another INF file (just for the icons). Do you think it’s the right approach?
No, it is absolutely not the right approach. First and foremost you will have servicing issues with two different packages updating the same file and keeping coherent state. Don’t go there.
The following INF chunk sets the resource for the class icon globally for the class.
[Interface_ClassReg32]
HKR,%Interface.ClassName%
HKR,EnumPropPages32,“ResIcons.dll,IconProvider”
HKR,Icon,“201”
On the other hand, DEVPKEY_DrvPkg_Icon is set per device /within/ the INF in each DDInstall section. This changes the device manager icon PER DEVICE where the INF can specify multiple icons for different device in the same *which is exactly what you want*. One INF, one
BTW the EnumPropPage32 directive is wrong in your Interface_ClassReg32, that needs to reference a code dll and a real code entry point, see http://msdn.microsoft.com/en-us/library/windows/hardware/ff570843(v=vs.85).aspx
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, July 08, 2014 10:52 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Multiple Device Icons for single INF file?
I don’t understand what you’re asking. Every INF has exactly one
setup class. It can be a class and GUID (and icon) of your own
creation, but all of the devices within that INF will share the same
class, and hence the same class icon.
If the device will appear in the “Devices” dialog, you have enormous
flexibility in specifying the large icon that appears in that dialog,
by using the new “device metadata” concept.
Hi Tim, what I mean is that we added a new ClassGUID (and Class) in the [version] section which of course creates a new device category in Device Manager (that has our icons). I was just asking if it was possible to add another device category, hence, with different icons. According to your reply, though, only one of those can appear in a single INF file, that’s why we were considering using another INF file for a new device (which uses the same driver) only for it to use a different icon.
No need to create your own setup class.
Doc on how to create custom icons
http://download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b
18336565f5b
/CustomIcon.doc
Abstract
This paper summarizes the steps device vendors take to customize
device icons in My Computer, Autoplay, Device Manager, and New
Hardware dialogs in the Microsoft? Windows? family of operating systems.
Specifying a per driver package icon
http://technet.microsoft.com/en-us/evalcenter/ff543520(v=vs.100).aspx
The DEVPKEY_DrvPkg_Icon device property represents a list of device
icons that Windows uses to visually represent a device instance.
Hi Doron, I think we already stumbled upon that document in the past. We used a different method in placing our icons (something like below).
[Interface_ClassReg32]
HKR,%Interface.ClassName%
HKR,EnumPropPages32,“ResIcons.dll,IconProvider”
HKR,Icon,“201”
We just basically access a resource icon inside a resource dll. We used “EnumPropPages32,” which was not in the document. I’m not sure if what we used is the preferred method of driver programmers, but we were only concerned on how the device icon appears in Device Manager.
I’m sorry if I wasn’t clear before but all we want if possible is:
1 INF File used
1 Device Driver (32-bit and 64-bit versions included)
4 (USB) Devices (each with a different icon appearing in Device Manager)
Note:
Devices and Printers isn’t a problem, though, since can create one metadata file per device, thus, showing them with different icons.
According to your replies, though, with limitations of the INF file (1 device class only), we were considering using another INF file (just for the icons). Do you think it’s the right approach?
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer