System.Messaging Reference (Document! X Sample)



System.Messaging Namespace > MessageQueue Class > MessageQueue Constructor : MessageQueue Constructor(String,Boolean)
The location of the queue referenced by this MessageQueue, which can be "." for the local computer. For information about the proper syntax for this parameter, see the Remarks section.
true to grant exclusive read access to the first application that accesses the queue; otherwise, false.
MessageQueue Constructor(String,Boolean)
Initializes a new instance of the MessageQueue class that references the Message Queuing queue at the specified path and with the specified read-access restriction.
Syntax
'Declaration
 
Public Function New( _
   ByVal path As String, _
   ByVal sharedModeDenyReceive As Boolean _
)
'Usage
 
Dim path As String
Dim sharedModeDenyReceive As Boolean
 
Dim instance As New MessageQueue(path, sharedModeDenyReceive)
public MessageQueue( 
   string path,
   bool sharedModeDenyReceive
)
public:
MessageQueue( 
   String^ path,
   bool sharedModeDenyReceive
)

Parameters

path
The location of the queue referenced by this MessageQueue, which can be "." for the local computer. For information about the proper syntax for this parameter, see the Remarks section.
sharedModeDenyReceive
true to grant exclusive read access to the first application that accesses the queue; otherwise, false.
Exceptions
ExceptionDescription
The Path property is not valid, possibly because it has not been set.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also