Use "CALL" and "RET" in capital letters for distinction.
[wine.git] / include / ddeml.h
blobb5c16d833de74ca67a80873dcc1d1c9e441ab21e
1 /*
2 * DDEML library definitions
4 * Copyright 1997 Alexandre Julliard
5 * Copyright 1997 Len White
6 */
8 #ifndef __WINE_DDEML_H
9 #define __WINE_DDEML_H
11 #include "windef.h"
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* defined(__cplusplus) */
17 /* Codepage Constants
20 #define CP_WINANSI 1004
21 #define CP_WINUNICODE 1200
23 /* DDE synchronisation constants
26 #define MSGF_DDEMGR 0x8001
28 #define QID_SYNC16 -1L
29 #define QID_SYNC 0xFFFFFFFF
31 /* Type variation for MS deliberate departures from ANSI standards
34 #define EXPENTRY CALLBACK
36 /***************************************************
38 FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
40 ***************************************************/
43 * Callback filter flags for use with standard apps.
46 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
47 #define CBF_FAIL_CONNECTIONS 0x00002000
48 #define CBF_FAIL_ADVISES 0x00004000
49 #define CBF_FAIL_EXECUTES 0x00008000
50 #define CBF_FAIL_POKES 0x00010000
51 #define CBF_FAIL_REQUESTS 0x00020000
52 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
54 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
55 #define CBF_SKIP_REGISTRATIONS 0x00080000
56 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
57 #define CBF_SKIP_DISCONNECTS 0x00200000
58 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
60 #define CBR_BLOCK 0xFFFFFFFFL
63 * Application command flags
65 #define APPCMD_CLIENTONLY 0x00000010L
66 #define APPCMD_FILTERINITS 0x00000020L
67 #define APPCMD_MASK 0x00000FF0L
70 * Application classification flags
73 #define APPCLASS_STANDARD 0x00000000L
74 #define APPCLASS_MONITOR 0x00000001L
75 #define APPCLASS_MASK 0x0000000FL
78 * Callback filter flags for use with MONITOR apps - 0 implies no monitor
79 * callbacks.
81 #define MF_HSZ_INFO 0x01000000
82 #define MF_SENDMSGS 0x02000000
83 #define MF_POSTMSGS 0x04000000
84 #define MF_CALLBACKS 0x08000000
85 #define MF_ERRORS 0x10000000
86 #define MF_LINKS 0x20000000
87 #define MF_CONV 0x40000000
89 #define MF_MASK 0xFF000000
92 * DdeNameService service name flags
95 #define DNS_REGISTER 0x0001
96 #define DNS_UNREGISTER 0x0002
97 #define DNS_FILTERON 0x0004
98 #define DNS_FILTEROFF 0x0008
101 /****************************************************
103 End of Flags section
105 ****************************************************/
107 /****************************************************
109 Message Types Section
111 ****************************************************/
113 #define XTYPF_NOBLOCK 0x0002 /* CBR_NOBLOCK will not work */
114 #define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
115 #define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
117 #define XCLASS_MASK 0xFC00
118 #define XCLASS_BOOL 0x1000
119 #define XCLASS_DATA 0x2000
120 #define XCLASS_FLAGS 0x4000
121 #define XCLASS_NOTIFICATION 0x8000
123 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
124 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
125 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
126 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
127 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
128 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
129 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
130 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
131 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
132 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
133 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
134 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
135 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
136 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
137 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
139 #define XTYP_MASK 0x00F0
140 #define XTYP_SHIFT 4
142 /**************************************************
144 End of Message Types Section
146 ****************************************************/
148 /*****************************************************
150 DDE Codes for wStatus field
152 *****************************************************/
154 #define DDE_FACK 0x8000
155 #define DDE_FBUSY 0x4000
156 #define DDE_FDEFERUPD 0x4000
157 #define DDE_FACKREQ 0x8000
158 #define DDE_FRELEASE 0x2000
159 #define DDE_FREQUESTED 0x1000
160 #define DDE_FAPPSTATUS 0x00FF
161 #define DDE_FNOTPROCESSED 0x0000
164 /*****************************************************
166 End of wStatus codes
168 *****************************************************/
170 /****************************************************
172 Return Codes section again copied from SDK as must be same
174 *****************************************************/
176 #define DMLERR_NO_ERROR 0 /* must be 0 */
178 #define DMLERR_FIRST 0x4000
180 #define DMLERR_ADVACKTIMEOUT 0x4000
181 #define DMLERR_BUSY 0x4001
182 #define DMLERR_DATAACKTIMEOUT 0x4002
183 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
184 #define DMLERR_DLL_USAGE 0x4004
185 #define DMLERR_EXECACKTIMEOUT 0x4005
186 #define DMLERR_INVALIDPARAMETER 0x4006
187 #define DMLERR_LOW_MEMORY 0x4007
188 #define DMLERR_MEMORY_ERROR 0x4008
189 #define DMLERR_NOTPROCESSED 0x4009
190 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
191 #define DMLERR_POKEACKTIMEOUT 0x400b
192 #define DMLERR_POSTMSG_FAILED 0x400c
193 #define DMLERR_REENTRANCY 0x400d
194 #define DMLERR_SERVER_DIED 0x400e
195 #define DMLERR_SYS_ERROR 0x400f
196 #define DMLERR_UNADVACKTIMEOUT 0x4010
197 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
199 #define DMLERR_LAST 0x4011
201 /*****************************************************
203 End of Return Codes and Microsoft section
205 ******************************************************/
209 DECLARE_HANDLE(HCONVLIST);
210 DECLARE_HANDLE(HCONV);
211 DECLARE_HANDLE(HSZ);
212 DECLARE_HANDLE(HDDEDATA);
216 /*******************************************************
218 API Entry Points
220 *******************************************************/
222 typedef HDDEDATA (CALLBACK *PFNCALLBACK16)(UINT16,UINT16,HCONV,HSZ,HSZ,
223 HDDEDATA,DWORD,DWORD);
224 typedef HDDEDATA (CALLBACK *PFNCALLBACK)(UINT,UINT,HCONV,HSZ,HSZ,
225 HDDEDATA,DWORD,DWORD);
227 /***************************************************
229 Externally visible data structures
231 ***************************************************/
233 typedef struct
235 UINT16 cb;
236 UINT16 wFlags;
237 UINT16 wCountryID;
238 INT16 iCodePage;
239 DWORD dwLangID;
240 DWORD dwSecurity;
241 } CONVCONTEXT16, *LPCONVCONTEXT16;
243 typedef struct
245 UINT cb;
246 UINT wFlags;
247 UINT wCountryID;
248 INT iCodePage;
249 DWORD dwLangID;
250 DWORD dwSecurity;
251 } CONVCONTEXT, *LPCONVCONTEXT;
253 typedef struct
255 DWORD cb;
256 DWORD hUser;
257 HCONV hConvPartner;
258 HSZ hszSvcPartner;
259 HSZ hszServiceReq;
260 HSZ hszTopic;
261 HSZ hszItem;
262 UINT16 wFmt;
263 UINT16 wType;
264 UINT16 wStatus;
265 UINT16 wConvst;
266 UINT16 wLastError;
267 HCONVLIST hConvList;
268 CONVCONTEXT16 ConvCtxt;
269 } CONVINFO16, *LPCONVINFO16;
271 typedef struct
273 DWORD cb;
274 DWORD hUser;
275 HCONV hConvPartner;
276 HSZ hszSvcPartner;
277 HSZ hszServiceReq;
278 HSZ hszTopic;
279 HSZ hszItem;
280 UINT wFmt;
281 UINT wType;
282 UINT wStatus;
283 UINT wConvst;
284 UINT wLastError;
285 HCONVLIST hConvList;
286 CONVCONTEXT ConvCtxt;
287 HWND hwnd;
288 HWND hwndPartner;
289 } CONVINFO, *LPCONVINFO;
291 /* Interface Definitions */
294 UINT16 WINAPI DdeInitialize16(LPDWORD,PFNCALLBACK16,DWORD,DWORD);
295 UINT WINAPI DdeInitializeA(LPDWORD,PFNCALLBACK,DWORD,DWORD);
296 UINT WINAPI DdeInitializeW(LPDWORD,PFNCALLBACK,DWORD,DWORD);
297 #define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
298 BOOL16 WINAPI DdeUninitialize16(DWORD);
299 BOOL WINAPI DdeUninitialize(DWORD);
300 HCONVLIST WINAPI DdeConnectList16(DWORD,HSZ,HSZ,HCONVLIST,LPCONVCONTEXT16);
301 HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,LPCONVCONTEXT);
302 HCONV WINAPI DdeQueryNextServer16(HCONVLIST, HCONV);
303 HCONV WINAPI DdeQueryNextServer(HCONVLIST, HCONV);
304 DWORD WINAPI DdeQueryStringA(DWORD, HSZ, LPSTR, DWORD, INT);
305 DWORD WINAPI DdeQueryStringW(DWORD, HSZ, LPWSTR, DWORD, INT);
306 #define DdeQueryString WINELIB_NAME_AW(DdeQueryString)
307 BOOL16 WINAPI DdeDisconnectList16(HCONVLIST);
308 BOOL WINAPI DdeDisconnectList(HCONVLIST);
309 HCONV WINAPI DdeConnect16(DWORD,HSZ,HSZ,LPCONVCONTEXT16);
310 HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,LPCONVCONTEXT);
311 BOOL16 WINAPI DdeDisconnect16(HCONV);
312 BOOL WINAPI DdeDisconnect(HCONV);
313 BOOL16 WINAPI DdeSetUserHandle16(HCONV,DWORD,DWORD);
314 HDDEDATA WINAPI DdeCreateDataHandle16(DWORD,LPBYTE,DWORD,DWORD,HSZ,UINT16,UINT16);
315 HDDEDATA WINAPI DdeCreateDataHandle(DWORD,LPBYTE,DWORD,DWORD,HSZ,UINT,UINT);
316 HCONV WINAPI DdeReconnect(HCONV);
317 HSZ WINAPI DdeCreateStringHandle16(DWORD,LPCSTR,INT16);
318 HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,INT);
319 HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,INT);
320 #define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
321 BOOL16 WINAPI DdeFreeStringHandle16(DWORD,HSZ);
322 BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
323 BOOL16 WINAPI DdeFreeDataHandle16(HDDEDATA);
324 BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
325 BOOL16 WINAPI DdeKeepStringHandle16(DWORD,HSZ);
326 BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
327 HDDEDATA WINAPI DdeClientTransaction16(LPVOID,DWORD,HCONV,HSZ,UINT16,
328 UINT16,DWORD,LPDWORD);
329 HDDEDATA WINAPI DdeClientTransaction(LPBYTE,DWORD,HCONV,HSZ,UINT,
330 UINT,DWORD,LPDWORD);
331 BOOL16 WINAPI DdeAbandonTransaction16(DWORD,HCONV,DWORD);
332 BOOL16 WINAPI DdePostAdvise16(DWORD,HSZ,HSZ);
333 BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
334 HDDEDATA WINAPI DdeAddData16(HDDEDATA,LPBYTE,DWORD,DWORD);
335 DWORD WINAPI DdeGetData(HDDEDATA,LPBYTE,DWORD,DWORD);
336 LPBYTE WINAPI DdeAccessData16(HDDEDATA,LPDWORD);
337 LPBYTE WINAPI DdeAccessData(HDDEDATA,LPDWORD);
338 BOOL16 WINAPI DdeUnaccessData16(HDDEDATA);
339 BOOL WINAPI DdeUnaccessData(HDDEDATA);
340 BOOL16 WINAPI DdeEnableCallback16(DWORD,HCONV,UINT16);
341 BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
342 INT16 WINAPI DdeCmpStringHandles16(HSZ,HSZ);
343 INT WINAPI DdeCmpStringHandles(HSZ,HSZ);
345 HDDEDATA WINAPI DdeNameService16(DWORD,HSZ,HSZ,UINT16);
346 HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
347 UINT16 WINAPI DdeGetLastError16(DWORD);
348 UINT WINAPI DdeGetLastError(DWORD);
349 UINT16 WINAPI DdeQueryConvInfo16(HCONV,DWORD,LPCONVINFO16);
350 UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,LPCONVINFO);
352 #ifdef __cplusplus
353 } /* extern "C" */
354 #endif /* defined(__cplusplus) */
356 #endif /* __WINE_DDEML_H */