MessageQueue.WriteHandle 屬性

定義

取得用來傳送訊息至訊息佇列的原生控制代碼。Gets the native handle used to send messages to the message queue.

public:
 property IntPtr WriteHandle { IntPtr get(); };
[System.ComponentModel.Browsable(false)]
[System.Messaging.MessagingDescription("MQ_WriteHandle")]
public IntPtr WriteHandle { get; }
[<System.ComponentModel.Browsable(false)>]
[<System.Messaging.MessagingDescription("MQ_WriteHandle")>]
member this.WriteHandle : nativeint
Public ReadOnly Property WriteHandle As IntPtr

屬性值

IntPtr

用來傳送訊息至佇列之原生佇列物件的控制代碼。A handle to the native queue object that you use for sending messages to the queue.

屬性

例外狀況

訊息佇列無法用來寫入。The message queue is not available for writing.

備註

WriteHandle會提供原生 Windows 控制碼給用來將訊息傳送至佇列的訊息佇列物件。The WriteHandle provides a native Windows handle to the message queue object that is used for sending messages to the queue. 如果您變更佇列的路徑,控制碼會關閉並以新值重新開啟。If you change the path of the queue, the handle is closed and reopened with a new value.

下表顯示此屬性是否適用于各種工作組模式。The following table shows whether this property 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 Yes

適用於

另請參閱