Programming the Microsoft Windows Driver Model

Windows 98/Me Compatibility Notes

There are some minor differences between Windows 98/Me and Windows XP insofar as the material discussed in this chapter goes.

WDM Filters for VxD Drivers

People often want to take WDM filter drivers for serial or disk devices and just port them to Windows 98/Me. This process won t work. Windows 98/Me uses VxD drivers for serial ports and block storage devices, and there s no simple way to insert a WDM driver into the flow of I/O requests.

INF Shortcut

Rather than trying to figure out how to store a REG_MULTI_SZ value in Windows 98/Me (which doesn t support this registry data type in the first place), I find it easier to just specify multiple drivers in the driver key:

[DriverAddReg] HKR,,DevLoader,,*ntkern HKR,,NTMPDriver,, \ "wdmstub.sys,powtrace.sys,whatever.sys,filter.sys"

The reason this works is that Windows 98/Me device loaders, including NTKERN, invariably call a CONFIGMG routine that loads all the drivers specified in a comma-delimited string.

Class Filter Drivers

Since Windows 98/Me doesn t support the REG_MULTI_SZ value type, you use a binary value when you want to specify class filters. (You can use the shortcut just described for device filters.) For example:

[ClassInstall] AddReg=ClassInstallAddReg CopyFiles=CopyClassFilters [ClassInstallAddReg] HKR,,UpperFilters,1, 66, 6f, 6f, 2e, 73, 79, 73, 00, \ 62, 61, 72, 2e, 73, 79, 63, 00, 00

This syntax defines a REG_BINARYUpperFilters value containing foo.sys\0bar.sys\0\0. Note that you need to specify the filename rather than a service name.

Категории