Thread: Communication between programs?

  1. #1
    Registered User
    Join Date
    Mar 2005

    Communication between programs?

    Im want to do some simple communication between two programs, but i dont know how to do it. I searched for "communication between programs" but this doesnt help. It doesnt have to be very efficient, since only very little data is exchanged. I thought about using invisible controls, but this seems more like a hack to me. I looked a little at dde but this looks like overkill. Anybody got an idea..... i only need some keywords i can look for. The communication is only between programs on the same computer.
    Last edited by johny145; 06-01-2005 at 02:11 PM.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Communicating between two programs or between two instances of one program is called Interprocess Communications or IPC. Probably the easiest IPC method to use is the WM_COPYDATA message. This involves a window message that one program can send to the window in the other program. You would find the target window with the FindWindow function and the class name of the window. Other IPC methods you could use are pipes, mailslots and mapped files. Out of the list of IPC methods, I would avoid using the clipboard (anti-social as it deletes whatever the user had in the clipboard), COM (too complex), RPC (too complex), DDE (too complex) and sockets (some firewalls may not let you bind to a port).

  3. #3
    Registered User
    Join Date
    Mar 2005
    Thak you anonytmouse, im always amazed by the amount of your knowlege .

  4. #4
    train spotter
    Join Date
    Aug 2001
    near a computer
    There is also the HWND_BROADCAST type msgs.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unkown Hang
    By Bladactania in forum C Programming
    Replies: 31
    Last Post: 04-22-2009, 09:33 AM
  2. Looking for communication lib
    By BrownB in forum C Programming
    Replies: 3
    Last Post: 04-27-2005, 10:01 AM
  3. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  4. communication
    By in need of help in forum C Programming
    Replies: 3
    Last Post: 12-27-2002, 03:56 PM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:12 AM