The information in this article applies to:
SUMMARYWindows NT is designed around the concept that the first driver to claim a device obtains ownership of that device. This ownership can be shared or it can be exclusive; this is up to the claiming device driver. If the device is exclusively claimed by a device driver, any further attempts to claim the device by subsequently loaded device drivers fail. Because of this, it is imperative that the order in which device drivers load can be modified by device driver authors. This article describes the two methods that you can use to control the order in which device drivers load. MORE INFORMATION
There are two methods that you can use to control the order in which device
drivers load. Both methods take advantage of entries in the registry that
can be found at \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control. The
first method is to modify the ServiceGroupOrder. The second method is to
assign Tag values that determine the order of driver loading according to
the GroupOrderList.
Method 1: ServiceGroupOrderThe ServiceGroupOrder contains a list of group names in the order that they will be loaded. Here are the unmodified contents of ServiceGroupOrder:SCSI miniportAccording to the ServiceGroupOrder, device drivers in the group "SCSI class" load after all device drivers in the group "Primary disk" and before device drivers in the group "SCSI CDROM class" load. The higher a device driver's group is in the list, the sooner it loads. The ServiceGroupOrder list is scanned twice. First, all device drivers with a start value of 0 load; then, all device drivers with a start value of 1 load. Thus, a device driver with a start value of 0 loads before any device driver with a start value of 1, no matter what its position on the ServiceGroupOrder list. It is possible for the device driver author to edit the ServiceGroupOrder. By doing this, a new group can be created at any place in the list. A good example might be a SCSI class device driver called "SAMPLDRV" needing to load before "SCSIDISK" because SCSIDISK is claiming a device that SAMPLDRV needs to claim. Here are SCSIDISK's registry entries:
A new group can be added to the ServiceGroupOrder called "Load Me First" and SAMPLDRV can have its group set to Load Me First. Here is the modified ServiceGroupOrder: SCSI miniportHere are SAMPLDRV's registry entries:
With this configuration, SAMPLDRV loads before SCSIDISK. Method #2: GroupOrderList and Tag ValuesAn optional key called Tag can be included in a device driver's registry. The value of the Tag helps determine the loading order of the device drivers within a group. The loading order is not necessarily in numerical order; rather, it is in the order defined by the GroupOrderList. The first entry per group in the GroupOrderList is the number of Tag values. This is followed by the numerical sequence in which the Tag values are to be loaded. Device drivers in a group are first loaded according to their Tag value as defined by the GroupOrderList. If the device driver does not have a Tag value or if the Tag value is not in the GroupOrderList, then these device drivers load after the device drivers with valid Tag values load. For these device drivers, the order of loading is not guaranteed, other than that all device drivers in a group load before the next group loads.Here is a partial output of the GroupOrderList:
NOTE: There is no value for SCSI class. Not every group is represented in the GroupOrderList. When a group is not in the GroupOrderList, the order in which device drivers load within the group cannot be guaranteed. As with the ServiceGroupOrder, the GroupOrderList can be modified. Using the same example as above, Tag entries for SCSI class can be added:
In this example, the group SCSI class recognizes two Tag values, 00000001 and 00000002. The order in which the Tag values load is 00000002 first, followed by 00000001. If SAMPLDRV is in the SCSI class group, which is the same as SCSIDISK, either Tag value guarantees that SAMPLDRV loads before SCSIDISK because SCSIDISK has no Tag value and non-Tagged drivers load last in a group. If for some reason SCSIDISK is assigned a Tag value of 0x00000001, SAMPLDRV loads before SCSIDISK when SAMPLDRV is assigned a Tag value of 00000002:
Additional query words:
Keywords : kbDDK kbNTOS310 kbNTOS350 kbNTOS351 kbNTOS400 kbWinOS2000 |
Last Reviewed: December 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |