-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement on demand stdio allocation
- Loading branch information
Showing
4 changed files
with
231 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
#include "stdafx.h" | ||
|
||
#define FILE_DEVICE_CONSOLE 0x0102 | ||
|
||
#define CECONSOLE_MODE_ECHO_INPUT 0x01 | ||
#define CECONSOLE_MODE_LINE_INPUT 0x02 | ||
#define CECONSOLE_MODE_PROCESSED_OUTPUT 0x04 | ||
|
||
#define CONSOLE_CTL(i) ((FILE_DEVICE_CONSOLE<<16)|(i << 2)) | ||
#define IOCTL_CONSOLE_SETMODE CONSOLE_CTL(1) | ||
#define IOCTL_CONSOLE_GETMODE CONSOLE_CTL(2) | ||
#define IOCTL_CONSOLE_SETTITLE CONSOLE_CTL(3) | ||
#define IOCTL_CONSOLE_GETTITLE CONSOLE_CTL(4) | ||
#define IOCTL_CONSOLE_CLS CONSOLE_CTL(5) | ||
#define IOCTL_CONSOLE_FLUSHINPUT CONSOLE_CTL(6) | ||
#define IOCTL_CONSOLE_GETSCREENROWS CONSOLE_CTL(7) | ||
#define IOCTL_CONSOLE_SETCONTROLCHANDLER CONSOLE_CTL(8) | ||
#define IOCTL_CONSOLE_GETSCREENCOLS CONSOLE_CTL(9) | ||
#define IOCTL_CONSOLE_SETCONTROLCEVENT CONSOLE_CTL(10) | ||
|
||
BOOL WceclConsoleIoControl( | ||
HANDLE hDevice, | ||
DWORD dwIoControlCode, | ||
LPVOID lpInBuf, | ||
DWORD nInBufSize, | ||
LPVOID lpOutBuf, | ||
DWORD nOutBufSize, | ||
LPDWORD lpBytesReturned, | ||
LPOVERLAPPED lpOverlapped); | ||
|
||
HANDLE WceclTryGetOrAllocStdHandle(FILE* file); |