Intermec 6100 Reference Guide

Page of 328
SECTION 3
Supporting Windows Applications
PEN*KEY
R
 6100 Computer Programmer’s Reference Guide    3-13
Windows Installable Drivers
Windows installable drivers receive APM event broadcasts via their DriverProc
entry points.  The message format is:
Msg:
DRV_POWER (defined in WINDOWS.H)
lParam1: PWR_* event code defined in APMCODES.H or WINDOWS.H.
lParam2: Undefined
Returns:
The driver should return PWR_FAIL or PWR_OK
DOS Real-Mode Drivers and TSRs
DOS realĆmode system components receive APM event broadcasts through softĆ
ware interrupt 2Fh.  A driver or TSR that hooks the broadcast should nest to
previous owners of the interrupt before handling it; even if it wants to fail the
call.  This approach allows other drivers an opportunity to see the event; even if
it results in failing.  The message format is:
AX:
530Bh, the APM event broadcast ID
BX:
APM_* event code defined in APMCODES.H.
CX:DX:
Optional 32Ćbit Norand APM event parameter
Returns BX:
Set BX to 0 for success or 80h to fail the event.
Windows System Drivers
Windows system drivers receive APM event broadcasts through a defined entry
point.  NORWINPM.DRV does not currently broadcast to system drivers, since
none of them has this entry point.
Standard APM Event Codes
These are the most common APM event codes defined and is described in the
Intel/Microsoft APM Specification, versions 1.0 and 1.1.  There are additional
events, but these are the ones typically handled by drivers and applications.
Events marked (1.1)" are only valid in APM 1.1, and may not be present on
open systems that only implement 1.0 events.  Additional clarification of
NORWINPM.DRV's use of these events is given below.  There are other APM
codes that may also be broadcast.
SUSPENDREQUEST, System Suspend Request Notification
A suspend timeĆout is pending.  Drivers and applications should fail the event if
they are busy. If the event is failed, NORWINPM.DRV restarts the suspend timeĆ
out suspend request but does not suspend the system.
SUSPENDRESUME, Normal Resume System Notification
The system has returned from a suspend timeĆout or a user suspend.  Drivers
and applications should respond to system changes at this time.
PWRCHANGE, Power Status Change Notification
Power status has changed.  The optional parameter of this event message conĆ
tains the first four bytes of the current 
tagPOWER_STATUS
 (refer to NORAPM.H, in
the Tool Kit).  You can use the message to determine whether the system is runĆ
ning on battery power or line power without having to poll NORWINPM.DRV.
3. Windows
Applications