How do I start a process?
Cheers
Printable View
How do I start a process?
Cheers
See CreateProcess function in Msdn.
Thanks
You can also use the CreateProcessEx function..
MS preferes developers to use
ShellExecute / ShellExecuteEx
The advantage is, that you can make use of AppPaths registration and similar services of the Shell.
regards
HoM
Where do you find it documented that MS prefer this?
I remember this from several documents MS released about their "LOGO" programms. The last document like this I read when "Win2k Logo" was en vogue.
:-) I admit this is long time back. But ... some things do not change.
This ( http://www.microsoft.com/msj/0899/logo/logo.aspx ) is the only reference I found having a quick view into the internet.
I think you can do almost anything with ShellExecute(Ex), one can do with CreateProcess, with the benefit of some extra services (ShellExecute does FindExecutable(), resolves AppPaths registrations, sets extra search of the AppPaths registration, works with documents instead of .exe ...).
Maybe one thing it can not: I think the "alternate search path" for dlls is not supported ...
regards
HoM
This FAQ page might be helpful for you.Quote:
Originally Posted by Icyculyr
http://www.codeguru.com/forum/showthread.php?t=302501
Bharani
I started using CreateProcess so long ago, ShellExecuteEx didn't exist at the time. I've been using cp ever since, but it looks like ShellExecuteEx is a good alternative. Thanks.Quote:
Originally Posted by HoM
One very useful thing that ShellExecute does, in the Vista era, is prompt the user for elevation if necessary.
Kelly