MessageQueueErrorCode 列挙体
アセンブリ: System.Messaging (system.messaging.dll 内)

Public Enumeration MessageQueueErrorCode


MessageQueueErrorCode 列挙体はメッセージ操作中のエラー状況に関する詳細情報を提供します。
MessageQueueException は MessageQueueErrorCode プロパティを使用して、メッセージ キュー エラーの性質を識別します。MessageQueueErrorCode 値は、エラーと関連付ける文字列を決定します。

メッセージ キューのキューが存在するかどうかを確認してから、それを削除するコード例を次に示します。
Imports System Imports System.Messaging Public Class MyNewQueue ' Provides an entry point into the application. ' ' This example verifies existence and attempts to ' delete a queue. Public Shared Sub Main() ' Determine whether the queue exists. If MessageQueue.Exists(".\myQueue") Then Try ' Delete the queue. MessageQueue.Delete(".\myQueue") Catch e As MessageQueueException If e.MessageQueueErrorCode = _ MessageQueueErrorCode.AccessDenied Then Console.WriteLine("Access is denied. " _ + "Queue might be a system queue.") End If ' Handle other sources of exceptions as necessary. End Try End If Return End Sub 'Main End Class 'MyNewQueue
using System; using System.Messaging; namespace MyProject { /// <summary> /// Provides a container class for the example. /// </summary> public class MyNewQueue { //************************************************** // Provides an entry point into the application. // // This example verifies existence and attempts to // delete a queue. //************************************************** public static void Main() { // Determine whether the queue exists. if (MessageQueue.Exists(".\\myQueue")) { try { // Delete the queue. MessageQueue.Delete(".\\myQueue"); } catch(MessageQueueException e) { if(e.MessageQueueErrorCode == MessageQueueErrorCode.AccessDenied) { Console.WriteLine("Access is denied. " + "Queue might be a system queue."); } // Handle other sources of MessageQueueException. } } return; } } }
#using <system.dll> #using <system.messaging.dll> using namespace System; using namespace System::Messaging; int main() { // Determine whether the queue exists. if ( MessageQueue::Exists( ".\\myQueue" ) ) { try { // Delete the queue. MessageQueue::Delete( ".\\myQueue" ); } catch ( MessageQueueException^ e ) { if ( e->MessageQueueErrorCode == MessageQueueErrorCode::AccessDenied ) { Console::WriteLine( "Access is denied. Queue might be a system queue." ); } // Handle other sources of MessageQueueException. } } return 0; }
package MyProject; import System.*; import System.Messaging.*; /// <summary> /// Provides a container class for the example. /// </summary> public class MyNewQueue { //************************************************** // Provides an entry point into the application. // // This example verifies existence and attempts to // delete a queue. //************************************************** public static void main(String[] args) { // Determine whether the queue exists. if (MessageQueue.Exists(".\\myQueue")) { try { // Delete the queue. MessageQueue.Delete(".\\myQueue"); } catch (MessageQueueException e) { if (e.get_MessageQueueErrorCode(). Equals(MessageQueueErrorCode.AccessDenied)) { Console.WriteLine("Access is denied. " + "Queue might be a system queue."); } // Handle other sources of MessageQueueException. } } return; } //main } //MyNewQueue

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に収録されているすべての辞書からMessageQueueErrorCode 列挙体を検索する場合は、下記のリンクをクリックしてください。

- MessageQueueErrorCode 列挙体のページへのリンク