<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FNetwork_Remote%2FRemote_Mode</id>
		<title>VB.Net/Network Remote/Remote Mode - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FNetwork_Remote%2FRemote_Mode"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/Network_Remote/Remote_Mode&amp;action=history"/>
		<updated>2026-04-05T22:05:52Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/Network_Remote/Remote_Mode&amp;diff=964&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/Network_Remote/Remote_Mode&amp;diff=964&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/Network_Remote/Remote_Mode&amp;diff=965&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/Network_Remote/Remote_Mode&amp;diff=965&amp;oldid=prev"/>
				<updated>2010-05-26T12:45:38Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Well Known Object Mode: Single Call==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
///////////////////////////////////general.vb&lt;br /&gt;
// Compile: vbc /target:library  general.vb&lt;br /&gt;
Imports System&lt;br /&gt;
Public Interface IMyRemoteObject&lt;br /&gt;
    Sub setValue(ByVal newval As Integer)&lt;br /&gt;
    Function getValue() As Integer&lt;br /&gt;
End Interface&lt;br /&gt;
Public Class MyRemoteObject&lt;br /&gt;
    Inherits MarshalByRefObject&lt;br /&gt;
    Implements IMyRemoteObject&lt;br /&gt;
    Private myvalue As Integer&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
    End Sub &amp;quot;New&lt;br /&gt;
    Public Sub New(ByVal startvalue As Integer)&lt;br /&gt;
        myvalue = startvalue&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Sub setValue(ByVal newval As Integer) Implements IMyRemoteObject.setValue&lt;br /&gt;
        myvalue = newval&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Function getValue() As Integer Implements IMyRemoteObject.getValue&lt;br /&gt;
        Return myvalue&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///////////////////////////////////test.vb&lt;br /&gt;
// Compile: vbc /t:exe /r:general.dll test.vb&lt;br /&gt;
&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Runtime.Remoting&lt;br /&gt;
Imports System.Runtime.Remoting.Channels.Http&lt;br /&gt;
Imports System.Runtime.Remoting.Channels&lt;br /&gt;
Imports Microsoft.VisualBasic&lt;br /&gt;
Module Client&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim channel As New HttpChannel()&lt;br /&gt;
        ChannelServices.RegisterChannel(channel,false)&lt;br /&gt;
        Dim obj As IMyRemoteObject = CType(Activator.GetObject( _&lt;br /&gt;
            GetType(IMyRemoteObject), _&lt;br /&gt;
            &amp;quot;http://localhost:1234/MyRemoteObject.soap&amp;quot;), _&lt;br /&gt;
            IMyRemoteObject)&lt;br /&gt;
        Console.WriteLine(&amp;quot;Server connected&amp;quot;)&lt;br /&gt;
        Dim tmp As Integer = obj.getValue()&lt;br /&gt;
        Console.WriteLine(&amp;quot;Original server side value: {0}&amp;quot;, tmp)&lt;br /&gt;
        obj.setValue(42)&lt;br /&gt;
        tmp = obj.getValue()&lt;br /&gt;
        Console.WriteLine(&amp;quot;New server side value {0}&amp;quot;, tmp)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&lt;br /&gt;
///////////////////////////////////server.vb&lt;br /&gt;
// vbc /target:exe  /r:general.dll server.vb&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Runtime.Remoting&lt;br /&gt;
Imports System.Runtime.Remoting.Channels.Http&lt;br /&gt;
Imports System.Runtime.Remoting.Channels&lt;br /&gt;
Imports Microsoft.VisualBasic&lt;br /&gt;
&lt;br /&gt;
Module ServerStartup&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Console.WriteLine(&amp;quot;ServerStartup.Main(): Server started&amp;quot;)&lt;br /&gt;
        Dim chnl As New HttpChannel(1234)&lt;br /&gt;
        ChannelServices.RegisterChannel(chnl,false)&lt;br /&gt;
        RemotingConfiguration.RegisterWellKnownServiceType( _&lt;br /&gt;
            GetType(MyRemoteObject), _&lt;br /&gt;
            &amp;quot;MyRemoteObject.soap&amp;quot;, _&lt;br /&gt;
            WellKnownObjectMode.SingleCall)&lt;br /&gt;
        &amp;quot; the server will keep running until keypress.&lt;br /&gt;
        Console.ReadLine()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Well Known Object Mode Singleton==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;&lt;br /&gt;
///////////////////////////////////general.vb&lt;br /&gt;
// Compile: vbc /target:library  general.vb&lt;br /&gt;
Imports System&lt;br /&gt;
Public Interface IMyRemoteObject&lt;br /&gt;
    Sub setValue(ByVal newval As Integer)&lt;br /&gt;
    Function getValue() As Integer&lt;br /&gt;
End Interface&lt;br /&gt;
Public Class MyRemoteObject&lt;br /&gt;
    Inherits MarshalByRefObject&lt;br /&gt;
    Implements IMyRemoteObject&lt;br /&gt;
    Private myvalue As Integer&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
    End Sub &amp;quot;New&lt;br /&gt;
    Public Sub New(ByVal startvalue As Integer)&lt;br /&gt;
        myvalue = startvalue&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Sub setValue(ByVal newval As Integer) Implements IMyRemoteObject.setValue&lt;br /&gt;
        myvalue = newval&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Function getValue() As Integer Implements IMyRemoteObject.getValue&lt;br /&gt;
        Return myvalue&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///////////////////////////////////test.vb&lt;br /&gt;
// Compile: vbc /t:exe /r:general.dll test.vb&lt;br /&gt;
&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Runtime.Remoting&lt;br /&gt;
Imports System.Runtime.Remoting.Channels.Http&lt;br /&gt;
Imports System.Runtime.Remoting.Channels&lt;br /&gt;
Imports Microsoft.VisualBasic&lt;br /&gt;
Module Client&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim channel As New HttpChannel()&lt;br /&gt;
        ChannelServices.RegisterChannel(channel,false)&lt;br /&gt;
        Dim obj As IMyRemoteObject = CType(Activator.GetObject( _&lt;br /&gt;
            GetType(IMyRemoteObject), _&lt;br /&gt;
            &amp;quot;http://localhost:1234/MyRemoteObject.soap&amp;quot;), _&lt;br /&gt;
            IMyRemoteObject)&lt;br /&gt;
        Console.WriteLine(&amp;quot;Server connected&amp;quot;)&lt;br /&gt;
        Dim tmp As Integer = obj.getValue()&lt;br /&gt;
        Console.WriteLine(&amp;quot;Original server side value: {0}&amp;quot;, tmp)&lt;br /&gt;
        obj.setValue(42)&lt;br /&gt;
        tmp = obj.getValue()&lt;br /&gt;
        Console.WriteLine(&amp;quot;New server side value {0}&amp;quot;, tmp)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&lt;br /&gt;
&lt;br /&gt;
///////////////////////////////////server.vb&lt;br /&gt;
// vbc /target:exe  /r:general.dll server.vb&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Runtime.Remoting&lt;br /&gt;
Imports System.Runtime.Remoting.Channels.Http&lt;br /&gt;
Imports System.Runtime.Remoting.Channels&lt;br /&gt;
Imports Microsoft.VisualBasic&lt;br /&gt;
&lt;br /&gt;
Module ServerStartup&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Console.WriteLine(&amp;quot;ServerStartup.Main(): Server started&amp;quot;)&lt;br /&gt;
        Dim chnl As New HttpChannel(1234)&lt;br /&gt;
        ChannelServices.RegisterChannel(chnl,false)&lt;br /&gt;
        RemotingConfiguration.RegisterWellKnownServiceType( _&lt;br /&gt;
            GetType(MyRemoteObject), _&lt;br /&gt;
            &amp;quot;MyRemoteObject.soap&amp;quot;, _&lt;br /&gt;
            WellKnownObjectMode.Singleton)&lt;br /&gt;
        &amp;quot; the server will keep running until keypress.&lt;br /&gt;
        Console.ReadLine()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>