IDirectSoundBuffer.GetCaps should fail if caps.dwSize is not set.
[wine/multimedia.git] / include / ddeml.h
blob5b7a5765401a34abed46ab46581a131412367ad4
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef __WINE_DDEML_H
23 #define __WINE_DDEML_H
25 #include "windef.h"
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* defined(__cplusplus) */
31 /* Codepage Constants
34 #define CP_WINANSI 1004
35 #define CP_WINUNICODE 1200
37 /* DDE synchronisation constants
40 #define MSGF_DDEMGR 0x8001
42 #define QID_SYNC 0xFFFFFFFF
44 /* Type variation for MS deliberate departures from ANSI standards
47 #define EXPENTRY CALLBACK
49 #define SZDDESYS_TOPIC TEXT("System")
50 #define SZDDESYS_ITEM_TOPICS TEXT("Topics")
51 #define SZDDESYS_ITEM_SYSITEMS TEXT("SysItems")
52 #define SZDDESYS_ITEM_RTNMSG TEXT("ReturnMessage")
53 #define SZDDESYS_ITEM_STATUS TEXT("Status")
54 #define SZDDESYS_ITEM_FORMATS TEXT("Formats")
55 #define SZDDESYS_ITEM_HELP TEXT("Help")
56 #define SZDDE_ITEM_ITEMLIST TEXT("TopicItemList")
58 /***************************************************
60 FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
62 ***************************************************/
64 #define XST_NULL 0
65 #define XST_INCOMPLETE 1
66 #define XST_CONNECTED 2
67 #define XST_INIT1 3
68 #define XST_INIT2 4
69 #define XST_REQSENT 5
70 #define XST_DATARCVD 6
71 #define XST_POKESENT 7
72 #define XST_POKEACKRCVD 8
73 #define XST_EXECSENT 9
74 #define XST_EXECACKRCVD 10
75 #define XST_ADVSENT 11
76 #define XST_UNADVSENT 12
77 #define XST_ADVACKRCVD 13
78 #define XST_UNADVACKRCVD 14
79 #define XST_ADVDATASENT 15
80 #define XST_ADVDATAACKRCVD 16
82 #define ST_CONNECTED 0x0001
83 #define ST_ADVISE 0x0002
84 #define ST_ISLOCAL 0x0004
85 #define ST_BLOCKED 0x0008
86 #define ST_CLIENT 0x0010
87 #define ST_TERMINATED 0x0020
88 #define ST_INLIST 0x0040
89 #define ST_BLOCKNEXT 0x0080
90 #define ST_ISSELF 0x0100
93 * Callback filter flags for use with standard apps.
96 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
97 #define CBF_FAIL_CONNECTIONS 0x00002000
98 #define CBF_FAIL_ADVISES 0x00004000
99 #define CBF_FAIL_EXECUTES 0x00008000
100 #define CBF_FAIL_POKES 0x00010000
101 #define CBF_FAIL_REQUESTS 0x00020000
102 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
104 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
105 #define CBF_SKIP_REGISTRATIONS 0x00080000
106 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
107 #define CBF_SKIP_DISCONNECTS 0x00200000
108 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
110 #define CBR_BLOCK 0xFFFFFFFFL
113 * Application command flags
115 #define APPCMD_CLIENTONLY 0x00000010L
116 #define APPCMD_FILTERINITS 0x00000020L
117 #define APPCMD_MASK 0x00000FF0L
120 * Application classification flags
123 #define APPCLASS_STANDARD 0x00000000L
124 #define APPCLASS_MONITOR 0x00000001L
125 #define APPCLASS_MASK 0x0000000FL
128 * Callback filter flags for use with MONITOR apps - 0 implies no monitor
129 * callbacks.
131 #define MF_HSZ_INFO 0x01000000
132 #define MF_SENDMSGS 0x02000000
133 #define MF_POSTMSGS 0x04000000
134 #define MF_CALLBACKS 0x08000000
135 #define MF_ERRORS 0x10000000
136 #define MF_LINKS 0x20000000
137 #define MF_CONV 0x40000000
139 #define MF_MASK 0xFF000000
142 * DdeNameService service name flags
145 #define DNS_REGISTER 0x0001
146 #define DNS_UNREGISTER 0x0002
147 #define DNS_FILTERON 0x0004
148 #define DNS_FILTEROFF 0x0008
151 /****************************************************
153 End of Flags section
155 ****************************************************/
157 /****************************************************
159 Message Types Section
161 ****************************************************/
163 #define XTYPF_NOBLOCK 0x0002 /* CBR_NOBLOCK will not work */
164 #define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */
165 #define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */
167 #define XCLASS_MASK 0xFC00
168 #define XCLASS_BOOL 0x1000
169 #define XCLASS_DATA 0x2000
170 #define XCLASS_FLAGS 0x4000
171 #define XCLASS_NOTIFICATION 0x8000
173 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
174 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
175 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
176 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
177 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
178 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
179 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
180 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
181 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION )
182 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
183 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
184 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA )
185 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
186 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK )
187 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
189 #define XTYP_MASK 0x00F0
190 #define XTYP_SHIFT 4
192 #define TIMEOUT_ASYNC 0xFFFFFFFF
194 #define CADV_LATEACK 0xFFFF
196 /**************************************************
198 End of Message Types Section
200 ****************************************************/
202 /*****************************************************
204 DDE Codes for wStatus field
206 *****************************************************/
208 #define DDE_FACK 0x8000
209 #define DDE_FBUSY 0x4000
210 #define DDE_FDEFERUPD 0x4000
211 #define DDE_FACKREQ 0x8000
212 #define DDE_FRELEASE 0x2000
213 #define DDE_FREQUESTED 0x1000
214 #define DDE_FAPPSTATUS 0x00FF
215 #define DDE_FNOTPROCESSED 0x0000
217 #define DDE_FACKRESERVED (~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS))
218 #define DDE_FADVRESERVED (~(DDE_FACKREQ | DDE_FDEFERUPD))
219 #define DDE_FDATRESERVED (~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED))
220 #define DDE_FPOKRESERVED (~(DDE_FRELEASE))
222 /*****************************************************
224 End of wStatus codes
226 *****************************************************/
228 /****************************************************
230 Return Codes section again copied from SDK as must be same
232 *****************************************************/
234 #define DMLERR_NO_ERROR 0 /* must be 0 */
236 #define DMLERR_FIRST 0x4000
238 #define DMLERR_ADVACKTIMEOUT 0x4000
239 #define DMLERR_BUSY 0x4001
240 #define DMLERR_DATAACKTIMEOUT 0x4002
241 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
242 #define DMLERR_DLL_USAGE 0x4004
243 #define DMLERR_EXECACKTIMEOUT 0x4005
244 #define DMLERR_INVALIDPARAMETER 0x4006
245 #define DMLERR_LOW_MEMORY 0x4007
246 #define DMLERR_MEMORY_ERROR 0x4008
247 #define DMLERR_NOTPROCESSED 0x4009
248 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
249 #define DMLERR_POKEACKTIMEOUT 0x400b
250 #define DMLERR_POSTMSG_FAILED 0x400c
251 #define DMLERR_REENTRANCY 0x400d
252 #define DMLERR_SERVER_DIED 0x400e
253 #define DMLERR_SYS_ERROR 0x400f
254 #define DMLERR_UNADVACKTIMEOUT 0x4010
255 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
257 #define DMLERR_LAST 0x4011
259 #define HDATA_APPOWNED 0x0001
261 /*****************************************************
263 End of Return Codes and Microsoft section
265 ******************************************************/
269 DECLARE_HANDLE(HCONVLIST);
270 DECLARE_HANDLE(HCONV);
271 DECLARE_HANDLE(HSZ);
272 DECLARE_HANDLE(HDDEDATA);
276 /*******************************************************
278 API Entry Points
280 *******************************************************/
282 typedef HDDEDATA (CALLBACK *PFNCALLBACK)(UINT, UINT, HCONV, HSZ, HSZ,
283 HDDEDATA, DWORD, DWORD);
285 /***************************************************
287 Externally visible data structures
289 ***************************************************/
291 typedef struct tagHSZPAIR
293 HSZ hszSvc;
294 HSZ hszTopic;
295 } HSZPAIR, *PHSZPAIR, *LPHSZPAIR;
297 typedef struct tagCONVCONTEXT
299 UINT cb;
300 UINT wFlags;
301 UINT wCountryID;
302 INT iCodePage;
303 DWORD dwLangID;
304 DWORD dwSecurity;
305 } CONVCONTEXT, *LPCONVCONTEXT;
307 typedef struct tagCONVINFO
309 DWORD cb;
310 DWORD hUser;
311 HCONV hConvPartner;
312 HSZ hszSvcPartner;
313 HSZ hszServiceReq;
314 HSZ hszTopic;
315 HSZ hszItem;
316 UINT wFmt;
317 UINT wType;
318 UINT wStatus;
319 UINT wConvst;
320 UINT wLastError;
321 HCONVLIST hConvList;
322 CONVCONTEXT ConvCtxt;
323 HWND hwnd;
324 HWND hwndPartner;
325 } CONVINFO, *LPCONVINFO;
327 /* Interface Definitions */
330 UINT WINAPI DdeInitializeA(LPDWORD,PFNCALLBACK,DWORD,DWORD);
331 UINT WINAPI DdeInitializeW(LPDWORD,PFNCALLBACK,DWORD,DWORD);
332 #define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
333 BOOL WINAPI DdeUninitialize(DWORD);
334 HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,LPCONVCONTEXT);
335 HCONV WINAPI DdeQueryNextServer(HCONVLIST, HCONV);
336 DWORD WINAPI DdeQueryStringA(DWORD, HSZ, LPSTR, DWORD, INT);
337 DWORD WINAPI DdeQueryStringW(DWORD, HSZ, LPWSTR, DWORD, INT);
338 #define DdeQueryString WINELIB_NAME_AW(DdeQueryString)
339 BOOL WINAPI DdeDisconnectList(HCONVLIST);
340 HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,LPCONVCONTEXT);
341 BOOL WINAPI DdeDisconnect(HCONV);
342 HDDEDATA WINAPI DdeCreateDataHandle(DWORD,LPBYTE,DWORD,DWORD,HSZ,UINT,UINT);
343 HCONV WINAPI DdeReconnect(HCONV);
344 HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,INT);
345 HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,INT);
346 #define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
347 BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
348 BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
349 BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
350 HDDEDATA WINAPI DdeClientTransaction(LPBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,LPDWORD);
351 BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction);
352 BOOL WINAPI DdeImpersonateClient(HCONV);
353 BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
354 HDDEDATA WINAPI DdeAddData(HDDEDATA,LPBYTE,DWORD,DWORD);
355 DWORD WINAPI DdeGetData(HDDEDATA,LPBYTE,DWORD,DWORD);
356 LPBYTE WINAPI DdeAccessData(HDDEDATA,LPDWORD);
357 BOOL WINAPI DdeUnaccessData(HDDEDATA);
358 BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
359 INT WINAPI DdeCmpStringHandles(HSZ,HSZ);
360 BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
362 HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
363 UINT WINAPI DdeGetLastError(DWORD);
364 UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,LPCONVINFO);
366 #ifdef __cplusplus
367 } /* extern "C" */
368 #endif /* defined(__cplusplus) */
370 #endif /* __WINE_DDEML_H */