SHLWAPI ole32

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

 



Hi,

SHLWAPI updates continued.

This patch removes the need for direct linking to ole32, which is
only ever late bound by the real SHLWAPI.

For fear of patch conflicts with myself, I haven't included a patch
to Makefile.in to remove the import and the FIXME. I'll send this in
a later patch, if need be.


ChangeLog:

  Jon Griffiths <jon_p_griffiths@yahoo.com>

  +dlls/shlwapi/shlwapi_main.c dlls/shlwapi/string.c
   Remove the need to directly link to ole32.


=====
"Don't wait for the seas to part, or messiahs to come;
 Don't you sit around and waste this chance..." - Live

jon_p_griffiths@yahoo.com

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--- wine/dlls/shlwapi/shlwapi_main.c	Sat Jun  1 11:40:52 2002
+++ wine-develop/dlls/shlwapi/shlwapi_main.c	Fri Jul 12 11:25:54 2002
@@ -21,8 +21,8 @@
 
 #include "winbase.h"
 #include "winerror.h"
-#include "winreg.h"
 #include "wine/debug.h"
+#define NO_SHLWAPI_REG
 #define NO_SHLWAPI_STREAM
 #include "shlwapi.h"
 
@@ -34,6 +34,7 @@
 HMODULE SHLWAPI_hcomdlg32 = 0;
 HMODULE SHLWAPI_hmpr = 0;
 HMODULE SHLWAPI_hmlang = 0;
+HMODULE SHLWAPI_hole32 = 0;
 HMODULE SHLWAPI_hversion = 0;
 
 DWORD SHLWAPI_ThreadRef_index = -1;
@@ -59,6 +60,7 @@
 	    if (SHLWAPI_hcomdlg32) FreeLibrary(SHLWAPI_hcomdlg32);
 	    if (SHLWAPI_hmpr)      FreeLibrary(SHLWAPI_hmpr);
 	    if (SHLWAPI_hmlang)    FreeLibrary(SHLWAPI_hmlang);
+	    if (SHLWAPI_hole32)    FreeLibrary(SHLWAPI_hole32);
 	    if (SHLWAPI_hversion)  FreeLibrary(SHLWAPI_hversion);
 	    if (SHLWAPI_ThreadRef_index >= 0) TlsFree(SHLWAPI_ThreadRef_index);
 	    break;
diff -urP wine/dlls/shlwapi/string.c wine-patch/dlls/shlwapi/string.c
--- wine/dlls/shlwapi/string.c	Tue Jul  2 14:06:19 2002
+++ wine-patch/dlls/shlwapi/string.c	Fri Jul 12 15:52:06 2002
@@ -24,19 +24,23 @@
 #include <string.h>
 
 #include "winerror.h"
-#include "windef.h"
 #include "winbase.h"
-#include "wingdi.h"
 #include "winuser.h"
-#include "winreg.h"
+#define NO_SHLWAPI_REG
 #define NO_SHLWAPI_STREAM
 #include "shlwapi.h"
 #include "shlobj.h"
+#include "ordinal.h"
 #include "wine/unicode.h"
 #include "wine/debug.h"
 
+
 WINE_DEFAULT_DEBUG_CHANNEL(shell);
 
+extern HMODULE SHLWAPI_hole32;
+
+static VOID (WINAPI *pCoTaskMemFree)(LPVOID) = NULL;
+
 /*************************************************************************
  * ChrCmpIA					[SHLWAPI.385]
  *
@@ -486,7 +490,8 @@
 	{
 	  case STRRET_WSTR:
 	    WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);
-	    CoTaskMemFree(src->u.pOleStr);
+	    GET_FUNC(pCoTaskMemFree, ole32, "CoTaskMemFree", S_OK);
+           pCoTaskMemFree(src->u.pOleStr);
 	    break;
 
 	  case STRRET_CSTR:
@@ -531,7 +536,8 @@
 	{
 	  case STRRET_WSTR:
 	    lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
-	    CoTaskMemFree(src->u.pOleStr);
+	    GET_FUNC(pCoTaskMemFree, ole32, "CoTaskMemFree", S_OK);
+	    pCoTaskMemFree(src->u.pOleStr);
 	    break;
 
 	  case STRRET_CSTR:

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

  Powered by Linux