Share via


MSGQUEUEINFO

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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.dwFlags passed 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 dwMaxMessages is 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

See Also

Reference

Message Queue Point-to-Point Structures
CloseMsgQueue
CreateMsgQueue
GetMsgQueueInfo
MSGQUEUEOPTIONS
OpenMsgQueue
ReadMsgQueue
WriteMsgQueue

Other Resources

Message Queue Point-to-Point