468,491 Members | 2,033 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,491 developers. It's quick & easy.

How "talk" between applications?

If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is
the best way to "talk" between them? They both run on the same PC.

Right now I'm just using text files to share information, etc...

(Not database applications.)

Thanks.
Nov 20 '05 #1
19 2401
Well that kind of depends on what data is being sent back an forth.

My personal favorite is remoting, but remoting can be complex it you're not
firmilar with it because it can run either at the remote source or the
remote client.

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:#j**************@tk2msftngp13.phx.gbl...
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is
the best way to "talk" between them? They both run on the same PC.

Right now I'm just using text files to share information, etc...

(Not database applications.)

Thanks.

Nov 20 '05 #2
Both applications are running on the SAME PC.

The data is very simple. Just a few variables and their values. That's it.
No recordsets, etc...

"Mike Bulava" <mb*****@comcast.net> wrote in message
news:ut****************@tk2msftngp13.phx.gbl...
Well that kind of depends on what data is being sent back an forth.

My personal favorite is remoting, but remoting can be complex it you're not firmilar with it because it can run either at the remote source or the
remote client.

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:#j**************@tk2msftngp13.phx.gbl...
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is the best way to "talk" between them? They both run on the same PC.

Right now I'm just using text files to share information, etc...

(Not database applications.)

Thanks.


Nov 20 '05 #3
* "VB Programmer" <gr*********@go-intech.com> scripsit:
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is
the best way to "talk" between them? They both run on the same PC.


Keyword: Remoting.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Any links to "beginners guides", etc...?

Does this work well between VB6 and VB.NET too?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c0*************@ID-208219.news.uni-berlin.de...
* "VB Programmer" <gr*********@go-intech.com> scripsit:
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is the best way to "talk" between them? They both run on the same PC.


Keyword: Remoting.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
Beyond the buzzwords :-)

You might have mentioned it but I didn't notice... what is your definition
of "talk"? I believe the methodology of choice is influenced by two major
factors (three or four if we include cross-language and cross-platform) but
they are the quantity of information and the rapidity of the exchange.

Tons of data can be exchanged through files. Consider the dBASE .dbf file
(or any ISAM file.) This is a perfectly good mechanism for exchanging data
and it can handle a little data or a lot and the apps can be on the same
computer or different ones. It has worked for decades.

You don't have to actually persist the data however. You can set up a
server app in your machine and have both apps talk to the server. This
would tend to be faster (probably) and gives you considerably more control.

You can also set up a peer-to-peer connection. Using TCP/IP you can
designate a port and have two apps chat back and forth through it.

What kind of data are you transmitting and what is the nature of the
exchange?

Tom Leylan
"VB Programmer" <gr*********@go-intech.com> wrote...
Any links to "beginners guides", etc...?

Does this work well between VB6 and VB.NET too?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c0*************@ID-208219.news.uni-berlin.de...
* "VB Programmer" <gr*********@go-intech.com> scripsit:
If I have a VB6 and a VB.NET application, or 2 VB.NET applications
what
is the best way to "talk" between them? They both run on the same PC.


Keyword: Remoting.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


Nov 20 '05 #6
You could look into talking over sockets, or possible store your data in
storage somewhere (a database) and have one poll it. Or maybe have them
send messages to each other via MSMQ/the messaging system. The latter
allows "fire and forget" and gives you options such as the whole thing not
breaking if one app isn't running. Depends what kind of communication you
are after though. Maybe sockets would be quickest but sometimes it is a bit
tricky to do.

You can, for example, serialise objects and send them over sockets and have
your listening app deserialise so the recipient gets a copy of the object
sent and you do minimal programming in between.

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is
the best way to "talk" between them? They both run on the same PC.

Right now I'm just using text files to share information, etc...

(Not database applications.)

Thanks.

Nov 20 '05 #7
"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in
news:uX**************@TK2MSFTNGP11.phx.gbl:
communication you are after though. Maybe sockets would be quickest but
sometimes it is a bit tricky to do.


Sockets are often the easiest as they are not subject to as many security
policies.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Nov 20 '05 #8
Here is an example. Create a new windows app, add a checkbox a listbox and
a button. Start the app and check the checkbox to start the server (clear
it to shut the server down). Once the server has started click the button
to serialise/deseleralise the object through the socket. Obviously this
works standalone, but start two instances of the app and click the server
checkbox on one and press the button on the other and you'll see the exact
same code sending the object to a different app. This app could even be on
another machine.

