NO

Author Topic: Program to Program Communications  (Read 3147 times)

dbingamon

  • Guest
Program to Program Communications
« on: August 12, 2011, 10:24:17 PM »
I'm working on a program that will perform data acquisition and other programs.
What I'd like to do is have a Data Acquisition engine program always running and when another executable runs, I want to get pressure and temperature readings and be able to send a command back to the DA Engine to turn on a valve.

I've thought about DDE and then I hear people talking about DCOM and I figure there are probably other ways to send something like a short command along with a float point value.

So I'd like to hear some suggestions of ways to do this and then I'll determine the best route to go for my situation.

Been writing C since 1986 and using Windows SDK since 1998 but I haven't seriously used DDE.

CommonTater

  • Guest
Re: Program to Program Communications
« Reply #1 on: August 12, 2011, 10:53:09 PM »
Ok... take a look at the WM_COPYDATA message... and PostThreadMessage() commands... I'm sure you'll get some ideas from that.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Program to Program Communications
« Reply #2 on: August 13, 2011, 02:23:51 PM »
Small example of using WM_COPYDATA.
Start that least program twice.

Multiple receivers (TestDlgWM_CopyDataM.zip)
« Last Edit: August 13, 2011, 03:04:35 PM by timovjl »
May the source be with you

Offline daniel_bingamon

  • Member
  • *
  • Posts: 22
Re: Program to Program Communications
« Reply #3 on: August 15, 2011, 06:03:54 PM »
Thanks, I'll look at these.