TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Steven Pasztor
from: david begley
date: 1993-10-04 12:45:08
subject: Windoze and DOS

On Sep 30 20:07, Steven Pasztor of 3:632/103.123 wrote:

 SP> I've got BORLAND C++ v2.0 and was wondering if it's possible to write a 
 SP> program which will work under either Windoze or DOS...

If I remember correctly, Windows (like OS/2) uses a "stub"
programme that enables the .EXE binary to run under DOS and display the
familiar:

                "This program requires Microsoft Windows."

To create a binary (.EXE) that will run under both DOS and Windows, all you
need do is replace the standard "stub" programme with a full DOS
version of the application.  Effectively:

        Normal Windows Linkage              New Windows Linkage

        +-------------+                     +-------------+
        | EXE Header  |                     | EXE Header  |
        +-------------+                     +-------------+
        | STUB.EXE    |                     | DOS App     |
        +-------------+                     +-------------+
        | Windows App |                     | Windows App |
        +-------------+                     +-------------+

Then, when you run the EXE under DOS, "DOS App" will run, whilst
if you run the EXE under Windows, "Windows App" will run.  How do
you achieve this?  Lookup the "STUB" keyword for your Windows
application's DEF (linkage definition) file.


    - dave
    david{at}harpo.nepean.uws.edu.au

---
* Origin: [ epicentre of the universe -- sydney australia ] (3:711/934.4)
SEEN-BY: 711/809 934
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.