Error handling etc is incredibly thin on the ground, this is just a demo.
Any comments welcome cos I'm still a .net noob myself :) If you plan on
using this kind of idea it is better to create a self-contained listener
object rather than hacking it the way I have here so that everything runs
from the one form. This is .net 1.1 and seems a bit different to how things
worked in 1.0 IIRC.

Imports System
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Xml.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
Imports System.Net.Sockets
Imports System.Net

Public Class Form1
Inherits System.Windows.Forms.Form

Private Delegate Sub UpdateListBoxDel(ByVal Data As String)
Private m_ListenerThread As Threading.Thread
Private server As New TcpListener(IPAddress.Parse("127.0.0.1"), 5000)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

' Create a new object that is populated with data
Dim obj As New MyObject(1, "Adrian", "Forbes")
' Create an XmlSerializer for the MyObject type
Dim formatter As New XmlSerializer(GetType(MyObject))

' Create new TcpClient
Dim client As TcpClient = New TcpClient

' Connect to port 5000 on the local machine
UpdateDisplay("Connecting to client", True)
client.Connect("127.0.0.1", 5000)

' Get the underlying stream
Dim stream As Stream = client.GetStream

' Seralise out instance of MyObject over the TcpClient's stream
using the XmlSerializer
UpdateDisplay("Sending..." & obj.ToString, True)
formatter.Serialize(stream, obj)

' Close the stream
stream.Close()

End Sub

Private Sub StartServer()

' This function is going to run until the server closes
' so set up a var that lets us know we want to run
Dim bRunning As Boolean = True

' Start the server
UpdateDisplay("Server starting")
server.Start()

While bRunning
Try
' This method will block until a connection is accepted
UpdateDisplay("Server waiting for connection...")
Dim client As TcpClient = server.AcceptTcpClient()

' Now we have a TcpClient with an underlying stream
' so we want to deserialise our object. This is
' pretty much the sending code in reverse.
UpdateDisplay("Server connected")
Dim Formatter As XmlSerializer = New
XmlSerializer(GetType(MyObject))

Dim obj As MyObject =
CType(Formatter.Deserialize(client.GetStream), MyObject)

UpdateDisplay("Received " & obj.ToString)
Catch
' If we get an error such as the connection getting
' closed from under us then signal to stop running
bRunning = False
End Try

End While

' Stop the server
Debug.WriteLine("Server stopping")
server.Stop()

End Sub

Private Sub UpdateDisplay(ByVal Data As String)
' Invoke a call to update the listbox
ListBox1.Invoke(New UpdateListBoxDel(AddressOf UpdateListBox), New
Object() {Data})
End Sub

Private Sub UpdateDisplay(ByVal Data As String, ByVal Direct As Boolean)
If Direct Then
' This method will update the listbox on this thread
UpdateListBox(Data)
Else
' Otherwise use this method that will use the listbox's thread
to
' do the update
UpdateDisplay(Data)
End If
End Sub

Public Sub UpdateListBox(ByVal Data As String)
ListBox1.Items.Add(Data)
Application.DoEvents()
End Sub

Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing

If Not m_ListenerThread Is Nothing Then
' If the TcpListener is listening then shut it down
StopServer()
End If

End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
' The server checkbox has been clicked so kick off a new thread
' and run our StartServer method on it
UpdateDisplay("Starting server")
m_ListenerThread = New Threading.Thread(AddressOf StartServer)
m_ListenerThread.Start()
UpdateDisplay("Started")
Else
' The checkbox has been unchecked so shut the server down
UpdateDisplay("Stopping server", True)
StopServer()
UpdateDisplay("Stopped", True)
End If
End Sub

Private Sub StopServer()

' Stop the TcpListener
server.Stop()
' and wait here for the thread to exit. The above call will cause
an
' exception in the listener thread so lets just wait until it is all
' closed up
m_ListenerThread.Join()

End Sub
End Class

<Serializable()> _
Public Class MyObject
Public EmployeeID As Long
Public Forename As String
Public Surname As String

Public Sub New(ByVal EmployeeID As Long, ByVal Forename As String, ByVal
Surname As String)
Me.EmployeeID = EmployeeID
Me.Forename = Forename
Me.Surname = Surname
End Sub

Public Sub New()
Me.EmployeeID = 0
Me.Forename = ""
Me.Surname = ""
End Sub

Public Overrides Function ToString() As String
Return EmployeeID.ToString & ": " & Surname & ", " & Forename
End Function

