Top
PowerCOBOL V11.0 Reference
FUJITSU Software

6.35 PowerBroadcast Event

Description:

Generated when an event related to the system's power management is generated. This event is used when you execute the application on hardware or Windows systems that support ACPI (Advanced Configuration and Power Interface) or APM (Advanced Power Management).

For example, POW-PBT-APMQUERYSUSPEND (see parameters below) is generated when the system is preparing to suspend. If your application is in a state in which you would rather the system did not suspend, you can request that the suspension does not happen.

The PowerBroadcast event is not generated when the form is used as an ActiveX control pasted into another form.

Note: System power management may be different on each operating system and hardware platform. For example, the timing of this event may be different in each environment. Therefore you are advised only to use this event once you have a good understanding of the power management on your target platforms.

Refer to the operating system and hardware manuals for details of power management.

The topic "Power Management" under "Platform SDK" in the MSDN (Microsoft Developer Network) contains details of the events.

Used in controls:

None.

Used in objects:

Form

Parameters:

1. VT_I2 - Event S9(4) COMP-5

2. VT_I4 - Data S9(9) COMP-5

3. VT_BOOL - Grant S9(4) COMP-5

Description of parameters:

  1. Event:

    The value defines the event generated by the system. Possible values are:

    • POW-PBT-APMBATTERYLOW: Battery power is low.

    • POW-PBT-APMOEMEVENT: OEM-defined event occurred.

    • POW-PBT-APMPOWERSTATUSCHANGE: Power status has changed.

    • POW-PBT-APMQUERYSUSPEND: Request for permission to suspend.

    • POW-PBT-APMQUERYSUSPENDFAILED: Suspension request denied.

    • POW-PBT-APMRESUMEAUTOMATIC: Operation resuming automatically after event.

    • POW-PBT-APMRESUMECRITICAL: Operation resuming after critical suspension.

    • POW-PBT-APMRESUMESUSPEND: Operation resuming after suspension.

    • POW-PBT-APMSUSPEND: System is suspending operation.

  2. Data:

    Data generated by the event.

  3. Grant:

    Specify whether you accept the request to suspend.

    It is effective only when the value of Event is

    POW-PBT-APMQUERYSUSPEND.

    If you permit the suspend action, set the value to True.

    If not, set the value to False.

    Use the following constants to set to the value.

    POW-TRUE : True

    POW-FALSE: False

    If the Grant parameter is omitted, PowerCOBOL assumes the value is True.