WaitForSingleObject

WaitForSingleObject(m_hObject, dwTimeout) == WAIT_OBJECT_0   //在dwTimeout时间段内,如果m_hObject被激活,就返回WAIT_OBJECT_0
                                                                                                      否则返回
WaitForSingleObject(m_hObject, 0) == WAIT_OBJECT_0           //就是探测

WaitForSingleObject(m_hObject,INFINITE)                     //就是直到m_hObject被激活,否则一直等待不返回 

你可能感兴趣的:(object)