MessageQueueException クラス
アセンブリ: System.Messaging (system.messaging.dll 内)

<SerializableAttribute> _ Public Class MessageQueueException Inherits ExternalException Implements ISerializable
[SerializableAttribute] public ref class MessageQueueException : public ExternalException, ISerializable

MessageQueueException クラスに関連付けられた例外はメッセージ キューの内部エラーにより生成され、ユーザーのコードにより処理する必要があります。
すべての例外はエラー コードとエラーの原因を説明する文字列で構成されます。これらのエラー コードとその説明については、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

System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Messaging.MessageQueueException


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


MessageQueueException メンバ
System.Messaging 名前空間
MessageQueueErrorCode 列挙体
MessageQueue クラス
Message クラス
- MessageQueueException クラスのページへのリンク