System.Messaging Reference (Document! X Sample)
SetPermissions(String,MessageQueueAccessRights) Method



System.Messaging Namespace > MessageQueue Class > SetPermissions Method : SetPermissions(String,MessageQueueAccessRights) Method
The individual, group, or computer that gets additional rights to the queue.
A MessageQueueAccessRights that indicates the set of rights to the queue that Message Queuing assigns to the user passed in.
Gives a computer, group, or user the specified access rights.
Syntax
'Declaration
 
Public Overloads Sub SetPermissions( _
   ByVal user As String, _
   ByVal rights As MessageQueueAccessRights _
) 
'Usage
 
Dim instance As MessageQueue
Dim user As String
Dim rights As MessageQueueAccessRights
 
instance.SetPermissions(user, rights)
public void SetPermissions( 
   string user,
   MessageQueueAccessRights rights
)
public:
void SetPermissions( 
   String^ user,
   MessageQueueAccessRights rights
) 

Parameters

user
The individual, group, or computer that gets additional rights to the queue.
rights
A MessageQueueAccessRights that indicates the set of rights to the queue that Message Queuing assigns to the user passed in.
Exceptions
ExceptionDescription
The user is null.
An error occurred when accessing a Message Queuing method.
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

Reference

MessageQueue Class
MessageQueue Members
Overload List