switch(WaitForSingleObject( hEvet, tmOutTick )) //等待时间 最长超时tmOutTick毫秒 { case(WAIT_OBJECT_0): //The state of the specified object is signaled. { //事件触发 添加代码 // break; } case(WAIT_TIMEOUT):// The time-out interval elapsed, and the object's state is nonsignaled. { //超时 break; } case( WAIT_FAILED ):// To get extended error information, call GetLastError. { DWORD dwErr = GetLastError(); ASSERT(0); } }
switch(WaitForSingleObject( hEvet, tmOutTick )) //等待时间 最长超时tmOutTick毫秒
{
case(WAIT_OBJECT_0): //The state of the specified object is signaled.
{
//事件触发 添加代码
//
break;
}
case(WAIT_TIMEOUT):// The time-out interval elapsed, and the object's state is nonsignaled.
{
//超时
break;
}
case( WAIT_FAILED ):// To get extended error information, call GetLastError.
{
DWORD dwErr = GetLastError();
ASSERT(0);
}
}