- move wine includes to precomp.h
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Sat, 27 Jan 2007 17:52:03 +0000 (17:52 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Sat, 27 Jan 2007 17:52:03 +0000 (17:52 +0000)
- this enables compiling nearly all (printdlg has some issues) of comdlg32 with msvc (first include all standard headers and then include the wine compability headers)

svn path=/trunk/; revision=25650

12 files changed:
reactos/dll/win32/comdlg32/cdlg.h
reactos/dll/win32/comdlg32/cdlg32.c
reactos/dll/win32/comdlg32/colordlg.c
reactos/dll/win32/comdlg32/comdlg32.rbuild
reactos/dll/win32/comdlg32/filedlg.c
reactos/dll/win32/comdlg32/filedlg31.c
reactos/dll/win32/comdlg32/filedlgbrowser.c
reactos/dll/win32/comdlg32/filetitle.c
reactos/dll/win32/comdlg32/finddlg32.c
reactos/dll/win32/comdlg32/fontdlg.c
reactos/dll/win32/comdlg32/precomp.h [new file with mode: 0644]
reactos/dll/win32/comdlg32/printdlg.c

index e440c38..e4fa9c5 100644 (file)
@@ -21,9 +21,7 @@
 #ifndef _WINE_DLL_CDLG_H
 #define _WINE_DLL_CDLG_H
 
 #ifndef _WINE_DLL_CDLG_H
 #define _WINE_DLL_CDLG_H
 
-#define COM_NO_WINDOWS_H
-#include "dlgs.h"
-#include "wownt32.h"
+#include <wownt32.h>
 
 /* Common dialogs implementation globals */
 #define COMDLG32_Atom  ((ATOM)0xa000)  /* MS uses this one to identify props */
 
 /* Common dialogs implementation globals */
 #define COMDLG32_Atom  ((ATOM)0xa000)  /* MS uses this one to identify props */
@@ -155,15 +153,6 @@ typedef struct {
 
 #define IDS_FAKEDOCTEXT  1300
 
 
 #define IDS_FAKEDOCTEXT  1300
 
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "commctrl.h"
-#include "shlobj.h"
-#include "shellapi.h"
-
 /* ITEMIDLIST */
 
 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILClone) (LPCITEMIDLIST);
 /* ITEMIDLIST */
 
 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILClone) (LPCITEMIDLIST);
index 09538bf..c927d1e 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commdlg.h"
-#include "cderr.h"
-#include "wine/debug.h"
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
-#include "cdlg.h"
-
-
 HINSTANCE      COMDLG32_hInstance = 0;
 
 static DWORD COMDLG32_TlsIndex = TLS_OUT_OF_INDEXES;
 HINSTANCE      COMDLG32_hInstance = 0;
 
 static DWORD COMDLG32_TlsIndex = TLS_OUT_OF_INDEXES;
index ca758e3..9646fc9 100644 (file)
    sometimes, especially when 2 instances of the
    dialog are loaded at the same time */
 
    sometimes, especially when 2 instances of the
    dialog are loaded at the same time */
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commdlg.h"
-#include "dlgs.h"
-#include "wine/debug.h"
-#include "cderr.h"
-#include "cdlg.h"
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
index bef4be9..89228e0 100644 (file)
@@ -30,4 +30,5 @@
        <file>printdlg.c</file>
        <file>rsrc.rc</file>
        <file>comdlg32.spec</file>
        <file>printdlg.c</file>
        <file>rsrc.rc</file>
        <file>comdlg32.spec</file>
+       <pch>precomp.h</pch>
 </module>
 </module>
index 37ce6c2..8f2c426 100644 (file)
  *
  */
 
  *
  */
 
-#include "config.h"
-#include "wine/port.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#include "windef.h"
-#include "winbase.h"
-#include "winreg.h"
-#include "winternl.h"
-#include "winnls.h"
-#include "wine/unicode.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winreg.h"
-#include "commdlg.h"
-#include "dlgs.h"
-#include "cdlg.h"
-#include "filedlg31.h"
-#include "wine/debug.h"
-#include "cderr.h"
-#include "shellapi.h"
-#include "shlguid.h"
-#include "shlobj.h"
-#include "filedlgbrowser.h"
-#include "shlwapi.h"
+//#include "config.h"
+//#include "wine/port.h"
+
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
index 79141fa..060097a 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "wine/unicode.h"
-#include "wine/debug.h"
-#include "cderr.h"
-#include "winreg.h"
-#include "winternl.h"
-#include "winuser.h"
-#include "commdlg.h"
-#include "cderr.h"
-#include "winreg.h"
-#include "winternl.h"
-#include "shlwapi.h"
 
 
-WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
+#include <precomp.h>
 
 
-#include "cdlg.h"
-#include "filedlg31.h"
+WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 #define BUFFILE 512
 #define BUFFILEALLOC 512 * sizeof(WCHAR)
 
 #define BUFFILE 512
 #define BUFFILEALLOC 512 * sizeof(WCHAR)
