ReactOS 0.4.15-dev-8096-ga0eec98
ddeclient.c File Reference
#include <user32.h>
Include dependency graph for ddeclient.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ddeml)
 
static LRESULT CALLBACK WDML_ClientProc (HWND, UINT, WPARAM, LPARAM)
 
HCONVLIST WINAPI DdeConnectList (DWORD idInst, HSZ hszService, HSZ hszTopic, HCONVLIST hConvList, PCONVCONTEXT pCC)
 
HCONV WINAPI DdeQueryNextServer (HCONVLIST hConvList, HCONV hConvPrev)
 
BOOL WINAPI DdeDisconnectList (HCONVLIST hConvList)
 
HCONV WINAPI DdeConnect (DWORD idInst, HSZ hszService, HSZ hszTopic, PCONVCONTEXT pCC)
 
HCONV WINAPI DdeReconnect (HCONV hConv)
 
static WDML_XACTWDML_ClientQueueAdvise (WDML_CONV *pConv, UINT wType, UINT wFmt, HSZ hszItem)
 
static WDML_QUEUE_STATE WDML_HandleAdviseReply (WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
 
static WDML_XACTWDML_ClientQueueUnadvise (WDML_CONV *pConv, UINT wFmt, HSZ hszItem)
 
static WDML_QUEUE_STATE WDML_HandleUnadviseReply (WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
 
static WDML_XACTWDML_ClientQueueRequest (WDML_CONV *pConv, UINT wFmt, HSZ hszItem)
 
static WDML_QUEUE_STATE WDML_HandleRequestReply (WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
 
static HGLOBAL WDML_BuildExecuteCommand (WDML_CONV *pConv, LPCVOID pData, DWORD cbData)
 
static WDML_XACTWDML_ClientQueueExecute (WDML_CONV *pConv, LPVOID pData, DWORD cbData)
 
static WDML_QUEUE_STATE WDML_HandleExecuteReply (WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
 
static WDML_XACTWDML_ClientQueuePoke (WDML_CONV *pConv, LPVOID pData, DWORD cbData, UINT wFmt, HSZ hszItem)
 
static WDML_QUEUE_STATE WDML_HandlePokeReply (WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
 
static WDML_XACTWDML_ClientQueueTerminate (WDML_CONV *pConv)
 
static WDML_QUEUE_STATE WDML_HandleTerminateReply (WDML_CONV *pConv, MSG *msg)
 
static WDML_QUEUE_STATE WDML_HandleIncomingData (WDML_CONV *pConv, MSG *msg, HDDEDATA *hdd)
 
static WDML_QUEUE_STATE WDML_HandleIncomingTerminate (WDML_CONV *pConv, MSG *msg, HDDEDATA *hdd)
 
static WDML_QUEUE_STATE WDML_HandleReply (WDML_CONV *pConv, MSG *msg, HDDEDATA *hdd, DWORD *ack)
 
static HDDEDATA WDML_SyncWaitTransactionReply (HCONV hConv, DWORD dwTimeout, const WDML_XACT *pXAct, DWORD *ack)
 
HDDEDATA WDML_ClientHandle (WDML_CONV *pConv, WDML_XACT *pXAct, DWORD dwTimeout, LPDWORD pdwResult)
 
HDDEDATA WINAPI DdeClientTransaction (LPBYTE pData, DWORD cbData, HCONV hConv, HSZ hszItem, UINT wFmt, UINT wType, DWORD dwTimeout, LPDWORD pdwResult)
 
BOOL WINAPI DdeAbandonTransaction (DWORD idInst, HCONV hConv, DWORD idTransaction)
 
BOOL WINAPI DdeDisconnect (HCONV hConv)
 
BOOL WINAPI DdeImpersonateClient (HCONV hConv)
 

Variables

const char WDML_szClientConvClassA [] = "DDEMLAnsiClient"
 
const WCHAR WDML_szClientConvClassW [] = L"DDEMLUnicodeClient"
 

Function Documentation

◆ DdeAbandonTransaction()

BOOL WINAPI DdeAbandonTransaction ( DWORD  idInst,
HCONV  hConv,
DWORD  idTransaction 
)

Definition at line 1224 of file ddeclient.c.

1225{
1227 WDML_CONV* pConv;
1228 WDML_XACT* pXAct;
1229
1230 if ((pInstance = WDML_GetInstance(idInst)))
1231 {
1232 if (hConv)
1233 {
1234 if ((pConv = WDML_GetConv(hConv, TRUE)) && pConv->instance == pInstance)
1235 {
1236
1237 pXAct = pConv->transactions;
1238 while (pXAct) {
1239 WDML_XACT *nextXAct = pXAct->next;
1240
1241 if (pXAct->dwTimeout == TIMEOUT_ASYNC &&
1242 (idTransaction == 0 || pXAct->xActID == idTransaction))
1243 {
1244 WDML_UnQueueTransaction(pConv, pXAct);
1246 }
1247 pXAct = nextXAct;
1248 }
1249 }
1250 }
1251 else
1252 {
1253 for (pConv = pInstance->convs[WDML_CLIENT_SIDE]; pConv; pConv = pConv->next)
1254 {
1255 if (!(pConv->wStatus & ST_CONNECTED)) continue;
1256 pXAct = pConv->transactions;
1257 while (pXAct) {
1258 WDML_XACT *nextXAct = pXAct->next;
1259
1260 if (pXAct->dwTimeout == TIMEOUT_ASYNC)
1261 {
1262 WDML_UnQueueTransaction(pConv, pXAct);
1264 }
1265 pXAct = nextXAct;
1266 }
1267 }
1268 }
1269 }
1270
1271 return TRUE;
1272}
WDML_CONV * WDML_GetConv(HCONV hConv, BOOL checkConnected) DECLSPEC_HIDDEN
Definition: ddemisc.c:2230
BOOL WDML_UnQueueTransaction(WDML_CONV *pConv, WDML_XACT *pXAct) DECLSPEC_HIDDEN
Definition: ddemisc.c:1947
void WDML_FreeTransaction(WDML_INSTANCE *pInstance, WDML_XACT *pXAct, BOOL doFreePmt) DECLSPEC_HIDDEN
Definition: ddemisc.c:1967
WDML_INSTANCE * WDML_GetInstance(DWORD InstId) DECLSPEC_HIDDEN
Definition: ddemisc.c:1230
@ WDML_CLIENT_SIDE
Definition: dde_private.h:181
#define ST_CONNECTED
Definition: ddeml.h:80
#define TIMEOUT_ASYNC
Definition: ddeml.h:200
#define TRUE
Definition: types.h:120
FxWmiInstanceExternal * pInstance
Definition: fxwmiapi.cpp:113
struct tagWDML_CONV * next
Definition: dde_private.h:126
WDML_XACT * transactions
Definition: dde_private.h:135
struct tagWDML_INSTANCE * instance
Definition: dde_private.h:127
struct tagWDML_XACT * next
Definition: dde_private.h:110
DWORD dwTimeout
Definition: dde_private.h:114

◆ DdeClientTransaction()

HDDEDATA WINAPI DdeClientTransaction ( LPBYTE  pData,
DWORD  cbData,
HCONV  hConv,
HSZ  hszItem,
UINT  wFmt,
UINT  wType,
DWORD  dwTimeout,
LPDWORD  pdwResult 
)

Definition at line 1122 of file ddeclient.c.

1124{
1125 WDML_CONV* pConv;
1126 WDML_XACT* pXAct;
1127 HDDEDATA hDdeData;
1128
1129 TRACE("(%p,%d,%p,%p,%x,%x,%d,%p)\n",
1130 pData, cbData, hConv, hszItem, wFmt, wType, dwTimeout, pdwResult);
1131
1132 if (hConv == 0)
1133 {
1134 WARN("Invalid conversation handle NULL\n");
1135 return 0;
1136 }
1137
1138 pConv = WDML_GetConv(hConv, TRUE);
1139 if (pConv == NULL)
1140 {
1141 /* cannot set error... cannot get back to DDE instance */
1142 return 0;
1143 }
1144
1145 switch (wType)
1146 {
1147 case XTYP_EXECUTE:
1148 /* Windows simply ignores hszItem and wFmt in this case */
1149 pXAct = WDML_ClientQueueExecute(pConv, pData, cbData);
1150 if (pXAct == NULL)
1151 return 0;
1152 break;
1153 case XTYP_POKE:
1154 if (!hszItem)
1155 {
1156 pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
1157 return 0;
1158 }
1159 pXAct = WDML_ClientQueuePoke(pConv, pData, cbData, wFmt, hszItem);
1160 break;
1163 case XTYP_ADVSTART:
1165 if (pData)
1166 {
1167 pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
1168 return 0;
1169 }
1170 pXAct = WDML_ClientQueueAdvise(pConv, wType, wFmt, hszItem);
1171 break;
1172 case XTYP_ADVSTOP:
1173 if (pData)
1174 {
1175 pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
1176 return 0;
1177 }
1178 pXAct = WDML_ClientQueueUnadvise(pConv, wFmt, hszItem);
1179 break;
1180 case XTYP_REQUEST:
1181 if (pData || !hszItem)
1182 {
1183 pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
1184 return 0;
1185 }
1186 pXAct = WDML_ClientQueueRequest(pConv, wFmt, hszItem);
1187 break;
1188 default:
1189 FIXME("Unknown transaction type %04x\n", wType);
1190 /* unknown transaction type */
1191 pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
1192 return 0;
1193 }
1194
1195 if (pXAct == NULL)
1196 {
1197 pConv->instance->lastError = DMLERR_MEMORY_ERROR;
1198 return 0;
1199 }
1200
1201 WDML_QueueTransaction(pConv, pXAct);
1202
1203 TRACE("pConv->wStatus %04x\n", pConv->wStatus);
1204
1205 if (pConv->wStatus & ST_BLOCKED)
1206 {
1207 TRACE("Transactions are blocked, add to the queue and exit\n");
1208 return (HDDEDATA)1;
1209 }
1210
1211 hDdeData = WDML_ClientHandle(pConv, pXAct, dwTimeout, pdwResult);
1212 if (dwTimeout != TIMEOUT_ASYNC)
1213 {
1214 WDML_UnQueueTransaction(pConv, pXAct);
1215 WDML_FreeTransaction(pConv->instance, pXAct, TRUE);
1216 }
1217
1218 return hDdeData;
1219}
#define FIXME(fmt,...)
Definition: debug.h:114
#define WARN(fmt,...)
Definition: debug.h:115
void WDML_QueueTransaction(WDML_CONV *pConv, WDML_XACT *pXAct) DECLSPEC_HIDDEN
Definition: ddemisc.c:1933
static WDML_XACT * WDML_ClientQueueRequest(WDML_CONV *pConv, UINT wFmt, HSZ hszItem)
Definition: ddeclient.c:459
static WDML_XACT * WDML_ClientQueueExecute(WDML_CONV *pConv, LPVOID pData, DWORD cbData)
Definition: ddeclient.c:618
static WDML_XACT * WDML_ClientQueueUnadvise(WDML_CONV *pConv, UINT wFmt, HSZ hszItem)
Definition: ddeclient.c:385
HDDEDATA WDML_ClientHandle(WDML_CONV *pConv, WDML_XACT *pXAct, DWORD dwTimeout, LPDWORD pdwResult)
Definition: ddeclient.c:1090
static WDML_XACT * WDML_ClientQueueAdvise(WDML_CONV *pConv, UINT wType, UINT wFmt, HSZ hszItem)
Definition: ddeclient.c:289
static WDML_XACT * WDML_ClientQueuePoke(WDML_CONV *pConv, LPVOID pData, DWORD cbData, UINT wFmt, HSZ hszItem)
Definition: ddeclient.c:696
#define XTYPF_NODATA
Definition: ddeml.h:171
#define XTYP_ADVSTART
Definition: ddeml.h:183
#define XTYP_REQUEST
Definition: ddeml.h:191
#define XTYP_ADVSTOP
Definition: ddeml.h:184
#define DMLERR_MEMORY_ERROR
Definition: ddeml.h:254
#define XTYP_POKE
Definition: ddeml.h:189
#define ST_BLOCKED
Definition: ddeml.h:83
#define XTYP_EXECUTE
Definition: ddeml.h:185
#define XTYPF_ACKREQ
Definition: ddeml.h:172
#define DMLERR_INVALIDPARAMETER
Definition: ddeml.h:252
#define NULL
Definition: types.h:112
_In_ UINT _In_ DWORD _Out_ DWORD * pdwResult
Definition: ntgdi.h:250
#define TRACE(s)
Definition: solgame.cpp:4
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD dwTimeout
Definition: wincrypt.h:6081

Referenced by dde_connect(), dde_execute(), dde_request(), DdeReconnect(), test_dde_aw_transaction(), test_ddeml_client(), test_end_to_end_client(), and test_initialisation().

◆ DdeConnect()

HCONV WINAPI DdeConnect ( DWORD  idInst,
HSZ  hszService,
HSZ  hszTopic,
PCONVCONTEXT  pCC 
)

Definition at line 84 of file ddeclient.c.

86{
87 HWND hwndClient;
89 WDML_CONV* pConv;
90 ATOM aSrv = 0, aTpc = 0;
91
92 TRACE("(0x%x,%p,%p,%p)\n", idInst, hszService, hszTopic, pCC);
93
95 if (!pInstance)
96 return NULL;
97
98 /* make sure this conv is never created */
99 pConv = WDML_FindConv(pInstance, WDML_CLIENT_SIDE, hszService, hszTopic);
100 if (pConv != NULL)
101 {
102 ERR("This Conv already exists: (%p)\n", pConv);
103 return NULL;
104 }
105
106 /* we need to establish a conversation with
107 server, so create a window for it */
108
109 if (pInstance->unicode)
110 {
111 WNDCLASSEXW wndclass;
112
113 wndclass.cbSize = sizeof(wndclass);
114 wndclass.style = 0;
115 wndclass.lpfnWndProc = WDML_ClientProc;
116 wndclass.cbClsExtra = 0;
117 wndclass.cbWndExtra = 2 * sizeof(ULONG_PTR);
118 wndclass.hInstance = 0;
119 wndclass.hIcon = 0;
120 wndclass.hCursor = 0;
121 wndclass.hbrBackground = 0;
122 wndclass.lpszMenuName = NULL;
124 wndclass.hIconSm = 0;
125
126 RegisterClassExW(&wndclass);
127
128 hwndClient = CreateWindowW(WDML_szClientConvClassW, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, 0);
129 }
130 else
131 {
132 WNDCLASSEXA wndclass;
133
134 wndclass.cbSize = sizeof(wndclass);
135 wndclass.style = 0;
136 wndclass.lpfnWndProc = WDML_ClientProc;
137 wndclass.cbClsExtra = 0;
138 wndclass.cbWndExtra = 2 * sizeof(ULONG_PTR);
139 wndclass.hInstance = 0;
140 wndclass.hIcon = 0;
141 wndclass.hCursor = 0;
142 wndclass.hbrBackground = 0;
143 wndclass.lpszMenuName = NULL;
145 wndclass.hIconSm = 0;
146
147 RegisterClassExA(&wndclass);
148
149 hwndClient = CreateWindowA(WDML_szClientConvClassA, NULL, WS_POPUP, 0, 0, 0, 0, 0, 0, 0, 0);
150 }
151
153
154 if (hszService)
155 {
156 aSrv = WDML_MakeAtomFromHsz(hszService);
157 if (!aSrv) goto theEnd;
158 }
159 if (hszTopic)
160 {
162 if (!aTpc) goto theEnd;
163 }
164
165 /* note: sent messages shall not use packing */
168
169 pInstance = WDML_GetInstance(idInst);
170 if (!pInstance)
171 {
172 goto theEnd;
173 }
174
175 /* At this point, Client WM_DDE_ACK should have saved hwndServer
176 for this instance id and hwndClient if server responds.
177 So get HCONV and return it. And add it to conv list */
178 pConv = WDML_GetConvFromWnd(hwndClient);
179 if (pConv == NULL || pConv->hwndServer == 0)
180 {
181 WARN("Done with INITIATE, but no Server window available\n");
182 pConv = NULL;
184 goto theEnd;
185 }
186 TRACE("Connected to Server window (%p)\n", pConv->hwndServer);
187 pConv->wConvst = XST_CONNECTED;
188
189 /* finish init of pConv */
190 if (pCC != NULL)
191 {
192 pConv->convContext = *pCC;
193 }
194 else
195 {
196 memset(&pConv->convContext, 0, sizeof(pConv->convContext));
197 pConv->convContext.cb = sizeof(pConv->convContext);
199 }
200
201 theEnd:
202
203 if (aSrv) GlobalDeleteAtom(aSrv);
204 if (aTpc) GlobalDeleteAtom(aTpc);
205 return (HCONV)pConv;
206}
#define ERR(fmt,...)
Definition: debug.h:113
#define WM_DDE_INITIATE
Definition: dde.h:37
WDML_CONV * WDML_FindConv(WDML_INSTANCE *pInstance, WDML_SIDE side, HSZ hszService, HSZ hszTopic) DECLSPEC_HIDDEN
Definition: ddemisc.c:2048
ATOM WDML_MakeAtomFromHsz(HSZ hsz) DECLSPEC_HIDDEN
Definition: ddemisc.c:325
WDML_CONV * WDML_GetConvFromWnd(HWND hWnd) DECLSPEC_HIDDEN
Definition: ddemisc.c:2265
#define GWL_WDML_INSTANCE
Definition: dde_private.h:259
static LRESULT CALLBACK WDML_ClientProc(HWND, UINT, WPARAM, LPARAM)
Definition: ddeclient.c:1279
const char WDML_szClientConvClassA[]
Definition: ddeclient.c:31
const WCHAR WDML_szClientConvClassW[]
Definition: ddeclient.c:32
#define XST_CONNECTED
Definition: ddeml.h:64
#define CP_WINANSI
Definition: ddeml.h:32
#define CP_WINUNICODE
Definition: ddeml.h:33
#define DMLERR_NO_CONV_ESTABLISHED
Definition: ddeml.h:256
WORD ATOM
Definition: dimm.idl:113
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:454
#define ULONG_PTR
Definition: config.h:101
#define WS_POPUP
Definition: pedump.c:616
#define memset(x, y, z)
Definition: compat.h:39
static HSZ hszTopic
Definition: shlexec.c:148
int cbClsExtra
Definition: winuser.h:3204
HINSTANCE hInstance
Definition: winuser.h:3206
HCURSOR hCursor
Definition: winuser.h:3208
LPCSTR lpszMenuName
Definition: winuser.h:3210
HICON hIconSm
Definition: winuser.h:3212
UINT style
Definition: winuser.h:3202
int cbWndExtra
Definition: winuser.h:3205
UINT cbSize
Definition: winuser.h:3201
WNDPROC lpfnWndProc
Definition: winuser.h:3203
LPCSTR lpszClassName
Definition: winuser.h:3211
HICON hIcon
Definition: winuser.h:3207
HBRUSH hbrBackground
Definition: winuser.h:3209
LPCWSTR lpszClassName
Definition: winuser.h:3226
LPCWSTR lpszMenuName
Definition: winuser.h:3225
HBRUSH hbrBackground
Definition: winuser.h:3224
WNDPROC lpfnWndProc
Definition: winuser.h:3218
UINT cbSize
Definition: winuser.h:3216
int cbWndExtra
Definition: winuser.h:3220
HCURSOR hCursor
Definition: winuser.h:3223
HICON hIconSm
Definition: winuser.h:3227
HINSTANCE hInstance
Definition: winuser.h:3221
UINT style
Definition: winuser.h:3217
int cbClsExtra
Definition: winuser.h:3219
HICON hIcon
Definition: winuser.h:3222
INT iCodePage
Definition: ddeml.h:310
CONVCONTEXT convContext
Definition: dde_private.h:132
uint32_t ULONG_PTR
Definition: typedefs.h:65
UINT_PTR WPARAM
Definition: windef.h:207
#define MAKELPARAM(l, h)
Definition: winuser.h:4008
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
#define HWND_BROADCAST
Definition: winuser.h:1204
LRESULT WINAPI SendMessageTimeoutW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM, _In_ UINT, _In_ UINT, _Out_opt_ PDWORD_PTR)
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4316
#define SMTO_ABORTIFHUNG
Definition: winuser.h:1223
#define SetWindowLongPtrW
Definition: winuser.h:5346

Referenced by dde_connect(), START_TEST(), test_dde_aw_transaction(), test_ddeml_client(), test_end_to_end_client(), and test_initialisation().

◆ DdeConnectList()

HCONVLIST WINAPI DdeConnectList ( DWORD  idInst,
HSZ  hszService,
HSZ  hszTopic,
HCONVLIST  hConvList,
PCONVCONTEXT  pCC 
)

Definition at line 48 of file ddeclient.c.

50{
51 FIXME("(%d,%p,%p,%p,%p): stub\n", idInst, hszService, hszTopic, hConvList, pCC);
52 return (HCONVLIST)1;
53}

◆ DdeDisconnect()

BOOL WINAPI DdeDisconnect ( HCONV  hConv)

Definition at line 1363 of file ddeclient.c.

1364{
1365 WDML_CONV* pConv;
1366 WDML_XACT* pXAct;
1367 BOOL ret = FALSE;
1368
1369 TRACE("(%p)\n", hConv);
1370
1371 if (hConv == 0)
1372 {
1373 WARN("DdeDisconnect(): hConv = 0\n");
1374 return FALSE;
1375 }
1376
1377 pConv = WDML_GetConv(hConv, TRUE);
1378 if (pConv != NULL)
1379 {
1380 if (pConv->wStatus & ST_CLIENT)
1381 {
1382 /* FIXME: should abandon all pending transactions */
1383 pXAct = WDML_ClientQueueTerminate(pConv);
1384 if (pXAct != NULL)
1385 {
1386 if (PostMessageW(pConv->hwndServer, pXAct->ddeMsg,
1387 (WPARAM)pConv->hwndClient, pXAct->lParam))
1388 {
1389 WDML_SyncWaitTransactionReply(hConv, 10000, pXAct, NULL);
1390 ret = TRUE;
1391 }
1392 else
1393 pConv->instance->lastError = DMLERR_POSTMSG_FAILED;
1394
1395 WDML_FreeTransaction(pConv->instance, pXAct, TRUE);
1396 /* still have to destroy data associated with conversation */
1398 }
1399 else
1400 {
1401 FIXME("Not implemented yet for a server side conversation\n");
1402 }
1403 }
1404 }
1405
1406 return ret;
1407}
void WDML_RemoveConv(WDML_CONV *pConv, WDML_SIDE side) DECLSPEC_HIDDEN
Definition: ddemisc.c:2070
static HDDEDATA WDML_SyncWaitTransactionReply(HCONV hConv, DWORD dwTimeout, const WDML_XACT *pXAct, DWORD *ack)
Definition: ddeclient.c:1007
static WDML_XACT * WDML_ClientQueueTerminate(WDML_CONV *pConv)
Definition: ddeclient.c:781
#define ST_CLIENT
Definition: ddeml.h:84
#define DMLERR_POSTMSG_FAILED
Definition: ddeml.h:258
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
LPARAM lParam
Definition: dde_private.h:121
int ret
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by dde_connect(), DdeUninitialize(), START_TEST(), test_dde_aw_transaction(), test_ddeml_client(), test_end_to_end_client(), and test_initialisation().

◆ DdeDisconnectList()

BOOL WINAPI DdeDisconnectList ( HCONVLIST  hConvList)

Definition at line 75 of file ddeclient.c.

76{
77 FIXME("(%p): stub\n", hConvList);
78 return TRUE;
79}

◆ DdeImpersonateClient()

BOOL WINAPI DdeImpersonateClient ( HCONV  hConv)

Definition at line 1412 of file ddeclient.c.

1413{
1414 WDML_CONV* pConv;
1415 BOOL ret = FALSE;
1416
1417 TRACE("(%p)\n", hConv);
1418
1419 pConv = WDML_GetConv(hConv, TRUE);
1420 if (pConv)
1421 {
1423 }
1424 return ret;
1425}
BOOL WINAPI ImpersonateDdeClientWindow(HWND hWndClient, HWND hWndServer)
Definition: ddemisc.c:221

◆ DdeQueryNextServer()

HCONV WINAPI DdeQueryNextServer ( HCONVLIST  hConvList,
HCONV  hConvPrev 
)

Definition at line 58 of file ddeclient.c.

59{
60 FIXME("(%p,%p): stub\n", hConvList, hConvPrev);
61 return 0;
62}

◆ DdeReconnect()

HCONV WINAPI DdeReconnect ( HCONV  hConv)

Definition at line 212 of file ddeclient.c.

213{
214 WDML_CONV* pConv;
215 WDML_CONV* pNewConv = NULL;
216 ATOM aSrv = 0, aTpc = 0;
217
218 TRACE("(%p)\n", hConv);
219
220 pConv = WDML_GetConv(hConv, FALSE);
221 if (pConv != NULL && (pConv->wStatus & ST_CLIENT))
222 {
223 BOOL ret;
224
225 /* to reestablish a connection, we have to make sure that:
226 * 1/ pConv is the conversation attached to the client window (it wouldn't be
227 * if a call to DdeReconnect would have already been done...)
228 * FIXME: is this really an error ???
229 * 2/ the pConv conversation had really been deconnected
230 */
231 if (pConv == WDML_GetConvFromWnd(pConv->hwndClient) &&
232 (pConv->wStatus & ST_TERMINATED) && !(pConv->wStatus & ST_CONNECTED))
233 {
234 HWND hwndClient = pConv->hwndClient;
235 HWND hwndServer = pConv->hwndServer;
236
238
239 aSrv = WDML_MakeAtomFromHsz(pConv->hszService);
240 aTpc = WDML_MakeAtomFromHsz(pConv->hszTopic);
241 if (!aSrv || !aTpc) goto theEnd;
242
243 /* note: sent messages shall not use packing */
244 ret = SendMessageW(hwndServer, WM_DDE_INITIATE, (WPARAM)hwndClient,
245 MAKELPARAM(aSrv, aTpc));
246
247 pConv = WDML_GetConv(hConv, FALSE);
248 if (pConv == NULL)
249 {
250 FIXME("Should fail reconnection\n");
251 goto theEnd;
252 }
253
254 if (ret && (pNewConv = WDML_GetConvFromWnd(pConv->hwndClient)) != NULL)
255 {
256 /* re-establish all links... */
257 WDML_LINK* pLink;
258
259 for (pLink = pConv->instance->links[WDML_CLIENT_SIDE]; pLink; pLink = pLink->next)
260 {
261 if (pLink->hConv == hConv)
262 {
263 /* try to reestablish the links... */
264 DdeClientTransaction(NULL, 0, (HCONV)pNewConv, pLink->hszItem, pLink->uFmt,
265 pLink->transactionType, 1000, NULL);
266 }
267 }
268 }
269 else
270 {
271 /* reset the conversation as it was */
273 }
274 }
275 }
276
277 theEnd:
278
279 if (aSrv) GlobalDeleteAtom(aSrv);
280 if (aTpc) GlobalDeleteAtom(aTpc);
281 return (HCONV)pNewConv;
282}
#define GWL_WDML_CONVERSATION
Definition: dde_private.h:260
HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HSZ hszItem, UINT wFmt, UINT wType, DWORD dwTimeout, LPDWORD pdwResult)
Definition: ddeclient.c:1122
#define ST_TERMINATED
Definition: ddeml.h:85
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ WDML_BuildExecuteCommand()

static HGLOBAL WDML_BuildExecuteCommand ( WDML_CONV pConv,
LPCVOID  pData,
DWORD  cbData 
)
static

Definition at line 549 of file ddeclient.c.

550{
551 HGLOBAL hMem;
552 BOOL clientUnicode, serverUnicode;
553 DWORD memSize;
554
555 clientUnicode = pConv->instance->unicode;
556 TRACE("client %p uses unicode = %d\n", pConv->hwndClient, clientUnicode);
557 /* FIXME: how exactly Windows determines what to use for the server side? */
558 serverUnicode = IsWindowUnicode(pConv->hwndServer) && IsWindowUnicode(pConv->hwndClient);
559 TRACE("server %p uses unicode = %d\n", pConv->hwndServer, serverUnicode);
560
561 if (clientUnicode == serverUnicode)
562 {
563 memSize = cbData;
564 }
565 else
566 {
567 if (clientUnicode)
568 {
569 memSize = WideCharToMultiByte( CP_ACP, 0, pData, cbData / sizeof(WCHAR), NULL, 0, NULL, NULL);
570 }
571 else
572 {
573 memSize = MultiByteToWideChar( CP_ACP, 0, pData, cbData, NULL, 0) * sizeof(WCHAR);
574 }
575 }
576
577 hMem = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, memSize);
578
579 if (hMem)
580 {
581 LPSTR pDst;
582
583 pDst = GlobalLock(hMem);
584 if (pDst)
585 {
586 if (clientUnicode == serverUnicode)
587 {
588 memcpy(pDst, pData, cbData);
589 }
590 else
591 {
592 if (clientUnicode)
593 {
594 WideCharToMultiByte( CP_ACP, 0, pData, cbData / sizeof(WCHAR), pDst, memSize, NULL, NULL);
595 }
596 else
597 {
598 MultiByteToWideChar( CP_ACP, 0, pData, cbData, (LPWSTR)pDst, memSize/sizeof(WCHAR));
599 }
600 }
601
602 GlobalUnlock(hMem);
603 }
604 else
605 {
606 GlobalFree(hMem);
607 hMem = 0;
608 }
609 }
610 return hMem;
611}
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
unsigned long DWORD
Definition: ntddk_ex.h:95
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define GMEM_MOVEABLE
Definition: winbase.h:294
#define GMEM_DDESHARE
Definition: winbase.h:298
BOOL WINAPI IsWindowUnicode(_In_ HWND)
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by WDML_ClientQueueExecute().

◆ WDML_ClientHandle()

HDDEDATA WDML_ClientHandle ( WDML_CONV pConv,
WDML_XACT pXAct,
DWORD  dwTimeout,
LPDWORD  pdwResult 
)

Definition at line 1090 of file ddeclient.c.

1091{
1092 HDDEDATA hDdeData;
1093
1094 if (!PostMessageW(pConv->hwndServer, pXAct->ddeMsg, (WPARAM)pConv->hwndClient, pXAct->lParam))
1095 {
1096 WARN("Failed posting message %x to %p (error=0x%x)\n",
1097 pXAct->ddeMsg, pConv->hwndServer, GetLastError());
1098 pConv->wStatus &= ~ST_CONNECTED;
1099 pConv->instance->lastError = DMLERR_POSTMSG_FAILED;
1100 return 0;
1101 }
1102 pXAct->dwTimeout = dwTimeout;
1103 /* FIXME: should set the app bits on *pdwResult */
1104
1105 if (dwTimeout == TIMEOUT_ASYNC)
1106 {
1107 if (pdwResult)
1108 *pdwResult = MAKELONG(0, pXAct->xActID);
1109
1110 hDdeData = (HDDEDATA)1;
1111 }
1112 else
1113 hDdeData = WDML_SyncWaitTransactionReply((HCONV)pConv, dwTimeout, pXAct, pdwResult);
1114
1115 return hDdeData;
1116}
#define MAKELONG(a, b)
Definition: typedefs.h:249
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by DdeClientTransaction(), and WDML_EnableCallback().

◆ WDML_ClientProc()

static LRESULT CALLBACK WDML_ClientProc ( HWND  hwnd,
UINT  iMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1279 of file ddeclient.c.

1280{
1281 UINT uiLo, uiHi;
1282 WDML_CONV* pConv = NULL;
1283 HSZ hszSrv, hszTpc;
1284
1285 TRACE("%p %04x %08lx %08lx\n", hwnd, iMsg, wParam , lParam);
1286
1287 if (iMsg == WM_DDE_ACK &&
1288 /* in the initial WM_INITIATE sendmessage */
1289 ((pConv = WDML_GetConvFromWnd(hwnd)) == NULL || pConv->wStatus == XST_INIT1))
1290 {
1291 /* In response to WM_DDE_INITIATE, save server window */
1292 char buf[256];
1294
1295 /* note: sent messages do not need packing */
1296 uiLo = LOWORD(lParam);
1297 uiHi = HIWORD(lParam);
1298
1299 /* FIXME: convlist should be handled here */
1300 if (pConv)
1301 {
1302 /* we already have started the conv with a server, drop other replies */
1303 GlobalDeleteAtom(uiLo);
1304 GlobalDeleteAtom(uiHi);
1306 return 0;
1307 }
1308
1310
1311 hszSrv = WDML_MakeHszFromAtom(pInstance, uiLo);
1312 hszTpc = WDML_MakeHszFromAtom(pInstance, uiHi);
1313
1314 pConv = WDML_AddConv(pInstance, WDML_CLIENT_SIDE, hszSrv, hszTpc, hwnd, (HWND)wParam);
1315
1317 pConv->wStatus |= ST_CONNECTED;
1318 pConv->wConvst = XST_INIT1;
1319
1320 /* check if server is handled by DDEML */
1321 if ((GetClassNameA((HWND)wParam, buf, sizeof(buf)) &&
1323 (GetClassNameW((HWND)wParam, (LPWSTR)buf, sizeof(buf)/sizeof(WCHAR)) &&
1325 {
1326 pConv->wStatus |= ST_ISLOCAL;
1327 }
1328
1329 GlobalDeleteAtom(uiLo);
1330 GlobalDeleteAtom(uiHi);
1331
1332 /* accept conversation */
1333 return 1;
1334 }
1335
1336 if (iMsg >= WM_DDE_FIRST && iMsg <= WM_DDE_LAST)
1337 {
1338 pConv = WDML_GetConvFromWnd(hwnd);
1339
1340 if (pConv)
1341 {
1342 MSG msg;
1343 HDDEDATA hdd;
1344
1345 msg.hwnd = hwnd;
1346 msg.message = iMsg;
1347 msg.wParam = wParam;
1348 msg.lParam = lParam;
1349
1350 WDML_HandleReply(pConv, &msg, &hdd, NULL);
1351 }
1352
1353 return 0;
1354 }
1355
1358}
#define msg(x)
Definition: auth_time.c:54
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define WM_DDE_FIRST
Definition: dde.h:47
#define WM_DDE_LAST
Definition: dde.h:46
#define WM_DDE_ACK
Definition: dde.h:41
#define WM_DDE_TERMINATE
Definition: dde.h:38
WDML_INSTANCE * WDML_GetInstanceFromWnd(HWND hWnd) DECLSPEC_HIDDEN
Definition: ddemisc.c:1261
HSZ WDML_MakeHszFromAtom(const WDML_INSTANCE *pInstance, ATOM atom) DECLSPEC_HIDDEN
Definition: ddemisc.c:342
WDML_CONV * WDML_AddConv(WDML_INSTANCE *pInstance, WDML_SIDE side, HSZ hszService, HSZ hszTopic, HWND hwndClient, HWND hwndServer) DECLSPEC_HIDDEN
Definition: ddemisc.c:2008
static WDML_QUEUE_STATE WDML_HandleReply(WDML_CONV *pConv, MSG *msg, HDDEDATA *hdd, DWORD *ack)
Definition: ddeclient.c:911
#define ST_ISLOCAL
Definition: ddeml.h:82
#define XST_INIT1
Definition: ddeml.h:65
const WCHAR WDML_szServerConvClassW[]
Definition: ddeserver.c:32
const char WDML_szServerConvClassA[]
Definition: ddeserver.c:31
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4261
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4223
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define HIWORD(l)
Definition: typedefs.h:247
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetClassNameA(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPSTR lpClassName, _In_ int nMaxCount)
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)

Referenced by DdeConnect().

◆ WDML_ClientQueueAdvise()

static WDML_XACT * WDML_ClientQueueAdvise ( WDML_CONV pConv,
UINT  wType,
UINT  wFmt,
HSZ  hszItem 
)
static

Definition at line 289 of file ddeclient.c.

290{
291 DDEADVISE* pDdeAdvise;
292 WDML_XACT* pXAct;
293 ATOM atom;
294
295 TRACE("XTYP_ADVSTART (with%s data) transaction\n", (wType & XTYPF_NODATA) ? "out" : "");
296
297 atom = WDML_MakeAtomFromHsz(hszItem);
298 if (!atom) return NULL;
299
300 pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_ADVISE, wFmt, hszItem);
301 if (!pXAct)
302 {
303 GlobalDeleteAtom(atom);
304 return NULL;
305 }
306
307 pXAct->wType = wType & ~0x0F;
308 pXAct->hMem = GlobalAlloc(GHND | GMEM_DDESHARE, sizeof(DDEADVISE));
309 /* FIXME: hMem is unfreed for now... should be deleted in server */
310
311 /* pack DdeAdvise */
312 pDdeAdvise = GlobalLock(pXAct->hMem);
313 pDdeAdvise->fAckReq = (wType & XTYPF_ACKREQ) != 0;
314 pDdeAdvise->fDeferUpd = (wType & XTYPF_NODATA) != 0;
315 pDdeAdvise->cfFormat = wFmt;
316 GlobalUnlock(pXAct->hMem);
317
318 pXAct->lParam = PackDDElParam(WM_DDE_ADVISE, (UINT_PTR)pXAct->hMem, atom);
319
320 return pXAct;
321}
#define WM_DDE_ADVISE
Definition: dde.h:39
LPARAM WINAPI PackDDElParam(UINT, UINT_PTR, UINT_PTR)
Definition: ddemisc.c:63
WDML_XACT * WDML_AllocTransaction(WDML_INSTANCE *pInstance, UINT ddeMsg, UINT wFmt, HSZ hszItem) DECLSPEC_HIDDEN
Definition: ddemisc.c:1900
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
Definition: dde.h:65
short cfFormat
Definition: dde.h:67
unsigned short fAckReq
Definition: dde.h:66
unsigned short fDeferUpd
Definition: dde.h:66
HGLOBAL hMem
Definition: dde_private.h:120
#define GHND
Definition: winbase.h:297

Referenced by DdeClientTransaction().

◆ WDML_ClientQueueExecute()

static WDML_XACT * WDML_ClientQueueExecute ( WDML_CONV pConv,
LPVOID  pData,
DWORD  cbData 
)
static

Definition at line 618 of file ddeclient.c.

619{
620 WDML_XACT* pXAct;
621
622 TRACE("XTYP_EXECUTE transaction\n");
623
624 if (pData == NULL)
625 {
626 if (cbData == (DWORD)-1)
627 pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
628 else
629 pConv->instance->lastError = DMLERR_MEMORY_ERROR;
630 return NULL;
631 }
632
633 pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_EXECUTE, 0, 0);
634 if (!pXAct)
635 return NULL;
636
637 if (cbData == (DWORD)-1)
638 {
639 HDDEDATA hDdeData = pData;
640
641 pData = DdeAccessData(hDdeData, &cbData);
642 if (pData)
643 {
644 pXAct->hMem = WDML_BuildExecuteCommand(pConv, pData, cbData);
645 DdeUnaccessData(hDdeData);
646 }
647 }
648 else
649 {
650 pXAct->hMem = WDML_BuildExecuteCommand(pConv, pData, cbData);
651 }
652
653 pXAct->lParam = (LPARAM)pXAct->hMem;
654
655 return pXAct;
656}
#define WM_DDE_EXECUTE
Definition: dde.h:45
static HGLOBAL WDML_BuildExecuteCommand(WDML_CONV *pConv, LPCVOID pData, DWORD cbData)
Definition: ddeclient.c:549
BOOL WINAPI DdeUnaccessData(HDDEDATA)
Definition: ddemisc.c:1447
LPBYTE WINAPI DdeAccessData(HDDEDATA, LPDWORD)
Definition: ddemisc.c:1422
LONG_PTR LPARAM
Definition: windef.h:208

Referenced by DdeClientTransaction().

◆ WDML_ClientQueuePoke()

static WDML_XACT * WDML_ClientQueuePoke ( WDML_CONV pConv,
LPVOID  pData,
DWORD  cbData,
UINT  wFmt,
HSZ  hszItem 
)
static

Definition at line 696 of file ddeclient.c.

698{
700 WDML_XACT *pXAct;
701 DDEPOKE *ddePoke;
702 HGLOBAL hglobal;
703 ATOM atom;
704
705 TRACE("XTYP_POKE transaction\n");
706
707 atom = WDML_MakeAtomFromHsz(hszItem);
708 if (!atom) return NULL;
709
710 pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_POKE, wFmt, hszItem);
711 if (!pXAct)
712 {
713 GlobalDeleteAtom(atom);
714 return NULL;
715 }
716
717 if (cbData == (DWORD)-1)
718 {
719 hglobal = pData;
720 dh = GlobalLock(hglobal);
721 cbData = GlobalSize(hglobal) - sizeof(DDE_DATAHANDLE_HEAD);
722 pData = dh + 1;
723 GlobalUnlock(hglobal);
724 }
725
727 ddePoke = GlobalLock(pXAct->hMem);
728 if (!ddePoke)
729 {
730 pConv->instance->lastError = DMLERR_MEMORY_ERROR;
731 return NULL;
732 }
733
734 ddePoke->unused = 0;
735 ddePoke->fRelease = TRUE;
736 ddePoke->cfFormat = wFmt;
737 memcpy(ddePoke->Value, pData, cbData);
738 GlobalUnlock(pXAct->hMem);
739
740 pXAct->lParam = PackDDElParam(WM_DDE_POKE, (UINT_PTR)pXAct->hMem, atom);
741
742 return pXAct;
743}
#define WM_DDE_POKE
Definition: dde.h:44
struct tagDDE_DATAHANDLE_HEAD DDE_DATAHANDLE_HEAD
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
Definition: dde.h:72
short cfFormat
Definition: dde.h:74
BYTE Value[1]
Definition: dde.h:75
unsigned short unused
Definition: dde.h:73
unsigned short fRelease
Definition: dde.h:73
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

Referenced by DdeClientTransaction().

◆ WDML_ClientQueueRequest()

static WDML_XACT * WDML_ClientQueueRequest ( WDML_CONV pConv,
UINT  wFmt,
HSZ  hszItem 
)
static

Definition at line 459 of file ddeclient.c.

460{
461 WDML_XACT* pXAct;
462 ATOM atom;
463
464 TRACE("XTYP_REQUEST transaction\n");
465
466 atom = WDML_MakeAtomFromHsz(hszItem);
467 if (!atom) return NULL;
468
469 pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_REQUEST, wFmt, hszItem);
470 if (!pXAct)
471 {
472 GlobalDeleteAtom(atom);
473 return NULL;
474 }
475
476 pXAct->lParam = PackDDElParam(WM_DDE_REQUEST, wFmt, atom);
477
478 return pXAct;
479}
#define WM_DDE_REQUEST
Definition: dde.h:43

Referenced by DdeClientTransaction().

◆ WDML_ClientQueueTerminate()

static WDML_XACT * WDML_ClientQueueTerminate ( WDML_CONV pConv)
static

Definition at line 781 of file ddeclient.c.

782{
783 WDML_XACT* pXAct;
784
785 pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_TERMINATE, 0, 0);
786 if (!pXAct)
787 return NULL;
788
789 pXAct->lParam = 0;
790 pConv->wStatus &= ~ST_CONNECTED;
791
792 return pXAct;
793}

Referenced by DdeDisconnect().

◆ WDML_ClientQueueUnadvise()

static WDML_XACT * WDML_ClientQueueUnadvise ( WDML_CONV pConv,
UINT  wFmt,
HSZ  hszItem 
)
static

Definition at line 385 of file ddeclient.c.

386{
387 WDML_XACT* pXAct;
388 ATOM atom;
389
390 TRACE("XTYP_ADVSTOP transaction\n");
391
392 atom = WDML_MakeAtomFromHsz(hszItem);
393 if (!atom) return NULL;
394
395 pXAct = WDML_AllocTransaction(pConv->instance, WM_DDE_UNADVISE, wFmt, hszItem);
396 if (!pXAct)
397 {
398 GlobalDeleteAtom(atom);
399 return NULL;
400 }
401
402 /* end advise loop: post WM_DDE_UNADVISE to server to terminate link
403 * on the specified item.
404 */
405 pXAct->lParam = PackDDElParam(WM_DDE_UNADVISE, wFmt, atom);
406 return pXAct;
407}
#define WM_DDE_UNADVISE
Definition: dde.h:40

Referenced by DdeClientTransaction().

◆ WDML_HandleAdviseReply()

static WDML_QUEUE_STATE WDML_HandleAdviseReply ( WDML_CONV pConv,
MSG msg,
WDML_XACT pXAct,
DWORD ack 
)
static

