Welcome! Log In Create A New Profile

Advanced

communication between two programs

Posted by Patrick Thijs 
Patrick Thijs
communication between two programs
April 01, 2009 01:22PM
Hello,

I'm searching for a way to obtain a simple form of communication between two windev apllications.
Both the applications run on the same pc (this is allways so).
I need to be able to communicate at least once per second, without creating to much processorload or diskacces.
I was wondering if it was possible to exchange information between two applications by means of a memory zone . Are there any Windev'ers here arround who have some experience with this subject ?

best regards

Patrick
Erik Schwarz
Re: communication between two programs
April 01, 2009 02:06PM
Hi Patrick,

should be easy by setting up a network connection (socket functions),
one app acting as server and one as client or both as client and server depending on your demands.

Erik
Arie
Re: communication between two programs
April 01, 2009 02:23PM
What kind of info do you need to send/receive?
I'm using 2 methods:
1. PostMessage(). Both apps need to know each others handle for that, which can be passed via ini-file or even the database.
2. HSendMessageToClient(). You need to use HFCS for that.

Another way is using sockets (be ware of firewall issues).

Fabrice made a memzone-class once. I believe it's bundled with his courses. Maybe he can send you this class?

Arie
Fabrice Harari
Re: communication between two programs
April 01, 2009 08:07PM
Hi all...

my memory zone class is NOT related to this particular problem (it's an enhancement for using standard - ie used in ONE program - memory zones)

But I did implement a communication system between 2 programs a few years back (using wd 5.5 at the time) with a shared memory area (api declaration and all that) + post/sendmessages to let the other party know when there is something in the shared memory...

So yes, it's certainly doable using api and messages, but no, I cannot provide the actual code, as this was done for a customer...

Best regards

Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: