When it comes to DDE what are the options?

UncleRonin

Well-known member
Joined
Feb 28, 2006
Messages
230
Location
South Africa
Programming Experience
5-10
I am being forced to interface with an old PC which uses DDE to pass on data. I've done some checking and it seems MS decided that DDE is no longer supported and the only way to use it is to either create a COM library for use in .NET or to develop the entire thing in VB6 which has built in support for this... I'm not lying when I say that neither of these is appealing in any shape, way or form! :(

I already have a previous version of the software that's needed so developing the VB6 application isn't really much of an issue. I like libraries though so that would be my first choice... the question is how sensible is it to make a COM library for this? From what I've seen so far it looks like all the DDE functionality is built into VB6 controls and there is no actual class for this so would I have to have full on Labels, etc. even though I only want access to the DDE functionality? I am not very experienced with VB6 so I really don't much about how it handles this...

What do you guys recommend? Any suggestions?
 
I checked it out and seems to handle most things. The support and interaction on the boards there is pretty bad though - no one answers any questions!

In the meantime I've implemented the functionality in the VB6 application and everything is working nicely. This time I didn't reinvent the wheel... now that's rare! :rolleyes:

Some info for anyone else who has to use DDE: when using DDE on Windows XP and later always make sure you enable the Network DDE and Network DDE DSDM services for network interaction. They were disabled because of a serious vulnerability back in the day but I'm assuming this has been fixed by now (three service packs later). Also if the DDE server is running on Windows XP or later be prepared for disappointment. I've noticed that a conversation can be established with remote PCs but the actual exchange of data doesn't seem to work. I must be missing something but in my situation this isn't an issue so I'm lucky :p

Most important note of all: don't use DDE unless you absolutely have to. It's slow, unstable and way too complex for what little it provides. You're better off writing full on TCP client/server applications - it's faster and always works! It's a good thing they've abandoned DDE because it really gets nasty when used across a network.
 
I am in the same boat as UncleRonin. I need to use DDE. I work in the controls world and DDE and NetDDE is still very much alive when using and HMI or PLC. I am not a software engineer but a controls engineer. My programming knowledge is not what I wish it were. I came across the above mentioned NDDE dll and started looking at the example program. It looked fairly simple to implement. The console app works fine but I tried to implement it in a windows form and I am having trouble. I need the Server (not the client) side only.

Can anyone give me a push? A baisc app like the example from the NDDE project but in a windows form instead of a console app is what I am shooting for.

Thanks!
 
In what way is the windows app deficient? I can't see a logical reason for there being a difference?
 
In what way is the windows app deficient? I can't see a logical reason for there being a difference?

When I debug the app the client will not connect and I get the following in the "Immediate Window":

A first chance exception of type 'System.ObjectDisposedException' occurred in NDde.dll
A first chance exception of type 'System.Reflection.TargetInvocationException' occured in mscorlib.dll

Not sure what to do to resolve this.
 
Back
Top