I am trying to writing a console application. It has its original console, let's name it console A. And I want this application to do the following things via C#:
- Open another console B in another thread, then get input from A and output it to B;
- type a command in A, such as dir, and show the output in B;
while doing the above things (still not done yet. X_X ), I find myself lack a through understanding of what a console window is, and how it is assigned to a console application, especially the very first console when my console application starts to run. Could some one shed some light on me?
Is console window physically a memory area in the video memory? Or something else? Could different threads within the same process have different console of its own for its own I/O?
Many thanks...
Hi, guys, now I am using one console application to start another console application in a new process. Thus I can have 2 consoles output at the same time.
My understanding now is that, for Windows OS, a console is a special window, and it's a system resource that OS assigned to the application without-a-UI as a necessary user interface. Windows OS handles the wiring between the system-prepared console window with our UI-less application.