Solved

Talking between programs over a network

Posted on 2001-06-04
6
211 Views
Last Modified: 2013-11-13
I have a program which allows an operator to see customer information when the customer calls in using caller ID information. This information comes from a third party control.

The problem I am having is that I need the program to alert other computers on the network that a person called up and what the caller ID information is.

I thought about setting a timer on each copy of the program on each computer which will check the database backend for the information at set times, but this seems sloppy and would create too much network traffic.

What I was hoping for was to add some code to my current program that would set a bit and for the other computers on the network to pick this bit up and respond.

If you need additional clarification, please let me know.

Thanks!
0
Comment
Question by:dijon316
6 Comments
 
LVL 1

Expert Comment

by:tsturgeon
ID: 6154200
dijon316,

Instead having each machine poll a central db, you could  push a little file to the machine(s) that you want to be notified.  

The file--a little .txt file would
suffice--would contain the caller ID, date/time stamp, TAPI information, or whatever other info you required.

The client program could then monitor a local directory for an incoming file, and respond appropriately.

Also, a client machine could send back a little file acknowledging receipt and/or action taken.  

Having the apps communicate with little files can be better than relying on polling, and can give you great control.

Just a suggestion.

tsturgeon
0
 

Expert Comment

by:tunmire
ID: 6154346
What about setting up winsock on each of your applications to listen to a preset port. Then from the recieving app broadcast a short binary that would signal the other computers. This could be done using UDP and the winsock.
0
 

Accepted Solution

by:
sunnysideandy earned 200 total points
ID: 6154521
I agree with tunmire - use the WinSock's method .SendData on the "server" connected to the backend database and each client app would implement the _DataArrival event on the WinSock.  Look at the excellent and easy example on MSDN:

http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconusingwinsockcontrol.htm
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 1

Expert Comment

by:superchook
ID: 6154534
tunmire's is the more elegant of the two methods proposed, but if putting Winsock to work is a bit fiddly for you (it's not too hard though), look at NetDDE.  This is a superset of DDE, and your prog would then be compliant with many apps - not just your own custom solutions.

Excel, Access, Word and many others can all hook into your NetDDE items to access and act on their contents (- simultaneously !).

There are several DDE samples on the MSDN site, but NetDDE is a little harder to find.  It's worth the effort.




0
 
LVL 5

Expert Comment

by:Droby10
ID: 6154629
or you could create a dcom middleware component (static across the "application" domain) that performs agent notification.
0
 

Author Comment

by:dijon316
ID: 6158168
Even though tunmire came up with the original solution, I decided to go with sunnysideandy mainly for supplying a link so that I could follow the sample program on my own.

I was able to create the sample of a chat program over the network without a problem. It was very easy. By following the sample, I am sure that I could modify it for my purpose without a problem.

Thanks sunnysideandy and tunmire and to all the rest who supplied comments!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video teaches viewers about errors in exception handling.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question