End Class

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:uX**************@TK2MSFTNGP11.phx.gbl...
You could look into talking over sockets, or possible store your data in
storage somewhere (a database) and have one poll it. Or maybe have them
send messages to each other via MSMQ/the messaging system. The latter
allows "fire and forget" and gives you options such as the whole thing not
breaking if one app isn't running. Depends what kind of communication you
are after though. Maybe sockets would be quickest but sometimes it is a bit tricky to do.

You can, for example, serialise objects and send them over sockets and have your listening app deserialise so the recipient gets a copy of the object
sent and you do minimal programming in between.

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is the best way to "talk" between them? They both run on the same PC.

Right now I'm just using text files to share information, etc...

(Not database applications.)

Thanks.


Nov 20 '05 #9
The OP might be able to get some valuable information from the code you
posted but what does he run on the VB6 side?
"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Here is an example. Create a new windows app, add a checkbox a listbox and a button. Start the app and check the checkbox to start the server (clear
it to shut the server down). Once the server has started click the button
to serialise/deseleralise the object through the socket. Obviously this
works standalone, but start two instances of the app and click the server
checkbox on one and press the button on the other and you'll see the exact
same code sending the object to a different app. This app could even be on another machine.

Nov 20 '05 #10
The OP said either VB6+VB.NET OR two VB.NET

Tom
"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
The OP might be able to get some valuable information from the code you
posted but what does he run on the VB6 side?
"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Here is an example. Create a new windows app, add a checkbox a listbox

and
a button. Start the app and check the checkbox to start the server (clear it to shut the server down). Once the server has started click the button to serialise/deseleralise the object through the socket. Obviously this
works standalone, but start two instances of the app and click the server checkbox on one and press the button on the other and you'll see the exact same code sending the object to a different app. This app could even be

on
another machine.


Nov 20 '05 #11
Yup... So given those two scenarios a .Net only solution won't work for one
of them :-)

I'll leave it to the OP to decide if .Net object serialization is the type
of "talk" he meant, perhaps it is.

"Tom Scales" <to****@softhome.net> wrote in message
news:qP********************@comcast.com...
The OP said either VB6+VB.NET OR two VB.NET

Tom
"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
The OP might be able to get some valuable information from the code you
posted but what does he run on the VB6 side?
"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Here is an example. Create a new windows app, add a checkbox a listbox
and
a button. Start the app and check the checkbox to start the server (clear it to shut the server down). Once the server has started click the button to serialise/deseleralise the object through the socket. Obviously
this works standalone, but start two instances of the app and click the server checkbox on one and press the button on the other and you'll see the exact same code sending the object to a different app. This app could even

be on
another machine.

Nov 20 '05 #12
WOW. Thanks everyone! Great responses (as usual)!

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Here is an example. Create a new windows app, add a checkbox a listbox and a button. Start the app and check the checkbox to start the server (clear
it to shut the server down). Once the server has started click the button
to serialise/deseleralise the object through the socket. Obviously this
works standalone, but start two instances of the app and click the server
checkbox on one and press the button on the other and you'll see the exact
same code sending the object to a different app. This app could even be on another machine.

Error handling etc is incredibly thin on the ground, this is just a demo.
Any comments welcome cos I'm still a .net noob myself :) If you plan on
using this kind of idea it is better to create a self-contained listener
object rather than hacking it the way I have here so that everything runs
from the one form. This is .net 1.1 and seems a bit different to how things worked in 1.0 IIRC.

Imports System
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Xml.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
Imports System.Net.Sockets
Imports System.Net

Public Class Form1
Inherits System.Windows.Forms.Form

Private Delegate Sub UpdateListBoxDel(ByVal Data As String)
Private m_ListenerThread As Threading.Thread
Private server As New TcpListener(IPAddress.Parse("127.0.0.1"), 5000)

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

' Create a new object that is populated with data
Dim obj As New MyObject(1, "Adrian", "Forbes")
' Create an XmlSerializer for the MyObject type
Dim formatter As New XmlSerializer(GetType(MyObject))

' Create new TcpClient
Dim client As TcpClient = New TcpClient

' Connect to port 5000 on the local machine
UpdateDisplay("Connecting to client", True)
client.Connect("127.0.0.1", 5000)

' Get the underlying stream
Dim stream As Stream = client.GetStream

' Seralise out instance of MyObject over the TcpClient's stream
using the XmlSerializer
UpdateDisplay("Sending..." & obj.ToString, True)
formatter.Serialize(stream, obj)

' Close the stream
stream.Close()

End Sub

Private Sub StartServer()

' This function is going to run until the server closes
' so set up a var that lets us know we want to run
Dim bRunning As Boolean = True

' Start the server
UpdateDisplay("Server starting")
server.Start()

While bRunning
Try
' This method will block until a connection is accepted
UpdateDisplay("Server waiting for connection...")
Dim client As TcpClient = server.AcceptTcpClient()

' Now we have a TcpClient with an underlying stream
' so we want to deserialise our object. This is
' pretty much the sending code in reverse.
UpdateDisplay("Server connected")
Dim Formatter As XmlSerializer = New
XmlSerializer(GetType(MyObject))

Dim obj As MyObject =
CType(Formatter.Deserialize(client.GetStream), MyObject)

UpdateDisplay("Received " & obj.ToString)
Catch
' If we get an error such as the connection getting
' closed from under us then signal to stop running
bRunning = False
End Try

End While

' Stop the server
Debug.WriteLine("Server stopping")
server.Stop()

End Sub

Private Sub UpdateDisplay(ByVal Data As String)
' Invoke a call to update the listbox
ListBox1.Invoke(New UpdateListBoxDel(AddressOf UpdateListBox), New
Object() {Data})
End Sub

Private Sub UpdateDisplay(ByVal Data As String, ByVal Direct As Boolean) If Direct Then
' This method will update the listbox on this thread
UpdateListBox(Data)
Else
' Otherwise use this method that will use the listbox's thread
to
' do the update
UpdateDisplay(Data)
End If
End Sub

Public Sub UpdateListBox(ByVal Data As String)
ListBox1.Items.Add(Data)
Application.DoEvents()
End Sub

Private Sub Form1_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing

If Not m_ListenerThread Is Nothing Then
' If the TcpListener is listening then shut it down
StopServer()
End If

End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
' The server checkbox has been clicked so kick off a new thread ' and run our StartServer method on it
UpdateDisplay("Starting server")
m_ListenerThread = New Threading.Thread(AddressOf StartServer)
m_ListenerThread.Start()
UpdateDisplay("Started")
Else
' The checkbox has been unchecked so shut the server down
UpdateDisplay("Stopping server", True)
StopServer()
UpdateDisplay("Stopped", True)
End If
End Sub

Private Sub StopServer()

' Stop the TcpListener
server.Stop()
' and wait here for the thread to exit. The above call will cause
an
' exception in the listener thread so lets just wait until it is all ' closed up
m_ListenerThread.Join()

End Sub
End Class

<Serializable()> _
Public Class MyObject
Public EmployeeID As Long
Public Forename As String
Public Surname As String

Public Sub New(ByVal EmployeeID As Long, ByVal Forename As String, ByVal Surname As String)
Me.EmployeeID = EmployeeID
Me.Forename = Forename
Me.Surname = Surname
End Sub

Public Sub New()
Me.EmployeeID = 0
Me.Forename = ""
Me.Surname = ""
End Sub

Public Overrides Function ToString() As String
Return EmployeeID.ToString & ": " & Surname & ", " & Forename
End Function

End Class

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:uX**************@TK2MSFTNGP11.phx.gbl...
You could look into talking over sockets, or possible store your data in
storage somewhere (a database) and have one poll it. Or maybe have them
send messages to each other via MSMQ/the messaging system. The latter
allows "fire and forget" and gives you options such as the whole thing not
breaking if one app isn't running. Depends what kind of communication you are after though. Maybe sockets would be quickest but sometimes it is a bit
tricky to do.

You can, for example, serialise objects and send them over sockets and

have
your listening app deserialise so the recipient gets a copy of the object sent and you do minimal programming in between.

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
If I have a VB6 and a VB.NET application, or 2 VB.NET applications

what is the best way to "talk" between them? They both run on the same PC.

Right now I'm just using text files to share information, etc...

(Not database applications.)

Thanks.



Nov 20 '05 #13
My first scenario includes a VB6 app and a VB.NET app. The VB6 app sends
some variable/value sets over to the VB.NET app for further processing.
It's minimal data.

I will keep all of this in mind for future development though. It sounds
like sharing data between 2 .NET apps can be done by remoting and other
ways. I just I have to educate myself more.

Thanks everyone!

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
Yup... So given those two scenarios a .Net only solution won't work for one of them :-)

I'll leave it to the OP to decide if .Net object serialization is the type
of "talk" he meant, perhaps it is.

"Tom Scales" <to****@softhome.net> wrote in message
news:qP********************@comcast.com...
The OP said either VB6+VB.NET OR two VB.NET

Tom
"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
The OP might be able to get some valuable information from the code you posted but what does he run on the VB6 side?
"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
> Here is an example. Create a new windows app, add a checkbox a listbox and
> a button. Start the app and check the checkbox to start the server (clear
> it to shut the server down). Once the server has started click the

