System.Messaging Reference (Document! X Sample)
System.Messaging Namespace / MessageQueue Class / MessageQueue Constructor / MessageQueue Constructor(String,Boolean,Boolean,QueueAccessMode)
The location of the queue referenced by this MessageQueue, which can be "." for the local computer.
true to grant exclusive read access to the first application that accesses the queue; otherwise, false.
true to create and use a connection cache; otherwise, false.
One of the QueueAccessMode values.



In This Topic
    MessageQueue Constructor(String,Boolean,Boolean,QueueAccessMode)
    In This Topic
    Initializes a new instance of the MessageQueue class.
    Syntax
    'Declaration
     
    
    Public Function New( _
       ByVal path As String, _
       ByVal sharedModeDenyReceive As Boolean, _
       ByVal enableCache As Boolean, _
       ByVal accessMode As QueueAccessMode _
    )
    'Usage
     
    
    Dim path As String
    Dim sharedModeDenyReceive As Boolean
    Dim enableCache As Boolean
    Dim accessMode As QueueAccessMode
     
    Dim instance As New MessageQueue(path, sharedModeDenyReceive, enableCache, accessMode)

    Parameters

    path
    The location of the queue referenced by this MessageQueue, which can be "." for the local computer.
    sharedModeDenyReceive
    true to grant exclusive read access to the first application that accesses the queue; otherwise, false.
    enableCache
    true to create and use a connection cache; otherwise, false.
    accessMode
    One of the QueueAccessMode values.
    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