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

CreateProcess vs. ShellExecute

104 views
Skip to first unread message

Kevin Dwan

unread,
Sep 17, 1998, 3:00:00 AM9/17/98
to
Is it preferable to use CreateProcess instead of ShellExecute to execute
an .EXE and its .DLL's on Windows 95/NT machines, using D4?


DNU

unread,
Sep 18, 1998, 3:00:00 AM9/18/98
to
in general, the short answer is no.

if you don't need the control that CreateProcess() provides, you can use
ShellExecute()
theoratically speaking CreateProcess() can be slightly faster, but
practically you can use either, again, given that you don't need the
specific features provided by each functions. checkout the win32 api docs
for details.

--
http://www.chami.com/tips/delphi/


Kevin Dwan wrote in message <3601A870...@blueberry.com>...

Troels S Eriksen

unread,
Sep 18, 1998, 3:00:00 AM9/18/98
to
Hi

>Is it preferable to use CreateProcess instead of ShellExecute ..

I would say that it depends on the degree of control you want. If you just
need "fire-and-forget" usability, I would say that ShellExecute() was to be
prefered since it's easier to use (and does return a handle if later
needed) - but if you want to have full control (f.x. launching a hidden dos
app etc) better use CreateProcess()

Troels S Eriksen
http://home8.inet.tele.dk/tserikse/
---------------------------
When armagedon comes, head for the hills.
It won't help, but the view is better.


Peter Below

unread,
Sep 18, 1998, 3:00:00 AM9/18/98
to
> Is it preferable to use CreateProcess instead of ShellExecute to execute
> an .EXE and its .DLL's on Windows 95/NT machines, using D4?

Kevin,

Microsoft encourages the use of ShellExecute and ShellExecuteEx over
CreateProcess. The former functions allow system policies to be used to
put restrictions on what applications a user may execute,

Peter Below (TeamB) 10011...@compuserve.com)
No replies in private e-mail, please, unless explicitely requested!


0 new messages