button
> to serialise/deseleralise the object through the socket. Obviously this > works standalone, but start two instances of the app and click the

server
> checkbox on one and press the button on the other and you'll see the

exact
> same code sending the object to a different app. This app could
even be on
> another machine.


Nov 20 '05 #14
The shallow XML Serialisation is incredibly simple and you can easily make
VB6 emulate it using basic XML such as the DOMDocument. The class I used to
test reduces to

<MyObject>
<EmployeeID>1</EmployeeID>
<Forename>Adrian</Forename>
<Surname>Forbes</Surname>
</MyObject>

Just to prove the concept I wrote a VB version of my test app and they can
both talk to their own app or talk to each other, so are totally
interchangeable. It is only XML over sockets, simple.

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
The OP might be able to get some valuable information from the code you
posted but what does he run on the VB6 side?

Nov 20 '05 #15
Adrian: That's great!

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote...
The shallow XML Serialisation is incredibly simple and you can easily make
VB6 emulate it using basic XML such as the DOMDocument. The class I used to test reduces to

<MyObject>
<EmployeeID>1</EmployeeID>
<Forename>Adrian</Forename>
<Surname>Forbes</Surname>
</MyObject>

Just to prove the concept I wrote a VB version of my test app and they can
both talk to their own app or talk to each other, so are totally
interchangeable. It is only XML over sockets, simple.

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
The OP might be able to get some valuable information from the code you
posted but what does he run on the VB6 side?


Nov 20 '05 #16
Hi Adrian,

Could you please write which code you modified in order to communicate with
xml?

thanx volker

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
The shallow XML Serialisation is incredibly simple and you can easily make
VB6 emulate it using basic XML such as the DOMDocument. The class I used to test reduces to

<MyObject>
<EmployeeID>1</EmployeeID>
<Forename>Adrian</Forename>
<Surname>Forbes</Surname>
</MyObject>

Just to prove the concept I wrote a VB version of my test app and they can
both talk to their own app or talk to each other, so are totally
interchangeable. It is only XML over sockets, simple.

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
The OP might be able to get some valuable information from the code you
posted but what does he run on the VB6 side?

Nov 20 '05 #17
Exactly my thoughts. A quick example of the "talking" portion would be most
helpful. Thanks so much for the great responses!

"Volker Jobst" <bu****@gmx.de> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Adrian,

Could you please write which code you modified in order to communicate with xml?

thanx volker

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
The shallow XML Serialisation is incredibly simple and you can easily make VB6 emulate it using basic XML such as the DOMDocument. The class I used
to
test reduces to

<MyObject>
<EmployeeID>1</EmployeeID>
<Forename>Adrian</Forename>
<Surname>Forbes</Surname>
</MyObject>

Just to prove the concept I wrote a VB version of my test app and they

can both talk to their own app or talk to each other, so are totally
interchangeable. It is only XML over sockets, simple.

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
The OP might be able to get some valuable information from the code you posted but what does he run on the VB6 side?


Nov 20 '05 #18
Thanks alot Volker!

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
A bit rough 'n' ready but find acched for and class

"Volker Jobst" <bu****@gmx.de> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Adrian,

Could you please write which code you modified in order to communicate

with
xml?

thanx volker

"Adrian Forbes [ASP MVP]" <so***@noemail.zzz> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
The shallow XML Serialisation is incredibly simple and you can easily make VB6 emulate it using basic XML such as the DOMDocument. The class I used
to
test reduces to

<MyObject>
<EmployeeID>1</EmployeeID>
<Forename>Adrian</Forename>
<Surname>Forbes</Surname>
</MyObject>

Just to prove the concept I wrote a VB version of my test app and they

can both talk to their own app or talk to each other, so are totally
interchangeable. It is only XML over sockets, simple.

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:uW**************@TK2MSFTNGP11.phx.gbl...
> The OP might be able to get some valuable information from the code you > posted but what does he run on the VB6 side?



Nov 20 '05 #19
if it is small amount of information - you can use registry
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is
the best way to "talk" between them? They both run on the same PC.

Right now I'm just using text files to share information, etc...

(Not database applications.)

Thanks.

Nov 20 '05 #20

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Schrodiodo | last post: by
3 posts views Thread by Darren | last post: by
4 posts views Thread by Patrick | last post: by
21 posts views Thread by Helge Jensen | last post: by
5 posts views Thread by G. Stewart | last post: by
6 posts views Thread by Jose Perez | last post: by
33 posts views Thread by bill | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.