Commit 78a4134e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

- implemented correctly the HSZ as local atoms and added the needed

conversions to global atoms - enhanced internal handle <=> pointer conversions, as well as validity of such objects (life time, destruction, mutual access...) - fixed a few ANSI/Unicode issues, stores most of the data as Unicode - started having both Ansi/Unicode DDE window procs for message A/W transformation - fixed a few segmented pointer issues (mainly in DdeInitialize & DdeGetData) - added most of the CBF_ flags handling - implemented the conversation announcement (XTYP_CONNECT_CONFIRM) on server side - enhanced DdeQueryConfig and implemented DdeReconnect - implemented conversation termination (including XTYP_UNREGISTER) - several others code clean up - added transaction support on server side too
parent 7b3495ac
......@@ -37,7 +37,9 @@ RC_SRCS16 = \
resources/mouse.rc \
resources/version16.rc
GLUE = thunk.c
GLUE = \
dde/ddeml16.c \
thunk.c
EXTRA_OBJS = \
$(TOPOBJDIR)/controls/controls.o \
......
......@@ -19,6 +19,7 @@
#include "winerror.h"
#include "dde.h"
#include "ddeml.h"
#include "dde/dde_private.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ddeml);
......@@ -54,6 +55,22 @@ typedef struct
CONVCONTEXT16 ConvCtxt;
} CONVINFO16, *LPCONVINFO16;
/* ### start build ### */
extern LONG CALLBACK WDML_CallTo16_long_llllllll (FARPROC16,LONG,LONG,LONG,LONG,LONG,LONG,LONG,LONG);
/* ### stop build ### */
/******************************************************************
* WDML_InvokeCallback16
*
*
*/
HDDEDATA WDML_InvokeCallback16(PFNCALLBACK pfn, UINT uType, UINT uFmt, HCONV hConv,
HSZ hsz1, HSZ hsz2, HDDEDATA hdata,
DWORD dwData1, DWORD dwData2)
{
return WDML_CallTo16_long_llllllll((FARPROC16)pfn, uType, uFmt, hConv,
hsz1, hsz2, hdata, dwData1, dwData2);
}
/******************************************************************************
* DdeInitialize (DDEML.2)
......@@ -61,8 +78,7 @@ typedef struct
UINT16 WINAPI DdeInitialize16(LPDWORD pidInst, PFNCALLBACK16 pfnCallback,
DWORD afCmd, DWORD ulRes)
{
return (UINT16)DdeInitializeA(pidInst,(PFNCALLBACK)pfnCallback,
afCmd, ulRes);
return WDML_Initialize(pidInst, (PFNCALLBACK)pfnCallback, afCmd, ulRes, FALSE, TRUE);
}
/*****************************************************************
......@@ -145,8 +161,7 @@ BOOL16 WINAPI DdeDisconnect16(HCONV hConv)
*/
BOOL16 WINAPI DdeSetUserHandle16(HCONV hConv, DWORD id, DWORD hUser)
{
FIXME("(%d,%ld,%ld): stub\n",hConv,id, hUser);
return 0;
return DdeSetUserHandle(hConv, id, hUser);
}
/*****************************************************************
......@@ -167,7 +182,9 @@ HSZ WINAPI DdeCreateStringHandle16(DWORD idInst, LPCSTR str, INT16 codepage)
if (codepage)
{
return DdeCreateStringHandleA(idInst, str, codepage);
} else {
}
else
{
TRACE("Default codepage supplied\n");
return DdeCreateStringHandleA(idInst, str, CP_WINANSI);
}
......@@ -178,7 +195,7 @@ HSZ WINAPI DdeCreateStringHandle16(DWORD idInst, LPCSTR str, INT16 codepage)
*/
BOOL16 WINAPI DdeFreeStringHandle16(DWORD idInst, HSZ hsz)
{
FIXME("idInst %ld hsz 0x%x\n",idInst,hsz);
TRACE("idInst %ld hsz 0x%x\n",idInst,hsz);
return (BOOL)DdeFreeStringHandle(idInst, hsz);
}
......@@ -218,8 +235,7 @@ HDDEDATA WINAPI DdeClientTransaction16(LPVOID pData, DWORD cbData,
BOOL16 WINAPI DdeAbandonTransaction16(DWORD idInst, HCONV hConv,
DWORD idTransaction)
{
FIXME("empty stub\n");
return TRUE;
return DdeAbandonTransaction(idInst, hConv, idTransaction);
}
/*****************************************************************
......@@ -256,7 +272,8 @@ DWORD WINAPI DdeGetData16(
*/
LPBYTE WINAPI DdeAccessData16(HDDEDATA hData, LPDWORD pcbDataSize)
{
return DdeAccessData(hData, pcbDataSize);
/* FIXME: there's a memory leak here... */
return (LPBYTE)MapLS(DdeAccessData(hData, pcbDataSize));
}
/*****************************************************************
......@@ -264,7 +281,7 @@ LPBYTE WINAPI DdeAccessData16(HDDEDATA hData, LPDWORD pcbDataSize)
*/
BOOL16 WINAPI DdeUnaccessData16(HDDEDATA hData)
{
return DdeUnaccessData(hData);
return DdeUnaccessData(hData);
}
/*****************************************************************
......@@ -272,7 +289,7 @@ BOOL16 WINAPI DdeUnaccessData16(HDDEDATA hData)
*/
BOOL16 WINAPI DdeEnableCallback16(DWORD idInst, HCONV hConv, UINT16 wCmd)
{
return DdeEnableCallback(idInst, hConv, wCmd);
return DdeEnableCallback(idInst, hConv, wCmd);
}
/*****************************************************************
......@@ -281,7 +298,7 @@ BOOL16 WINAPI DdeEnableCallback16(DWORD idInst, HCONV hConv, UINT16 wCmd)
HDDEDATA WINAPI DdeNameService16(DWORD idInst, HSZ hsz1, HSZ hsz2,
UINT16 afCmd)
{
return DdeNameService(idInst, hsz1, hsz2, afCmd);
return DdeNameService(idInst, hsz1, hsz2, afCmd);
}
/*****************************************************************
......@@ -289,7 +306,7 @@ HDDEDATA WINAPI DdeNameService16(DWORD idInst, HSZ hsz1, HSZ hsz2,
*/
UINT16 WINAPI DdeGetLastError16(DWORD idInst)
{
return (UINT16)DdeGetLastError(idInst);
return (UINT16)DdeGetLastError(idInst);
}
/*****************************************************************
......@@ -297,7 +314,7 @@ UINT16 WINAPI DdeGetLastError16(DWORD idInst)
*/
INT16 WINAPI DdeCmpStringHandles16(HSZ hsz1, HSZ hsz2)
{
return DdeCmpStringHandles(hsz1, hsz2);
return DdeCmpStringHandles(hsz1, hsz2);
}
/******************************************************************
......
......@@ -26,7 +26,7 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri
@ stdcall BringWindowToTop(long) BringWindowToTop
@ stdcall BroadcastSystemMessage(long ptr long long long) BroadcastSystemMessage
@ stdcall CalcChildScroll(long long) CalcChildScroll
@ stub CallMsgFilter
@ stdcall CallMsgFilter(ptr long) CallMsgFilterA
@ stdcall CallMsgFilterA(ptr long) CallMsgFilterA
@ stdcall CallMsgFilterW(ptr long) CallMsgFilterW
@ stdcall CallNextHookEx(long long long long) CallNextHookEx
......@@ -107,8 +107,8 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri
@ stdcall DdeConnect(long long long ptr) DdeConnect
@ stdcall DdeConnectList(long long long long ptr) DdeConnectList
@ stdcall DdeCreateDataHandle(long ptr long long long long long) DdeCreateDataHandle
@ stdcall DdeCreateStringHandleA(long str long) DdeCreateStringHandleA
@ stdcall DdeCreateStringHandleW(long wstr long) DdeCreateStringHandleW
@ stdcall DdeCreateStringHandleA(long ptr long) DdeCreateStringHandleA
@ stdcall DdeCreateStringHandleW(long ptr long) DdeCreateStringHandleW
@ stdcall DdeDisconnect(long) DdeDisconnect
@ stdcall DdeDisconnectList(long) DdeDisconnectList
@ stdcall DdeEnableCallback(long long long) DdeEnableCallback
......
......@@ -262,6 +262,9 @@ static void thread_detach(void)
{
HQUEUE16 hQueue = GetThreadQueue16( 0 );
extern void WDML_NotifyThreadDetach(void);
WDML_NotifyThreadDetach();
if (hQueue)
{
TIMER_RemoveQueueTimers( hQueue );
......
......@@ -177,6 +177,8 @@ extern "C" {
#define TIMEOUT_ASYNC 0xFFFFFFFF
#define CADV_LATEACK 0xFFFF
/**************************************************
End of Message Types Section
......@@ -332,6 +334,7 @@ BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
HDDEDATA WINAPI DdeClientTransaction(LPBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,LPDWORD);
BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction);
BOOL WINAPI DdeImpersonateClient(HCONV);
BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
HDDEDATA WINAPI DdeAddData(HDDEDATA,LPBYTE,DWORD,DWORD);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment