2

I need to open a Console window from the application and need to perform read write operation using console API.

3
  • what programming language and/or framework you are developing with? Commented Feb 17, 2011 at 6:46
  • What kind of program do you have now? Do you want to start a console from a GUI application? Commented Feb 17, 2011 at 6:52
  • I am using C programming language.. Currently porint some appli from Linux to windows. In Linux I have used ptmx and Xterm for Writing and Reading from the terminal, I not sure how can it be done in windows. Basiclly I want a Console to read the data provided by user and pass it on to the application and write data to user returned by applic. This console has to be like a child to the main Application. Commented Feb 17, 2011 at 8:05

2 Answers 2

2

To work with consoles in WinAPI there are some functions such as AllocConsole(), GetStdHandle(), WriteConsole(), ReadConsole(), etc. More info at http://msdn.microsoft.com/en-us/library/ms682073(VS.85).aspx

Sign up to request clarification or add additional context in comments.

Comments

0

First case in my mind is to create two levels of your application: server and clients. Server will start clients(new console windows) and clients will cooperate with server. How it would be done you must choose(crossproccess interaction, sockets, etc.)

Second case is intercepting of WinAPI messages from other console window, but in that case i can`t help you :)

2 Comments

Why do you assume it's a client-server application? And how in the world would one intercept Win API messages from another console window? Are you talking about WinEvents?
yes, WinEvents. It`s may not necessarily be client-server, just what i can imagine for your task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.