MessageQueue.GetAllMessages メソッド
アセンブリ: System.Messaging (system.messaging.dll 内)
 構文
構文Dim instance As MessageQueue Dim returnValue As Message() returnValue = instance.GetAllMessages
キューにあるすべてのメッセージを表す型 Message の配列。配列の順序は、メッセージがメッセージ キューのキューに存在する順序と同じです。
 例外
例外 解説
解説GetAllMessages は、キューにあるメッセージの静的なスナップショットを返します。メッセージへの動的リンクではありません。そのため、この配列を使用してキューのメッセージは変更できません。キューとリアルタイムに動的な対話 (メッセージの削除など) をするには、キューにあるメッセージの動的リストを返す GetMessageEnumerator2 メソッドを呼び出します。
GetAllMessages は、メソッドが呼び出された時点でキューにあるメッセージのコピーを返すため、キューに到達した新しいメッセージまたはキューから削除されたメッセージは反映されません。
GetAllMessages は、MessageReadPropertyFilter プロパティでフィルタをかけられていないプロパティだけを取得します。
このメソッドが各種のワークグループ モードで使用できるかどうかを次の表に示します。
 使用例
使用例GetAllMessages を使用する方法を次のコード例に示します。
// Connect to a queue on the local computer. MessageQueue queue = new MessageQueue(".\\exampleQueue"); // Populate an array with copies of all the messages in the queue. Message[] msgs = queue.GetAllMessages(); // Loop through the messages. foreach(Message msg in msgs) { // Display the label of each message. Console.WriteLine(msg.Label); }
// Connect to a queue on the local computer. MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue"); // Populate an array with copies of all the messages in the queue. array<Message^>^ msgs = queue->GetAllMessages(); // Loop through the messages. for each(Message^ msg in msgs) { // Display the label of each message. Console::WriteLine(msg->Label); } queue->Close();
// Connect to a queue on the local computer. MessageQueue queue = new MessageQueue(".\\exampleQueue"); // Populate an array with copies of all the messages in the queue. Message msgs[] = queue.GetAllMessages(); // Loop through the messages. for (int iCtr = 0; iCtr < msgs.length; iCtr++) { Message msg = msgs[iCtr]; // Display the label of each message. Console.WriteLine(msg.get_Label()); }
 .NET Framework のセキュリティ
.NET Framework のセキュリティ プラットフォーム
プラットフォームWindows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
 バージョン情報
バージョン情報 参照
参照Weblioに収録されているすべての辞書からMessageQueue.GetAllMessages メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からMessageQueue.GetAllMessages メソッド
                    を検索
                     全ての辞書からMessageQueue.GetAllMessages メソッド
                    を検索
                - MessageQueue.GetAllMessages メソッドのページへのリンク

 
                             
                    


