General discussion

Locked

Visual Basic distributed application

By dksj ·
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.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Visual Basic distributed application

by Blaine Moore In reply to Visual Basic distributed ...

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.

Collapse -

Visual Basic distributed application

by dksj In reply to Visual Basic distributed ...

The question was auto-closed by TechRepublic

Collapse -

Visual Basic distributed application

by CogsdaleSoftware In reply to Visual Basic distributed ...

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

Collapse -

Visual Basic distributed application

by dksj In reply to Visual Basic distributed ...

The question was auto-closed by TechRepublic

Collapse -

Visual Basic distributed application

by dksj In reply to Visual Basic distributed ...

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Software Forums