Jump to content

FlushBufHook: Difference between revisions

From EDM2
Created page with "This function is specific to OS/2 Version 2.1 or higher. This hook allows applications to save data before the system reboots. ==Syntax== FlushBufHook(hab); ==Parameters== ;''hab'' (HAB) - input: Application anchor block. ==Returns== ;''rc'' (BOOL) - returns: Return code. :TRUE: Successful completion. :FALSE: An error occurred. ==Remarks== This hook is called to notify applications that the system is rebooting due to a Ctrl+Alt+Del sequence being entered. It enables..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 4: Line 4:


==Syntax==
==Syntax==
FlushBufHook(hab);
FlushBufHook(hab)


==Parameters==
==Parameters==
Line 17: Line 17:
This hook is called to notify applications that the system is rebooting due to a Ctrl+Alt+Del sequence being entered. It enables applications to write existing information to the hardfile immediately, avoiding loss of data before the system reboots.
This hook is called to notify applications that the system is rebooting due to a Ctrl+Alt+Del sequence being entered. It enables applications to write existing information to the hardfile immediately, avoiding loss of data before the system reboots.


;'''Note:''' Do not use any of the Win or Gpi functions inside the hook routine. At the point in time that the hook routine is executing, these sub-systems may not be fully available because they might be partially shutdown.
;Note: Do not use any of the Win or Gpi functions inside the hook routine. At the point in time that the hook routine is executing, these sub-systems may not be fully available because they might be partially shutdown.


==Related Functions==
==Related Functions==

Latest revision as of 17:24, 26 October 2025

This function is specific to OS/2 Version 2.1 or higher.

This hook allows applications to save data before the system reboots.

Syntax

FlushBufHook(hab)

Parameters

hab (HAB) - input
Application anchor block.

Returns

rc (BOOL) - returns
Return code.
TRUE: Successful completion.
FALSE: An error occurred.

Remarks

This hook is called to notify applications that the system is rebooting due to a Ctrl+Alt+Del sequence being entered. It enables applications to write existing information to the hardfile immediately, avoiding loss of data before the system reboots.

Note
Do not use any of the Win or Gpi functions inside the hook routine. At the point in time that the hook routine is executing, these sub-systems may not be fully available because they might be partially shutdown.

Related Functions

Example Code

#define INCL_WINHOOKS /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HAB  hab; /* Application anchor block. */
BOOL rc;  /* Return code. */

rc = FlushBufHook(hab);