2 * DDEML library definitions
4 * Copyright 1997 Alexandre Julliard
5 * Copyright 1997 Len White
8 #ifndef __WINE__DDEML_H
9 #define __WINE__DDEML_H
16 #define CP_WINANSI 1004
17 #define CP_WINUNICODE 1200
19 /* DDE synchronisation constants
22 #define MSGF_DDEMGR 0x8001
24 #define QID_SYNC16 -1L
25 #define QID_SYNC 0xFFFFFFFF
27 /* Type variation for MS deliberate departures from ANSI standards
30 #define EXPENTRY CALLBACK
32 /***************************************************
34 FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
36 ***************************************************/
39 * Callback filter flags for use with standard apps.
42 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
43 #define CBF_FAIL_CONNECTIONS 0x00002000
44 #define CBF_FAIL_ADVISES 0x00004000
45 #define CBF_FAIL_EXECUTES 0x00008000
46 #define CBF_FAIL_POKES 0x00010000
47 #define CBF_FAIL_REQUESTS 0x00020000
48 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
50 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
51 #define CBF_SKIP_REGISTRATIONS 0x00080000
52 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
53 #define CBF_SKIP_DISCONNECTS 0x00200000
54 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
56 #define CBR_BLOCK 0xFFFFFFFFL
59 * Application command flags
61 #define APPCMD_CLIENTONLY 0x00000010L
62 #define APPCMD_FILTERINITS 0x00000020L
63 #define APPCMD_MASK 0x00000FF0L
66 * Application classification flags
69 #define APPCLASS_STANDARD 0x00000000L
70 #define APPCLASS_MONITOR 0x00000001L
71 #define APPCLASS_MASK 0x0000000FL
74 * Callback filter flags for use with MONITOR apps - 0 implies no monitor
77 #define MF_HSZ_INFO 0x01000000
78 #define MF_SENDMSGS 0x02000000
79 #define MF_POSTMSGS 0x04000000
80 #define MF_CALLBACKS 0x08000000
81 #define MF_ERRORS 0x10000000
82 #define MF_LINKS 0x20000000
83 #define MF_CONV 0x40000000
85 #define MF_MASK 0xFF000000
88 * DdeNameService service name flags
91 #define DNS_REGISTER 0x0001
92 #define DNS_UNREGISTER 0x0002
93 #define DNS_FILTERON 0x0004
94 #define DNS_FILTEROFF 0x0008
97 /****************************************************
101 ****************************************************/
103 /****************************************************
105 Message Types Section
107 ****************************************************/
109 #define XTYPF_NOBLOCK 0x0002 /* CBR_NOBLOCK will not work */
110 #define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
111 #define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
113 #define XCLASS_MASK 0xFC00
114 #define XCLASS_BOOL 0x1000
115 #define XCLASS_DATA 0x2000
116 #define XCLASS_FLAGS 0x4000
117 #define XCLASS_NOTIFICATION 0x8000
119 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
120 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
121 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
122 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
123 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
124 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
126 /**************************************************
128 End of Message Types Section
130 ****************************************************/
132 /*****************************************************
134 DDE Codes for wStatus field
136 *****************************************************/
138 #define DDE_FACK 0x8000
139 #define DDE_FBUSY 0x4000
140 #define DDE_FDEFERUPD 0x4000
141 #define DDE_FACKREQ 0x8000
142 #define DDE_FRELEASE 0x2000
143 #define DDE_FREQUESTED 0x1000
144 #define DDE_FAPPSTATUS 0x00FF
145 #define DDE_FNOTPROCESSED 0x0000
148 /*****************************************************
152 *****************************************************/
154 /****************************************************
156 Return Codes section again copied from SDK as must be same
158 *****************************************************/
160 #define DMLERR_NO_ERROR 0 /* must be 0 */
162 #define DMLERR_FIRST 0x4000
164 #define DMLERR_ADVACKTIMEOUT 0x4000
165 #define DMLERR_BUSY 0x4001
166 #define DMLERR_DATAACKTIMEOUT 0x4002
167 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
168 #define DMLERR_DLL_USAGE 0x4004
169 #define DMLERR_EXECACKTIMEOUT 0x4005
170 #define DMLERR_INVALIDPARAMETER 0x4006
171 #define DMLERR_LOW_MEMORY 0x4007
172 #define DMLERR_MEMORY_ERROR 0x4008
173 #define DMLERR_NOTPROCESSED 0x4009
174 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
175 #define DMLERR_POKEACKTIMEOUT 0x400b
176 #define DMLERR_POSTMSG_FAILED 0x400c
177 #define DMLERR_REENTRANCY 0x400d
178 #define DMLERR_SERVER_DIED 0x400e
179 #define DMLERR_SYS_ERROR 0x400f
180 #define DMLERR_UNADVACKTIMEOUT 0x4010
181 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
183 #define DMLERR_LAST 0x4011
185 /*****************************************************
187 End of Return Codes and Microsoft section
189 ******************************************************/
193 typedef DWORD HCONVLIST
;
196 typedef DWORD HDDEDATA
;
197 typedef CHAR
*LPTSTR
;
201 /*******************************************************
205 *******************************************************/
207 typedef HDDEDATA (CALLBACK
*PFNCALLBACK16
)(UINT16
,UINT16
,HCONV
,HSZ
,HSZ
,
208 HDDEDATA
,DWORD
,DWORD
);
209 typedef HDDEDATA (CALLBACK
*PFNCALLBACK
)(UINT
,UINT
,HCONV
,HSZ
,HSZ
,
210 HDDEDATA
,DWORD
,DWORD
);
212 /***************************************************
214 Externally visible data structures
216 ***************************************************/
226 } CONVCONTEXT16
, *LPCONVCONTEXT16
;
236 } CONVCONTEXT
, *LPCONVCONTEXT
;
253 CONVCONTEXT16 ConvCtxt
;
254 } CONVINFO16
, *LPCONVINFO16
;
271 CONVCONTEXT ConvCtxt
;
274 } CONVINFO
, *LPCONVINFO
;
276 /* Interface Definitions */
279 UINT16 WINAPI
DdeInitialize16(LPDWORD
,PFNCALLBACK16
,DWORD
,DWORD
);
280 UINT WINAPI
DdeInitializeA(LPDWORD
,PFNCALLBACK
,DWORD
,DWORD
);
281 UINT WINAPI
DdeInitializeW(LPDWORD
,PFNCALLBACK
,DWORD
,DWORD
);
282 #define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
283 BOOL16 WINAPI
DdeUninitialize16(DWORD
);
284 BOOL WINAPI
DdeUninitialize(DWORD
);
285 HCONVLIST WINAPI
DdeConnectList16(DWORD
,HSZ
,HSZ
,HCONVLIST
,LPCONVCONTEXT16
);
286 HCONVLIST WINAPI
DdeConnectList(DWORD
,HSZ
,HSZ
,HCONVLIST
,LPCONVCONTEXT
);
287 HCONV WINAPI
DdeQueryNextServer16(HCONVLIST
, HCONV
);
288 HCONV WINAPI
DdeQueryNextServer(HCONVLIST
, HCONV
);
289 DWORD WINAPI
DdeQueryStringA(DWORD
, HSZ
, LPSTR
, DWORD
, INT
);
290 DWORD WINAPI
DdeQueryStringW(DWORD
, HSZ
, LPWSTR
, DWORD
, INT
);
291 #define DdeQueryString WINELIB_NAME_AW(DdeQueryString)
292 BOOL16 WINAPI
DdeDisconnectList16(HCONVLIST
);
293 BOOL WINAPI
DdeDisconnectList(HCONVLIST
);
294 HCONV WINAPI
DdeConnect16(DWORD
,HSZ
,HSZ
,LPCONVCONTEXT16
);
295 HCONV WINAPI
DdeConnect(DWORD
,HSZ
,HSZ
,LPCONVCONTEXT
);
296 BOOL16 WINAPI
DdeDisconnect16(HCONV
);
297 BOOL WINAPI
DdeDisconnect(HCONV
);
298 BOOL16 WINAPI
DdeSetUserHandle16(HCONV
,DWORD
,DWORD
);
299 HDDEDATA WINAPI
DdeCreateDataHandle16(DWORD
,LPBYTE
,DWORD
,DWORD
,HSZ
,UINT16
,UINT16
);
300 HDDEDATA WINAPI
DdeCreateDataHandle(DWORD
,LPBYTE
,DWORD
,DWORD
,HSZ
,UINT
,UINT
);
301 HCONV WINAPI
DdeReconnect(HCONV
);
302 HSZ WINAPI
DdeCreateStringHandle16(DWORD
,LPCSTR
,INT16
);
303 HSZ WINAPI
DdeCreateStringHandleA(DWORD
,LPCSTR
,INT
);
304 HSZ WINAPI
DdeCreateStringHandleW(DWORD
,LPCWSTR
,INT
);
305 #define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
306 BOOL16 WINAPI
DdeFreeStringHandle16(DWORD
,HSZ
);
307 BOOL WINAPI
DdeFreeStringHandle(DWORD
,HSZ
);
308 BOOL16 WINAPI
DdeFreeDataHandle16(HDDEDATA
);
309 BOOL WINAPI
DdeFreeDataHandle(HDDEDATA
);
310 BOOL16 WINAPI
DdeKeepStringHandle16(DWORD
,HSZ
);
311 BOOL WINAPI
DdeKeepStringHandle(DWORD
,HSZ
);
312 HDDEDATA WINAPI
DdeClientTransaction16(LPVOID
,DWORD
,HCONV
,HSZ
,UINT16
,
313 UINT16
,DWORD
,LPDWORD
);
314 HDDEDATA WINAPI
DdeClientTransaction(LPBYTE
,DWORD
,HCONV
,HSZ
,UINT
,
316 BOOL16 WINAPI
DdeAbandonTransaction16(DWORD
,HCONV
,DWORD
);
317 BOOL16 WINAPI
DdePostAdvise16(DWORD
,HSZ
,HSZ
);
318 BOOL WINAPI
DdePostAdvise(DWORD
,HSZ
,HSZ
);
319 HDDEDATA WINAPI
DdeAddData16(HDDEDATA
,LPBYTE
,DWORD
,DWORD
);
320 DWORD WINAPI
DdeGetData(HDDEDATA
,LPBYTE
,DWORD
,DWORD
);
321 LPBYTE WINAPI
DdeAccessData16(HDDEDATA
,LPDWORD
);
322 LPBYTE WINAPI
DdeAccessData(HDDEDATA
,LPDWORD
);
323 BOOL16 WINAPI
DdeUnaccessData16(HDDEDATA
);
324 BOOL WINAPI
DdeUnaccessData(HDDEDATA
);
325 BOOL16 WINAPI
DdeEnableCallback16(DWORD
,HCONV
,UINT16
);
326 BOOL WINAPI
DdeEnableCallback(DWORD
,HCONV
,UINT
);
327 int WINAPI
DdeCmpStringHandles16(HSZ
,HSZ
);
328 int WINAPI
DdeCmpStringHandles(HSZ
,HSZ
);
330 HDDEDATA WINAPI
DdeNameService16(DWORD
,HSZ
,HSZ
,UINT16
);
331 HDDEDATA WINAPI
DdeNameService(DWORD
,HSZ
,HSZ
,UINT
);
332 UINT16 WINAPI
DdeGetLastError16(DWORD
);
333 UINT WINAPI
DdeGetLastError(DWORD
);
334 UINT16 WINAPI
DdeQueryConvInfo16(HCONV
,DWORD
,LPCONVINFO16
);
335 UINT WINAPI
DdeQueryConvInfo(HCONV
,DWORD
,LPCONVINFO
);
337 #endif /* __WINE__DDEML_H */