Passing Data Between Applications

  • Thread starter Thread starter AndyDunning
  • Start date Start date
A

AndyDunning

Hello,

I'm interested in establishing the best way to pass information between a vb
script and a .net application.

We have a VbScript that runs on a users pc every time a phone call is routed
to that user, this script is provided by out telecom provide. The Script
contains call details e.g. incoming number.

My aim is to pass data from this vb script to my .net app.

Suggestions as to the best way to proceed would be much appreciated.

Thanks

Andy
 
you never said if your .net app is running on all of the client's machines
or just on a single server...

you never said if your app is already running when the vbscript is called or
if you want/need the vbscript to start your app.

does your app run entirely in the background, or does it have a user
interface?

Please provide details.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Nick,

The .Net app has a UI and should already be running on the client pc. Each
time the phone system passes a call to a particular agent the vbscript runs
on that pc. I guess however we should cover the scenario where the .net app
has been closed by the user, but they have still be allocated a call. This
would only happen if they had closed the .net app by mistake, in which case
the vbscript should ideally auto start the .net application.

Hope this clarifies things, thanks for you interest in my question.

Andy
 
Sounds like a call center application.
So, you need the information just as soon as it is available.

I would suggest that you get familiar with remoting.

Part one:
Create a remote component (singleton). It will have three functions:
1) a client can register a callback (delegate)
2) a client can ask for any queued information
3) a client can pass in information. If there are no callbacks registered,
then queue the data and start an application (configured in a config file).
Otherwise, send the data in the callback.

Part two:
create a little console app that takes the parameters provided on the
command line and calls the remote component (function three). The console
app ends.

Part three:
In your .net app, during start up, call the remote object and registers a
callback. Immediately ask for any queued information. (expect nothing, but
you will get data if the remoted object had to start your app).
When you get the callback, you will get the data passed from the console app
on its command line

Part four:
modify the VBScript to call the console application, passing the data on the
command line.

notes: when the remote object queues the data, it can do it to a local text
file or MSMQ or a database. It really shouldn't keep it in memory, because
it's caller will quit, potentially before another caller starts, which means
it could end up garbage collected.

Hope this helps.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Back
Top