Leaked source code of windows server 2003
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.

60 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>Kbfiltr</TITLE>
  6. </HEAD>
  7. <BODY LINK="#0000ff">
  8. <FONT FACE="Verdana" SIZE=5><H2>Kbfiltr</H2>
  9. </FONT><FONT FACE="Verdana" SIZE=2>
  10. <P><span style="color:#FF0000;font-size:10pt;font-family:Arial">[This is preliminary documentation and subject to change.]</span></P>
  11. <H3>SUMMARY</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
  12. This driver filters input for a particular keyboard on the system. In its current state, it only hooks into the keyboard packet report chain, the keyboard initialization function, and the keyboard ISR, but does not do any processing of the data that it sees. (The hooking of the initialization function and 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. <H3>BUILDING THE SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
  15. This sample is installed via an .inf file. The .inf file included in this sample is designed to filter a PS/2 keyboard. <P>
  16. Use the following rules regarding the .inf file that installs the filter driver.<P>
  17. <li>The .inf file must install the class driver (Kbdclass) and the port driver (i8042prt, Kbdhid, etc.) by using Keyboard.inf and the INF directives "Needs" and "Include".
  18. <li>The .inf file must add the correct registry values for the class and port driver, as well as using the new directives.</Li>
  19. <P>The .inf (kbfiltr.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 keyboard filter driver. Use Geninf.exe to create the .inf file for your driver.</P>
  20. <P>The catalog file referred to in kbfiltr.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>
  21. <B>To install this filter, follow these steps:</B><P>
  22. <OL>
  23. <li>Open the <B>Device Manager</B>. </li>
  24. <li>Open the <B>Properties</B> of the PS/2 keyboard installed on the system.</li>
  25. <li>Click the <B>Driver</B> tab, and then click <B>Update Driver</B>.</li>
  26. <li>Follow the wizard's prompts, and when prompted, select the <B>Display a list of the known drivers</B> option, and then click <B>Next</B>.</li>
  27. <li>Click <B>Have Disk</B> and point to the location of the .inf file.</li>
  28. <li>Proceed through the rest of the install. You will need to reboot the machine if you are filtering a PS/2 device.</li>
  29. </OL>
  30. Once built, the sample produces one binary: Kbfiltr.sys.<P>
  31. 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>
  32. <H3>CODE TOUR</H3>
  33. <H4>File Manifest</H4>
  34. </FONT><U><PRE>File&#9;&#9;Description
  35. </U>
  36. Kbfiltr.htm&#9;The documentation for this sample (this file)
  37. Kbfiltr.c&#9;Hooks into the reporting chain, the initialization of a PS/2 keyboard, and the PS/2 keyboard ISR
  38. Kbfiltr.h&#9;Definitions
  39. Kbfiltr.rc&#9;Resources
  40. Kbfiltr.inf&#9;Sample .inf file (use geninf.exe to create your own)
  41. Kbfiltr.cat&#9;Sample (invalid) catalog (WHQL will provide a valid catalog file upon approval)
  42. </FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
  43. <TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
  44. <TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
  45. <P></TD>
  46. </TR>
  47. </TABLE>
  48. <FONT FACE="MS Sans Serif" SIZE=1><P>&copy; Microsoft Corporation 1999</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
  49. </HTML>