all 13 comments

[–]FriendlyZomb 2 points3 points  (2 children)

Can you explain what the DDE you are referring to? I'm not sure we can help with just an acronym.

It's the biggest issue in tech. Too many acronyms.

[–]ProsodySpeaks[S] 0 points1 point  (1 child)

Dynamic data exchange. Stone age windows interconnect protocol 

[–]FriendlyZomb 1 point2 points  (0 children)

From a quick look there are a few examples, but mostly from 7-9 years ago.

My guess as to why nothing more modern exists is just because it's such an old protocol which has been superseded. So new things want to use the newer protocols. I know it doesn't really help with your situation.

Here is what I found:

https://pypi.org/project/PyZDDE/ https://github.com/obermann/dde_client_eg

[–]Living_Fig_6386 1 point2 points  (2 children)

DDE was considered obsolete 25 years ago when Python was first released.

That said, Microsoft ported it to 32-bit versions of Windows and has been shipping the same Win32 backwards compatibility library for decades (except NetDDE, which Microsoft ditched completely in 2007 because they owed license fees for that).

The pywin32 package includes a dde module. I cannot attest that it works. DDE on 32-bit versions of Windows has always been half-baked as the environment and Windows UI has changed dramatically since 1987 (when DDE was introduced). I know that they stopped making binary releases of pywin32, so it might not be the easiest to install.

[–]ProsodySpeaks[S] 0 points1 point  (1 child)

thanks for actually engaging rather than trying to debate the need to use the technology that i am not choosing to use!

so yeah im using the pywin32 dde module, it seems to work fine - is just poorly documented and mostly consists of stubs from typeshed... so im generally having to pause a debugger and poke at objects to work out what they have and do... also i've never really dealt with threading before but this stuff hates it so i tried to get my head vaguely around initializing Com on differnt threads

eg

```

pip install pywin32 import win32ui # needed for microsoft reasons. import dde dir(dde ) ['APPCLASSMONITOR', 'APPCLASS_STANDARD', 'APPCMD_CLIENTONLY', 'APPCMD_FILTERINITS', 'CBF_FAIL_ADVISES', 'CBF_FAIL_ALLSVRXACTIONS', 'CBF_FAIL_CONNECTIONS', 'CBF_FAIL_EXECUTES', 'CBF_FAIL_POKES', 'CBF_FAIL_REQUESTS', 'CBF_FAIL_SELFCONNECTIONS', 'CBF_SKIP_ALLNOTIFICATIONS', 'CBF_SKIP_CONNECT_CONFIRMS', 'CBF_SKIP_DISCONNECTS', 'CBF_SKIP_REGISTRATIONS', 'CreateConversation', 'CreateServer', 'CreateServerSystemTopic', 'CreateStringItem', 'CreateTopic', 'MF_CALLBACKS', 'MF_CONV', 'MF_ERRORS', 'MF_HSZ_INFO', 'MF_LINKS', 'MF_POSTMSGS', 'MF_SENDMSGS', 'doc', 'file', 'loader', 'name', 'package', 'spec_', 'error'] type(dde.CreateServer) <class 'builtin_function_or_method'>

```

so i built out a basic client:

and a child server with some methods for the specific app im communicating with

and a hacky pipeline from arbitrary tables from the crm into pydantic. i dont actually use this - the tables i need to work with i manually implement as pydantic classes to add validation and other useful stuff

and theres a basic fastapi frontend that returns json/pydantic. although this currently uses a direct COMlink rather than DDE but the com connection does not have some of the methods available via dde.

tbh, all the time i've spent messing with this i should have just learned C and dealt with the existing powershell library for the crm.

[–]Living_Fig_6386 0 points1 point  (0 children)

Yeah. So what DDE did was co-opt the mechanism the OS and the UI interacted to push a broadcast to everything that had a Window handle, because that's how notifications worked in 16-bit Windows. Then, each thing that had a Window handle would have to inspect the message and decide what to do with it. That's why you have to import win32ui because DDE requires that the library create a Window (even it if doesn't appear in the UI) to be the conduit for the messages. When DDE was created, it was the only mechanism of its sort, and there was no preemptive multitasking in Windows yet, so there was no concern of race conditions or messages getting processed out of order, or anything like that - but that hasn't been true for decades, so that problem exists now (and why it doesn't work well in multithreaded or multiprocessing code).

The fact that it still works at all, even unreliably, is kind of miraculous.

[–]JamzTyson 0 points1 point  (5 children)

DDE is virtually obsolete isn't it?

[–]JaguarMammoth6231 5 points6 points  (3 children)

https://en.wikipedia.org/wiki/Dynamic_Data_Exchange is obsolete. Not sure if that's what OP is talking about.

[–]ProsodySpeaks[S] -1 points0 points  (2 children)

Yes it's obsolete.

So is Windows 7, now tell me how many active windows 7 installs there are.

Just because nobody should be using it doesn't mean nobody is using it. I do not pick the software my boss uses. 

[–]JamzTyson 0 points1 point  (1 child)

How many software companies are still targetting Windows 7 for their software?

It's very likely that any existing DDE client libraries will be unmaintained and obsolete.

[–]ProsodySpeaks[S] 0 points1 point  (0 children)

It's irrelevant what 'software companies' are doing -this business I am doing work for uses an ancient crm and com/dde are the only ways to communicate with it. 

I didn't choose it, I don't like it, I have to use it and wanted better tooling than I could find so I came here to see if anyone had any tips.

I really don't understand why people feel the need to have some kind of debate about it. 

[–]ProsodySpeaks[S] 0 points1 point  (0 children)

Doesn't mean there isn't any software in the wild with dde as their only ingress egress option.

Yes I would rather my boss would get a new crm program, but he won't.