- Классы стандартных устройств Windows
- NT Device Names
- Device Names for WDM Drivers
- Device Names for non-WDM Drivers
- System-Defined Device Setup Classes Reserved for System Use
- Accessing Device Interface Class Properties
- Accessing the Default Interface for a Device Interface Class
- Accessing Device Interface Class Properties That Have Registry Entry Values Under the Interface Class Registry Key
Классы стандартных устройств Windows
    Все современные компьютерные устройства имеют уникальные аппаратные идентификаторы ( PnP ID или просто ID ), в которых указываются производитель ( Vendor ID) , тип и класс устройства (Device ID). Идентификатор устройства может быть считан программно и является исходной информацией для привязки соответствующего драйвера к данному устройству. Идентификатор устройства можно посмотреть в диспетчере устройств, выбрав ”Свойства” — ”Сведения” — ”ИД оборудования”. Например, для стандартного контроллера AHCI :
Этот идентификатор относится к устройству на шине PCI , производства Intel (VEN_8086), которое относится к контроллерам жестких дисков (DEV_8C02). Остальные данные идентификатора (SUBSYS_78211462…) могут описывать некоторые особенности устройства, которые могут учитываться при его оптимальном использовании (например, версия прошивки). При установке драйвера устройства используется специальные INF-файлы, в которых содержится информация об идентификаторе, файлах драйвера и классе устройства.
; Copyright (c) Microsoft Corporation. All rights reserved.
[Version]
Signature=»$WINDOWS NT$»
Class=hdc
ClassGuid = <4d36e96a - e325 11ce bfc1 08002be10318>
Provider=%MS%
DriverVer=06/21/2006, 6.1.7601.17514
[SourceDisksNames]
3426=windows cd
Символ точки с запятой ( ; ), в inf-файлах используется в качестве признака начала поля комментария. Строка символов, заключенная в квадратные скобки указывает на секцию inf-файла, которая может содержать один или несколько параметров. Как минимум, в inf-файлах присутствуют параметры, определяющие операционную систему, для установки в которую предназначен драйвер, класс устройств, который должен обслуживать данный драйвер, имена файлов драйвера и аппаратные идентификаторы устройств (ИД оборудования), которые обслуживаются данным драйвером.
В представленном выше примере, приведены фрагменты inf-файла для стандартного дискового SATA контроллера, который может обслуживать несколько десятков устройств разных производителей, объединенных в класс контроллеров жестких дисков ( Class=hdc ) с глобальным уникальным идентификатором ClassGuid= <4d36e96a- e325-11ce-bfc1- 08002be10318>.
Каждое устройство в среде операционных систем семейства Windows принадлежит к какому-либо классу – контроллеров жестких дисков, видеоадаптеров, сетевых карт и т.п. Каждому классу соответствует глобальный уникальный идентификатор — Globally Unique Identifier (GUID) . Обозначается GUID в виде наборов шестнадцатеричных цифр, разделяемых дефисами для удобства записи, и заключенными в фигурные скобки.
Перечень GUID классов стандартных устройств Windows
Class | ClassGUID | Описание устройства |
---|---|---|
CDROM | 4D36E965 — E325 — 11CE — BFC1 -08002BE10318 | CD/DVD/Blu-ray drives |
DiskDrive | 4D36E967 — E325 — 11CE — BFC1 — 08002BE10318 | Hard drives |
Display | 4D36E968 — E325 — 11CE — BFC1 — 08002BE10318 | Video adapters |
FDC | 4D36E969 — E325 — 11CE — BFC1 — 08002BE10318 | Floppy controllers |
FloppyDisk | 4D36E980 — E325 — 11CE — BFC1 — 08002BE10318 | Floppy drives |
HDC | 4D36E96A — E325 — 11CE — BFC1 — 08002BE10318 | Hard drive controllers |
HIDClass | 745A17A0 — 74D3 — 11D0 — B6FE — 00A0C90F57DA | Some USB devices |
1394 | 6BDD1FC1 — 810F — 11D0 — BEC7 — 08002BE2092F | IEEE 1394 host controller |
Image | 6BDD1FC6 — 810F — 11D0 — BEC7 — 08002BE2092F | Cameras and scanners |
Keyboard | 4D36E96B — E325 — 11CE — BFC1 — 08002BE10318 | Keyboards |
Modem | 4D36E96D — E325 — 11CE — BFC1 — 08002BE10318 | Modems |
Mouse | 4D36E96F — E325 — 11CE — BFC1 — 08002BE10318 | Mice and pointing devices |
Media | 4D36E96C — E325 — 11CE — BFC1 — 08002BE10318 | Audio and video devices |
Net | 4D36E972 — E325 — 11CE — BFC1 — 08002BE10318 | Network adapters |
Ports | 4D36E978 — E325 — 11CE — BFC1 — 08002BE10318 | Serial and parallel ports |
SCSIAdapter | 4D36E97B — E325 — 11CE — BFC1 — 08002BE10318 | SCSI and RAID controllers |
System | 4D36E97D — E325 — 11CE — BFC1 — 08002BE10318 | System buses, bridges, etc. |
USB | 36FC9E60 — C465 — 11CF — 8056 — 444553540000 | USB host controllers and hubs |
Существующий в конкретной операционной системе, набор драйверов, определяется содержимым каталога C:\Windows\ System32\ DriverStore\ FileRepository\ . Так, например, файлы необходимые для установки стандартного дискового контроллера Microsoft, хранятся в папке, имя которой начинается с mshdc.inf_ . Примерный список файлов для Windows 7:
aliide.sys
amdide.sys
atapi.sys
ataport.sys
cmdide.sys
intelide.sys
msahci.sys
mshdc.inf
mshdc.PNF
pciide.sys
pciidex.sys
viaide.sys
Примерный список файлов для Windows 8-10:
atapi.sys
ataport.sys
intelide.sys
mshdc.inf
pciide.sys
pciidex.sys
storahci.sys
Стандартный контроллер SATA от Microsoft в Windows 8-10 использует драйвер storahci.sys , в Windows 7 — msahci.sys .
Полный набор INF-файлов, существующих в операционной системе Windows, хранится в каталоге C:\Windows\inf\ .
Если вы желаете поделиться ссылкой на эту страницу в своей социальной сети, пользуйтесь кнопкой «Поделиться»
NT Device Names
A named device object has a name of the form \Device\DeviceName. This is known as the NT device name of the device object.
Device Names for WDM Drivers
WDM drivers do not name their device objects directly. Instead, the system imposes a uniform naming scheme that ensures that device names do not conflict between drivers. The naming scheme for WDM drivers is as follows.
The PDO for a device is named. The bus driver requests named PDOs for the devices it enumerates. The bus driver specifies the FILE_AUTOGENERATED_DEVICE_NAME device characteristic when it creates the device object. For more information, see Specifying Device Characteristics. The system then automatically generates the device name.
FDOs and filter DOs are not named. Function and filter drivers do not request a name when creating the device object.
Any I/O request to a named device object automatically goes to the top object in that device object’s stack. Thus, only the PDO is required to be named. User-mode applications do not refer to WDM device objects by name; instead, applications access the device object through its device interface. For more information, see Device Interface Classes.
Driver writers must not name more than one object in a device stack. The operating system checks security settings based on the named object. If two different objects are named and have different security descriptors, the I/O requests that are sent to the object with the weaker security descriptor can reach the device object with the stronger security descriptor.
Device Names for non-WDM Drivers
A non-WDM driver must explicitly specify a name for any named device objects. The driver must create at least one named device object in the \Device object directory to receive I/O requests. The driver specifies the device name as the DeviceName parameter to IoCreateDeviceSecure when creating the device object.
System-Defined Device Setup Classes Reserved for System Use
The following classes and GUIDs should not be used to install devices (or drivers) on Windows 2000 or later versions of Windows:
Adapter
Class = Adapter
ClassGuid = <4d36e964-e325-11ce-bfc1-08002be10318>
This class is obsolete.
APM
Class = APMSupport
ClassGuid =
This class is reserved for system use.
Computer
Class = Computer
ClassGuid = <4d36e966-e325-11ce-bfc1-08002be10318>
This class is reserved for system use.
Decoders
Class = Decoder
ClassGuid = <6bdd1fc2-810f-11d0-bec7-08002be2092f>
This class is reserved for future use.
Host-side IEEE 1394 Kernel Debugger Support
Class = 1394Debug
ClassGuid = <66f250d6-7801-4a64-b139-eea80a450b24>
This class is reserved for system use.
IEEE 1394 IP Network Enumerator
Class = Enum1394
ClassGuid =
This class is reserved for system use.
No driver
Class = NoDriver
ClassGuid = <4d36e976-e325-11ce-bfc1-08002be10318>
This class is obsolete.
Non-Plug and Play Drivers
Class = LegacyDriver
ClassGuid = <8ecc055d-047f-11d1-a537-0000f8753ed1>
This class is reserved for system use.
Other Devices
Class = Unknown
ClassGuid = <4d36e97e-e325-11ce-bfc1-08002be10318>
This class is reserved for system use. Enumerated devices for which the system cannot determine the type are installed under this class. Do not use this class if you are unsure in which class your device belongs. Either determine the correct device setup class or create a new class.
Printer Upgrade
Class = PrinterUpgrade
ClassGuid = <4d36e97a-e325-11ce-bfc1-08002be10318>
This class is reserved for system use.
Sound
Class = Sound
ClassGuid = <4d36e97c-e325-11ce-bfc1-08002be10318>
This class is obsolete.
Storage Volume Snapshots
Class = VolumeSnapshot
ClassGuid = <533c5b84-ec70-11d2-9505-00c04f79deaf>
This class is reserved for system use.
USB Bus Devices (hubs and host controllers)
Class = USB
ClassGuid = <36fc9e60-c465-11cf-8056-444553540000>
This class includes USB host controllers and USB hubs, but not USB peripherals. Drivers for this class are system-supplied.
Accessing Device Interface Class Properties
In Windows Vista and later versions of Windows, the unified device property model includes device interface class properties that characterize a device interface class. The unified device property model uses property keys to represent these properties.
Windows Server 2003, Windows XP, and Windows 2000 also support most of these device interface class properties. However, these earlier versions of Windows do not support the property keys of the unified device property model. Instead, you can represent and access the corresponding property information on these versions of Windows by using the following methods:
To maintain compatibility with these earlier versions of Windows, Windows Vista and later versions also support these two ways to access information about a device interface. However, you should use the property keys to access these properties in Windows Vista and later versions.
For a list of the system-defined device interface class properties, see Device Interface Class Properties. The device setup class properties are listed by the property key identifiers that you use to access the properties in Windows Vista and later versions. The information that is provided with the property keys also includes the corresponding registry entry values that you can use to access the properties on Windows Server 2003, Windows XP, and Windows 2000.
For information about how to use property keys to access device setup class properties in Windows Vista and later versions, see Accessing Device Class Properties (Windows Vista and Later).
Accessing the Default Interface for a Device Interface Class
To retrieve the default interface for a device interface class, call SetupDiGetClassDevs and supply the following parameter values:
Set ClassGuid to the GUID that represents the device interface class for which to retrieve the default interface.
Set EnumeratorNULL.
Set hwndParent to NULL.
Set Flags to (DIGCF_DEVICEINTERFACE | DIGCF_DEFAULT).
This call will return a device information set that contains a device information element. The device information element that is returned represents the device that supports the default interface for the specified device interface class.
To set the default interface for a device interface class, call SetupDiSetDeviceInterfaceDefault and supply the following parameters values:
Set DeviceInfoSet to a handle to the device information set that contains the device interface to set as the default for a device interface class.
Set DeviceInterfaceData to a pointer to an SP_DEVICE_INTERFACE_DATA structure that specifies the device interface in DeviceInfoSet.
Accessing Device Interface Class Properties That Have Registry Entry Values Under the Interface Class Registry Key
To access properties of a device interface class that have corresponding registry entry values under the interface class registry key, follow these steps:
Call the SetupDiOpenClassRegKeyEx function to open the interface class registry key and supply the following parameter values:
- Set ClassGuid to a pointer to the GUID that identifies the device interface class of the requested class registry key.
- Set samDesired to a REGSAM-typed value that specifies the required access permission.
- Set Flags to DIOCR_INTERFACE.
- Set MachineName to a pointer to a NULL-terminated string that contains the name of the computer on which to open the requested class registry key. If the computer is the local computer, set MachineName to NULL.
- Set Reserved to NULL.
If this call to SetupDiOpenClassRegKeyEx succeeds, SetupDiOpenClassRegKeyEx returns the requested handle. If the function call fails, SetupDiOpenClassRegKeyEx returns INVALID_HANDLE_VALUE and a call to GetLastError will return the logged error code.
Supply the retrieved handle in a call to RegQueryValueEx and RegSetValueEx to retrieve or set the registry entry value that corresponds to the device interface class property.
Call the RegCloseKey function to close the class registry key after access to the key is no longer required.
For information about how to install and use device interfaces, see Device Interface Classes and INF AddInterface Directive.