From 4be5b0fc34a1c52bfd75ee9584b1ca1839b4e1d0 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 1 Jan 2014 18:35:06 +0000 Subject: [PATCH 1/1] [WBEMDISP] * Move some inclusions to the main header. * Set the default debugging channel globally through the main header. * Remove inclusions and definitions that already exist in the main header. * Improve the GUIDs situation. CORE-7716 svn path=/trunk/; revision=61473 --- reactos/dll/win32/wbemdisp/CMakeLists.txt | 3 ++- reactos/dll/win32/wbemdisp/guid.c | 16 ++++++++++++++++ reactos/dll/win32/wbemdisp/locator.c | 15 ++------------- reactos/dll/win32/wbemdisp/main.c | 17 ++--------------- reactos/dll/win32/wbemdisp/wbemdisp_private.h | 18 ++++++++++++++++++ 5 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 reactos/dll/win32/wbemdisp/guid.c diff --git a/reactos/dll/win32/wbemdisp/CMakeLists.txt b/reactos/dll/win32/wbemdisp/CMakeLists.txt index da13cb43bdc..c1ea827cc45 100644 --- a/reactos/dll/win32/wbemdisp/CMakeLists.txt +++ b/reactos/dll/win32/wbemdisp/CMakeLists.txt @@ -6,6 +6,7 @@ spec2def(wbemdisp.dll wbemdisp.spec) list(APPEND SOURCE locator.c main.c + guid.c ${CMAKE_CURRENT_BINARY_DIR}/wbemdisp.def) add_idl_headers(wbemdisp_idlheader wbemdisp_classes.idl) @@ -20,7 +21,7 @@ set_source_files_properties(wbemdisp.rc PROPERTIES OBJECT_DEPENDS "${wbemdisp_rc add_library(wbemdisp SHARED ${SOURCE} wbemdisp.rc) set_module_type(wbemdisp win32dll) -target_link_libraries(wbemdisp wine) +target_link_libraries(wbemdisp uuid wine) add_dependencies(wbemdisp wbemdisp_idlheader) add_importlibs(wbemdisp oleaut32 msvcrt kernel32 ntdll) add_cd_file(TARGET wbemdisp DESTINATION reactos/system32/wbem FOR all) diff --git a/reactos/dll/win32/wbemdisp/guid.c b/reactos/dll/win32/wbemdisp/guid.c new file mode 100644 index 00000000000..56285ed046f --- /dev/null +++ b/reactos/dll/win32/wbemdisp/guid.c @@ -0,0 +1,16 @@ +/* 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 +#include +#include + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/reactos/dll/win32/wbemdisp/locator.c b/reactos/dll/win32/wbemdisp/locator.c index 68c24f77038..2c49430ce1e 100644 --- a/reactos/dll/win32/wbemdisp/locator.c +++ b/reactos/dll/win32/wbemdisp/locator.c @@ -16,21 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define COBJMACROS - -#include "config.h" -#include - -#include "windef.h" -#include "winbase.h" -#include "objbase.h" -#include "wbemdisp.h" - -#include "wine/debug.h" -#include "wine/unicode.h" #include "wbemdisp_private.h" -WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp); +#include +#include struct locator { diff --git a/reactos/dll/win32/wbemdisp/main.c b/reactos/dll/win32/wbemdisp/main.c index 8582cf16b35..aef7ecf409a 100644 --- a/reactos/dll/win32/wbemdisp/main.c +++ b/reactos/dll/win32/wbemdisp/main.c @@ -16,23 +16,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "initguid.h" -#include "objbase.h" -#include "wbemdisp.h" -#include "rpcproxy.h" - -#include "wine/debug.h" #include "wbemdisp_private.h" -#include "wbemdisp_classes.h" -WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp); +#include +#include static HINSTANCE instance; diff --git a/reactos/dll/win32/wbemdisp/wbemdisp_private.h b/reactos/dll/win32/wbemdisp/wbemdisp_private.h index 549cb285120..4d30189e9ad 100644 --- a/reactos/dll/win32/wbemdisp/wbemdisp_private.h +++ b/reactos/dll/win32/wbemdisp/wbemdisp_private.h @@ -16,6 +16,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS + +#include +#include +#include +#include + +#include +WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp); + HRESULT SWbemLocator_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1); -- 2.17.1