Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How deep is the Win32 message queue?

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?

like image 248
Ben Straub Avatar asked Sep 23 '08 19:09

Ben Straub


People also ask

What is message queue size?

The message queue can list from 0 to 255 messages. The default setting is set to a maximum of 50 messages queued.

Where are message queues stored?

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.

What is message queue in MFC?

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.

Is message queue secure?

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.


1 Answers

10000 by default, but it can be adjusted via the registry.

If queue overflows, PostMessage fails.

Documentation here:

PostMessage function on MSDN

like image 85
Corey Trager Avatar answered Oct 21 '22 18:10

Corey Trager