ShellExecute()
The windows api has a ShellExecute() function.
Is there a way to determine if the program called by ShellExecute() is finished?
thanks
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]
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]
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).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement