QueueGuid
MSMQQueueInfo

Read-only. The QueueGuid property identifies the public queue associated with the MSMQQueueInfo object. The queue identifier is created by MSMQ when the queue is created.

Quick Info

Type: GUID
Run time: read-only

Syntax

object.QueueGuid
 
Syntax Element Description
object Queue information (MSMQQueueInfo) object that defines the queue.

Return Values

GUID of public queue.

Remarks

To find out the queue identifier of a queue, the application must first call Refresh. Although MSMQ creates the queue identifier when the queue is created, it does not update quidQueue until Refresh is called.

The QueueGuid property identifies the queue defined by the MSMQQueueInfo object. It does not identify an open instance of the queue.

Example

This example creates a public queue and then uses Refresh to display the queue's identifier. To try this example using Microsoft Visual Basic (version 5.0), paste the code into the Code window of a form that has a single text box, and then run the example and click the form.

Dim qinfo As MSMQQueueInfo
   
Private Sub Form_Click()

  Set qinfo = New MSMQQueueInfo
  qinfo.PathName = ".\guidQueueTest"
  qinfo.Label = "Test Queue"
  qinfo.Create
   
  qinfo.Refresh          'Required to update QueueGuid
  Text1.Text = "quidQueue = " + CStr(qinfo.QueueGuid)
 
End Sub
 

See Also

Create, Label, MSMQQueueInfo, PathName, Refresh


© 1997 by Microsoft Corporation. All rights reserved.