Share via


MSGQUEUEOPTIONS

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This structure contains information about message queue options.

Syntax

typedef MSGQUEUEOPTIONS_OS{
  DWORD dwSize;
  DWORD dwFlags;
  DWORD dwMaxMessages;
  DWORD cbMaxMessage;
  BOOL bReadAccess;
} 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.

Message queues are deleted from memory when all handles to the writers and readers attached to that queue are closed.

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
MSGQUEUEINFO
OpenMsgQueue
ReadMsgQueue
WriteMsgQueue

Other Resources

Message Queue Point-to-Point