Discussion Locked

Visual Basic distributed application

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I would like to access a variable created by one VB application and store it in a variable in a second VB application on the network. Because my application will exchange data frequently (every few seconds) I dont want to use a file on disk (get # and put #), but would rather access the variable in memmory directly in order to limit disk read/write operation. Is this possible and if so how would I do it? Please include code syntax.

5 replies

by blaine moore

When one object connects to the other object over the network, set up a property or set of functions.

Object A is the first app that wants to store a variable value on Object B

In A:
dim B as MyObjectB
set B = new MyObjectB

sub storeValue(string Var)
B.setValue(Var)
end sub

function retrieveValue()
retrieveValue = B.getValue()
end function

In B:

dim AVariable as String

public sub setValue(Var)
AVariable = Var
end sub

public function getValue()
getValue = AVariable
end function

If you need me to elaborate, just send me an email.

by cogsdalesoftware

There are lots of different methods of interprocess communication in Win32: Windows Sockets, remote procedure calls, NetBIOS, named pipes, mailslots, Distributed Component Object Model (DCOM), more...

Try using named pipes - see the msdn article (it has source code):

Q177696 HOWTO: Use Named Pipes in a Visual Basic 32-bit Program

Hope this helps

This discussion is closed to new replies.