RESEND: [comctrl32] fix ReAlloc

Thomas Weidenmueller wine-patches at reactsoft.com
Sun Jan 1 06:48:56 CST 2006


ReAlloc should be able to move memory blocks if necessary. This fixes
some problems I ran into: syslink control, and dynamically adding
property sheets with PropSheet_AddPage/PSM_ADDPAGE.

Please let me know if there's something wrong with this patch.

- Thomas

-------------- next part --------------
Index: dlls/comctl32/comctl32undoc.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/comctl32undoc.c,v
retrieving revision 1.105
diff -u -r1.105 comctl32undoc.c
--- dlls/comctl32/comctl32undoc.c	17 Sep 2005 14:29:01 -0000	1.105
+++ dlls/comctl32/comctl32undoc.c	28 Dec 2005 19:52:27 -0000
@@ -96,7 +96,7 @@
 LPVOID WINAPI ReAlloc (LPVOID lpSrc, DWORD dwSize)
 {
     if (lpSrc)
-        return LocalReAlloc( lpSrc, dwSize, LMEM_ZEROINIT );
+        return LocalReAlloc( lpSrc, dwSize, LMEM_ZEROINIT | LMEM_MOVEABLE );
     else
         return LocalAlloc( LMEM_ZEROINIT, dwSize);
 }



More information about the wine-patches mailing list