MORE INFORMATION
The
following file is available for download from the Microsoft Download
Center:
Release Date: July 12,
2000
For additional information about how to download Microsoft
Support files, click the following article number to view the article in the
Microsoft Knowledge Base:
119591 How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that the file
was posted. The file is stored on security-enhanced servers that help to
prevent any unauthorized changes to the file.
Building the Sample
Use the following steps to build the sample:
- Click the Free Build Environment or Checked Build Environment icon in your Development Kits program group to set basic
environment variables that are needed by the build utility.
- Change to the folder that contains the device source code,
by using a command such as CD
C:\Drivers\Event.
- Run build -ceZ or use the BLD macro.
This process invokes the Microsoft make routines that produce
.log files (Build
xxx.log) and also Build
xxx.wrn and Build
xxx.err, if there are any warnings or errors, where
xxx stands for .fre or .chk, depending on the environment
chosen.
If the build succeeds, the Event.sys driver and the test
application program, Eventtst.exe, will be placed in a platform-specific
subfolder in your
%TargetPath% folder that is specified in the Sources file.
Installing the Sample
To install the driver:
- Double-click the Add/Remove Hardware application in Control Panel.
- Click to select Add/Troubleshoot a device.
- Click to select Add a new device. Click Next.
- Select to select No, I want to select the hardware from a list. Click Next.
- Click to select Other devices, and then click Next.
- Click Have Disk and point to the folder that contains the Event.inf
file.
The system will copy the Event.sys file to the
%Systemroot%\System32\Drivers folder and load the driver.
Configuring the Event Driver
The Event driver debug parameters can be configured by using the
registry. The Event.inf file contains the default values for all the
configurable parameters. A brief description of each parameter
follows:
This is a Boolean value, which determines whether a
break point will be generated during the DriverEntry routine. It has no effect
in a free build of the driver.
This value specifies the level of diagnostic
messages produced. Larger values result in more verbose messages. It can take
values from 0 to 3. It has no effect in a free build of the driver.
DebugComp REG_DWORD 0xFFFFFFFF
This value specifies the components in which the
debug messages are printed. Each bit specifies the component. See Debug.h for a
component list. It has no effect in a free build of the driver.
The
Event.exe file contains the following files:
File Description
-----------------------------------------------------------------------
Event.c Source file for the Event sample driver.
Pnp.c Source file that handles the PnP IRPs.
Event.h Include file that contains the Event structures.
Debug.h Include file that contains the debug print definition.
Common.h Include file that contains the command definition for the
driver and application.
Eventtst.c Source file for the test application.
Sources Generic file for building the code sample.
Makefile Standard Windows 2000 makefile.
Event.inf Installation file for installing the driver.
Event.htm Sample Tour documentation for this sample.
Event.sys Windows 2000 driver file (Free build).
Eventtst.exe Test application program (Free build).