Delen via


PROPID_MGMT_QUEUE_TYPE

 

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

(Read-only, introduced in MSMQ 3.0.) The PROPID_MGMT_QUEUE_TYPE property indicates whether the queue is a public, private, system, connector, or multicast outgoing queue.

Property ID

PROPID_MGMT_QUEUE_TYPE

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

Property Value

One of the following Unicode strings:

L"PUBLIC" (MGMT_QUEUE_TYPE_PUBLIC)

The queue is a public queue registered in Active Directory Domain Services (AD DS).

L"PRIVATE" (MGMT_QUEUE_TYPE_PRIVATE)

The queue is a private queue registered on the computer.

L"MACHINE" (MGMT_QUEUE_TYPE_MACHINE)

The queue is a computer journal or dead-letter queue.

L"CONNECTOR" (MGMT_QUEUE_TYPE_CONNECTOR)

The queue is a connector queue used for passing messages to and from a foreign computer. Each connector server typically has one transactional connector queue and one nontransactional connector queue. For information on exchanging messages between Message Queuing systems and foreign messaging systems, see Connector Services.

L"MULTICAST" (MGMT_QUEUE_TYPE_MULTICAST)

The queue is a multicast outgoing queue on the computer. A multicast outgoing queue is a temporary internal queue that is created on the sending computer to hold messages sent to a multicast IP address.

Remarks

To retrieve a string that indicates whether the queue is a public, private, system, connector, or multicast outgoing queue, include PROPID_MGMT_QUEUE_TYPE in the MQMGMTPROPS structure, and then call MQMgmtGetInfo.

This property can be retrieved only for an active queue. MQMgmtGetInfo will return a non-specific error (MQ_ERROR) if your application attempts to retrieve this information for a queue that does not contain messages and is not opened by an application.

When specifying PROPID_MGMT_QUEUE_TYPE in the MQMGMTPROPS structure, set its type indicator to VT_NULL. During the function call, Message Queuing automatically changes the type indicator to VT_LPWSTR and creates the string buffer needed to receive the property value. After you no longer need the string buffer, you must free the memory allocated for it using MQFreeMemory.

Equivalent COM Property

When using COM components, you can determine whether the queue is a public, private, system, connector, or multicast outgoing queue using the MSMQManagement.QueueType property.

Example Code

The following code fragment shows how PROPID_MGMT_QUEUE_TYPE is specified in arrays that can be used to initialize an MQMGMTPROPS structure.

aMgmtPropID[i] = PROPID_MGMT_QUEUE_TYPE;       // Property identifier  
aMgmtPropVar[i].vt = VT_NULL;                  // Type indicator  
i++;  

The following line of code shows how to free the memory allocated for the property value.

MQFreeMemory(aMgmtPropVar[i].pwszVal);  

See Also

Management Properties
MQFreeMemory
MQMgmtGetInfo
MSMQManagement.QueueType