source: Daodan/MinGW/include/ddeml.h@ 1127

Last change on this file since 1127 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 8.9 KB
Line 
1#ifndef _DDEML_H
2#define _DDEML_H
3#if __GNUC__ >=3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define EXPENTRY CALLBACK
12#define CP_WINANSI 1004
13#define CP_WINUNICODE 1200
14#define XTYPF_NOBLOCK 2
15#define XTYPF_NODATA 4
16#define XTYPF_ACKREQ 8
17#define XCLASS_MASK 0xFC00
18#define XCLASS_BOOL 0x1000
19#define XCLASS_DATA 0x2000
20#define XCLASS_FLAGS 0x4000
21#define XCLASS_NOTIFICATION 0x8000
22#define XST_NULL 0
23#define XST_INCOMPLETE 1
24#define XST_CONNECTED 2
25#define XST_INIT1 3
26#define XST_INIT2 4
27#define XST_REQSENT 5
28#define XST_DATARCVD 6
29#define XST_POKESENT 7
30#define XST_POKEACKRCVD 8
31#define XST_EXECSENT 9
32#define XST_EXECACKRCVD 10
33#define XST_ADVSENT 11
34#define XST_UNADVSENT 12
35#define XST_ADVACKRCVD 13
36#define XST_UNADVACKRCVD 14
37#define XST_ADVDATASENT 15
38#define XST_ADVDATAACKRCVD 16
39#define XTYP_ERROR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
40#define XTYP_ADVDATA (16|XCLASS_FLAGS)
41#define XTYP_ADVREQ (32|XCLASS_DATA|XTYPF_NOBLOCK)
42#define XTYP_ADVSTART (0x30|XCLASS_BOOL)
43#define XTYP_ADVSTOP (0x0040|XCLASS_NOTIFICATION)
44#define XTYP_EXECUTE (0x0050|XCLASS_FLAGS)
45#define XTYP_CONNECT (0x0060|XCLASS_BOOL|XTYPF_NOBLOCK)
46#define XTYP_CONNECT_CONFIRM (0x0070|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
47#define XTYP_XACT_COMPLETE (0x0080|XCLASS_NOTIFICATION)
48#define XTYP_POKE (0x0090|XCLASS_FLAGS)
49#define XTYP_REGISTER (0x00A0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
50#define XTYP_REQUEST (0x00B0|XCLASS_DATA)
51#define XTYP_DISCONNECT (0x00C0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
52#define XTYP_UNREGISTER (0x00D0|XCLASS_NOTIFICATION|XTYPF_NOBLOCK)
53#define XTYP_WILDCONNECT (0x00E0|XCLASS_DATA|XTYPF_NOBLOCK)
54#define XTYP_MASK 0xF0
55#define XTYP_SHIFT 4
56#define TIMEOUT_ASYNC 0xFFFFFFFF
57#define QID_SYNC 0xFFFFFFFF
58#define ST_CONNECTED 1
59#define ST_ADVISE 2
60#define ST_ISLOCAL 4
61#define ST_BLOCKED 8
62#define ST_CLIENT 16
63#define ST_TERMINATED 32
64#define ST_INLIST 64
65#define ST_BLOCKNEXT 128
66#define ST_ISSELF 256
67#define CADV_LATEACK 0xFFFF
68#define DMLERR_NO_ERROR 0
69#define DMLERR_FIRST 0x4000
70#define DMLERR_ADVACKTIMEOUT 0x4000
71#define DMLERR_BUSY 0x4001
72#define DMLERR_DATAACKTIMEOUT 0x4002
73#define DMLERR_DLL_NOT_INITIALIZED 0x4003
74#define DMLERR_DLL_USAGE 0x4004
75#define DMLERR_EXECACKTIMEOUT 0x4005
76#define DMLERR_INVALIDPARAMETER 0x4006
77#define DMLERR_LOW_MEMORY 0x4007
78#define DMLERR_MEMORY_ERROR 0x4008
79#define DMLERR_NOTPROCESSED 0x4009
80#define DMLERR_NO_CONV_ESTABLISHED 0x400a
81#define DMLERR_POKEACKTIMEOUT 0x400b
82#define DMLERR_POSTMSG_FAILED 0x400c
83#define DMLERR_REENTRANCY 0x400d
84#define DMLERR_SERVER_DIED 0x400e
85#define DMLERR_SYS_ERROR 0x400f
86#define DMLERR_UNADVACKTIMEOUT 0x4010
87#define DMLERR_UNFOUND_QUEUE_ID 0x4011
88#define DMLERR_LAST 0x4011
89#define DDE_FACK 0x8000
90#define DDE_FBUSY 0x4000
91#define DDE_FDEFERUPD 0x4000
92#define DDE_FACKREQ 0x8000
93#define DDE_FRELEASE 0x2000
94#define DDE_FREQUESTED 0x1000
95#define DDE_FAPPSTATUS 0x00ff
96#define DDE_FNOTPROCESSED 0
97#define DDE_FACKRESERVED (~(DDE_FACK|DDE_FBUSY|DDE_FAPPSTATUS))
98#define DDE_FADVRESERVED (~(DDE_FACKREQ|DDE_FDEFERUPD))
99#define DDE_FDATRESERVED (~(DDE_FACKREQ|DDE_FRELEASE|DDE_FREQUESTED))
100#define DDE_FPOKRESERVED (~DDE_FRELEASE)
101#define MSGF_DDEMGR 0x8001
102#define CBR_BLOCK ((HDDEDATA)0xffffffff)
103#define CBF_FAIL_SELFCONNECTIONS 0x1000
104#define CBF_FAIL_CONNECTIONS 0x2000
105#define CBF_FAIL_ADVISES 0x4000
106#define CBF_FAIL_EXECUTES 0x8000
107#define CBF_FAIL_POKES 0x10000
108#define CBF_FAIL_REQUESTS 0x20000
109#define CBF_FAIL_ALLSVRXACTIONS 0x3f000
110#define CBF_SKIP_CONNECT_CONFIRMS 0x40000
111#define CBF_SKIP_REGISTRATIONS 0x80000
112#define CBF_SKIP_UNREGISTRATIONS 0x100000
113#define CBF_SKIP_DISCONNECTS 0x200000
114#define CBF_SKIP_ALLNOTIFICATIONS 0x3c0000
115#define APPCMD_CLIENTONLY 0x10L
116#define APPCMD_FILTERINITS 0x20L
117#define APPCMD_MASK 0xFF0L
118#define APPCLASS_STANDARD 0
119#define APPCLASS_MASK 0xFL
120#define EC_ENABLEALL 0
121#define EC_ENABLEONE ST_BLOCKNEXT
122#define EC_DISABLE ST_BLOCKED
123#define EC_QUERYWAITING 2
124#define DNS_REGISTER 1
125#define DNS_UNREGISTER 2
126#define DNS_FILTERON 4
127#define DNS_FILTEROFF 8
128#define HDATA_APPOWNED 1
129#define MAX_MONITORS 4
130#define APPCLASS_MONITOR 1L
131#define XTYP_MONITOR (XCLASS_NOTIFICATION|XTYPF_NOBLOCK|0xF0)
132#define MF_HSZ_INFO 0x1000000
133#define MF_SENDMSGS 0x2000000
134#define MF_POSTMSGS 0x4000000
135#define MF_CALLBACKS 0x8000000
136#define MF_ERRORS 0x10000000
137#define MF_LINKS 0x20000000
138#define MF_CONV 0x40000000
139#define MF_MASK 0xFF000000
140#define MH_CREATE 1
141#define MH_KEEP 2
142#define MH_DELETE 3
143#define MH_CLEANUP 4
144
145DECLARE_HANDLE(HCONVLIST);
146DECLARE_HANDLE(HCONV);
147DECLARE_HANDLE(HSZ);
148DECLARE_HANDLE(HDDEDATA);
149typedef HDDEDATA CALLBACK FNCALLBACK(UINT,UINT,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
150typedef HDDEDATA(CALLBACK *PFNCALLBACK)(UINT,UINT,HCONV,HSZ,HSZ,HDDEDATA,DWORD,DWORD);
151typedef struct tagHSZPAIR {
152 HSZ hszSvc;
153 HSZ hszTopic;
154} HSZPAIR, *PHSZPAIR;
155typedef struct tagCONVCONTEXT {
156 UINT cb;
157 UINT wFlags;
158 UINT wCountryID;
159 int iCodePage;
160 DWORD dwLangID;
161 DWORD dwSecurity;
162 SECURITY_QUALITY_OF_SERVICE qos;
163} CONVCONTEXT,*PCONVCONTEXT;
164typedef struct tagCONVINFO {
165 DWORD cb;
166 DWORD hUser;
167 HCONV hConvPartner;
168 HSZ hszSvcPartner;
169 HSZ hszServiceReq;
170 HSZ hszTopic;
171 HSZ hszItem;
172 UINT wFmt;
173 UINT wType;
174 UINT wStatus;
175 UINT wConvst;
176 UINT wLastError;
177 HCONVLIST hConvList;
178 CONVCONTEXT ConvCtxt;
179 HWND hwnd;
180 HWND hwndPartner;
181} CONVINFO,*PCONVINFO;
182typedef struct tagDDEML_MSG_HOOK_DATA {
183 UINT uiLo;
184 UINT uiHi;
185 DWORD cbData;
186 DWORD Data[8];
187} DDEML_MSG_HOOK_DATA;
188typedef struct tagMONHSZSTRUCT {
189 UINT cb;
190 BOOL fsAction;
191 DWORD dwTime;
192 HSZ hsz;
193 HANDLE hTask;
194 TCHAR str[1];
195} MONHSZSTRUCT, *PMONHSZSTRUCT;
196typedef struct tagMONLINKSTRUCT {
197 UINT cb;
198 DWORD dwTime;
199 HANDLE hTask;
200 BOOL fEstablished;
201 BOOL fNoData;
202 HSZ hszSvc;
203 HSZ hszTopic;
204 HSZ hszItem;
205 UINT wFmt;
206 BOOL fServer;
207 HCONV hConvServer;
208 HCONV hConvClient;
209} MONLINKSTRUCT, *PMONLINKSTRUCT;
210typedef struct tagMONCONVSTRUCT {
211 UINT cb;
212 BOOL fConnect;
213 DWORD dwTime;
214 HANDLE hTask;
215 HSZ hszSvc;
216 HSZ hszTopic;
217 HCONV hConvClient;
218 HCONV hConvServer;
219} MONCONVSTRUCT, *PMONCONVSTRUCT;
220typedef struct tagMONCBSTRUCT {
221 UINT cb;
222 DWORD dwTime;
223 HANDLE hTask;
224 DWORD dwRet;
225 UINT wType;
226 UINT wFmt;
227 HCONV hConv;
228 HSZ hsz1;
229 HSZ hsz2;
230 HDDEDATA hData;
231 ULONG_PTR dwData1;
232 ULONG_PTR dwData2;
233 CONVCONTEXT cc;
234 DWORD cbData;
235 DWORD Data[8];
236} MONCBSTRUCT, *PMONCBSTRUCT;
237typedef struct tagMONERRSTRUCT {
238 UINT cb;
239 UINT wLastError;
240 DWORD dwTime;
241 HANDLE hTask;
242} MONERRSTRUCT, *PMONERRSTRUCT;
243typedef struct tagMONMSGSTRUCT {
244 UINT cb;
245 HWND hwndTo;
246 DWORD dwTime;
247 HANDLE hTask;
248 UINT wMsg;
249 WPARAM wParam;
250 LPARAM lParam;
251 DDEML_MSG_HOOK_DATA dmhd;
252} MONMSGSTRUCT, *PMONMSGSTRUCT;
253
254BOOL WINAPI DdeAbandonTransaction(DWORD,HCONV,DWORD);
255PBYTE WINAPI DdeAccessData(HDDEDATA,PDWORD);
256HDDEDATA WINAPI DdeAddData(HDDEDATA,PBYTE,DWORD,DWORD);
257HDDEDATA WINAPI DdeClientTransaction(PBYTE,DWORD,HCONV,HSZ,UINT,UINT,DWORD,PDWORD);
258int WINAPI DdeCmpStringHandles(HSZ,HSZ);
259HCONV WINAPI DdeConnect(DWORD,HSZ,HSZ,PCONVCONTEXT);
260HCONVLIST WINAPI DdeConnectList(DWORD,HSZ,HSZ,HCONVLIST,PCONVCONTEXT);
261HDDEDATA WINAPI DdeCreateDataHandle(DWORD,PBYTE,DWORD,DWORD,HSZ,UINT,UINT);
262HSZ WINAPI DdeCreateStringHandleA(DWORD,LPCSTR,int);
263HSZ WINAPI DdeCreateStringHandleW(DWORD,LPCWSTR,int);
264BOOL WINAPI DdeDisconnect(HCONV);
265BOOL WINAPI DdeDisconnectList(HCONVLIST);
266BOOL WINAPI DdeEnableCallback(DWORD,HCONV,UINT);
267BOOL WINAPI DdeFreeDataHandle(HDDEDATA);
268BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
269DWORD WINAPI DdeGetData(HDDEDATA,PBYTE,DWORD,DWORD);
270UINT WINAPI DdeGetLastError(DWORD);
271BOOL WINAPI DdeImpersonateClient(HCONV);
272UINT WINAPI DdeInitializeA(PDWORD,PFNCALLBACK,DWORD,DWORD);
273UINT WINAPI DdeInitializeW(PDWORD,PFNCALLBACK,DWORD,DWORD);
274BOOL WINAPI DdeKeepStringHandle(DWORD,HSZ);
275HDDEDATA WINAPI DdeNameService(DWORD,HSZ,HSZ,UINT);
276BOOL WINAPI DdePostAdvise(DWORD,HSZ,HSZ);
277UINT WINAPI DdeQueryConvInfo(HCONV,DWORD,PCONVINFO);
278HCONV WINAPI DdeQueryNextServer(HCONVLIST,HCONV);
279DWORD WINAPI DdeQueryStringA(DWORD,HSZ,LPSTR,DWORD,int);
280DWORD WINAPI DdeQueryStringW(DWORD,HSZ,LPWSTR,DWORD,int);
281HCONV WINAPI DdeReconnect(HCONV);
282BOOL WINAPI DdeSetUserHandle(HCONV,DWORD,DWORD);
283BOOL WINAPI DdeUnaccessData(HDDEDATA);
284BOOL WINAPI DdeUninitialize(DWORD);
285
286#ifdef UNICODE
287#define SZDDESYS_TOPIC L"System"
288#define SZDDESYS_ITEM_TOPICS L"Topics"
289#define SZDDESYS_ITEM_SYSITEMS L"SysItems"
290#define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
291#define SZDDESYS_ITEM_STATUS L"Status"
292#define SZDDESYS_ITEM_FORMATS L"Formats"
293#define SZDDESYS_ITEM_HELP L"Help"
294#define SZDDE_ITEM_ITEMLIST L"TopicItemList"
295#define DdeCreateStringHandle DdeCreateStringHandleW
296#define DdeInitialize DdeInitializeW
297#define DdeQueryString DdeQueryStringW
298#else
299#define SZDDESYS_TOPIC "System"
300#define SZDDESYS_ITEM_TOPICS "Topics"
301#define SZDDESYS_ITEM_SYSITEMS "SysItems"
302#define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
303#define SZDDESYS_ITEM_STATUS "Status"
304#define SZDDESYS_ITEM_FORMATS "Formats"
305#define SZDDESYS_ITEM_HELP "Help"
306#define SZDDE_ITEM_ITEMLIST "TopicItemList"
307#define DdeCreateStringHandle DdeCreateStringHandleA
308#define DdeInitialize DdeInitializeA
309#define DdeQueryString DdeQueryStringA
310#endif
311#ifdef __cplusplus
312}
313#endif
314#endif /* _DDEML_H */
Note: See TracBrowser for help on using the repository browser.