wined3d: Rename WINED3D_MAX_TEXTURES to WINED3D_MAX_FFP_TEXTURES.
[wine.git] / include / ddeml.h
blob41c43e6b321e6e848c9fa61c4805878f762cbb49
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 #ifndef WINUSERAPI
30 #if defined(_USER32_) || defined(WINE_UNIX_LIB)
31 #define WINUSERAPI
32 #else
33 #define WINUSERAPI DECLSPEC_IMPORT
34 #endif
35 #endif
37 /* Codepage Constants
40 #define CP_WINANSI 1004
41 #define CP_WINUNICODE 1200
43 /* DDE synchronisation constants
46 #define MSGF_DDEMGR 0x8001
48 #define QID_SYNC 0xFFFFFFFF
50 /* Type variation for MS deliberate departures from ANSI standards
53 #define EXPENTRY CALLBACK
55 #ifdef UNICODE
56 #if defined(_MSC_VER) || defined(__MINGW32__)
57 #define SZDDESYS_TOPIC L"System"
58 #define SZDDESYS_ITEM_TOPICS L"Topics"
59 #define SZDDESYS_ITEM_SYSITEMS L"SysItems"
60 #define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
61 #define SZDDESYS_ITEM_STATUS L"Status"
62 #define SZDDESYS_ITEM_FORMATS L"Formats"
63 #define SZDDESYS_ITEM_HELP L"Help"
64 #define SZDDE_ITEM_ITEMLIST L"TopicItemList"
65 #else /* _MSC_VER/__MINGW32__ */
66 static const WCHAR SZDDESYS_TOPIC[] = {'S','y','s','t','e','m',0};
67 static const WCHAR SZDDESYS_ITEM_TOPICS[] = {'T','o','p','i','c','s',0};
68 static const WCHAR SZDDESYS_ITEM_SYSITEMS[] = {'S','y','s','I','t','e','m','s',0};
69 static const WCHAR SZDDESYS_ITEM_RTNMSG[] = {'R','e','t','u','r','n','M','e','s','s','a','g','e',0};
70 static const WCHAR SZDDESYS_ITEM_STATUS[] = {'S','t','a','t','u','s',0};
71 static const WCHAR SZDDESYS_ITEM_FORMATS[] = {'F','o','r','m','a','t','s',0};
72 static const WCHAR SZDDESYS_ITEM_HELP[] = {'H','e','l','p',0};
73 static const WCHAR SZDDE_ITEM_ITEMLIST[] = {'T','o','p','i','c','I','t','e','m','L','i','s','t',0};
74 #endif
75 #else /* UNICODE */
76 #define SZDDESYS_TOPIC "System"
77 #define SZDDESYS_ITEM_TOPICS "Topics"
78 #define SZDDESYS_ITEM_SYSITEMS "SysItems"
79 #define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
80 #define SZDDESYS_ITEM_STATUS "Status"
81 #define SZDDESYS_ITEM_FORMATS "Formats"
82 #define SZDDESYS_ITEM_HELP "Help"
83 #define SZDDE_ITEM_ITEMLIST "TopicItemList"
84 #endif
86 /***************************************************
88 FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
90 ***************************************************/
92 #define XST_NULL 0
93 #define XST_INCOMPLETE 1
94 #define XST_CONNECTED 2
95 #define XST_INIT1 3
96 #define XST_INIT2 4
97 #define XST_REQSENT 5
98 #define XST_DATARCVD 6
99 #define XST_POKESENT 7
100 #define XST_POKEACKRCVD 8
101 #define XST_EXECSENT 9
102 #define XST_EXECACKRCVD 10
103 #define XST_ADVSENT 11
104 #define XST_UNADVSENT 12
105 #define XST_ADVACKRCVD 13
106 #define XST_UNADVACKRCVD 14
107 #define XST_ADVDATASENT 15
108 #define XST_ADVDATAACKRCVD 16
110 #define ST_CONNECTED 0x0001
111 #define ST_ADVISE 0x0002
112 #define ST_ISLOCAL 0x0004
113 #define ST_BLOCKED 0x0008
114 #define ST_CLIENT 0x0010
115 #define ST_TERMINATED 0x0020
116 #define ST_INLIST 0x0040
117 #define ST_BLOCKNEXT 0x0080
118 #define ST_ISSELF 0x0100
121 * DdeEnableCallback function codes
124 #define EC_ENABLEALL 0
125 #define EC_ENABLEONE ST_BLOCKNEXT
126 #define EC_DISABLE ST_BLOCKED
127 #define EC_QUERYWAITING 2
130 * Callback filter flags for use with standard apps.
133 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
134 #define CBF_FAIL_CONNECTIONS 0x00002000
135 #define CBF_FAIL_ADVISES 0x00004000
136 #define CBF_FAIL_EXECUTES 0x00008000
137 #define CBF_FAIL_POKES 0x00010000
138 #define CBF_FAIL_REQUESTS 0x00020000
139 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
141 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
142 #define CBF_SKIP_REGISTRATIONS 0x00080000
143 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
144 #define CBF_SKIP_DISCONNECTS 0x00200000
145 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
147 #define CBR_BLOCK ((HDDEDATA)-1)
150 * Application command flags
152 #define APPCMD_CLIENTONLY __MSABI_LONG(0x00000010)
153 #define APPCMD_FILTERINITS __MSABI_LONG(0x00000020)
154 #define APPCMD_MASK __MSABI_LONG(0x00000FF0)
157 * Application classification flags
160 #define APPCLASS_STANDARD __MSABI_LONG(0x00000000)
161 #define APPCLASS_MONITOR __MSABI_LONG(0x00000001)
162 #define APPCLASS_MASK __MSABI_LONG(0x0000000F)
165 * Callback filter flags for use with MONITOR apps - 0 implies no monitor
166 * callbacks.
168 #define MF_HSZ_INFO 0x01000000
169 #define MF_SENDMSGS 0x02000000
170 #define MF_POSTMSGS 0x04000000
171 #define MF_CALLBACKS 0x08000000
172 #define MF_ERRORS 0x10000000
173 #define MF_LINKS 0x20000000
174 #define MF_CONV 0x40000000
176 #define MF_MASK 0xFF000000
179 * DdeNameService service name flags
182 #define DNS_REGISTER 0x0001
183 #define DNS_UNREGISTER 0x0002
184 #define DNS_FILTERON 0x0004
185 #define DNS_FILTEROFF 0x0008
188 /****************************************************
190 End of Flags section
192 ****************************************************/
194 /****************************************************
196 Message Types Section
198 ****************************************************/
200 #define XTYPF_NOBLOCK 0x0002 /* CBR_NOBLOCK will not work */
201 #define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
202 #define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
204 #define XCLASS_MASK 0xFC00
205 #define XCLASS_BOOL 0x1000
206 #define XCLASS_DATA 0x2000
207 #define XCLASS_FLAGS 0x4000
208 #define XCLASS_NOTIFICATION 0x8000
210 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
211 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
212 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
213 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
214 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
215 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
216 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
217 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
218 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
219 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
220 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
221 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
222 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
223 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
224 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
225 #define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
227 #define XTYP_MASK 0x00F0
228 #define XTYP_SHIFT 4
230 #define TIMEOUT_ASYNC 0xFFFFFFFF
232 #define CADV_LATEACK 0xFFFF
234 /**************************************************
236 End of Message Types Section
238 ****************************************************/
240 /*****************************************************
242 DDE Codes for wStatus field
244 *****************************************************/
246 #define DDE_FACK 0x8000
247 #define DDE_FBUSY 0x4000
248 #define DDE_FDEFERUPD 0x4000
249 #define DDE_FACKREQ 0x8000
250 #define DDE_FRELEASE 0x2000
251 #define DDE_FREQUESTED 0x1000
252 #define DDE_FAPPSTATUS 0x00FF
253 #define DDE_FNOTPROCESSED 0x0000
255 #define DDE_FACKRESERVED (~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS))
256 #define DDE_FADVRESERVED (~(DDE_FACKREQ | DDE_FDEFERUPD))
257 #define DDE_FDATRESERVED (~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED))
258 #define DDE_FPOKRESERVED (~(DDE_FRELEASE))
260 /*****************************************************
262 End of wStatus codes
264 *****************************************************/
266 /****************************************************
268 Return Codes section again copied from SDK as must be same
270 *****************************************************/
272 #define DMLERR_NO_ERROR 0 /* must be 0 */
274 #define DMLERR_FIRST 0x4000
276 #define DMLERR_ADVACKTIMEOUT 0x4000
277 #define DMLERR_BUSY 0x4001
278 #define DMLERR_DATAACKTIMEOUT 0x4002
279 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
280 #define DMLERR_DLL_USAGE 0x4004
281 #define DMLERR_EXECACKTIMEOUT 0x4005
282 #define DMLERR_INVALIDPARAMETER 0x4006
283 #define DMLERR_LOW_MEMORY 0x4007
284 #define DMLERR_MEMORY_ERROR 0x4008
285 #define DMLERR_NOTPROCESSED 0x4009
286 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
287 #define DMLERR_POKEACKTIMEOUT 0x400b
288 #define DMLERR_POSTMSG_FAILED 0x400c
289 #define DMLERR_REENTRANCY 0x400d
290 #define DMLERR_SERVER_DIED 0x400e
291 #define DMLERR_SYS_ERROR 0x400f
292 #define DMLERR_UNADVACKTIMEOUT 0x4010
293 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
295 #define DMLERR_LAST 0x4011
297 #define HDATA_APPOWNED 0x0001
299 /*****************************************************
301 End of Return Codes and Microsoft section
303 ******************************************************/
307 DECLARE_HANDLE(HCONVLIST);
308 DECLARE_HANDLE(HCONV);
309 DECLARE_HANDLE(HSZ);
310 DECLARE_HANDLE(HDDEDATA);
314 /*******************************************************
316 API Entry Points
318 *******************************************************/
320 typedef HDDEDATA (CALLBACK *PFNCALLBACK)(UINT, UINT, HCONV, HSZ, HSZ,
321 HDDEDATA, ULONG_PTR, ULONG_PTR);
323 /***************************************************
325 Externally visible data structures
327 ***************************************************/
329 typedef struct tagHSZPAIR
331 HSZ hszSvc;
332 HSZ hszTopic;
333 } HSZPAIR, *PHSZPAIR;
335 typedef struct tagCONVCONTEXT
337 UINT cb;
338 UINT wFlags;
339 UINT wCountryID;
340 INT iCodePage;
341 DWORD dwLangID;
342 DWORD dwSecurity;
343 SECURITY_QUALITY_OF_SERVICE qos;
344 } CONVCONTEXT, *PCONVCONTEXT;
346 typedef struct tagCONVINFO
348 DWORD cb;
349 DWORD_PTR hUser;
350 HCONV hConvPartner;
351 HSZ hszSvcPartner;
352 HSZ hszServiceReq;
353 HSZ hszTopic;
354 HSZ hszItem;
355 UINT wFmt;
356 UINT wType;
357 UINT wStatus;
358 UINT wConvst;
359 UINT wLastError;
360 HCONVLIST hConvList;
361 CONVCONTEXT ConvCtxt;
362 HWND hwnd;
363 HWND hwndPartner;
364 } CONVINFO, *PCONVINFO;
366 /* Interface Definitions */
368 WINUSERAPI BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction);
369 WINUSERAPI LPBYTE WINAPI DdeAccessData(HDDEDATA,LPDWORD);
370 WINUSERAPI HDDEDATA WINAPI DdeAddData(HDDEDATA,LPBYTE,DWORD,DWORD);
371 WINUSERAPI HDDEDATA WINAPI DdeClientTransaction(LPBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,LPDWORD);
372 WINUSERAPI INT WINAPI DdeCmpStringHandles(HSZ,HSZ);
373 WINUSERAPI HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
374 WINUSERAPI HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
375 WINUSERAPI HDDEDATA WINAPI DdeCreateDataHandle(DWORD,LPBYTE,DWORD,DWORD,HSZ,UINT,UINT);
376 WINUSERAPI HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,INT);
377 WINUSERAPI HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,INT);
378 #define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
379 WINUSERAPI BOOL WINAPI DdeDisconnect(HCONV);
380 WINUSERAPI BOOL WINAPI DdeDisconnectList(HCONVLIST);
381 WINUSERAPI BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
382 WINUSERAPI BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
383 WINUSERAPI BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
384 WINUSERAPI DWORD WINAPI DdeGetData(HDDEDATA,LPBYTE,DWORD,DWORD);
385 WINUSERAPI UINT WINAPI DdeGetLastError(DWORD);
386 WINUSERAPI BOOL WINAPI DdeImpersonateClient(HCONV);
387 WINUSERAPI UINT WINAPI DdeInitializeA(LPDWORD,PFNCALLBACK,DWORD,DWORD);
388 WINUSERAPI UINT WINAPI DdeInitializeW(LPDWORD,PFNCALLBACK,DWORD,DWORD);
389 #define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
390 WINUSERAPI BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
391 WINUSERAPI HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
392 WINUSERAPI BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
393 WINUSERAPI UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,PCONVINFO);
394 WINUSERAPI HCONV WINAPI DdeQueryNextServer(HCONVLIST, HCONV);
395 WINUSERAPI DWORD WINAPI DdeQueryStringA(DWORD, HSZ, LPSTR, DWORD, INT);
396 WINUSERAPI DWORD WINAPI DdeQueryStringW(DWORD, HSZ, LPWSTR, DWORD, INT);
397 #define DdeQueryString WINELIB_NAME_AW(DdeQueryString)
398 WINUSERAPI HCONV WINAPI DdeReconnect(HCONV);
399 WINUSERAPI BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
400 WINUSERAPI BOOL WINAPI DdeUnaccessData(HDDEDATA);
401 WINUSERAPI BOOL WINAPI DdeUninitialize(DWORD);
403 #ifdef __cplusplus
404 } /* extern "C" */
405 #endif /* defined(__cplusplus) */
407 #endif /* __WINE_DDEML_H */