The Demo UPS sample
provides an example of a UPS minidriver for use by the UPS service. It
contains annotated code to assist in developing a UPS minidriver DLL.
Detailed documentation may be found in the Windows 2000/XP DDK under Battery
Devices.
A UPS minidriver provides
a means for the standard UPS service to communicate with various UPS
devices. Third parties may provide a minidriver to enable the UPS service
to manage their proprietary hardware. A UPS minidriver is a
user-mode DLL called by the UPS service. A UPS minidriver
has the following responsibilities:
Typically, a UPS minidriver communicates with a UPS device through a COM (serial) port by calling CreateFile, ReadFile, and WriteFile. These functions are described in the Platform SDK documentation. The minidriver is responsible for implementing whatever communication protocol the UPS unit supports.
Note: This package is intended to
demonstrate UPS minidriver concepts for educational purposes. It is not to be
used in a production environment in its entirety.
This sample package
consists of source code and an installation INF file. The sample contains
following files:
To build the sample
drivers, you must first set up the DDK environment on your host machine. The
“Installation and Release Notes” in the Windows 2000/XP DDK has a complete
description on how to do this.
This will build the
sample. Any errors will be displayed in the Output window.
To install the UPS demo
minidriver:
This will
copy the demoups.dll file
to the %SystemRoom$\system32
directory and make the appropriate registry entries.
Once the Demo UPS minidriver is installed, it needs to be configured and started from the Power Options Control Panel applet.
You can uninstall the
Demo UPS minidriver by selecting ‘None’ for the manufacturer and clicking
‘Finish’ and ‘Apply’. This will remove the Demo
UPS minidriver configuration and stop the UPS service.
|
© Microsoft
Corporation 2001