index 1ec37ca..7a3ecd1 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winreg.h"
-
-#define NO_SHLWAPI_STREAM
-#include "shlwapi.h"
-#include "filedlgbrowser.h"
-#include "cdlg.h"
-#include "shlguid.h"
-#include "servprov.h"
-#include "wine/debug.h"
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
index 753285b..d426bb3 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <string.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "winreg.h"
-#include "winternl.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commdlg.h"
-#include "cdlg.h"
-#include "cdlg16.h"
-#include "wine/unicode.h"
-#include "wine/debug.h"
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
@@ -49,11 +35,11 @@ short WINAPI GetFileTitleA(LPCSTR lpFile, LPSTR lpTitle, WORD cbBuf)
     LPWSTR lpWTitle;
 
     RtlCreateUnicodeStringFromAsciiz(&strWFile, lpFile);
     LPWSTR lpWTitle;
 
     RtlCreateUnicodeStringFromAsciiz(&strWFile, lpFile);
-    lpWTitle = RtlAllocateHeap( GetProcessHeap(), 0, cbBuf*sizeof(WCHAR));
+    lpWTitle = HeapAlloc( GetProcessHeap(), 0, cbBuf*sizeof(WCHAR));
     ret = GetFileTitleW(strWFile.Buffer, lpWTitle, cbBuf);
     if (!ret) WideCharToMultiByte( CP_ACP, 0, lpWTitle, -1, lpTitle, cbBuf, NULL, NULL );
     RtlFreeUnicodeString( &strWFile );
     ret = GetFileTitleW(strWFile.Buffer, lpWTitle, cbBuf);
     if (!ret) WideCharToMultiByte( CP_ACP, 0, lpWTitle, -1, lpTitle, cbBuf, NULL, NULL );
     RtlFreeUnicodeString( &strWFile );
-    RtlFreeHeap( GetProcessHeap(), 0, lpWTitle );
+    HeapFree( GetProcessHeap(), 0, lpWTitle );
     return ret;
 }
 
     return ret;
 }
 
index 8347f15..d876f6f 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <stdarg.h>
-#include <string.h>
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commdlg.h"
-#include "cderr.h"
-#include "dlgs.h"
-#include "wine/debug.h"
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
-#include "cdlg.h"
-
-
 /*-----------------------------------------------------------------------*/
 
 static UINT            FindReplaceMessage;
 /*-----------------------------------------------------------------------*/
 
 static UINT            FindReplaceMessage;
index 5def9a3..73e7945 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include "windef.h"
-#include "winbase.h"
-#include "winnls.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "commdlg.h"
-#include "dlgs.h"
-#include "wine/debug.h"
-#include "cderr.h"
+#include <precomp.h>
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 
 WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
diff --git a/reactos/dll/win32/comdlg32/precomp.h b/reactos/dll/win32/comdlg32/precomp.h
new file mode 100644 (file)
index 0000000..f56f4f5
--- /dev/null
@@ -0,0 +1,76 @@
+#ifndef PRECOMP_H__
+#define PRECOMP_H__
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#define COBJMACROS
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+#define NO_SHLWAPI_STREAM
+#define COM_NO_WINDOWS_H
+#define _COMDLG32_
+
+#if defined (_MSC_VER)
+#include <windef.h>
+#include <winbase.h>
+#include <wingdi.h>
+#include <winuser.h>
+#include <commdlg.h>
+#include <shellapi.h>
+#include <shlguid.h>
+#include <shlobj.h>
+#include <shlwapi.h>
+#include <guiddef.h>
+#include <dlgs.h>
+#include <cderr.h>
+#endif
+
+#include "wine/windef.h"
+#include "winbase.h"
+#include "wine/wingdi.h"
+#include "wine/winuser.h"
+#include "wine/commdlg.h"
+#include "wine/shellapi.h"
+
+#if !defined (_MSC_VER)
+#include "psdk/shlguid.h"
+#include "psdk/shlobj.h"
+#endif
+
+#include "wine/shlguid.h"
+#include "wine/shlobj.h"
+
+#if !defined (_MSC_VER)
+#include "psdk/shlguid.h"
+#include "psdk/shlwapi.h"
+#include "wine/shlwapi.h"
+#endif
+
+#include "wine/winbase16.h"
+#include "wine/winuser16.h"
+#include "wine/guiddef.h"
+#include "wine/dlgs.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#include <cderr.h>
+#include <cdlg.h>
+#include <winspool.h>
+#include <winerror.h>
+#include <winnls.h>
+#include <winreg.h>
+#include <winternl.h>
+
+//local headers
+#include "cdlg.h"
+#include "printdlg.h"
+#include "filedlgbrowser.h"
+#include "cdlg.h"
+#include "servprov.h"
+#include "filedlg31.h"
+
+#endif
index 4fb0bdb..67669c5 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winspool.h"
-#include "winerror.h"
-
-#include "wine/debug.h"
-
-#include "commdlg.h"
-#include "dlgs.h"
-#include "cderr.h"
 
 
-WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
+#include <precomp.h>
 
 
-#include "cdlg.h"
-#include "printdlg.h"
+WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
 
 /* Yes these constants are the same, but we're just copying win98 */
 #define UPDOWN_ID 0x270f
 
 /* Yes these constants are the same, but we're just copying win98 */
 #define UPDOWN_ID 0x270f