Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This structure contains information about a message queue.
Syntax
typedef MSGQUEUEINFO{ DWORD dwSize; DWORD dwFlags; DWORD dwMaxMessages; DWORD cbMaxMessage; DWORD dwCurrentMessages; DWORD dwMaxQueueMessages; WORD wNumReaders; WORD wNumWriters; } MSGQUEUEINFO, *PMSGQUEUEINFO, FAR* LPMSGQUEUEINFO; |
Members
- dwSize
-
Size of the buffer passed in, larger than sizeof(MSGQUEUEINFO).
- dwFlags
-
Value specified in MSGQUEUEOPTIONS.dwFlagspassed when the message queue is created. 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 allowed in queue, if it is zero, then no restriction on the number of messages.
- cbMaxMessage
-
Length of the message in bytes.
- dwCurrentMessages
-
Number of messages currently existing in the queue.
- dwMaxQueueMessages
-
Maximum number of messages that have ever been in the queue at one time.
- wNumReaders
-
Number of readers attached to the queue for reading.
- wNumWriters
-
Number of writers attached to the queue for writing.
Remarks
If dwMaxMessagesis set to zero, there are no restrictions on the number of messages in the queue. This implicitly enables the same behavior as setting MSGQUEUE_NOPRECOMMIT in dwFlags.
If the MSGQUEUE_ALLOW_BROKEN flag is not specified and either the read or write exists, assuming a single read and writer, the queue will be deleted from memory and only the open handle to the queue will exist. The only option at this point is to close the remaining open handle and reopen the queue if necessary.
Requirements
Header | msgqueue.h |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |