MessageQueue.GetMachineId メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > MessageQueue.GetMachineId メソッドの意味・解説 

MessageQueue.GetMachineId メソッド

この MessageQueue が参照するキューが存在するコンピュータの ID を取得します。

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

Public Shared Function GetMachineId
 ( _
    machineName As String _
) As Guid
Dim machineName As String
Dim returnValue As Guid

returnValue = MessageQueue.GetMachineId(machineName)
public static Guid GetMachineId (
    string machineName
)
public:
static Guid GetMachineId (
    String^ machineName
)
public static Guid GetMachineId (
    String machineName
)
public static function GetMachineId
 (
    machineName : String
) : Guid

パラメータ

machineName

キューを含むコンピュータの名前。先頭に 2 つの円記号 (\\) を付けません。

戻り値
キューが存在するコンピュータの一意な ID を表す Guid。

例外例外
解説解説

コンピュータの ID は、特に 2 つの目的に使用できます。コンピュータ ジャーナルの読み取りとセキュリティ証明書の設定です。しかし、アプリケーションがドメイン コントローラのディレクトリ サービスにアクセスする必要があるため、オフラインで作業をしているときにリモート コンピュータに対して GetMachineId を呼び出すことはできません。

コンピュータ ID (マシン ID) は、コンピュータがエンタープライズに追加されたときにメッセージ キューが作成する Guid です。メッセージ キューは、コンピュータ ID を Machine キーワードおよび Journal キーワードと組み合わせて、Machine=<computeridentifier>;Journal 構文を持つコンピュータの履歴の書式名を作成します。コンピュータの履歴は履歴キューとも呼ばれるシステム キューで、UseJournalQueue プロパティが true のときに、アプリケーションが生成したメッセージのコピーが格納されます。

ジャーナルのこの構文は、キューの書式名を構築するときにだけ有効です。パス名構文は MachineName\Journal$ です。

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

使用例使用例

GetMachineId を呼び出すコード例を次に示します。

// Get the name of the computer that contains the queue.
string machineName = queue.MachineName;

// Display the return value of the MessageQueue.GetMachineId method.
Console.WriteLine("MessageQueue.GetMachineId(): {0}",
    MessageQueue.GetMachineId(machineName));
// Get the name of the computer that contains the queue.
String machineName = queue.get_MachineName();
// Display the return value of the MessageQueue.GetMachineId method.
Console.WriteLine("MessageQueue.GetMachineId(): {0}", 
    MessageQueue.GetMachineId(machineName));
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

MessageQueue.GetMachineId メソッドのお隣キーワード
検索ランキング

   

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



MessageQueue.GetMachineId メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS