Alexandre Julliard : user32: Fix the DDE service formatting for 64-bit.
Alexandre Julliard
julliard at winehq.org
Fri Apr 24 10:00:10 CDT 2009
Module: wine
Branch: master
Commit: b5346a8ce3c43a3cd5f570e3676b24a2fd717f34
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5346a8ce3c43a3cd5f570e3676b24a2fd717f34
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Apr 24 12:48:44 2009 +0200
user32: Fix the DDE service formatting for 64-bit.
---
dlls/user32/dde_misc.c | 4 ++--
dlls/user32/tests/dde.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/dde_misc.c b/dlls/user32/dde_misc.c
index d0243c7..fda8255 100644
--- a/dlls/user32/dde_misc.c
+++ b/dlls/user32/dde_misc.c
@@ -1647,7 +1647,7 @@ HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
*/
WDML_SERVER* WDML_AddServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic)
{
- static const WCHAR fmtW[] = {'%','s','(','0','x','%','0','8','l','x',')',0};
+ static const WCHAR fmtW[] = {'%','s','(','0','x','%','*','x',')',0};
WDML_SERVER* pServer;
WCHAR buf1[256];
WCHAR buf2[256];
@@ -1659,7 +1659,7 @@ WDML_SERVER* WDML_AddServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTop
WDML_IncHSZ(pInstance, hszService);
DdeQueryStringW(pInstance->instanceID, hszService, buf1, 256, CP_WINUNICODE);
- snprintfW(buf2, 256, fmtW, buf1, GetCurrentProcessId());
+ snprintfW(buf2, 256, fmtW, buf1, 2*sizeof(ULONG_PTR), GetCurrentProcessId());
pServer->hszServiceSpec = DdeCreateStringHandleW(pInstance->instanceID, buf2, CP_WINUNICODE);
pServer->atomService = WDML_MakeAtomFromHsz(pServer->hszService);
diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c
index e7f09f1..3fa9a4f 100644
--- a/dlls/user32/tests/dde.c
+++ b/dlls/user32/tests/dde.c
@@ -585,7 +585,7 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI);
ok(!strncmp(str, "TestDDEServer(", 14), "Expected TestDDEServer(, got %s\n", str);
ok(str[size - 1] == ')', "Expected ')', got %c\n", str[size - 1]);
- ok(size == 25, "Expected 25, got %d\n", size);
+ ok(size == 17 + 2*sizeof(ULONG_PTR), "Got size %d for %s\n", size, str);
return (HDDEDATA)TRUE;
}
More information about the wine-cvs
mailing list