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

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

RemotingServices.Disconnect メソッド

オブジェクトが登録したリモート処理チャネルを経由してそれ以上のメッセージを受信するのを停止します。

名前空間: System.Runtime.Remoting
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

例外例外
例外の種類条件

ArgumentNullException

obj パラメータが null 参照 (Visual Basic では Nothing) です。

ArgumentException

obj パラメータがプロキシです。

SecurityException

直前の呼び出し元に、リモート処理の型とチャネルを構成するためのアクセス許可がありません。

使用例使用例

Disconnect メソッドを使用して、リモート チャネルからオブジェクトを切断する方法のコード例を次に示します。

Dim channel As New TcpChannel(9000)
ChannelServices.RegisterChannel(channel)

Dim objectWellKnown As New
 SampleWellKnown()
' After the channel is registered, the object needs to be registered
' with the remoting infrastructure.  So, Marshal is called.
Dim objrefWellKnown As ObjRef = RemotingServices.Marshal(objectWellKnown,
 "objectWellKnownUri")
Console.WriteLine("An instance of SampleWellKnown type is published
 at {0}.", objrefWellKnown.URI)

Console.WriteLine("Press enter to unregister SampleWellKnown,
 so that it is no longer available on this channel.")
Console.ReadLine()
RemotingServices.Disconnect(objectWellKnown)
Console.WriteLine("Press enter to end the server process.")
Console.ReadLine()
TcpChannel channel = new TcpChannel(9000);
ChannelServices.RegisterChannel(channel);

SampleWellKnown objectWellKnown = new SampleWellKnown();

// After the channel is registered, the object needs to be registered
// with the remoting infrastructure.  So, Marshal is called.
ObjRef objrefWellKnown = RemotingServices.Marshal(objectWellKnown, "objectWellKnownUri");
Console.WriteLine("An instance of SampleWellKnown type is published at {0}.",
 objrefWellKnown.URI);

Console.WriteLine("Press enter to unregister SampleWellKnown, so that it is
 no longer available on this channel.");
Console.ReadLine();
RemotingServices.Disconnect(objectWellKnown);

Console.WriteLine("Press enter to end the server process.");
Console.ReadLine();
TcpChannel^ channel = gcnew TcpChannel( 9000 );
ChannelServices::RegisterChannel( channel );
SampleWellKnown ^ objectWellKnown = gcnew SampleWellKnown;

// After the channel is registered, the Object* needs to be registered
// with the remoting infrastructure.  So, Marshal is called.
ObjRef^ objrefWellKnown = RemotingServices::Marshal( objectWellKnown, "objectWellKnownUri"
 );
Console::WriteLine( "An instance of SampleWellKnown type is published at {0}.",
 objrefWellKnown->URI );
Console::WriteLine( "Press enter to unregister SampleWellKnown, so that it is
 no longer available on this channel." );
Console::ReadLine();
RemotingServices::Disconnect( objectWellKnown );
Console::WriteLine( "Press enter to end the server process." );
Console::ReadLine();
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
RemotingServices クラス
RemotingServices メンバ
System.Runtime.Remoting 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「RemotingServices.Disconnect メソッド」の関連用語

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

   

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



RemotingServices.Disconnect メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS