We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Communicating between applications

Minos111998
Minos111998 asked
on
Medium Priority
238 Views
Last Modified: 2010-05-03
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
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks waty for the reply. I think that's what I'm looking for. Either mailslots or pipes. Thanks for your code as well.

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.

Commented:
Yes, you have to use the same mailslotname in the both applications.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.