Windows 98 Compatibility Notes

[Previous] [Next]

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 hardware key is below HKLM\Enum and isn't protected in any way (because Windows 98 doesn't have a security system). There is no Service value; instead, there's a Driver value that supplies the final two components of the name of the service key. The LowerFilters and UpperFilters values are treated as binary because the Windows 98 registry doesn't have a MULTI_SZ type, and the values use 8-bit characters to name driver image files (with the .SYS extension) rather than services.
  • The class key is below HKLM\System\CurrentControlSet\Services\Class.
  • The service key is a child of the class key. The entries in the service key include a DevLoader value pointing to NTKERN.VXD and an NTMPDriver value naming your driver image (with the .SYS extension), which must reside in %SystemRoot%\System32\Drivers.

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.



Programming the Microsoft Windows Driver Model
Programming the Microsoft Windows Driver Model
ISBN: 0735618038
EAN: 2147483647
Year: 1999
Pages: 93
Authors: Walter Oney

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net