MessageQueue.SetPermissions MessageQueue.SetPermissions MessageQueue.SetPermissions MessageQueue.SetPermissions Method

定義

將使用權限加入至目前集合。Adds permissions to the current set. 這控制誰有權限可存取佇列屬性和佇列中的訊息。This controls who has access rights to queue properties and messages in the queue.

多載

SetPermissions(AccessControlList) SetPermissions(AccessControlList) SetPermissions(AccessControlList) SetPermissions(AccessControlList)

根據存取控制清單的內容指派佇列的存取權限。Assigns access rights to the queue based on the contents of an access control list.

SetPermissions(MessageQueueAccessControlEntry) SetPermissions(MessageQueueAccessControlEntry) SetPermissions(MessageQueueAccessControlEntry) SetPermissions(MessageQueueAccessControlEntry)

根據存取控制項目的內容指派佇列的存取權限。Assigns access rights to the queue based on the contents of an access control entry.

SetPermissions(String, MessageQueueAccessRights) SetPermissions(String, MessageQueueAccessRights) SetPermissions(String, MessageQueueAccessRights) SetPermissions(String, MessageQueueAccessRights)

為電腦、群組或使用者提供指定的存取權限。Gives a computer, group, or user the specified access rights.

SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType)

以指定的存取控制類型 (允許、拒絕、撤銷或設定),為電腦、群組或使用者提供指定的存取權限。Gives a computer, group, or user the specified access rights, with the specified access control type (allow, deny, revoke, or set).

SetPermissions(AccessControlList) SetPermissions(AccessControlList) SetPermissions(AccessControlList) SetPermissions(AccessControlList)

根據存取控制清單的內容指派佇列的存取權限。Assigns access rights to the queue based on the contents of an access control list.

public:
 void SetPermissions(System::Messaging::AccessControlList ^ dacl);
public void SetPermissions (System.Messaging.AccessControlList dacl);
member this.SetPermissions : System.Messaging.AccessControlList -> unit
Public Sub SetPermissions (dacl As AccessControlList)

參數

dacl
AccessControlList AccessControlList AccessControlList AccessControlList

AccessControlList,包含指定信任項和要授與之使用權限的一個或多個存取控制項目。A AccessControlList that contains one or more access control entries that specify the trustees and the permissions to grant.

例外狀況

存取訊息佇列方法時發生錯誤。An error occurred when accessing a Message Queuing method.

範例

下列程式碼範例示範 SetPermissions(AccessControlList) 的用法。The following code example demonstrates the use of SetPermissions(AccessControlList).


// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

// Create an AccessControlList.
AccessControlList^ list = gcnew AccessControlList();

// Create a new trustee to represent the "Everyone" user group.
Trustee^ tr = gcnew Trustee("Everyone");

// Create an AccessControlEntry, granting the trustee read access to
// the queue.
AccessControlEntry^ entry = gcnew AccessControlEntry(
    tr, GenericAccessRights::Read,
    StandardAccessRights::Read,
    AccessControlEntryType::Allow);

// Add the AccessControlEntry to the AccessControlList.
list->Add(entry);

// Apply the AccessControlList to the queue.
queue->SetPermissions(list);

queue->Close();


// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Create an AccessControlList.
AccessControlList list = new AccessControlList();

// Create a new trustee to represent the "Everyone" user group.
Trustee tr = new Trustee("Everyone");

// Create an AccessControlEntry, granting the trustee read access to
// the queue.
AccessControlEntry entry = new AccessControlEntry(
    tr, GenericAccessRights.Read,
    StandardAccessRights.Read,
    AccessControlEntryType.Allow);

// Add the AccessControlEntry to the AccessControlList.
list.Add(entry);

// Apply the AccessControlList to the queue.
queue.SetPermissions(list);

備註

使用此多載來授與、拒絕或撤銷許可權, 方法是使用存取控制專案的集合來指定信任者和許可權資訊。Use this overload to grant, deny, or revoke rights by using a collection of access control entries to specify trustee and permissions information. 例如, 這會用來同時將許可權授與給多個使用者。This is used, for example, to grant permissions to multiple users at the same time.

