From 8fb6b02d946d751a9c26c20d94c71a83e1088349 Mon Sep 17 00:00:00 2001 From: Tristan Schmelcher Date: Wed, 1 Dec 2010 12:32:46 -0800 Subject: [PATCH] ddeml: More calling convention fixes. --- dlls/ddeml.dll16/ddeml.c | 6 ++++++ dlls/ddeml.dll16/ddeml.dll16.spec | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dlls/ddeml.dll16/ddeml.c b/dlls/ddeml.dll16/ddeml.c index e0a9dda330d..c7cbd512a6d 100644 --- a/dlls/ddeml.dll16/ddeml.c +++ b/dlls/ddeml.dll16/ddeml.c @@ -386,6 +386,12 @@ HDDEDATA WINAPI DdeClientTransaction16(LPVOID pData, DWORD cbData, HCONV hConv, HSZ hszItem, UINT16 wFmt, UINT16 wType, DWORD dwTimeout, LPDWORD pdwResult) { + if (cbData != (DWORD)-1) + { + /* pData is not a pointer if cbData is -1, so we linearize the address + * here rather than in the calling code. */ + pData = MapSL((SEGPTR)pData); + } return DdeClientTransaction(pData, cbData, hConv, hszItem, wFmt, wType, dwTimeout, pdwResult); } diff --git a/dlls/ddeml.dll16/ddeml.dll16.spec b/dlls/ddeml.dll16/ddeml.dll16.spec index 73fd4612341..ded7103f1a9 100644 --- a/dlls/ddeml.dll16/ddeml.dll16.spec +++ b/dlls/ddeml.dll16/ddeml.dll16.spec @@ -1,29 +1,29 @@ 2 pascal -ret16 DdeInitialize(ptr segptr long long) DdeInitialize16 3 pascal -ret16 DdeUninitialize(long) DdeUninitialize16 -4 pascal DdeConnectList(long long long word ptr) DdeConnectList16 +4 pascal DdeConnectList(long long long long ptr) DdeConnectList16 5 pascal DdeQueryNextServer(long long) DdeQueryNextServer16 6 pascal -ret16 DdeDisconnectList(long) DdeDisconnectList16 7 pascal DdeConnect(long long long ptr) DdeConnect16 8 pascal -ret16 DdeDisconnect(long) DdeDisconnect16 -9 pascal -ret16 DdeQueryConvInfo (long long ptr) DdeQueryConvInfo16 +9 pascal -ret16 DdeQueryConvInfo(long long ptr) DdeQueryConvInfo16 10 pascal -ret16 DdeSetUserHandle(long long long) DdeSetUserHandle16 -11 pascal DdeClientTransaction(ptr long long long s_word s_word long ptr) DdeClientTransaction16 +11 pascal DdeClientTransaction(long long long long word word long ptr) DdeClientTransaction16 12 pascal -ret16 DdeAbandonTransaction(long long long) DdeAbandonTransaction16 13 pascal -ret16 DdePostAdvise(long long long) DdePostAdvise16 14 pascal DdeCreateDataHandle(long ptr long long long word word) DdeCreateDataHandle16 -15 pascal DdeAddData(word ptr long long) DdeAddData16 -16 pascal DdeGetData(word ptr long long) DdeGetData16 -17 pascal DdeAccessData(word ptr) DdeAccessData16 -18 pascal -ret16 DdeUnaccessData(word) DdeUnaccessData16 +15 pascal DdeAddData(long ptr long long) DdeAddData16 +16 pascal DdeGetData(long ptr long long) DdeGetData16 +17 pascal DdeAccessData(long ptr) DdeAccessData16 +18 pascal -ret16 DdeUnaccessData(long) DdeUnaccessData16 19 pascal -ret16 DdeFreeDataHandle(long) DdeFreeDataHandle16 20 pascal -ret16 DdeGetLastError(long) DdeGetLastError16 21 pascal DdeCreateStringHandle(long str s_word) DdeCreateStringHandle16 22 pascal -ret16 DdeFreeStringHandle(long long) DdeFreeStringHandle16 -23 pascal DdeQueryString (long long ptr long word) DdeQueryString16 +23 pascal DdeQueryString(long long ptr long s_word) DdeQueryString16 24 pascal -ret16 DdeKeepStringHandle(long long) DdeKeepStringHandle16 26 pascal -ret16 DdeEnableCallback(long long word) DdeEnableCallback16 -27 pascal DdeNameService(long long long s_word) DdeNameService16 +27 pascal DdeNameService(long long long word) DdeNameService16 36 pascal -ret16 DdeCmpStringHandles(long long) DdeCmpStringHandles16 37 pascal DdeReconnect(long) DdeReconnect