![]() |
|
QA: How can I start another program and wait until it will be finished?
By Vassili Philippov, August 08, 2001.
QuestionI need to start another executable file and wait until it will be finished. How can I do it? AnswerUse CreateProcess function to start another program and WaitForSingleObject function to wait until the program will be finished. You could also use RunExecutable and RunExecutableAndWait function of STUtil library that hides details. Note: Pocket PC doesn't support local file names. All file names should contain full path like _T("\\sindows\\CreateAssetFile.exe"). Source codeHere is a sample code that starts CreateAssetFile.exe program and waits until it will be finished: The same functionality implemented using STUtil library: DiscussDiscuss this article. Here you can write your comments and read comments of other developers. |
|||||||||||||||||||||