您在建立ace參數時所指定的信任者可以是個別使用者、使用者群組或電腦。The trustee you specify when you construct the ace parameter can be an individual user, a group of users, or a computer. 如果信任者是個人, 請使用格式DOMAIN。 \ userIf the trustee is an individual, use the format DOMAIN\user. 您可以指定 ".", 讓信任者指出本機電腦。You can specify "." for the trustee to indicate the local computer.

您透過SetPermissions [新增許可權] 對現有清單所指派的許可權。The permissions you assign through SetPermissions add rights to the existing list. 根據預設, 公用或私用佇列的建立者具有「完整控制權」, 而網域群組「每個人」都有權取得佇列屬性、取得許可權和寫入佇列。By default, the creator of a public or private queue has full control, and the domain group Everyone has permission to get queue properties, get permissions, and write to the queue. 當您呼叫SetPermissions時, 使用者和許可權資訊會附加至現有清單的底部。When you call SetPermissions, the user and permissions information is appended to the bottom of the existing list.

系統會依序AccessControlEntry檢查每個, 直到發生下列其中一個事件為止:The system examines each AccessControlEntry in sequence until one of the following events occurs:

  • 拒絕AccessControlEntry存取時, 會將任何要求的存取權限明確拒絕至執行緒存取權杖中所列的其中一個受信任者。An access-denied AccessControlEntry explicitly denies any of the requested access rights to one of the trustees listed in the thread's access token.

  • 執行緒存取權杖中列出的AccessControlEntry一或多個受信任的存取權專案, 明確授與所有要求的存取權限。One or more access-allowed AccessControlEntry items for trustees listed in the thread's access token explicitly grant all the requested access rights.

  • AccessControlEntry檢查所有專案, 但仍至少有一個要求的存取權限未明確允許, 在此情況下, 會隱含拒絕存取。All AccessControlEntry items have been checked and there is still at least one requested access right that has not been explicitly allowed, in which case, access is implicitly denied.

當您建立dacl參數時, 會將AccessControlEntry實例新增至AccessControlList集合。When you construct the dacl parameter, you add AccessControlEntry instances to your AccessControlList collection. 當您建立每個存取控制專案時, 您可以指定一般或標準存取權限。When you construct each access control entry, you can specify generic or standard access rights. 佇列的許可權可以是下列各項的任意組合:The rights to a queue can be any combination of the following:

  • 刪除Delete

  • 讀取安全性Read Security

  • 寫入安全性Write Security

  • 同步處理Synchronize

  • 修改擁有者Modify Owner

  • 讀取Read

  • WriteWrite

  • 執行Execute

  • 必要Required

  • AllAll

  • None

這些許可權是一組位旗標, 您可以使用或位運算子加以結合。These rights are a set of bit flags that you can combine using the OR bitwise operator.

  • 完全控制Full Control

  • 刪除訊息Delete Message

  • 接收訊息Receive Message

  • 查看訊息Peek Message

  • 接收日誌訊息Receive Journal Message

  • 取得佇列屬性Get Queue Properties

  • 設定佇列屬性Set Queue Properties

  • 取得許可權Get Permissions

  • 設定權限Set Permissions

  • 取得佇列擁有權Take Queue Ownership

  • 寫入訊息Write Message

下表顯示這個方法是否可在各種工作組模式中使用。The following table shows whether this method is available in various Workgroup modes.

工作組模式Workgroup mode 可用Available
本機電腦Local computer Yes
本機電腦和直接格式名稱Local computer and direct format name Yes
遠端電腦Remote computer No
遠端電腦和直接格式名稱Remote computer and direct format name No
另請參閱

SetPermissions(MessageQueueAccessControlEntry) SetPermissions(MessageQueueAccessControlEntry) SetPermissions(MessageQueueAccessControlEntry) SetPermissions(MessageQueueAccessControlEntry)

根據存取控制項目的內容指派佇列的存取權限。Assigns access rights to the queue based on the contents of an access control entry.

public:
 void SetPermissions(System::Messaging::MessageQueueAccessControlEntry ^ ace);
public void SetPermissions (System.Messaging.MessageQueueAccessControlEntry ace);
member this.SetPermissions : System.Messaging.MessageQueueAccessControlEntry -> unit
Public Sub SetPermissions (ace As MessageQueueAccessControlEntry)

參數

ace
MessageQueueAccessControlEntry MessageQueueAccessControlEntry MessageQueueAccessControlEntry MessageQueueAccessControlEntry

指定使用者、存取類型和使用權限類型的 MessageQueueAccessControlEntryA MessageQueueAccessControlEntry that specifies a user, an access type, and a permission type.

例外狀況

存取訊息佇列方法時發生錯誤。An error occurred when accessing a Message Queuing method.

範例

下列程式碼範例示範 SetPermissions(MessageQueueAccessControlEntry) 的用法。The following code example demonstrates the use of SetPermissions(MessageQueueAccessControlEntry).


// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

// Create a new trustee to represent the "Everyone" user group.
Trustee^ tr = gcnew Trustee("Everyone");

// Create a MessageQueueAccessControlEntry, granting the trustee the
// right to receive messages from the queue.
MessageQueueAccessControlEntry^ entry = gcnew
    MessageQueueAccessControlEntry(
    tr, MessageQueueAccessRights::ReceiveMessage,
    AccessControlEntryType::Allow);

// Apply the MessageQueueAccessControlEntry to the queue.
queue->SetPermissions(entry);

queue->Close();


// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Create a new trustee to represent the "Everyone" user group.
Trustee tr = new Trustee("Everyone");

// Create a MessageQueueAccessControlEntry, granting the trustee the
// right to receive messages from the queue.
MessageQueueAccessControlEntry entry = new
    MessageQueueAccessControlEntry(
    tr, MessageQueueAccessRights.ReceiveMessage,
    AccessControlEntryType.Allow);

// Apply the MessageQueueAccessControlEntry to the queue.
queue.SetPermissions(entry);

備註

使用此多載來授與、拒絕或撤銷許可權, 方法是使用存取控制專案來指定信任者和許可權資訊。Use this overload to grant, deny, or revoke rights by using an access control entry to specify trustee and rights information.

您在建立ace參數時所指定的信任者可以是個別使用者、使用者群組或電腦。The trustee you specify when you construct the ace parameter can be an individual user, a group of users, or a computer. 如果信任者是個人, 請使用格式DOMAIN。 \ userIf the trustee is an individual, use the format DOMAIN\user. 您可以指定 ".", 讓信任者指出本機電腦。You can specify "." for the trustee to indicate the local computer.

您透過SetPermissions [新增許可權] 對現有清單所指派的許可權。The permissions you assign through SetPermissions add rights to the existing list. 根據預設, 公用或私用佇列的建立者具有「完整控制權」, 而網域群組「每個人」都有權取得佇列屬性、取得許可權和寫入佇列。By default, the creator of a public or private queue has full control, and the domain group Everyone has permission to get queue properties, get permissions, and write to the queue. 當您呼叫SetPermissions時, 使用者和許可權資訊會附加至現有清單的底部。When you call SetPermissions, the user and permissions information is appended to the bottom of the existing list.

系統會依序AccessControlEntry檢查每個, 直到發生下列其中一個事件為止:The system examines each AccessControlEntry in sequence until one of the following events occurs:

  • 拒絕AccessControlEntry存取時, 會將任何要求的存取權限明確拒絕至執行緒存取權杖中所列的其中一個受信任者。An access-denied AccessControlEntry explicitly denies any of the requested access rights to one of the trustees listed in the thread's access token.

  • 執行緒存取權杖中列出的AccessControlEntry一或多個受信任的存取權專案, 明確授與所有要求的存取權限。One or more access-allowed AccessControlEntry items for trustees listed in the thread's access token explicitly grant all the requested access rights.

  • AccessControlEntry檢查所有專案, 但仍至少有一個要求的存取權限未明確允許, 在此情況下, 會隱含拒絕存取。All AccessControlEntry items have been checked and there is still at least one requested access right that has not been explicitly allowed, in which case, access is implicitly denied.

