Starting and waiting for the process ends Wonder Ocean We often need to wait after starting a process after the end will continue. It provides a function called WAIT here, which will do the above features for you. The idea of implementation is to wait after the process is started, since the process is a resource, and the resource handle can be used as a core amount in Win32. You can use WaitForsingleObject Wait the core amount to change to a signal state. For the process, when the status is changed to have a signal at the end of the process. A separate thread is used in this example to start the process and wait for the end.