1 #define _WIN32_WINNT 0x0501
2 #include "../src/shared/DebugClient.cc"
6 const int SC_CONSOLE_MARK = 0xFFF2;
8 CALLBACK DWORD writerThread(void*)
20 CreateThread(NULL, 0, writerThread, NULL, 0, NULL);
21 trace("marking console");
22 HWND hwnd = GetConsoleWindow();
23 PostMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_MARK, 0);
27 trace("reading output");
29 COORD bufSize = { 1, 1 };
30 COORD zeroCoord = { 0, 0 };
31 SMALL_RECT readRect = { 0, 0, 0, 0 };
32 ReadConsoleOutput(GetStdHandle(STD_OUTPUT_HANDLE),
37 trace("done reading output");
41 PostMessage(hwnd, WM_CHAR, 27, 0x00010001);