windows-nt/Source/XPSP1/NT/drivers/wdm/input/legacy/hidgame/hidgame.htm

100 lines
4.1 KiB
HTML
Raw Normal View History

2020-09-26 03:20:57 -05:00
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<TITLE>HIDGAME</TITLE>
<META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</HEAD>
<BODY TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" leftmargin="8">
<FONT FACE="Verdana"><H2><A NAME="MYSAMPLE">HIDGAME</A> </H2>
<span style="color:#FF0000">[This is preliminary documentation and subject to change.]</span>
<H3>Summary</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
HidGame is the WDM/HID minidriver for analog joysticks.
This driver registers with the HID class driver and responds to IRPs put out by HIDclass.
It informs HID class about the capabilities of the joystick and polls
the joystick in response to a read IOCTL.
</p>
<p>This driver is loaded in reponse to a "New hardware Found" Plug and Play (PnP) event,
and consequently must have an entry in an .inf file that binds a
PnP hardware ID to this driver. Gameport joysticks are not true PnP devices,
so the user (through the GameControllers Control Panel) informs the system
about a joystick attached to the gameport. An example of how a new joystick
type can be created is provided in the accompanying .inf file. Once a user
selects a joystick and gameport, the GameControllers CPL sends an IOCTL to
the gameport bus driver (GameEnum), specifying the number of
Axis / Buttons and a PnPHardware ID for the joystick.
The Gameport Bus informs PnP of a new device arrival.
PnP searches the system for a match for the hardwareID and loads the appropriate driver.
<p>
<h3>BUILDING THE SAMPLE</h3></FONT><FONT FACE="Verdana" SIZE=2><P>
<p> Use standard Windows NT&#174;/Windows&#174; 2000 build tools. In the hidgame directory, type <B>build</B>.
The build script will generate the driver Hidgame.sys </p>
<h3>TOOLS</h3></FONT><FONT FACE="Verdana" SIZE=2><P>
<p> You can test your driver using the the following apps/tools.
<p><li><B>Game Controllers Control panel</b> from the Standard Control panel</p>
<p><li><b>Diquick.exe</b> (from the IDW directory or the Microsoft DirectX SDK at
<a href=http://www.microsoft.com/directx/resources>Microsoft DirectX Resources</a>)
</p>
<p><li><b>Shipping Microsoft DirectX games</b>
<h3>RESOURCES</h3></FONT><FONT FACE="Verdana" SIZE=2><P>
<p><a href=http://www.usb.org/>Universal Serial Bus</a>
HID Usage Tables</cite>, Version 1.0,
USB Implementers Forum.
<p>
<a href=http://www.microsoft.com/directx/resources>
Microsoft DirectX Resources</a>
</p>
<h3>CODE TOUR</h3>
<h4>File Manifest</h4>
<pre><FONT FACE="Courier" SIZE=2>
<u>Files Description</u>
Hidgame.htm The documentation for this sample (this file)
Sources The generic file for building the code sample
Makefile Used as part of the build process
OEMsetup.inf The .inf file for installing the code sample
HidGame.c DriverEntry, CreateClose, AddDevice and Unload routines
PnP.c Support routines for PnP IOCTLs
RemLock.c Support routines to enhance checking for removal locking
Ioctl.c Support routines for Non PnP IOCTLs ( read/Device descriptor/Device Attributes, and so on)
HidJoy.c Support routines to configure the joystick
Poll.c Support routine for analog joystick polling
i386\timing.c Support routines to use x86 time stamp counter
Hidgame.h Common include file
Debug.h Definitions to aid debugging
Analog.h Definitions specific to analog joystick devices
Hidgame.rtf Autodoc doumentation for Hidgame
</font><font
FACE="VERDANA,ARIAL,HELVETICA" SIZE="2"> </pre>
<h4>Programming Tour</h4>
<p>
This sample has embedded comments in the source code. The AutoDoc utility was used to generate
the following <a href=hidgame.rtf>AutoDoc comments RTF</a> file from the source code.
</p>
</FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
<TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
<TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
<P></TD>
</TR>
</TABLE>
<FONT FACE="MS Sans Serif" SIZE=1><P>&copy; 1999 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
</HTML>