Extra safeguards against things that can happen during the win32 PeekMessage call