因此,我实现了WaitForSingleObject,以避免在cmd请求用户输入或仅仅出于其他原因挂起的情况下挂起。当我尝试执行powershell命令时,问题就出现了,因为它看起来对WaitForSingleObject没有响应,而且我总是达到超时。CloseHandle(hWriteStdout); begin WaitTimeout:= WaitForSingleObject但如果我打电话说:
powershell dir
我正在使用带有waitForAll参数= true的WaitForMultipleObject函数。这里使用了handle对象的std::vector来等待。如果此函数超时,那么我如何确定等待哪个处理程序超时?{
//get the event that causes the wait to time out(assume that only one object is timed out.others are success