IStream, y es-tu?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Windows, commctrl.h and shlwapi.h will leave a couple of functions
out if IStream is not defined (i.e. if you include them before
objidl.h). In Wine commctrl.h tested the wrong macro and shlwapi.h did
nothing. I modified both to test for IStream_IMETHODS, the Wine macro
that says the IStream interface has been defined.

This lets the shreg slwapi test compile now that I have removed (see
previous patch)  wine/obj_base.h and wine/obj_storage.h (which are
obviously not present on Windows and thus should not be used).

Changelog:

 * include/commctrl.h,
   include/shlwapi.h

   Test for IStream_IMETHODS before defining APIs that need the IStream
interface (like on Windows).


--
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
  Good judgment comes from experience, and experience comes from bad judgment
                               -- Barry LePatner


Index: include/commctrl.h
===================================================================
RCS file: /home/wine/wine/include/commctrl.h,v
retrieving revision 1.88
diff -u -r1.88 commctrl.h
--- include/commctrl.h	5 Apr 2002 21:15:32 -0000	1.88
+++ include/commctrl.h	20 May 2002 22:43:40 -0000
@@ -544,7 +544,7 @@
                                          COLORREF,UINT,UINT);
 #define    ImageList_LoadImage WINELIB_NAME_AW(ImageList_LoadImage)
 HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST,INT,HIMAGELIST,INT,INT,INT);
-#ifdef __IStream_INTREFACE_DEFINED__
+#ifdef IStream_IMETHODS
 HIMAGELIST WINAPI ImageList_Read(LPSTREAM);
 #endif
 BOOL     WINAPI ImageList_Remove(HIMAGELIST,INT);
@@ -556,7 +556,7 @@
 BOOL     WINAPI ImageList_SetIconSize(HIMAGELIST,INT,INT);
 BOOL     WINAPI ImageList_SetImageCount(HIMAGELIST,INT);
 BOOL     WINAPI ImageList_SetOverlayImage(HIMAGELIST,INT,INT);
-#ifdef __IStream_INTREFACE_DEFINED__
+#ifdef IStream_IMETHODS
 BOOL     WINAPI ImageList_Write(HIMAGELIST, LPSTREAM);
 #endif

Index: include/shlwapi.h
===================================================================
RCS file: /home/wine/wine/include/shlwapi.h,v
retrieving revision 1.25
diff -u -r1.25 shlwapi.h
--- include/shlwapi.h	20 Mar 2002 01:33:19 -0000	1.25
+++ include/shlwapi.h	20 May 2002 22:43:41 -0000
@@ -691,7 +691,7 @@


 /* Stream functions */
-#ifndef NO_SHLWAPI_STREAM
+#if !defined(NO_SHLWAPI_STREAM) && defined(IStream_IMETHODS)

 IStream * WINAPI SHOpenRegStreamA(HKEY,LPCSTR,LPCSTR,DWORD);
 IStream * WINAPI SHOpenRegStreamW(HKEY,LPCWSTR,LPCWSTR,DWORD);



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux