oleidl.idl must include windows.h and ole2.h if COM_NO_WINDOWS_H is not defined.

Francois Gouget fgouget at free.fr
Sun Oct 15 10:04:09 CDT 2006


Define COM_NO_WINDOWS_H wherever needed.
---

A bunch of our headers are missing the following include statements:

#ifndef COM_NO_WINDOWS_H
# include <windows.h>
# include <ole2.h>
#endif

The thing is that Wine's source code is not allowed to include 
windows.h, and we may not want to include ole2.h unless we have to 
either. There are two options there:

 1) Define COM_NO_WINDOWS_H in every source file that includes one such 
header. This is what has been done for source files including 
mediaobj.h. I have added one such section to objbase.h and update the 
40+ files accordingly. By the time the many headers are updated hundred 
more Wine source files will have been touched. But this is really 100% 
compatible with the PSDK headers.

 2) Or modify these sections so they read:

    #if !defined(COM_NO_WINDOWS_H) && !defined(__WINESRC__)
    # include <windows.h>
    # include <ole2.h>
    #endif

    The advantage is that we would not need to modify the Wine source 
files. Such source files would likely compile with the PSDK headers too 
because the PSDK headers don't forbid us from including windows.h (but 
there is a small chance that the extra defines and such could cause 
errors).


So I'm sending a patch using the first option, but let me know if you 
prefer the second one.


 dlls/atl/atl_main.c           |    1 +
 dlls/atl/registrar.c          |    2 +-
 dlls/dpnet/address.c          |    1 +
 dlls/dpnet/client.c           |    1 +
 dlls/dpnet/dpnet_main.c       |    1 +
 dlls/dpnet/peer.c             |    1 +
 dlls/dpnet/regsvr.c           |    1 +
 dlls/dpnet/server.c           |    1 +
 dlls/dxdiagn/dxdiag_private.h |    1 +
 dlls/hhctrl.ocx/chm.c         |    2 +-
 dlls/hhctrl.ocx/help.c        |    1 +
 dlls/hhctrl.ocx/webbrowser.c  |    2 +-
 dlls/hlink/browse_ctx.c       |    2 +-
 dlls/hlink/hlink_main.c       |    2 +-
 dlls/hlink/link.c             |    2 +-
 dlls/iccvid/iccvid.c          |    2 ++
 dlls/msi/action.c             |    2 +-
 dlls/msi/custom.c             |    2 +-
 dlls/msi/dialog.c             |    1 +
 dlls/msi/msi.c                |    1 +
 dlls/msi/package.c            |    1 +
 dlls/msi/record.c             |    2 +-
 dlls/msi/regsvr.c             |    1 +
 dlls/msvfw32/drawdib.c        |    1 +
 dlls/msvfw32/mciwnd.c         |    1 +
 dlls/msvidc32/msvideo1.c      |    2 ++
 dlls/oleacc/main.c            |    2 ++
 dlls/oledlg/insobjdlg.c       |    1 +
 dlls/pstorec/pstorec.c        |    1 +
 dlls/qcap/vfwcapture.c        |    1 +
 dlls/quartz/avidec.c          |    1 +
 dlls/quartz/transform.c       |    1 +
 dlls/riched20/editstr.h       |    1 +
 dlls/riched20/richole.c       |    2 +-
 dlls/sensapi/sensapi.c        |    2 +-
 dlls/setupapi/dirid.c         |    1 +
 dlls/shdocvw/iexplore.c       |    2 +-
 dlls/urlmon/binding.c         |    1 +
 dlls/urlmon/file.c            |    2 +-
 dlls/urlmon/format.c          |    2 +-
 dlls/urlmon/ftp.c             |    2 +-
 dlls/urlmon/http.c            |    2 +-
 dlls/urlmon/internet.c        |    2 +-
 dlls/urlmon/sec_mgr.c         |    2 +-
 dlls/urlmon/session.c         |    2 +-
 dlls/urlmon/umstream.c        |    2 +-
 dlls/urlmon/urlmon_main.c     |    2 +-
 dlls/winex11.drv/xdnd.c       |    1 +
 include/oleidl.idl            |    5 +++++
 49 files changed, 56 insertions(+), 21 deletions(-)

diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c
index 2fdf901..73eaca0 100644
--- a/dlls/atl/atl_main.c
+++ b/dlls/atl/atl_main.c
@@ -22,6 +22,7 @@ #include <stdarg.h>
 #include <stdio.h>
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 
 #include "windef.h"
 #include "winbase.h"
diff --git a/dlls/atl/registrar.c b/dlls/atl/registrar.c
index 0a62aad..a179adc 100644
--- a/dlls/atl/registrar.c
+++ b/dlls/atl/registrar.c
@@ -20,7 +20,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/dpnet/address.c b/dlls/dpnet/address.c
index 01708bd..923f731 100644
--- a/dlls/dpnet/address.c
+++ b/dlls/dpnet/address.c
@@ -24,6 +24,7 @@ #include "config.h"
 #include <stdarg.h>
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/dpnet/client.c b/dlls/dpnet/client.c
index c630715..6a1e27f 100644
--- a/dlls/dpnet/client.c
+++ b/dlls/dpnet/client.c
@@ -24,6 +24,7 @@ #include "config.h"
 #include <stdarg.h>
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/dpnet/dpnet_main.c b/dlls/dpnet/dpnet_main.c
index 36bfc71..6b5bd9b 100644
--- a/dlls/dpnet/dpnet_main.c
+++ b/dlls/dpnet/dpnet_main.c
@@ -23,6 +23,7 @@ #include "config.h"
 
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/dpnet/peer.c b/dlls/dpnet/peer.c
index de131af..200251c 100644
--- a/dlls/dpnet/peer.c
+++ b/dlls/dpnet/peer.c
@@ -23,6 +23,7 @@ #include "config.h"
 
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/dpnet/regsvr.c b/dlls/dpnet/regsvr.c
index 42d5cfd..a7b7a93 100644
--- a/dlls/dpnet/regsvr.c
+++ b/dlls/dpnet/regsvr.c
@@ -21,6 +21,7 @@
 #include <stdarg.h>
 #include <string.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/dpnet/server.c b/dlls/dpnet/server.c
index d6cc211..3636e90 100644
--- a/dlls/dpnet/server.c
+++ b/dlls/dpnet/server.c
@@ -23,6 +23,7 @@ #include "config.h"
 
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/dxdiagn/dxdiag_private.h b/dlls/dxdiagn/dxdiag_private.h
index 6449b32..7930f98 100644
--- a/dlls/dxdiagn/dxdiag_private.h
+++ b/dlls/dxdiagn/dxdiag_private.h
@@ -23,6 +23,7 @@ #define __WINE_DXDIAG_PRIVATE_H
 
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c
index 44438d6..6a26c47 100644
--- a/dlls/hhctrl.ocx/chm.c
+++ b/dlls/hhctrl.ocx/chm.c
@@ -21,7 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c
index 2c288b6..6f62725 100644
--- a/dlls/hhctrl.ocx/help.c
+++ b/dlls/hhctrl.ocx/help.c
@@ -20,6 +20,7 @@
 
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/hhctrl.ocx/webbrowser.c b/dlls/hhctrl.ocx/webbrowser.c
index 3ed1cfe..952b552 100644
--- a/dlls/hhctrl.ocx/webbrowser.c
+++ b/dlls/hhctrl.ocx/webbrowser.c
@@ -21,7 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/hlink/browse_ctx.c b/dlls/hlink/browse_ctx.c
index f36fd2f..4be9137 100644
--- a/dlls/hlink/browse_ctx.c
+++ b/dlls/hlink/browse_ctx.c
@@ -21,7 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "winerror.h"
 #include "windef.h"
 #include "winbase.h"
diff --git a/dlls/hlink/hlink_main.c b/dlls/hlink/hlink_main.c
index f0f0039..9cbc489 100644
--- a/dlls/hlink/hlink_main.c
+++ b/dlls/hlink/hlink_main.c
@@ -21,7 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "winerror.h"
 #include "windef.h"
 #include "winbase.h"
diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c
index 4d86764..1d239fa 100644
--- a/dlls/hlink/link.c
+++ b/dlls/hlink/link.c
@@ -21,7 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "winerror.h"
 #include "windef.h"
 #include "winbase.h"
diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c
index 1bb9b1d..86f0841 100644
--- a/dlls/iccvid/iccvid.c
+++ b/dlls/iccvid/iccvid.c
@@ -41,6 +41,8 @@
  * ------------------------------------------------------------------------ */
 
 #include <stdarg.h>
+
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index a7db050..2588a01 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -29,7 +29,7 @@ http://msdn.microsoft.com/library/defaul
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winerror.h"
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index a464dfe..e8bbcbb 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -28,7 +28,7 @@ #include <stdarg.h>
 #include <stdio.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winerror.h"
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index 06558de..8b6ab60 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -19,6 +19,7 @@
  */
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
 
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 34cbe52..f0268a7 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -21,6 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 #define NONAMELESSUNION
 
 #include "windef.h"
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index aae868c..99fed10 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#define COM_NO_WINDOWS_H
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
 
diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index 6705a03..8492c4b 100644
--- a/dlls/msi/record.c
+++ b/dlls/msi/record.c
@@ -21,7 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/msi/regsvr.c b/dlls/msi/regsvr.c
index 1124ec1..e88b7e1 100644
--- a/dlls/msi/regsvr.c
+++ b/dlls/msi/regsvr.c
@@ -23,6 +23,7 @@ #include "config.h"
 #include <stdarg.h>
 #include <string.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/msvfw32/drawdib.c b/dlls/msvfw32/drawdib.c
index 134c325..0570bc3 100644
--- a/dlls/msvfw32/drawdib.c
+++ b/dlls/msvfw32/drawdib.c
@@ -24,6 +24,7 @@ #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/msvfw32/mciwnd.c b/dlls/msvfw32/mciwnd.c
index c8c611f..a0aa75b 100644
--- a/dlls/msvfw32/mciwnd.c
+++ b/dlls/msvfw32/mciwnd.c
@@ -23,6 +23,7 @@
 
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winnls.h"
diff --git a/dlls/msvidc32/msvideo1.c b/dlls/msvidc32/msvideo1.c
index d49b35a..4f78163 100644
--- a/dlls/msvidc32/msvideo1.c
+++ b/dlls/msvidc32/msvideo1.c
@@ -32,6 +32,8 @@
  */
 
 #include <stdarg.h>
+
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c
index eb57396..402fccc 100644
--- a/dlls/oleacc/main.c
+++ b/dlls/oleacc/main.c
@@ -19,6 +19,8 @@
  */
 
 #include <stdarg.h>
+
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/oledlg/insobjdlg.c b/dlls/oledlg/insobjdlg.c
index 8928b35..209d4a9 100644
--- a/dlls/oledlg/insobjdlg.c
+++ b/dlls/oledlg/insobjdlg.c
@@ -21,6 +21,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winreg.h"
diff --git a/dlls/pstorec/pstorec.c b/dlls/pstorec/pstorec.c
index 96ebe5b..850fe12 100644
--- a/dlls/pstorec/pstorec.c
+++ b/dlls/pstorec/pstorec.c
@@ -21,6 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index ace2b55..9126d8a 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -21,6 +21,7 @@
 #define NONAMELESSSTRUCT
 #define NONAMELESSUNION
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 
 #include "config.h"
 #include <stdarg.h>
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c
index c4f8c54..7c51c93 100644
--- a/dlls/quartz/avidec.c
+++ b/dlls/quartz/avidec.c
@@ -24,6 +24,7 @@ #include "quartz_private.h"
 #include "control_private.h"
 #include "pin.h"
 
+#define COM_NO_WINDOWS_H
 #include "uuids.h"
 #include "aviriff.h"
 #include "mmreg.h"
diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c
index 63b6ad5..55942e2 100644
--- a/dlls/quartz/transform.c
+++ b/dlls/quartz/transform.c
@@ -24,6 +24,7 @@ #include "quartz_private.h"
 #include "control_private.h"
 #include "pin.h"
 
+#define COM_NO_WINDOWS_H
 #include "uuids.h"
 #include "aviriff.h"
 #include "mmreg.h"
diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h
index 9859fe7..9e8896e 100644
--- a/dlls/riched20/editstr.h
+++ b/dlls/riched20/editstr.h
@@ -31,6 +31,7 @@ #include <stdio.h>
 #include <stdlib.h>
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
 
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 9ceb930..30f842a 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -24,7 +24,7 @@ #include <stdarg.h>
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/sensapi/sensapi.c b/dlls/sensapi/sensapi.c
index 4357d4f..3e4f8c2 100644
--- a/dlls/sensapi/sensapi.c
+++ b/dlls/sensapi/sensapi.c
@@ -28,7 +28,7 @@ #include <stdarg.h>
 #include <stdio.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/dlls/setupapi/dirid.c b/dlls/setupapi/dirid.c
index 4fa6cf5..7e0a3eb 100644
--- a/dlls/setupapi/dirid.c
+++ b/dlls/setupapi/dirid.c
@@ -20,6 +20,7 @@
 
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winreg.h"
diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c
index 4f737de..cde3361 100644
--- a/dlls/shdocvw/iexplore.c
+++ b/dlls/shdocvw/iexplore.c
@@ -20,7 +20,7 @@
  */
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include <stdarg.h>
 #include "windef.h"
 #include "winbase.h"
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index 84e4186..b4bb3dc 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -19,6 +19,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
+#define COM_NO_WINDOWS_H
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
 
diff --git a/dlls/urlmon/file.c b/dlls/urlmon/file.c
index 0386a27..f126e9e 100644
--- a/dlls/urlmon/file.c
+++ b/dlls/urlmon/file.c
@@ -19,7 +19,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/urlmon/format.c b/dlls/urlmon/format.c
index 0a0a97d..be25823 100644
--- a/dlls/urlmon/format.c
+++ b/dlls/urlmon/format.c
@@ -19,7 +19,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/urlmon/ftp.c b/dlls/urlmon/ftp.c
index 6db8fe5..f4c697a 100644
--- a/dlls/urlmon/ftp.c
+++ b/dlls/urlmon/ftp.c
@@ -19,7 +19,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index f761314..d74f234 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -19,7 +19,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/urlmon/internet.c b/dlls/urlmon/internet.c
index 0897e93..4bdcba2 100644
--- a/dlls/urlmon/internet.c
+++ b/dlls/urlmon/internet.c
@@ -19,7 +19,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c
index ad423de..ed91557 100644
--- a/dlls/urlmon/sec_mgr.c
+++ b/dlls/urlmon/sec_mgr.c
@@ -23,7 +23,7 @@ #include <stdarg.h>
 #include <stdio.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/urlmon/session.c b/dlls/urlmon/session.c
index ed87d27..4acb43a 100644
--- a/dlls/urlmon/session.c
+++ b/dlls/urlmon/session.c
@@ -19,7 +19,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
diff --git a/dlls/urlmon/umstream.c b/dlls/urlmon/umstream.c
index 4a49b77..f6f8cf0 100644
--- a/dlls/urlmon/umstream.c
+++ b/dlls/urlmon/umstream.c
@@ -22,7 +22,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winreg.h"
diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c
index f7e281e..a134301 100644
--- a/dlls/urlmon/urlmon_main.c
+++ b/dlls/urlmon/urlmon_main.c
@@ -21,7 +21,7 @@
 #include <stdarg.h>
 
 #define COBJMACROS
-
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "winreg.h"
diff --git a/dlls/winex11.drv/xdnd.c b/dlls/winex11.drv/xdnd.c
index cfb28ab..aac27eb 100644
--- a/dlls/winex11.drv/xdnd.c
+++ b/dlls/winex11.drv/xdnd.c
@@ -27,6 +27,7 @@ # include <unistd.h>
 #endif
 #include <stdarg.h>
 
+#define COM_NO_WINDOWS_H
 #include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
diff --git a/include/oleidl.idl b/include/oleidl.idl
index 02aef43..8044b0f 100644
--- a/include/oleidl.idl
+++ b/include/oleidl.idl
@@ -18,6 +18,11 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+cpp_quote("#ifndef COM_NO_WINDOWS_H")
+cpp_quote("# include <windows.h>")
+cpp_quote("# include <ole2.h>")
+cpp_quote("#endif")
+
 import "objidl.idl";
 
 interface IOleInPlaceActiveObject;
-- 
1.4.1.1




More information about the wine-patches mailing list