Compartir a través de


MSGQUEUEOPTIONS (Windows CE 5.0)

Send Feedback

This structure contains information about a message queue.

typedef MSGQUEUEOPTIONS_OS{DWORDdwSize;DWORDdwFlags;DWORDdwMaxMessages;DWORDcbMaxMessage;BOOLbReadAccess;} MSGQUEUEOPTIONS, FAR* LPMSGQUEUEOPTIONS, *PMSGQUEUEOPTIONS;

Members

  • 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.

Remarks

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.

If you do not set dwFlags to MSGQUEUE_ALLOW_BROKEN, under certain circumstances the queue is deleted from memory. If either a read or a write exists and there is a single reader and writer, the queue is deleted from memory. An open handle to the queue remains. To reopen the queue, you must close the open handle and then reopen the queue.

Requirements

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

See Also

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

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.