2 * DDEML library definitions
4 * Copyright 1997 Alexandre Julliard
5 * Copyright 1997 Len White
8 #ifndef __WINE__DDEML_H
9 #define __WINE__DDEML_H
15 #define CP_WINANSI 1004
16 #define CP_WINUNICODE 1200
18 #define MSGF_DDEMGR 0x8001
19 /***************************************************
21 FLAGS Section - copied from Microsoft SDK as must be standard, probably Copyright Microsoft Corporation
23 ***************************************************/
26 * Callback filter flags for use with standard apps.
29 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
30 #define CBF_FAIL_CONNECTIONS 0x00002000
31 #define CBF_FAIL_ADVISES 0x00004000
32 #define CBF_FAIL_EXECUTES 0x00008000
33 #define CBF_FAIL_POKES 0x00010000
34 #define CBF_FAIL_REQUESTS 0x00020000
35 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
37 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
38 #define CBF_SKIP_REGISTRATIONS 0x00080000
39 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
40 #define CBF_SKIP_DISCONNECTS 0x00200000
41 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
44 * Application command flags
46 #define APPCMD_CLIENTONLY 0x00000010L
47 #define APPCMD_FILTERINITS 0x00000020L
48 #define APPCMD_MASK 0x00000FF0L
51 * Application classification flags
54 #define APPCLASS_STANDARD 0x00000000L
55 #define APPCLASS_MONITOR 0x00000001L
56 #define APPCLASS_MASK 0x0000000FL
59 * Callback filter flags for use with MONITOR apps - 0 implies no monitor
62 #define MF_HSZ_INFO 0x01000000
63 #define MF_SENDMSGS 0x02000000
64 #define MF_POSTMSGS 0x04000000
65 #define MF_CALLBACKS 0x08000000
66 #define MF_ERRORS 0x10000000
67 #define MF_LINKS 0x20000000
68 #define MF_CONV 0x40000000
70 #define MF_MASK 0xFF000000
73 * DdeNameService service name flags
76 #define DNS_REGISTER 0x0001
77 #define DNS_UNREGISTER 0x0002
78 #define DNS_FILTERON 0x0004
79 #define DNS_FILTEROFF 0x0008
82 /****************************************************
86 ****************************************************/
88 /****************************************************
90 Return Codes section again copied from SDK as must be same
92 *****************************************************/
94 #define DMLERR_NO_ERROR 0 /* must be 0 */
96 #define DMLERR_FIRST 0x4000
98 #define DMLERR_ADVACKTIMEOUT 0x4000
99 #define DMLERR_BUSY 0x4001
100 #define DMLERR_DATAACKTIMEOUT 0x4002
101 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
102 #define DMLERR_DLL_USAGE 0x4004
103 #define DMLERR_EXECACKTIMEOUT 0x4005
104 #define DMLERR_INVALIDPARAMETER 0x4006
105 #define DMLERR_LOW_MEMORY 0x4007
106 #define DMLERR_MEMORY_ERROR 0x4008
107 #define DMLERR_NOTPROCESSED 0x4009
108 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
109 #define DMLERR_POKEACKTIMEOUT 0x400b
110 #define DMLERR_POSTMSG_FAILED 0x400c
111 #define DMLERR_REENTRANCY 0x400d
112 #define DMLERR_SERVER_DIED 0x400e
113 #define DMLERR_SYS_ERROR 0x400f
114 #define DMLERR_UNADVACKTIMEOUT 0x4010
115 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
117 #define DMLERR_LAST 0x4011
119 /*****************************************************
121 End of Return Codes and Microsoft section
123 ******************************************************/
127 typedef DWORD HCONVLIST
;
130 typedef DWORD HDDEDATA
;
131 typedef CHAR
*LPTSTR
;
133 typedef HDDEDATA (CALLBACK
*PFNCALLBACK16
)(UINT16
,UINT16
,HCONV
,HSZ
,HSZ
,
134 HDDEDATA
,DWORD
,DWORD
);
135 typedef HDDEDATA (CALLBACK
*PFNCALLBACK
)(UINT
,UINT
,HCONV
,HSZ
,HSZ
,
136 HDDEDATA
,DWORD
,DWORD
);
138 /***************************************************
140 Externally visible data structures
142 ***************************************************/
152 } CONVCONTEXT16
, *LPCONVCONTEXT16
;
162 } CONVCONTEXT
, *LPCONVCONTEXT
;
164 // Internal data structures
166 /* entry for handle table */
167 typedef struct DDE_HANDLE_ENTRY
{
168 BOOL16 Monitor
; // have these two as full Booleans cos they'll be tested frequently
169 BOOL16 Client_only
; // bit wasteful of space but it will be faster
170 BOOL16 Unicode
; /* Flag to indicate Win32 API used to initialise */
171 BOOL16 Win16
; /* flag to indicate Win16 API used to initialize */
172 LPDWORD Instance_id
; // needed to track monitor usage
173 struct DDE_HANDLE_ENTRY
*Next_Entry
;
174 PFNCALLBACK CallBack
;
177 UINT Txn_count
; // count transactions open to simplify closure
180 // Interface Definitions
183 UINT16 WINAPI
DdeInitialize16(LPDWORD
,PFNCALLBACK16
,DWORD
,DWORD
);
184 UINT WINAPI
DdeInitializeA(LPDWORD
,PFNCALLBACK
,DWORD
,DWORD
);
185 UINT WINAPI
DdeInitializeW(LPDWORD
,PFNCALLBACK
,DWORD
,DWORD
);
186 #define DdeInitialize WINELIB_NAME_AW(DdeInitialize)
187 BOOL16 WINAPI
DdeUninitialize16(DWORD
);
188 BOOL WINAPI
DdeUninitialize(DWORD
);
189 HCONVLIST WINAPI
DdeConnectList16(DWORD
,HSZ
,HSZ
,HCONVLIST
,LPCONVCONTEXT16
);
190 HCONVLIST WINAPI
DdeConnectList(DWORD
,HSZ
,HSZ
,HCONVLIST
,LPCONVCONTEXT
);
191 HCONV WINAPI
DdeQueryNextServer16(HCONVLIST
, HCONV
);
192 HCONV WINAPI
DdeQueryNextServer(HCONVLIST
, HCONV
);
193 DWORD WINAPI
DdeQueryStringA(DWORD
, HSZ
, LPSTR
, DWORD
, INT
);
194 DWORD WINAPI
DdeQueryStringW(DWORD
, HSZ
, LPWSTR
, DWORD
, INT
);
195 #define DdeQueryString WINELIB_NAME_AW(DdeQueryString)
196 BOOL16 WINAPI
DdeDisconnectList16(HCONVLIST
);
197 BOOL WINAPI
DdeDisconnectList(HCONVLIST
);
198 HCONV WINAPI
DdeConnect16(DWORD
,HSZ
,HSZ
,LPCONVCONTEXT16
);
199 HCONV WINAPI
DdeConnect(DWORD
,HSZ
,HSZ
,LPCONVCONTEXT
);
200 BOOL16 WINAPI
DdeDisconnect16(HCONV
);
201 BOOL WINAPI
DdeDisconnect(HCONV
);
202 BOOL16 WINAPI
DdeSetUserHandle16(HCONV
,DWORD
,DWORD
);
203 HDDEDATA WINAPI
DdeCreateDataHandle16(DWORD
,LPBYTE
,DWORD
,DWORD
,HSZ
,UINT16
,UINT16
);
204 HDDEDATA WINAPI
DdeCreateDataHandle(DWORD
,LPBYTE
,DWORD
,DWORD
,HSZ
,UINT
,UINT
);
205 HCONV WINAPI
DdeReconnect(HCONV
);
206 HSZ WINAPI
DdeCreateStringHandle16(DWORD
,LPCSTR
,INT16
);
207 HSZ WINAPI
DdeCreateStringHandleA(DWORD
,LPCSTR
,INT
);
208 HSZ WINAPI
DdeCreateStringHandleW(DWORD
,LPCWSTR
,INT
);
209 #define DdeCreateStringHandle WINELIB_NAME_AW(DdeCreateStringHandle)
210 BOOL16 WINAPI
DdeFreeStringHandle16(DWORD
,HSZ
);
211 BOOL WINAPI
DdeFreeStringHandle(DWORD
,HSZ
);
212 BOOL16 WINAPI
DdeFreeDataHandle16(HDDEDATA
);
213 BOOL WINAPI
DdeFreeDataHandle(HDDEDATA
);
214 BOOL16 WINAPI
DdeKeepStringHandle16(DWORD
,HSZ
);
215 BOOL WINAPI
DdeKeepStringHandle(DWORD
,HSZ
);
216 HDDEDATA WINAPI
DdeClientTransaction16(LPVOID
,DWORD
,HCONV
,HSZ
,UINT16
,
217 UINT16
,DWORD
,LPDWORD
);
218 HDDEDATA WINAPI
DdeClientTransaction(LPBYTE
,DWORD
,HCONV
,HSZ
,UINT
,
220 BOOL16 WINAPI
DdeAbandonTransaction16(DWORD
,HCONV
,DWORD
);
221 BOOL16 WINAPI
DdePostAdvise16(DWORD
,HSZ
,HSZ
);
222 BOOL WINAPI
DdePostAdvise(DWORD
,HSZ
,HSZ
);
223 HDDEDATA WINAPI
DdeAddData16(HDDEDATA
,LPBYTE
,DWORD
,DWORD
);
224 DWORD WINAPI
DdeGetData(HDDEDATA
,LPBYTE
,DWORD
,DWORD
);
225 LPBYTE WINAPI
DdeAccessData16(HDDEDATA
,LPDWORD
);
226 LPBYTE WINAPI
DdeAccessData(HDDEDATA
,LPDWORD
);
227 BOOL16 WINAPI
DdeUnaccessData16(HDDEDATA
);
228 BOOL WINAPI
DdeUnaccessData(HDDEDATA
);
229 BOOL16 WINAPI
DdeEnableCallback16(DWORD
,HCONV
,UINT16
);
230 BOOL WINAPI
DdeEnableCallback(DWORD
,HCONV
,UINT
);
231 int WINAPI
DdeCmpStringHandles16(HSZ
,HSZ
);
232 int WINAPI
DdeCmpStringHandles(HSZ
,HSZ
);
234 HDDEDATA WINAPI
DdeNameService16(DWORD
,HSZ
,HSZ
,UINT16
);
235 HDDEDATA WINAPI
DdeNameService(DWORD
,HSZ
,HSZ
,UINT
);
236 UINT16 WINAPI
DdeGetLastError16(DWORD
);
237 UINT WINAPI
DdeGetLastError(DWORD
);
239 #endif /* __WINE__DDEML_H */