DELPHI USAGE
------------
Delphi programs can activate previous instance windows by calling
the routine in the PREVINST.DLL library, or by using the DCU file
that is supplied with the package (to link directly into executables).
Note that the only code differences between using the DLL and using
the DCU are in the form of the declarations in your application.  Note
also, that the DCU name is PRVINST which is one character different
from the DLL name PREVINST.  This is intentional, as PREVINST.DLL
actually used PRVINST.DCU (unit was linked into the DLL).  In the info
below, remember that you must declare the procedure in one of the two
methods, but NOT both.  The form of the call, usage techniques, etc.,
are identical, regardless of whether you use the DLL or the DCU.  My
personal preference is to use the DCU, as it only adds 848 bytes to
your application's EXE file when linked in.  The 848 byte size applies
to the registered version, of course, and is somewhat larger for the
non-registered version (about 1K bytes).

     Declaration:
       Using DLL:     procedure gotoprevinst;far;external 'previnst';
       Using DCU:     prvinst {put in your application's USES clause}

     Call:            gotoprevinst

     Usage:           if hprevinst<>0 then
                         gotoprevinst
                      else
                         begin
                            Application.CreateForm(TForm1, Form1);
                            Application.Run;
                         end;

     Notes:           The code that checks for a previous instance should
                      be among the first executable lines of code in your
                      programs.  Typically, as indicated by the usage
                      example above, this code is placed in your project
                      source.  When structured in this fashion, the program
                      "end/exit/terminate" is implicit, after returning
                      from the call to "gotoprevinst" the program ends.
                      When using the DCU, make sure the DCU file is located
                      somewhere in the Delphi search path when linked.
                      Typically, this is the application directory or the
                      c:\delphi\lib subdirectory.


VISUAL BASIC USAGE
------------------
Visual Basic can only activate previous instance windows by calling
the routine in the PREVINST.DLL library.

     Declaration:     Declare Sub gotoprevinst Lib "previnst.dll" ()

     Call:            gotoprevinst

     Usage:           If app.PrevInstance Then
                         gotoprevinst
                         End
                      End If

     Notes:           The code that checks for a previous instance should
                      be among the first executable lines of code in your
                      programs.  Also, don't forget to terminate/end an
                      application instance when a previous instance has
                      been found and activated.  The gotoprevinst procedure
                      only finds and activates a previous instance window.
                      It does NOT end the calling instance for you.


VISUAL C++ USAGE, AND OTHERS
----------------------------
Visual C++, and other Windows-based programming languages can only
activate previous instance windows by calling the routine in the
PREVINST.DLL library.

     The PREVINST.DLL was produced with Delphi, and according to all
     documentation it is callable by any Windows-based programming
     language that understands DLLs.  Unfortunately, there is not
     any mention of the syntax for calling the DLL from VC++, etc.
     Given that, and not having a VC++ compiler on-hand, it is not
     currently possible to give the exact syntax of the DLL's external
     declaration, call, or usage, as it was possible to do for Delphi
     and Visual Basic above.  However, it is hoped that VC++ programmers
     and other language programmers can "glean" the information that
     they need from the VB and Delphi documentation above.  In addition,
     if it helps, PREVINST.DLL has only one routine/entry point that
     you can access, namely "gotoprevinst".  The routine "gotoprevinst"
     is a procedure (NOT a function), takes no parameters, and returns
     no values.  Step-wise, here are the things you must implement in the
     syntax of your programming language:

     - declare the external procedure "gotoprevinst" in the DLL 
       PREVINST.DLL (again, a procedure with no parameters, and
       no return value) in the syntax of your programming language

     - using whatever means your language provides, determine if a
       previous application instance is executing

     - if there is a previous instance executing, then make the call
       to "gotoprevinst" to activate it and then terminate execution

     Although it is certainly prefered to have the exact syntax "nailed
     down", it really should not be a big-deal to implement the DLL
     routines in the syntax of your programming language.  After all,
     there are no parameters or return values to cause compatibility
     problems.