OnLogOffQuery picture event


Declaration


ENTRY OnLogOffQuery (IN INT _logOffType, BOOL _bLogOff)
 ; script actions
END OnLogOffQuery


Parameters
_logOffTypeRequired input parameter of INT type. Origin of the logoff operation.

_bLogOff

Required input-output parameter of BOOL type.
Description

The event is generated by the HI process when attempting to log off a user. The event handler must set the value of the input/output parameter _bLogOff to respond to the action. If the parameter is set to:

  • @TRUE - the LogOff operation will be completed
  • @FALSE - the LogOff operation will be rejected

The input parameter _logOffType defines the origin (source) of the logoff operation and can have the following values:

  • 0 - manual logoff - from the HI menu
  • 1 - automatic logoff - if the user has automatic logoff enabled after a certain period of inactivity
  • 2 - logoff initiated by %HI_LogOut() call
Example
; evet handler: Attempt to logoff from the HI
ENTRY OnLogOffQuery  (IN INT _logOffType, BOOL _bLogOut)
  _bLogOff := @FALSE ; refusing to logoff
END OnLogOffQuery

A HI process with an OnLogOffQuery event handler defined in this way cannot be logged off.

Note

The OnLogOffQuery event should be defined in only one of the currently opened pictures in HI. If more than one such event is defined, none of them will be executed, and HI will be logged off in the standard manner—that is, as if no OnLogOffQuery event had been defined.

The presence of multiple pictures with a defined OnLogOffQuery event handler is indicated to the user via an error dialog.

Napíšte komentár