Hidbatt

[This is preliminary documentation and subject to change.]

SUMMARY

This is a battery class driver for devices using the HID power class specification. The driver reads this type of device and prevents a Microsoft® Windows® battery class device to the system so that it can be treated like any other battery in the system.

The driver works on x86 and Alpha platforms, is 64-bit compliant, and supports Plug and Play.

BUILDING THE SAMPLE

Type build from the \\Ntddk\Src\Wdm\Acpi\Hidbatt directory. A successful build creates Hidbatt.sys.

CODE TOUR

File Manifest

File		Description

Cbattery.cpp	Reads battery information from HID
Cbattery.h	#defines, et cetera, to allow reading battery information from HID
Ckhid.cpp	Basic communication with HID
Ckhid.h 	Header for Ckhid.cpp
Ckutils.cpp	Miscellaneous functions
Ckutils.h	Miscellaneous header
Devext.cpp	Device extention initialization
Devext.h 	Device extension definition
Drvclass.cpp	Miscellaneous functions used by driver
Drvclass.h	Header for Drvclass.cpp
Hid.h		C++ class for dealing with HID device
Hidbatt.cpp	Driver entry and major dispatch routines
Hidbatt.h 	Header for hidbatt.cpp
Hidbatt.rc	Resource file
Hidbattio.cpp	Battery class interface functions
Hidbattpnp.cpp 	Routines called from Plug and Play dispatch routine
Hidpddi.h	#Include header files
Ntddk.h	defines types, constants, and functions that are exposed to device drivers.
Batclass.h	header for wdm kernel client interface between HID class and power class
Hidclass.h	Definitions that are common to clients of the HID class driver.
Wdm.h		defines WDM types, constants, and functions that are exposed to device drivers

Top of page

© 1999 Microsoft Corporation