Definition at line 328 of file ddeclient.c.

329{
330 DDEACK ddeAck;
331 UINT_PTR uiLo, uiHi;
332 HSZ hsz;
333
334 if (msg->message != WM_DDE_ACK || WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
335 {
336 return WDML_QS_PASS;
337 }
338
339 UnpackDDElParam(WM_DDE_ACK, msg->lParam, &uiLo, &uiHi);
340 hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);
341
342 if (DdeCmpStringHandles(hsz, pXAct->hszItem) != 0)
343 return WDML_QS_PASS;
344
345 GlobalDeleteAtom(uiHi);
346 FreeDDElParam(WM_DDE_ACK, msg->lParam);
347
348 if (ack) *ack = uiLo;
349 WDML_ExtractAck(uiLo, &ddeAck);
350
351 if (ddeAck.fAck)
352 {
353 WDML_LINK* pLink;
354
355 /* billx: first to see if the link is already created. */
356 pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE,
357 pXAct->hszItem, TRUE, pXAct->wFmt);
358 if (pLink != NULL)
359 {
360 /* we found a link, and only need to modify it in case it changes */
361 pLink->transactionType = pXAct->wType;
362 }
363 else
364 {
365 WDML_AddLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE,
366 pXAct->wType, pXAct->hszItem, pXAct->wFmt);
367 }
368 pXAct->hDdeData = (HDDEDATA)1;
369 }
370 else
371 {
372 TRACE("Returning FALSE on XTYP_ADVSTART - fAck was FALSE\n");
373 GlobalFree(pXAct->hMem);
374 pXAct->hDdeData = NULL;
375 }
376
377 return WDML_QS_HANDLED;
378}
BOOL WINAPI UnpackDDElParam(UINT, LPARAM, PUINT_PTR, PUINT_PTR)
Definition: ddemisc.c:105
BOOL WINAPI FreeDDElParam(UINT, LPARAM)
Definition: ddemisc.c:147
static __inline void WDML_ExtractAck(WORD status, DDEACK *da)
Definition: dde_private.h:237
WDML_LINK * WDML_FindLink(WDML_INSTANCE *pInstance, HCONV hConv, WDML_SIDE side, HSZ hszItem, BOOL use_fmt, UINT uFmt) DECLSPEC_HIDDEN
Definition: ddemisc.c:1868
void WDML_AddLink(WDML_INSTANCE *pInstance, HCONV hConv, WDML_SIDE side, UINT wType, HSZ hszItem, UINT wFmt) DECLSPEC_HIDDEN
Definition: ddemisc.c:1755
@ WDML_QS_PASS
Definition: dde_private.h:185
@ WDML_QS_HANDLED
Definition: dde_private.h:185
INT WINAPI DdeCmpStringHandles(HSZ, HSZ)
Definition: ddemisc.c:685
Definition: dde.h:51
unsigned short fAck
Definition: dde.h:52
HDDEDATA hDdeData
Definition: dde_private.h:113
#define WIN_GetFullHandle(h)
Definition: user_x.h:108

Referenced by WDML_HandleReply().

◆ WDML_HandleExecuteReply()

static WDML_QUEUE_STATE WDML_HandleExecuteReply ( WDML_CONV pConv,
MSG msg,
WDML_XACT pXAct,
DWORD ack 
)
static

Definition at line 663 of file ddeclient.c.

664{
665 DDEACK ddeAck;
666 UINT_PTR uiLo, uiHi;
667
668 if (msg->message != WM_DDE_ACK || WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
669 {
670 return WDML_QS_PASS;
671 }
672
673 UnpackDDElParam(WM_DDE_ACK, msg->lParam, &uiLo, &uiHi);
674 FreeDDElParam(WM_DDE_ACK, msg->lParam);
675
676 if ((HANDLE)uiHi != pXAct->hMem)
677 {
678 return WDML_QS_PASS;
679 }
680
681 if (ack) *ack = uiLo;
682 WDML_ExtractAck(uiLo, &ddeAck);
683 pXAct->hDdeData = (HDDEDATA)(UINT_PTR)ddeAck.fAck;
684
685 TRACE("hDdeData = %p\n", pXAct->hDdeData);
686 pConv->instance->lastError = (pXAct->hDdeData != 0) ? DMLERR_NO_ERROR : DMLERR_NOTPROCESSED;
687
688 return WDML_QS_HANDLED;
689}
#define DMLERR_NO_ERROR
Definition: ddeml.h:242
#define DMLERR_NOTPROCESSED
Definition: ddeml.h:255

Referenced by WDML_HandleReply().

◆ WDML_HandleIncomingData()

static WDML_QUEUE_STATE WDML_HandleIncomingData ( WDML_CONV pConv,
MSG msg,
HDDEDATA *  hdd 
)
static

Definition at line 827 of file ddeclient.c.

828{
829 UINT_PTR uiLo, uiHi;
830 HDDEDATA hDdeDataIn, hDdeDataOut;
831 WDML_LINK* pLink;
832 WINE_DDEHEAD wdh;
833 HSZ hsz;
834
835 TRACE("WM_DDE_DATA message received in the Client Proc!\n");
836 /* wParam -- sending window handle */
837 /* lParam -- hDdeData & item HSZ */
838
839 UnpackDDElParam(WM_DDE_DATA, msg->lParam, &uiLo, &uiHi);
840 hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);
841
842 hDdeDataIn = WDML_Global2DataHandle(pConv, (HGLOBAL)uiLo, &wdh);
843
844 /* billx:
845 * For hot link, data should be passed to its callback with
846 * XTYP_ADVDATA and callback should return the proper status.
847 */
848 pLink = WDML_FindLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE, hsz,
849 uiLo != 0, wdh.cfFormat);
850 if (!pLink)
851 {
852 WDML_DecHSZ(pConv->instance, hsz);
853 DdeFreeDataHandle(hDdeDataIn);
854 return WDML_QS_PASS;
855 }
856
857 if (hDdeDataIn != 0 && wdh.fAckReq)
858 {
859 WDML_PostAck(pConv, WDML_CLIENT_SIDE, 0, FALSE, TRUE, uiHi, msg->lParam, WM_DDE_DATA);
860 if (msg->lParam)
861 msg->lParam = 0;
862 }
863 else
864 {
865 GlobalDeleteAtom(uiHi);
866 }
867
868 hDdeDataOut = WDML_InvokeCallback(pConv->instance, XTYP_ADVDATA, pLink->uFmt, pLink->hConv,
869 pConv->hszTopic, pLink->hszItem, hDdeDataIn, 0, 0);
870
871 if (hDdeDataOut != (HDDEDATA)DDE_FACK || wdh.fRelease)
872 {
873 if (uiLo) GlobalFree((HANDLE)uiLo);
874 }
875
876 DdeFreeDataHandle(hDdeDataIn);
877
878 WDML_DecHSZ(pConv->instance, hsz);
879 if (msg->lParam)
880 FreeDDElParam(WM_DDE_DATA, msg->lParam);
881
882 return WDML_QS_HANDLED;
883}
#define WM_DDE_DATA
Definition: dde.h:42
HDDEDATA WDML_InvokeCallback(WDML_INSTANCE *pInst, UINT uType, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hdata, ULONG_PTR dwData1, ULONG_PTR dwData2) DECLSPEC_HIDDEN
Definition: ddemisc.c:1206
HDDEDATA WDML_Global2DataHandle(WDML_CONV *pConv, HGLOBAL hMem, WINE_DDEHEAD *da) DECLSPEC_HIDDEN
Definition: ddemisc.c:1504
BOOL WDML_DecHSZ(WDML_INSTANCE *pInstance, HSZ hsz) DECLSPEC_HIDDEN
Definition: ddemisc.c:380
BOOL WDML_PostAck(WDML_CONV *pConv, WDML_SIDE side, WORD appRetCode, BOOL fBusy, BOOL fAck, UINT_PTR pmt, LPARAM lParam, UINT oldMsg) DECLSPEC_HIDDEN
Definition: ddemisc.c:2275
#define DDE_FACK
Definition: ddeml.h:216
#define XTYP_ADVDATA
Definition: ddeml.h:181
BOOL WINAPI DdeFreeDataHandle(HDDEDATA)
Definition: ddemisc.c:1461
unsigned short fRelease
Definition: dde_private.h:85
unsigned short fAckReq
Definition: dde_private.h:87
short cfFormat
Definition: dde_private.h:88

Referenced by WDML_HandleReply().

◆ WDML_HandleIncomingTerminate()

static WDML_QUEUE_STATE WDML_HandleIncomingTerminate ( WDML_CONV pConv,
MSG msg,
HDDEDATA *  hdd 
)
static

Definition at line 890 of file ddeclient.c.

891{
892 if (pConv->hwndServer != WIN_GetFullHandle((HWND)msg->wParam))
893 return WDML_QS_PASS;
894
895 pConv->wStatus |= ST_TERMINATED;
896 if (pConv->wStatus & ST_CONNECTED)
897 {
898 /* don't care about result code (if server exists or not) */
900 pConv->wStatus &= ~ST_CONNECTED;
901 }
902 /* have to keep connection around to allow reconnection */
903 return WDML_QS_HANDLED;
904}
#define L(x)
Definition: ntvdm.h:50

Referenced by WDML_HandleReply().

◆ WDML_HandlePokeReply()

static WDML_QUEUE_STATE WDML_HandlePokeReply ( WDML_CONV pConv,
MSG msg,
WDML_XACT pXAct,
DWORD ack 
)
static

Definition at line 750 of file ddeclient.c.

751{
752 UINT_PTR uiLo, uiHi;
753 HSZ hsz;
754
755 if (msg->message != WM_DDE_ACK && WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
756 {
757 return WDML_QS_PASS;
758 }
759
760 UnpackDDElParam(WM_DDE_ACK, msg->lParam, &uiLo, &uiHi);
761 hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);
762 if (DdeCmpStringHandles(hsz, pXAct->hszItem) != 0)
763 {
764 return WDML_QS_PASS;
765 }
766 FreeDDElParam(WM_DDE_ACK, msg->lParam);
767 GlobalDeleteAtom(uiHi);
768
769 if (ack) *ack = uiLo;
770 pXAct->hMem = GlobalFree(pXAct->hMem);
771
772 pXAct->hDdeData = (HDDEDATA)TRUE;
773 return TRUE;
774}

Referenced by WDML_HandleReply().

◆ WDML_HandleReply()

static WDML_QUEUE_STATE WDML_HandleReply ( WDML_CONV pConv,
MSG msg,
HDDEDATA *  hdd,
DWORD ack 
)
static

Definition at line 911 of file ddeclient.c.

912{
913 WDML_XACT* pXAct = pConv->transactions;
915
916 if (pConv->transactions)
917 {
918 if (ack) *ack = DDE_FNOTPROCESSED;
919 /* first check message against a pending transaction, if any */
920 switch (pXAct->ddeMsg)
921 {
922 case WM_DDE_ADVISE:
923 qs = WDML_HandleAdviseReply(pConv, msg, pXAct, ack);
924 break;
925 case WM_DDE_UNADVISE:
926 qs = WDML_HandleUnadviseReply(pConv, msg, pXAct, ack);
927 break;
928 case WM_DDE_EXECUTE:
929 qs = WDML_HandleExecuteReply(pConv, msg, pXAct, ack);
930 break;
931 case WM_DDE_REQUEST:
932 qs = WDML_HandleRequestReply(pConv, msg, pXAct, ack);
933 break;
934 case WM_DDE_POKE:
935 qs = WDML_HandlePokeReply(pConv, msg, pXAct, ack);
936 break;
937 case WM_DDE_TERMINATE:
938 qs = WDML_HandleTerminateReply(pConv, msg);
939 break;
940 default:
941 qs = WDML_QS_ERROR;
942 FIXME("oooch\n");
943 }
944 }
945 else
946 {
947 qs = WDML_QS_PASS;
948 }
949
950 /* now check the results */
951 switch (qs)
952 {
953 case WDML_QS_ERROR:
955 *hdd = 0;
956 break;
957 case WDML_QS_HANDLED:
958 /* ok, we have resolved a pending transaction
959 * notify callback if asynchronous.
960 */
961 if (pXAct->dwTimeout == TIMEOUT_ASYNC && pXAct->ddeMsg != WM_DDE_TERMINATE)
962 {
964 (HCONV)pConv, pConv->hszTopic, pXAct->hszItem,
965 pXAct->hDdeData, MAKELONG(0, pXAct->xActID), 0 /* FIXME */);
966 qs = WDML_QS_PASS;
967 }
968 else
969 {
970 *hdd = pXAct->hDdeData;
971 }
972 break;
973 case WDML_QS_PASS:
974 /* no pending transaction found, try a warm/hot link or a termination request */
975 switch (msg->message)
976 {
977 case WM_DDE_DATA:
978 qs = WDML_HandleIncomingData(pConv, msg, hdd);
979 break;
980 case WM_DDE_TERMINATE:
981 qs = WDML_HandleIncomingTerminate(pConv, msg, hdd);
982 break;
983 case WM_DDE_ACK:
984 /* This happens at end of DdeClientTransaction XTYP_EXECUTE
985 * Without this assignment, DdeClientTransaction's return value is undefined
986 */
987 *hdd = (HDDEDATA)TRUE;
988 if (ack)
989 *ack = DDE_FACK;
990 break;
991 }
992 break;
993 case WDML_QS_BLOCK:
994 FIXME("shouldn't be used on client side\n");
995 break;
996 }
997
998 return qs;
999}
WDML_QUEUE_STATE
Definition: dde_private.h:184
@ WDML_QS_BLOCK
Definition: dde_private.h:185
@ WDML_QS_SWALLOWED
Definition: dde_private.h:185
@ WDML_QS_ERROR
Definition: dde_private.h:185
static WDML_QUEUE_STATE WDML_HandleTerminateReply(WDML_CONV *pConv, MSG *msg)
Definition: ddeclient.c:800
static WDML_QUEUE_STATE WDML_HandleIncomingTerminate(WDML_CONV *pConv, MSG *msg, HDDEDATA *hdd)
Definition: ddeclient.c:890
static WDML_QUEUE_STATE WDML_HandleRequestReply(WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
Definition: ddeclient.c:486
static WDML_QUEUE_STATE WDML_HandleIncomingData(WDML_CONV *pConv, MSG *msg, HDDEDATA *hdd)
Definition: ddeclient.c:827
static WDML_QUEUE_STATE WDML_HandlePokeReply(WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
Definition: ddeclient.c:750
static WDML_QUEUE_STATE WDML_HandleExecuteReply(WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
Definition: ddeclient.c:663
static WDML_QUEUE_STATE WDML_HandleAdviseReply(WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
Definition: ddeclient.c:328
static WDML_QUEUE_STATE WDML_HandleUnadviseReply(WDML_CONV *pConv, MSG *msg, WDML_XACT *pXAct, DWORD *ack)
Definition: ddeclient.c:414
#define XTYP_XACT_COMPLETE
Definition: ddeml.h:188
#define DDE_FNOTPROCESSED
Definition: ddeml.h:223

Referenced by WDML_ClientProc(), and WDML_SyncWaitTransactionReply().

◆ WDML_HandleRequestReply()

static WDML_QUEUE_STATE WDML_HandleRequestReply ( WDML_CONV pConv,
MSG msg,
WDML_XACT pXAct,
DWORD ack 
)
static

Definition at line 486 of file ddeclient.c.

487{
488 DDEACK ddeAck;
489 WINE_DDEHEAD wdh;
490 UINT_PTR uiLo, uiHi;
491 HSZ hsz;
492
493 if (WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
494 return WDML_QS_PASS;
495
496 switch (msg->message)
497 {
498 case WM_DDE_ACK:
499 UnpackDDElParam(WM_DDE_ACK, msg->lParam, &uiLo, &uiHi);
500 FreeDDElParam(WM_DDE_ACK, msg->lParam);
501 GlobalDeleteAtom(uiHi);
502 if (ack) *ack = uiLo;
503 WDML_ExtractAck(uiLo, &ddeAck);
504 pXAct->hDdeData = 0;
505 if (ddeAck.fAck)
506 ERR("Positive answer should appear in NACK for a request, assuming negative\n");
507 TRACE("Negative answer...\n");
508 break;
509
510 case WM_DDE_DATA:
511 UnpackDDElParam(WM_DDE_DATA, msg->lParam, &uiLo, &uiHi);
512 TRACE("Got the result (%08lx)\n", uiLo);
513
514 hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);
515
516 if (DdeCmpStringHandles(hsz, pXAct->hszItem) != 0)
517 return WDML_QS_PASS;
518
519 pXAct->hDdeData = WDML_Global2DataHandle(pConv, (HGLOBAL)uiLo, &wdh);
520 if (wdh.fRelease)
521 {
522 GlobalFree((HGLOBAL)uiLo);
523 }
524 if (wdh.fAckReq)
525 {
526 pConv->instance->lastError = DMLERR_MEMORY_ERROR;
527 }
528 else
529 {
530 GlobalDeleteAtom(uiHi);
531 FreeDDElParam(WM_DDE_ACK, msg->lParam);
532 }
533 break;
534
535 default:
536 FreeDDElParam(msg->message, msg->lParam);
537 return WDML_QS_PASS;
538 }
539
540 return WDML_QS_HANDLED;
541}

Referenced by WDML_HandleReply().

◆ WDML_HandleTerminateReply()

static WDML_QUEUE_STATE WDML_HandleTerminateReply ( WDML_CONV pConv,
MSG msg 
)
static

Definition at line 800 of file ddeclient.c.

801{
802 if (msg->message != WM_DDE_TERMINATE)
803 {
804 /* FIXME: should delete data passed here */
805 return WDML_QS_SWALLOWED;
806 }
807
808 if (WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
809 {
810 FIXME("hmmm shouldn't happen\n");
811 return WDML_QS_PASS;
812 }
813 if (!(pConv->instance->CBFflags & CBF_SKIP_DISCONNECTS))
814 {
815 WDML_InvokeCallback(pConv->instance, XTYP_DISCONNECT, 0, (HCONV)pConv,
816 0, 0, 0, 0, (pConv->wStatus & ST_ISSELF) ? 1 : 0);
817 }
819 return WDML_QS_HANDLED;
820}
#define CBF_SKIP_DISCONNECTS
Definition: ddeml.h:114
#define XTYP_DISCONNECT
Definition: ddeml.h:192
#define ST_ISSELF
Definition: ddeml.h:88

Referenced by WDML_HandleReply().

◆ WDML_HandleUnadviseReply()

static WDML_QUEUE_STATE WDML_HandleUnadviseReply ( WDML_CONV pConv,
MSG msg,
WDML_XACT pXAct,
DWORD ack 
)
static

Definition at line 414 of file ddeclient.c.

415{
416 DDEACK ddeAck;
417 UINT_PTR uiLo, uiHi;
418 HSZ hsz;
419
420 if (msg->message != WM_DDE_ACK || WIN_GetFullHandle((HWND)msg->wParam) != pConv->hwndServer)
421 {
422 return WDML_QS_PASS;
423 }
424
425 UnpackDDElParam(WM_DDE_ACK, msg->lParam, &uiLo, &uiHi);
426 hsz = WDML_MakeHszFromAtom(pConv->instance, uiHi);
427
428 if (DdeCmpStringHandles(hsz, pXAct->hszItem) != 0)
429 return WDML_QS_PASS;
430
431 FreeDDElParam(WM_DDE_ACK, msg->lParam);
432 GlobalDeleteAtom(uiHi);
433
434 if (ack) *ack = uiLo;
435 WDML_ExtractAck(uiLo, &ddeAck);
436
437 TRACE("WM_DDE_ACK received while waiting for a timeout\n");
438
439 if (!ddeAck.fAck)
440 {
441 TRACE("Returning FALSE on XTYP_ADVSTOP - fAck was FALSE\n");
442 pXAct->hDdeData = NULL;
443 }
444 else
445 {
446 /* billx: remove the link */
447 WDML_RemoveLink(pConv->instance, (HCONV)pConv, WDML_CLIENT_SIDE,
448 pXAct->hszItem, pXAct->wFmt);
449 pXAct->hDdeData = (HDDEDATA)1;
450 }
451 return WDML_QS_HANDLED;
452}
void WDML_RemoveLink(WDML_INSTANCE *pInstance, HCONV hConv, WDML_SIDE side, HSZ hszItem, UINT wFmt) DECLSPEC_HIDDEN
Definition: ddemisc.c:1780

Referenced by WDML_HandleReply().

◆ WDML_SyncWaitTransactionReply()

static HDDEDATA WDML_SyncWaitTransactionReply ( HCONV  hConv,
DWORD  dwTimeout,
const WDML_XACT pXAct,
DWORD ack 
)
static

Definition at line 1007 of file ddeclient.c.

1008{
1009 DWORD start, elapsed;
1010 DWORD err;
1011 WDML_CONV* pConv;
1012
1013 TRACE("Starting wait for a timeout of %d ms\n", dwTimeout);
1014
1015 start = GetTickCount();
1016 while ((elapsed = GetTickCount() - start) < dwTimeout)
1017 {
1018 /* we cannot be in the crit sect all the time because when client and server run in a
1019 * single process they need to share the access to the internal data
1020 */
1022 dwTimeout - elapsed, QS_POSTMESSAGE) == WAIT_OBJECT_0)
1023 {
1024 MSG msg;
1025
1027 {
1028 HDDEDATA hdd = NULL;
1029
1030 pConv = WDML_GetConv(hConv, FALSE);
1031 if (pConv == NULL)
1032 {
1033 /* conversation no longer available... return failure */
1034 return 0;
1035 }
1036 if (msg.hwnd == pConv->hwndClient)
1037 {
1038 /* check that either pXAct has been processed or no more xActions are pending */
1039 BOOL ret = (pConv->transactions == pXAct);
1040 if (WDML_HandleReply(pConv, &msg, &hdd, ack) == WDML_QS_HANDLED)
1041 {
1042 TRACE("WDML_HandleReply returned WDML_QS_HANDLED\n");
1043 ret = TRUE;
1044 }
1045 else
1046 ret = (pConv->transactions == NULL || ret);
1047
1048 if (ret)
1049 {
1050 pConv->instance->lastError = hdd ? DMLERR_NO_ERROR : DMLERR_NOTPROCESSED;
1051 return hdd;
1052 }
1053 }
1054 else
1055 {
1057 }
1058 }
1059 }
1060 }
1061
1062 TRACE("Timeout !!\n");
1063
1064 pConv = WDML_GetConv(hConv, FALSE);
1065 if (pConv != NULL)
1066 {
1067 if (pConv->transactions)
1068 {
1069 switch (pConv->transactions->ddeMsg)
1070 {
1071 case WM_DDE_ADVISE: err = DMLERR_ADVACKTIMEOUT; break;
1074 case WM_DDE_POKE: err = DMLERR_POKEACKTIMEOUT; break;
1076 default: err = DMLERR_INVALIDPARAMETER; break;
1077 }
1078
1079 pConv->instance->lastError = err;
1080 }
1081 }
1082
1083 return 0;
1084}
#define DMLERR_UNADVACKTIMEOUT
Definition: ddeml.h:262
#define DMLERR_ADVACKTIMEOUT
Definition: ddeml.h:246
#define DMLERR_EXECACKTIMEOUT
Definition: ddeml.h:251
#define DMLERR_POKEACKTIMEOUT
Definition: ddeml.h:257
#define DMLERR_DATAACKTIMEOUT
Definition: ddeml.h:248
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
GLuint start
Definition: gl.h:1545
#define err(...)
#define WAIT_OBJECT_0
Definition: winbase.h:406
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h:1196
#define QS_POSTMESSAGE
Definition: winuser.h:877
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)

Referenced by DdeDisconnect(), and WDML_ClientHandle().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ddeml  )

Variable Documentation

◆ WDML_szClientConvClassA

const char WDML_szClientConvClassA = "DDEMLAnsiClient"

Definition at line 31 of file ddeclient.c.

Referenced by DdeConnect(), and WDML_ServerNameProc().

◆ WDML_szClientConvClassW

const WCHAR WDML_szClientConvClassW = L"DDEMLUnicodeClient"

Definition at line 32 of file ddeclient.c.

Referenced by DdeConnect(), and WDML_ServerNameProc().