在您rights MessageQueueAccessControlEntry建立時, 在參數中指定之佇列的許可權可以是下列任何組合:The rights to a queue, which you specify in the rights parameter when you construct your MessageQueueAccessControlEntry, can be any combination of the following:

  • 完全控制Full Control

  • 刪除訊息Delete Message

  • 接收訊息Receive Message

  • 查看訊息Peek Message

  • 接收日誌訊息Receive Journal Message

  • 取得佇列屬性Get Queue Properties

  • 設定佇列屬性Set Queue Properties

  • 取得許可權Get Permissions

  • 設定權限Set Permissions

  • 取得佇列擁有權Take Queue Ownership

  • 寫入訊息Write Message

您在ace參數的函式中指定的MessageQueueAccessRights 參數是列舉的旗標。rightsThe rights parameter you specify in the constructor for the ace parameter is a flag of the MessageQueueAccessRights enumeration. 它代表一組位旗標, 您可以使用位運算子或建立rights參數時加以結合。It represents a set of bit flags that you can combine using the bitwise operator OR when you build the rights parameter.

下表顯示這個方法是否可在各種工作組模式中使用。The following table shows whether this method is available in various Workgroup modes.

工作組模式Workgroup mode 可用Available
本機電腦Local computer Yes
本機電腦和直接格式名稱Local computer and direct format name Yes
遠端電腦Remote computer No
遠端電腦和直接格式名稱Remote computer and direct format name No
另請參閱

SetPermissions(String, MessageQueueAccessRights) SetPermissions(String, MessageQueueAccessRights) SetPermissions(String, MessageQueueAccessRights) SetPermissions(String, MessageQueueAccessRights)

為電腦、群組或使用者提供指定的存取權限。Gives a computer, group, or user the specified access rights.

public:
 void SetPermissions(System::String ^ user, System::Messaging::MessageQueueAccessRights rights);
public void SetPermissions (string user, System.Messaging.MessageQueueAccessRights rights);
member this.SetPermissions : string * System.Messaging.MessageQueueAccessRights -> unit
Public Sub SetPermissions (user As String, rights As MessageQueueAccessRights)

參數

user
String String String String

取得其他佇列權限的個人、群組或電腦。The individual, group, or computer that gets additional rights to the queue.

rights
MessageQueueAccessRights MessageQueueAccessRights MessageQueueAccessRights MessageQueueAccessRights

MessageQueueAccessRights,指出訊息佇列指派給 user 傳入之佇列的一組權限。A MessageQueueAccessRights that indicates the set of rights to the queue that Message Queuing assigns to the user passed in.

例外狀況

存取訊息佇列方法時發生錯誤。An error occurred when accessing a Message Queuing method.

範例

下列程式碼範例示範 SetPermissions(String, MessageQueueAccessRights) 的用法。The following code example demonstrates the use of SetPermissions(String, MessageQueueAccessRights).


// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

// Grant all users in the "Everyone" user group the right to receive
// messages from the queue.
queue->SetPermissions("Everyone",
    MessageQueueAccessRights::ReceiveMessage);

queue->Close();


// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Grant all users in the "Everyone" user group the right to receive
// messages from the queue.
queue.SetPermissions("Everyone", MessageQueueAccessRights.ReceiveMessage);

備註

使用此多載, 將指定的許可權授與給個別使用者。Use this overload to grant specified rights to an individual user. 使用者可以是任何有效的信任者, 其中包括個別使用者、使用者群組或電腦。The user can be any valid trustee, which includes individual users, groups of users, or a computer. 如果使用者是個人, DOMAIN請使用user參數的格式\。 userIf the user is an individual, use the format DOMAIN\user for the user parameter. 您可以指定 "." 做為user參數, 以指出本機電腦。You can specify "." for the user parameter to indicate the local computer.

您透過SetPermissions [新增許可權] 對現有清單所指派的許可權。The permissions you assign through SetPermissions add rights to the existing list. 根據預設, 公用或私用佇列的建立者具有「完整控制權」, 而網域群組「每個人」都有權取得佇列屬性、取得許可權和寫入佇列。By default, the creator of a public or private queue has full control, and the domain group Everyone has permission to get queue properties, get permissions, and write to the queue. 當您呼叫SetPermissions時, 使用者和許可權資訊會附加至現有清單的底部。When you call SetPermissions, the user and permissions information is appended to the bottom of the existing list.

