次の方法で共有


Specifying a sensor icon

Sensor drivers can specify one of a set of platform-defined icons, or a custom icon, to represent the device in Control Panel. To specify a particular icon, create a DeviceIcon entry in your driver's INX (or INF) file, with the following format:

DeviceIcon,,,,"<full path to DLL>,-<resource id>"

For example, to specify the light sensor icon, you would add the following section:


[DriverPropertiesSection]
DeviceIcon,,,,"%SystemRoot%\system32\sensorscpl.dll,-1008"

To specify a custom icon, replace the DLL path with the path of the DLL that contains your icon and replace the resource ID with the appropriate value.

If your INX file does not already contain a driver properties section, you must add the AddProperty directive to the _Install.NT section. For example, a Time Sensor sample could include the following section:


[TimeSensor_Install.NT]
CopyFiles       = UMDriverCopy
AddProperty     = DriverPropertiesSection

For more information about device properties in INF files, see INF AddProperty Directive.