From 7286365580aa1773333682c2c06ea7995d09907c Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Tue, 24 Dec 2013 22:50:09 +0000 Subject: [PATCH] [MAPI32] * Create a main header and move some inclusions to it. * Set the default debugging channel globally through the main header. * Remove inclusions that already exist in the main resource file. CORE-7716 svn path=/trunk/; revision=61391 --- reactos/dll/win32/mapi32/imalloc.c | 23 +------------------- reactos/dll/win32/mapi32/lang/Cy.rc | 2 -- reactos/dll/win32/mapi32/lang/Da.rc | 2 -- reactos/dll/win32/mapi32/lang/De.rc | 2 -- reactos/dll/win32/mapi32/lang/En.rc | 2 -- reactos/dll/win32/mapi32/lang/Es.rc | 2 -- reactos/dll/win32/mapi32/lang/Fr.rc | 2 -- reactos/dll/win32/mapi32/lang/Ga.rc | 2 -- reactos/dll/win32/mapi32/lang/He.rc | 2 -- reactos/dll/win32/mapi32/lang/Hu.rc | 2 -- reactos/dll/win32/mapi32/lang/It.rc | 2 -- reactos/dll/win32/mapi32/lang/Ja.rc | 2 -- reactos/dll/win32/mapi32/lang/Ko.rc | 2 -- reactos/dll/win32/mapi32/lang/Lt.rc | 2 -- reactos/dll/win32/mapi32/lang/Nl.rc | 2 -- reactos/dll/win32/mapi32/lang/No.rc | 2 -- reactos/dll/win32/mapi32/lang/Pl.rc | 2 -- reactos/dll/win32/mapi32/lang/Pt.rc | 2 -- reactos/dll/win32/mapi32/lang/Ro.rc | 2 -- reactos/dll/win32/mapi32/lang/Ru.rc | 2 -- reactos/dll/win32/mapi32/lang/Si.rc | 2 -- reactos/dll/win32/mapi32/lang/Uk.rc | 2 -- reactos/dll/win32/mapi32/mapi32_main.c | 17 +-------------- reactos/dll/win32/mapi32/precomp.h | 30 ++++++++++++++++++++++++++ reactos/dll/win32/mapi32/prop.c | 18 +--------------- reactos/dll/win32/mapi32/res.h | 2 +- reactos/dll/win32/mapi32/sendmail.c | 30 ++------------------------ reactos/dll/win32/mapi32/stubs.c | 2 ++ reactos/dll/win32/mapi32/util.c | 20 +---------------- reactos/dll/win32/mapi32/version.rc | 2 ++ 30 files changed, 41 insertions(+), 145 deletions(-) create mode 100644 reactos/dll/win32/mapi32/precomp.h diff --git a/reactos/dll/win32/mapi32/imalloc.c b/reactos/dll/win32/mapi32/imalloc.c index f30b0e4bfec..bd002cfe6c2 100644 --- a/reactos/dll/win32/mapi32/imalloc.c +++ b/reactos/dll/win32/mapi32/imalloc.c @@ -18,28 +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 - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include -#include -//#include "winreg.h" -//#include "winuser.h" -//#include "winerror.h" -//#include "winternl.h" -//#include "objbase.h" -//#include "shlwapi.h" -#include -#include "util.h" -#include - -WINE_DEFAULT_DEBUG_CHANNEL(mapi); +#include "precomp.h" static const IMallocVtbl MAPI_IMalloc_vt; diff --git a/reactos/dll/win32/mapi32/lang/Cy.rc b/reactos/dll/win32/mapi32/lang/Cy.rc index 1003a9ed35a..e4877e3a1d2 100644 --- a/reactos/dll/win32/mapi32/lang/Cy.rc +++ b/reactos/dll/win32/mapi32/lang/Cy.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - LANGUAGE LANG_WELSH, SUBLANG_DEFAULT STRINGTABLE diff --git a/reactos/dll/win32/mapi32/lang/Da.rc b/reactos/dll/win32/mapi32/lang/Da.rc index e22f3032aee..c40e9341541 100644 --- a/reactos/dll/win32/mapi32/lang/Da.rc +++ b/reactos/dll/win32/mapi32/lang/Da.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - LANGUAGE LANG_DANISH, SUBLANG_DEFAULT STRINGTABLE diff --git a/reactos/dll/win32/mapi32/lang/De.rc b/reactos/dll/win32/mapi32/lang/De.rc index 2c811d15a0c..2bbaee89fa7 100644 --- a/reactos/dll/win32/mapi32/lang/De.rc +++ b/reactos/dll/win32/mapi32/lang/De.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL STRINGTABLE diff --git a/reactos/dll/win32/mapi32/lang/En.rc b/reactos/dll/win32/mapi32/lang/En.rc index 9a6bf77998f..9cc45303dd5 100644 --- a/reactos/dll/win32/mapi32/lang/En.rc +++ b/reactos/dll/win32/mapi32/lang/En.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT STRINGTABLE diff --git a/reactos/dll/win32/mapi32/lang/Es.rc b/reactos/dll/win32/mapi32/lang/Es.rc index 534f4d4dbc9..22af69c0636 100644 --- a/reactos/dll/win32/mapi32/lang/Es.rc +++ b/reactos/dll/win32/mapi32/lang/Es.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Fr.rc b/reactos/dll/win32/mapi32/lang/Fr.rc index ab14e4ad377..e7a9296f3bd 100644 --- a/reactos/dll/win32/mapi32/lang/Fr.rc +++ b/reactos/dll/win32/mapi32/lang/Fr.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Ga.rc b/reactos/dll/win32/mapi32/lang/Ga.rc index e8aa3c05558..676aaba87cc 100644 --- a/reactos/dll/win32/mapi32/lang/Ga.rc +++ b/reactos/dll/win32/mapi32/lang/Ga.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - LANGUAGE LANG_GAELIC, SUBLANG_GAELIC STRINGTABLE diff --git a/reactos/dll/win32/mapi32/lang/He.rc b/reactos/dll/win32/mapi32/lang/He.rc index 5fcabcded0b..82c3bfc106a 100644 --- a/reactos/dll/win32/mapi32/lang/He.rc +++ b/reactos/dll/win32/mapi32/lang/He.rc @@ -21,8 +21,6 @@ * */ -#include "res.h" - LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT STRINGTABLE diff --git a/reactos/dll/win32/mapi32/lang/Hu.rc b/reactos/dll/win32/mapi32/lang/Hu.rc index dac2f334c1d..e275b269678 100644 --- a/reactos/dll/win32/mapi32/lang/Hu.rc +++ b/reactos/dll/win32/mapi32/lang/Hu.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/It.rc b/reactos/dll/win32/mapi32/lang/It.rc index 6e2b5e22b79..0c74648b272 100644 --- a/reactos/dll/win32/mapi32/lang/It.rc +++ b/reactos/dll/win32/mapi32/lang/It.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Ja.rc b/reactos/dll/win32/mapi32/lang/Ja.rc index 96dbdb0e4e6..cd3fc55287b 100644 --- a/reactos/dll/win32/mapi32/lang/Ja.rc +++ b/reactos/dll/win32/mapi32/lang/Ja.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Ko.rc b/reactos/dll/win32/mapi32/lang/Ko.rc index 710b0bef905..e9796bf5a79 100644 --- a/reactos/dll/win32/mapi32/lang/Ko.rc +++ b/reactos/dll/win32/mapi32/lang/Ko.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Lt.rc b/reactos/dll/win32/mapi32/lang/Lt.rc index b66bf3da010..63b6e83a2f2 100644 --- a/reactos/dll/win32/mapi32/lang/Lt.rc +++ b/reactos/dll/win32/mapi32/lang/Lt.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Nl.rc b/reactos/dll/win32/mapi32/lang/Nl.rc index fa078ad8b5b..dda4221920d 100644 --- a/reactos/dll/win32/mapi32/lang/Nl.rc +++ b/reactos/dll/win32/mapi32/lang/Nl.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/No.rc b/reactos/dll/win32/mapi32/lang/No.rc index 5e4d8c52b01..63f64bd34da 100644 --- a/reactos/dll/win32/mapi32/lang/No.rc +++ b/reactos/dll/win32/mapi32/lang/No.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - #pragma code_page(65001) LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL diff --git a/reactos/dll/win32/mapi32/lang/Pl.rc b/reactos/dll/win32/mapi32/lang/Pl.rc index 1c9f2e69f1e..51a1e2c5166 100644 --- a/reactos/dll/win32/mapi32/lang/Pl.rc +++ b/reactos/dll/win32/mapi32/lang/Pl.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - LANGUAGE LANG_POLISH, SUBLANG_DEFAULT STRINGTABLE diff --git a/reactos/dll/win32/mapi32/lang/Pt.rc b/reactos/dll/win32/mapi32/lang/Pt.rc index b12e6c54e8f..bc17797d8b2 100644 --- a/reactos/dll/win32/mapi32/lang/Pt.rc +++ b/reactos/dll/win32/mapi32/lang/Pt.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - #pragma code_page(65001) LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN diff --git a/reactos/dll/win32/mapi32/lang/Ro.rc b/reactos/dll/win32/mapi32/lang/Ro.rc index 84ad35f5cf2..56e81fe4cfe 100644 --- a/reactos/dll/win32/mapi32/lang/Ro.rc +++ b/reactos/dll/win32/mapi32/lang/Ro.rc @@ -18,8 +18,6 @@ * */ -#include "res.h" - LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Ru.rc b/reactos/dll/win32/mapi32/lang/Ru.rc index 66626da23a2..b4448fb1ad4 100644 --- a/reactos/dll/win32/mapi32/lang/Ru.rc +++ b/reactos/dll/win32/mapi32/lang/Ru.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/lang/Si.rc b/reactos/dll/win32/mapi32/lang/Si.rc index 4abdc826e93..519958f1eff 100644 --- a/reactos/dll/win32/mapi32/lang/Si.rc +++ b/reactos/dll/win32/mapi32/lang/Si.rc @@ -19,8 +19,6 @@ * */ -#include "res.h" - #pragma code_page(65001) LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT diff --git a/reactos/dll/win32/mapi32/lang/Uk.rc b/reactos/dll/win32/mapi32/lang/Uk.rc index f08b31df95d..fa1a9edc434 100644 --- a/reactos/dll/win32/mapi32/lang/Uk.rc +++ b/reactos/dll/win32/mapi32/lang/Uk.rc @@ -20,8 +20,6 @@ * */ -#include "res.h" - /* UTF-8 */ #pragma code_page(65001) diff --git a/reactos/dll/win32/mapi32/mapi32_main.c b/reactos/dll/win32/mapi32/mapi32_main.c index 34e81c17ee3..cadbc184af8 100644 --- a/reactos/dll/win32/mapi32/mapi32_main.c +++ b/reactos/dll/win32/mapi32/mapi32_main.c @@ -18,24 +18,9 @@ * 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 - -#include -#include -//#include "winerror.h" -//#include "objbase.h" -#include #include -//#include "mapiform.h" -//#include "mapi.h" -#include -#include "util.h" - -WINE_DEFAULT_DEBUG_CHANNEL(mapi); DECLSPEC_HIDDEN LONG MAPI_ObjectCount = 0; DECLSPEC_HIDDEN HINSTANCE hInstMAPI32; diff --git a/reactos/dll/win32/mapi32/precomp.h b/reactos/dll/win32/mapi32/precomp.h new file mode 100644 index 00000000000..5b2dd13c13a --- /dev/null +++ b/reactos/dll/win32/mapi32/precomp.h @@ -0,0 +1,30 @@ +#ifndef _MAPI32_PCH_ +#define _MAPI32_PCH_ + +#include + +#include + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include +#include +#include +#include +#include +#include + +#include + +#include +WINE_DEFAULT_DEBUG_CHANNEL(mapi); + +#include "util.h" + +#endif /* _MAPI32_PCH_ */ diff --git a/reactos/dll/win32/mapi32/prop.c b/reactos/dll/win32/mapi32/prop.c index 215c2c43b5a..d39637502fa 100644 --- a/reactos/dll/win32/mapi32/prop.c +++ b/reactos/dll/win32/mapi32/prop.c @@ -18,26 +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 "precomp.h" -#include -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -//#include "winerror.h" -//#include "winternl.h" -//#include "objbase.h" #include #include -#include -#include -#include - -WINE_DEFAULT_DEBUG_CHANNEL(mapi); BOOL WINAPI FBadRglpszA(LPSTR*,ULONG); diff --git a/reactos/dll/win32/mapi32/res.h b/reactos/dll/win32/mapi32/res.h index 023eea88b36..28b33d44c38 100644 --- a/reactos/dll/win32/mapi32/res.h +++ b/reactos/dll/win32/mapi32/res.h @@ -19,7 +19,7 @@ * */ -//#include +#pragma once /* Strings */ #define IDS_NO_MAPI_CLIENT 1 diff --git a/reactos/dll/win32/mapi32/sendmail.c b/reactos/dll/win32/mapi32/sendmail.c index 43d68ce140e..26883b0e53a 100644 --- a/reactos/dll/win32/mapi32/sendmail.c +++ b/reactos/dll/win32/mapi32/sendmail.c @@ -19,37 +19,11 @@ * 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 -//#include "wine/port.h" - -//#include -#include - -#define COBJMACROS - -#include -#include -//#include "winerror.h" #include -//#include "objbase.h" -//#include "objidl.h" -//#include "mapi.h" -//#include "mapix.h" -#include -//#include "mapidefs.h" -//#include "winreg.h" -//#include "shellapi.h" -//#include "shlwapi.h" -#include -#include -#include "util.h" -#include "res.h" -WINE_DEFAULT_DEBUG_CHANNEL(mapi); +#include "res.h" #define READ_BUF_SIZE 4096 diff --git a/reactos/dll/win32/mapi32/stubs.c b/reactos/dll/win32/mapi32/stubs.c index 02c63c19a0d..8cd1231fbfe 100644 --- a/reactos/dll/win32/mapi32/stubs.c +++ b/reactos/dll/win32/mapi32/stubs.c @@ -1,10 +1,12 @@ #define WIN32_NO_STATUS #define _INC_WINDOWS #define COM_NO_WINDOWS_H + #include #include #include #include + #include typedef PVOID LPMAPIFORMMGR, LPADDRESSBOOK; diff --git a/reactos/dll/win32/mapi32/util.c b/reactos/dll/win32/mapi32/util.c index f296184b1d4..59363c911a8 100644 --- a/reactos/dll/win32/mapi32/util.c +++ b/reactos/dll/win32/mapi32/util.c @@ -19,32 +19,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 "precomp.h" -//#include #include -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include -#include -#include -//#include "winuser.h" -//#include "winerror.h" #include -//#include "objbase.h" #include -#include -#include -#include #include #include -#include "util.h" - -WINE_DEFAULT_DEBUG_CHANNEL(mapi); static const BYTE digitsToHex[] = { 0,1,2,3,4,5,6,7,8,9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,10,11,12,13,14,15, diff --git a/reactos/dll/win32/mapi32/version.rc b/reactos/dll/win32/mapi32/version.rc index 48c90215913..555a162053f 100644 --- a/reactos/dll/win32/mapi32/version.rc +++ b/reactos/dll/win32/mapi32/version.rc @@ -16,6 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "res.h" + #define WINE_FILEDESCRIPTION_STR "Wine Messaging API" #define WINE_FILENAME_STR "mapi32.dll" #define WINE_FILEVERSION 1,0,0,0