[WIN32KNT_APITEST] Improve the existing PCH and make use of it.
authorAmine Khaldi <amine.khaldi@reactos.org>
Sun, 17 Dec 2017 11:17:19 +0000 (12:17 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 17 Dec 2017 11:17:37 +0000 (12:17 +0100)
modules/rostests/apitests/win32nt/CMakeLists.txt
modules/rostests/apitests/win32nt/ntdd/NtGdiDdQueryDirectDrawObject.c
modules/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c
modules/rostests/apitests/win32nt/win32nt.h

index a3ffa1c..516e940 100644 (file)
@@ -61,10 +61,13 @@ list(APPEND SOURCE
     ntuser/NtUserUpdatePerUserSystemParameters.c
 
     #osver.c
+    win32nt.h)
+
+add_executable(win32knt_apitest
+    ${SOURCE}
     testlist.c
     w32knapi.rc)
 
-add_executable(win32knt_apitest ${SOURCE})
 target_link_libraries(win32knt_apitest ${PSEH_LIB} gditools)
 set_module_type(win32knt_apitest win32cui)
 add_importlibs(win32knt_apitest
@@ -78,4 +81,5 @@ add_importlibs(win32knt_apitest
     ntdll)
 
 add_dependencies(win32knt_apitest xdk)
+add_pch(win32knt_apitest win32nt.h SOURCE)
 add_rostests_file(TARGET win32knt_apitest)
index 07961e9..1105860 100644 (file)
@@ -7,6 +7,8 @@
 
 #include <win32nt.h>
 
+#include <ddrawi.h>
+
 /* Note : OsThunkDdQueryDirectDrawObject is the usermode name of NtGdiDdQueryDirectDrawObject
  *        it lives in d3d8thk.dll and in windows 2000 it doing syscall direcly to win32k.sus
  *        in windows xp and higher it call to gdi32.dll to DdEntry41 and it doing the syscall
index 5239dc5..feb14b3 100644 (file)
@@ -7,6 +7,8 @@
 
 #include <win32nt.h>
 
+#include <winreg.h>
+
 static const WCHAR* KEY_MOUSE = L"Control Panel\\Mouse";
 //static const WCHAR* VAL_MOUSE1 = L"MouseThreshold1";
 //static const WCHAR* VAL_MOUSE2 = L"MouseThreshold2";
index 3cd54f8..6b0f617 100644 (file)
@@ -1,5 +1,5 @@
-
-#pragma once
+#ifndef _WIN32NT_APITEST_H_
+#define _WIN32NT_APITEST_H_
 
 /* Definitions */
 #define WIN32_NO_STATUS
 
 /* SDK/DDK/NDK Headers. */
 #include <stdio.h>
-#include <excpt.h>
-#include <stdarg.h>
-#include <windef.h>
-#include <winbase.h>
 #include <wingdi.h>
-#include <winuser.h>
-#include <wincon.h>
-#include <winnls.h>
-#include <winver.h>
-#include <winnetwk.h>
-#include <winreg.h>
-#include <winsvc.h>
 #include <objbase.h>
 #include <imm.h>
 
 #include <winddi.h>
 #include <prntfont.h>
-#include <winddiui.h>
-#include <winspool.h>
-#include <ddrawi.h>
-#include <ddrawgdi.h>
 
-#include <ndk/ntndk.h>
+#include <ndk/rtlfuncs.h>
+#include <ndk/mmfuncs.h>
 
 /* Public Win32K Headers */
-#include <ntusrtyp.h>
 #include <ntuser.h>
-#include <callback.h>
 #include <ntgdityp.h>
 #include <ntgdi.h>
 #include <ntgdihdl.h>
@@ -51,4 +35,4 @@
 
 #define GdiHandleTable GdiQueryTable()
 
-
+#endif /* !_WIN32NT_APITEST_H_ */