comparison fuhtark_test/include/winapi/ddeml.h @ 1500:91c8c3b7cbf0

add: futhark tests for generating vulkan api
author sam <sam@basx.dev>
date Wed, 26 Nov 2025 21:36:48 +0700
parents
children
comparison
equal deleted inserted replaced
1499:1f58458b7ef7 1500:91c8c3b7cbf0
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef _INC_DDEMLH
7 #define _INC_DDEMLH
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 DECLARE_HANDLE(HCONVLIST);
14 DECLARE_HANDLE(HCONV);
15 DECLARE_HANDLE(HSZ);
16 DECLARE_HANDLE(HDDEDATA);
17 #define EXPENTRY CALLBACK
18
19 typedef struct tagHSZPAIR {
20 HSZ hszSvc;
21 HSZ hszTopic;
22 } HSZPAIR, *PHSZPAIR;
23
24 typedef struct tagCONVCONTEXT {
25 UINT cb;
26 UINT wFlags;
27 UINT wCountryID;
28 int iCodePage;
29 DWORD dwLangID;
30 DWORD dwSecurity;
31 SECURITY_QUALITY_OF_SERVICE qos;
32 } CONVCONTEXT, *PCONVCONTEXT;
33
34 typedef struct tagCONVINFO {
35 DWORD cb;
36 DWORD_PTR hUser;
37 HCONV hConvPartner;
38 HSZ hszSvcPartner;
39 HSZ hszServiceReq;
40 HSZ hszTopic;
41 HSZ hszItem;
42 UINT wFmt;
43 UINT wType;
44 UINT wStatus;
45 UINT wConvst;
46 UINT wLastError;
47 HCONVLIST hConvList;
48 CONVCONTEXT ConvCtxt;
49 HWND hwnd;
50 HWND hwndPartner;
51 } CONVINFO, *PCONVINFO;
52
53 #define XST_NULL 0
54 #define XST_INCOMPLETE 1
55 #define XST_CONNECTED 2
56 #define XST_INIT1 3
57 #define XST_INIT2 4
58 #define XST_REQSENT 5
59 #define XST_DATARCVD 6
60 #define XST_POKESENT 7
61 #define XST_POKEACKRCVD 8
62 #define XST_EXECSENT 9
63 #define XST_EXECACKRCVD 10
64 #define XST_ADVSENT 11
65 #define XST_UNADVSENT 12
66 #define XST_ADVACKRCVD 13
67 #define XST_UNADVACKRCVD 14
68 #define XST_ADVDATASENT 15
69 #define XST_ADVDATAACKRCVD 16
70
71 #define CADV_LATEACK 0xFFFF
72
73 #define ST_CONNECTED 0x0001
74 #define ST_ADVISE 0x0002
75 #define ST_ISLOCAL 0x0004
76 #define ST_BLOCKED 0x0008
77 #define ST_CLIENT 0x0010
78 #define ST_TERMINATED 0x0020
79 #define ST_INLIST 0x0040
80 #define ST_BLOCKNEXT 0x0080
81 #define ST_ISSELF 0x0100
82
83 #define DDE_FACK 0x8000
84 #define DDE_FBUSY 0x4000
85 #define DDE_FDEFERUPD 0x4000
86 #define DDE_FACKREQ 0x8000
87 #define DDE_FRELEASE 0x2000
88 #define DDE_FREQUESTED 0x1000
89 #define DDE_FAPPSTATUS 0x00ff
90 #define DDE_FNOTPROCESSED 0x0000
91
92 #define DDE_FACKRESERVED (~(DDE_FACK | DDE_FBUSY | DDE_FAPPSTATUS))
93 #define DDE_FADVRESERVED (~(DDE_FACKREQ | DDE_FDEFERUPD))
94 #define DDE_FDATRESERVED (~(DDE_FACKREQ | DDE_FRELEASE | DDE_FREQUESTED))
95 #define DDE_FPOKRESERVED (~(DDE_FRELEASE))
96
97 #define MSGF_DDEMGR 0x8001
98
99 #define CP_WINANSI 1004
100 #define CP_WINUNICODE 1200
101
102 #define XTYPF_NOBLOCK 0x0002
103 #define XTYPF_NODATA 0x0004
104 #define XTYPF_ACKREQ 0x0008
105
106 #define XCLASS_MASK 0xFC00
107 #define XCLASS_BOOL 0x1000
108 #define XCLASS_DATA 0x2000
109 #define XCLASS_FLAGS 0x4000
110 #define XCLASS_NOTIFICATION 0x8000
111
112 #define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
113 #define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS)
114 #define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK)
115 #define XTYP_ADVSTART (0x0030 | XCLASS_BOOL)
116 #define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION)
117 #define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS)
118 #define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK)
119 #define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
120 #define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION)
121 #define XTYP_POKE (0x0090 | XCLASS_FLAGS)
122 #define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
123 #define XTYP_REQUEST (0x00B0 | XCLASS_DATA)
124 #define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
125 #define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
126 #define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK)
127
128 #define XTYP_MASK 0x00F0
129 #define XTYP_SHIFT 4
130
131 #define TIMEOUT_ASYNC 0xFFFFFFFF
132
133 #define QID_SYNC 0xFFFFFFFF
134
135 #ifdef UNICODE
136 #define CP_WINNEUTRAL CP_WINUNICODE
137
138 #define SZDDESYS_TOPIC L"System"
139 #define SZDDESYS_ITEM_TOPICS L"Topics"
140 #define SZDDESYS_ITEM_SYSITEMS L"SysItems"
141 #define SZDDESYS_ITEM_RTNMSG L"ReturnMessage"
142 #define SZDDESYS_ITEM_STATUS L"Status"
143 #define SZDDESYS_ITEM_FORMATS L"Formats"
144 #define SZDDESYS_ITEM_HELP L"Help"
145 #define SZDDE_ITEM_ITEMLIST L"TopicItemList"
146
147 #define DdeInitialize DdeInitializeW
148 #else
149 #define CP_WINNEUTRAL CP_WINANSI
150
151 #define SZDDESYS_TOPIC "System"
152 #define SZDDESYS_ITEM_TOPICS "Topics"
153 #define SZDDESYS_ITEM_SYSITEMS "SysItems"
154 #define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
155 #define SZDDESYS_ITEM_STATUS "Status"
156 #define SZDDESYS_ITEM_FORMATS "Formats"
157 #define SZDDESYS_ITEM_HELP "Help"
158 #define SZDDE_ITEM_ITEMLIST "TopicItemList"
159 #define DdeInitialize DdeInitializeA
160 #endif
161
162 typedef HDDEDATA CALLBACK FNCALLBACK(UINT wType,UINT wFmt,HCONV hConv,HSZ hsz1,HSZ hsz2,HDDEDATA hData,ULONG_PTR dwData1,ULONG_PTR dwData2);
163 typedef HDDEDATA (CALLBACK *PFNCALLBACK)(UINT wType,UINT wFmt,HCONV hConv,HSZ hsz1,HSZ hsz2,HDDEDATA hData,ULONG_PTR dwData1,ULONG_PTR dwData2);
164
165 #define CBR_BLOCK ((HDDEDATA)-1)
166
167 UINT WINAPI DdeInitializeA(LPDWORD pidInst,PFNCALLBACK pfnCallback,DWORD afCmd,DWORD ulRes);
168 UINT WINAPI DdeInitializeW(LPDWORD pidInst,PFNCALLBACK pfnCallback,DWORD afCmd,DWORD ulRes);
169
170 #define CBF_FAIL_SELFCONNECTIONS 0x00001000
171 #define CBF_FAIL_CONNECTIONS 0x00002000
172 #define CBF_FAIL_ADVISES 0x00004000
173 #define CBF_FAIL_EXECUTES 0x00008000
174 #define CBF_FAIL_POKES 0x00010000
175 #define CBF_FAIL_REQUESTS 0x00020000
176 #define CBF_FAIL_ALLSVRXACTIONS 0x0003f000
177
178 #define CBF_SKIP_CONNECT_CONFIRMS 0x00040000
179 #define CBF_SKIP_REGISTRATIONS 0x00080000
180 #define CBF_SKIP_UNREGISTRATIONS 0x00100000
181 #define CBF_SKIP_DISCONNECTS 0x00200000
182 #define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000
183
184 #define APPCMD_CLIENTONLY 0x00000010L
185 #define APPCMD_FILTERINITS 0x00000020L
186 #define APPCMD_MASK 0x00000FF0L
187
188 #define APPCLASS_STANDARD 0x00000000L
189 #define APPCLASS_MASK 0x0000000FL
190
191 WINBOOL WINAPI DdeUninitialize(DWORD idInst);
192 HCONVLIST WINAPI DdeConnectList(DWORD idInst,HSZ hszService,HSZ hszTopic,HCONVLIST hConvList,PCONVCONTEXT pCC);
193 HCONV WINAPI DdeQueryNextServer(HCONVLIST hConvList,HCONV hConvPrev);
194 WINBOOL WINAPI DdeDisconnectList(HCONVLIST hConvList);
195 HCONV WINAPI DdeConnect(DWORD idInst,HSZ hszService,HSZ hszTopic,PCONVCONTEXT pCC);
196 WINBOOL WINAPI DdeDisconnect(HCONV hConv);
197 HCONV WINAPI DdeReconnect(HCONV hConv);
198 UINT WINAPI DdeQueryConvInfo(HCONV hConv,DWORD idTransaction,PCONVINFO pConvInfo);
199 WINBOOL WINAPI DdeSetUserHandle(HCONV hConv,DWORD id,DWORD_PTR hUser);
200 WINBOOL WINAPI DdeAbandonTransaction(DWORD idInst,HCONV hConv,DWORD idTransaction);
201 WINBOOL WINAPI DdePostAdvise(DWORD idInst,HSZ hszTopic,HSZ hszItem);
202 WINBOOL WINAPI DdeEnableCallback(DWORD idInst,HCONV hConv,UINT wCmd);
203 WINBOOL WINAPI DdeImpersonateClient(HCONV hConv);
204
205 #define EC_ENABLEALL 0
206 #define EC_ENABLEONE ST_BLOCKNEXT
207 #define EC_DISABLE ST_BLOCKED
208 #define EC_QUERYWAITING 2
209
210 #define DNS_REGISTER 0x0001
211 #define DNS_UNREGISTER 0x0002
212 #define DNS_FILTERON 0x0004
213 #define DNS_FILTEROFF 0x0008
214
215 HDDEDATA WINAPI DdeNameService(DWORD idInst,HSZ hsz1,HSZ hsz2,UINT afCmd);
216 HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData,DWORD cbData,HCONV hConv,HSZ hszItem,UINT wFmt,UINT wType,DWORD dwTimeout,LPDWORD pdwResult);
217 HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst,LPBYTE pSrc,DWORD cb,DWORD cbOff,HSZ hszItem,UINT wFmt,UINT afCmd);
218 HDDEDATA WINAPI DdeAddData(HDDEDATA hData,LPBYTE pSrc,DWORD cb,DWORD cbOff);
219 DWORD WINAPI DdeGetData(HDDEDATA hData,LPBYTE pDst,DWORD cbMax,DWORD cbOff);
220 LPBYTE WINAPI DdeAccessData(HDDEDATA hData,LPDWORD pcbDataSize);
221 WINBOOL WINAPI DdeUnaccessData(HDDEDATA hData);
222 WINBOOL WINAPI DdeFreeDataHandle(HDDEDATA hData);
223
224 #define HDATA_APPOWNED 0x0001
225
226 UINT WINAPI DdeGetLastError(DWORD idInst);
227
228 #define DMLERR_NO_ERROR 0
229 #define DMLERR_FIRST 0x4000
230
231 #define DMLERR_ADVACKTIMEOUT 0x4000
232 #define DMLERR_BUSY 0x4001
233 #define DMLERR_DATAACKTIMEOUT 0x4002
234 #define DMLERR_DLL_NOT_INITIALIZED 0x4003
235 #define DMLERR_DLL_USAGE 0x4004
236 #define DMLERR_EXECACKTIMEOUT 0x4005
237 #define DMLERR_INVALIDPARAMETER 0x4006
238 #define DMLERR_LOW_MEMORY 0x4007
239 #define DMLERR_MEMORY_ERROR 0x4008
240 #define DMLERR_NOTPROCESSED 0x4009
241 #define DMLERR_NO_CONV_ESTABLISHED 0x400a
242 #define DMLERR_POKEACKTIMEOUT 0x400b
243 #define DMLERR_POSTMSG_FAILED 0x400c
244 #define DMLERR_REENTRANCY 0x400d
245 #define DMLERR_SERVER_DIED 0x400e
246 #define DMLERR_SYS_ERROR 0x400f
247 #define DMLERR_UNADVACKTIMEOUT 0x4010
248 #define DMLERR_UNFOUND_QUEUE_ID 0x4011
249
250 #define DMLERR_LAST 0x4011
251
252 HSZ WINAPI DdeCreateStringHandleA(DWORD idInst,LPCSTR psz,int iCodePage);
253 HSZ WINAPI DdeCreateStringHandleW(DWORD idInst,LPCWSTR psz,int iCodePage);
254 DWORD WINAPI DdeQueryStringA(DWORD idInst,HSZ hsz,LPSTR psz,DWORD cchMax,int iCodePage);
255 DWORD WINAPI DdeQueryStringW(DWORD idInst,HSZ hsz,LPWSTR psz,DWORD cchMax,int iCodePage);
256 WINBOOL WINAPI DdeFreeStringHandle(DWORD idInst,HSZ hsz);
257 WINBOOL WINAPI DdeKeepStringHandle(DWORD idInst,HSZ hsz);
258 int WINAPI DdeCmpStringHandles(HSZ hsz1,HSZ hsz2);
259
260 #ifdef UNICODE
261 #define DdeCreateStringHandle DdeCreateStringHandleW
262 #define DdeQueryString DdeQueryStringW
263 #else
264 #define DdeCreateStringHandle DdeCreateStringHandleA
265 #define DdeQueryString DdeQueryStringA
266 #endif
267
268 #ifndef NODDEMLSPY
269 typedef struct tagDDEML_MSG_HOOK_DATA {
270 UINT_PTR uiLo;
271 UINT_PTR uiHi;
272 DWORD cbData;
273 DWORD Data[8];
274 } DDEML_MSG_HOOK_DATA,*PDDEML_MSG_HOOK_DATA;
275
276 typedef struct tagMONMSGSTRUCT {
277 UINT cb;
278 HWND hwndTo;
279 DWORD dwTime;
280 HANDLE hTask;
281 UINT wMsg;
282 WPARAM wParam;
283 LPARAM lParam;
284 DDEML_MSG_HOOK_DATA dmhd;
285 } MONMSGSTRUCT,*PMONMSGSTRUCT;
286
287 typedef struct tagMONCBSTRUCT {
288 UINT cb;
289 DWORD dwTime;
290 HANDLE hTask;
291 DWORD dwRet;
292 UINT wType;
293 UINT wFmt;
294 HCONV hConv;
295 HSZ hsz1;
296 HSZ hsz2;
297 HDDEDATA hData;
298 ULONG_PTR dwData1;
299 ULONG_PTR dwData2;
300 CONVCONTEXT cc;
301 DWORD cbData;
302 DWORD Data[8];
303 } MONCBSTRUCT,*PMONCBSTRUCT;
304
305 typedef struct tagMONHSZSTRUCTA {
306 UINT cb;
307 WINBOOL fsAction;
308 DWORD dwTime;
309 HSZ hsz;
310 HANDLE hTask;
311 CHAR str[1];
312 } MONHSZSTRUCTA,*PMONHSZSTRUCTA;
313
314 typedef struct tagMONHSZSTRUCTW {
315 UINT cb;
316 WINBOOL fsAction;
317 DWORD dwTime;
318 HSZ hsz;
319 HANDLE hTask;
320 WCHAR str[1];
321 } MONHSZSTRUCTW,*PMONHSZSTRUCTW;
322
323 #ifdef UNICODE
324 typedef MONHSZSTRUCTW MONHSZSTRUCT;
325 typedef PMONHSZSTRUCTW PMONHSZSTRUCT;
326 #else
327 typedef MONHSZSTRUCTA MONHSZSTRUCT;
328 typedef PMONHSZSTRUCTA PMONHSZSTRUCT;
329 #endif
330
331 #define MH_CREATE 1
332 #define MH_KEEP 2
333 #define MH_DELETE 3
334 #define MH_CLEANUP 4
335
336 typedef struct tagMONERRSTRUCT {
337 UINT cb;
338 UINT wLastError;
339 DWORD dwTime;
340 HANDLE hTask;
341 } MONERRSTRUCT,*PMONERRSTRUCT;
342
343 typedef struct tagMONLINKSTRUCT {
344 UINT cb;
345 DWORD dwTime;
346 HANDLE hTask;
347 WINBOOL fEstablished;
348 WINBOOL fNoData;
349 HSZ hszSvc;
350 HSZ hszTopic;
351 HSZ hszItem;
352 UINT wFmt;
353 WINBOOL fServer;
354 HCONV hConvServer;
355 HCONV hConvClient;
356 } MONLINKSTRUCT,*PMONLINKSTRUCT;
357
358 typedef struct tagMONCONVSTRUCT {
359 UINT cb;
360 WINBOOL fConnect;
361 DWORD dwTime;
362 HANDLE hTask;
363 HSZ hszSvc;
364 HSZ hszTopic;
365 HCONV hConvClient;
366 HCONV hConvServer;
367 } MONCONVSTRUCT,*PMONCONVSTRUCT;
368
369 #define MAX_MONITORS 4
370 #define APPCLASS_MONITOR 0x00000001L
371 #define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK)
372
373 #define MF_HSZ_INFO 0x01000000
374 #define MF_SENDMSGS 0x02000000
375 #define MF_POSTMSGS 0x04000000
376 #define MF_CALLBACKS 0x08000000
377 #define MF_ERRORS 0x10000000
378 #define MF_LINKS 0x20000000
379 #define MF_CONV 0x40000000
380
381 #define MF_MASK 0xFF000000
382 #endif
383
384 #ifdef __cplusplus
385 }
386 #endif
387 #endif