Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
WDM Samples
 Tablet PC Button Sample
Windows Driver Kit: WDM Devices
Tablet PC Button Sample

Description

The Tablet PC button sample driver demonstrates how to support i8042 port-compatible button devices that are installed in a Tablet PC.

Theory of Operation

The sample code supports the infrastructure that is necessary for basic WDM driver operation, including standard driver routines, dispatch routines, Plug and Play (PnP), power management, and handling HIDClass device IOCTLs. Unless a device requires special handling of these basic operations, you do not have to modify the infrastructure code. The code includes OemXxx functions, OEM_Xxx structures, and OEM_Xxx constants that indicate the code that a vendor typically needs to customize for a specific device type.

Building the Sample

Use the standard driver build tools for Microsoft Windows Vista. In a driver directory, type build. The build script generates the corresponding driver (for example, HBtnKey.sys).

Installation

General

To install the driver, copy the driver files (the .sys file) and the INF files to the same location. In Device Manager, do the following:
  1. Right-click the device, and click Update Driver.
  2. Select Install from a list or specific location (Advanced), and then click Next.
  3. Select Don't search. I will choose the driver to install, and then click Have Disk.
  4. In the Install From Disk dialog box, enter the path of the directory where you copied the driver and INF file.
  5. Click OK, and then click Finish.

Code Tour

File Manifest

FileDescription
Errcodes.mc Contains event code and messages
HBtnKey.c Contains the OEM-specific code
HBtnKey.h Contains the OEM-specific definitions
HBtnKey.rc Resource file for the driver
HidBtn.c Contains common driver routines
HidBtn.h Contains common definitions
HidBtn.inf INF file for the button driver
Ioctl.c Handles all internal HIDClass IOCTLs
Pch.h Precompile header file
Pnp.c Handles PnP and power management
Sources WDK sources file
Makefile WDK build environment make file
Build machine: CAPEBUILD
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker