Making DDE connection from WCF service hosted in console app

I have WCF service hosted in console app. Service tries to connect to opened windows application via DDE protocol. No luck. Where is the problem? Console app is running in my account, as the dde windows app.


I'm not expert in this field, but I believe DDE requires that you have a running message pump (which a console application lacks), so you may have better luck hosting your WCF service in a WinForms app.

You have provided so little details about the problem that is going to be nearly impossible to give you a definitive answer. However, your comment to Allon's answer is interesting.

If i run listener in console without WCF, all is fine

So your DDE application is listening for something? I now have to assume that you have attempted to create a DDE client that subscribes to an advisory loop via DdeClient.StartAdvise. This method of data retrieval is highly dependent on a message pumping mechanism.

When you create an instance of DdeClient it will by default create its own message pump on a separate thread to receive these advisory notifications. That would explain why it works when you leave your code in a basic console application.

However, when you mix WCF there may be some adding complexities particularly concerning threads that may have to be dealt with manually. The only way I am going to be able to tell is if you provide more information.

Need Your Help

ES 6: Difference between Symbol.iterator and @@iterator

javascript ecmascript-6

I was wondering if there was a specific difference in implementing an iterator using the @@iterator function versus the Symbol.iterator one:

Retrieving JSON sub-array using Polymer iron-ajax

arrays json ajax polymer polymer-1.0

I am trying to retrieve a JSON file using iron-ajax, in order to create a navigation accordion menu. So far, this reads in the "top-level" headers fine, but I'm struggling to get the sub-menu names