Question : Passing data between two Windows Apps - ActiveX or DDE?

Hi there,

I am facing a challenge to decide which tech is good for passing data between two windows applications (for Win2k).  - ActiveX automation or DDE?

It would be greatly appreciated if someone gives me an ActiveX (or DDE?) sample/Link to a simple sample to show how the server and client apps are implemented to exchange data.

XWL

Answer : Passing data between two Windows Apps - ActiveX or DDE?

It depends really on what you plan to pass around.

There are 3 basic methods two of which have already been outlined.

1) COM
2) Windows Messages
3) Shared Memory

If you just want to send a trigger to another window, then windows messages are your best bet.
Adv: Nice and easy to implement, but no really data that you can pass.

COM gives you protatbility and expandability. It allows any app to communicate with your application. The disadvantage is the COM in c++ is not that easy, even with ATL, and you'll have a steep learning curve.

Shared memory has teh advantage that it's really fast. The thing you need to be careful of though is parrallel access, so you will need to lock access to it with mutextes, simple critical sections won't work, as the access is by different processes.

Shared memory requires you to reserve enough system memory for the largest piece of data you will ever send (unless you use shard files, but that's very slow) and hence taking up system resources for the whole time your application is running.

COM will also allow you to exchange data between apps over the network, if taht is a possible future scenario then COM is the one to go for.

You must decide exactly what you need to pass and how it needs to be passed to decide which method suits you best.
Random Solutions  
 
programming4us programming4us