From dca5c07bbe6d8a09b25a368c46a67b5860752740 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 25 Dec 2013 15:31:19 +0000 Subject: [PATCH] [MSCOREE] * 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=61411 --- reactos/dll/win32/mscoree/CMakeLists.txt | 3 +- reactos/dll/win32/mscoree/assembly.c | 22 ++------------ reactos/dll/win32/mscoree/config.c | 26 +++------------- reactos/dll/win32/mscoree/cordebug.c | 25 ---------------- reactos/dll/win32/mscoree/corruntimehost.c | 31 ++----------------- reactos/dll/win32/mscoree/guid.c | 17 +++++++++++ reactos/dll/win32/mscoree/metadata.c | 27 +---------------- reactos/dll/win32/mscoree/metahost.c | 32 ++++---------------- reactos/dll/win32/mscoree/mscoree_main.c | 33 +-------------------- reactos/dll/win32/mscoree/mscoree_private.h | 23 ++++++++++++++ 10 files changed, 57 insertions(+), 182 deletions(-) create mode 100644 reactos/dll/win32/mscoree/guid.c diff --git a/reactos/dll/win32/mscoree/CMakeLists.txt b/reactos/dll/win32/mscoree/CMakeLists.txt index eaae3c552aa..21b183df8a3 100644 --- a/reactos/dll/win32/mscoree/CMakeLists.txt +++ b/reactos/dll/win32/mscoree/CMakeLists.txt @@ -15,12 +15,13 @@ list(APPEND SOURCE metadata.c metahost.c mscoree_main.c + guid.c mscoree.rc ${CMAKE_CURRENT_BINARY_DIR}/mscoree_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/mscoree.def) add_library(mscoree SHARED ${SOURCE}) set_module_type(mscoree win32dll) -target_link_libraries(mscoree wine uuid) +target_link_libraries(mscoree uuid wine) add_importlibs(mscoree dbghelp advapi32 shell32 ole32 shlwapi msvcrt kernel32 ntdll) add_cd_file(TARGET mscoree DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/win32/mscoree/assembly.c b/reactos/dll/win32/mscoree/assembly.c index 77852c06268..310726fc28e 100644 --- a/reactos/dll/win32/mscoree/assembly.c +++ b/reactos/dll/win32/mscoree/assembly.c @@ -18,28 +18,10 @@ * 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 -//#include - -#include -#include -//#include "winuser.h" -#include -#include -#include -//#include "mscoree.h" -#include -#include -#include -#include #include "mscoree_private.h" -//#include "wine/debug.h" -//#include "wine/unicode.h" +#include +#include typedef struct { diff --git a/reactos/dll/win32/mscoree/config.c b/reactos/dll/win32/mscoree/config.c index e8d73242397..b36cbb5f1fd 100644 --- a/reactos/dll/win32/mscoree/config.c +++ b/reactos/dll/win32/mscoree/config.c @@ -18,30 +18,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 - -#define COBJMACROS - -#include - -#include -#include -#include -#include -#include -//#include "mscoree.h" -#include -#include -#include -#include #include "mscoree_private.h" + +#include #include - -#include - -WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); +#include +#include enum parse_state { diff --git a/reactos/dll/win32/mscoree/cordebug.c b/reactos/dll/win32/mscoree/cordebug.c index be6091f5a30..d1601fcae77 100644 --- a/reactos/dll/win32/mscoree/cordebug.c +++ b/reactos/dll/win32/mscoree/cordebug.c @@ -17,32 +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 - -#define COBJMACROS - -#include - -#include -#include - -//#include "winuser.h" -//#include "winnls.h" -//#include "winreg.h" -#include -//#include "shellapi.h" -//#include "mscoree.h" -#include -#include -#include -#include #include "mscoree_private.h" -#include - - -WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); typedef struct DebugProcess { diff --git a/reactos/dll/win32/mscoree/corruntimehost.c b/reactos/dll/win32/mscoree/corruntimehost.c index f7baefad767..983af008a26 100644 --- a/reactos/dll/win32/mscoree/corruntimehost.c +++ b/reactos/dll/win32/mscoree/corruntimehost.c @@ -17,37 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include -#include - -#include -#include -//#include "winuser.h" -//#include "winnls.h" -#include -#include -#include - -#include -//#include "mscoree.h" -#include -//#include "corhdr.h" -#include -#include #include "mscoree_private.h" -#include -#include -//#include "wine/list.h" - -WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); - +#include +#include #include DEFINE_GUID(IID__AppDomain, 0x05f696dc,0x2b29,0x3663,0xad,0x8b,0xc4,0x38,0x9c,0xf2,0xa7,0x13); diff --git a/reactos/dll/win32/mscoree/guid.c b/reactos/dll/win32/mscoree/guid.c new file mode 100644 index 00000000000..d1cc2eb556d --- /dev/null +++ b/reactos/dll/win32/mscoree/guid.c @@ -0,0 +1,17 @@ +/* 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 +#include + +/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */ diff --git a/reactos/dll/win32/mscoree/metadata.c b/reactos/dll/win32/mscoree/metadata.c index 9d6692199a8..b80a2dcb699 100644 --- a/reactos/dll/win32/mscoree/metadata.c +++ b/reactos/dll/win32/mscoree/metadata.c @@ -18,32 +18,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 -#include -//#include - -#define COBJMACROS - -//#include "wine/library.h" -#include -#include -//#include "winreg.h" -#include -#include -//#include "mscoree.h" -//#include "corhdr.h" -//#include "cordebug.h" -//#include "metahost.h" -//#include "wine/list.h" -//#include "mscoree_private.h" - -#include - -WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); +#include "mscoree_private.h" typedef struct MetaDataDispenser { diff --git a/reactos/dll/win32/mscoree/metahost.c b/reactos/dll/win32/mscoree/metahost.c index 6ac04ff87a2..7b01f1024c6 100644 --- a/reactos/dll/win32/mscoree/metahost.c +++ b/reactos/dll/win32/mscoree/metahost.c @@ -18,36 +18,14 @@ * 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 -//#include -#include - -#define COBJMACROS - -#include -#include -//#include "windef.h" -//#include "winbase.h" -#include -#include - -//#include "corerror.h" -#include -//#include "mscoree.h" -//#include "corhdr.h" -#include -#include -#include -#include #include "mscoree_private.h" -#include +#include +#include -WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); +#include + +#include static const WCHAR net_11_subdir[] = {'1','.','0',0}; static const WCHAR net_20_subdir[] = {'2','.','0',0}; diff --git a/reactos/dll/win32/mscoree/mscoree_main.c b/reactos/dll/win32/mscoree/mscoree_main.c index d8b4ce62810..0b982d08fd2 100644 --- a/reactos/dll/win32/mscoree/mscoree_main.c +++ b/reactos/dll/win32/mscoree/mscoree_main.c @@ -19,41 +19,10 @@ * 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 "wine/library.h" -//#include "windef.h" -//#include "winbase.h" -//#include "winuser.h" -//#include "winnls.h" -#include -#include -#include -//#include "shellapi.h" - -#include -#include -//#include "corerror.h" -#include -//#include "mscoree.h" -//#include "corhdr.h" -#include -#include -//#include "fusion.h" -#include #include "mscoree_private.h" + #include -#include - -WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); - static HINSTANCE MSCOREE_hInstance; typedef HRESULT (*fnCreateInstance)(REFIID riid, LPVOID *ppObj); diff --git a/reactos/dll/win32/mscoree/mscoree_private.h b/reactos/dll/win32/mscoree/mscoree_private.h index ef9079ebdef..3bcb90519d9 100644 --- a/reactos/dll/win32/mscoree/mscoree_private.h +++ b/reactos/dll/win32/mscoree/mscoree_private.h @@ -20,6 +20,29 @@ #ifndef __MSCOREE_PRIVATE__ #define __MSCOREE_PRIVATE__ +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); + extern char *WtoA(LPCWSTR wstr) DECLSPEC_HIDDEN; extern HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj) DECLSPEC_HIDDEN;