Based only on what you've mentioned there are some things that jump out
at me. The DDEML is thread specific. That means all calls to the
DDEML must be from the same thread that called DdeInitialize.
Furthermore, they must also execute on a thread with a message loop.
Unless you have created your own message loop thread from within the
remotable object that all DDEML calls are made on then you're going to
Regardless, I'm not sure why DdeConnect would hang. I would have
expected it to return an error code or something. How long does it
hang? Can you provide some of the code? The functions where the DDEML
calls are made will probably be fine for now.
Have you explored other options besides DDE? DDE is old and hard to
If DDE is your only option then you can try the following class library
to get DDE to work in .NET. It uses the DDEML and the entire source
code is provided.