Category : Windows 3.X Files
Archive   : GLUE.ZIP
Filename : GLUE.DOC

Output of file : GLUE.DOC contained in archive : GLUE.ZIP

GLUE v. 1.0 - Glues DOS programs to Windows programs.

Copyright 1991, D. J. Murdoch


GLUE dosprog[.exe] winprog[.exe] combined[.exe]

will glue dosprog.exe and winprog.exe together into combined.exe.


Windows applications use a new segmented .EXE format. This format
allows for a "stub", a DOS program which will be run under DOS, as
well as the Windows program which will run in Windows. Usually
the stub just prints a message like "This program requires
Microsoft Windows." However, there are no restrictions on it: any
DOS .EXE format program can serve as a stub.

Turbo Pascal for Windows doesn't let you choose an alternate stub,
so I wrote the GLUE utility to change stubs. It should let you
put just about any DOS program onto just about any Windows
program, but this is the first release, so it probably doesn't.
Please report bugs to me at one of the addresses below.

I've tested it with Turbo Pascal programs that contain overlays or
debugging information, and it worked; it also works on programs
that have been compressed with PKLITE (but PKLITE version 1.03
will refuse to compress a combined program).

It'll even let you glue most .COM format executables to a Windows
program; it does it by converting them to .EXE format first. (One
kind of .COM won't work: one that relies on the fact that the DOS
loader puts a zero word on the stack when it loads a .COM program.
Hardly any do though.)

There's a chance that GLUE will even work with OS/2 executables
(which have a very similar format to Windows executables) but I
haven't tested it on any so I don't know for sure.

Why bother?

Some useful things you might want to do with GLUE:

- Put a generic stub onto a Windows program that starts up
Windows executing the Windows program.

- Put a generic Windows program onto a DOS program, that gives
it an icon, and handles standard file handles in some reasonable

- Write two versions of a program and glue them together, so
that the user can run the program in either environment and get
similar behaviour. For example, I glued TURBO.EXE to TPW.EXE, to
got one giant program that was TP 6.0 if I ran it under DOS and
TPW 1.0 if I ran it under Windows.


GLUE is not public domain. It is, however, freely distributable
subject to the following restrictions:

You must make no changes to it (other than GLUEing it to a Windows
program :-), and must make no changes to this documentation.

You may not sell it at a cost of more than $10 without prior
permission from me.

Source code is available from me at a cost of $25 (Canadian or
U.S. funds).

D.J. Murdoch
79 John St. W.
Waterloo, Ontario, Canada
N2L 1B7

[email protected] (Internet)
DJ Murdoch at Fidonet node 1:221/177.40
71631,122 on Compuserve