Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!ncrlnk!ncrcae!PEDEV!rogerson From: rogerson@PEDEV.Columbia.NCR.COM (Dale Rogerson) Newsgroups: comp.windows.ms Subject: Re: How to start up Windows with an application ? Message-ID: <2840@PEDEV.Columbia.NCR.COM> Date: 5 Dec 89 18:06:10 GMT References: <5443@ncrcae.Columbia.NCR.COM> Reply-To: rogerson@PEDEV.Columbia.NCR.COM (Dale Rogerson) Distribution: na Organization: NCR Corp., Engineering & Manufacturing - Columbia, SC Lines: 23 In article <5443@ncrcae.Columbia.NCR.COM> heath@ncrcae.Columbia.NCR.COM (Robert Heath) writes: >I recently got a copy of Excel. I noticed that when one starts Excel from >DOS, it automatically starts up Windows. Any of the Win Apps I generate with >the SDK always complain that they need to run under Windows when started up >from DOS, then they exit. How does one make a Win App that automatically >kicks off Windows ? If you examine the DEF file for most Windows programs you will see a line like: STUB 'WINSTUB.EXE'. This line tells the linker to add the program WINSTUB.EXE to the beginning of the old-EXE file header. Since DOS only knows about the old style EXE header this program will be run. In the case of WINSTUB.EXE it just displays the message telling you that you must load Windows first. If you want to have Windows automatically started you will need to replace WINSTUB.EXE with your own stub program which would start Windows for you. For those you might be interested, programs which run under both OS/2 and DOS use the same idea with the STUB program being the DOS version. Hope this helps. -----Dale Rogerson----