views:

200

answers:

4

I need a small communicator between an application/background process and the gadget, I think its easiest to make own activex module that has just getText() and setText(). I need to pass a string once per second or so. I guess the activex object should use shared data so that another new activexobject() (created by javascript gadget page) would have access to data set by EXE.

what would be the best way to do this activex ? should I call some myactivex.setText() method from running process, but how to make the data shared between activex modules in this case? which THREADING mode to choose? does INSTANCING affect something? Should I create Automation object from delphi GUI?

A: 

I think wich your best option is use indy sockets to comunicate 2 o more applications. For data transfer between applications, I use the Content-Type headers in HTTP to allow different representations (Text, binary, XML).

Bye.

RRUZ
I believe shared memory or PostMessage or similar would be faster..??
Tom
+1  A: 

You need some sort of IPC (Inter process communication). You have numerous options:

  • Sockects
  • Messages
  • Named Pipes
  • Shared Memory
  • Mailslots
  • Files (notifications) ....

There are many ways, I just described the most popular ones. If you are looking for a fast and easy to use solution you can check my IPC (Named Pipes)

Runner
A: 

You could use mailslots (also include in the JVCL I believe). They work well for one way communication.

skamradt
A: 

the simplest (I think) is to use SendMessage with WM_COPYDATA.

Despatcher
Do you have a working example of this?
Andrew