Moufiltr

SUMMARY

This sample is WDF version of WDM filter driver sample. The WDM version of this sample has been deprecated.

This driver filters input for a particular mouse on the system. In its current state, it only hooks into the mouse packet report chain and the mouse ISR, and does not do any processing of the data that it sees. (The hooking of the ISR is only available in the i8042prt stack.) With additions to this current filter-only code base, the filter could conceivably add, remove, or modify input as needed.

BUILDING THE SAMPLE

Click the Free Build Environment or Checked Build Environment icon under Development Kits program group to set basic environment variables.

Change to the directory containing the device source code, such as CD src\input\moufiltr.

Run build -ceZ, or use the macro BLD. This command invokes the Microsoft make routines to build the components. If the build succeeds, you will find the driver, moufiltr.sys, in the binary output directory specified for the build environment. You can get the output path from the buildxxx.log file. If it fails you can find errors and warnings in the buildxxx.err and buildxxx.wrn respectively, where xxx is either chk or fre depending on the build environment.

INSTALLATION

Copy the KMDF coinstaller (wdfcoinstallerMMmmm.dll), driver binary and the moufiltr.inf file to a floppy disk or a temp folder.

This sample is installed via an .inf file. The .inf file included in this sample is designed to filter a PS/2 mouse.

Use the following rules regarding the .inf file that installs the filter driver.

To install this filter, follow these steps:

  1. Open the Device Manager.
  2. Open the Properties of the PS/2 mouse installed on the system.
  3. Click the Driver tab, and then click Update Driver.
  4. Click the Browse my computer for drivers software.
  5. Click the Let me pick from a list of device drivers on my computer.
  6. Click Have Disk and point to the location of the .inf file.
  7. Proceed through the rest of the install. You will need to reboot the machine if you are filtering a PS/2 device.

CODE TOUR

File Manifest

File           Description
 
Moufiltr.htm   The documentation for this sample (this file).
Moufiltr.c     Hooks into the reporting chain, the initialization of a PS/2 mouse, and the PS/2 ISR
Moufiltr.h     Definitions
Moufiltr.rc    Resources
Moufiltr.inx   Sample .inx file 
Makefile.inc   A makefile that defines custom build actions.  This includes the conversion of the .INX file into a .INF file
 

Top of page

 

 

 
 

© 2004 Microsoft Corporation