Partager via


Changing Queue Behavior Examples

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Applications can change the behavior of a destination queue by changing the properties of the queue (queue properties can also be changed by the Message Queuing Administrator.) When the value of a queue property is changed for an existing destination queue, the new value will affect only those messages sent after the queue property is changed. Changing a queue property has no effect on messages already in the queue.

Code Examples

The following examples show how to retrieve and set the properties of the queue.

Note

Some queue properties can be set only when the queue is created (such as the transactional property of the queue), and some queue properties (such as the queue identifier), are read-only properties that can be set only by Message Queuing.

Task Example
Setting and retrieving the authentication level C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_AUTHENTICATE

 C/C++ Code Example: Retrieving PROPID_Q_AUTHENTICATE

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.Authenticate

 Visual Basic Code Example: Retrieving MSMQQueueInfo.Authenticate
Setting and retrieving the base priority level C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_BASEPRIORITY

 C/C++ Code Example: Retrieving PROPID_Q_BASEPRIORITY

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.BasePriority

 Visual Basic Code Example: Retrieving MSMQQueueInfo.BasePriority
Retrieving the date and time the queue was created C/C++ code examples

 C/C++ Code Example: Retrieving PROPID_Q_CREATE_TIME

 Visual Basic code examples

 Visual Basic Code Example: Retrieving MSMQQueueInfo.CreateTime
Retrieving the format name of the queue Visual Basic Code Example: Retrieving MSMQQueueInfo.FormatName
Retrieving the identifier (GUID) of the queue C/C++ code examples

 C/C++ Code Example: Retrieving PROPID_Q_INSTANCE

 Visual Basic code examples

 Visual Basic Code Example: Retrieving MSMQQueueInfo.QueueGuid
Setting and retrieving the journaling level and the maximum size of the queue journal C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_JOURNAL

 C/C++ Code Example: Setting PROPID_Q_JOURNAL_QUOTA

 C/C++ Code Example: Retrieving PROPID_Q_JOURNAL

 C/C++ Code Example: Retrieving PROPID_Q_JOURNAL_QUOTA

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.Journal

 Visual Basic Code Example: Setting MSMQQueueInfo.JournalQuota

 Visual Basic Code Example: Retrieving MSMQQueueInfo.Journal

 Visual Basic Code Example: Retrieving MSMQQueueInfo.JournalQuota
Setting and retrieving the queue label C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_LABEL

 C/C++ Code Example: Retrieving PROPID_Q_LABEL

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.Label

 Visual Basic Code Example: Retrieving MSMQQueueInfo.Label
Retrieving the date and time when the queue was last modified C/C++ code examples

 C/C++ Code Example: Retrieving PROPID_Q_MODIFY_TIME

 Visual Basic code examples

 Visual Basic Code Example: Retrieving MSMQQueueInfo.ModifyTime
Setting and retrieving the multicast address associated with the queue C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_MULTICAST_ADDRESS C/C++ Code Example: Retrieving PROPID_Q_MULTICAST_ADDRESS

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.MulticastAddress Visual Basic Code Example: Retrieving MSMQQueueInfo.MulticastAddress
Retrieving the path name of the queue C/C++ code examples

 C/C++ Code Example: Retrieving PROPID_Q_PATHNAME

 C/C++ Code Example: Retrieving PROPID_Q_PATHNAME_DNS

 Visual Basic code examples

 Visual Basic Code Example: Retrieving MSMQQueueInfo.PathName

 Visual Basic Code Example: Retrieving MSMQQueueInfo.PathNameDNS
Retrieving the format name of the queue Visual Basic Code Example: Retrieving MSMQQueueInfo.FormatName
Setting and retrieving the privacy level of the queue C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_PRIV_LEVEL

 C/C++ Code Example: Retrieving PROPID_Q_PRIV_LEVEL

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.PrivLevel

 Visual Basic Code Example: Retrieving MSMQQueueInfo.PrivLevel
Setting or retrieving the maximum size of the queue C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_QUOTA

 C/C++ Code Example: Retrieving PROPID_Q_QUOTA

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.Quota

 Visual Basic Code Example: Retrieving MSMQQueueInfo.Quota
Retrieving the transaction level of the queue C/C++ code example

 C/C++ Code Example: Retrieving PROPID_Q_TRANSACTION

 Visual Basic code example

 Visual Basic Code Example: Retrieving MSMQQueueInfo.IsTransactional2
Setting and retrieving the queue type C/C++ code examples

 C/C++ Code Example: Setting PROPID_Q_TYPE

 C/C++ Code Example: Retrieving PROPID_Q_TYPE

 Visual Basic code examples

 Visual Basic Code Example: Setting MSMQQueueInfo.ServiceTypeGuid Visual Basic Code Example: Retrieving MSMQQueueInfo.ServiceTypeGuid
Retrieving the IsWorldReadable2 property Visual Basic code example

 Visual Basic Code Example: Retrieving MSMQQueueInfo.IsWorldReadable2