[2/3] hlink: Undefine the GetObject macro when compiling the Wine source to avoid errors.

Francois Gouget fgouget at free.fr
Thu Oct 18 10:14:15 CDT 2007


--- 

When using the PSDK, GetObject is defined as either GetObjectA or 
GetObjectW so this does not cause a compilation error (and changes the 
name of the class method but that does not matter at all). It's only in 
the Wine source that we get an error if we include wingdi.h before 
including hlink.h.

 include/hlink.idl |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/hlink.idl b/include/hlink.idl
index 3e33891..9265158 100644
--- a/include/hlink.idl
+++ b/include/hlink.idl
@@ -212,6 +212,14 @@ interface IEnumHLITEM : IUnknown
         [out] IEnumHLITEM **ppienumhlitem);
 }
 
+/* GetObject is defined in wingdi.h as WINELIB_NAME_AW(GetObject),
+ * which resolves to a compilation failure if WINE_NO_UNICODE_MACROS is
+ * defined, but GetObject is used as a valid method name below, so we have
+ * to undefine it in that case */
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
+cpp_quote("#undef GetObject")
+cpp_quote("#endif")
+
 /*****************************************************************************
  *    IHlinkBrowseContext interface
  */
-- 
1.5.3.4




More information about the wine-patches mailing list