Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
3.8 KiB

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
  4. <META NAME="Generator" CONTENT="Microsoft Word 97">
  5. <TITLE>Moufiltr</TITLE>
  6. </HEAD>
  7. <BODY TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" leftmargin="8">
  8. <FONT FACE="Verdana"><H2><A NAME="MYSAMPLE">Moufiltr</A> </H2>
  9. <P><span style="color:#FF0000;font-size:10pt;font-family:Arial">[This is preliminary documentation and subject to change.]</span></P>
  10. <H3>SUMMARY</H3>
  11. </FONT><FONT FACE="Verdana" SIZE=2><P>
  12. 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, but 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. <P>
  13. It works on both x86 and Alpha platforms, and is 64-bit compliant.<P>
  14. </FONT><FONT FACE="Verdana"><H3>BUILDING THE SAMPLE</H3>
  15. </FONT></FONT><FONT FACE="Verdana" SIZE=2><P>This sample is installed via an .inf file. The .inf file included in this sample is designed to filter a PS/2 mouse. </P>
  16. <P>Use the following rules regarding the .inf file that installs the filter driver.</P>
  17. <UL>
  18. <LI>The .inf file must install the class driver (Mouclass) and the port driver (i8042prt, Mouhid, Sermouse, etc.) by using Msmouse.inf and the INF directives "Needs" and "Include".</LI>
  19. <LI>The .inf file must add the correct registry values for the class and port driver, as well as using the new directives.</LI></UL>
  20. <P>The .inf (moufiltr.inf) included in this example was generated by Geninf.exe, a tool located in the Tools directory. An .inf file generated by Geninf.exe will contain the necessary directives to install a new mouse filter driver. Use Geninf.exe to create the .inf file for your driver.</P>
  21. <P>The catalog file referred to in moufiltr.inf, Kbfiltr.cat, is included in this example, but it is <i>invalid</i>. WHQL will provide a valid catalog file upon approval of the driver.</P>
  22. <B><P>To install this filter, follow these steps:</P>
  23. </B>
  24. <OL>
  25. <LI>Open the <B>Device Manager</B>.
  26. <LI>Open the <B>Properties</B> of the PS/2 mouse installed on the system.</LI>
  27. <LI>Click the <B>Driver</B> tab, and then click <B>Update Driver</B>.</LI>
  28. <LI>Follow the wizard's prompts, and when prompted, select the <B>Display a list of the known drivers</B> option. Then click <B>Next</B>.</LI>
  29. <LI>Click <B>Have Disk</B> and then point to the location of the .inf file.</LI>
  30. <LI>Proceed through the rest of the install. You will need to reboot the machine if you are filtering a PS/2 device.</LI>
  31. </OL>
  32. <P>Once built, the sample produces one binary: Moufiltr.sys.</P>
  33. <P>The code builds properly with Microsoft&#174; Visual C&#174; 6.0 and the driver supports Plug and Play and Power Management. Both checked and free builds are available. There are no known bugs or issues to be documented.</P>
  34. <H3>CODE TOUR</H3>
  35. <H4>File Manifest</H4>
  36. </FONT><U><PRE>File&#9;&#9;Description
  37. </U>
  38. Moufiltr.htm&#9;The documentation for this sample (this file).
  39. Moufiltr.c&#9;Hooks into the reporting chain, the initialization of a PS/2 mouse, and the PS/2 ISR
  40. Moufiltr.h&#9;Definitions
  41. Moufiltr.rc&#9;Resources
  42. Moufiltr.inf&#9;Sample .inf file (use geninf.exe to create your own)
  43. Moufiltr.cat&#9;Sample (invalid) catalog (WHQL will provide a valid catalog file upon approval)
  44. </FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
  45. <TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
  46. <TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
  47. <P></TD>
  48. </TR>
  49. </TABLE>
  50. <FONT FACE="MS Sans Serif" SIZE=1><P>&copy; Microsoft Corporation 1999</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
  51. </HTML>