系統會依序AccessControlEntry檢查每個, 直到發生下列其中一個事件為止:The system examines each AccessControlEntry in sequence until one of the following events occurs:

  • 拒絕AccessControlEntry存取時, 會將任何要求的存取權限明確拒絕至執行緒存取權杖中所列的其中一個受信任者。An access-denied AccessControlEntry explicitly denies any of the requested access rights to one of the trustees listed in the thread's access token.

  • 執行緒存取權杖中列出的AccessControlEntry一或多個受信任的存取權專案, 明確授與所有要求的存取權限。One or more access-allowed AccessControlEntry items for trustees listed in the thread's access token explicitly grant all the requested access rights.

  • AccessControlEntry檢查所有專案, 但仍至少有一個要求的存取權限未明確允許, 在此情況下, 會隱含拒絕存取。All AccessControlEntry items have been checked and there is still at least one requested access right that has not been explicitly allowed, in which case, access is implicitly denied.

rights參數中指定之佇列的許可權可以是下列任何組合:The rights to a queue, specified in the rights parameter, can be any combination of the following:

  • 完全控制Full Control

  • 刪除訊息Delete Message

  • 接收訊息Receive Message

  • 查看訊息Peek Message

  • 接收日誌訊息Receive Journal Message

  • 取得佇列屬性Get Queue Properties

  • 設定佇列屬性Set Queue Properties

  • 取得許可權Get Permissions

  • 設定權限Set Permissions

  • 取得佇列擁有權Take Queue Ownership

  • 寫入訊息Write Message

列舉型別 (enumeration) 代表一組位旗標, 您可以使用位運算子或rights建立參數來加以結合。 MessageQueueAccessRightsThe MessageQueueAccessRights enumeration represents a set of bit flags that you can combine using the bitwise operator OR to build the rights parameter.

使用此多載, 您只能授與許可權;您無法撤銷或拒絕它們。With this overload, you can only grant permissions; you cannot revoke or deny them. 您必須使用不同的多載, 明確授AccessControlEntryType與以外Allow的任何以外的。You must use a different overload to explicitly grant any AccessControlEntryType other than Allow.

下表顯示這個方法是否可在各種工作組模式中使用。The following table shows whether this method is available in various Workgroup modes.

工作組模式Workgroup mode 可用Available
本機電腦Local computer Yes
本機電腦和直接格式名稱Local computer and direct format name Yes
遠端電腦Remote computer No
遠端電腦和直接格式名稱Remote computer and direct format name No
另請參閱

SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType)

以指定的存取控制類型 (允許、拒絕、撤銷或設定),為電腦、群組或使用者提供指定的存取權限。Gives a computer, group, or user the specified access rights, with the specified access control type (allow, deny, revoke, or set).

public:
 void SetPermissions(System::String ^ user, System::Messaging::MessageQueueAccessRights rights, System::Messaging::AccessControlEntryType entryType);
public void SetPermissions (string user, System.Messaging.MessageQueueAccessRights rights, System.Messaging.AccessControlEntryType entryType);
member this.SetPermissions : string * System.Messaging.MessageQueueAccessRights * System.Messaging.AccessControlEntryType -> unit
Public Sub SetPermissions (user As String, rights As MessageQueueAccessRights, entryType As AccessControlEntryType)

參數

user
String String String String

取得其他佇列權限的個人、群組或電腦。The individual, group, or computer that gets additional rights to the queue.

rights
MessageQueueAccessRights MessageQueueAccessRights MessageQueueAccessRights MessageQueueAccessRights

MessageQueueAccessRights,指出訊息佇列指派給 user 傳入之佇列的一組權限。A MessageQueueAccessRights that indicates the set of rights to the queue that Message Queuing assigns to the user passed in.

entryType
AccessControlEntryType AccessControlEntryType AccessControlEntryType AccessControlEntryType

AccessControlEntryType,指定要授與、拒絕或是撤銷 rights 參數所指定的使用權限。A AccessControlEntryType that specifies whether to grant, deny, or revoke the permissions specified by the rights parameter.

例外狀況

存取訊息佇列方法時發生錯誤。An error occurred when accessing a Message Queuing method.

範例

下列程式碼範例示範 SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) 的用法。The following code example demonstrates the use of SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType).


// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

// Grant all users in the "Everyone" user group the right to receive
// messages from the queue.
queue->SetPermissions("Everyone",
    MessageQueueAccessRights::ReceiveMessage,
    AccessControlEntryType::Allow);

queue->Close();


// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Grant all users in the "Everyone" user group the right to receive
// messages from the queue.
queue.SetPermissions("Everyone", MessageQueueAccessRights.ReceiveMessage,
    AccessControlEntryType.Allow);

備註

使用此多載來授與、拒絕或撤銷個別使用者的指定許可權。Use this overload to grant, deny, or revoke specified rights for an individual user. 使用者可以是任何有效的信任者, 其中包括個別使用者、使用者群組或電腦。The user can be any valid trustee, which includes individual users, groups of users, or a computer. 如果使用者是個人, DOMAIN請使用user參數的格式\。 userIf the user is an individual, use the format DOMAIN\user for the user parameter. 您可以指定 "." 做為user參數, 以指出本機電腦。You can specify "." for the user parameter to indicate the local computer.

您透過SetPermissions [新增許可權] 對現有清單所指派的許可權。The permissions you assign through SetPermissions add rights to the existing list. 根據預設, 公用或私用佇列的建立者具有「完整控制權」, 而網域群組「每個人」都有權取得佇列屬性、取得許可權和寫入佇列。By default, the creator of a public or private queue has full control, and the domain group Everyone has permission to get queue properties, get permissions, and write to the queue. 當您呼叫SetPermissions時, 使用者和許可權資訊會附加至現有清單的底部。When you call SetPermissions, the user and permissions information is appended to the bottom of the existing list.

系統會依序AccessControlEntry檢查每個, 直到發生下列其中一個事件為止:The system examines each AccessControlEntry in sequence until one of the following events occurs:

  • 拒絕AccessControlEntry存取時, 會將任何要求的存取權限明確拒絕至執行緒存取權杖中所列的其中一個受信任者。An access-denied AccessControlEntry explicitly denies any of the requested access rights to one of the trustees listed in the thread's access token.

  • 執行緒存取權杖中列出的AccessControlEntry一或多個受信任的存取權專案, 明確授與所有要求的存取權限。One or more access-allowed AccessControlEntry items for trustees listed in the thread's access token explicitly grant all the requested access rights.

  • AccessControlEntry檢查所有專案, 但仍至少有一個要求的存取權限未明確允許, 在此情況下, 會隱含拒絕存取。All AccessControlEntry items have been checked and there is still at least one requested access right that has not been explicitly allowed, in which case, access is implicitly denied.

rights參數中指定之佇列的許可權可以是下列任何組合:The rights to a queue, specified in the rights parameter, can be any combination of the following:

  • 完全控制Full Control

  • 刪除訊息Delete Message

  • 接收訊息Receive Message

  • 查看訊息Peek Message

  • 接收日誌訊息Receive Journal Message

  • 取得佇列屬性Get Queue Properties

  • 設定佇列屬性Set Queue Properties

  • 取得許可權Get Permissions

  • 設定權限Set Permissions

  • 取得佇列擁有權Take Queue Ownership

  • 寫入訊息Write Message

列舉型別 (enumeration) 代表一組位旗標, 您可以使用位運算子或rights建立參數來加以結合。 MessageQueueAccessRightsThe MessageQueueAccessRights enumeration represents a set of bit flags that you can combine using the bitwise operator OR to build the rights parameter.

下表顯示這個方法是否可在各種工作組模式中使用。The following table shows whether this method is available in various Workgroup modes.

工作組模式Workgroup mode 可用Available
本機電腦Local computer Yes
本機電腦和直接格式名稱Local computer and direct format name Yes
遠端電腦Remote computer No
遠端電腦和直接格式名稱Remote computer and direct format name No
另請參閱

適用於