Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

C++ threads

Status
Not open for further replies.

Striker

Computer
Joined
May 23, 2001
Messages
143
Location
US
I have a piece of C++ code that I am using to execute an external program via ShellExecute on a list of files contained in a ListBox object. The external program opens another window and begins execution, however, before the external program is completed, the parent process goes to the next file in the ListBox and begins the external program again. This is Ok if I only need to run it on a few files, but when I have 100 or more files in the list, I end up with 100 or more individual instances of the external program running at once, which of course brings my system to a screeching halt. I need to know if there is a way to pause execution of the parent process until the child process is completed. The external program reads a file and outputs another file based on the input file data, and I cannot modify the source code of the external program.

Any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top