Use APIConsole
for all console imports
Windows 10 has defined more console functions outside of `kernel32.dll`.
This commit is contained in:
parent
392337b3b1
commit
a995352ff1
53
ANSI.c
53
ANSI.c
@ -188,8 +188,11 @@
|
||||
check for the empty buffer within the critical section;
|
||||
palette improvements.
|
||||
|
||||
v1.82-wip, 12 February, 2018:
|
||||
add ANSICON_WRAP environment variable for programs that expect the wrap.
|
||||
v1.82-wip, 12 & 13 February, 2018:
|
||||
add ANSICON_WRAP environment variable for programs that expect the wrap;
|
||||
flush and invalidate the cache on CloseHandle;
|
||||
make IsConsoleHandle a critical section, for multithreaded processes;
|
||||
use APIConsole for all console functions (needed for Windows 10).
|
||||
*/
|
||||
|
||||
#include "ansicon.h"
|
||||
@ -3648,6 +3651,7 @@ FLUSH5( ReadConsoleOutputCharacterW, LPWSTR, DWORD, COORD, LPDWORD )
|
||||
FLUSH5( ScrollConsoleScreenBufferA, SMALL_RECT*,SMALL_RECT*, COORD, CHAR_INFO* )
|
||||
FLUSH5( ScrollConsoleScreenBufferW, SMALL_RECT*,SMALL_RECT*, COORD, CHAR_INFO* )
|
||||
FLUSH2( SetConsoleCursorPosition, COORD )
|
||||
FLUSH2X( SetConsoleScreenBufferInfo, PCONSOLE_SCREEN_BUFFER_INFOX )
|
||||
FLUSH2( SetConsoleScreenBufferSize, COORD )
|
||||
FLUSH2( SetConsoleTextAttribute, WORD )
|
||||
FLUSH3( SetConsoleWindowInfo, BOOL, const SMALL_RECT* )
|
||||
@ -3761,34 +3765,35 @@ HookFn Hooks[] = {
|
||||
HOOK( APILibraryLoader, FreeLibrary ),
|
||||
HOOK( APIFile, CreateFileA ),
|
||||
HOOK( APIFile, CreateFileW ),
|
||||
HOOK( APIKernel, CreateConsoleScreenBuffer ),
|
||||
HOOK( APIConsole, CreateConsoleScreenBuffer ),
|
||||
HOOK( APIHandle, CloseHandle ),
|
||||
HOOK( APIKernel, FillConsoleOutputAttribute ),
|
||||
HOOK( APIKernel, FillConsoleOutputCharacterA ),
|
||||
HOOK( APIKernel, FillConsoleOutputCharacterW ),
|
||||
HOOK( APIKernel, GetConsoleScreenBufferInfo ),
|
||||
HOOK( APIKernel, GetConsoleScreenBufferInfoEx ),
|
||||
HOOK( APIConsole, FillConsoleOutputAttribute ),
|
||||
HOOK( APIConsole, FillConsoleOutputCharacterA ),
|
||||
HOOK( APIConsole, FillConsoleOutputCharacterW ),
|
||||
HOOK( APIConsole, GetConsoleScreenBufferInfo ),
|
||||
HOOK( APIConsole, GetConsoleScreenBufferInfoEx ),
|
||||
HOOK( APIFile, ReadFile ),
|
||||
HOOK( APIConsole, ReadConsoleA ),
|
||||
HOOK( APIConsole, ReadConsoleW ),
|
||||
HOOK( APIConsole, ReadConsoleInputA ),
|
||||
HOOK( APIConsole, ReadConsoleInputW ),
|
||||
HOOK( APIKernel, ReadConsoleOutputA ),
|
||||
HOOK( APIKernel, ReadConsoleOutputW ),
|
||||
HOOK( APIKernel, ReadConsoleOutputAttribute ),
|
||||
HOOK( APIKernel, ReadConsoleOutputCharacterA ),
|
||||
HOOK( APIKernel, ReadConsoleOutputCharacterW ),
|
||||
HOOK( APIKernel, ScrollConsoleScreenBufferA ),
|
||||
HOOK( APIKernel, ScrollConsoleScreenBufferW ),
|
||||
HOOK( APIKernel, SetConsoleCursorPosition ),
|
||||
HOOK( APIKernel, SetConsoleScreenBufferSize ),
|
||||
HOOK( APIKernel, SetConsoleTextAttribute ),
|
||||
HOOK( APIKernel, SetConsoleWindowInfo ),
|
||||
HOOK( APIKernel, WriteConsoleOutputA ),
|
||||
HOOK( APIKernel, WriteConsoleOutputW ),
|
||||
HOOK( APIKernel, WriteConsoleOutputAttribute ),
|
||||
HOOK( APIKernel, WriteConsoleOutputCharacterA ),
|
||||
HOOK( APIKernel, WriteConsoleOutputCharacterW ),
|
||||
HOOK( APIConsole, ReadConsoleOutputA ),
|
||||
HOOK( APIConsole, ReadConsoleOutputW ),
|
||||
HOOK( APIConsole, ReadConsoleOutputAttribute ),
|
||||
HOOK( APIConsole, ReadConsoleOutputCharacterA ),
|
||||
HOOK( APIConsole, ReadConsoleOutputCharacterW ),
|
||||
HOOK( APIConsole, ScrollConsoleScreenBufferA ),
|
||||
HOOK( APIConsole, ScrollConsoleScreenBufferW ),
|
||||
HOOK( APIConsole, SetConsoleCursorPosition ),
|
||||
HOOK( APIConsole, SetConsoleScreenBufferInfoEx ),
|
||||
HOOK( APIConsole, SetConsoleScreenBufferSize ),
|
||||
HOOK( APIConsole, SetConsoleTextAttribute ),
|
||||
HOOK( APIConsole, SetConsoleWindowInfo ),
|
||||
HOOK( APIConsole, WriteConsoleOutputA ),
|
||||
HOOK( APIConsole, WriteConsoleOutputW ),
|
||||
HOOK( APIConsole, WriteConsoleOutputAttribute ),
|
||||
HOOK( APIConsole, WriteConsoleOutputCharacterA ),
|
||||
HOOK( APIConsole, WriteConsoleOutputCharacterW ),
|
||||
{ NULL, NULL, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
|
@ -91,7 +91,7 @@
|
||||
use -pu to unload from the parent.
|
||||
*/
|
||||
|
||||
#define PDATE L"12 February, 2018"
|
||||
#define PDATE L"13 February, 2018"
|
||||
|
||||
#include "ansicon.h"
|
||||
#include "version.h"
|
||||
|
10
readme.txt
10
readme.txt
@ -1,7 +1,7 @@
|
||||
|
||||
ANSICON
|
||||
|
||||
Copyright 2005-2017 Jason Hood
|
||||
Copyright 2005-2018 Jason Hood
|
||||
|
||||
Version 1.82-wip. Freeware
|
||||
|
||||
@ -339,8 +339,10 @@ Version History
|
||||
|
||||
Legend: + added, - bug-fixed, * changed.
|
||||
|
||||
1.82-wip - 12 February, 2018:
|
||||
- add ANSICON_WRAP for programs that expect the wrap at right margin.
|
||||
1.82-wip - 13 February, 2018:
|
||||
- add ANSICON_WRAP for programs that expect the wrap at right margin;
|
||||
- make IsConsoleHandle a critical section, for multithreaded processes;
|
||||
- use APIConsole for all console functions (Windows 10).
|
||||
|
||||
1.81 - 28 December, 2017:
|
||||
- fix multiple CRs before LF (including preventing an immediate flush);
|
||||
@ -608,4 +610,4 @@ Distribution
|
||||
|
||||
|
||||
==============================
|
||||
Jason Hood, 12 February, 2018.
|
||||
Jason Hood, 13 February, 2018.
|
||||
|
Loading…
x
Reference in New Issue
Block a user