home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource Library: Graphics
/
graphics-16000.iso
/
msdos
/
viewers
/
grabsc11
/
tsr.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-09-14
|
1KB
|
20 lines
/******************************************************************************
* Simple routines to set up a program as TSR, by hooking the keyboard *
* interrupt locally and testing the scancodes against given scancode hot key. *
* This module was tested in TINY model only. *
* *
* Written By Gershon Elber, June 1989 *
******************************************************************************/
/* Scan code is specified as follows: */
/* highbyte - scan code of keyboard key (as given to interrupt 9). */
/* lowbyte - shift mask: Right shift - bit 1, Left shift - bit 2, */
/* Ctl - bit2, Atl - bit 3. */
/* Func is the function to execute as the TSR process. */
/* Returns: 0 if O.k., 1 if already installed, 2 install failed. */
int HookKbdInterrupt(void (*Func)(), unsigned int ScanCode);
/* If HookKbdInterrupt returns 1 (already installed), _InstalledTSRSegment */
/* is set to the installed version segment, so variables in the installed */
/* version may be changed (remember offset are the same!). */
extern unsigned int InstalledTSRSegment;