https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2cbc32e5e466bf89a9c85…
commit 2cbc32e5e466bf89a9c8580d7c4377a37c5ac757
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Nov 26 13:26:39 2017 +0100
[NTOBJSHEX] Improve the existing PCH and make use of it.
---
dll/shellext/ntobjshex/CMakeLists.txt | 9 +++++++--
dll/shellext/ntobjshex/ntobjfolder.cpp | 2 ++
dll/shellext/ntobjshex/precomp.h | 20 +++++---------------
3 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/dll/shellext/ntobjshex/CMakeLists.txt
b/dll/shellext/ntobjshex/CMakeLists.txt
index 840a3f469c..9d2c76e217 100644
--- a/dll/shellext/ntobjshex/CMakeLists.txt
+++ b/dll/shellext/ntobjshex/CMakeLists.txt
@@ -17,12 +17,16 @@ spec2def(ntobjshex.dll ntobjshex.spec)
file(GLOB_RECURSE ntobjshex_rc_deps resources/*.*)
add_rc_deps(ntobjshex.rc ${ntobjshex_rc_deps})
-add_library(ntobjshex SHARED
+list(APPEND SOURCE
ntobjenum.cpp
ntobjfolder.cpp
ntobjshex.cpp
- ntobjshex.rc
regfolder.cpp
+ precomp.h)
+
+add_library(ntobjshex SHARED
+ ${SOURCE}
+ ntobjshex.rc
${CMAKE_CURRENT_BINARY_DIR}/ntobjshex.def)
set_module_type(ntobjshex win32dll UNICODE)
@@ -42,4 +46,5 @@ add_importlibs(ntobjshex
kernel32
ntdll)
+add_pch(ntobjshex precomp.h SOURCE)
add_cd_file(TARGET ntobjshex DESTINATION reactos/system32 FOR all)
diff --git a/dll/shellext/ntobjshex/ntobjfolder.cpp
b/dll/shellext/ntobjshex/ntobjfolder.cpp
index 725ed78c6d..24571cad1e 100644
--- a/dll/shellext/ntobjshex/ntobjfolder.cpp
+++ b/dll/shellext/ntobjshex/ntobjfolder.cpp
@@ -8,6 +8,8 @@
#include "precomp.h"
+#include <wine/unicode.h>
+
// {845B0FB2-66E0-416B-8F91-314E23F7C12D}
const GUID CLSID_NtObjectFolder = { 0x845b0fb2, 0x66e0, 0x416b, { 0x8f, 0x91, 0x31, 0x4e,
0x23, 0xf7, 0xc1, 0x2d } };
diff --git a/dll/shellext/ntobjshex/precomp.h b/dll/shellext/ntobjshex/precomp.h
index f117b3771b..55a055723e 100644
--- a/dll/shellext/ntobjshex/precomp.h
+++ b/dll/shellext/ntobjshex/precomp.h
@@ -1,11 +1,11 @@
-#pragma once
+#ifndef _NTOBJSHEX_PRECOMP_H_
+#define _NTOBJSHEX_PRECOMP_H_
-#define WIN32_NO_STATUS
#include <stdarg.h>
#include <tchar.h>
-#define COBJMACROS
#define WIN32_NO_STATUS
+#define COBJMACROS
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
#define NTOS_MODE_USER
@@ -13,26 +13,15 @@
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
-#include <winuser.h>
-#include <wincon.h>
-#include <ddeml.h>
-#include <shlguid_undoc.h>
#include <shlwapi.h>
#include <shlobj.h>
-#include <shlobj_undoc.h>
-#include <shlwapi_undoc.h>
-#include <tchar.h>
#include <strsafe.h>
#include <atlbase.h>
#include <atlcom.h>
-#include <atlwin.h>
#include <undocshell.h>
#include <shellutils.h>
-#include <shellapi.h>
-
#include <wine/debug.h>
-#include <wine/unicode.h>
#include "resource.h"
@@ -59,7 +48,6 @@ DEFINE_GUID(CLSID_NtObjectFolder,
WINE_DEFAULT_DEBUG_CHANNEL(ntobjshex);
-#include <rtlfuncs.h>
#include <ntquery.h>
#include "util.h"
@@ -68,3 +56,5 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntobjshex);
#include "foldercommon.h"
#include "ntobjfolder.h"
#include "regfolder.h"
+
+#endif /* _NTOBJSHEX_PRECOMP_H_ */