SECTION 4
Power Management BIOS: NORAPM.EXE
4-12 PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide
NORAPM.H
NORAPM.H is a C++ include file that defines structures and prototypes needed
to access NORAPM.DLL. See
Appendix A, Sample Configuration Files
, for a
listing of this file.
This is the main file for the NORAND
R
APM Interface driver for Windows. This
driver contains the APM OS component for Windows as well as APM interface
entry points for Windows components.
You may include NORAPM.H in the application if you need to read NORAPM
broadcast messages (low battery, for example). This allows applications to query
NORAPM.DLL. Some default messages go to all applications in any case. Some
programs (such as Visual Basic applications) may therefore want to ignore the
NORAPM messages.
The
GetPowerStatus
function uses the
tagPOWER_STATUS
structure to relay the
APM BIOS system power status. Structure fields are direct representations of
the registers returned by the APM
GetPowerStatus
call.
extern “C” WORD FAR PASCAL _export
GetPowerStatus(tagPOWER_STATUS far *);
copies the current APM BIOS battery status values into
tagPOWER_STATUS
structure. It returns 0 if successful; else, 1 if APM BIOS call failed.
Sample Programs
TESTCHRG.CPP is a C++ Windows program that demonstrates a method for
accessing NORAPM.DLL to obtain the current charge status. It tells you
whether or not you are in the dock. The program includes NORAPM.H. See
Appendix B, Common Pen*KEY 6000 Series Information,
for a sample listing.
4. Power Management
BIOS: NORAPM.EXE