Can one executable run under Dos and Windows?

Can one executable run under Dos and Windows?

Post by Willie Hutt » Fri, 06 Aug 1993 08:17:52



I'm starting to learn programming in Windows.  I want to write a program
in BC++ that will run under Windows or DOS.  I know that there is a stub
in a Windows program that normally displays "This program needs Windows 3.1"
or something like that.  Also, can the Dos part of the program utilize
VROOM for overlays?  I want to put the code into a DLL for the Windows part
and then put it in an overlay for the Dos part.

Thanks,
  Willie Hutton

-----------------------------------------------------------------------------

 
 
 

Can one executable run under Dos and Windows?

Post by Ed McCrea » Fri, 06 Aug 1993 22:59:21


WH> I'm starting to learn programming in Windows.  I want to write a program
WH> in BC++ that will run under Windows or DOS.  I know that there is a stub
WH> in a Windows program that normally displays "This program needs Windows 3.1"
WH> or something like that.  Also, can the Dos part of the program utilize
WH> VROOM for overlays?  I want to put the code into a DLL for the Windows part
WH> and then put it in an overlay for the Dos part.

The only thing I've seen done is have two programs, one DOS and one
Windows, bound into one exe file. The appropriate one is run based upon
the environment.  Setup.exe from MS is like this.  Exactly how you
go about doing this, I'm not sure.

--

"Question with boldness even the existence of a God, because, if there be
one, he must more approve of the homage of reason than that of blind faith."
Thomas Jefferson

 
 
 

Can one executable run under Dos and Windows?

Post by Paul Benne » Sat, 07 Aug 1993 00:00:47




>WH> I'm starting to learn programming in Windows.  I want to write a program
>WH> in BC++ that will run under Windows or DOS.  I know that there is a stub
>WH> in a Windows program that normally displays "This program needs Windows 3.1"
>WH> or something like that.  Also, can the Dos part of the program utilize
>WH> VROOM for overlays?  I want to put the code into a DLL for the Windows part
>WH> and then put it in an overlay for the Dos part.

>The only thing I've seen done is have two programs, one DOS and one
>Windows, bound into one exe file. The appropriate one is run based upon
>the environment.  Setup.exe from MS is like this.  Exactly how you
>go about doing this, I'm not sure.

When you link your Windows program, put 'STUB MYPROG.EXE' in the .DEF
file, and 'MYPROG.EXE' will be linked in as the stub to be run when
the Windows program is run from DOS.  Note that your DOS program must
be less than 64K in size.  Also be aware that it is the DOS program
which is run if you try to run the program from a Windows DOS box.

I use this technique to fire up Windows (if it is found) if my Windows
apps are run from outside Windows - a behaviour I find a *lot* more
friendly than the standard "need Windows" demand.

pab.

--
Paul Bennett                                                     _  onewhe

Under disguise at BT's LEC until September                      /|\ twowhe

 
 
 

Can one executable run under Dos and Windows?

Post by Alan A » Sat, 07 Aug 1993 00:25:29


Zinc designer by zinc inc allows you to have one exe for a bunch of diff
env
dos,win,motif,os2 etc .... it is really good to use too.. i luv it

call 801-785-8900 for more info..

 
 
 

Can one executable run under Dos and Windows?

Post by James Youngm » Sat, 07 Aug 1993 22:15:44


[ ... about STUB... ]

>I use this technique to fire up Windows (if it is found) if my Windows
>apps are run from outside Windows - a behaviour I find a *lot* more
>friendly than the standard "need Windows" demand.

>pab.

>--
>Paul Bennett                                                     _  onewhe

>Under disguise at BT's LEC until September                      /|\ twowhe


Don't you get a problem if it's run in a DOS box ?
James.