Minos111998
asked on
Communicating between applications
Hi all,
Here's my problem:
I need some form of communication between 2 different running VB programs. For example, I may run a method in Prog1 to send a message "Testing 123" to Prog2. And in Prog2, an event will probably be triggered, and the sent message can be read. The message passed between the two programs may be a string or even 2 or 3 strings.
How should I go about doing this? Please point me in the right direction.
Perhaps this behavior is appropriate to be made into a OCX. That is, the control will take care of the messaging, the 2 programs just need to add this control. If so, I believe the 'communication' part of the problem would still remain the same.
Maybe such a ocx already exists, but I would still like to know how to achieve this.
Thanks.
Minos
Here's my problem:
I need some form of communication between 2 different running VB programs. For example, I may run a method in Prog1 to send a message "Testing 123" to Prog2. And in Prog2, an event will probably be triggered, and the sent message can be read. The message passed between the two programs may be a string or even 2 or 3 strings.
How should I go about doing this? Please point me in the right direction.
Perhaps this behavior is appropriate to be made into a OCX. That is, the control will take care of the messaging, the 2 programs just need to add this control. If so, I believe the 'communication' part of the problem would still remain the same.
Maybe such a ocx already exists, but I would still like to know how to achieve this.
Thanks.
Minos
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, you have to use the same mailslotname in the both applications.
ASKER
But I have another question. Since two applications are going to have this class and if I use this class directly, wouldn't that mean that each app will be only able to write to it's own mailslot and read from it. I need two mailslots because the information path should be bidirectional.
Would the solution be to modify the MailSlotName variable of the CreateFile in MailWrite? That would mean fixing the mailslot names of both applications.
Is that the way or is there some other way?
Thanks a lot in advance.