[comp.windows.ms] WinExec

dzoey@terminus.umd.edu (Joe I. Herman) (08/21/90)

Hello, I have an App which calls winexec() to execute a DOS task.  The
problem I'm running into is that I don't know when the DOS task ends.
It seems winexec returns immediately (on a 386) and doesn't seem to provide
a handle to the new process.  I don't need to communicate with
the DOS task, I just need to know when it finishes.  Any help or ideas
would be appreciated.

		       Adthanksvance,
			Joe Herman

dzoey@terminus.umd.edu
--
"Everything is wonderful until you know something about it."

gt3070b@prism.gatech.EDU (Jeff Watkins) (08/22/90)

Well, you could scan all the windows to find the caption of the application.
Use GetWindowText( HWND hWnd, LPSTR lpCaption, int nMaxCount ).  This way
you will have the window handle of the application, and can poll to find out
if it still exists.

hope that helps...

jeff

-- 
Jeff Watkins                       gt3070b@prism.gatech.edu
Convergent Media Systems           (404) 315-0105 voice  (404) 315-0231 data
"I speak for no-one. AND NO-ONE SPEAKS FOR ME... oh, yes, _dear_...I gotta go..."

rtdickerson@lescsse.jsc.nasa.gov (04/08/91)

I am writing an MS-Windows app. and at one point, I have to perform
a system to a non-windows support program.  In the text interface, a
simple system() was all that was needed.  Now that I've converted to
a windows interface, all I get when i WinExec is the "unknown .EXE type"
error.  The system() program isn't included in the libraries that the
STK built.

? : Is there a trick I'm missing or do I have to extract the system()
    call from the regular lib. and link it in as an obj?

    Any help would be appreciated.

--
Russell Dickerson          Internet: dickerson@vf.jsc.nasa.gov
Lockheed (LESC), A22       ===================================
SSE System Project         X Windows & Motif on Apollo/PC/Mac
Space Station Freedom      Phone +1 713 283 5193