windowscodecs: Implement IWICDdsEncoder_CreateNewFrame.
[wine.git] / include / ddeml.h
blobb8d7f00631a766bc4468ef68eae87c0d94379cc9
1 /*
2 * DDEML library definitions
4 * Copyright 1997 Alexandre Julliard
5 * Copyright 1997 Len White
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __WINE_DDEML_H
23 #define __WINE_DDEML_H
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* defined(__cplusplus) */
29 #ifdef _USER32_
30 #define WINUSERAPI
31 #else
32 #define WINUSERAPI DECLSPEC_HIDDEN
33 #endif
35 /* Codepage Constants
38 #define CP_WINANSI 1004
39 #define CP_WINUNICODE 1200
41 /* DDE synchronisation constants
44 #define MSGF_DDEMGR 0x8001
46 #define QID_SYNC 0xFFFFFFFF
48 /* Type variation for MS deliberate departures from ANSI standards
51 #define EXPENTRY CALLBACK
53 #ifdef UNICODE
54 #if defined(_MSC_VER) || defined(__MINGW32__)
55 #define SZDDESYS_TOPIC L"System"
56 #define SZDDESYS_ITEM_TOPICS L"Topics"
57 #define SZDDESYS_ITEM_SYSITEMS L"SysItems"
58 #define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
59 #define SZDDESYS_ITEM_STATUS L"Status"
60 #define SZDDESYS_ITEM_FORMATS L"Formats"
61 #define SZDDESYS_ITEM_HELP L"Help"
62 #define SZDDE_ITEM_ITEMLIST L"TopicItemList"
63 #else /* _MSC_VER/__MINGW32__ */
64 static const WCHAR SZDDESYS_TOPIC[] = {'S','y','s','t','e','m',0};
65 static const WCHAR SZDDESYS_ITEM_TOPICS[] = {'T','o','p','i','c','s',0};
66 static const WCHAR SZDDESYS_ITEM_SYSITEMS[] = {'S','y','s','I','t','e','m','s',0};
67 static const WCHAR SZDDESYS_ITEM_RTNMSG[] = {'R','e','t','u','r','n','M','e','s','s','a','g','e',0};
68 static const WCHAR SZDDESYS_ITEM_STATUS[] = {'S','t','a','t','u','s',0};
69 static const WCHAR SZDDESYS_ITEM_FORMATS[] = {'F','o','r','m','a','t','s',0};
70 static const WCHAR SZDDESYS_ITEM_HELP[] = {'H','e','l','p',0};
71 static const WCHAR SZDDE_ITEM_ITEMLIST[] = {'T','o','p','i','c','I','t','e','m','L','i','s','t',0};
72 #endif
73 #else /* UNICODE */
74 #define SZDDESYS_TOPIC "System"
75 #define SZDDESYS_ITEM_TOPICS "Topics"
76 #define SZDDESYS_ITEM_SYSITEMS "SysItems"
77 #define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
78 #define SZDDESYS_ITEM_STATUS "Status"
79 #define SZDDESYS_ITEM_FORMATS "Formats"
80 #define SZDDESYS_ITEM_HELP "Help"
81 #define SZDDE_ITEM_ITEMLIST "TopicItemList"
82 #endif
84 /***************************************************
86 FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
88 ***************************************************/
90 #define XST_NULL 0
91 #define XST_INCOMPLETE 1
92 #define XST_CONNECTED 2
93 #define XST_INIT1 3
94 #define XST_INIT2 4
95 #define XST_REQSENT 5
96 #define XST_DATARCVD 6
97 #define XST_POKESENT 7
98 #define XST_POKEACKRCVD 8
99 #define XST_EXECSENT 9
100 #define XST_EXECACKRCVD 10
101 #define XST_ADVSENT 11
102 #define XST_UNADVSENT 12
103 #define XST_ADVACKRCVD 13
104 #define XST_UNADVACKRCVD 14
105 #define XST_ADVDATASENT 15
106 #define XST_ADVDATAACKRCVD 16
108 #define ST_CONNECTED 0x0001
109 #define ST_ADVISE 0x0002
110 #define ST_ISLOCAL 0x0004
111 #define ST_BLOCKED 0x0008
112 #define ST_CLIENT 0x0010
113 #define ST_TERMINATED 0x0020
114 #define ST_INLIST 0x0040
115 #define ST_BLOCKNEXT 0x0080
116 #define ST_ISSELF 0x0100
119 * DdeEnableCallback function codes
122 #define EC_ENABLEALL 0
123 #define EC_ENABLEONE ST_BLOCKNEXT
124 #define EC_DISABLE ST_BLOCKED
125 #define EC_QUERYWAITING 2
128 * Callback filter flags for use with standard apps.
131 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
132 #define CBF_FAIL_CONNECTIONS 0x00002000
133 #define CBF_FAIL_ADVISES 0x00004000
134 #define CBF_FAIL_EXECUTES 0x00008000
135 #define CBF_FAIL_POKES 0x00010000
136 #define CBF_FAIL_REQUESTS 0x00020000
137 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
139 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
140 #define CBF_SKIP_REGISTRATIONS 0x00080000
141 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
142 #define CBF_SKIP_DISCONNECTS 0x00200000
143 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
145 #define CBR_BLOCK ((HDDEDATA)-1)
148 * Application command flags
150 #define APPCMD_CLIENTONLY __MSABI_LONG(0x00000010)
151 #define APPCMD_FILTERINITS __MSABI_LONG(0x00000020)
152 #define APPCMD_MASK __MSABI_LONG(0x00000FF0)
155 * Application classification flags
158 #define APPCLASS_STANDARD __MSABI_LONG(0x00000000)
159 #define APPCLASS_MONITOR __MSABI_LONG(0x00000001)
160 #define APPCLASS_MASK __MSABI_LONG(0x0000000F)
163 * Callback filter flags for use with MONITOR apps - 0 implies no monitor
164 * callbacks.
166 #define MF_HSZ_INFO 0x01000000
167 #define MF_SENDMSGS 0x02000000
168 #define MF_POSTMSGS 0x04000000
169 #define MF_CALLBACKS 0x08000000
170 #define MF_ERRORS 0x10000000
171 #define MF_LINKS 0x20000000
172 #define MF_CONV 0x40000000
174 #define MF_MASK 0xFF000000
177 * DdeNameService service name flags
180 #define DNS_REGISTER 0x0001
181 #define DNS_UNREGISTER 0x0002
182 #define DNS_FILTERON 0x0004
183 #define DNS_FILTEROFF 0x0008
186 /****************************************************
188 End of Flags section
190 ****************************************************/
192 /****************************************************
194 Message Types Section
196 ****************************************************/
198 #define XTYPF_NOBLOCK 0x0002 /* CBR_NOBLOCK will not work */
199 #define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
200 #define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
202 #define XCLASS_MASK 0xFC00
203 #define XCLASS_BOOL 0x1000
204 #define XCLASS_DATA 0x2000
205 #define XCLASS_FLAGS 0x4000
206 #define XCLASS_NOTIFICATION 0x8000
208 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
209 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
210 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
211 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
212 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
213 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
214 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
215 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
216 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
217 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
218 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
219 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
220 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
221 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
222 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
223 #define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
225 #define XTYP_MASK 0x00F0
226 #define XTYP_SHIFT 4
228 #define TIMEOUT_ASYNC 0xFFFFFFFF
230 #define CADV_LATEACK 0xFFFF
232 /**************************************************
234 End of Message Types Section
236 ****************************************************/
238 /*****************************************************
240 DDE Codes for wStatus field
242 *****************************************************/
244 #define DDE_FACK 0x8000
245 #define DDE_FBUSY 0x4000
246 #define DDE_FDEFERUPD 0x4000
247 #define DDE_FACKREQ 0x8000
248 #define DDE_FRELEASE 0x2000
249 #define DDE_FREQUESTED 0x1000
250 #define DDE_FAPPSTATUS 0x00FF
251 #define DDE_FNOTPROCESSED 0x0000
253 #define DDE_FACKRESERVED (~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS))
254 #define DDE_FADVRESERVED (~(DDE_FACKREQ | DDE_FDEFERUPD))
255 #define DDE_FDATRESERVED (~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED))
256 #define DDE_FPOKRESERVED (~(DDE_FRELEASE))
258 /*****************************************************
260 End of wStatus codes
262 *****************************************************/
264 /****************************************************
266 Return Codes section again copied from SDK as must be same
268 *****************************************************/
270 #define DMLERR_NO_ERROR 0 /* must be 0 */
272 #define DMLERR_FIRST 0x4000
274 #define DMLERR_ADVACKTIMEOUT 0x4000
275 #define DMLERR_BUSY 0x4001
276 #define DMLERR_DATAACKTIMEOUT 0x4002
277 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
278 #define DMLERR_DLL_USAGE 0x4004
279 #define DMLERR_EXECACKTIMEOUT 0x4005
280 #define DMLERR_INVALIDPARAMETER 0x4006
281 #define DMLERR_LOW_MEMORY 0x4007
282 #define DMLERR_MEMORY_ERROR 0x4008
283 #define DMLERR_NOTPROCESSED 0x4009
284 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
285 #define DMLERR_POKEACKTIMEOUT 0x400b
286 #define DMLERR_POSTMSG_FAILED 0x400c
287 #define DMLERR_REENTRANCY 0x400d
288 #define DMLERR_SERVER_DIED 0x400e
289 #define DMLERR_SYS_ERROR 0x400f
290 #define DMLERR_UNADVACKTIMEOUT 0x4010
291 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
293 #define DMLERR_LAST 0x4011
295 #define HDATA_APPOWNED 0x0001
297 /*****************************************************
299 End of Return Codes and Microsoft section
301 ******************************************************/
305 DECLARE_HANDLE(HCONVLIST);
306 DECLARE_HANDLE(HCONV);
307 DECLARE_HANDLE(HSZ);
308 DECLARE_HANDLE(HDDEDATA);
312 /*******************************************************
314 API Entry Points
316 *******************************************************/
318 typedef HDDEDATA (CALLBACK *PFNCALLBACK)(UINT, UINT, HCONV, HSZ, HSZ,
319 HDDEDATA, ULONG_PTR, ULONG_PTR);
321 /***************************************************
323 Externally visible data structures
325 ***************************************************/
327 typedef struct tagHSZPAIR
329 HSZ hszSvc;
330 HSZ hszTopic;
331 } HSZPAIR, *PHSZPAIR;
333 typedef struct tagCONVCONTEXT
335 UINT cb;
336 UINT wFlags;
337 UINT wCountryID;
338 INT iCodePage;
339 DWORD dwLangID;
340 DWORD dwSecurity;
341 SECURITY_QUALITY_OF_SERVICE qos;
342 } CONVCONTEXT, *PCONVCONTEXT;
344 typedef struct tagCONVINFO
346 DWORD cb;
347 DWORD_PTR hUser;
348 HCONV hConvPartner;
349 HSZ hszSvcPartner;
350 HSZ hszServiceReq;
351 HSZ hszTopic;
352 HSZ hszItem;
353 UINT wFmt;
354 UINT wType;
355 UINT wStatus;
356 UINT wConvst;
357 UINT wLastError;
358 HCONVLIST hConvList;
359 CONVCONTEXT ConvCtxt;
360 HWND hwnd;
361 HWND hwndPartner;
362 } CONVINFO, *PCONVINFO;
364 /* Interface Definitions */
366 WINUSERAPI BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction);
367 WINUSERAPI LPBYTE WINAPI DdeAccessData(HDDEDATA,LPDWORD);
368 WINUSERAPI HDDEDATA WINAPI DdeAddData(HDDEDATA,LPBYTE,DWORD,DWORD);
369 WINUSERAPI HDDEDATA WINAPI DdeClientTransaction(LPBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,LPDWORD);
370 WINUSERAPI INT WINAPI DdeCmpStringHandles(HSZ,HSZ);
371 WINUSERAPI HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
372 WINUSERAPI HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
373 WINUSERAPI HDDEDATA WINAPI DdeCreateDataHandle(DWORD,LPBYTE,DWORD,DWORD,HSZ,UINT,UINT);
374 WINUSERAPI HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,INT);
375 WINUSERAPI HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,INT);
376 #define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
377 WINUSERAPI BOOL WINAPI DdeDisconnect(HCONV);
378 WINUSERAPI BOOL WINAPI DdeDisconnectList(HCONVLIST);
379 WINUSERAPI BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
380 WINUSERAPI BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
381 WINUSERAPI BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
382 WINUSERAPI DWORD WINAPI DdeGetData(HDDEDATA,LPBYTE,DWORD,DWORD);
383 WINUSERAPI UINT WINAPI DdeGetLastError(DWORD);
384 WINUSERAPI BOOL WINAPI DdeImpersonateClient(HCONV);
385 WINUSERAPI UINT WINAPI DdeInitializeA(LPDWORD,PFNCALLBACK,DWORD,DWORD);
386 WINUSERAPI UINT WINAPI DdeInitializeW(LPDWORD,PFNCALLBACK,DWORD,DWORD);
387 #define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
388 WINUSERAPI BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
389 WINUSERAPI HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
390 WINUSERAPI BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
391 WINUSERAPI UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,PCONVINFO);
392 WINUSERAPI HCONV WINAPI DdeQueryNextServer(HCONVLIST, HCONV);
393 WINUSERAPI DWORD WINAPI DdeQueryStringA(DWORD, HSZ, LPSTR, DWORD, INT);
394 WINUSERAPI DWORD WINAPI DdeQueryStringW(DWORD, HSZ, LPWSTR, DWORD, INT);
395 #define DdeQueryString WINELIB_NAME_AW(DdeQueryString)
396 WINUSERAPI HCONV WINAPI DdeReconnect(HCONV);
397 WINUSERAPI BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
398 WINUSERAPI BOOL WINAPI DdeUnaccessData(HDDEDATA);
399 WINUSERAPI BOOL WINAPI DdeUninitialize(DWORD);
401 #ifdef __cplusplus
402 } /* extern "C" */
403 #endif /* defined(__cplusplus) */
405 #endif /* __WINE_DDEML_H */