Alexandre Julliard : Revert "winebrowser: Convert URL obtained through DdeGetData to Unicode."

Alexandre Julliard julliard at winehq.org
Fri Jun 25 09:40:51 CDT 2010


Module: wine
Branch: master
Commit: 6f2aa56ce640a3d9256f076271fbedbfddb972fc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6f2aa56ce640a3d9256f076271fbedbfddb972fc

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jun 24 23:42:41 2010 +0200

Revert "winebrowser: Convert URL obtained through DdeGetData to Unicode."

This reverts commit 3dcf22e03fb4473db112bcd47671b37a037cbfc6. The
conversion is now properly handled in DDEML.

---

 programs/winebrowser/main.c |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/programs/winebrowser/main.c b/programs/winebrowser/main.c
index b959d38..f5ffe05 100644
--- a/programs/winebrowser/main.c
+++ b/programs/winebrowser/main.c
@@ -199,27 +199,15 @@ static HDDEDATA CALLBACK ddeCb(UINT uType, UINT uFmt, HCONV hConv,
             return (HDDEDATA)FALSE;
 
         case XTYP_EXECUTE:
-        {
-            char *buffer = NULL;
-
             if (!(size = DdeGetData(hData, NULL, 0, 0)))
                 WINE_ERR("DdeGetData returned zero size of execute string\n");
-            else if (!(buffer = HeapAlloc(GetProcessHeap(), 0, size)))
+            else if (!(ddeString = HeapAlloc(GetProcessHeap(), 0, size)))
                 WINE_ERR("Out of memory\n");
-            else if (DdeGetData(hData, (LPBYTE)buffer, size, 0) != size)
+            else if (DdeGetData(hData, (LPBYTE)ddeString, size, 0) != size)
                 WINE_WARN("DdeGetData did not return %d bytes\n", size);
-            else
-            {
-                int len = MultiByteToWideChar(CP_ACP, 0, buffer, -1, NULL, 0);
-                if (!(ddeString = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
-                    WINE_ERR("Out of memory\n");
-                else
-                    MultiByteToWideChar(CP_ACP, 0, buffer, -1, ddeString, len);
-            }
-            HeapFree(GetProcessHeap(), 0, buffer);
             DdeFreeDataHandle(hData);
             return (HDDEDATA)DDE_FACK;
-        }
+
         case XTYP_REQUEST:
             ret = -3; /* error */
             if (!(size = DdeQueryStringW(ddeInst, hsz2, NULL, 0, CP_WINUNICODE)))




More information about the wine-cvs mailing list