Partager via


MSGQUEUEINFO (Windows CE 5.0)

Send Feedback

This structure contains information about a message queue.

typedef MSGQUEUEINFO{DWORDdwSize;DWORDdwFlags;DWORDdwMaxMessages;DWORDcbMaxMessage;DWORDdwCurrentMessages;DWORDdwMaxQueueMessages;WORDwNumReaders;WORDwNumWriters;}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

OS Versions: Windows CE .NET 4.0 and later.
Header: Msgqueue.h.

See Also

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

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.