Emergency Event Registration; Power Off Event Registration - Motorola Mobile Workstation 520 Application Developer's Manual

Table of Contents

Advertisement

Emergency Event Registration

Power Off Event Registration

The Windows user application can be registered to receive the MW-520
emergency events. The registration process is as follows:
1. Activate the
Register_Emg
(see API for details). Its output is the registration status.
2. If an emergency occurred, the message defined by the user's application is
sent to it.
If the registered application is not activated, the
should be activated.
Following is a C-code example of emergency registration/deregistration:
long FAR PASCAL_EXPORT Wnd Proc
(HWND hwnd,
UINT message
UINT wParam
UINT lParam
{
.
.
.
switch (message)
{
case WM_CREATE
.
.
.
Register_Emg (hwnd, MY_MSG_NUMBER);
.
.
.
break;
case WM_DESTROY:
.
.
.
Deregister_Emg (hwnd);
Break;
}
}
The duration until the MW-520 is shut down may be used for several purposes,
for example, sending de-registration messages by the messaging application. The
registration process of the application is similar to the emergency registration.
1. Activate the
RegisterSysEvent
(see API for details). Its output is the registration status.
POWER_OFF
2. If a
event occurs, the message defined by the user's application is
POWER_OFF
sent to the application.
If the registered application is not activated, the
application should be activated before closing the user's application.
With ACPI systems, the application should register to Windows Power
Off event and not this event.
Note
Using Specific Hardware Features
function call from the user's application
DeRegister_Emg
function call with the event parameter
DeRegisterSysEvent
33
application

Advertisement

Table of Contents
loading

This manual is also suitable for:

F5203F5205

Table of Contents