Hello Mike,
Thanks for your post. As I understand, you want to know how to read the
output of a console window or a text file. Please correct me if there is
any misunderstanding. Now, I'd like to share the following information with
you:
1. I recommend you use FileSystemWatcher class in .NET to monitor the
changes in a specific file, and then read it with StreamReader. Please
refer to the following MSDN articles:
FileSystemWatcher
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemiofilesystemwatcherclasstopic.asp
Reading Text from a File
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconReadingTextFromFile.asp
2. You may be able to read from the Dos Window via Console Functions say,
ReadConsoleOutput. However, they are unmanaged APIs, you should use
Platform Invoke to call these functions.
ReadConsoleOutput
http://msdn.microsoft.com/library/de...us/dllproc/bas
e/readconsoleoutput.asp
Consuming Unmanaged DLL Functions
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconconsumingunmanageddllfunctions.asp
Hope this helps.
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! --
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.