How many messages does the queue for a standard window hold? What happens when the queue overflows?
The documentation for GetMessage
and relatives doesn't say anything about this, and PeekMessage
only gives you a yes/no for certain classes of messages, not a message count.
This page says that the queues are implemented using memory-mapped files, and that there is no message count limit, but that page is about WinCE. Does this apply to desktop Win32 as well?
The message queue can list from 0 to 255 messages. The default setting is set to a maximum of 50 messages queued.
In a queuing system, messages are stored at intermediate nodes until the system is ready to forward them. At their final destination they are stored in an electronic mailbox until the addressee is ready to read them.
A thread's message queue receives all mouse and keyboard messages for the windows created by the thread. The thread removes messages from its queue and directs the system to send them to the appropriate window procedure for processing.
Message Queuing provides the following security services: Message authentication provides a way to ensure message integrity and a way to verify who sent the message. Authenticating for message integrity ensures that no one has tampered with the message or changed its content.
10000 by default, but it can be adjusted via the registry.
If queue overflows, PostMessage fails.
Documentation here:
PostMessage
function on MSDN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With