MSGQUEUEOPTIONS
This structure contains information about message queue options.
- dwSize
-
Size of the structure in bytes.
- dwFlags
-
Describes the behavior of the message queue. Set to MSGQUEUE_NOPRECOMMIT to allocate message buffers on demand and to free the message buffers after they are read, or set to MSGQUEUE_ALLOW_BROKEN to enable a read or write operation to complete even if there is no corresponding writer or reader present.
- dwMaxMessages
-
Maximum number of messages to queue at any one time. To specify no limit on the number of messages to queue at any one time, set this value to zero.
- cbMaxMessage
-
Maximum number of bytes in each message. This value must be greater than zero.
- bReadAccess
-
Set to TRUE to request read access to the queue. Set to FALSE to request write access to the queue.
If dwMaxMessages is set to zero, there are no restrictions on the number of messages in the queue. Setting dwMaxMessages to zero implicitly enables the same behavior as setting dwFlags to MSGQUEUE_NOPRECOMMIT.
Message queues are deleted from memory when all handles to the writers and readers attached to that queue are closed.