Archived

This topic is now archived and is closed to further replies.

ShellExecute()

This topic is 5017 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Try this. Scroll down about halfway.


EDIT: sorry, that only works with CreateProcess. I don't think you can do this with ShellExecute because the only thing you get back from the function is a success\error code. You would have to do something hacky like calling FindWindow and seeing if the window for the application you launched still exists.


[edited by - CodeMunkie on March 18, 2004 1:43:03 PM]

Share this post


Link to post
Share on other sites
Try using ShellExecuteEx() instead. The hProcess member of the structure after the function call should contain a handle that you can wait on (if the result of the call results in an actual process being starting).

Share this post


Link to post
Share on other sites