2 * DDEML library definitions
4 * Copyright 1997 Alexandre Julliard
5 * Copyright 1997 Len White
15 #endif /* defined(__cplusplus) */
20 #define CP_WINANSI 1004
21 #define CP_WINUNICODE 1200
23 /* DDE synchronisation constants
26 #define MSGF_DDEMGR 0x8001
28 #define QID_SYNC 0xFFFFFFFF
30 /* Type variation for MS deliberate departures from ANSI standards
33 #define EXPENTRY CALLBACK
35 #define SZDDESYS_TOPIC TEXT("System")
36 #define SZDDESYS_ITEM_TOPICS TEXT("Topics")
37 #define SZDDESYS_ITEM_SYSITEMS TEXT("SysItems")
38 #define SZDDESYS_ITEM_RTNMSG TEXT("ReturnMessage")
39 #define SZDDESYS_ITEM_STATUS TEXT("Status")
40 #define SZDDESYS_ITEM_FORMATS TEXT("Formats")
41 #define SZDDESYS_ITEM_HELP TEXT("Help")
42 #define SZDDE_ITEM_ITEMLIST TEXT("TopicItemList")
44 /***************************************************
46 FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
48 ***************************************************/
51 #define XST_INCOMPLETE 1
52 #define XST_CONNECTED 2
56 #define XST_DATARCVD 6
57 #define XST_POKESENT 7
58 #define XST_POKEACKRCVD 8
59 #define XST_EXECSENT 9
60 #define XST_EXECACKRCVD 10
61 #define XST_ADVSENT 11
62 #define XST_UNADVSENT 12
63 #define XST_ADVACKRCVD 13
64 #define XST_UNADVACKRCVD 14
65 #define XST_ADVDATASENT 15
66 #define XST_ADVDATAACKRCVD 16
68 #define ST_CONNECTED 0x0001
69 #define ST_ADVISE 0x0002
70 #define ST_ISLOCAL 0x0004
71 #define ST_BLOCKED 0x0008
72 #define ST_CLIENT 0x0010
73 #define ST_TERMINATED 0x0020
74 #define ST_INLIST 0x0040
75 #define ST_BLOCKNEXT 0x0080
76 #define ST_ISSELF 0x0100
79 * Callback filter flags for use with standard apps.
82 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
83 #define CBF_FAIL_CONNECTIONS 0x00002000
84 #define CBF_FAIL_ADVISES 0x00004000
85 #define CBF_FAIL_EXECUTES 0x00008000
86 #define CBF_FAIL_POKES 0x00010000
87 #define CBF_FAIL_REQUESTS 0x00020000
88 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
90 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
91 #define CBF_SKIP_REGISTRATIONS 0x00080000
92 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
93 #define CBF_SKIP_DISCONNECTS 0x00200000
94 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
96 #define CBR_BLOCK 0xFFFFFFFFL
99 * Application command flags
101 #define APPCMD_CLIENTONLY 0x00000010L
102 #define APPCMD_FILTERINITS 0x00000020L
103 #define APPCMD_MASK 0x00000FF0L
106 * Application classification flags
109 #define APPCLASS_STANDARD 0x00000000L
110 #define APPCLASS_MONITOR 0x00000001L
111 #define APPCLASS_MASK 0x0000000FL
114 * Callback filter flags for use with MONITOR apps - 0 implies no monitor
117 #define MF_HSZ_INFO 0x01000000
118 #define MF_SENDMSGS 0x02000000
119 #define MF_POSTMSGS 0x04000000
120 #define MF_CALLBACKS 0x08000000
121 #define MF_ERRORS 0x10000000
122 #define MF_LINKS 0x20000000
123 #define MF_CONV 0x40000000
125 #define MF_MASK 0xFF000000
128 * DdeNameService service name flags
131 #define DNS_REGISTER 0x0001
132 #define DNS_UNREGISTER 0x0002
133 #define DNS_FILTERON 0x0004
134 #define DNS_FILTEROFF 0x0008
137 /****************************************************
141 ****************************************************/
143 /****************************************************
145 Message Types Section
147 ****************************************************/
149 #define XTYPF_NOBLOCK 0x0002 /* CBR_NOBLOCK will not work */
150 #define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
151 #define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
153 #define XCLASS_MASK 0xFC00
154 #define XCLASS_BOOL 0x1000
155 #define XCLASS_DATA 0x2000
156 #define XCLASS_FLAGS 0x4000
157 #define XCLASS_NOTIFICATION 0x8000
159 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
160 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
161 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
162 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
163 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
164 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
165 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
166 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
167 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
168 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
169 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
170 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
171 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
172 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
173 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
175 #define XTYP_MASK 0x00F0
178 #define TIMEOUT_ASYNC 0xFFFFFFFF
180 #define CADV_LATEACK 0xFFFF
182 /**************************************************
184 End of Message Types Section
186 ****************************************************/
188 /*****************************************************
190 DDE Codes for wStatus field
192 *****************************************************/
194 #define DDE_FACK 0x8000
195 #define DDE_FBUSY 0x4000
196 #define DDE_FDEFERUPD 0x4000
197 #define DDE_FACKREQ 0x8000
198 #define DDE_FRELEASE 0x2000
199 #define DDE_FREQUESTED 0x1000
200 #define DDE_FAPPSTATUS 0x00FF
201 #define DDE_FNOTPROCESSED 0x0000
203 #define DDE_FACKRESERVED (~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS))
204 #define DDE_FADVRESERVED (~(DDE_FACKREQ | DDE_FDEFERUPD))
205 #define DDE_FDATRESERVED (~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED))
206 #define DDE_FPOKRESERVED (~(DDE_FRELEASE))
208 /*****************************************************
212 *****************************************************/
214 /****************************************************
216 Return Codes section again copied from SDK as must be same
218 *****************************************************/
220 #define DMLERR_NO_ERROR 0 /* must be 0 */
222 #define DMLERR_FIRST 0x4000
224 #define DMLERR_ADVACKTIMEOUT 0x4000
225 #define DMLERR_BUSY 0x4001
226 #define DMLERR_DATAACKTIMEOUT 0x4002
227 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
228 #define DMLERR_DLL_USAGE 0x4004
229 #define DMLERR_EXECACKTIMEOUT 0x4005
230 #define DMLERR_INVALIDPARAMETER 0x4006
231 #define DMLERR_LOW_MEMORY 0x4007
232 #define DMLERR_MEMORY_ERROR 0x4008
233 #define DMLERR_NOTPROCESSED 0x4009
234 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
235 #define DMLERR_POKEACKTIMEOUT 0x400b
236 #define DMLERR_POSTMSG_FAILED 0x400c
237 #define DMLERR_REENTRANCY 0x400d
238 #define DMLERR_SERVER_DIED 0x400e
239 #define DMLERR_SYS_ERROR 0x400f
240 #define DMLERR_UNADVACKTIMEOUT 0x4010
241 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
243 #define DMLERR_LAST 0x4011
245 #define HDATA_APPOWNED 0x0001
247 /*****************************************************
249 End of Return Codes and Microsoft section
251 ******************************************************/
255 DECLARE_HANDLE(HCONVLIST);
256 DECLARE_HANDLE(HCONV);
258 DECLARE_HANDLE(HDDEDATA);
262 /*******************************************************
266 *******************************************************/
268 typedef HDDEDATA CALLBACK (*PFNCALLBACK)(UINT, UINT, HCONV, HSZ, HSZ,
269 HDDEDATA, DWORD, DWORD);
271 /***************************************************
273 Externally visible data structures
275 ***************************************************/
277 typedef struct tagHSZPAIR
281 } HSZPAIR, *PHSZPAIR, *LPHSZPAIR;
283 typedef struct tagCONVCONTEXT
291 } CONVCONTEXT, *LPCONVCONTEXT;
293 typedef struct tagCONVINFO
308 CONVCONTEXT ConvCtxt;
311 } CONVINFO, *LPCONVINFO;
313 /* Interface Definitions */
316 UINT WINAPI DdeInitializeA(LPDWORD,PFNCALLBACK,DWORD,DWORD);
317 UINT WINAPI DdeInitializeW(LPDWORD,PFNCALLBACK,DWORD,DWORD);
318 #define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
319 BOOL WINAPI DdeUninitialize(DWORD);
320 HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,LPCONVCONTEXT);
321 HCONV WINAPI DdeQueryNextServer(HCONVLIST, HCONV);
322 DWORD WINAPI DdeQueryStringA(DWORD, HSZ, LPSTR, DWORD, INT);
323 DWORD WINAPI DdeQueryStringW(DWORD, HSZ, LPWSTR, DWORD, INT);
324 #define DdeQueryString WINELIB_NAME_AW(DdeQueryString)
325 BOOL WINAPI DdeDisconnectList(HCONVLIST);
326 HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,LPCONVCONTEXT);
327 BOOL WINAPI DdeDisconnect(HCONV);
328 HDDEDATA WINAPI DdeCreateDataHandle(DWORD,LPBYTE,DWORD,DWORD,HSZ,UINT,UINT);
329 HCONV WINAPI DdeReconnect(HCONV);
330 HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,INT);
331 HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,INT);
332 #define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
333 BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
334 BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
335 BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
336 HDDEDATA WINAPI DdeClientTransaction(LPBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,LPDWORD);
337 BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction);
338 BOOL WINAPI DdeImpersonateClient(HCONV);
339 BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
340 HDDEDATA WINAPI DdeAddData(HDDEDATA,LPBYTE,DWORD,DWORD);
341 DWORD WINAPI DdeGetData(HDDEDATA,LPBYTE,DWORD,DWORD);
342 LPBYTE WINAPI DdeAccessData(HDDEDATA,LPDWORD);
343 BOOL WINAPI DdeUnaccessData(HDDEDATA);
344 BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
345 INT WINAPI DdeCmpStringHandles(HSZ,HSZ);
346 BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
348 HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
349 UINT WINAPI DdeGetLastError(DWORD);
350 UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,LPCONVINFO);
354 #endif /* defined(__cplusplus) */
356 #endif /* __WINE_DDEML_H */