RemotingServices.Disconnect メソッド
アセンブリ: mscorlib (mscorlib.dll 内)

Public Shared Function Disconnect ( _ obj As MarshalByRefObject _ ) As Boolean
Dim obj As MarshalByRefObject Dim returnValue As Boolean returnValue = RemotingServices.Disconnect(obj)
戻り値
オブジェクトが登録されたリモート処理チャネルから正常に切断された場合は true。それ以外の場合は false。


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();


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からRemotingServices.Disconnect メソッドを検索する場合は、下記のリンクをクリックしてください。

- RemotingServices.Disconnect メソッドのページへのリンク