Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!sgi!cdp!jeff From: jeff@cdp.UUCP Newsgroups: comp.windows.ms.programmer Subject: Re: Windows, Exec, Subprogram Message-ID: <1266500011@cdp> Date: 16 Apr 91 01:42:00 GMT References: <1997375683@1991Apr10.170742.799@bellcore.be> Lines: 22 Nf-ID: #R:1991Apr10.170742.799@bellcore.be:1997375683:cdp:1266500011:000:896 Nf-From: cdp.UUCP!jeff Apr 15 18:42:00 1991 >so. I suppose that Jeff's claim that WinExec just passes back the >return value of LoadModule would be easy to check with a debugger, but >it still leaves open the question of what it does with a non-Windows >app (which LoadModule won't take) and what the return value is for >that. Does anyone know? Sidney, Yes, you can easily verify that WinExec() returns the value from LoadModule(). With a little more time spent in the debugger, you can learn how WinExec() handles a DOS application: WinExec() calls LoadModule() twice for a DOS application. The first invocation is for the "grabber" (see the SYSTEM.INI file). The second invocation is for WINOA???.MOD (WINOA386.MOD for enhanced mode). [I've only done this "debugging" in enhanced mode.] The process/task running WINOA seems to be the one that "controls" the DOS application. Jeff Dean jeff@cdp.igc.org uunet!pyramid!cdp!jeff