[Previous] [Next]

Windows 98 Compatibility Notes

Windows 98 handles some of the details surrounding device object creation and driver loading differently than Windows 98. This section explains the differences that might affect your driver.

Differences in DriverEntry Call

As I indicated earlier, the DriverEntry routine receives a UNICODE_STRING argument naming the service key for the driver. In Windows 2000, the string is a full registry path of the form "\Registry\Machine\System\CurrentControlSet\Services\xxx" (where "xxx" is the name of the service entry for your driver). In Windows 98, however, the string is of the form "System\CurrentControlSet\Services\<classname >\<instance#>" (where <classname> is the class name of your device and <instance-#> is an instance number like 0000 indicating which device of that class you happen to be). You can open the key in either environment by calling ZwOpenKey, however.

Differences in Registry Organization

Windows 98 uses a slightly different scheme for organizing the registry entries for devices than Windows 2000 does. The following short explanation will make better sense if you come back to it after reading the material on driver installation in Chapter 12.

The \?? Directory

Windows 98 doesn't understand the directory name \??. Consequently, you need to put symbolic link names in the \DosDevices directory. You can use \DosDevices in Windows NT also, because it is a symbolic link to the \?? directory.

Unimplemented Device Types

Original Windows 98 doesn't support creating device objects for mass storage devices. These are devices with types FILE_DEVICE_DISK, FILE_DEVICE_TAPE, FILE_DEVICE_CD_ROM, and FILE_DEVICE_VIRTUAL_DISK. You can call IoCreateDevice, and it will even return with a status code of STATUS_SUCCESS, but it won't have actually created a device object or modified the PDEVICE_OBJECT variable whose address you gave as the last argument.

The reason this functionality isn't available is that Windows 98 disk drivers must use the I/O Supervisor architecture invented for Windows 95. Why IoCreateDevice fails so silently is a bit of a puzzle, though.