TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Frank Sexton
from: Will Morgan
date: 1995-09-02 00:23:22
subject: DOS4GW from Watcom problem

MB> The DOS4GW extender works by using the LE-format EXE, similar to the
 MB> NE-format originally defined for old Windows and OS/2 1.x, in order
 MB> make DOS load the "real mode" stub.  OS/2 looks at that EXE and
 MB> thinks, "Oh, wow, a native OS/2 program that I don't
understand!" and
 MB> tries to handle it accordingly.  To override this behavior, just
 FS> force OS/2 to invoke COMMAND.COM first:

 MB> COMMAND /C EXTPROG.EXE

 FS> Thanks for this explanation Mike.  I tried the above method
 FS> on my own WC 10.5 DOS4GW app from an OS/2 (Warp) command
 FS> line and it didn't work.  However, if I run it from a Batch
 FS> file (bat) from an OS/2 session it does work.  Running from
 FS> a DOS VDM always works just fine.  Is there anything that I
 FS> can do to prevent me from having to run it via a batch file
 FS> from an OS/2 window?  Something simple that is (smile). I'm
 FS> a real amateur at this.

I was the one who posted the original message and I found out a few
things afterward (as usual  - you always find answers/solutions
*AFTER* the message packet is sent off!). I found out why my friend
COULDN'T run my DOS4GW program and I could. Apparently, Watcom
puts a file named DOS4GW.EXE somewhere in your path path (I used a
file finding program and I had two DIFFERENT versions of the same
program. One was in the Watcom\bin directory (in my path) and the
other was in my DOS 6.22 \DOS directory (also in my path). When I
changed those two filenames to DOS4GW.TMP for a test, I got the
same error that my friend was getting (since his system didn't
have the DOS4GW.EXE). I also found out, that in order to run the
program created with the DOS4GW WCL386 DOS command line compiler
from a program template, I had to put c:\dos\DOS4GW.EXE in the
"Path and filename" field on the first page of the settings and
the path/filename of my DOS4GW program executable in the "Optional
Parameters" field. When I did that, the program ran just great
from a program template/object. Now that I'm releasing a few
versions of a program that I compiled with the DOS4GW compiler,
I simply put DOS4GW.EXE into the archives that I release. This
is not 100% the same as you posted, but I'm a beginner with all
this, too, so it might give you an idea of what's going on.

... Oh GEE! What a useful bit of programming! -Crow T. Robot

--- PPoint 1.92
* Origin: SNAKE-BYTE INCORPORATED uses OS/2 Warp! (1:3819/128.103)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 3819/128 157 3615/50 396/1 270/101 105/103 42 712/515 711/808 809 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™.