Windows 98 Compatibility Notes

[Previous] [Next]

Windows 98 uses completely different technology for installing and maintaining devices than Windows 2000. In this section, I'll describe some of the ways this might affect you.

Property Page Providers

A property page provider for a new device class must be a 16-bit DLL. Look at SAMCLS16 on the companion disc if you want to see an example, and don't discard your 16-bit compiler just yet!

Registry Usage

Windows 98 uses a software registry key to locate device drivers. To initialize this key, your Windows 98 install section should have an AddReg directive similar to this example:

[DriverInstall] AddReg=DriverAddReg <other install directives> [DriverAddReg] HKR,,DevLoader,,*ntkern HKR,,NTMPDriver,,pktdma.sys

That is, you designate NTKERN.VXD as the device loader for your device, and you designate your WDM driver as the NTMPDriver for which NTKERN looks. In addition, you omit a .Services section because Windows 98 doesn't use it.

In contrast to Windows 2000, Windows 98 puts standard and nonstandard device properties in the hardware key instead of separating the nonstandard properties into a Device Parameters subkey. This turns out to be lucky, since you can't use IoGetDeviceProperty to retrieve standard properties in Windows 98. (See the next section for the reason.)

Getting Device Properties

Windows 98 (including Windows 98 Second Edition) incorrectly implements IoGetDeviceProperty for the standard properties in a device's hardware key. To retrieve these properties in a WDM driver, you should use IoOpenDeviceRegistryKey and interrogate the property by name. The DEVPROP sample illustrates how to do this for the standard device description property.

Application Launching

Windows 98 doesn't have a service manager, so you can't run AutoLaunch as a service. The next best thing is an executable named in the registry's Run keyword. Part of the AutoLaunch package is an ALNCH98.EXE applet that can be executed in this way. It provides a tray icon that you can use if you want it to halt.



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