MessageQueue.MachineName プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > MessageQueue.MachineName プロパティの意味・解説 

MessageQueue.MachineName プロパティ

メッセージ キューのキューが存在するコンピュータの名前を取得または設定します。

名前空間: System.Messaging
アセンブリ: System.Messaging (system.messaging.dll 内)
構文構文

Dim instance As MessageQueue
Dim value As String

value = instance.MachineName

instance.MachineName = value
public string MachineName { get;
 set; }
/** @property */
public String get_MachineName ()

/** @property */
public void set_MachineName (String value)
public function get MachineName
 () : String

public function set MachineName
 (value : String)

プロパティ値
キューが存在するコンピュータの名前。メッセージ キューの既定値は、ローカル コンピュータを表す "." です。

例外例外
例外の種類条件

ArgumentException

MachineName が null 参照 (Visual Basic では Nothing) です。

ArgumentException

コンピュータ名が無効です。構文が誤っている可能性があります。

MessageQueueException

メッセージ キューのメソッドにアクセスしたときにエラーが発生しました。

解説解説

MachineName は、キュー Path の表示名を使用する構文に不可欠なコンポーネントです。キュー パスを表示名を使用して識別するときに、指定した種類のキューに対して使用する構文を次の表に示します。

MachineName にローカル コンピュータを指定する場合は "." を使用します。このプロパティではコンピュータ名だけが認識されます。たとえば、Server0 など。MachineName プロパティは IP アドレス形式をサポートしません。

Path を MachineName で定義した場合、パス変換にドメイン コントローラが必要なため、アプリケーションをオフラインで実行すると例外がスローされます。そのため、オフラインで作業をする場合は、Path 構文に FormatName を使用する必要があります。

MachineName、Path、QueueName の各プロパティは相互に関係します。MachineName プロパティを変更すると、Path プロパティが変更されます。これは、新しい MachineName と QueueName から構築されます。Path を (たとえば、書式名構文を使用するように) 変更すると、新しいキューを参照するように MachineName プロパティと QueueName プロパティがリセットされます。QueueName プロパティが空の場合、Path は指定したコンピュータの履歴キューに設定されます。

このプロパティが各種のワークグループ モードで使用できるかどうかを次の表に示します。

使用例使用例

メッセージ キューの MachineName プロパティに対し、値の取得と設定を行うコード例を次に示します。

// Set the queue's MachineName property value to the name of the local
// computer.
queue.MachineName = ".";

// Display the new value of the queue's MachineName property.
Console.WriteLine("MessageQueue.MachineName: {0}", queue.MachineName);
// Set the queue's MachineName property value to the name of the local
// computer.
queue.set_MachineName(".");
// Display the new value of the queue's MachineName property.
Console.WriteLine("MessageQueue.MachineName: {0}", 
    queue.get_MachineName());
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
MessageQueue クラス
MessageQueue メンバ
System.Messaging 名前空間
QueueName
Path
MessageQueue.FormatName プロパティ
GetPublicQueues
GetMessageQueueEnumerator


このページでは「.NET Framework クラス ライブラリ リファレンス」からMessageQueue.MachineName プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からMessageQueue.MachineName プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からMessageQueue.MachineName プロパティ を検索

英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「MessageQueue.MachineName プロパティ」の関連用語

MessageQueue.MachineName プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



MessageQueue.MachineName プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS