This function installs an application procedure into a specified hook chain.
#define INCL_WINHOOKS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ HMQ hmq; /* Queue identity. */ LONG lHookType; /* Hook-chain type. */ PFN pHookProc; /* Address of the application hook procedure. */ HMODULE Module; /* Resource identity. */ BOOL rc; /* Success indicator. */ rc = WinSetHook(hab, hmq, lHookType, pHookProc, Module);