Jump to content

ProgramListExitHook

From EDM2

This hook chain is called every time a program-list call or initialization file call is invoked by an application. It is called before the call is run.

Syntax

ProgramListExitHook(hab, pProfileHookParams);

Parameters

hab (HAB) - input
Anchor block handle.
pProfileHookParams (PRFHOOKPARMS) - input
Profile hook parameters. These identify the call and give its parameters and return code. See PRFHOOKPARMS.
rc (BOOL) - returns
Process indicator.
TRUE: The next hook in the chain is not called.
FALSE: The next hook in the chain is called.

Returns

rc (BOOL) - returns
Process indicator.
TRUE: The next hook in the chain is not called.
FALSE: The next hook in the chain is called.

Remarks

This hook, together with its counterpart, ProgramListEntryHook, lets applications or system components:

  1. Implement the initialization file and program list partially, whilst retaining the existing implementation. For example, read-only requests could be satisfied from memory, rather than from disk.
  2. Redirect initialization-file operations on a particular group to an alternative (opened) profile. For example, in a multiple-user environment, a LAN program might choose to redirect profile groups that are hardware-dependent, rather than user-dependent, to the system-initialization file.

Example Code

#define INCL_FnDrEnPt
#include <os2.h>

HAB            hab;                /* Anchor block handle. */
PRFHOOKPARMS   pProfileHookParams; /* Profile hook parameters. */
BOOL           rc;                 /* Process indicator. */

rc = ProgramListExitHook(hab, pProfileHookParams);