2

Is it possible to use the .NET System.Windows.Automation namespace and do the equivalent of the old DDE?

My requirement is to read the text inside a command window(which could be a mainframe screen as well) from my .NET Windows Forms application.

Am better off using http://ndde.codeplex.com/ for this purpose?

cethie
  • 49
  • 3
  • 8
  • Nobody is *ever* better off using DDE. Is it something a legacy program requires or is it just the only thing you know? – Hans Passant Jul 19 '11 at 10:02

2 Answers2

1

As the author of the said DDE library I emphatically implore you to not use it. It is not that it does not work. It is simply that DDE itself is terrible; possibly the worst interprocess communication protocol ever.

What you should do is redirect the standard output stream from the console window. This can be done by setting a new stream via Console.SetOut. If the terminal is coming from a mainframe then use the NetworkStream class to read from the telnet port.

Brian Gideon
  • 47,849
  • 13
  • 107
  • 150
0

As far as I know System.Windows.Automation does not support DDE.

The last time I had to work with DDE we used a vb6 bridge.

Jonno
  • 789
  • 9
  • 26