63 if (!ConsoleCabinetContext->
Data)
69 return ConsoleCabinetContext->
Data;
177 IN DWORD nNumberOfCharsToWrite,
190 nNumberOfCharsToWrite,
426 *pCoord = dwWriteCoord;
486 *pCoord = dwWriteCoord;
536 Buffer.wAttribute = wAttribute;
538 Buffer.dwCoord = dwWriteCoord;
553 *lpNumberOfAttrsWritten =
Buffer.dwTransfered;
571 Buffer.cCharacter = cCharacter;
573 Buffer.dwCoord = dwWriteCoord;
588 *lpNumberOfCharsWritten =
Buffer.dwTransfered;
610 lpConsoleScreenBufferInfo,
662 &ConsoleScreenBufferInfo,
698 static PCWSTR FontFile =
L"\\SystemRoot\\vgafonts.cab";
721 DPRINT(
"CabinetOpen('%S') returned 0x%08x\n", FontFile, CabStatus);
726 L"%u-8x8.bin", wCodepage);
730 DPRINT(
"CabinetFindFirst('%S', '%S') returned 0x%08x\n", FontFile, FontName, CabStatus);
739 DPRINT(
"CabinetExtractFile('%S', '%S') returned 0x%08x\n", FontFile, FontName, CabStatus);
740 if (ConsoleCabinetContext.
Data)
752 ConsoleCabinetContext.
Data,
753 ConsoleCabinetContext.
Size,
BOOL WINAPI SetConsoleOutputCP(IN UINT wCodepage)
BOOL WINAPI WriteConsoleOutputCharacterA(HANDLE hConsoleOutput, IN LPCSTR lpCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
BOOL WINAPI FlushConsoleInputBuffer(IN HANDLE hConsoleInput)
static PVOID ConsoleCreateFileHandler(IN PCABINET_CONTEXT CabinetContext, IN ULONG FileSize)
BOOL WINAPI FillConsoleOutputCharacterA(IN HANDLE hConsoleOutput, IN CHAR cCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
static BOOLEAN InputQueueEmpty
BOOL WINAPI SetConsoleCursorPosition(IN HANDLE hConsoleOutput, IN COORD dwCursorPosition)
BOOL WINAPI WriteConsoleOutputCharacterW(HANDLE hConsoleOutput, IN LPCWSTR lpCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
BOOL WINAPI AllocConsole(VOID)
struct _CONSOLE_CABINET_CONTEXT CONSOLE_CABINET_CONTEXT
BOOL WINAPI FreeConsole(VOID)
BOOL WINAPI SetConsoleTextAttribute(IN HANDLE hConsoleOutput, IN WORD wAttributes)
static UINT LastLoadedCodepage
static KEYBOARD_INPUT_DATA InputDataQueue
BOOL WINAPI SetConsoleCursorInfo(IN HANDLE hConsoleOutput, IN const CONSOLE_CURSOR_INFO *lpConsoleCursorInfo)
static BOOLEAN WaitForInput
static IO_STATUS_BLOCK InputIosb
BOOL WINAPI AttachConsole(IN DWORD dwProcessId)
BOOL WINAPI FillConsoleOutputAttribute(IN HANDLE hConsoleOutput, IN WORD wAttribute, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfAttrsWritten)
struct _CONSOLE_CABINET_CONTEXT * PCONSOLE_CABINET_CONTEXT
BOOL WINAPI GetConsoleScreenBufferInfo(IN HANDLE hConsoleOutput, OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
#define CAB_STATUS_SUCCESS
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
ULONG CabinetOpen(IN OUT PCABINET_CONTEXT CabinetContext)
ULONG CabinetFindFirst(IN PCABINET_CONTEXT CabinetContext, IN PCWSTR FileName, IN OUT PCAB_SEARCH Search)
VOID CabinetClose(IN OUT PCABINET_CONTEXT CabinetContext)
ULONG CabinetExtractFile(IN PCABINET_CONTEXT CabinetContext, IN PCAB_SEARCH Search)
VOID CabinetSetEventHandlers(IN PCABINET_CONTEXT CabinetContext, IN PCABINET_OVERWRITE Overwrite, IN PCABINET_EXTRACT Extract, IN PCABINET_DISK_CHANGE DiskChange, IN PCABINET_CREATE_FILE CreateFile)
VOID CabinetInitialize(IN OUT PCABINET_CONTEXT CabinetContext)
VOID CabinetSetCabinetName(IN PCABINET_CONTEXT CabinetContext, IN PCWSTR FileName)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define NT_SUCCESS(StatCode)
#define INVALID_HANDLE_VALUE
#define FILE_SYNCHRONOUS_IO_ALERT
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
NTSTATUS IntTranslateKey(HANDLE hConsoleInput, PKEYBOARD_INPUT_DATA InputData, KEY_EVENT_RECORD *Event)
#define memcpy(s1, s2, n)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI NTSTATUS NTAPI NtWriteFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID WriteBuffer, IN ULONG WriteBufferLength, IN PLARGE_INTEGER FileOffset OPTIONAL, IN PULONG LockOperationKey OPTIONAL)
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(IN HANDLE hObject, IN BOOLEAN bAlertable, IN PLARGE_INTEGER Timeout)
#define IOCTL_CONSOLE_WRITE_OUTPUT_CHARACTER
#define IOCTL_CONSOLE_LOADFONT
#define IOCTL_CONSOLE_FILL_OUTPUT_CHARACTER
#define IOCTL_CONSOLE_RESET_SCREEN
#define IOCTL_CONSOLE_SET_TEXT_ATTRIBUTE
#define IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO
#define IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO
#define IOCTL_CONSOLE_SET_CURSOR_INFO
#define IOCTL_CONSOLE_FILL_OUTPUT_ATTRIBUTE
_In_ ULONG _In_ ULONG Offset
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
NTSTATUS NTAPI NtCancelIoFile(IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock)
NTSTRSAFEVAPI RtlStringCbPrintfW(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
CABINET_CONTEXT CabinetContext
#define RTL_CONSTANT_STRING(s)
#define STD_OUTPUT_HANDLE
_In_ DWORD _Out_ LPDWORD lpNumberOfEventsRead
#define RtlUnicodeStringToOemSize(STRING)
*BytesInOemString PCHAR OemString