We are using WinExec(exename,0) to execute our external program. Our external program writes the result into some file. we need to access that file immediately after the WinExec call has been made.
Control is coming back to caller program immediately even though the external program is still running.
Is there any system call which waits for the completion of the external program ?