The flush buffer hook allows applications to save data before the system reboots. The following code shows the syntax for a flush buffer hook function:

BOOL EXPENTRY FlushBufHook (HAB  hab);

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 running, these subsystems might not be fully available because they might be partially shutdown.

The hab parameter is the application anchor block.

When this function returns TRUE, the function completed successfully.

When this function returns FALSE, an error occurred.


[Back] [Next]