Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CreateProcess vs WinExec

0 views
Skip to first unread message

Erik E. Bengtson

unread,
Dec 2, 1998, 3:00:00 AM12/2/98
to
Any ideas ?

I have a Delphi Application that I am trying to launch another
Windows application. I need to run it modal. That is, I need to
launch it, and wait for it to exit before I continue processing. I used
CreateProcess to launch it, but it doesn't seem to be working properly.
The application starts, but immediately exits. However when I use
WinExec, the program seems to launch successfully. However I cannot
use WinExec, because with the exception of a convoluted method, I
cannot get a handle to the launched process so that I can do a
WaitOnSingleObject.
However the strange thing is that WinExec supposedly just calls
CreateProcess with default parameters. So If this is true, and I can
determine
what WinExec Passes to CreateProcess, then I can use CreateProcess
directly.

Any ideas are much appreciated.


Erik


Jason Wallace

unread,
Dec 2, 1998, 3:00:00 AM12/2/98
to
Erik E. Bengtson wrote in message <744p5n$gol$1...@winter.news.rcn.net>...


Not from anything I've ever heard... -- Look in the help files: It
clearly states "do not use winexec, use createprocess instead" -- However,
CreateProcess is easy to use... -- If you need an example (one that works
like WinExec), let me know... (I called my function 'RunAProgram', with
'what to run', and 'how to show it')

0 new messages