[DOSKEY][USETUP][KERNEL32][NTVDM][CONSRV][REGEXPL] Fix build (#8019)

Fix build after the move and update of private console API
definitions to wincon_undoc.h
This commit is contained in:
Hermès Bélusca-Maïto 2025-05-13 14:27:47 +02:00
parent 412fe7d9ac
commit 2a0d98c2bc
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
10 changed files with 104 additions and 131 deletions

View file

@ -15,28 +15,7 @@
#include <winbase.h> #include <winbase.h>
#include <winuser.h> #include <winuser.h>
#include <wincon.h> #include <wincon.h>
#include <wincon_undoc.h>
/* Console API functions which are absent from wincon.h */
#define EXENAME_LENGTH (255 + 1)
VOID
WINAPI
ExpungeConsoleCommandHistoryW(LPCWSTR lpExeName);
DWORD
WINAPI
GetConsoleCommandHistoryW(LPWSTR lpHistory,
DWORD cbHistory,
LPCWSTR lpExeName);
DWORD
WINAPI
GetConsoleCommandHistoryLengthW(LPCWSTR lpExeName);
BOOL
WINAPI
SetConsoleNumberOfCommandsW(DWORD dwNumCommands,
LPCWSTR lpExeName);
#include "doskey.h" #include "doskey.h"

View file

@ -33,10 +33,11 @@
/* PSDK/NDK */ /* PSDK/NDK */
#define WIN32_NO_STATUS #define WIN32_NO_STATUS
#define _KERNEL32_ // To define WINBASEAPI empty
#include <windef.h> #include <windef.h>
#include <winbase.h> #include <winbase.h>
#include <winreg.h> #include <winreg.h>
#include <winuser.h> #include <winuser.rh>
#include <wincon.h> #include <wincon.h>
#define NTOS_MODE_USER #define NTOS_MODE_USER

View file

@ -23,7 +23,7 @@ IntAddConsoleAlias(LPCVOID Source,
USHORT SourceBufferLength, USHORT SourceBufferLength,
LPCVOID Target, LPCVOID Target,
USHORT TargetBufferLength, USHORT TargetBufferLength,
LPCVOID lpExeName, LPCVOID ExeName,
BOOLEAN bUnicode) BOOLEAN bUnicode)
{ {
CONSOLE_API_MESSAGE ApiMessage; CONSOLE_API_MESSAGE ApiMessage;
@ -31,9 +31,9 @@ IntAddConsoleAlias(LPCVOID Source,
PCSR_CAPTURE_BUFFER CaptureBuffer; PCSR_CAPTURE_BUFFER CaptureBuffer;
ULONG CapturedStrings; ULONG CapturedStrings;
USHORT NumChars = (USHORT)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0); USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
if (lpExeName == NULL || NumChars == 0) if (ExeName == NULL || NumChars == 0)
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return FALSE; return FALSE;
@ -78,7 +78,7 @@ IntAddConsoleAlias(LPCVOID Source,
(PVOID*)&ConsoleAliasRequest->Source); (PVOID*)&ConsoleAliasRequest->Source);
CsrCaptureMessageBuffer(CaptureBuffer, CsrCaptureMessageBuffer(CaptureBuffer,
(PVOID)lpExeName, (PVOID)ExeName,
ConsoleAliasRequest->ExeLength, ConsoleAliasRequest->ExeLength,
(PVOID*)&ConsoleAliasRequest->ExeName); (PVOID*)&ConsoleAliasRequest->ExeName);
@ -117,21 +117,22 @@ IntAddConsoleAlias(LPCVOID Source,
BOOL BOOL
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
AddConsoleAliasW(LPCWSTR lpSource, AddConsoleAliasW(
LPCWSTR lpTarget, _In_ LPCWSTR Source,
LPCWSTR lpExeName) _In_ LPCWSTR Target,
_In_ LPCWSTR ExeName)
{ {
USHORT SourceBufferLength = (USHORT)wcslen(lpSource) * sizeof(WCHAR); USHORT SourceBufferLength = (USHORT)wcslen(Source) * sizeof(WCHAR);
USHORT TargetBufferLength = (USHORT)(lpTarget ? wcslen(lpTarget) * sizeof(WCHAR) : 0); USHORT TargetBufferLength = (USHORT)(Target ? wcslen(Target) * sizeof(WCHAR) : 0);
DPRINT("AddConsoleAliasW entered with lpSource '%S' lpTarget '%S' lpExeName '%S'\n", DPRINT("AddConsoleAliasW entered with Source '%S' Target '%S' ExeName '%S'\n",
lpSource, lpTarget, lpExeName); Source, Target, ExeName);
return IntAddConsoleAlias(lpSource, return IntAddConsoleAlias(Source,
SourceBufferLength, SourceBufferLength,
lpTarget, Target,
TargetBufferLength, TargetBufferLength,
lpExeName, ExeName,
TRUE); TRUE);
} }
@ -142,38 +143,39 @@ AddConsoleAliasW(LPCWSTR lpSource,
BOOL BOOL
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
AddConsoleAliasA(LPCSTR lpSource, AddConsoleAliasA(
LPCSTR lpTarget, _In_ LPCSTR Source,
LPCSTR lpExeName) _In_ LPCSTR Target,
_In_ LPCSTR ExeName)
{ {
USHORT SourceBufferLength = (USHORT)strlen(lpSource) * sizeof(CHAR); USHORT SourceBufferLength = (USHORT)strlen(Source) * sizeof(CHAR);
USHORT TargetBufferLength = (USHORT)(lpTarget ? strlen(lpTarget) * sizeof(CHAR) : 0); USHORT TargetBufferLength = (USHORT)(Target ? strlen(Target) * sizeof(CHAR) : 0);
DPRINT("AddConsoleAliasA entered with lpSource '%s' lpTarget '%s' lpExeName '%s'\n", DPRINT("AddConsoleAliasA entered with Source '%s' Target '%s' ExeName '%s'\n",
lpSource, lpTarget, lpExeName); Source, Target, ExeName);
return IntAddConsoleAlias(lpSource, return IntAddConsoleAlias(Source,
SourceBufferLength, SourceBufferLength,
lpTarget, Target,
TargetBufferLength, TargetBufferLength,
lpExeName, ExeName,
FALSE); FALSE);
} }
static DWORD static DWORD
IntGetConsoleAlias(LPVOID Source, IntGetConsoleAlias(LPCVOID Source,
USHORT SourceBufferLength, USHORT SourceBufferLength,
LPVOID Target, LPVOID Target,
USHORT TargetBufferLength, USHORT TargetBufferLength,
LPVOID lpExeName, LPCVOID ExeName,
BOOLEAN bUnicode) BOOLEAN bUnicode)
{ {
CONSOLE_API_MESSAGE ApiMessage; CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_ADDGETALIAS ConsoleAliasRequest = &ApiMessage.Data.ConsoleAliasRequest; PCONSOLE_ADDGETALIAS ConsoleAliasRequest = &ApiMessage.Data.ConsoleAliasRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer; PCSR_CAPTURE_BUFFER CaptureBuffer;
USHORT NumChars = (USHORT)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0); USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
if (Source == NULL || Target == NULL) if (Source == NULL || Target == NULL)
{ {
@ -181,7 +183,7 @@ IntGetConsoleAlias(LPVOID Source,
return 0; return 0;
} }
if (lpExeName == NULL || NumChars == 0) if (ExeName == NULL || NumChars == 0)
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
@ -215,7 +217,7 @@ IntGetConsoleAlias(LPVOID Source,
(PVOID*)&ConsoleAliasRequest->Source); (PVOID*)&ConsoleAliasRequest->Source);
CsrCaptureMessageBuffer(CaptureBuffer, CsrCaptureMessageBuffer(CaptureBuffer,
(PVOID)lpExeName, (PVOID)ExeName,
ConsoleAliasRequest->ExeLength, ConsoleAliasRequest->ExeLength,
(PVOID*)&ConsoleAliasRequest->ExeName); (PVOID*)&ConsoleAliasRequest->ExeName);
@ -257,19 +259,20 @@ IntGetConsoleAlias(LPVOID Source,
DWORD DWORD
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
GetConsoleAliasW(LPWSTR lpSource, GetConsoleAliasW(
LPWSTR lpTargetBuffer, _In_ LPCWSTR Source,
DWORD TargetBufferLength, _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer,
LPWSTR lpExeName) _In_ DWORD TargetBufferLength,
_In_ LPCWSTR ExeName)
{ {
DPRINT("GetConsoleAliasW entered with lpSource '%S' lpExeName '%S'\n", DPRINT("GetConsoleAliasW entered with Source '%S' ExeName '%S'\n",
lpSource, lpExeName); Source, ExeName);
return IntGetConsoleAlias(lpSource, return IntGetConsoleAlias(Source,
(USHORT)wcslen(lpSource) * sizeof(WCHAR), (USHORT)wcslen(Source) * sizeof(WCHAR),
lpTargetBuffer, TargetBuffer,
TargetBufferLength, TargetBufferLength,
lpExeName, ExeName,
TRUE); TRUE);
} }
@ -280,36 +283,37 @@ GetConsoleAliasW(LPWSTR lpSource,
DWORD DWORD
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
GetConsoleAliasA(LPSTR lpSource, GetConsoleAliasA(
LPSTR lpTargetBuffer, _In_ LPCSTR Source,
DWORD TargetBufferLength, _Out_writes_(TargetBufferLength) LPSTR TargetBuffer,
LPSTR lpExeName) _In_ DWORD TargetBufferLength,
_In_ LPCSTR ExeName)
{ {
DPRINT("GetConsoleAliasA entered with lpSource '%s' lpExeName '%s'\n", DPRINT("GetConsoleAliasA entered with Source '%s' ExeName '%s'\n",
lpSource, lpExeName); Source, ExeName);
return IntGetConsoleAlias(lpSource, return IntGetConsoleAlias(Source,
(USHORT)strlen(lpSource) * sizeof(CHAR), (USHORT)strlen(Source) * sizeof(CHAR),
lpTargetBuffer, TargetBuffer,
TargetBufferLength, TargetBufferLength,
lpExeName, ExeName,
FALSE); FALSE);
} }
static DWORD static DWORD
IntGetConsoleAliases(LPVOID AliasBuffer, IntGetConsoleAliases(LPVOID AliasBuffer,
DWORD AliasBufferLength, DWORD AliasBufferLength,
LPVOID lpExeName, LPCVOID ExeName,
BOOLEAN bUnicode) BOOLEAN bUnicode)
{ {
CONSOLE_API_MESSAGE ApiMessage; CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_GETALLALIASES GetAllAliasesRequest = &ApiMessage.Data.GetAllAliasesRequest; PCONSOLE_GETALLALIASES GetAllAliasesRequest = &ApiMessage.Data.GetAllAliasesRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer; PCSR_CAPTURE_BUFFER CaptureBuffer;
USHORT NumChars = (USHORT)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0); USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
if (lpExeName == NULL || NumChars == 0) if (ExeName == NULL || NumChars == 0)
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
@ -336,7 +340,7 @@ IntGetConsoleAliases(LPVOID AliasBuffer,
/* Capture the exe name and allocate space for the aliases buffer */ /* Capture the exe name and allocate space for the aliases buffer */
CsrCaptureMessageBuffer(CaptureBuffer, CsrCaptureMessageBuffer(CaptureBuffer,
(PVOID)lpExeName, (PVOID)ExeName,
GetAllAliasesRequest->ExeLength, GetAllAliasesRequest->ExeLength,
(PVOID*)&GetAllAliasesRequest->ExeName); (PVOID*)&GetAllAliasesRequest->ExeName);
@ -373,11 +377,12 @@ IntGetConsoleAliases(LPVOID AliasBuffer,
DWORD DWORD
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
GetConsoleAliasesW(LPWSTR AliasBuffer, GetConsoleAliasesW(
DWORD AliasBufferLength, _Out_writes_(AliasBufferLength) LPWSTR AliasBuffer,
LPWSTR ExeName) _In_ DWORD AliasBufferLength,
_In_ LPCWSTR ExeName)
{ {
DPRINT("GetConsoleAliasesW entered with lpExeName '%S'\n", DPRINT("GetConsoleAliasesW entered with ExeName '%S'\n",
ExeName); ExeName);
return IntGetConsoleAliases(AliasBuffer, return IntGetConsoleAliases(AliasBuffer,
@ -393,11 +398,12 @@ GetConsoleAliasesW(LPWSTR AliasBuffer,
DWORD DWORD
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
GetConsoleAliasesA(LPSTR AliasBuffer, GetConsoleAliasesA(
DWORD AliasBufferLength, _Out_writes_(AliasBufferLength) LPSTR AliasBuffer,
LPSTR ExeName) _In_ DWORD AliasBufferLength,
_In_ LPCSTR ExeName)
{ {
DPRINT("GetConsoleAliasesA entered with lpExeName '%s'\n", DPRINT("GetConsoleAliasesA entered with ExeName '%s'\n",
ExeName); ExeName);
return IntGetConsoleAliases(AliasBuffer, return IntGetConsoleAliases(AliasBuffer,
@ -408,15 +414,15 @@ GetConsoleAliasesA(LPSTR AliasBuffer,
static DWORD static DWORD
IntGetConsoleAliasesLength(LPVOID lpExeName, BOOLEAN bUnicode) IntGetConsoleAliasesLength(LPCVOID ExeName, BOOLEAN bUnicode)
{ {
CONSOLE_API_MESSAGE ApiMessage; CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest = &ApiMessage.Data.GetAllAliasesLengthRequest; PCONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest = &ApiMessage.Data.GetAllAliasesLengthRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer; PCSR_CAPTURE_BUFFER CaptureBuffer;
USHORT NumChars = (USHORT)(lpExeName ? (bUnicode ? wcslen(lpExeName) : strlen(lpExeName)) : 0); USHORT NumChars = (USHORT)(ExeName ? (bUnicode ? wcslen(ExeName) : strlen(ExeName)) : 0);
if (lpExeName == NULL || NumChars == 0) if (ExeName == NULL || NumChars == 0)
{ {
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return 0; return 0;
@ -436,7 +442,7 @@ IntGetConsoleAliasesLength(LPVOID lpExeName, BOOLEAN bUnicode)
} }
CsrCaptureMessageBuffer(CaptureBuffer, CsrCaptureMessageBuffer(CaptureBuffer,
(PVOID)lpExeName, (PVOID)ExeName,
GetAllAliasesLengthRequest->ExeLength, GetAllAliasesLengthRequest->ExeLength,
(PVOID)&GetAllAliasesLengthRequest->ExeName); (PVOID)&GetAllAliasesLengthRequest->ExeName);
@ -463,9 +469,10 @@ IntGetConsoleAliasesLength(LPVOID lpExeName, BOOLEAN bUnicode)
DWORD DWORD
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
GetConsoleAliasesLengthW(LPWSTR lpExeName) GetConsoleAliasesLengthW(
_In_ LPCWSTR ExeName)
{ {
return IntGetConsoleAliasesLength(lpExeName, TRUE); return IntGetConsoleAliasesLength(ExeName, TRUE);
} }
@ -475,9 +482,10 @@ GetConsoleAliasesLengthW(LPWSTR lpExeName)
DWORD DWORD
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
GetConsoleAliasesLengthA(LPSTR lpExeName) GetConsoleAliasesLengthA(
_In_ LPCSTR ExeName)
{ {
return IntGetConsoleAliasesLength(lpExeName, FALSE); return IntGetConsoleAliasesLength(ExeName, FALSE);
} }

View file

@ -421,7 +421,7 @@ ConsoleMenuControl(HANDLE hConsoleOutput,
HANDLE HANDLE
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
DuplicateConsoleHandle(HANDLE hConsole, DuplicateConsoleHandle(HANDLE hSourceHandle,
DWORD dwDesiredAccess, DWORD dwDesiredAccess,
BOOL bInheritHandle, BOOL bInheritHandle,
DWORD dwOptions) DWORD dwOptions)
@ -438,7 +438,7 @@ DuplicateConsoleHandle(HANDLE hConsole,
} }
DuplicateHandleRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle; DuplicateHandleRequest->ConsoleHandle = NtCurrentPeb()->ProcessParameters->ConsoleHandle;
DuplicateHandleRequest->SourceHandle = hConsole; DuplicateHandleRequest->SourceHandle = hSourceHandle;
DuplicateHandleRequest->DesiredAccess = dwDesiredAccess; DuplicateHandleRequest->DesiredAccess = dwDesiredAccess;
DuplicateHandleRequest->InheritHandle = bInheritHandle; DuplicateHandleRequest->InheritHandle = bInheritHandle;
DuplicateHandleRequest->Options = dwOptions; DuplicateHandleRequest->Options = dwOptions;
@ -975,12 +975,14 @@ SetConsoleHardwareState(HANDLE hConsoleOutput,
BOOL BOOL
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
SetConsoleKeyShortcuts(DWORD Unknown0, SetConsoleKeyShortcuts(
DWORD Unknown1, _In_ BOOL bSet,
DWORD Unknown2, _In_ BYTE bReserveKeys,
DWORD Unknown3) _In_reads_(dwNumAppKeys) LPAPPKEY lpAppKeys,
_In_ DWORD dwNumAppKeys)
{ {
DPRINT1("SetConsoleKeyShortcuts(0x%x, 0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", Unknown0, Unknown1, Unknown2, Unknown3); DPRINT1("SetConsoleKeyShortcuts(%lu, 0x%x, 0x%p, 0x%x) UNIMPLEMENTED!\n",
bSet, bReserveKeys, lpAppKeys, dwNumAppKeys);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE; return FALSE;
} }
@ -3024,7 +3026,11 @@ SetConsoleNlsMode(HANDLE hConsole, DWORD dwMode)
BOOL BOOL
WINAPI WINAPI
DECLSPEC_HOTPATCH DECLSPEC_HOTPATCH
SetConsoleLocalEUDC(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) SetConsoleLocalEUDC(
_In_ HANDLE hConsoleHandle,
_In_ WORD wCodePoint,
_In_ COORD cFontSize,
_In_ PCHAR lpSB)
{ {
STUB; STUB;
return FALSE; return FALSE;

View file

@ -1988,12 +1988,11 @@ SetVDMCurrentDirectories(DWORD cchCurDirs, PCHAR lpszzCurDirs)
/* /*
* @unimplemented * @unimplemented
*/ */
DWORD BOOL
WINAPI WINAPI
VDMConsoleOperation ( VDMConsoleOperation(
DWORD Unknown0, _In_ DWORD iFunction,
DWORD Unknown1 _Inout_opt_ LPVOID lpData)
)
{ {
STUB; STUB;
return 0; return 0;

View file

@ -33,12 +33,6 @@ DWORD
WINAPI WINAPI
PropDialogHandler(IN LPVOID lpThreadParameter); PropDialogHandler(IN LPVOID lpThreadParameter);
HANDLE WINAPI
DuplicateConsoleHandle(HANDLE hConsole,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwOptions);
BOOL WINAPI BOOL WINAPI
GetConsoleHandleInformation(IN HANDLE hHandle, GetConsoleHandleInformation(IN HANDLE hHandle,
OUT LPDWORD lpdwFlags); OUT LPDWORD lpdwFlags);
@ -48,15 +42,6 @@ SetConsoleHandleInformation(IN HANDLE hHandle,
IN DWORD dwMask, IN DWORD dwMask,
IN DWORD dwFlags); IN DWORD dwFlags);
BOOL WINAPI
VerifyConsoleIoHandle(HANDLE Handle);
BOOL WINAPI
CloseConsoleHandle(HANDLE Handle);
HANDLE WINAPI
GetConsoleInputWaitHandle(VOID);
HANDLE HANDLE
TranslateStdHandle(HANDLE hHandle); TranslateStdHandle(HANDLE hHandle);
@ -92,10 +77,4 @@ LPCWSTR
IntCheckForConsoleFileName(IN LPCWSTR pszName, IntCheckForConsoleFileName(IN LPCWSTR pszName,
IN DWORD dwDesiredAccess); IN DWORD dwDesiredAccess);
HANDLE WINAPI
OpenConsoleW(LPCWSTR wsName,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwShareMode);
/* EOF */ /* EOF */

View file

@ -21,6 +21,7 @@
#include <wingdi.h> #include <wingdi.h>
#include <winreg.h> #include <winreg.h>
#include <wincon.h> #include <wincon.h>
#include <wincon_undoc.h>
#include <winuser.h> #include <winuser.h>
#undef TEXT #undef TEXT

View file

@ -187,7 +187,7 @@ int main ()
Console.SetTitle(_T("Registry Explorer")); Console.SetTitle(_T("Registry Explorer"));
Console.SetTextAttribute(pSettings->GetNormalTextAttributes()); Console.SetTextAttribute(pSettings->GetNormalTextAttributes());
VERIFY(SetConsoleCtrlHandler((PHANDLER_ROUTINE)HandlerRoutine,TRUE)); VERIFY(SetConsoleCtrlHandler(HandlerRoutine,TRUE));
if (!Console.Write(HELLO_MSG if (!Console.Write(HELLO_MSG
//(_L(__TIMESTAMP__)) //(_L(__TIMESTAMP__))

View file

@ -55,6 +55,7 @@
#include <winbase.h> #include <winbase.h>
#include <wingdi.h> #include <wingdi.h>
#include <wincon.h> #include <wincon.h>
#include <wincon_undoc.h>
#include <winnls.h> #include <winnls.h>
#include <winreg.h> #include <winreg.h>
#include <winuser.h> #include <winuser.h>
@ -67,8 +68,6 @@
#define NO_NTVDD_COMPAT #define NO_NTVDD_COMPAT
#include <vddsvc.h> #include <vddsvc.h>
DWORD WINAPI SetLastConsoleEventActive(VOID);
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ndk/kefuncs.h> // For NtQueryPerformanceCounter() #include <ndk/kefuncs.h> // For NtQueryPerformanceCounter()
#include <ndk/rtlfuncs.h> #include <ndk/rtlfuncs.h>

View file

@ -21,6 +21,7 @@
#include <winnls.h> #include <winnls.h>
#include <wincon.h> #include <wincon.h>
#include <wincon_undoc.h>
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ndk/mmfuncs.h> #include <ndk/mmfuncs.h>