terminal/samples/ConPTY/EchoCon
Leonard Hecker fc85bdf314
Upgrade to Windows SDK 22000 (#11728)
Upgrades our SDK from 19041 (Windows 10 20H1) to 22000 (Windows 11 RTM).
The newer SDK is  more compatible with /Zc:preprocessor
and will allow us to use newer Windows 11 APIs directly.

## PR Checklist
* [x] I work here
* [x] Tests added/passed

## Validation Steps Performed
* Compiles ✔️
* Runs ✔️
2021-11-18 18:08:26 +00:00
..
EchoCon Upgrade to Windows SDK 22000 (#11728) 2021-11-18 18:08:26 +00:00
EchoCon.sln Add an example application that uses the pseudoconsole APIs (#247) 2018-09-10 20:07:17 -07:00
readme.md minor readme fix (#494) 2019-05-07 13:51:41 -05:00

"EchoCon" ConPTY Sample App

This is a very simple sample application that illustrates how to use the new Win32 Pseudo Console (ConPTY) by:

  1. Creating an input and an output pipe
  2. Calling CreatePseudoConsole() to create a ConPTY instance attached to the other end of the pipes
  3. Spawning an instance of ping.exe connected to the ConPTY
  4. Running a thread that listens for output from ping.exe, writing received text to the Console

Pre-Requirements

To build and run this sample, you must install:

Running the sample

Once successfully built, running EchoCon should clear the screen and display the results of the echo command:

Pinging Rincewind [::1] with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms

Ping statistics for ::1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Resources

For more information on the new Pseudo Console infrastructure and API, please review this blog post