From d949029f99ed4adcf375a886ee629e066539ba00 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 25 Jan 2014 18:44:55 +0000 Subject: [PATCH] [STI] * Create a main header and move some inclusions to it. * Set the default debugging channel globally through the main header. * Improve the GUIDs situation. CORE-7716 svn path=/trunk/; revision=61814 --- reactos/dll/win32/sti/CMakeLists.txt | 1 + reactos/dll/win32/sti/guid.c | 14 ++++++++++++++ reactos/dll/win32/sti/precomp.h | 19 +++++++++++++++++++ reactos/dll/win32/sti/sti.c | 16 +--------------- reactos/dll/win32/sti/sti_main.c | 21 +-------------------- 5 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 reactos/dll/win32/sti/guid.c create mode 100644 reactos/dll/win32/sti/precomp.h diff --git a/reactos/dll/win32/sti/CMakeLists.txt b/reactos/dll/win32/sti/CMakeLists.txt index aa46801d69b..fab24cc291f 100644 --- a/reactos/dll/win32/sti/CMakeLists.txt +++ b/reactos/dll/win32/sti/CMakeLists.txt @@ -11,6 +11,7 @@ spec2def(sti.dll sti.spec) list(APPEND SOURCE sti.c sti_main.c + guid.c ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c ${CMAKE_CURRENT_BINARY_DIR}/sti_wia_p.c ${CMAKE_CURRENT_BINARY_DIR}/sti.def) diff --git a/reactos/dll/win32/sti/guid.c b/reactos/dll/win32/sti/guid.c new file mode 100644 index 00000000000..1c276f9817d --- /dev/null +++ b/reactos/dll/win32/sti/guid.c @@ -0,0 +1,14 @@ +/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */ + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include +#include +#include +#include + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/reactos/dll/win32/sti/precomp.h b/reactos/dll/win32/sti/precomp.h new file mode 100644 index 00000000000..8c0b0f6342a --- /dev/null +++ b/reactos/dll/win32/sti/precomp.h @@ -0,0 +1,19 @@ +#ifndef _STI_PCH_ +#define _STI_PCH_ + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS + +#include +#include +#include + +#include +WINE_DEFAULT_DEBUG_CHANNEL(sti); + +#endif /* _STI_PCH_ */ diff --git a/reactos/dll/win32/sti/sti.c b/reactos/dll/win32/sti/sti.c index d326710d328..77f6a9aaa81 100644 --- a/reactos/dll/win32/sti/sti.c +++ b/reactos/dll/win32/sti/sti.c @@ -17,26 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H +#include "precomp.h" -#include - -#define COBJMACROS - -#include -#include #include -//#include "winerror.h" -//#include "objbase.h" -#include -#include #include -WINE_DEFAULT_DEBUG_CHANNEL(sti); - static const WCHAR registeredAppsLaunchPath[] = { 'S','O','F','T','W','A','R','E','\\', 'M','i','c','r','o','s','o','f','t','\\', diff --git a/reactos/dll/win32/sti/sti_main.c b/reactos/dll/win32/sti/sti_main.c index 2bd3a093b2c..291daebab7d 100644 --- a/reactos/dll/win32/sti/sti_main.c +++ b/reactos/dll/win32/sti/sti_main.c @@ -17,26 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include - -#define COBJMACROS - -#include -#include -//#include "winreg.h" -//#include "winerror.h" -//#include "objbase.h" -#include -//#include "wia_lh.h" -#include - -#include - -WINE_DEFAULT_DEBUG_CHANNEL(sti); +#include "precomp.h" extern HRESULT WINAPI STI_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN; extern BOOL WINAPI STI_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;