|
导航:[首页]->[windows]->[MsgWaitForMultipleObjectsEx发送垃圾消息的问题]
####http://msdn.microsoft.com/en-us/library/windows/desktop/ms684245(v=vs.85).aspx New input of the type specified in the dwWakeMask parameter is available in the thread’s input queue. Functions such as PeekMessage, GetMessage, GetQueueStatus, and WaitMessage mark messages in the queue as old messages. Therefore, after you call one of these functions, a subsequent call to MsgWaitForMultipleObjectsEx will not return until new input of the specified type arrives. This value is also returned upon the occurrence of a system event that requires the thread’s action, such as foreground activation. Therefore, MsgWaitForMultipleObjectsEx can return even though no appropriate input is available and even if dwWakeMask is set to 0. If this occurs, call GetMessage or PeekMessage to process the system event before trying the call to MsgWaitForMultipleObjectsEx again. 当返回WAIT_OBJECT_0 + nCount时,有可能并没有任何消息,而且实际测试中可能很频繁,所以注意这一点,避免因为它导致过多的消耗 另一个是 分类浏览[windows] |