pass string between two programs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i would like some assistance on how to pass data or string from one vb program to another c# program. can this be done with vbscript code to send data to the c# program?

Thanks
 
In general, you may look for the keyword "interprocess communication" (IPC).
More information is neccessary for any better advice; What kind of VB
program is this? Classic VB, VB.net, VBScript? How long is that string? Are
the processes always on the same computer?

Niki

equip200 said:
i would like some assistance on how to pass data or string from one vb
program to another c# program. can this be done with vbscript code to send
data to the c# program?
 
Hi,

To do that you will need some mechanism of IPC, if both programs are based
on .net you can use remoting, if not you still have several options,
including a TCP/IP connection, or named pipes ( not directly supported in
the framework IIRC )

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

equip200 said:
i would like some assistance on how to pass data or string from one vb
program to another c# program. can this be done with vbscript code to send
data to the c# program?
 
With a little more details about the applications in question, we may be
able to help you.

1) what are these programs? Are they both stand-alone apps? Is either one
aware of the existence of the other?

2) do you own the source to both? In other words, if you need to modify one
or the other, can you?

3) is this on a client computer (your workstation), all on a server, or is
one all on a client while the other is on a server?

4) Is it possible that one will be running when the other is not? We you
need to start one or both of the apps?

5) What is the business goal of moving this data? Are you automating a
"data-re-entry" process from one app to the other?

--- Nick

equip200 said:
i would like some assistance on how to pass data or string from one vb
program to another c# program. can this be done with vbscript code to send
data to the c# program?
 
An OLE Automation interface... this nearly always means that the first
application exposes a series of COM components.

Your second app, that you wrote, can simply refer to those COM components.
(Add them to your references). Your .NET app will have access to the
objects, and can perform the activities that this interface allows.

Essentially, "passing" data is simply a matter of calling methods in the COM
components exposed by the first standalone app, and then using them in the
second one (the one you wrote). No need for IPC or web services, etc.

I believe that one of the other responses gave you a link to Microsoft
documentation on calling COM components from .NET. If not, google this.
There are hundreds of good resources.

None of this will make that particular COM interface clear. For that, your
best bet is to go to the company that is selling the app, and ask for a
programmers reference guide. The book may be dated (it will probably refer
either to VC++ or VB), but it will show you how the methods are used, and in
what order, to get the information you want.

Hope this helps,
--- Nick

equip200 said:
in responf to your questions.
#1. The program that will be sending the data has this

Scripting support

program features OLE automation interface that exposes objects and methods
that can be accessed from any programming language including scripting
dialects such as JScript (JavaScript) and VBScript. The scripting
capabilities allow you to automate time consuming database management
tasks. Using scripting you will be able to create automatic downloaders,
maintenance tools, and exporters customized to your specific needs.
They are both standalone app. they are not aware of each other.

#2. Ican get source for the sending app and i made the receving app. so yes.

#3. They are both on the same workstation.
#4. It is posible that one will be running and no tthe other, but i will start them up manualy.
#5. The sending app is built to scan trough and find certain criteria and
if something is true print it to a file. I would like to have it send it to
a program so it can process it insted of manual processing.
Hope this helps,
Thanks
program to another c# program. can this be done with vbscript code to send
data to the c# program?
 
Back
Top