Comunicating processes

Hello.

I need to write a program that can be launched multiple times and its instances should be able to comunicate. Give me some advice please what do I nedd to look for and where.

Thanx.

Comments

  • : Hello.
    :
    : I need to write a program that can be launched multiple times and its instances should be able to comunicate. Give me some advice please what do I nedd to look for and where.
    :
    : Thanx.
    :

    Hmm.. First I thought that memory mapped file would do the trick but then you would have to code somekind of message queue. Then I thought about mailslots but I'm not really familiar with those, maybe they would help you. Dynamic Data Exchange would possibly do also. Sockets would be easy to use but they add a lot of overhead to code.

    But if you are making windowed application Windows Messages would propably be the best solution. All you need to do is to create window with specific class name. Applications tries to find windows with that class name and send somekind of "hello" message to them and other windows could then update their lists of window handles. This stage may sound little complicated but after you figure this out communication is pretty straightforward with WM_COPYDATA messages.

    See MSDN about different kinds of IPC (InterProcess Communication) methods and tell us which method you chose.
  • Thank you.

    I need to write a demo program so I'll probabbly choose several types of communications. I'll write which ones did I choose. And for all who will be interested I can send the final code by e-mail.
    I just needed directions where to look for information. So thank you for your info, it helped me a lot.

    Spooky


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories