Commit graph

14 commits

Author SHA1 Message Date
inventivejon 38156311e8 sample: Fix static "cmd.exe" in miniterm (#2461) 2019-08-19 11:20:06 -07:00
Flo56958 e2b5fecd48 Some Typo-Fixes in Comments (#1049)
* Typo fixes
2019-05-29 14:27:30 -07:00
Neil McAlister 41a6d8ed3a Add GUIConsole sample (#285)
* Add GUIConsole sample

* Remove acrylic native functions, add a title bar

* Fix WPF app namespaces

* Respond to PR feedback

* Removed unused native calls, and fix up some stray spaces

* Switch pwsh to powershell

* Missed a spot.

* Fix typo, add newlines
2019-05-18 18:17:36 +00:00
沈嘉欢 e6767acf46 minor readme fix (#494) 2019-05-07 13:51:41 -05:00
Jack Owens 590eb1fc91 Grammar fixes/improvements (#511) 2019-05-07 08:30:01 -07:00
oising 987805ebaf moved readconsoleinputstream to samples folder; added readme; updated root readme. 2019-04-29 14:50:38 -04:00
Rich Turner 370cea5cab Retargeted EchoCon sample project to 17763 now Win10 1809 has shipped (#340) 2019-04-24 17:20:20 -07:00
Will Fuqua 08b436f1a5
move Process and ProcessFactory classes into separate files 2018-09-21 21:54:01 +07:00
Will Fuqua 3a1ee61476
fix exit behavior
old behavior was whenever the user types "exit" to stop the entire terminal, which is not correct (e.g. does not work correctly for nested cmd.exe sessions). Now we wait for the top-level process to exit, which I think is more correct.
Also contains a minor rename, Process -> ProcessFactory, ProcessResources -> Process.
2018-09-21 21:50:18 +07:00
Will Fuqua bf32b8d48f
implement dispose pattern
- Full Dispose Pattern for ProcessResources since it has unmanaged resources
- Basic Dispose Pattern for PseudoConsolePipe since it has managed resources
- Fix naming of iStdOut to hStdOut
- Change parameter order of Process.Start to make more sense
2018-09-21 20:47:18 +07:00
Will Fuqua 637c57473e
add c# files
- Move from rather ad-hoc, error-prone resource management to IDisposable, which should give us a bit more enforcement.
- Optimistically remove "buggy" from readme because the known bugs are now fixed! The main source of bugs was the incorrect InitializeProcThreadAttributeList usage.
- Handle ctrl-c by forwarding it to the PseudoConsole
- Handle terminal close when the window close button is used
- Use .NET's CopyTo in the CopyPipeToOutput, it's much simpler code and seems more robust than the ReadFile/WriteFile approach
- Minor refactor to split native APIs to multiple files
2018-09-20 22:13:37 +07:00
Will Fuqua e09359138e
add pinvoke signatures 2018-09-20 22:11:55 +07:00
Will Fuqua 0884a1bb1d
add project infrastructure (sln, csproj, readme, etc) 2018-09-20 22:11:24 +07:00
Rich Turner ac843745fa
Add an example application that uses the pseudoconsole APIs (#247)
This sample implements a simple "Echo Console" that illustrates the mechanism by which a caller can directly invoke & communicate with Command-Line applications.

1. Creates two pipes - one for output, the second for output
1. Creates a Pseudo Console attached to the other end of the pipes
1. Creates a child process (an instance of `ping.exe` in this case), attached to the Pseudo Console
1. Creates a thread that reads the input pipe, displaying received text on the screen
2018-09-10 20:07:17 -07:00