Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Passing data between two Windows Apps - ActiveX or DDE?

Posted on 2004-09-27
4
Medium Priority
?
652 Views
Last Modified: 2013-11-20
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
0
Comment
Question by:XWL
4 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 12158356
0
 
LVL 6

Expert Comment

by:Amritpal Singh
ID: 12158487
plz have a look at the following link
http://www.funducode.com/comdcom.asp
i hope it'll be of any help
0
 

Accepted Solution

by:
MartinSGill earned 1000 total points
ID: 12158840
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.
0
 
LVL 5

Expert Comment

by:info_expert
ID: 12160773
Hi,


Ok if you need to use client server cummunication or so, then use sockets.
Believe me, its really simple , by reading johnnie's windows sockets tutorial,
follow this unique link:

http://www.hal-pc.org/~johnnie2/winsock.html


If you want most of the work done for you then better look for the library libwww at www.w3.org/Library/



Regards.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question