Compartilhar via


MSMQDestination.Open

 

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

(Introduced in MSMQ 3.0.) The Open method of the MSMQDestination object, which can represent one or more queues, explicitly opens the object for sending messages.

Sub Open
()  

Parameters

This method has no parameters.

Return Values

This method has no return values.

Remarks

The MSMQDestination object can be opened explicitly by calling Open or implicitly by referencing the MSMQDestination object when calling the MSMQMessage.Send method. In either case, the MSMQDestination object must be initialized before it can be used.

Before an MSMQDestination object can be opened to send message, the object must be initialized by setting one of the following properties.

  • MSMQDestination.ADsPath: Specifies the ADs path to a distribution list, public queue, or queue alias object stored in Active Directory Domain Services (AD DS).

  • MSMQDestination.FormatName: Specifies a public, private, or direct format name for referencing a single destination queue, or a multicast address format name or multiple-element format name for referencing multiple destination queues.

  • MSMQDestination.PathName: Specifies the path name of a public or private queue.

Applications can determine if the MSMQDestination object is open for sending messages by inspecting the MSMQDestination.IsOpen property.

The following internal private queues are used by Message Queuing and cannot be opened by applications:

  • admin_queue$

  • order_queue$

  • msmqadminresp

  • msmqtriggersnotifications

  • notify_queue$

Requirements

Windows NT/2000/XP: Included in Windows XP and Windows Server 2003.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib

See Also

MSMQDestination
MSMQDestination.ADsPath
MSMQDestination.FormatName
MSMQDestination.IsOpen
MSMQDestination.PathName