Icons with Class definitions.

Hi,

I am building a new device class for my device drivers. Is there a way to
have a new icon associated with the device class?

Note: Currently you can use one of the predefined classes, i.e. set the
“Icon” registry setting to “-18” and you get the question mark (?)
associated with unknown devices.

Joe McCloskey
Gamry Instruments, inc
xxxxx@gamry.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

For a new setup device class, include a ClassInstall32 section in the
inf file. This section will usually have one or more AddReg directives
to add value entries under the provided SetupClassGUID subkey in the
registry. Under the section referenced by this directive, include
HKR,Icon,“icon-number”. Non-negative numbers indicate that the icon is
supplied by the given property-page provider or by the new class
installer. So you have to provide one of these that will describe the
new icon. Please see the toaster ClassInst sample under Win2K
DDK\src\general\toaster\classinstaller.

Khalid

-----Original Message-----
From: xxxxx@gamry.com [mailto:xxxxx@gamry.com]
Sent: Wednesday, June 27, 2001 6:46 AM
To: NT Developers Interest List
Subject: [ntdev] Icons with Class definitions.

Hi,

I am building a new device class for my device drivers. Is there a way
to
have a new icon associated with the device class?

Note: Currently you can use one of the predefined classes, i.e. set the

“Icon” registry setting to “-18” and you get the question mark (?)
associated with unknown devices.

Joe McCloskey
Gamry Instruments, inc
xxxxx@gamry.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks,

Joe.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Khalid Sabri
Sent: Wednesday, June 27, 2001 11:21 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Icons with Class definitions.

For a new setup device class, include a ClassInstall32 section in the
inf file. This section will usually have one or more AddReg directives
to add value entries under the provided SetupClassGUID subkey in the
registry. Under the section referenced by this directive, include
HKR,Icon,“icon-number”. Non-negative numbers indicate that the icon is
supplied by the given property-page provider or by the new class
installer. So you have to provide one of these that will describe the
new icon. Please see the toaster ClassInst sample under Win2K
DDK\src\general\toaster\classinstaller.

Khalid

-----Original Message-----
From: xxxxx@gamry.com [mailto:xxxxx@gamry.com]
Sent: Wednesday, June 27, 2001 6:46 AM
To: NT Developers Interest List
Subject: [ntdev] Icons with Class definitions.

Hi,

I am building a new device class for my device drivers. Is there a way
to
have a new icon associated with the device class?

Note: Currently you can use one of the predefined classes, i.e. set the

“Icon” registry setting to “-18” and you get the question mark (?)
associated with unknown devices.

Joe McCloskey
Gamry Instruments, inc
xxxxx@gamry.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@gamry.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Joe,

The following is needed:

  1. In the [Version] section change the Class to your own name,
    and the ClassGuid to a new GUID for your class.

  2. Add the following sections, where XXX is replaced with your
    class name, , and III is replaced with the resource number for
    your icon

[ClassInstall32]
Addreg=XXXHwClass
CopyFiles=XXX_class_copyfiles

[XXXHwClass]
HKR,“XXX”
HKR,Icon,“III”
HKR,Installer32,“XXXclass.dll,ClassInstall”

[XXX_class_copyfiles]
XXXclass.dll,0x00000020

Note for your class installer all you need is:

DWORD WINAPI ClassInstall(IN DI_FUNCTION InstallFunction,
IN HDEVINFO DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData)
/*++
Routine Description:

Entry-point a class installer. This routine is only here
so that we can use this dll to get the icon for the device
class.

Arguments:

InstallFunction - identifies the installation request to perform
DeviceInfoSet - handle to the device information set
DeviceInfoData - pointer to an SP_DEVINFO_DATA structure
that contains information about the device to install.

Return Value:

DWORD: Always returns ERROR_DI_DO_DEFAULT to indicate using the
default installer.
–*/
{
return ERROR_DI_DO_DEFAULT;
}

Don Burn
Windows 2000 Device Driver and Filesystem consulting

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, June 27, 2001 1:45 PM
Subject: [ntdev] Icons with Class definitions.

>
> Hi,
>
>
> I am building a new device class for my device drivers. Is there a way
to
> have a new icon associated with the device class?
>
>
> Note: Currently you can use one of the predefined classes, i.e. set the
> “Icon” registry setting to “-18” and you get the question mark (?)
> associated with unknown devices.
>
>
> Joe McCloskey
> Gamry Instruments, inc
> xxxxx@gamry.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@acm.org
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

By the way, the ClassInst sample is in XP DDK only. Sorry :slight_smile:

Khalid

-----Original Message-----
From: Khalid Sabri [mailto:xxxxx@microsoft.com]
Sent: Wednesday, June 27, 2001 11:21 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Icons with Class definitions.

For a new setup device class, include a ClassInstall32 section in the
inf file. This section will usually have one or more AddReg directives
to add value entries under the provided SetupClassGUID subkey in the
registry. Under the section referenced by this directive, include
HKR,Icon,“icon-number”. Non-negative numbers indicate that the icon is
supplied by the given property-page provider or by the new class
installer. So you have to provide one of these that will describe the
new icon. Please see the toaster ClassInst sample under Win2K
DDK\src\general\toaster\classinstaller.

Khalid

-----Original Message-----
From: xxxxx@gamry.com [mailto:xxxxx@gamry.com]
Sent: Wednesday, June 27, 2001 6:46 AM
To: NT Developers Interest List
Subject: [ntdev] Icons with Class definitions.

Hi,

I am building a new device class for my device drivers. Is there a way
to
have a new icon associated with the device class?

Note: Currently you can use one of the predefined classes, i.e. set the

“Icon” registry setting to “-18” and you get the question mark (?)
associated with unknown devices.

Joe McCloskey
Gamry Instruments, inc
xxxxx@gamry.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com