ISRES - Routines to determine if a program is already resident
--------------------------------------------------------------
Brian Foley
TurboPower Software
1/90
Version 1.0
Released to the public domain
Overview
----------------------------------------------------------------------------
The main purpose of ISRES is to provide a facility for non-resident programs
similar to TPTSR/OPTSR's standard module interface. That is, it provides
routines that allow a program to determine if it is being loaded for a
second time. The typical use for ISRES is in a program that allows other
programs to be executed, and needs to prevent the user from loading a second
copy of the same program. The supplied example program, RESTEST, illustrates
the use of ISRES in such a case.
A secondary use of ISRES is to provide a communication channel between
programs. When you call ISRES's Install routine, you can specify a pointer
to a data structure or routine that might be of interest to other programs.
This hook can be used to allow other programs access to a program's data, by
passing Install the address of that data. Or it can be used to allow other
programs to call a special routine, by passing Install the address of that
routine.
When using the hook for the latter purpose, keep in mind that the routine in
question must either 1) be compiled FAR or 2) be of type interrupt. If the
routine is *not* of type interrupt, it cannot refer to any data stored in
the data segment unless it sets up the DS register first. Practically
speaking, this means that the routine must be written in assembly language.
If the procedure *is* of type interrupt, the DS register will be set up
automatically, so the routine may refer to global data.
If you plan
|