Compartir a través de


MSGQUEUEOPTIONS (Windows Embedded CE 6.0)

1/6/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.

    If CreateMsgQueue is called with flags other than MSGQUEUE_NOPRECOMMIT or MSGQUEUE_ALLOW_BROKEN, the call will fail, and the last error is set to ERROR_INVALID_PARAMETER.**

  • 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

See Also

Reference

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

Other Resources

Message Queue Point-to-Point