codekingpro commited on
Commit
b4a659f
·
verified ·
1 Parent(s): ea594a3

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. msvc/Windows Kits/10/Include/10.0.26100.0/shared/WTypes.Idl +970 -0
  2. msvc/Windows Kits/10/Include/10.0.26100.0/shared/WTypesbase.Idl +545 -0
  3. msvc/Windows Kits/10/Include/10.0.26100.0/shared/WTypesbase.h +589 -0
  4. msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbiodef.h +267 -0
  5. msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbprint.h +138 -0
  6. msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbscan.h +165 -0
  7. msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbspec.h +1273 -0
  8. msvc/Windows Kits/10/Include/10.0.26100.0/shared/uuids.h +1842 -0
  9. msvc/Windows Kits/10/Include/10.0.26100.0/shared/vhf.h +226 -0
  10. msvc/Windows Kits/10/Include/10.0.26100.0/shared/vmgenerationcounter.h +44 -0
  11. msvc/Windows Kits/10/Include/10.0.26100.0/shared/warning.h +124 -0
  12. msvc/Windows Kits/10/Include/10.0.26100.0/shared/wdmguid.h +312 -0
  13. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winapifamily.h +251 -0
  14. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winbio_err.h +1023 -0
  15. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winbio_ioctl.h +319 -0
  16. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winbio_types.h +2470 -0
  17. msvc/Windows Kits/10/Include/10.0.26100.0/shared/windef.h +280 -0
  18. msvc/Windows Kits/10/Include/10.0.26100.0/shared/windnsdef.h +1693 -0
  19. msvc/Windows Kits/10/Include/10.0.26100.0/shared/windot11.h +0 -0
  20. msvc/Windows Kits/10/Include/10.0.26100.0/shared/windowsx.h +1380 -0
  21. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winerror.h +0 -0
  22. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winpackagefamily.h +91 -0
  23. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winsmcrd.h +359 -0
  24. msvc/Windows Kits/10/Include/10.0.26100.0/shared/winusbio.h +102 -0
  25. msvc/Windows Kits/10/Include/10.0.26100.0/shared/wlantypes.h +145 -0
  26. msvc/Windows Kits/10/Include/10.0.26100.0/shared/wmistr.h +527 -0
  27. msvc/Windows Kits/10/Include/10.0.26100.0/shared/wnnc.h +122 -0
  28. msvc/Windows Kits/10/Include/10.0.26100.0/shared/ws2def.h +1245 -0
  29. msvc/Windows Kits/10/Include/10.0.26100.0/shared/ws2ipdef.h +1029 -0
  30. msvc/Windows Kits/10/Include/10.0.26100.0/shared/wtypes.h +969 -0
  31. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/assert.h +50 -0
  32. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/complex.h +580 -0
  33. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/conio.h +504 -0
  34. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt.h +0 -0
  35. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_io.h +572 -0
  36. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_malloc.h +234 -0
  37. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_math.h +1033 -0
  38. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_math_defines.h +39 -0
  39. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_memcpy_s.h +95 -0
  40. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_memory.h +122 -0
  41. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_search.h +218 -0
  42. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_share.h +33 -0
  43. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_startup.h +199 -0
  44. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_stdio_config.h +131 -0
  45. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_terminate.h +51 -0
  46. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wconio.h +424 -0
  47. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wctype.h +205 -0
  48. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wdirect.h +63 -0
  49. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wio.h +270 -0
  50. msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wprocess.h +127 -0
msvc/Windows Kits/10/Include/10.0.26100.0/shared/WTypes.Idl ADDED
@@ -0,0 +1,970 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //+-------------------------------------------------------------------------
2
+ //
3
+ // Microsoft Windows
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // File: wtypes.idl
7
+ //
8
+ // Contents: This interface definition contains typedefs for remotable
9
+ // data types.
10
+ //--------------------------------------------------------------------------
11
+
12
+ cpp_quote("//+-------------------------------------------------------------------------")
13
+ cpp_quote("//")
14
+ cpp_quote("// Microsoft Windows")
15
+ cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
16
+ cpp_quote("//")
17
+ cpp_quote("//--------------------------------------------------------------------------")
18
+ cpp_quote("#if ( _MSC_VER >= 1020 )")
19
+ cpp_quote("#pragma once")
20
+ cpp_quote("#endif")
21
+
22
+ import "wtypesbase.idl";
23
+
24
+ cpp_quote("#if _MSC_VER >= 1200")
25
+ cpp_quote("#pragma warning(push)")
26
+ cpp_quote("#pragma warning(disable:4820) /* padding added after data member */")
27
+ cpp_quote("#endif")
28
+
29
+ [ uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
30
+ version(0.1), pointer_default(unique) ]
31
+
32
+ interface IWinTypes
33
+ {
34
+
35
+ typedef struct tagRemHGLOBAL
36
+ {
37
+ LONG fNullHGlobal;
38
+ ULONG cbData;
39
+ [size_is(cbData)] byte data[];
40
+ } RemHGLOBAL;
41
+
42
+ typedef struct tagRemHMETAFILEPICT
43
+ {
44
+ LONG mm;
45
+ LONG xExt;
46
+ LONG yExt;
47
+ ULONG cbData;
48
+ [size_is(cbData)] byte data[];
49
+ } RemHMETAFILEPICT;
50
+
51
+
52
+ typedef struct tagRemHENHMETAFILE
53
+ {
54
+ ULONG cbData;
55
+ [size_is(cbData)] byte data[];
56
+ } RemHENHMETAFILE;
57
+
58
+ typedef struct tagRemHBITMAP
59
+ {
60
+ ULONG cbData;
61
+ [size_is(cbData)] byte data[];
62
+ } RemHBITMAP;
63
+
64
+ typedef struct tagRemHPALETTE
65
+ {
66
+ ULONG cbData;
67
+ [size_is(cbData)] byte data[];
68
+ } RemHPALETTE;
69
+
70
+ typedef struct tagRemBRUSH
71
+ {
72
+ ULONG cbData;
73
+ [size_is(cbData)] byte data[];
74
+ } RemHBRUSH;
75
+
76
+ cpp_quote("#if !defined(_WIN32) && !defined(_MPPC_)" )
77
+ cpp_quote("// The following code is for Win16 only")
78
+
79
+ cpp_quote("#ifndef WINAPI // If not included with 3.1 headers...")
80
+
81
+ cpp_quote("#define FAR _far")
82
+ cpp_quote("#define PASCAL _pascal")
83
+ cpp_quote("#define CDECL _cdecl")
84
+
85
+ cpp_quote("#define VOID void")
86
+ cpp_quote("#define WINAPI FAR PASCAL")
87
+ cpp_quote("#define CALLBACK FAR PASCAL")
88
+
89
+
90
+ cpp_quote("#ifndef FALSE")
91
+ cpp_quote("#define FALSE 0")
92
+ cpp_quote("#define TRUE 1")
93
+ cpp_quote("#endif // !FALSE")
94
+
95
+ cpp_quote("#ifndef _BYTE_DEFINED")
96
+ cpp_quote("#define _BYTE_DEFINED")
97
+ cpp_quote("typedef byte BYTE;")
98
+ cpp_quote("#endif // !_BYTE_DEFINED")
99
+
100
+ cpp_quote("#ifndef _WORD_DEFINED")
101
+ cpp_quote("#define _WORD_DEFINED")
102
+ cpp_quote("typedef unsigned short WORD;")
103
+ cpp_quote("#endif // !_WORD_DEFINED")
104
+
105
+ cpp_quote("typedef unsigned int UINT;")
106
+ cpp_quote("typedef int INT;")
107
+ cpp_quote("typedef long BOOL;")
108
+
109
+ cpp_quote("#ifndef _LONG_DEFINED")
110
+ cpp_quote("#define _LONG_DEFINED")
111
+ cpp_quote("typedef long LONG;")
112
+ cpp_quote("#endif // !_LONG_DEFINED")
113
+
114
+ cpp_quote("#ifndef _WPARAM_DEFINED")
115
+ cpp_quote("#define _WPARAM_DEFINED")
116
+ typedef UINT_PTR WPARAM;
117
+ cpp_quote("#endif // _WPARAM_DEFINED")
118
+
119
+ cpp_quote("#ifndef _DWORD_DEFINED")
120
+ cpp_quote("#define _DWORD_DEFINED")
121
+ cpp_quote("typedef unsigned long DWORD;")
122
+ cpp_quote("#endif // !_DWORD_DEFINED")
123
+
124
+ cpp_quote("#ifndef _LPARAM_DEFINED")
125
+ cpp_quote("#define _LPARAM_DEFINED")
126
+ typedef LONG_PTR LPARAM;
127
+ cpp_quote("#endif // !_LPARAM_DEFINED")
128
+
129
+ cpp_quote("#ifndef _LRESULT_DEFINED")
130
+ cpp_quote("#define _LRESULT_DEFINED")
131
+ typedef LONG_PTR LRESULT;
132
+ cpp_quote("#endif // !_LRESULT_DEFINED")
133
+
134
+ cpp_quote("typedef void * HANDLE;")
135
+ #define DECLARE_WIREM_HANDLE(name) \
136
+ typedef [wire_marshal(wire ## name)] void * name
137
+ #define DECLARE_HANDLE(name) typedef void * name
138
+
139
+ DECLARE_HANDLE(HMODULE);
140
+ DECLARE_HANDLE(HINSTANCE);
141
+ DECLARE_HANDLE(HTASK);
142
+ DECLARE_HANDLE(HKEY);
143
+
144
+ DECLARE_HANDLE(HDESK);
145
+
146
+ DECLARE_HANDLE(HMF);
147
+ DECLARE_HANDLE(HEMF);
148
+
149
+ DECLARE_HANDLE(HPEN);
150
+ DECLARE_HANDLE(HRSRC);
151
+ DECLARE_HANDLE(HSTR);
152
+ DECLARE_HANDLE(HWINSTA);
153
+ DECLARE_HANDLE(HKL);
154
+ DECLARE_HANDLE(HGDIOBJ);
155
+
156
+ typedef HANDLE HDWP;
157
+
158
+ cpp_quote("#ifndef _HFILE_DEFINED")
159
+ cpp_quote("#define _HFILE_DEFINED")
160
+ typedef INT HFILE; /* Polymorphic with C runtime file handle type */
161
+ cpp_quote("#endif // !_HFILE_DEFINED")
162
+
163
+
164
+ cpp_quote("#ifndef _LPWORD_DEFINED")
165
+ cpp_quote("#define _LPWORD_DEFINED")
166
+ cpp_quote("typedef WORD *LPWORD;")
167
+ cpp_quote("#endif // !_LPWORD_DEFINED")
168
+
169
+
170
+ cpp_quote("#ifndef _LPDWORD_DEFINED")
171
+ cpp_quote("#define _LPDWORD_DEFINED")
172
+ cpp_quote("typedef DWORD *LPDWORD;")
173
+ cpp_quote("#endif // !_LPDWORD_DEFINED")
174
+
175
+
176
+ cpp_quote("typedef char CHAR;")
177
+ cpp_quote("typedef CHAR *LPSTR;")
178
+ cpp_quote("typedef const CHAR *LPCSTR;")
179
+
180
+
181
+ cpp_quote("#ifndef _WCHAR_DEFINED")
182
+ cpp_quote("#define _WCHAR_DEFINED")
183
+ cpp_quote("typedef wchar_t WCHAR;")
184
+ cpp_quote("typedef WCHAR TCHAR;")
185
+ cpp_quote("#endif // !_WCHAR_DEFINED")
186
+
187
+ cpp_quote("typedef WCHAR *LPWSTR;")
188
+
189
+
190
+ cpp_quote("typedef TCHAR *LPTSTR;")
191
+
192
+ cpp_quote("typedef const WCHAR *LPCWSTR;")
193
+ cpp_quote("typedef const TCHAR *LPCTSTR;")
194
+
195
+
196
+ cpp_quote("#ifndef _COLORREF_DEFINED")
197
+ cpp_quote("#define _COLORREF_DEFINED")
198
+ typedef DWORD COLORREF;
199
+ cpp_quote("#endif // !_COLORREF_DEFINED")
200
+
201
+ cpp_quote("#ifndef _LPCOLORREF_DEFINED")
202
+ cpp_quote("#define _LPCOLORREF_DEFINED")
203
+ typedef DWORD *LPCOLORREF;
204
+ cpp_quote("#endif // !_LPCOLORREF_DEFINED")
205
+
206
+
207
+ cpp_quote("typedef HANDLE *LPHANDLE;")
208
+
209
+ //typedefs for remotable types from wingdi.h
210
+
211
+ typedef struct _RECTL
212
+ {
213
+ LONG left;
214
+ LONG top;
215
+ LONG right;
216
+ LONG bottom;
217
+ } RECTL, *PRECTL, *LPRECTL;
218
+
219
+
220
+ typedef struct tagPOINT
221
+ {
222
+ LONG x;
223
+ LONG y;
224
+ } POINT, *PPOINT, *LPPOINT;
225
+
226
+ typedef struct _POINTL
227
+ {
228
+ LONG x;
229
+ LONG y;
230
+ } POINTL, *PPOINTL;
231
+
232
+
233
+ cpp_quote("#ifndef WIN16")
234
+ typedef struct tagSIZE
235
+ {
236
+ LONG cx;
237
+ LONG cy;
238
+ } SIZE, *PSIZE, *LPSIZE;
239
+ cpp_quote("#else // WIN16")
240
+ cpp_quote("typedef struct tagSIZE")
241
+ cpp_quote("{")
242
+ cpp_quote(" INT cx;")
243
+ cpp_quote(" INT cy;")
244
+ cpp_quote("} SIZE, *PSIZE, *LPSIZE;")
245
+ cpp_quote("#endif // WIN16")
246
+
247
+
248
+ typedef struct tagSIZEL
249
+ {
250
+ LONG cx;
251
+ LONG cy;
252
+ } SIZEL, *PSIZEL, *LPSIZEL;
253
+
254
+
255
+ cpp_quote("#endif //WINAPI")
256
+ cpp_quote("#endif //!WIN32 && !MPPC")
257
+
258
+
259
+ cpp_quote("#ifndef _PALETTEENTRY_DEFINED")
260
+ cpp_quote("#define _PALETTEENTRY_DEFINED")
261
+
262
+ typedef struct tagPALETTEENTRY {
263
+ BYTE peRed;
264
+ BYTE peGreen;
265
+ BYTE peBlue;
266
+ BYTE peFlags;
267
+ } PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
268
+
269
+ cpp_quote("#endif // !_PALETTEENTRY_DEFINED")
270
+
271
+ // Logical Palette
272
+ cpp_quote("#ifndef _LOGPALETTE_DEFINED")
273
+ cpp_quote("#define _LOGPALETTE_DEFINED")
274
+
275
+ typedef struct tagLOGPALETTE {
276
+ WORD palVersion;
277
+ WORD palNumEntries;
278
+ [size_is(palNumEntries)] PALETTEENTRY palPalEntry[];
279
+ } LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
280
+
281
+ cpp_quote("#endif // !_LOGPALETTE_DEFINED")
282
+
283
+ // This block contains types that are normally defined by the nt sdk in WINDEF.H
284
+ // but we need them here for definitions that follow in this file. If WINDEF.H
285
+ // hasn't been included then we need to define them now so that WTYPES.H
286
+ // will compile.
287
+ cpp_quote("#ifndef _WINDEF_")
288
+ typedef const RECTL *LPCRECTL;
289
+
290
+ typedef struct tagRECT
291
+ {
292
+ LONG left;
293
+ LONG top;
294
+ LONG right;
295
+ LONG bottom;
296
+ } RECT, *PRECT, *LPRECT;
297
+ typedef const RECT *LPCRECT;
298
+
299
+ cpp_quote("#endif //_WINDEF_")
300
+
301
+ //The following typedefs are used internally by MIDL.
302
+ cpp_quote("#if 0")
303
+ /* MIDL 2.0+ definitions */
304
+ typedef FMTID *REFFMTID;
305
+ cpp_quote("#endif // 0")
306
+
307
+ /************************* Misc types ***********************************/
308
+
309
+ // Common typdefs used in API paramaters, gleamed from compobj.h
310
+
311
+ // For IRunningObjectTable::Register
312
+ cpp_quote("#ifndef _ROTFLAGS_DEFINED")
313
+ cpp_quote("#define _ROTFLAGS_DEFINED")
314
+ cpp_quote("#define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1")
315
+ cpp_quote("#define ROTFLAGS_ALLOWANYCLIENT 0x2")
316
+ cpp_quote("#endif // !_ROTFLAGS_DEFINED")
317
+ // Maximum size of comparison buffer for IROTData::GetComparisonData
318
+ cpp_quote("#ifndef _ROT_COMPARE_MAX_DEFINED")
319
+ cpp_quote("#define _ROT_COMPARE_MAX_DEFINED")
320
+ cpp_quote("#define ROT_COMPARE_MAX 2048")
321
+ cpp_quote("#endif // !_ROT_COMPARE_MAX_DEFINED")
322
+
323
+ //
324
+ // Common typedefs for paramaters used in data view API's, gleamed
325
+ // from dvobj.h
326
+ //
327
+
328
+ // Data/View aspect; specifies the desired aspect of the object when
329
+ // drawing or getting data.
330
+ typedef enum tagDVASPECT
331
+ {
332
+ DVASPECT_CONTENT = 1,
333
+ DVASPECT_THUMBNAIL = 2,
334
+ DVASPECT_ICON = 4,
335
+ DVASPECT_DOCPRINT = 8
336
+ } DVASPECT;
337
+
338
+ /****** Storage types *************************************************/
339
+
340
+
341
+ /* Storage commit types */
342
+ typedef enum tagSTGC
343
+ {
344
+ STGC_DEFAULT = 0,
345
+ STGC_OVERWRITE = 1,
346
+ STGC_ONLYIFCURRENT = 2,
347
+ STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
348
+ STGC_CONSOLIDATE = 8
349
+ } STGC;
350
+
351
+
352
+ typedef enum tagSTGMOVE
353
+ {
354
+ STGMOVE_MOVE = 0,
355
+ STGMOVE_COPY = 1,
356
+ STGMOVE_SHALLOWCOPY = 2
357
+ } STGMOVE;
358
+
359
+ typedef enum tagSTATFLAG
360
+ {
361
+ STATFLAG_DEFAULT = 0,
362
+ STATFLAG_NONAME = 1,
363
+ STATFLAG_NOOPEN = 2
364
+ } STATFLAG;
365
+
366
+
367
+ typedef [context_handle] void *HCONTEXT;
368
+
369
+ /****** Critical Section Wrappers ***********************************/
370
+
371
+
372
+ /* if not already picked up from olenls.h */
373
+ cpp_quote("#ifndef _LCID_DEFINED")
374
+ cpp_quote("#define _LCID_DEFINED")
375
+ typedef DWORD LCID;
376
+ cpp_quote("#endif // !_LCID_DEFINED")
377
+
378
+ cpp_quote("#ifndef _LANGID_DEFINED")
379
+ cpp_quote("#define _LANGID_DEFINED")
380
+ typedef USHORT LANGID;
381
+ cpp_quote("#endif // !_LANGID_DEFINED")
382
+
383
+ // #########################################################################
384
+ //
385
+ // Constants for the call context
386
+ //
387
+
388
+ const ULONG WDT_INPROC_CALL = 0x48746457;
389
+ const ULONG WDT_REMOTE_CALL = 0x52746457;
390
+ const ULONG WDT_INPROC64_CALL = 0x50746457;
391
+
392
+
393
+ // #########################################################################
394
+ //
395
+ // CLIPFORMAT
396
+ //
397
+
398
+ typedef union _userCLIPFORMAT switch(LONG fContext) u
399
+ {
400
+ case WDT_INPROC_CALL: DWORD dwValue;
401
+ case WDT_REMOTE_CALL: [string] wchar_t * pwszName;
402
+ } userCLIPFORMAT;
403
+
404
+ typedef [unique] userCLIPFORMAT * wireCLIPFORMAT;
405
+
406
+ typedef [wire_marshal(wireCLIPFORMAT)] WORD CLIPFORMAT;
407
+
408
+
409
+ // #########################################################################
410
+ //
411
+ // Good for most of the gdi handles.
412
+
413
+ typedef union _GDI_NONREMOTE switch( LONG fContext ) u
414
+ {
415
+ case WDT_INPROC_CALL: LONG hInproc;
416
+ case WDT_REMOTE_CALL: DWORD_BLOB *hRemote;
417
+ } GDI_NONREMOTE;
418
+
419
+ // #########################################################################
420
+ //
421
+ // HGLOBAL
422
+ //
423
+ // A global may be Null or may be non-NULL with 0 length.
424
+
425
+ typedef union _userHGLOBAL switch( LONG fContext ) u
426
+ {
427
+ case WDT_INPROC_CALL: LONG hInproc;
428
+ case WDT_REMOTE_CALL: FLAGGED_BYTE_BLOB * hRemote;
429
+ case WDT_INPROC64_CALL: __int64 hInproc64;
430
+ } userHGLOBAL;
431
+
432
+ typedef [unique] userHGLOBAL * wireHGLOBAL;
433
+
434
+ // #########################################################################
435
+ //
436
+ // HMETAFILE
437
+ //
438
+
439
+ typedef union _userHMETAFILE switch( LONG fContext ) u
440
+ {
441
+ case WDT_INPROC_CALL: LONG hInproc;
442
+ case WDT_REMOTE_CALL: BYTE_BLOB * hRemote;
443
+ case WDT_INPROC64_CALL: __int64 hInproc64;
444
+ } userHMETAFILE;
445
+
446
+ // #########################################################################
447
+ //
448
+ // HMETAFILEPICT
449
+ //
450
+ typedef struct _remoteMETAFILEPICT
451
+ {
452
+ LONG mm;
453
+ LONG xExt;
454
+ LONG yExt;
455
+ userHMETAFILE * hMF;
456
+ } remoteMETAFILEPICT;
457
+
458
+ typedef union _userHMETAFILEPICT switch( LONG fContext ) u
459
+ {
460
+ case WDT_INPROC_CALL: LONG hInproc;
461
+ case WDT_REMOTE_CALL: remoteMETAFILEPICT* hRemote;
462
+ case WDT_INPROC64_CALL: __int64 hInproc64;
463
+ } userHMETAFILEPICT;
464
+
465
+ // #########################################################################
466
+ //
467
+ // HENHMETAFILE
468
+ //
469
+
470
+ typedef union _userHENHMETAFILE switch( LONG fContext ) u
471
+ {
472
+ case WDT_INPROC_CALL: LONG hInproc;
473
+ case WDT_REMOTE_CALL: BYTE_BLOB * hRemote;
474
+ case WDT_INPROC64_CALL: __int64 hInproc64;
475
+ } userHENHMETAFILE;
476
+
477
+ // #########################################################################
478
+ //
479
+ // HBITMAP
480
+ //
481
+
482
+ // RemHBITMAP was just a byte blob, but the whole bitmap structure was copied
483
+ // at the beginning of the buffer.
484
+
485
+ // So, we take BITMAP fields from wingdi.x
486
+
487
+ typedef struct _userBITMAP
488
+ {
489
+ LONG bmType;
490
+ LONG bmWidth;
491
+ LONG bmHeight;
492
+ LONG bmWidthBytes;
493
+ WORD bmPlanes;
494
+ WORD bmBitsPixel;
495
+ ULONG cbSize;
496
+ [size_is(cbSize)] byte pBuffer[];
497
+ } userBITMAP;
498
+
499
+
500
+ typedef union _userHBITMAP switch( LONG fContext ) u
501
+ {
502
+ case WDT_INPROC_CALL: LONG hInproc;
503
+ case WDT_REMOTE_CALL: userBITMAP * hRemote;
504
+ case WDT_INPROC64_CALL: __int64 hInproc64;
505
+ } userHBITMAP;
506
+
507
+ // #########################################################################
508
+ //
509
+ // HPALETTE
510
+ //
511
+
512
+ // PALETTEENTRY is in wingdi.x, it is a struct with 4 bytes.
513
+ // LOGPALETTE is in wingdi.x, it is a conf struct with paletteentries and
514
+ // a version field
515
+
516
+ typedef union _userHPALETTE switch( LONG fContext ) u
517
+ {
518
+ case WDT_INPROC_CALL: LONG hInproc;
519
+ case WDT_REMOTE_CALL: LOGPALETTE * hRemote;
520
+ case WDT_INPROC64_CALL: __int64 hInproc64;
521
+ } userHPALETTE;
522
+
523
+ // #########################################################################
524
+ //
525
+ // Handles passed locally as longs.
526
+ //
527
+
528
+ typedef union _RemotableHandle switch( LONG fContext ) u
529
+ {
530
+ case WDT_INPROC_CALL: LONG hInproc;
531
+ case WDT_REMOTE_CALL: LONG hRemote;
532
+ } RemotableHandle;
533
+
534
+ typedef [unique] RemotableHandle * wireHWND;
535
+ typedef [unique] RemotableHandle * wireHMENU;
536
+ typedef [unique] RemotableHandle * wireHACCEL;
537
+ typedef [unique] RemotableHandle * wireHBRUSH;
538
+ typedef [unique] RemotableHandle * wireHFONT;
539
+ typedef [unique] RemotableHandle * wireHDC;
540
+ typedef [unique] RemotableHandle * wireHICON;
541
+ typedef [unique] RemotableHandle * wireHRGN;
542
+ typedef [unique] RemotableHandle * wireHMONITOR;
543
+
544
+
545
+ cpp_quote("#if 0")
546
+ #ifndef _MIDL_DECLARE_WIREM_HANDLE
547
+ DECLARE_WIREM_HANDLE( HWND );
548
+ DECLARE_WIREM_HANDLE( HMENU );
549
+ DECLARE_WIREM_HANDLE( HACCEL );
550
+ DECLARE_WIREM_HANDLE( HBRUSH );
551
+ DECLARE_WIREM_HANDLE( HFONT );
552
+ DECLARE_WIREM_HANDLE( HDC );
553
+ DECLARE_WIREM_HANDLE( HICON );
554
+ DECLARE_WIREM_HANDLE( HRGN );
555
+ DECLARE_WIREM_HANDLE( HMONITOR );
556
+ #endif
557
+
558
+ cpp_quote("#ifndef _HCURSOR_DEFINED")
559
+ cpp_quote("#define _HCURSOR_DEFINED")
560
+ typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */
561
+ cpp_quote("#endif // !_HCURSOR_DEFINED")
562
+
563
+ cpp_quote("#endif //0")
564
+
565
+ cpp_quote("#ifndef _TEXTMETRIC_DEFINED")
566
+ cpp_quote("#define _TEXTMETRIC_DEFINED")
567
+ typedef struct tagTEXTMETRICW {
568
+ LONG tmHeight;
569
+ LONG tmAscent;
570
+ LONG tmDescent;
571
+ LONG tmInternalLeading;
572
+ LONG tmExternalLeading;
573
+ LONG tmAveCharWidth;
574
+ LONG tmMaxCharWidth;
575
+ LONG tmWeight;
576
+ LONG tmOverhang;
577
+ LONG tmDigitizedAspectX;
578
+ LONG tmDigitizedAspectY;
579
+ WCHAR tmFirstChar;
580
+ WCHAR tmLastChar;
581
+ WCHAR tmDefaultChar;
582
+ WCHAR tmBreakChar;
583
+ BYTE tmItalic;
584
+ BYTE tmUnderlined;
585
+ BYTE tmStruckOut;
586
+ BYTE tmPitchAndFamily;
587
+ BYTE tmCharSet;
588
+ } TEXTMETRICW, *PTEXTMETRICW, *LPTEXTMETRICW;
589
+ cpp_quote("#endif // !_TEXTMETRIC_DEFINED")
590
+
591
+
592
+ cpp_quote("#ifndef _WIN32 // The following code is for Win16 only")
593
+ cpp_quote("#ifndef WINAPI // If not included with 3.1 headers...")
594
+
595
+ // Message structure
596
+
597
+ typedef struct tagMSG {
598
+ HWND hwnd;
599
+ UINT message;
600
+ WPARAM wParam;
601
+ LPARAM lParam;
602
+ DWORD time;
603
+ POINT pt;
604
+ } MSG, *PMSG, *NPMSG, *LPMSG;
605
+ cpp_quote("#endif // _WIN32")
606
+ cpp_quote("#endif // WINAPI")
607
+
608
+ typedef [unique] userHBITMAP * wireHBITMAP;
609
+ typedef [unique] userHPALETTE * wireHPALETTE;
610
+ typedef [unique] userHENHMETAFILE * wireHENHMETAFILE;
611
+ typedef [unique] userHMETAFILE * wireHMETAFILE;
612
+ typedef [unique] userHMETAFILEPICT* wireHMETAFILEPICT;
613
+
614
+ cpp_quote("#if 0")
615
+ DECLARE_WIREM_HANDLE( HGLOBAL );
616
+ typedef HGLOBAL HLOCAL;
617
+ DECLARE_WIREM_HANDLE( HBITMAP );
618
+ DECLARE_WIREM_HANDLE( HPALETTE );
619
+ DECLARE_WIREM_HANDLE( HENHMETAFILE );
620
+ DECLARE_WIREM_HANDLE( HMETAFILE );
621
+ cpp_quote("#endif //0")
622
+
623
+ DECLARE_WIREM_HANDLE( HMETAFILEPICT );
624
+
625
+ }
626
+
627
+ // #########################################################################
628
+ //
629
+
630
+ cpp_quote("#if ( _MSC_VER >= 800 )")
631
+ cpp_quote("#if _MSC_VER >= 1200")
632
+ cpp_quote("#pragma warning(push)")
633
+ cpp_quote("#endif")
634
+ cpp_quote("#pragma warning(disable:4201)")
635
+ cpp_quote("#endif")
636
+
637
+ typedef double DATE;
638
+
639
+ /* This is a helper struct for use in handling currency. */
640
+ cpp_quote("#ifndef _tagCY_DEFINED")
641
+ cpp_quote("#define _tagCY_DEFINED")
642
+ cpp_quote("#define _CY_DEFINED")
643
+
644
+ cpp_quote("#if 0")
645
+
646
+ cpp_quote("/* the following isn't the real definition of CY, but it is */")
647
+ cpp_quote("/* what RPC knows how to remote */")
648
+ typedef struct tagCY {
649
+ LONGLONG int64;
650
+ } CY;
651
+
652
+ cpp_quote("#else /* 0 */")
653
+
654
+ cpp_quote("/* real definition that makes the C++ compiler happy */")
655
+ cpp_quote("typedef union tagCY {")
656
+ cpp_quote(" struct {")
657
+ cpp_quote(" ULONG Lo;")
658
+ cpp_quote(" LONG Hi;")
659
+ cpp_quote(" } DUMMYSTRUCTNAME;")
660
+ cpp_quote(" LONGLONG int64;")
661
+ cpp_quote("} CY;")
662
+
663
+ cpp_quote("#endif /* 0 */")
664
+
665
+ cpp_quote("#endif /* _tagCY_DEFINED */")
666
+
667
+ typedef CY *LPCY;
668
+
669
+ cpp_quote("#if 0 /* _tagDEC_DEFINED */")
670
+ cpp_quote("/* The following isn't the real definition of Decimal type, */")
671
+ cpp_quote("/* but it is what RPC knows how to remote */")
672
+
673
+ typedef struct tagDEC {
674
+ USHORT wReserved;
675
+ BYTE scale;
676
+ BYTE sign;
677
+ ULONG Hi32;
678
+ ULONGLONG Lo64;
679
+ } DECIMAL;
680
+
681
+ cpp_quote("#else /* _tagDEC_DEFINED */")
682
+
683
+ cpp_quote("/* real definition that makes the C++ compiler happy */")
684
+ cpp_quote("typedef struct tagDEC {")
685
+ cpp_quote(" USHORT wReserved;")
686
+ cpp_quote(" union {")
687
+ cpp_quote(" struct {")
688
+ cpp_quote(" BYTE scale;")
689
+ cpp_quote(" BYTE sign;")
690
+ cpp_quote(" } DUMMYSTRUCTNAME;")
691
+ cpp_quote(" USHORT signscale;")
692
+ cpp_quote(" } DUMMYUNIONNAME;")
693
+ cpp_quote(" ULONG Hi32;")
694
+ cpp_quote(" union {")
695
+ cpp_quote(" struct {")
696
+ cpp_quote(" ULONG Lo32;")
697
+ cpp_quote(" ULONG Mid32;")
698
+ cpp_quote(" } DUMMYSTRUCTNAME2;")
699
+ cpp_quote(" ULONGLONG Lo64;")
700
+ cpp_quote(" } DUMMYUNIONNAME2;")
701
+ cpp_quote("} DECIMAL;")
702
+
703
+ cpp_quote("#define DECIMAL_NEG ((BYTE)0x80)")
704
+ cpp_quote("#define DECIMAL_SETZERO(dec) \\")
705
+ cpp_quote(" {(dec).Lo64 = 0; (dec).Hi32 = 0; (dec).signscale = 0;}")
706
+
707
+ cpp_quote("#endif /* _tagDEC_DEFINED */")
708
+
709
+ typedef DECIMAL *LPDECIMAL;
710
+
711
+ cpp_quote("#if ( _MSC_VER >= 800 )")
712
+ cpp_quote("#if _MSC_VER >= 1200")
713
+ cpp_quote("#pragma warning(pop)")
714
+ cpp_quote("#else")
715
+ cpp_quote("#pragma warning(default:4201)")
716
+ cpp_quote("#endif")
717
+ cpp_quote("#endif")
718
+
719
+ /* IDL declarations for BSTR how to transmit them */
720
+ //
721
+ typedef [unique] FLAGGED_WORD_BLOB * wireBSTR;
722
+ cpp_quote("#ifndef _PREFAST_")
723
+ typedef [wire_marshal( wireBSTR )] OLECHAR * BSTR;
724
+ cpp_quote("#else // _PREFAST_")
725
+ cpp_quote("typedef _Null_terminated_ OLECHAR *BSTR;")
726
+ cpp_quote("#endif")
727
+ typedef BSTR * LPBSTR;
728
+
729
+ cpp_quote("/* 0 == FALSE, -1 == TRUE */")
730
+ typedef short VARIANT_BOOL;
731
+
732
+ cpp_quote("/* The BSTRBLOB structure is used by some implementations */")
733
+ cpp_quote("/* of the IPropertyStorage interface when marshaling BSTRs */")
734
+ cpp_quote("/* on systems which don't support BSTR marshaling. */")
735
+
736
+ cpp_quote("#ifndef _tagBSTRBLOB_DEFINED")
737
+ cpp_quote("#define _tagBSTRBLOB_DEFINED")
738
+ typedef struct tagBSTRBLOB
739
+ {
740
+ ULONG cbSize;
741
+ [size_is(cbSize)] BYTE *pData;
742
+ } BSTRBLOB, *LPBSTRBLOB;
743
+ cpp_quote("#endif")
744
+
745
+ cpp_quote("#define VARIANT_TRUE ((VARIANT_BOOL)-1)")
746
+ cpp_quote("#define VARIANT_FALSE ((VARIANT_BOOL)0)")
747
+
748
+ typedef struct tagCLIPDATA {
749
+ ULONG cbSize; // count that includes sizeof(ulClipFmt)
750
+ LONG ulClipFmt; // LONG to keep alignment
751
+ [size_is(cbSize-4)]
752
+ BYTE * pClipData; // cbSize-sizeof(ULONG) bytes of data in clipboard format
753
+ } CLIPDATA;
754
+
755
+ cpp_quote("// Macro to calculate the size of the above pClipData")
756
+ cpp_quote("#define CBPCLIPDATA(clipdata) ( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )")
757
+
758
+
759
+ typedef unsigned short VARTYPE;
760
+
761
+ // #########################################################################
762
+ //
763
+ // VARTYPE
764
+ //
765
+ // #########################################################################
766
+
767
+
768
+ cpp_quote("/*")
769
+ cpp_quote(" * VARENUM usage key,")
770
+ cpp_quote(" *")
771
+ cpp_quote(" * * [V] - may appear in a VARIANT")
772
+ cpp_quote(" * * [T] - may appear in a TYPEDESC")
773
+ cpp_quote(" * * [P] - may appear in an OLE property set")
774
+ cpp_quote(" * * [S] - may appear in a Safe Array")
775
+ cpp_quote(" *")
776
+ cpp_quote(" *")
777
+ cpp_quote(" * VT_EMPTY [V] [P] nothing")
778
+ cpp_quote(" * VT_NULL [V] [P] SQL style Null")
779
+ cpp_quote(" * VT_I2 [V][T][P][S] 2 byte signed int")
780
+ cpp_quote(" * VT_I4 [V][T][P][S] 4 byte signed int")
781
+ cpp_quote(" * VT_R4 [V][T][P][S] 4 byte real")
782
+ cpp_quote(" * VT_R8 [V][T][P][S] 8 byte real")
783
+ cpp_quote(" * VT_CY [V][T][P][S] currency")
784
+ cpp_quote(" * VT_DATE [V][T][P][S] date")
785
+ cpp_quote(" * VT_BSTR [V][T][P][S] OLE Automation string")
786
+ cpp_quote(" * VT_DISPATCH [V][T] [S] IDispatch *")
787
+ cpp_quote(" * VT_ERROR [V][T][P][S] SCODE")
788
+ cpp_quote(" * VT_BOOL [V][T][P][S] True=-1, False=0")
789
+ cpp_quote(" * VT_VARIANT [V][T][P][S] VARIANT *")
790
+ cpp_quote(" * VT_UNKNOWN [V][T] [S] IUnknown *")
791
+ cpp_quote(" * VT_DECIMAL [V][T] [S] 16 byte fixed point")
792
+ cpp_quote(" * VT_RECORD [V] [P][S] user defined type")
793
+ cpp_quote(" * VT_I1 [V][T][P][s] signed char")
794
+ cpp_quote(" * VT_UI1 [V][T][P][S] unsigned char")
795
+ cpp_quote(" * VT_UI2 [V][T][P][S] unsigned short")
796
+ cpp_quote(" * VT_UI4 [V][T][P][S] ULONG")
797
+ cpp_quote(" * VT_I8 [T][P] signed 64-bit int")
798
+ cpp_quote(" * VT_UI8 [T][P] unsigned 64-bit int")
799
+ cpp_quote(" * VT_INT [V][T][P][S] signed machine int")
800
+ cpp_quote(" * VT_UINT [V][T] [S] unsigned machine int")
801
+ cpp_quote(" * VT_INT_PTR [T] signed machine register size width")
802
+ cpp_quote(" * VT_UINT_PTR [T] unsigned machine register size width")
803
+ cpp_quote(" * VT_VOID [T] C style void")
804
+ cpp_quote(" * VT_HRESULT [T] Standard return type")
805
+ cpp_quote(" * VT_PTR [T] pointer type")
806
+ cpp_quote(" * VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)")
807
+ cpp_quote(" * VT_CARRAY [T] C style array")
808
+ cpp_quote(" * VT_USERDEFINED [T] user defined type")
809
+ cpp_quote(" * VT_LPSTR [T][P] null terminated string")
810
+ cpp_quote(" * VT_LPWSTR [T][P] wide null terminated string")
811
+ cpp_quote(" * VT_FILETIME [P] FILETIME")
812
+ cpp_quote(" * VT_BLOB [P] Length prefixed bytes")
813
+ cpp_quote(" * VT_STREAM [P] Name of the stream follows")
814
+ cpp_quote(" * VT_STORAGE [P] Name of the storage follows")
815
+ cpp_quote(" * VT_STREAMED_OBJECT [P] Stream contains an object")
816
+ cpp_quote(" * VT_STORED_OBJECT [P] Storage contains an object")
817
+ cpp_quote(" * VT_VERSIONED_STREAM [P] Stream with a GUID version")
818
+ cpp_quote(" * VT_BLOB_OBJECT [P] Blob contains an object ")
819
+ cpp_quote(" * VT_CF [P] Clipboard format")
820
+ cpp_quote(" * VT_CLSID [P] A Class ID")
821
+ cpp_quote(" * VT_VECTOR [P] simple counted array")
822
+ cpp_quote(" * VT_ARRAY [V] SAFEARRAY*")
823
+ cpp_quote(" * VT_BYREF [V] void* for local use")
824
+ cpp_quote(" * VT_BSTR_BLOB Reserved for system use")
825
+ cpp_quote(" */")
826
+
827
+ enum VARENUM
828
+ {
829
+ VT_EMPTY = 0,
830
+ VT_NULL = 1,
831
+ VT_I2 = 2,
832
+ VT_I4 = 3,
833
+ VT_R4 = 4,
834
+ VT_R8 = 5,
835
+ VT_CY = 6,
836
+ VT_DATE = 7,
837
+ VT_BSTR = 8,
838
+ VT_DISPATCH = 9,
839
+ VT_ERROR = 10,
840
+ VT_BOOL = 11,
841
+ VT_VARIANT = 12,
842
+ VT_UNKNOWN = 13,
843
+ VT_DECIMAL = 14,
844
+ // VBA reserves 15 for future use
845
+ VT_I1 = 16,
846
+ VT_UI1 = 17,
847
+ VT_UI2 = 18,
848
+ VT_UI4 = 19,
849
+ VT_I8 = 20,
850
+ VT_UI8 = 21,
851
+ VT_INT = 22,
852
+ VT_UINT = 23,
853
+ VT_VOID = 24,
854
+ VT_HRESULT = 25,
855
+ VT_PTR = 26,
856
+ VT_SAFEARRAY = 27,
857
+ VT_CARRAY = 28,
858
+ VT_USERDEFINED = 29,
859
+ VT_LPSTR = 30,
860
+ VT_LPWSTR = 31,
861
+ // VBA reserves 32-35 for future use
862
+ VT_RECORD = 36,
863
+ VT_INT_PTR = 37,
864
+ VT_UINT_PTR = 38,
865
+
866
+ VT_FILETIME = 64,
867
+ VT_BLOB = 65,
868
+ VT_STREAM = 66,
869
+ VT_STORAGE = 67,
870
+ VT_STREAMED_OBJECT = 68,
871
+ VT_STORED_OBJECT = 69,
872
+ VT_BLOB_OBJECT = 70,
873
+ VT_CF = 71,
874
+ VT_CLSID = 72,
875
+ VT_VERSIONED_STREAM= 73,
876
+
877
+ VT_BSTR_BLOB = 0x0fff,
878
+
879
+ VT_VECTOR = 0x1000,
880
+ VT_ARRAY = 0x2000,
881
+ VT_BYREF = 0x4000,
882
+ VT_RESERVED = 0x8000,
883
+
884
+ VT_ILLEGAL = 0xffff,
885
+ VT_ILLEGALMASKED = 0x0fff,
886
+ VT_TYPEMASK = 0x0fff
887
+ };
888
+
889
+
890
+ // Property stuff
891
+ typedef ULONG PROPID;
892
+ cpp_quote( "#ifndef PROPERTYKEY_DEFINED" )
893
+ cpp_quote( "#define PROPERTYKEY_DEFINED" )
894
+ typedef struct _tagpropertykey
895
+ {
896
+ GUID fmtid;
897
+ DWORD pid;
898
+ } PROPERTYKEY;
899
+ cpp_quote( "#endif" )
900
+
901
+ // Class Store types
902
+
903
+ //
904
+ // Platform/Architecture Definition
905
+ //
906
+ typedef struct tagCSPLATFORM
907
+ {
908
+ DWORD dwPlatformId; // This is the OS Platform
909
+ DWORD dwVersionHi; // Major Version of OS
910
+ DWORD dwVersionLo; // Minor Version of OS
911
+ DWORD dwProcessorArch; // This is the Processor Architecure
912
+ } CSPLATFORM;
913
+
914
+ //
915
+ // Query Context Structure
916
+ // This contains a list of attributes used to look up a class implementation
917
+ //
918
+ typedef struct tagQUERYCONTEXT {
919
+ DWORD dwContext; // Execution context
920
+ CSPLATFORM Platform; // Client Platform/Architecture
921
+ LCID Locale; // Locale ID
922
+ DWORD dwVersionHi; // Low Version number
923
+ DWORD dwVersionLo; // Hi Version number
924
+ } QUERYCONTEXT;
925
+
926
+
927
+ //
928
+ // Class Specifier structure
929
+ // All means of mapping to a Class ID
930
+ // (Union of CLSID, File Extension, ProgId, MimeType, File Ext)
931
+ //
932
+
933
+ typedef [v1_enum] enum tagTYSPEC {
934
+ TYSPEC_CLSID,
935
+ TYSPEC_FILEEXT,
936
+ TYSPEC_MIMETYPE,
937
+ TYSPEC_FILENAME,
938
+ TYSPEC_PROGID,
939
+ TYSPEC_PACKAGENAME,
940
+ TYSPEC_OBJECTID
941
+ } TYSPEC;
942
+
943
+ typedef union switch(DWORD tyspec)
944
+ {
945
+ case TYSPEC_CLSID:
946
+ CLSID clsid;
947
+ case TYSPEC_FILEEXT:
948
+ LPOLESTR pFileExt;
949
+ case TYSPEC_MIMETYPE:
950
+ LPOLESTR pMimeType;
951
+ case TYSPEC_PROGID:
952
+ LPOLESTR pProgId;
953
+ case TYSPEC_FILENAME:
954
+ LPOLESTR pFileName;
955
+ case TYSPEC_PACKAGENAME:
956
+ struct {
957
+ LPOLESTR pPackageName;
958
+ GUID PolicyId;
959
+ } ByName;
960
+ case TYSPEC_OBJECTID:
961
+ struct {
962
+ GUID ObjectId;
963
+ GUID PolicyId;
964
+ } ByObjectId;
965
+ } uCLSSPEC;
966
+
967
+ cpp_quote("#if _MSC_VER >= 1200")
968
+ cpp_quote("#pragma warning(pop)")
969
+ cpp_quote("#endif")
970
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/WTypesbase.Idl ADDED
@@ -0,0 +1,545 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //+-------------------------------------------------------------------------
2
+ //
3
+ // Microsoft Windows
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // File: wtypesbase.idl
7
+ //
8
+ // Contents: This interface definition contains typedefs for remotable
9
+ // data types.
10
+ //--------------------------------------------------------------------------
11
+
12
+ cpp_quote("//+-------------------------------------------------------------------------")
13
+ cpp_quote("//")
14
+ cpp_quote("// Microsoft Windows")
15
+ cpp_quote("// Copyright (c) Microsoft Corporation. All rights reserved.")
16
+ cpp_quote("//")
17
+ cpp_quote("//--------------------------------------------------------------------------")
18
+ cpp_quote("#if ( _MSC_VER >= 1020 )")
19
+ cpp_quote("#pragma once")
20
+ cpp_quote("#endif")
21
+
22
+ //
23
+ // Import definitions of the base types related to the 64b porting effort.
24
+ //
25
+ import "basetsd.h";
26
+ import "guiddef.h";
27
+
28
+ cpp_quote("#if _MSC_VER >= 1200")
29
+ cpp_quote("#pragma warning(push)")
30
+ cpp_quote("#pragma warning(disable:4820) /* padding added after data member */")
31
+ cpp_quote("#endif")
32
+
33
+ [ uuid(B1BEA154-1C2F-4da9-9ABF-6E2D24EEA1BE),
34
+ version(0.1), pointer_default(unique) ]
35
+
36
+ interface IWinTypesBase
37
+ {
38
+
39
+ // just for local wtypesbase
40
+ cpp_quote("#if 0")
41
+
42
+ typedef byte BYTE;
43
+ typedef unsigned short WORD;
44
+ typedef unsigned int UINT;
45
+ typedef int INT;
46
+ typedef long BOOL;
47
+ typedef long LONG;
48
+ typedef unsigned long DWORD;
49
+ typedef void * HANDLE;
50
+ typedef WORD *LPWORD;
51
+ typedef DWORD *LPDWORD;
52
+ typedef char CHAR;
53
+ typedef [string] CHAR *LPSTR;
54
+ typedef [string] const CHAR *LPCSTR;
55
+ typedef wchar_t WCHAR;
56
+ typedef WCHAR TCHAR;
57
+ typedef [string] WCHAR *LPWSTR;
58
+ typedef [string] TCHAR *LPTSTR;
59
+ typedef [string] const WCHAR *LPCWSTR;
60
+ typedef [string] const TCHAR *LPCTSTR;
61
+ typedef HANDLE *LPHANDLE;
62
+
63
+ // just for local wtypesbase
64
+ cpp_quote("#endif // 0")
65
+
66
+ cpp_quote("#if defined(_WIN32) && !defined(OLE2ANSI)")
67
+
68
+ typedef WCHAR OLECHAR;
69
+ typedef [string] OLECHAR *LPOLESTR;
70
+ typedef [string] const OLECHAR *LPCOLESTR;
71
+ cpp_quote("#define OLESTR(str) L##str")
72
+
73
+ cpp_quote("")
74
+ cpp_quote("#else")
75
+ cpp_quote("")
76
+
77
+ cpp_quote("typedef char OLECHAR;")
78
+ cpp_quote("typedef LPSTR LPOLESTR;")
79
+ cpp_quote("typedef LPCSTR LPCOLESTR;")
80
+ cpp_quote("#define OLESTR(str) str")
81
+
82
+ cpp_quote("#endif")
83
+
84
+
85
+ // This block contains types that are normally defined by the nt sdk in WINDEF.H
86
+ // but we need them here for definitions that follow in this file. If WINDEF.H
87
+ // hasn't been included then we need to define them now so that WTYPESBASE.H
88
+ // will compile.
89
+ cpp_quote("#ifndef _WINDEF_")
90
+ cpp_quote("#ifndef _MINWINDEF_")
91
+ typedef void * PVOID, * LPVOID;
92
+ typedef float FLOAT;
93
+ cpp_quote("#endif //_MINWINDEF_")
94
+ cpp_quote("#endif //_WINDEF_")
95
+
96
+
97
+ typedef unsigned char UCHAR;
98
+ typedef short SHORT;
99
+ typedef unsigned short USHORT;
100
+ typedef DWORD ULONG;
101
+ typedef double DOUBLE;
102
+
103
+ cpp_quote("#ifndef _DWORDLONG_")
104
+ typedef unsigned __int64 DWORDLONG;
105
+ typedef DWORDLONG *PDWORDLONG;
106
+ cpp_quote("#endif // !_DWORDLONG_")
107
+
108
+ cpp_quote("#ifndef _ULONGLONG_")
109
+ typedef __int64 LONGLONG;
110
+ typedef unsigned __int64 ULONGLONG;
111
+ typedef LONGLONG *PLONGLONG;
112
+ typedef ULONGLONG *PULONGLONG;
113
+ cpp_quote("#endif // _ULONGLONG_")
114
+
115
+ // just for local wtypesbase
116
+ cpp_quote("#if 0")
117
+
118
+ typedef struct _LARGE_INTEGER {
119
+ LONGLONG QuadPart;
120
+ } LARGE_INTEGER;
121
+
122
+ typedef LARGE_INTEGER *PLARGE_INTEGER;
123
+
124
+ typedef struct _ULARGE_INTEGER {
125
+ ULONGLONG QuadPart;
126
+ } ULARGE_INTEGER;
127
+
128
+ // just for local wtypesbase
129
+ cpp_quote("#endif // 0")
130
+
131
+
132
+ cpp_quote("#ifndef _WINBASE_")
133
+
134
+ cpp_quote("#ifndef _FILETIME_")
135
+ cpp_quote("#define _FILETIME_")
136
+ typedef struct _FILETIME
137
+ {
138
+ DWORD dwLowDateTime;
139
+ DWORD dwHighDateTime;
140
+ } FILETIME, *PFILETIME, *LPFILETIME;
141
+ cpp_quote("#endif // !_FILETIME")
142
+
143
+ cpp_quote("#ifndef _SYSTEMTIME_")
144
+ cpp_quote("#define _SYSTEMTIME_")
145
+ typedef struct _SYSTEMTIME {
146
+ WORD wYear;
147
+ WORD wMonth;
148
+ WORD wDayOfWeek;
149
+ WORD wDay;
150
+ WORD wHour;
151
+ WORD wMinute;
152
+ WORD wSecond;
153
+ WORD wMilliseconds;
154
+ } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
155
+
156
+ cpp_quote("#endif // !_SYSTEMTIME")
157
+
158
+ cpp_quote("#ifndef _SECURITY_ATTRIBUTES_")
159
+ cpp_quote("#define _SECURITY_ATTRIBUTES_")
160
+ typedef struct _SECURITY_ATTRIBUTES {
161
+ DWORD nLength;
162
+ LPVOID lpSecurityDescriptor;
163
+ BOOL bInheritHandle;
164
+ } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;
165
+ cpp_quote("#endif // !_SECURITY_ATTRIBUTES_")
166
+
167
+ cpp_quote("#ifndef SECURITY_DESCRIPTOR_REVISION")
168
+
169
+ typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
170
+
171
+ typedef PVOID PSID; // winnt
172
+
173
+ typedef struct _ACL {
174
+ UCHAR AclRevision;
175
+ UCHAR Sbz1;
176
+ USHORT AclSize;
177
+ USHORT AceCount;
178
+ USHORT Sbz2;
179
+ } ACL;
180
+ typedef ACL *PACL;
181
+
182
+ typedef struct _SECURITY_DESCRIPTOR {
183
+ UCHAR Revision;
184
+ UCHAR Sbz1;
185
+ SECURITY_DESCRIPTOR_CONTROL Control;
186
+ PSID Owner;
187
+ PSID Group;
188
+ PACL Sacl;
189
+ PACL Dacl;
190
+ } SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR;
191
+
192
+ cpp_quote("#endif // !SECURITY_DESCRIPTOR_REVISION")
193
+
194
+ cpp_quote("#endif //_WINBASE_")
195
+
196
+ typedef struct _COAUTHIDENTITY
197
+ {
198
+ // User and Password length from lmcons.h
199
+ // Domain length === FQDN length which is 256
200
+ [size_is(UserLength+1)] USHORT * User;
201
+ [range(0,256)]ULONG UserLength;
202
+ [size_is(DomainLength+1)] USHORT * Domain;
203
+ [range(0,256)]ULONG DomainLength;
204
+ [size_is(PasswordLength+1)] USHORT * Password;
205
+ [range(0,256)]ULONG PasswordLength;
206
+ ULONG Flags;
207
+ } COAUTHIDENTITY;
208
+
209
+ typedef struct _COAUTHINFO
210
+ {
211
+ DWORD dwAuthnSvc;
212
+ DWORD dwAuthzSvc;
213
+ LPWSTR pwszServerPrincName;
214
+ DWORD dwAuthnLevel;
215
+ DWORD dwImpersonationLevel;
216
+ COAUTHIDENTITY * pAuthIdentityData;
217
+ DWORD dwCapabilities;
218
+ } COAUTHINFO;
219
+
220
+ //
221
+ // SCODE, HRESULT
222
+ //
223
+ //
224
+ // Status values are 32 bit values layed out as follows:
225
+ //
226
+ // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
227
+ // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
228
+ // +-+-----------------------------+-------------------------------+
229
+ // |S| Facility | Code |
230
+ // +-+-----------------------------+-------------------------------+
231
+ //
232
+ // where
233
+ //
234
+ // S - is the severity code
235
+ //
236
+ // 0 - Success
237
+ // 1 - Error
238
+ //
239
+ //
240
+ // Facility - is the facility code
241
+ //
242
+ // Code - is the facility's status code
243
+ //
244
+ // SCODE and HRESULT are mktyplib base types.
245
+ //
246
+ typedef LONG SCODE;
247
+ typedef SCODE *PSCODE;
248
+
249
+ cpp_quote("#ifndef _HRESULT_DEFINED")
250
+ cpp_quote("#define _HRESULT_DEFINED")
251
+ #if defined(_STRICT_HRESULT)
252
+ typedef struct _HRESULT_STRUCT {
253
+ DWORD Data1;
254
+ } HRESULT_STRUCT, *PHRESULT_STRUCT;
255
+ typedef PHRESULT_STRUCT HRESULT;
256
+ #else // defined(_STRICT_HRESULT)
257
+ cpp_quote("#ifdef __midl")
258
+ typedef LONG HRESULT;
259
+ cpp_quote("#else // __midl")
260
+ cpp_quote("typedef _Return_type_success_(return >= 0) LONG HRESULT;")
261
+ cpp_quote("#endif // __midl")
262
+ #endif // defined(_STRICT_HRESULT)
263
+ cpp_quote("#endif // !_HRESULT_DEFINED")
264
+ cpp_quote("")
265
+
266
+ cpp_quote("#ifndef __OBJECTID_DEFINED")
267
+ cpp_quote("#define __OBJECTID_DEFINED")
268
+ cpp_quote("#define _OBJECTID_DEFINED")
269
+ typedef struct _OBJECTID // NOTE!! Order of structure members is important for OFS
270
+ { // enumeration.
271
+ GUID Lineage; // Unique for objects copied from same original and copies of.
272
+ ULONG Uniquifier; // Random, to provide uniqueness within small set with same
273
+ } OBJECTID; // lineage id.
274
+ cpp_quote("#endif // !_OBJECTID_DEFINED")
275
+
276
+ //The following typedefs are used internally by MIDL.
277
+ cpp_quote("#if 0")
278
+ /* MIDL 2.0+ definitions */
279
+ typedef GUID *REFGUID;
280
+ typedef IID *REFIID;
281
+ typedef CLSID *REFCLSID;
282
+ cpp_quote("#endif // 0")
283
+
284
+ /************************* Misc types ***********************************/
285
+
286
+ // Common typdefs used in API paramaters, gleamed from compobj.h
287
+
288
+ // memory context values; passed to CoGetMalloc
289
+ typedef enum tagMEMCTX
290
+ {
291
+ MEMCTX_TASK = 1, // task (private) memory
292
+ MEMCTX_SHARED = 2, // shared memory (between processes)
293
+ MEMCTX_MACSYSTEM = 3, // on the mac, the system heap
294
+ // these are mostly for internal use...
295
+ MEMCTX_UNKNOWN = -1, // unknown context (when asked about it)
296
+ MEMCTX_SAME = -2, // same context (as some other pointer)
297
+ } MEMCTX;
298
+
299
+ // For ROT registry flags under AppID
300
+ cpp_quote("#ifndef _ROTREGFLAGS_DEFINED")
301
+ cpp_quote("#define _ROTREGFLAGS_DEFINED")
302
+ cpp_quote("#define ROTREGFLAGS_ALLOWANYCLIENT 0x1")
303
+ cpp_quote("#endif // !_ROTREGFLAGS_DEFINED")
304
+
305
+ // For AppID registry flags under AppID
306
+ cpp_quote("#ifndef _APPIDREGFLAGS_DEFINED")
307
+ cpp_quote("#define _APPIDREGFLAGS_DEFINED")
308
+ cpp_quote("#define APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP 0x1")
309
+ cpp_quote("#define APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND 0x2")
310
+ cpp_quote("#define APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY 0x4")
311
+ cpp_quote("#define APPIDREGFLAGS_IUSERVER_UNMODIFIED_LOGON_TOKEN 0x8")
312
+ cpp_quote("#define APPIDREGFLAGS_IUSERVER_SELF_SID_IN_LAUNCH_PERMISSION 0x10")
313
+ cpp_quote("#define APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY 0x20")
314
+ cpp_quote("#define APPIDREGFLAGS_RESERVED1 0x40")
315
+ cpp_quote("#define APPIDREGFLAGS_RESERVED2 0x80")
316
+ cpp_quote("#define APPIDREGFLAGS_RESERVED3 0x100")
317
+ cpp_quote("#define APPIDREGFLAGS_RESERVED4 0x200")
318
+ cpp_quote("#define APPIDREGFLAGS_RESERVED5 0x400")
319
+ cpp_quote("#define APPIDREGFLAGS_AAA_NO_IMPLICIT_ACTIVATE_AS_IU 0x800")
320
+ cpp_quote("#define APPIDREGFLAGS_RESERVED7 0x1000")
321
+ cpp_quote("#define APPIDREGFLAGS_RESERVED8 0x2000")
322
+ cpp_quote("#define APPIDREGFLAGS_RESERVED9 0x4000")
323
+ cpp_quote("#define APPIDREGFLAGS_RESERVED10 0x8000")
324
+ cpp_quote("#endif // !_APPIDREGFLAGS_DEFINED")
325
+
326
+ // Flags controlling security behavior of SCM/Resolver calls from RPCSS
327
+ cpp_quote("#ifndef _DCOMSCM_REMOTECALL_FLAGS_DEFINED")
328
+ cpp_quote("#define _DCOMSCM_REMOTECALL_FLAGS_DEFINED")
329
+ cpp_quote("#define DCOMSCM_ACTIVATION_USE_ALL_AUTHNSERVICES 0x1")
330
+ cpp_quote("#define DCOMSCM_ACTIVATION_DISALLOW_UNSECURE_CALL 0x2")
331
+ cpp_quote("#define DCOMSCM_RESOLVE_USE_ALL_AUTHNSERVICES 0x4")
332
+ cpp_quote("#define DCOMSCM_RESOLVE_DISALLOW_UNSECURE_CALL 0x8")
333
+ cpp_quote("#define DCOMSCM_PING_USE_MID_AUTHNSERVICE 0x10")
334
+ cpp_quote("#define DCOMSCM_PING_DISALLOW_UNSECURE_CALL 0x20")
335
+ cpp_quote("#endif // !_DCOMSCM_REMOTECALL_FLAGS_DEFINED")
336
+
337
+
338
+ // class context: used to determine what scope and kind of class object to use
339
+ // NOTE: this is a bitwise enum
340
+ typedef enum tagCLSCTX
341
+ {
342
+ CLSCTX_INPROC_SERVER = 0x01, // server dll (runs in same process as caller)
343
+ CLSCTX_INPROC_HANDLER = 0x02, // handler dll (runs in same process as caller)
344
+ CLSCTX_LOCAL_SERVER = 0x04, // server exe (runs on same machine; diff proc)
345
+ CLSCTX_INPROC_SERVER16 = 0x08, // 16-bit server dll (runs in same process as caller)
346
+ CLSCTX_REMOTE_SERVER = 0x10, // remote server exe (runs on different machine)
347
+ CLSCTX_INPROC_HANDLER16 = 0x20, // 16-bit handler dll (runs in same process as caller)
348
+ CLSCTX_RESERVED1 = 0x40, // formerly INPROC_SERVERX86, deprecated
349
+ CLSCTX_RESERVED2 = 0x80, // formerly INPROC_HANDLERX86, deprecated
350
+ CLSCTX_RESERVED3 = 0x100, // formerly ESERVER_HANDLER, deprecated
351
+ CLSCTX_RESERVED4 = 0x200, // formerly CLSCTX_KERNEL_SERVER, now used only in kmode
352
+ CLSCTX_NO_CODE_DOWNLOAD = 0x400, // disallow code download from the Directory Service (if any) or the internet
353
+ CLSCTX_RESERVED5 = 0x800, // formerly NO_WX86_TRANSLATION, deprecated
354
+ CLSCTX_NO_CUSTOM_MARSHAL = 0x1000,
355
+ CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000,
356
+ // allow code download from the Directory Service (if any) or the internet
357
+ CLSCTX_NO_FAILURE_LOG = 0x4000, // do not log messages about activation failure (should one occur) to Event Log
358
+ CLSCTX_DISABLE_AAA = 0x8000, // Disable activate-as-activator capability for this activation only
359
+ CLSCTX_ENABLE_AAA = 0x10000, // Enable activate-as-activator capability for this activation only
360
+ CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000, // Begin this activation from the default context of the current apartment
361
+ CLSCTX_ACTIVATE_X86_SERVER = 0x40000, // Pick x86 server only
362
+ CLSCTX_ACTIVATE_32_BIT_SERVER = CLSCTX_ACTIVATE_X86_SERVER, // Old name for CLSCTX_ACTIVATE_X86_SERVER; value must be identical for compatibility
363
+ CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000, // Pick 64-bit server only
364
+ CLSCTX_ENABLE_CLOAKING = 0x100000, // Use the thread token (if present) for the activation.
365
+ // The following flag is internal only
366
+ CLSCTX_APPCONTAINER = 0x400000, // Internal CLSCTX used to indicate activation is for app container
367
+ CLSCTX_ACTIVATE_AAA_AS_IU = 0x800000, // Interactive User activation behavior for As-Activator servers.
368
+ CLSCTX_RESERVED6 = 0x1000000, // reserved
369
+ CLSCTX_ACTIVATE_ARM32_SERVER = 0x2000000, // Pick ARM32 server only
370
+ CLSCTX_ALLOW_LOWER_TRUST_REGISTRATION = 0x4000000, // allow activations of servers configured in insufficiently trusted locations.
371
+ CLSCTX_SERVER_MUST_BE_EQUAL_OR_GREATER_PRIVILEGE = 0x8000000, // do not activate the server unless it has privilege equal to the caller or greater
372
+ CLSCTX_DO_NOT_ELEVATE_SERVER = 0x10000000, // do not propagate the caller’s elevated privilege to the server
373
+ CLSCTX_PS_DLL = 0x80000000, // Internal CLSCTX used for loading Proxy/Stub DLLs
374
+ } CLSCTX;
375
+
376
+ cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(CLSCTX);")
377
+
378
+ cpp_quote("#define CLSCTX_VALID_MASK \\")
379
+ cpp_quote(" (CLSCTX_INPROC_SERVER | \\")
380
+ cpp_quote(" CLSCTX_INPROC_HANDLER | \\")
381
+ cpp_quote(" CLSCTX_LOCAL_SERVER | \\")
382
+ cpp_quote(" CLSCTX_INPROC_SERVER16 | \\")
383
+ cpp_quote(" CLSCTX_REMOTE_SERVER | \\")
384
+ cpp_quote(" CLSCTX_NO_CODE_DOWNLOAD | \\")
385
+ cpp_quote(" CLSCTX_NO_CUSTOM_MARSHAL | \\")
386
+ cpp_quote(" CLSCTX_ENABLE_CODE_DOWNLOAD | \\")
387
+ cpp_quote(" CLSCTX_NO_FAILURE_LOG | \\")
388
+ cpp_quote(" CLSCTX_DISABLE_AAA | \\")
389
+ cpp_quote(" CLSCTX_ENABLE_AAA | \\")
390
+ cpp_quote(" CLSCTX_FROM_DEFAULT_CONTEXT | \\")
391
+ cpp_quote(" CLSCTX_ACTIVATE_X86_SERVER | \\")
392
+ cpp_quote(" CLSCTX_ACTIVATE_64_BIT_SERVER | \\")
393
+ cpp_quote(" CLSCTX_ENABLE_CLOAKING | \\")
394
+ cpp_quote(" CLSCTX_APPCONTAINER | \\")
395
+ cpp_quote(" CLSCTX_ACTIVATE_AAA_AS_IU | \\")
396
+ cpp_quote(" CLSCTX_RESERVED6 | \\")
397
+ cpp_quote(" CLSCTX_ACTIVATE_ARM32_SERVER | \\")
398
+ cpp_quote(" CLSCTX_ALLOW_LOWER_TRUST_REGISTRATION | \\")
399
+ cpp_quote(" CLSCTX_DO_NOT_ELEVATE_SERVER | \\")
400
+ cpp_quote(" CLSCTX_SERVER_MUST_BE_EQUAL_OR_GREATER_PRIVILEGE | \\")
401
+ cpp_quote(" CLSCTX_PS_DLL)")
402
+
403
+ // marshaling flags; passed to CoMarshalInterface
404
+ typedef enum tagMSHLFLAGS
405
+ {
406
+ MSHLFLAGS_NORMAL = 0, // normal marshaling via proxy/stub
407
+ MSHLFLAGS_TABLESTRONG = 1, // keep object alive; must explicitly release
408
+ MSHLFLAGS_TABLEWEAK = 2, // doesn't hold object alive; still must release
409
+ MSHLFLAGS_NOPING = 4, // remote clients dont 'ping' to keep objects alive
410
+ MSHLFLAGS_RESERVED1 = 8, // reserved
411
+ MSHLFLAGS_RESERVED2 = 16, // reserved
412
+ MSHLFLAGS_RESERVED3 = 32, // reserved
413
+ MSHLFLAGS_RESERVED4 = 64 // reserved
414
+ } MSHLFLAGS;
415
+
416
+
417
+ // marshal context: determines the destination context of the marshal operation
418
+ typedef enum tagMSHCTX
419
+ {
420
+ MSHCTX_LOCAL = 0, // unmarshal context is local (e.g. shared memory)
421
+ MSHCTX_NOSHAREDMEM = 1, // unmarshal context has no shared memory access
422
+ MSHCTX_DIFFERENTMACHINE = 2,// unmarshal context is on a different machine
423
+ MSHCTX_INPROC = 3, // unmarshal context is on different thread
424
+ MSHCTX_CROSSCTX = 4, // unmarshal context is on different context
425
+ MSHCTX_CONTAINER = 5, // unmarshal context is in a different container
426
+ } MSHCTX;
427
+
428
+ // #######################################################################
429
+ //
430
+ // User marshal support for Windows data types.
431
+
432
+ //
433
+ // Frequently used helpers: sized blobs
434
+ //
435
+ // Never put [user_marshal] or [wire_marshal] on the helpers directly.
436
+ //
437
+
438
+ // Simple blobs.
439
+
440
+ typedef struct _BYTE_BLOB {
441
+ ULONG clSize;
442
+ [size_is(clSize)] byte abData[];
443
+ } BYTE_BLOB;
444
+
445
+ typedef [unique] BYTE_BLOB * UP_BYTE_BLOB;
446
+
447
+ typedef struct _WORD_BLOB {
448
+ ULONG clSize;
449
+ [size_is(clSize)] unsigned short asData[];
450
+ } WORD_BLOB;
451
+
452
+ typedef [unique] WORD_BLOB * UP_WORD_BLOB;
453
+
454
+ typedef struct _DWORD_BLOB {
455
+ ULONG clSize;
456
+ [size_is(clSize)] ULONG alData[];
457
+ } DWORD_BLOB;
458
+
459
+ typedef [unique] DWORD_BLOB * UP_DWORD_BLOB;
460
+
461
+ // Flagged blobs.
462
+
463
+ typedef struct _FLAGGED_BYTE_BLOB {
464
+ ULONG fFlags;
465
+ ULONG clSize;
466
+ [size_is(clSize)] byte abData[];
467
+ } FLAGGED_BYTE_BLOB;
468
+
469
+ typedef [unique] FLAGGED_BYTE_BLOB * UP_FLAGGED_BYTE_BLOB;
470
+
471
+ typedef struct _FLAGGED_WORD_BLOB {
472
+ ULONG fFlags;
473
+ ULONG clSize;
474
+ [size_is(clSize)] unsigned short asData[];
475
+ } FLAGGED_WORD_BLOB;
476
+
477
+ typedef [unique] FLAGGED_WORD_BLOB * UP_FLAGGED_WORD_BLOB;
478
+
479
+ // Frequently used helpers with sized pointers.
480
+
481
+ typedef struct _BYTE_SIZEDARR {
482
+ ULONG clSize;
483
+ [size_is(clSize)] byte * pData ;
484
+ } BYTE_SIZEDARR;
485
+
486
+ typedef struct _SHORT_SIZEDARR {
487
+ ULONG clSize;
488
+ [size_is(clSize)] unsigned short* pData ;
489
+ } WORD_SIZEDARR;
490
+
491
+ typedef struct _LONG_SIZEDARR {
492
+ ULONG clSize;
493
+ [size_is(clSize)] ULONG * pData ;
494
+ } DWORD_SIZEDARR;
495
+
496
+ typedef struct _HYPER_SIZEDARR {
497
+ ULONG clSize;
498
+ [size_is(clSize)] hyper * pData ;
499
+ } HYPER_SIZEDARR;
500
+
501
+ }
502
+
503
+ // #########################################################################
504
+ //
505
+
506
+ typedef boolean BOOLEAN;
507
+
508
+ cpp_quote("#ifndef _tagBLOB_DEFINED")
509
+ cpp_quote("#define _tagBLOB_DEFINED")
510
+ cpp_quote("#define _BLOB_DEFINED")
511
+ cpp_quote("#define _LPBLOB_DEFINED")
512
+ typedef struct tagBLOB {
513
+ ULONG cbSize;
514
+ [size_is(cbSize)]
515
+ BYTE *pBlobData;
516
+ } BLOB, * LPBLOB;
517
+ cpp_quote("#endif")
518
+
519
+ // Access Control - ntseapi.h
520
+ cpp_quote( "#ifndef SID_IDENTIFIER_AUTHORITY_DEFINED" )
521
+ cpp_quote( "#define SID_IDENTIFIER_AUTHORITY_DEFINED" )
522
+ typedef struct _SID_IDENTIFIER_AUTHORITY {
523
+ UCHAR Value[6];
524
+ } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
525
+ cpp_quote( "#endif" )
526
+
527
+ cpp_quote( "#ifndef SID_DEFINED" )
528
+ cpp_quote( "#define SID_DEFINED" )
529
+ typedef struct _SID {
530
+ BYTE Revision;
531
+ BYTE SubAuthorityCount;
532
+ SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
533
+ [size_is(SubAuthorityCount)] ULONG SubAuthority[*];
534
+ } SID, *PISID;
535
+
536
+ typedef struct _SID_AND_ATTRIBUTES {
537
+ SID * Sid;
538
+ DWORD Attributes;
539
+ } SID_AND_ATTRIBUTES, * PSID_AND_ATTRIBUTES;
540
+ cpp_quote( "#endif" )
541
+
542
+ cpp_quote("#if _MSC_VER >= 1200")
543
+ cpp_quote("#pragma warning(pop)")
544
+ cpp_quote("#endif")
545
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/WTypesbase.h ADDED
@@ -0,0 +1,589 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ /* this ALWAYS GENERATED file contains the definitions for the interfaces */
4
+
5
+
6
+ /* File created by MIDL compiler version 8.01.0628 */
7
+ /* @@MIDL_FILE_HEADING( ) */
8
+
9
+
10
+
11
+ /* verify that the <rpcndr.h> version is high enough to compile this file*/
12
+ #ifndef __REQUIRED_RPCNDR_H_VERSION__
13
+ #define __REQUIRED_RPCNDR_H_VERSION__ 501
14
+ #endif
15
+
16
+ /* verify that the <rpcsal.h> version is high enough to compile this file*/
17
+ #ifndef __REQUIRED_RPCSAL_H_VERSION__
18
+ #define __REQUIRED_RPCSAL_H_VERSION__ 100
19
+ #endif
20
+
21
+ #include "rpc.h"
22
+ #include "rpcndr.h"
23
+
24
+ #ifndef __RPCNDR_H_VERSION__
25
+ #error this stub requires an updated version of <rpcndr.h>
26
+ #endif /* __RPCNDR_H_VERSION__ */
27
+
28
+
29
+ #ifndef __wtypesbase_h__
30
+ #define __wtypesbase_h__
31
+
32
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
33
+ #pragma once
34
+ #endif
35
+
36
+ #ifndef DECLSPEC_XFGVIRT
37
+ #if defined(_CONTROL_FLOW_GUARD_XFG)
38
+ #define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
39
+ #else
40
+ #define DECLSPEC_XFGVIRT(base, func)
41
+ #endif
42
+ #endif
43
+
44
+ /* Forward Declarations */
45
+
46
+ /* header files for imported files */
47
+ #include "basetsd.h"
48
+ #include "guiddef.h"
49
+
50
+ #ifdef __cplusplus
51
+ extern "C"{
52
+ #endif
53
+
54
+
55
+ /* interface __MIDL_itf_wtypesbase_0000_0000 */
56
+ /* [local] */
57
+
58
+ //+-------------------------------------------------------------------------
59
+ //
60
+ // Microsoft Windows
61
+ // Copyright (c) Microsoft Corporation. All rights reserved.
62
+ //
63
+ //--------------------------------------------------------------------------
64
+ #if ( _MSC_VER >= 1020 )
65
+ #pragma once
66
+ #endif
67
+ #if _MSC_VER >= 1200
68
+ #pragma warning(push)
69
+ #pragma warning(disable:4820) /* padding added after data member */
70
+ #endif
71
+
72
+
73
+ extern RPC_IF_HANDLE __MIDL_itf_wtypesbase_0000_0000_v0_0_c_ifspec;
74
+ extern RPC_IF_HANDLE __MIDL_itf_wtypesbase_0000_0000_v0_0_s_ifspec;
75
+
76
+ #ifndef __IWinTypesBase_INTERFACE_DEFINED__
77
+ #define __IWinTypesBase_INTERFACE_DEFINED__
78
+
79
+ /* interface IWinTypesBase */
80
+ /* [unique][version][uuid] */
81
+
82
+ #if 0
83
+ typedef byte BYTE;
84
+
85
+ typedef unsigned short WORD;
86
+
87
+ typedef unsigned int UINT;
88
+
89
+ typedef int INT;
90
+
91
+ typedef long BOOL;
92
+
93
+ typedef long LONG;
94
+
95
+ typedef unsigned long DWORD;
96
+
97
+ typedef void *HANDLE;
98
+
99
+ typedef WORD *LPWORD;
100
+
101
+ typedef DWORD *LPDWORD;
102
+
103
+ typedef char CHAR;
104
+
105
+ typedef /* [string] */ __RPC_string CHAR *LPSTR;
106
+
107
+ typedef /* [string] */ __RPC_string const CHAR *LPCSTR;
108
+
109
+ typedef wchar_t WCHAR;
110
+
111
+ typedef WCHAR TCHAR;
112
+
113
+ typedef /* [string] */ __RPC_string WCHAR *LPWSTR;
114
+
115
+ typedef /* [string] */ __RPC_string TCHAR *LPTSTR;
116
+
117
+ typedef /* [string] */ __RPC_string const WCHAR *LPCWSTR;
118
+
119
+ typedef /* [string] */ __RPC_string const TCHAR *LPCTSTR;
120
+
121
+ typedef HANDLE *LPHANDLE;
122
+
123
+ #endif // 0
124
+ #if defined(_WIN32) && !defined(OLE2ANSI)
125
+ typedef WCHAR OLECHAR;
126
+
127
+ typedef /* [string] */ __RPC_string OLECHAR *LPOLESTR;
128
+
129
+ typedef /* [string] */ __RPC_string const OLECHAR *LPCOLESTR;
130
+
131
+ #define OLESTR(str) L##str
132
+
133
+ #else
134
+
135
+ typedef char OLECHAR;
136
+ typedef LPSTR LPOLESTR;
137
+ typedef LPCSTR LPCOLESTR;
138
+ #define OLESTR(str) str
139
+ #endif
140
+ #ifndef _WINDEF_
141
+ #ifndef _MINWINDEF_
142
+ typedef void *PVOID;
143
+
144
+ typedef void *LPVOID;
145
+
146
+ typedef float FLOAT;
147
+
148
+ #endif //_MINWINDEF_
149
+ #endif //_WINDEF_
150
+ typedef unsigned char UCHAR;
151
+
152
+ typedef short SHORT;
153
+
154
+ typedef unsigned short USHORT;
155
+
156
+ typedef DWORD ULONG;
157
+
158
+ typedef double DOUBLE;
159
+
160
+ #ifndef _DWORDLONG_
161
+ typedef unsigned __int64 DWORDLONG;
162
+
163
+ typedef DWORDLONG *PDWORDLONG;
164
+
165
+ #endif // !_DWORDLONG_
166
+ #ifndef _ULONGLONG_
167
+ typedef __int64 LONGLONG;
168
+
169
+ typedef unsigned __int64 ULONGLONG;
170
+
171
+ typedef LONGLONG *PLONGLONG;
172
+
173
+ typedef ULONGLONG *PULONGLONG;
174
+
175
+ #endif // _ULONGLONG_
176
+ #if 0
177
+ typedef struct _LARGE_INTEGER
178
+ {
179
+ LONGLONG QuadPart;
180
+ } LARGE_INTEGER;
181
+
182
+ typedef LARGE_INTEGER *PLARGE_INTEGER;
183
+
184
+ typedef struct _ULARGE_INTEGER
185
+ {
186
+ ULONGLONG QuadPart;
187
+ } ULARGE_INTEGER;
188
+
189
+ #endif // 0
190
+ #ifndef _WINBASE_
191
+ #ifndef _FILETIME_
192
+ #define _FILETIME_
193
+ typedef struct _FILETIME
194
+ {
195
+ DWORD dwLowDateTime;
196
+ DWORD dwHighDateTime;
197
+ } FILETIME;
198
+
199
+ typedef struct _FILETIME *PFILETIME;
200
+
201
+ typedef struct _FILETIME *LPFILETIME;
202
+
203
+ #endif // !_FILETIME
204
+ #ifndef _SYSTEMTIME_
205
+ #define _SYSTEMTIME_
206
+ typedef struct _SYSTEMTIME
207
+ {
208
+ WORD wYear;
209
+ WORD wMonth;
210
+ WORD wDayOfWeek;
211
+ WORD wDay;
212
+ WORD wHour;
213
+ WORD wMinute;
214
+ WORD wSecond;
215
+ WORD wMilliseconds;
216
+ } SYSTEMTIME;
217
+
218
+ typedef struct _SYSTEMTIME *PSYSTEMTIME;
219
+
220
+ typedef struct _SYSTEMTIME *LPSYSTEMTIME;
221
+
222
+ #endif // !_SYSTEMTIME
223
+ #ifndef _SECURITY_ATTRIBUTES_
224
+ #define _SECURITY_ATTRIBUTES_
225
+ typedef struct _SECURITY_ATTRIBUTES
226
+ {
227
+ DWORD nLength;
228
+ LPVOID lpSecurityDescriptor;
229
+ BOOL bInheritHandle;
230
+ } SECURITY_ATTRIBUTES;
231
+
232
+ typedef struct _SECURITY_ATTRIBUTES *PSECURITY_ATTRIBUTES;
233
+
234
+ typedef struct _SECURITY_ATTRIBUTES *LPSECURITY_ATTRIBUTES;
235
+
236
+ #endif // !_SECURITY_ATTRIBUTES_
237
+ #ifndef SECURITY_DESCRIPTOR_REVISION
238
+ typedef USHORT SECURITY_DESCRIPTOR_CONTROL;
239
+
240
+ typedef USHORT *PSECURITY_DESCRIPTOR_CONTROL;
241
+
242
+ typedef PVOID PSID;
243
+
244
+ typedef struct _ACL
245
+ {
246
+ UCHAR AclRevision;
247
+ UCHAR Sbz1;
248
+ USHORT AclSize;
249
+ USHORT AceCount;
250
+ USHORT Sbz2;
251
+ } ACL;
252
+
253
+ typedef ACL *PACL;
254
+
255
+ typedef struct _SECURITY_DESCRIPTOR
256
+ {
257
+ UCHAR Revision;
258
+ UCHAR Sbz1;
259
+ SECURITY_DESCRIPTOR_CONTROL Control;
260
+ PSID Owner;
261
+ PSID Group;
262
+ PACL Sacl;
263
+ PACL Dacl;
264
+ } SECURITY_DESCRIPTOR;
265
+
266
+ typedef struct _SECURITY_DESCRIPTOR *PISECURITY_DESCRIPTOR;
267
+
268
+ #endif // !SECURITY_DESCRIPTOR_REVISION
269
+ #endif //_WINBASE_
270
+ typedef struct _COAUTHIDENTITY
271
+ {
272
+ /* [size_is] */ USHORT *User;
273
+ /* [range] */ ULONG UserLength;
274
+ /* [size_is] */ USHORT *Domain;
275
+ /* [range] */ ULONG DomainLength;
276
+ /* [size_is] */ USHORT *Password;
277
+ /* [range] */ ULONG PasswordLength;
278
+ ULONG Flags;
279
+ } COAUTHIDENTITY;
280
+
281
+ typedef struct _COAUTHINFO
282
+ {
283
+ DWORD dwAuthnSvc;
284
+ DWORD dwAuthzSvc;
285
+ LPWSTR pwszServerPrincName;
286
+ DWORD dwAuthnLevel;
287
+ DWORD dwImpersonationLevel;
288
+ COAUTHIDENTITY *pAuthIdentityData;
289
+ DWORD dwCapabilities;
290
+ } COAUTHINFO;
291
+
292
+ typedef LONG SCODE;
293
+
294
+ typedef SCODE *PSCODE;
295
+
296
+ #ifndef _HRESULT_DEFINED
297
+ #define _HRESULT_DEFINED
298
+ #ifdef __midl
299
+ typedef LONG HRESULT;
300
+
301
+ #else // __midl
302
+ typedef _Return_type_success_(return >= 0) LONG HRESULT;
303
+ #endif // __midl
304
+ #endif // !_HRESULT_DEFINED
305
+
306
+ #ifndef __OBJECTID_DEFINED
307
+ #define __OBJECTID_DEFINED
308
+ #define _OBJECTID_DEFINED
309
+ typedef struct _OBJECTID
310
+ {
311
+ GUID Lineage;
312
+ ULONG Uniquifier;
313
+ } OBJECTID;
314
+
315
+ #endif // !_OBJECTID_DEFINED
316
+ #if 0
317
+ typedef GUID *REFGUID;
318
+
319
+ typedef IID *REFIID;
320
+
321
+ typedef CLSID *REFCLSID;
322
+
323
+ #endif // 0
324
+ typedef
325
+ enum tagMEMCTX
326
+ {
327
+ MEMCTX_TASK = 1,
328
+ MEMCTX_SHARED = 2,
329
+ MEMCTX_MACSYSTEM = 3,
330
+ MEMCTX_UNKNOWN = -1,
331
+ MEMCTX_SAME = -2
332
+ } MEMCTX;
333
+
334
+ #ifndef _ROTREGFLAGS_DEFINED
335
+ #define _ROTREGFLAGS_DEFINED
336
+ #define ROTREGFLAGS_ALLOWANYCLIENT 0x1
337
+ #endif // !_ROTREGFLAGS_DEFINED
338
+ #ifndef _APPIDREGFLAGS_DEFINED
339
+ #define _APPIDREGFLAGS_DEFINED
340
+ #define APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP 0x1
341
+ #define APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND 0x2
342
+ #define APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY 0x4
343
+ #define APPIDREGFLAGS_IUSERVER_UNMODIFIED_LOGON_TOKEN 0x8
344
+ #define APPIDREGFLAGS_IUSERVER_SELF_SID_IN_LAUNCH_PERMISSION 0x10
345
+ #define APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY 0x20
346
+ #define APPIDREGFLAGS_RESERVED1 0x40
347
+ #define APPIDREGFLAGS_RESERVED2 0x80
348
+ #define APPIDREGFLAGS_RESERVED3 0x100
349
+ #define APPIDREGFLAGS_RESERVED4 0x200
350
+ #define APPIDREGFLAGS_RESERVED5 0x400
351
+ #define APPIDREGFLAGS_AAA_NO_IMPLICIT_ACTIVATE_AS_IU 0x800
352
+ #define APPIDREGFLAGS_RESERVED7 0x1000
353
+ #define APPIDREGFLAGS_RESERVED8 0x2000
354
+ #define APPIDREGFLAGS_RESERVED9 0x4000
355
+ #define APPIDREGFLAGS_RESERVED10 0x8000
356
+ #endif // !_APPIDREGFLAGS_DEFINED
357
+ #ifndef _DCOMSCM_REMOTECALL_FLAGS_DEFINED
358
+ #define _DCOMSCM_REMOTECALL_FLAGS_DEFINED
359
+ #define DCOMSCM_ACTIVATION_USE_ALL_AUTHNSERVICES 0x1
360
+ #define DCOMSCM_ACTIVATION_DISALLOW_UNSECURE_CALL 0x2
361
+ #define DCOMSCM_RESOLVE_USE_ALL_AUTHNSERVICES 0x4
362
+ #define DCOMSCM_RESOLVE_DISALLOW_UNSECURE_CALL 0x8
363
+ #define DCOMSCM_PING_USE_MID_AUTHNSERVICE 0x10
364
+ #define DCOMSCM_PING_DISALLOW_UNSECURE_CALL 0x20
365
+ #endif // !_DCOMSCM_REMOTECALL_FLAGS_DEFINED
366
+ typedef
367
+ enum tagCLSCTX
368
+ {
369
+ CLSCTX_INPROC_SERVER = 0x1,
370
+ CLSCTX_INPROC_HANDLER = 0x2,
371
+ CLSCTX_LOCAL_SERVER = 0x4,
372
+ CLSCTX_INPROC_SERVER16 = 0x8,
373
+ CLSCTX_REMOTE_SERVER = 0x10,
374
+ CLSCTX_INPROC_HANDLER16 = 0x20,
375
+ CLSCTX_RESERVED1 = 0x40,
376
+ CLSCTX_RESERVED2 = 0x80,
377
+ CLSCTX_RESERVED3 = 0x100,
378
+ CLSCTX_RESERVED4 = 0x200,
379
+ CLSCTX_NO_CODE_DOWNLOAD = 0x400,
380
+ CLSCTX_RESERVED5 = 0x800,
381
+ CLSCTX_NO_CUSTOM_MARSHAL = 0x1000,
382
+ CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000,
383
+ CLSCTX_NO_FAILURE_LOG = 0x4000,
384
+ CLSCTX_DISABLE_AAA = 0x8000,
385
+ CLSCTX_ENABLE_AAA = 0x10000,
386
+ CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000,
387
+ CLSCTX_ACTIVATE_X86_SERVER = 0x40000,
388
+ CLSCTX_ACTIVATE_32_BIT_SERVER = CLSCTX_ACTIVATE_X86_SERVER,
389
+ CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000,
390
+ CLSCTX_ENABLE_CLOAKING = 0x100000,
391
+ CLSCTX_APPCONTAINER = 0x400000,
392
+ CLSCTX_ACTIVATE_AAA_AS_IU = 0x800000,
393
+ CLSCTX_RESERVED6 = 0x1000000,
394
+ CLSCTX_ACTIVATE_ARM32_SERVER = 0x2000000,
395
+ CLSCTX_ALLOW_LOWER_TRUST_REGISTRATION = 0x4000000,
396
+ CLSCTX_SERVER_MUST_BE_EQUAL_OR_GREATER_PRIVILEGE = 0x8000000,
397
+ CLSCTX_DO_NOT_ELEVATE_SERVER = 0x10000000,
398
+ CLSCTX_PS_DLL = 0x80000000
399
+ } CLSCTX;
400
+
401
+ DEFINE_ENUM_FLAG_OPERATORS(CLSCTX);
402
+ #define CLSCTX_VALID_MASK \
403
+ (CLSCTX_INPROC_SERVER | \
404
+ CLSCTX_INPROC_HANDLER | \
405
+ CLSCTX_LOCAL_SERVER | \
406
+ CLSCTX_INPROC_SERVER16 | \
407
+ CLSCTX_REMOTE_SERVER | \
408
+ CLSCTX_NO_CODE_DOWNLOAD | \
409
+ CLSCTX_NO_CUSTOM_MARSHAL | \
410
+ CLSCTX_ENABLE_CODE_DOWNLOAD | \
411
+ CLSCTX_NO_FAILURE_LOG | \
412
+ CLSCTX_DISABLE_AAA | \
413
+ CLSCTX_ENABLE_AAA | \
414
+ CLSCTX_FROM_DEFAULT_CONTEXT | \
415
+ CLSCTX_ACTIVATE_X86_SERVER | \
416
+ CLSCTX_ACTIVATE_64_BIT_SERVER | \
417
+ CLSCTX_ENABLE_CLOAKING | \
418
+ CLSCTX_APPCONTAINER | \
419
+ CLSCTX_ACTIVATE_AAA_AS_IU | \
420
+ CLSCTX_RESERVED6 | \
421
+ CLSCTX_ACTIVATE_ARM32_SERVER | \
422
+ CLSCTX_ALLOW_LOWER_TRUST_REGISTRATION | \
423
+ CLSCTX_DO_NOT_ELEVATE_SERVER | \
424
+ CLSCTX_SERVER_MUST_BE_EQUAL_OR_GREATER_PRIVILEGE | \
425
+ CLSCTX_PS_DLL)
426
+ typedef
427
+ enum tagMSHLFLAGS
428
+ {
429
+ MSHLFLAGS_NORMAL = 0,
430
+ MSHLFLAGS_TABLESTRONG = 1,
431
+ MSHLFLAGS_TABLEWEAK = 2,
432
+ MSHLFLAGS_NOPING = 4,
433
+ MSHLFLAGS_RESERVED1 = 8,
434
+ MSHLFLAGS_RESERVED2 = 16,
435
+ MSHLFLAGS_RESERVED3 = 32,
436
+ MSHLFLAGS_RESERVED4 = 64
437
+ } MSHLFLAGS;
438
+
439
+ typedef
440
+ enum tagMSHCTX
441
+ {
442
+ MSHCTX_LOCAL = 0,
443
+ MSHCTX_NOSHAREDMEM = 1,
444
+ MSHCTX_DIFFERENTMACHINE = 2,
445
+ MSHCTX_INPROC = 3,
446
+ MSHCTX_CROSSCTX = 4,
447
+ MSHCTX_CONTAINER = 5
448
+ } MSHCTX;
449
+
450
+ typedef struct _BYTE_BLOB
451
+ {
452
+ ULONG clSize;
453
+ /* [size_is] */ byte abData[ 1 ];
454
+ } BYTE_BLOB;
455
+
456
+ typedef /* [unique] */ __RPC_unique_pointer BYTE_BLOB *UP_BYTE_BLOB;
457
+
458
+ typedef struct _WORD_BLOB
459
+ {
460
+ ULONG clSize;
461
+ /* [size_is] */ unsigned short asData[ 1 ];
462
+ } WORD_BLOB;
463
+
464
+ typedef /* [unique] */ __RPC_unique_pointer WORD_BLOB *UP_WORD_BLOB;
465
+
466
+ typedef struct _DWORD_BLOB
467
+ {
468
+ ULONG clSize;
469
+ /* [size_is] */ ULONG alData[ 1 ];
470
+ } DWORD_BLOB;
471
+
472
+ typedef /* [unique] */ __RPC_unique_pointer DWORD_BLOB *UP_DWORD_BLOB;
473
+
474
+ typedef struct _FLAGGED_BYTE_BLOB
475
+ {
476
+ ULONG fFlags;
477
+ ULONG clSize;
478
+ /* [size_is] */ byte abData[ 1 ];
479
+ } FLAGGED_BYTE_BLOB;
480
+
481
+ typedef /* [unique] */ __RPC_unique_pointer FLAGGED_BYTE_BLOB *UP_FLAGGED_BYTE_BLOB;
482
+
483
+ typedef struct _FLAGGED_WORD_BLOB
484
+ {
485
+ ULONG fFlags;
486
+ ULONG clSize;
487
+ /* [size_is] */ unsigned short asData[ 1 ];
488
+ } FLAGGED_WORD_BLOB;
489
+
490
+ typedef /* [unique] */ __RPC_unique_pointer FLAGGED_WORD_BLOB *UP_FLAGGED_WORD_BLOB;
491
+
492
+ typedef struct _BYTE_SIZEDARR
493
+ {
494
+ ULONG clSize;
495
+ /* [size_is] */ byte *pData;
496
+ } BYTE_SIZEDARR;
497
+
498
+ typedef struct _SHORT_SIZEDARR
499
+ {
500
+ ULONG clSize;
501
+ /* [size_is] */ unsigned short *pData;
502
+ } WORD_SIZEDARR;
503
+
504
+ typedef struct _LONG_SIZEDARR
505
+ {
506
+ ULONG clSize;
507
+ /* [size_is] */ ULONG *pData;
508
+ } DWORD_SIZEDARR;
509
+
510
+ typedef struct _HYPER_SIZEDARR
511
+ {
512
+ ULONG clSize;
513
+ /* [size_is] */ hyper *pData;
514
+ } HYPER_SIZEDARR;
515
+
516
+
517
+
518
+ extern RPC_IF_HANDLE IWinTypesBase_v0_1_c_ifspec;
519
+ extern RPC_IF_HANDLE IWinTypesBase_v0_1_s_ifspec;
520
+ #endif /* __IWinTypesBase_INTERFACE_DEFINED__ */
521
+
522
+ /* interface __MIDL_itf_wtypesbase_0000_0001 */
523
+ /* [local] */
524
+
525
+ typedef boolean BOOLEAN;
526
+
527
+ #ifndef _tagBLOB_DEFINED
528
+ #define _tagBLOB_DEFINED
529
+ #define _BLOB_DEFINED
530
+ #define _LPBLOB_DEFINED
531
+ typedef struct tagBLOB
532
+ {
533
+ ULONG cbSize;
534
+ /* [size_is] */ BYTE *pBlobData;
535
+ } BLOB;
536
+
537
+ typedef struct tagBLOB *LPBLOB;
538
+
539
+ #endif
540
+ #ifndef SID_IDENTIFIER_AUTHORITY_DEFINED
541
+ #define SID_IDENTIFIER_AUTHORITY_DEFINED
542
+ typedef struct _SID_IDENTIFIER_AUTHORITY
543
+ {
544
+ UCHAR Value[ 6 ];
545
+ } SID_IDENTIFIER_AUTHORITY;
546
+
547
+ typedef struct _SID_IDENTIFIER_AUTHORITY *PSID_IDENTIFIER_AUTHORITY;
548
+
549
+ #endif
550
+ #ifndef SID_DEFINED
551
+ #define SID_DEFINED
552
+ typedef struct _SID
553
+ {
554
+ BYTE Revision;
555
+ BYTE SubAuthorityCount;
556
+ SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
557
+ /* [size_is] */ ULONG SubAuthority[ 1 ];
558
+ } SID;
559
+
560
+ typedef struct _SID *PISID;
561
+
562
+ typedef struct _SID_AND_ATTRIBUTES
563
+ {
564
+ SID *Sid;
565
+ DWORD Attributes;
566
+ } SID_AND_ATTRIBUTES;
567
+
568
+ typedef struct _SID_AND_ATTRIBUTES *PSID_AND_ATTRIBUTES;
569
+
570
+ #endif
571
+ #if _MSC_VER >= 1200
572
+ #pragma warning(pop)
573
+ #endif
574
+
575
+
576
+ extern RPC_IF_HANDLE __MIDL_itf_wtypesbase_0000_0001_v0_0_c_ifspec;
577
+ extern RPC_IF_HANDLE __MIDL_itf_wtypesbase_0000_0001_v0_0_s_ifspec;
578
+
579
+ /* Additional Prototypes for ALL interfaces */
580
+
581
+ /* end of Additional Prototypes */
582
+
583
+ #ifdef __cplusplus
584
+ }
585
+ #endif
586
+
587
+ #endif
588
+
589
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbiodef.h ADDED
@@ -0,0 +1,267 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ USBIODEF.H
8
+
9
+ Abstract:
10
+
11
+ Common header file for all USB IOCTLs defined for
12
+ the core stack. We define them in this single header file
13
+ so that we can maintain backward compatibilty with older
14
+ versions of the stack.
15
+
16
+
17
+ We divide the IOCTLS supported by the stack as follows:
18
+
19
+ kernel IOCTLS:
20
+
21
+
22
+ user IOCTLS:
23
+
24
+ IOCTLS Handled by HCD (PORT) FDO
25
+ IOCTLS Handled by HUB FDO
26
+ IOCTLS Handled by USB (DEVICE) PDO
27
+
28
+ Environment:
29
+
30
+ kernel & user mode
31
+
32
+ Revision History:
33
+
34
+
35
+ --*/
36
+
37
+ #ifndef __USBIODEF_H__
38
+ #define __USBIODEF_H__
39
+ #include <winapifamily.h>
40
+
41
+ #pragma region Desktop Family or OneCore Family
42
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
43
+
44
+
45
+ /*
46
+ Function codes for kernel mode IOCTLs with DeviceType : DEVICE_TYPE_USB (a.k.a DEVICE_TYPE_UNKNOWN)
47
+
48
+ The following codes are valid only if passed as in
49
+ the icControlCode parameter for
50
+ IRP_MJ_INTERNAL_DEVICE_CONTROL
51
+
52
+ */
53
+ #define USB_SUBMIT_URB 0
54
+ #define USB_RESET_PORT 1
55
+ #define USB_GET_ROOTHUB_PDO 3
56
+ #define USB_GET_PORT_STATUS 4
57
+ #define USB_ENABLE_PORT 5
58
+ #define USB_GET_HUB_COUNT 6
59
+ #define USB_CYCLE_PORT 7
60
+ #define USB_GET_HUB_NAME 8
61
+ #define USB_IDLE_NOTIFICATION 9
62
+ #define USB_RECORD_FAILURE 10
63
+ #define USB_GET_BUS_INFO 264
64
+ #define USB_GET_CONTROLLER_NAME 265
65
+ #define USB_GET_BUSGUID_INFO 266
66
+ #define USB_GET_PARENT_HUB_INFO 267
67
+ #define USB_GET_DEVICE_HANDLE 268
68
+ #define USB_GET_DEVICE_HANDLE_EX 269
69
+ #define USB_GET_TT_DEVICE_HANDLE 270
70
+ #define USB_GET_TOPOLOGY_ADDRESS 271
71
+ #define USB_IDLE_NOTIFICATION_EX 272
72
+ #define USB_REQ_GLOBAL_SUSPEND 273
73
+ #define USB_REQ_GLOBAL_RESUME 274
74
+ #define USB_GET_HUB_CONFIG_INFO 275
75
+ #define USB_FAIL_GET_STATUS 280
76
+
77
+ /*
78
+ Function codes for kernel mode IOCTLs with DeviceType : DEVICE_TYPE_USBEX
79
+
80
+ The following codes are valid only if passed as in
81
+ the icControlCode parameter for
82
+ IRP_MJ_INTERNAL_DEVICE_CONTROL
83
+
84
+ The range 0 - 2047 is reserved for use by Microsoft.
85
+ The range 0 - 1023 is used for Public Ioctls defined by Microsoft.
86
+
87
+ */
88
+
89
+ #define USB_REGISTER_COMPOSITE_DEVICE 0
90
+ #define USB_UNREGISTER_COMPOSITE_DEVICE 1
91
+ #define USB_REQUEST_REMOTE_WAKE_NOTIFICATION 2
92
+
93
+
94
+ /*
95
+ Function codes for user mode IOCTLs
96
+
97
+ The following codes are valid only if passed as in
98
+ the icControlCode parameter for
99
+ IRP_MJ_DEVICE_CONTROL
100
+ hence, they are callable by user mode applications
101
+ */
102
+ #define HCD_GET_STATS_1 255
103
+ #define HCD_DIAGNOSTIC_MODE_ON 256
104
+ #define HCD_DIAGNOSTIC_MODE_OFF 257
105
+ #define HCD_GET_ROOT_HUB_NAME 258
106
+ #define HCD_GET_DRIVERKEY_NAME 265
107
+ #define HCD_GET_STATS_2 266
108
+ #define HCD_DISABLE_PORT 268
109
+ #define HCD_ENABLE_PORT 269
110
+ #define HCD_USER_REQUEST 270
111
+ #define HCD_TRACE_READ_REQUEST 275
112
+
113
+
114
+ #define USB_GET_NODE_INFORMATION 258
115
+ #define USB_GET_NODE_CONNECTION_INFORMATION 259
116
+ #define USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION 260
117
+ #define USB_GET_NODE_CONNECTION_NAME 261
118
+ #define USB_DIAG_IGNORE_HUBS_ON 262
119
+ #define USB_DIAG_IGNORE_HUBS_OFF 263
120
+ #define USB_GET_NODE_CONNECTION_DRIVERKEY_NAME 264
121
+ #define USB_GET_HUB_CAPABILITIES 271
122
+ #define USB_GET_NODE_CONNECTION_ATTRIBUTES 272
123
+ #define USB_HUB_CYCLE_PORT 273
124
+ #define USB_GET_NODE_CONNECTION_INFORMATION_EX 274
125
+ #define USB_RESET_HUB 275
126
+ #define USB_GET_HUB_CAPABILITIES_EX 276
127
+ #define USB_GET_HUB_INFORMATION_EX 277
128
+ #define USB_GET_PORT_CONNECTOR_PROPERTIES 278
129
+ #define USB_GET_NODE_CONNECTION_INFORMATION_EX_V2 279
130
+
131
+ #define USB_GET_TRANSPORT_CHARACTERISTICS 281
132
+ #define USB_REGISTER_FOR_TRANSPORT_CHARACTERISTICS_CHANGE 282
133
+ #define USB_NOTIFY_ON_TRANSPORT_CHARACTERISTICS_CHANGE 283
134
+ #define USB_UNREGISTER_FOR_TRANSPORT_CHARACTERISTICS_CHANGE 284
135
+
136
+ #define USB_START_TRACKING_FOR_TIME_SYNC 285
137
+ #define USB_GET_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC 286
138
+ #define USB_STOP_TRACKING_FOR_TIME_SYNC 287
139
+
140
+ #define USB_GET_DEVICE_CHARACTERISTICS 288
141
+
142
+ #define USB_GET_NODE_CONNECTION_SUPERSPEEDPLUS_INFORMATION 289
143
+
144
+ // IOCTL codes starting here and beyond are for windows' internal use
145
+ #define USB_RESERVED_USER_BASE 1024
146
+
147
+ /*
148
+ USB specific GUIDs
149
+ */
150
+
151
+
152
+ /* f18a0e88-c30c-11d0-8815-00a0c906bed8 */
153
+ DEFINE_GUID(GUID_DEVINTERFACE_USB_HUB, 0xf18a0e88, 0xc30c, 0x11d0, 0x88, 0x15, 0x00, \
154
+ 0xa0, 0xc9, 0x06, 0xbe, 0xd8);
155
+
156
+ /*5e9adaef-f879-473f-b807-4e5ea77d1b1c*/
157
+ DEFINE_GUID(GUID_DEVINTERFACE_USB_BILLBOARD, 0x5e9adaef, 0xf879, 0x473f, 0xb8, 0x07, 0x4e, \
158
+ 0x5e, 0xa7, 0x7d, 0x1b, 0x1c);
159
+
160
+ /* A5DCBF10-6530-11D2-901F-00C04FB951ED */
161
+ DEFINE_GUID(GUID_DEVINTERFACE_USB_DEVICE, 0xA5DCBF10L, 0x6530, 0x11D2, 0x90, 0x1F, 0x00, \
162
+ 0xC0, 0x4F, 0xB9, 0x51, 0xED);
163
+
164
+ /* 3ABF6F2D-71C4-462a-8A92-1E6861E6AF27 */
165
+ DEFINE_GUID(GUID_DEVINTERFACE_USB_HOST_CONTROLLER, 0x3abf6f2d, 0x71c4, 0x462a, 0x8a, 0x92, 0x1e, \
166
+ 0x68, 0x61, 0xe6, 0xaf, 0x27);
167
+
168
+ /* 4E623B20-CB14-11D1-B331-00A0C959BBD2 */
169
+ DEFINE_GUID(GUID_USB_WMI_STD_DATA, 0x4E623B20L, 0xCB14, 0x11D1, 0xB3, 0x31, 0x00,\
170
+ 0xA0, 0xC9, 0x59, 0xBB, 0xD2);
171
+
172
+ /* 4E623B20-CB14-11D1-B331-00A0C959BBD2 */
173
+ DEFINE_GUID(GUID_USB_WMI_STD_NOTIFICATION, 0x4E623B20L, 0xCB14, 0x11D1, 0xB3, 0x31, 0x00,\
174
+ 0xA0, 0xC9, 0x59, 0xBB, 0xD2);
175
+
176
+ #if (_WIN32_WINNT >= 0x0600)
177
+ /*
178
+ For windows longhorn and later
179
+ */
180
+
181
+ /* 66C1AA3C-499F-49a0-A9A5-61E2359F6407 */
182
+ DEFINE_GUID(GUID_USB_WMI_DEVICE_PERF_INFO, 0x66c1aa3c, 0x499f, 0x49a0, 0xa9, 0xa5, 0x61, 0xe2,\
183
+ 0x35, 0x9f, 0x64, 0x7);
184
+
185
+ // {9C179357-DC7A-4f41-B66B-323B9DDCB5B1}
186
+ DEFINE_GUID(GUID_USB_WMI_NODE_INFO,
187
+ 0x9c179357, 0xdc7a, 0x4f41, 0xb6, 0x6b, 0x32, 0x3b, 0x9d, 0xdc, 0xb5, 0xb1);
188
+
189
+ /* 3a61881b-b4e6-4bf9-ae0f-3cd8f394e52f */
190
+ DEFINE_GUID(GUID_USB_WMI_TRACING,
191
+ 0x3a61881b, 0xb4e6, 0x4bf9, 0xae, 0xf, 0x3c, 0xd8, 0xf3, 0x94, 0xe5, 0x2f);
192
+
193
+ // {681EB8AA-403D-452c-9F8A-F0616FAC9540}
194
+ DEFINE_GUID(GUID_USB_TRANSFER_TRACING,
195
+ 0x681eb8aa, 0x403d, 0x452c, 0x9f, 0x8a, 0xf0, 0x61, 0x6f, 0xac, 0x95, 0x40);
196
+
197
+ // {D5DE77A6-6AE9-425c-B1E2-F5615FD348A9}
198
+ DEFINE_GUID(GUID_USB_PERFORMANCE_TRACING,
199
+ 0xd5de77a6, 0x6ae9, 0x425c, 0xb1, 0xe2, 0xf5, 0x61, 0x5f, 0xd3, 0x48, 0xa9);
200
+
201
+ // {9BBBF831-A2F2-43B4-96D1-86944B5914B3}
202
+ DEFINE_GUID(GUID_USB_WMI_SURPRISE_REMOVAL_NOTIFICATION,
203
+ 0x9bbbf831, 0xa2f2, 0x43b4, 0x96, 0xd1, 0x86, 0x94, 0x4b, 0x59, 0x14, 0xb3);
204
+
205
+ #endif
206
+
207
+ /*
208
+ Obsolete device interface class GUID names.
209
+ (use of above GUID_DEVINTERFACE_* names is recommended).
210
+ --*/
211
+
212
+ #define GUID_CLASS_USBHUB GUID_DEVINTERFACE_USB_HUB
213
+ #define GUID_CLASS_USB_DEVICE GUID_DEVINTERFACE_USB_DEVICE
214
+ #define GUID_CLASS_USB_HOST_CONTROLLER GUID_DEVINTERFACE_USB_HOST_CONTROLLER
215
+
216
+ #define FILE_DEVICE_USB FILE_DEVICE_UNKNOWN
217
+
218
+ /*
219
+ common macro used by IOCTL header files
220
+ */
221
+ #define USB_CTL(id) CTL_CODE(FILE_DEVICE_USB, \
222
+ (id), \
223
+ METHOD_BUFFERED, \
224
+ FILE_ANY_ACCESS)
225
+
226
+ #define USB_KERNEL_CTL(id) CTL_CODE(FILE_DEVICE_USB, \
227
+ (id), \
228
+ METHOD_NEITHER, \
229
+ FILE_ANY_ACCESS)
230
+
231
+ #define USB_KERNEL_CTL_BUFFERED(id) CTL_CODE(FILE_DEVICE_USB, \
232
+ (id), \
233
+ METHOD_BUFFERED, \
234
+ FILE_ANY_ACCESS)
235
+
236
+ /*
237
+ structures common to both usbioctl.h and usbdrivr.h
238
+ */
239
+
240
+
241
+ #if (_WIN32_WINNT >= 0x0501)
242
+
243
+ /*
244
+ used by IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION.
245
+ Available on windows XP and later
246
+ */
247
+
248
+
249
+ _IRQL_requires_max_(PASSIVE_LEVEL)
250
+ typedef
251
+ VOID
252
+ (*USB_IDLE_CALLBACK)(
253
+ _In_ PVOID Context
254
+ );
255
+
256
+ typedef struct _USB_IDLE_CALLBACK_INFO {
257
+ USB_IDLE_CALLBACK IdleCallback;
258
+ PVOID IdleContext;
259
+ } USB_IDLE_CALLBACK_INFO, *PUSB_IDLE_CALLBACK_INFO;
260
+
261
+ #endif
262
+
263
+
264
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
265
+ #pragma endregion
266
+
267
+ #endif //__USBIODEF_H__
msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbprint.h ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) 1998 - 2000 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ ioctl.h
8
+
9
+ Abstract:
10
+
11
+
12
+
13
+ Environment:
14
+
15
+ Kernel & user mode
16
+
17
+ Revision History:
18
+
19
+
20
+ --*/
21
+
22
+ #include <winapifamily.h>
23
+
24
+ #pragma region Desktop Family
25
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
26
+
27
+ // USBPRINT {28D78FAD-5A12-11d1-AE5B-0000F803A8C2}
28
+ DEFINE_GUID(GUID_DEVINTERFACE_USBPRINT, 0x28d78fad, 0x5a12, 0x11d1, 0xae, 0x5b, 0x0, 0x0, 0xf8, 0x3, 0xa8, 0xc2);
29
+
30
+ // IPP over USB {f2f40381-f46d-4e51-bce7-62de6cf2d098}
31
+ DEFINE_GUID(GUID_DEVINTERFACE_IPPUSB_PRINT, 0xf2f40381, 0xf46d, 0x4e51, 0xbc, 0xe7, 0x62, 0xde, 0x6c, 0xf2, 0xd0, 0x98);
32
+
33
+ // USB Printer Interface types
34
+ #define USB_PRINTER_INTERFACE_CLASSIC 1 // Has only 7-1-2 alternate config
35
+ #define USB_PRINTER_INTERFACE_IPP 2 // Has only 7-1-4 alternate config
36
+ #define USB_PRINTER_INTERFACE_DUAL 3 // Has both 7-1-2 and 7-1-4 alternate configs
37
+
38
+ // Flags for IOCTL_USBPRINT_ADD_MSIPP_COMPAT_ID
39
+ #define USB_PRINT_IPP_COMPAT_ID 1 // add 1284_CID_MS_IPP compatid to child devnode
40
+ #define USB_PRINT_IPP_FAXOUT 2 // add PKEY_Printer_IsFaxDevice==TRUE to child devnode
41
+
42
+ #define USBPRINT_IOCTL_INDEX 0x0000
43
+
44
+
45
+ #define IOCTL_USBPRINT_GET_LPT_STATUS CTL_CODE(FILE_DEVICE_UNKNOWN, \
46
+ USBPRINT_IOCTL_INDEX+12,\
47
+ METHOD_BUFFERED, \
48
+ FILE_ANY_ACCESS)
49
+
50
+ #define IOCTL_USBPRINT_GET_1284_ID CTL_CODE(FILE_DEVICE_UNKNOWN, \
51
+ USBPRINT_IOCTL_INDEX+13,\
52
+ METHOD_BUFFERED, \
53
+ FILE_ANY_ACCESS)
54
+
55
+ #define IOCTL_USBPRINT_VENDOR_SET_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN, \
56
+ USBPRINT_IOCTL_INDEX+14,\
57
+ METHOD_BUFFERED, \
58
+ FILE_ANY_ACCESS)
59
+
60
+ #define IOCTL_USBPRINT_VENDOR_GET_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN, \
61
+ USBPRINT_IOCTL_INDEX+15,\
62
+ METHOD_BUFFERED, \
63
+ FILE_ANY_ACCESS)
64
+
65
+ #define IOCTL_USBPRINT_SOFT_RESET CTL_CODE(FILE_DEVICE_UNKNOWN, \
66
+ USBPRINT_IOCTL_INDEX+16,\
67
+ METHOD_BUFFERED, \
68
+ FILE_ANY_ACCESS)
69
+
70
+ //
71
+ // Retrieve the current printer protocol code (i.e. USB_PRINTER_PROTOCOL_IPPOVERUSB)
72
+ //
73
+ #define IOCTL_USBPRINT_GET_PROTOCOL CTL_CODE(FILE_DEVICE_UNKNOWN, \
74
+ USBPRINT_IOCTL_INDEX+17,\
75
+ METHOD_BUFFERED, \
76
+ FILE_ANY_ACCESS)
77
+
78
+ //
79
+ // Set the current printer protocol code (i.e. USB_PRINTER_PROTOCOL_IPPOVERUSB).
80
+ //
81
+ #define IOCTL_USBPRINT_SET_PROTOCOL CTL_CODE(FILE_DEVICE_UNKNOWN, \
82
+ USBPRINT_IOCTL_INDEX+18,\
83
+ METHOD_BUFFERED, \
84
+ FILE_ANY_ACCESS)
85
+
86
+ //
87
+ // Get the printer protocol capabilities (i.e. USB_PRINTER_INTERFACE_DUAL)
88
+ //
89
+ #define IOCTL_USBPRINT_GET_INTERFACE_TYPE CTL_CODE(FILE_DEVICE_UNKNOWN, \
90
+ USBPRINT_IOCTL_INDEX+19,\
91
+ METHOD_BUFFERED, \
92
+ FILE_ANY_ACCESS)
93
+
94
+ //
95
+ // Set the port number for this interface.
96
+ //
97
+ #define IOCTL_USBPRINT_SET_PORT_NUMBER CTL_CODE(FILE_DEVICE_UNKNOWN, \
98
+ USBPRINT_IOCTL_INDEX+20,\
99
+ METHOD_BUFFERED, \
100
+ FILE_ANY_ACCESS)
101
+
102
+ //
103
+ // Mark whether the MSIPP compat id should be added, and indicate Fax.
104
+ //
105
+ #define IOCTL_USBPRINT_ADD_MSIPP_COMPAT_ID CTL_CODE(FILE_DEVICE_UNKNOWN, \
106
+ USBPRINT_IOCTL_INDEX+21,\
107
+ METHOD_BUFFERED, \
108
+ FILE_ANY_ACCESS)
109
+
110
+ //
111
+ // Set the device id string based on the specified 1284 id string.
112
+ //
113
+ #define IOCTL_USBPRINT_SET_DEVICE_ID CTL_CODE(FILE_DEVICE_UNKNOWN, \
114
+ USBPRINT_IOCTL_INDEX+22,\
115
+ METHOD_BUFFERED, \
116
+ FILE_ANY_ACCESS)
117
+
118
+ //
119
+ // Add the child devnode which informs PNP printer driver matching.
120
+ //
121
+ #define IOCTL_USBPRINT_ADD_CHILD_DEVICE CTL_CODE(FILE_DEVICE_UNKNOWN, \
122
+ USBPRINT_IOCTL_INDEX+23,\
123
+ METHOD_BUFFERED, \
124
+ FILE_ANY_ACCESS)
125
+
126
+ #define IOCTL_USBPRINT_CYCLE_PORT CTL_CODE(FILE_DEVICE_UNKNOWN, \
127
+ USBPRINT_IOCTL_INDEX+24,\
128
+ METHOD_BUFFERED, \
129
+ FILE_ANY_ACCESS)
130
+
131
+ #define IOCTL_USBPRINT_GET_MFG_MDL_ID CTL_CODE(FILE_DEVICE_UNKNOWN, \
132
+ USBPRINT_IOCTL_INDEX+25,\
133
+ METHOD_BUFFERED, \
134
+ FILE_ANY_ACCESS)
135
+
136
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
137
+ #pragma endregion
138
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbscan.h ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Module Name:
6
+ UsbScan.h
7
+
8
+ Abstract:
9
+ Interface with UsbScan kernel driver
10
+
11
+ Environment:
12
+ User and kernel mode use
13
+
14
+ Notes:
15
+ Interface definition for USB still image driver.
16
+
17
+ --*/
18
+
19
+ #if (NTDDI_VERSION >= NTDDI_WIN2K)
20
+
21
+ #ifndef _USBSCAN_H_
22
+ #define _USBSCAN_H_
23
+ #include <winapifamily.h>
24
+
25
+ #pragma region Desktop Family
26
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
27
+
28
+ #pragma pack(push,8)
29
+
30
+ #ifndef MAX_NUM_PIPES
31
+ #define MAX_NUM_PIPES 8
32
+ #endif
33
+
34
+ #define BULKIN_FLAG 0x80
35
+
36
+ typedef struct _DRV_VERSION {
37
+ _Out_ unsigned major;
38
+ _Out_ unsigned minor;
39
+ _Out_ unsigned internal;
40
+ } DRV_VERSION, *PDRV_VERSION;
41
+
42
+ typedef struct _IO_BLOCK {
43
+ _In_ unsigned uOffset;
44
+ _In_ unsigned uLength;
45
+ _Inout_updates_bytes_(uLength) PUCHAR pbyData;
46
+ _In_ unsigned uIndex;
47
+ } IO_BLOCK, *PIO_BLOCK;
48
+
49
+ typedef struct _IO_BLOCK_EX {
50
+ _In_ unsigned uOffset;
51
+ _In_ unsigned uLength;
52
+ _Inout_updates_bytes_(uLength) PUCHAR pbyData;
53
+ _In_ unsigned uIndex;
54
+
55
+ //
56
+ // Following two fields are described in sec. 9.3.1,2 USB specification
57
+ //
58
+ _In_ UCHAR bRequest; // Specific request
59
+ _In_ UCHAR bmRequestType; // Bitmap - charateristics of request
60
+ _In_ UCHAR fTransferDirectionIn; // TRUE - Device-->Host; FALSE - Host-->Device
61
+
62
+ } IO_BLOCK_EX, *PIO_BLOCK_EX;
63
+
64
+
65
+ typedef struct _CHANNEL_INFO {
66
+ _Out_ unsigned EventChannelSize;
67
+ _Out_ unsigned uReadDataAlignment;
68
+ _Out_ unsigned uWriteDataAlignment;
69
+ } CHANNEL_INFO, *PCHANNEL_INFO;
70
+
71
+ typedef enum {
72
+ EVENT_PIPE,
73
+ READ_DATA_PIPE,
74
+ WRITE_DATA_PIPE,
75
+ ALL_PIPE
76
+ } PIPE_TYPE;
77
+
78
+
79
+ typedef struct _USBSCAN_GET_DESCRIPTOR {
80
+ _In_ UCHAR DescriptorType; // high byte of wValue field in USB spec.
81
+ _In_ UCHAR Index; // low byte of wValue field in USB spec.
82
+ _In_ USHORT LanguageId; // wIndex field in USB spec.
83
+ } USBSCAN_GET_DESCRIPTOR, *PUSBSCAN_GET_DESCRIPTOR;
84
+
85
+
86
+ //
87
+ // The device descriptor structure reports information define in the hardware.
88
+ // If there is enough space to copy the strings, it will be done otherwise
89
+ // only the three first fields:
90
+ //
91
+ // USHORT usVendorId;
92
+ // USHORT usProductId;
93
+ // USHORT usBcdDevice;
94
+ //
95
+ // will contain valid data. Remember: The strings are UNICODE format.
96
+ //
97
+
98
+ typedef struct _DEVICE_DESCRIPTOR {
99
+ _Out_ USHORT usVendorId;
100
+ _Out_ USHORT usProductId;
101
+ _Out_ USHORT usBcdDevice;
102
+ _Out_ USHORT usLanguageId;
103
+ } DEVICE_DESCRIPTOR, *PDEVICE_DESCRIPTOR;
104
+
105
+ typedef enum _RAW_PIPE_TYPE {
106
+ USBSCAN_PIPE_CONTROL,
107
+ USBSCAN_PIPE_ISOCHRONOUS,
108
+ USBSCAN_PIPE_BULK,
109
+ USBSCAN_PIPE_INTERRUPT
110
+ } RAW_PIPE_TYPE;
111
+
112
+ typedef struct _USBSCAN_PIPE_INFORMATION {
113
+ USHORT MaximumPacketSize; // Maximum packet size for this pipe
114
+ UCHAR EndpointAddress; // 8 bit USB endpoint address (includes direction)
115
+ UCHAR Interval; // Polling interval in ms if interrupt pipe
116
+ RAW_PIPE_TYPE PipeType; // PipeType identifies type of transfer valid for this pipe
117
+ } USBSCAN_PIPE_INFORMATION, *PUSBSCAN_PIPE_INFORMATION;
118
+
119
+ typedef struct _USBSCAN_PIPE_CONFIGURATION {
120
+ _Out_ ULONG NumberOfPipes;
121
+ _Out_writes_(NumberOfPipes) USBSCAN_PIPE_INFORMATION PipeInfo[MAX_NUM_PIPES];
122
+ } USBSCAN_PIPE_CONFIGURATION, *PUSBSCAN_PIPE_CONFIGURATION;
123
+
124
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
125
+ typedef struct _USBSCAN_TIMEOUT {
126
+ ULONG TimeoutRead;
127
+ ULONG TimeoutWrite;
128
+ ULONG TimeoutEvent;
129
+ } USBSCAN_TIMEOUT, *PUSBSCAN_TIMEOUT;
130
+ #endif // (NTDDI_VERSION >= NTDDI_WINXP)
131
+
132
+ #define FILE_DEVICE_USB_SCAN 0x8000
133
+ #define IOCTL_INDEX 0x0800
134
+
135
+ #define IOCTL_GET_VERSION CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX, METHOD_BUFFERED,FILE_ANY_ACCESS)
136
+ #define IOCTL_CANCEL_IO CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+1, METHOD_BUFFERED,FILE_ANY_ACCESS)
137
+ #define IOCTL_WAIT_ON_DEVICE_EVENT CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+2, METHOD_BUFFERED,FILE_ANY_ACCESS)
138
+ #define IOCTL_READ_REGISTERS CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+3, METHOD_BUFFERED,FILE_ANY_ACCESS)
139
+ #define IOCTL_WRITE_REGISTERS CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+4, METHOD_BUFFERED,FILE_ANY_ACCESS)
140
+ #define IOCTL_GET_CHANNEL_ALIGN_RQST CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+5, METHOD_BUFFERED,FILE_ANY_ACCESS)
141
+ #define IOCTL_GET_DEVICE_DESCRIPTOR CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+6, METHOD_BUFFERED,FILE_ANY_ACCESS)
142
+ #define IOCTL_RESET_PIPE CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+7, METHOD_BUFFERED,FILE_ANY_ACCESS)
143
+ #define IOCTL_GET_USB_DESCRIPTOR CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+8, METHOD_BUFFERED,FILE_ANY_ACCESS)
144
+ #define IOCTL_SEND_USB_REQUEST CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+9, METHOD_BUFFERED,FILE_ANY_ACCESS)
145
+ #define IOCTL_GET_PIPE_CONFIGURATION CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+10,METHOD_BUFFERED,FILE_ANY_ACCESS)
146
+
147
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
148
+ #define IOCTL_SET_TIMEOUT CTL_CODE(FILE_DEVICE_USB_SCAN,IOCTL_INDEX+11,METHOD_BUFFERED,FILE_ANY_ACCESS)
149
+ #endif // (NTDDI_VERSION >= NTDDI_WINXP)
150
+
151
+ //
152
+ // Temporary to avoid breaking LOGISCAN code
153
+ //
154
+ #define ALL ALL_PIPE
155
+ #define IOCTL_ABORT_PIPE IOCTL_CANCEL_IO
156
+ //
157
+ //
158
+ #pragma pack(pop)
159
+
160
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
161
+ #pragma endregion
162
+
163
+ #endif // _USBSCAN_H_
164
+
165
+ #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
msvc/Windows Kits/10/Include/10.0.26100.0/shared/usbspec.h ADDED
@@ -0,0 +1,1273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // Copyright (C) Microsoft. All rights reserved.
3
+ //
4
+ //
5
+ // This header file contains definitions based on information contained
6
+ // in the following Universal Serial Bus Specifications:
7
+ //
8
+ // Universal Serial Bus Specification, Revision 1.1, September 23, 1998
9
+ // Universal Serial Bus Specification, Revision 2.0, April 27, 2000
10
+ // Universal Serial Bus 3.0 Specification, Revision 1.0, November 12, 2008
11
+ // Universal Serial Bus 3.1 Specification, Revision 1.0, July 26, 2013
12
+ //
13
+ // Refer to the referenced sections in these specifications for further
14
+ // information.
15
+ //
16
+
17
+ #ifndef __USBSPEC_H__
18
+ #define __USBSPEC_H__
19
+ #include <winapifamily.h>
20
+
21
+ #pragma region Desktop Family or OneCore Family
22
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
23
+
24
+
25
+ #include <PSHPACK1.H>
26
+
27
+ #if _MSC_VER >= 1200
28
+ #pragma warning(push)
29
+ #endif
30
+ #pragma warning(disable:4201) // nameless struct/union
31
+ #pragma warning(disable:4214) // bit field types other than int
32
+
33
+ //
34
+ // These definitions are not USB specification definitions and do not
35
+ // belong in this header file. They are only here to preserve
36
+ // compatibility with the previous usb200.h header file.
37
+ //
38
+ typedef enum _USB_DEVICE_SPEED {
39
+ UsbLowSpeed = 0,
40
+ UsbFullSpeed,
41
+ UsbHighSpeed,
42
+ UsbSuperSpeed
43
+ } USB_DEVICE_SPEED;
44
+
45
+ typedef enum _USB_DEVICE_TYPE {
46
+ Usb11Device = 0,
47
+ Usb20Device
48
+ } USB_DEVICE_TYPE;
49
+
50
+
51
+
52
+ //
53
+ // Chapter 9 USB Device Framework
54
+ //
55
+
56
+ //
57
+ // USB 1.1: 9.3 USB Device Requests, Table 9-2. Format of Setup Data
58
+ // USB 2.1: 9.3 USB Device Requests, Table 9-2. Format of Setup Data
59
+ // USB 3.0: 9.3 USB Device Requests, Table 9-2. Format of Setup Data
60
+ //
61
+ typedef union _BM_REQUEST_TYPE {
62
+ struct _BM {
63
+ UCHAR Recipient:2;
64
+ UCHAR Reserved:3;
65
+ UCHAR Type:2;
66
+ UCHAR Dir:1;
67
+ #ifdef __cplusplus
68
+ } s;
69
+ #else
70
+ };
71
+ #endif
72
+ UCHAR B;
73
+ } BM_REQUEST_TYPE, *PBM_REQUEST_TYPE;
74
+
75
+ typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET {
76
+ BM_REQUEST_TYPE bmRequestType;
77
+ UCHAR bRequest;
78
+
79
+ union _wValue {
80
+ struct {
81
+ UCHAR LowByte;
82
+ UCHAR HiByte;
83
+ };
84
+ USHORT W;
85
+ } wValue;
86
+
87
+ union _wIndex {
88
+ struct {
89
+ UCHAR LowByte;
90
+ UCHAR HiByte;
91
+ };
92
+ USHORT W;
93
+ } wIndex;
94
+ USHORT wLength;
95
+ } USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET;
96
+
97
+ C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8);
98
+
99
+ //
100
+ // bmRequestType.Dir
101
+ //
102
+ #define BMREQUEST_HOST_TO_DEVICE 0
103
+ #define BMREQUEST_DEVICE_TO_HOST 1
104
+
105
+ //
106
+ // bmRequestType.Type
107
+ #define BMREQUEST_STANDARD 0
108
+ #define BMREQUEST_CLASS 1
109
+ #define BMREQUEST_VENDOR 2
110
+
111
+ //
112
+ // bmRequestType.Recipient
113
+ //
114
+ #define BMREQUEST_TO_DEVICE 0
115
+ #define BMREQUEST_TO_INTERFACE 1
116
+ #define BMREQUEST_TO_ENDPOINT 2
117
+ #define BMREQUEST_TO_OTHER 3
118
+
119
+ //
120
+ // wValue for Get Descriptor request
121
+ //
122
+ #define USB_DESCRIPTOR_MAKE_TYPE_AND_INDEX(d, i) ((USHORT)((USHORT)d<<8 | i))
123
+
124
+ //
125
+ // USB 1.1: 9.4 Standard Device Requests, Table 9-4. Standard Request Codes
126
+ // USB 2.0: 9.4 Standard Device Requests, Table 9-4. Standard Request Codes
127
+ //
128
+ #define USB_REQUEST_GET_STATUS 0x00
129
+ #define USB_REQUEST_CLEAR_FEATURE 0x01
130
+ #define USB_REQUEST_SET_FEATURE 0x03
131
+ #define USB_REQUEST_SET_ADDRESS 0x05
132
+ #define USB_REQUEST_GET_DESCRIPTOR 0x06
133
+ #define USB_REQUEST_SET_DESCRIPTOR 0x07
134
+ #define USB_REQUEST_GET_CONFIGURATION 0x08
135
+ #define USB_REQUEST_SET_CONFIGURATION 0x09
136
+ #define USB_REQUEST_GET_INTERFACE 0x0A
137
+ #define USB_REQUEST_SET_INTERFACE 0x0B
138
+ #define USB_REQUEST_SYNC_FRAME 0x0C
139
+
140
+ #define USB_REQUEST_GET_FIRMWARE_STATUS 0x1A
141
+ #define USB_REQUEST_SET_FIRMWARE_STATUS 0x1B
142
+
143
+ //
144
+ // wValue field options for USB_REQUEST_GET_FIRMWARE_STATUS
145
+ //
146
+
147
+ #define USB_GET_FIRMWARE_ALLOWED_OR_DISALLOWED_STATE 0x00
148
+ #define USB_GET_FIRMWARE_HASH 0x01
149
+
150
+ #define USB_DEVICE_FIRMWARE_HASH_LENGTH 32
151
+
152
+ //
153
+ // wValue field options for USB_REQUEST_SET_FIRMWARE_STATUS
154
+ //
155
+
156
+ #define USB_DISALLOW_FIRMWARE_UPDATE 0x00
157
+ #define USB_ALLOW_FIRMWARE_UPDATE 0x01
158
+
159
+ //
160
+ // USB 3.0: 9.4 Standard Device Requests, Table 9-4. Standard Request Codes
161
+ //
162
+ #define USB_REQUEST_SET_SEL 0x30
163
+ #define USB_REQUEST_ISOCH_DELAY 0x31
164
+
165
+ //
166
+ // USB 1.1: 9.4 Standard Device Requests, Table 9-5. Descriptor Types
167
+ //
168
+ #define USB_DEVICE_DESCRIPTOR_TYPE 0x01
169
+ #define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
170
+ #define USB_STRING_DESCRIPTOR_TYPE 0x03
171
+ #define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
172
+ #define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
173
+ //
174
+ // USB 2.0: 9.4 Standard Device Requests, Table 9-5. Descriptor Types
175
+ //
176
+ #define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06
177
+ #define USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE 0x07
178
+ #define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08
179
+ #define EUSB2_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR_TYPE 0x12
180
+
181
+ //
182
+ // USB 3.0: 9.4 Standard Device Requests, Table 9-5. Descriptor Types
183
+ //
184
+ #define USB_OTG_DESCRIPTOR_TYPE 0x09
185
+ #define USB_DEBUG_DESCRIPTOR_TYPE 0x0A
186
+ #define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B
187
+ #define USB_BOS_DESCRIPTOR_TYPE 0x0F
188
+ #define USB_DEVICE_CAPABILITY_DESCRIPTOR_TYPE 0x10
189
+ #define USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_TYPE 0x30
190
+ //
191
+ // USB 3.1: 9.4 Standard Device Requests, Table 9-6. Descriptor Types
192
+ //
193
+ #define USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR_TYPE 0x31
194
+ //
195
+ // Legacy definitions, do not use.
196
+ //
197
+ #define USB_RESERVED_DESCRIPTOR_TYPE 0x06
198
+ #define USB_CONFIG_POWER_DESCRIPTOR_TYPE 0x07
199
+
200
+ //
201
+ // USB 1.1: 9.4 Standard Device Requests, Table 9-6. Standard Feature Selectors
202
+ //
203
+ #define USB_FEATURE_ENDPOINT_STALL 0x00
204
+ #define USB_FEATURE_REMOTE_WAKEUP 0x01
205
+ //
206
+ // USB 2.0: 9.4 Standard Device Requests, Table 9-6. Standard Feature Selectors
207
+ //
208
+ #define USB_FEATURE_TEST_MODE 0x02
209
+ //
210
+ // USB 3.0: 9.4 Standard Device Requests, Table 9-6. Standard Feature Selectors
211
+ //
212
+ #define USB_FEATURE_FUNCTION_SUSPEND 0x00
213
+ #define USB_FEATURE_U1_ENABLE 0x30
214
+ #define USB_FEATURE_U2_ENABLE 0x31
215
+ #define USB_FEATURE_LTM_ENABLE 0x32
216
+ //
217
+ // USB 3.1: 9.4 Standard Device Requests, Table 9-7. Standard Feature Selectors
218
+ //
219
+ #define USB_FEATURE_LDM_ENABLE 0x35
220
+
221
+ //
222
+ // USBPD Rev2.0: 9.3.1 Class-specific Device Requests, Table 9-8 PD. Class Feature Selectors
223
+ //
224
+ #define USB_FEATURE_BATTERY_WAKE_MASK 0x28
225
+ #define USB_FEATURE_OS_IS_PD_AWARE 0x29
226
+ #define USB_FEATURE_POLICY_MODE 0x2A
227
+ #define USB_FEATURE_CHARGING_POLICY 0x36
228
+
229
+ //
230
+ // USBPD Rev2.0: 9.4.5.4 CHARGING_POLICY Feature Selector
231
+ //
232
+ #define USB_CHARGING_POLICY_DEFAULT 0x00
233
+ #define USB_CHARGING_POLICY_ICCHPF 0x01
234
+ #define USB_CHARGING_POLICY_ICCLPF 0x02
235
+ #define USB_CHARGING_POLICY_NO_POWER 0x03
236
+
237
+ //
238
+ // USB 3.1: 10.16.2.6 Get Port Status, Table 10-12. Port Status Type Codes
239
+ //
240
+ #define USB_STATUS_PORT_STATUS 0x00
241
+ #define USB_STATUS_PD_STATUS 0x01
242
+ #define USB_STATUS_EXT_PORT_STATUS 0x02
243
+
244
+ //
245
+ // USB 1.1: 9.4.5 Get Status, Figure 9-4. Information Returned by a GetStatus() Request to a Device
246
+ // USB 2.0: 9.4.5 Get Status, Figure 9-4. Information Returned by a GetStatus() Request to a Device
247
+ //
248
+ #define USB_GETSTATUS_SELF_POWERED 0x01
249
+ #define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED 0x02
250
+ //
251
+ // USB 3.0: 9.4.5 Get Status, Figure 9-5. Information Returned by a GetStatus() Request to a Device
252
+ //
253
+ #define USB_GETSTATUS_U1_ENABLE 0x04
254
+ #define USB_GETSTATUS_U2_ENABLE 0x08
255
+ #define USB_GETSTATUS_LTM_ENABLE 0x10
256
+
257
+ typedef union _USB_DEVICE_STATUS {
258
+ USHORT AsUshort16;
259
+ struct {
260
+ USHORT SelfPowered:1;
261
+ USHORT RemoteWakeup:1;
262
+ USHORT U1Enable:1; // (USB 1.1, USB 2.0 Reserved)
263
+ USHORT U2Enable:1; // (USB 1.1, USB 2.0 Reserved)
264
+ USHORT LtmEnable:1; // (USB 1.1, USB 2.0 Reserved)
265
+ USHORT Reserved:11;
266
+ };
267
+ } USB_DEVICE_STATUS, *PUSB_DEVICE_STATUS;
268
+
269
+ C_ASSERT(sizeof(USB_DEVICE_STATUS) == sizeof(USHORT));
270
+
271
+ //
272
+ // USB 3.0: 9.4.5 Get Status, Figure 9-6. Information Returned by a GetStatus() Request to an Interface
273
+ //
274
+ typedef union _USB_INTERFACE_STATUS {
275
+ USHORT AsUshort16;
276
+ struct {
277
+ USHORT RemoteWakeupCapable:1;
278
+ USHORT RemoteWakeupEnabled:1;
279
+ USHORT Reserved:14;
280
+ };
281
+ } USB_INTERFACE_STATUS, *PUSB_INTERFACE_STATUS;
282
+
283
+ C_ASSERT(sizeof(USB_INTERFACE_STATUS) == sizeof(USHORT));
284
+
285
+ //
286
+ // USB 1.1: 9.4.5 Get Status, Figure 9-6. Information Returned by a GetStatus() Request to an Endpoint
287
+ // USB 2.0: 9.4.5 Get Status, Figure 9-6. Information Returned by a GetStatus() Request to an Endpoint
288
+ // USB 3.0: 9.4.5 Get Status, Figure 9-7. Information Returned by a GetStatus() Request to an Endpoint
289
+ //
290
+ typedef union _USB_ENDPOINT_STATUS {
291
+ USHORT AsUshort16;
292
+ struct {
293
+ USHORT Halt:1;
294
+ USHORT Reserved:15;
295
+ };
296
+ } USB_ENDPOINT_STATUS, *PUSB_ENDPOINT_STATUS;
297
+
298
+ C_ASSERT(sizeof(USB_ENDPOINT_STATUS) == sizeof(USHORT));
299
+
300
+
301
+ typedef struct _USB_COMMON_DESCRIPTOR {
302
+ UCHAR bLength;
303
+ UCHAR bDescriptorType;
304
+ } USB_COMMON_DESCRIPTOR, *PUSB_COMMON_DESCRIPTOR;
305
+
306
+ //
307
+ // USB 1.1: 9.6.1 Device, Table 9-7. Standard Device Descriptor
308
+ // USB 2.0: 9.6.1 Device, Table 9-8. Standard Device Descriptor
309
+ // USB 3.0: 9.6.1 Device, Table 9-8. Standard Device Descriptor
310
+ //
311
+ typedef struct _USB_DEVICE_DESCRIPTOR {
312
+ UCHAR bLength;
313
+ UCHAR bDescriptorType;
314
+ USHORT bcdUSB;
315
+ UCHAR bDeviceClass;
316
+ UCHAR bDeviceSubClass;
317
+ UCHAR bDeviceProtocol;
318
+ UCHAR bMaxPacketSize0;
319
+ USHORT idVendor;
320
+ USHORT idProduct;
321
+ USHORT bcdDevice;
322
+ UCHAR iManufacturer;
323
+ UCHAR iProduct;
324
+ UCHAR iSerialNumber;
325
+ UCHAR bNumConfigurations;
326
+ } USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR;
327
+
328
+ C_ASSERT(sizeof(USB_DEVICE_DESCRIPTOR) == 18);
329
+
330
+ //
331
+ // With the exception of the HUB device class, USB class codes are not
332
+ // defined in the core USB 1.1, 2.0, 3.0 specifications.
333
+ //
334
+ #define USB_DEVICE_CLASS_RESERVED 0x00
335
+ #define USB_DEVICE_CLASS_AUDIO 0x01
336
+ #define USB_DEVICE_CLASS_COMMUNICATIONS 0x02
337
+ #define USB_DEVICE_CLASS_HUMAN_INTERFACE 0x03
338
+ #define USB_DEVICE_CLASS_MONITOR 0x04
339
+ #define USB_DEVICE_CLASS_PHYSICAL_INTERFACE 0x05
340
+ #define USB_DEVICE_CLASS_POWER 0x06
341
+ #define USB_DEVICE_CLASS_IMAGE 0x06
342
+ #define USB_DEVICE_CLASS_PRINTER 0x07
343
+ #define USB_DEVICE_CLASS_STORAGE 0x08
344
+ #define USB_DEVICE_CLASS_HUB 0x09
345
+ #define USB_DEVICE_CLASS_CDC_DATA 0x0A
346
+ #define USB_DEVICE_CLASS_SMART_CARD 0x0B
347
+ #define USB_DEVICE_CLASS_CONTENT_SECURITY 0x0D
348
+ #define USB_DEVICE_CLASS_VIDEO 0x0E
349
+ #define USB_DEVICE_CLASS_PERSONAL_HEALTHCARE 0x0F
350
+ #define USB_DEVICE_CLASS_AUDIO_VIDEO 0x10
351
+ #define USB_DEVICE_CLASS_BILLBOARD 0x11
352
+ #define USB_DEVICE_CLASS_DIAGNOSTIC_DEVICE 0xDC
353
+ #define USB_DEVICE_CLASS_WIRELESS_CONTROLLER 0xE0
354
+ #define USB_DEVICE_CLASS_MISCELLANEOUS 0xEF
355
+ #define USB_DEVICE_CLASS_APPLICATION_SPECIFIC 0xFE
356
+ #define USB_DEVICE_CLASS_VENDOR_SPECIFIC 0xFF
357
+
358
+ //
359
+ // USB 2.0: 9.6.2 Device_Qualifier, Table 9-9. Device_Qualifier Descriptor
360
+ //
361
+ typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR {
362
+ UCHAR bLength;
363
+ UCHAR bDescriptorType;
364
+ USHORT bcdUSB;
365
+ UCHAR bDeviceClass;
366
+ UCHAR bDeviceSubClass;
367
+ UCHAR bDeviceProtocol;
368
+ UCHAR bMaxPacketSize0;
369
+ UCHAR bNumConfigurations;
370
+ UCHAR bReserved;
371
+ } USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR;
372
+
373
+ C_ASSERT(sizeof(USB_DEVICE_QUALIFIER_DESCRIPTOR) == 10);
374
+
375
+ //
376
+ // USB 3.0: 9.6.2 Binary Device Object Store (BOS), Table 9-9. BOS Descriptor
377
+ //
378
+ typedef struct _USB_BOS_DESCRIPTOR {
379
+ UCHAR bLength;
380
+ UCHAR bDescriptorType;
381
+ USHORT wTotalLength;
382
+ UCHAR bNumDeviceCaps;
383
+ } USB_BOS_DESCRIPTOR, *PUSB_BOS_DESCRIPTOR;
384
+
385
+ C_ASSERT(sizeof(USB_BOS_DESCRIPTOR) == 5);
386
+
387
+ //
388
+ // USB 3.1: 9.6.2 Binary Device Object Store (BOS), Table 9-14. Device Capability Type Codes
389
+ //
390
+ #define USB_DEVICE_CAPABILITY_WIRELESS_USB 0x01
391
+ #define USB_DEVICE_CAPABILITY_USB20_EXTENSION 0x02
392
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_USB 0x03
393
+ #define USB_DEVICE_CAPABILITY_CONTAINER_ID 0x04
394
+ #define USB_DEVICE_CAPABILITY_PLATFORM 0x05
395
+ #define USB_DEVICE_CAPABILITY_POWER_DELIVERY 0x06
396
+ #define USB_DEVICE_CAPABILITY_BATTERY_INFO 0x07
397
+ #define USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT 0x08
398
+ #define USB_DEVICE_CAPABILITY_PD_PROVIDER_PORT 0x09
399
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB 0x0A
400
+ #define USB_DEVICE_CAPABILITY_PRECISION_TIME_MEASUREMENT 0x0B
401
+ #define USB_DEVICE_CAPABILITY_BILLBOARD 0x0D
402
+ #define USB_DEVICE_CAPABILITY_FIRMWARE_STATUS 0x11
403
+
404
+ //
405
+ // USB 2.0 ECN: Link Power Management (LPM), 3. Framework: USB Device Capabilities - USB 2.0 Extension,
406
+ // Table 3-1. USB Device Capabilities - USB 2.0 Extension Descriptor
407
+ // USB 3.0: 9.6.2.1 USB 2.0 Extension, Table 9-12. USB 2.0 Extension Descriptor
408
+ //
409
+ typedef struct _USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR {
410
+ UCHAR bLength;
411
+ UCHAR bDescriptorType;
412
+ UCHAR bDevCapabilityType;
413
+ union {
414
+ ULONG AsUlong;
415
+ struct {
416
+ ULONG Reserved:1;
417
+ ULONG LPMCapable:1;
418
+ ULONG BESLAndAlternateHIRDSupported:1;
419
+ ULONG BaselineBESLValid:1;
420
+ ULONG DeepBESLValid:1;
421
+ ULONG Reserved1:3;
422
+ ULONG BaselineBESL:4;
423
+ ULONG DeepBESL:4;
424
+ ULONG Reserved2:16;
425
+ };
426
+ } bmAttributes;
427
+ } USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR;
428
+
429
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR) == 7);
430
+
431
+ #define USB_DEVICE_CAPABILITY_USB20_EXTENSION_BMATTRIBUTES_RESERVED_MASK 0xFFFF00E1
432
+
433
+ //
434
+ // USBPD Rev2.0: 9.2.1 USB Power Delivery Capability Descriptor, Table 9-2. USB Power Delivery Capability Descriptor
435
+ //
436
+ typedef struct _USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR {
437
+ UCHAR bLength;
438
+ UCHAR bDescriptorType;
439
+ UCHAR bDevCapabilityType;
440
+ UCHAR bReserved;
441
+ union {
442
+ ULONG AsUlong;
443
+ struct {
444
+ ULONG Reserved1:1;
445
+ ULONG BatteryCharging:1;
446
+ ULONG USBPowerDelivery:1;
447
+ ULONG Provider:1;
448
+ ULONG Consumer:1;
449
+ ULONG ChargingPolicy:1;
450
+ ULONG TypeCCurrent:1;
451
+ ULONG Reserved2:1;
452
+ ULONG ACSupply:1;
453
+ ULONG Battery:1;
454
+ ULONG Other:1;
455
+ ULONG NumBatteries:3;
456
+ ULONG UsesVbus:1;
457
+ ULONG Reserved3:17;
458
+ };
459
+ } bmAttributes;
460
+ USHORT bmProviderPorts;
461
+ USHORT bmConsumerPorts;
462
+ USHORT bcdBCVersion;
463
+ USHORT bcdPDVersion;
464
+ USHORT bcdUSBTypeCVersion;
465
+ } USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR;
466
+
467
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR) == 18);
468
+
469
+ //
470
+ // USBPD Rev2.0: 9.2.3 PD Consumer Port Capability Descriptor, Table 9-4. PD Consumer Port Descriptor
471
+ //
472
+ typedef struct _USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR {
473
+ UCHAR bLength;
474
+ UCHAR bDescriptorType;
475
+ UCHAR bDevCapabilityType;
476
+ UCHAR bReserved;
477
+ union {
478
+ USHORT AsUshort;
479
+ struct {
480
+ USHORT BatteryCharging:1;
481
+ USHORT USBPowerDelivery:1;
482
+ USHORT USBTypeCCurrent:1;
483
+ USHORT Reserved:13;
484
+ };
485
+ } bmCapabilities;
486
+ USHORT wMinVoltage;
487
+ USHORT wMaxVoltage;
488
+ USHORT wReserved;
489
+ ULONG dwMaxOperatingPower;
490
+ ULONG dwMaxPeakPower;
491
+ ULONG dwMaxPeakPowerTime;
492
+ } USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR;
493
+
494
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR) == 24);
495
+
496
+ //
497
+ // USB 3.0: 9.6.2.2 SuperSpeed USB Device Capability, Table 9-13. SuperSpeed Device Capabilities Descriptor
498
+ //
499
+ typedef struct _USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR {
500
+ UCHAR bLength;
501
+ UCHAR bDescriptorType;
502
+ UCHAR bDevCapabilityType;
503
+ UCHAR bmAttributes; // needs bitfield definitions
504
+ USHORT wSpeedsSupported; // needs bitfield definitions
505
+ UCHAR bFunctionalitySupport;
506
+ UCHAR bU1DevExitLat;
507
+ USHORT wU2DevExitLat;
508
+ } USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR;
509
+
510
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_BMATTRIBUTES_RESERVED_MASK 0xFD
511
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_BMATTRIBUTES_LTM_CAPABLE 0x02
512
+
513
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_RESERVED_MASK 0xFFF0
514
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_LOW 0x0001
515
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_FULL 0x0002
516
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_HIGH 0x0004
517
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_SUPER 0x0008
518
+
519
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_U1_DEVICE_EXIT_MAX_VALUE 0x0A
520
+
521
+ #define USB_DEVICE_CAPABILITY_SUPERSPEED_U2_DEVICE_EXIT_MAX_VALUE 0x07FF
522
+
523
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR) == 10);
524
+
525
+ #define USB_DEVICE_CAPABILITY_MAX_U1_LATENCY 0x0A
526
+ #define USB_DEVICE_CAPABILITY_MAX_U2_LATENCY 0x07FF
527
+
528
+ //
529
+ // USB 3.1: 9.6.2.5 SuperSpeedPlus USB Device Capability, Table 9-19. SuperSpeedPlus Device Capabilities Descriptor
530
+ //
531
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_BPS 0
532
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_KBPS 1
533
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_MBPS 2
534
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_GBPS 3
535
+
536
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_MODE_SYMMETRIC 0
537
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_MODE_ASYMMETRIC 1
538
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_DIR_RX 0
539
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_DIR_TX 1
540
+
541
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_PROTOCOL_SS 0
542
+ #define USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_PROTOCOL_SSP 1
543
+
544
+ typedef union _USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED {
545
+ ULONG AsUlong32;
546
+ struct {
547
+ ULONG SublinkSpeedAttrID:4;
548
+ ULONG LaneSpeedExponent:2;
549
+ ULONG SublinkTypeMode:1;
550
+ ULONG SublinkTypeDir:1;
551
+ ULONG Reserved:6;
552
+ ULONG LinkProtocol:2;
553
+ ULONG LaneSpeedMantissa:16;
554
+ };
555
+ } USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED, *PUSB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED;
556
+
557
+ typedef struct _USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR {
558
+ UCHAR bLength;
559
+ UCHAR bDescriptorType;
560
+ UCHAR bDevCapabilityType;
561
+ UCHAR bReserved;
562
+ union {
563
+ ULONG AsUlong;
564
+ struct {
565
+ ULONG SublinkSpeedAttrCount:5;
566
+ ULONG SublinkSpeedIDCount:4;
567
+ ULONG Reserved:23;
568
+ };
569
+ } bmAttributes;
570
+ union {
571
+ USHORT AsUshort;
572
+ struct {
573
+ USHORT SublinkSpeedAttrID:4;
574
+ USHORT Reserved:4;
575
+ USHORT MinRxLaneCount:4;
576
+ USHORT MinTxLaneCount:4;
577
+ };
578
+ } wFunctionalitySupport;
579
+ USHORT wReserved;
580
+ USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED bmSublinkSpeedAttr[1];
581
+ } USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR;
582
+
583
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR) == 16);
584
+
585
+ //
586
+ // USB 3.0: 9.6.2.3 Container ID, Table 9-14. Container ID Descriptor
587
+ //
588
+ typedef struct _USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR {
589
+ UCHAR bLength;
590
+ UCHAR bDescriptorType;
591
+ UCHAR bDevCapabilityType;
592
+ UCHAR bReserved;
593
+ UCHAR ContainerID[16];
594
+ } USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR;
595
+
596
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR) == 20);
597
+
598
+ //
599
+ // USB Device Capability Platform Descriptor
600
+ //
601
+ typedef struct _USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR {
602
+ UCHAR bLength;
603
+ UCHAR bDescriptorType;
604
+ UCHAR bDevCapabilityType;
605
+ UCHAR bReserved;
606
+ GUID PlatformCapabilityUuid;
607
+ UCHAR CapabililityData[1];
608
+ } USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR;
609
+
610
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR) == 21);
611
+
612
+ //
613
+ // USB Billboard 1.0: Section 3.1.5.2, Table 3-6. Billboard Capability Descriptor
614
+ //
615
+ typedef struct _USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR {
616
+ UCHAR bLength;
617
+ UCHAR bDescriptorType;
618
+ UCHAR bDevCapabilityType;
619
+ UCHAR iAddtionalInfoURL;
620
+ UCHAR bNumberOfAlternateModes;
621
+ UCHAR bPreferredAlternateMode;
622
+ union {
623
+ USHORT AsUshort;
624
+ struct {
625
+ USHORT VConnPowerNeededForFullFunctionality:3;
626
+ USHORT Reserved:12;
627
+ USHORT NoVconnPowerRequired:1;
628
+ };
629
+ } VconnPower;
630
+ UCHAR bmConfigured[32];
631
+ ULONG bReserved;
632
+ struct {
633
+ USHORT wSVID;
634
+ UCHAR bAlternateMode;
635
+ UCHAR iAlternateModeSetting;
636
+ } AlternateMode[1];
637
+ } USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR;
638
+
639
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR) == 48);
640
+
641
+ //
642
+ // USB 3.2 ECN: USB FW Update
643
+ //
644
+ typedef struct _USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR {
645
+ UCHAR bLength;
646
+ UCHAR bDescriptorType;
647
+ UCHAR bDevCapabilityType;
648
+ UCHAR bcdDescriptorVersion;
649
+ union {
650
+ ULONG AsUlong;
651
+ struct {
652
+ ULONG GetFirmwareImageHashSupport:1;
653
+ ULONG DisallowFirmwareUpdateSupport:1;
654
+ ULONG Reserved:30;
655
+ };
656
+ } bmAttributes;
657
+ } USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR;
658
+
659
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR) == 8);
660
+
661
+ // {D8DD60DF-4589-4CC7-9CD2-659D9E648A9F}
662
+ DEFINE_GUID(GUID_USB_MSOS20_PLATFORM_CAPABILITY_ID,
663
+ 0xD8DD60DF, 0x4589, 0x4CC7, 0x9C, 0xD2, 0x65, 0x9D, 0x9E, 0x64, 0x8A, 0x9F);
664
+
665
+ //
666
+ // USB 3.0: 9.6.2 Binary Device Object Store, Table 9-10. Device Capability Descriptor
667
+ //
668
+ typedef struct _USB_DEVICE_CAPABILITY_DESCRIPTOR {
669
+ UCHAR bLength;
670
+ UCHAR bDescriptorType;
671
+ UCHAR bDevCapabilityType;
672
+ } USB_DEVICE_CAPABILITY_DESCRIPTOR, *PUSB_DEVICE_CAPABILITY_DESCRIPTOR;
673
+
674
+ C_ASSERT(sizeof(USB_DEVICE_CAPABILITY_DESCRIPTOR) == 3);
675
+ //
676
+ // USB 1.1: 9.6.2 Configuration, Table 9-8. Standard Configuration Descriptor
677
+ // USB 2.0: 9.6.3 Configuration, Table 9-10. Standard Configuration Descriptor
678
+ // USB 3.0: 9.6.3 Configuration, Table 9-15. Standard Configuration Descriptor
679
+ //
680
+ typedef struct _USB_CONFIGURATION_DESCRIPTOR {
681
+ UCHAR bLength;
682
+ UCHAR bDescriptorType;
683
+ USHORT wTotalLength;
684
+ UCHAR bNumInterfaces;
685
+ UCHAR bConfigurationValue;
686
+ UCHAR iConfiguration;
687
+ UCHAR bmAttributes;
688
+ UCHAR MaxPower;
689
+ } USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
690
+
691
+ C_ASSERT(sizeof(USB_CONFIGURATION_DESCRIPTOR) == 9);
692
+
693
+ //
694
+ // Configuration Descriptor bmAttributes bit definitions
695
+ //
696
+ #define USB_CONFIG_POWERED_MASK 0xC0
697
+ #define USB_CONFIG_BUS_POWERED 0x80
698
+ #define USB_CONFIG_SELF_POWERED 0x40
699
+ #define USB_CONFIG_REMOTE_WAKEUP 0x20
700
+ #define USB_CONFIG_RESERVED 0x1F
701
+
702
+ //
703
+ // USB 2.0 ECN: USB ECN : Interface Association Descriptor, 9.X.Y Interface Association,
704
+ // Table 9-Z. Standard Interface Association Descriptor
705
+ // USB 3.0: 9.6.4 Interface Association, Table 9-16. Standard Interface Association Descriptor
706
+ //
707
+ typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR {
708
+ UCHAR bLength;
709
+ UCHAR bDescriptorType;
710
+ UCHAR bFirstInterface;
711
+ UCHAR bInterfaceCount;
712
+ UCHAR bFunctionClass;
713
+ UCHAR bFunctionSubClass;
714
+ UCHAR bFunctionProtocol;
715
+ UCHAR iFunction;
716
+ } USB_INTERFACE_ASSOCIATION_DESCRIPTOR, *PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR;
717
+
718
+ C_ASSERT(sizeof(USB_INTERFACE_ASSOCIATION_DESCRIPTOR) == 8);
719
+
720
+ //
721
+ // USB 1.1: 9.6.3 Interface, Table 9-9. Standard Interface Descriptor
722
+ // USB 2.0: 9.6.5 Interface, Table 9-12. Standard Interface Descriptor
723
+ // USB 3.0: 9.6.5 Interface, Table 9-17. Standard Interface Descriptor
724
+ //
725
+ typedef struct _USB_INTERFACE_DESCRIPTOR {
726
+ UCHAR bLength;
727
+ UCHAR bDescriptorType;
728
+ UCHAR bInterfaceNumber;
729
+ UCHAR bAlternateSetting;
730
+ UCHAR bNumEndpoints;
731
+ UCHAR bInterfaceClass;
732
+ UCHAR bInterfaceSubClass;
733
+ UCHAR bInterfaceProtocol;
734
+ UCHAR iInterface;
735
+ } USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR;
736
+
737
+ C_ASSERT(sizeof(USB_INTERFACE_DESCRIPTOR) == 9);
738
+
739
+ //
740
+ // USB 1.1: 9.6.4 Endpoint, Table 9-10. Standard Endpoint Descriptor
741
+ // USB 2.0: 9.6.6 Endpoint, Table 9-13. Standard Endpoint Descriptor
742
+ // USB 3.0: 9.6.6 Endpoint, Table 9-18. Standard Endpoint Descriptor
743
+ //
744
+ typedef struct _USB_ENDPOINT_DESCRIPTOR {
745
+ UCHAR bLength;
746
+ UCHAR bDescriptorType;
747
+ UCHAR bEndpointAddress;
748
+ UCHAR bmAttributes;
749
+ USHORT wMaxPacketSize;
750
+ UCHAR bInterval;
751
+ } USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
752
+
753
+ C_ASSERT(sizeof(USB_ENDPOINT_DESCRIPTOR) == 7);
754
+
755
+ //
756
+ // USB_ENDPOINT_DESCRIPTOR bEndpointAddress bit 7
757
+ //
758
+ #define USB_ENDPOINT_DIRECTION_MASK 0x80
759
+ #define USB_ENDPOINT_DIRECTION_OUT(addr) (!((addr) & USB_ENDPOINT_DIRECTION_MASK))
760
+ #define USB_ENDPOINT_DIRECTION_IN(addr) ((addr) & USB_ENDPOINT_DIRECTION_MASK)
761
+
762
+ #define USB_ENDPOINT_ADDRESS_MASK 0x0F
763
+
764
+ //
765
+ // USB_ENDPOINT_DESCRIPTOR bmAttributes bits 0-1
766
+ //
767
+ #define USB_ENDPOINT_TYPE_MASK 0x03
768
+ #define USB_ENDPOINT_TYPE_CONTROL 0x00
769
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
770
+ #define USB_ENDPOINT_TYPE_BULK 0x02
771
+ #define USB_ENDPOINT_TYPE_INTERRUPT 0x03
772
+
773
+ //
774
+ // USB_ENDPOINT_DESCRIPTOR bmAttributes bits 7-2
775
+ //
776
+
777
+ #define USB_ENDPOINT_TYPE_BULK_RESERVED_MASK 0xFC
778
+ #define USB_ENDPOINT_TYPE_CONTROL_RESERVED_MASK 0xFC
779
+ #define USB_20_ENDPOINT_TYPE_INTERRUPT_RESERVED_MASK 0xFC
780
+ #define USB_30_ENDPOINT_TYPE_INTERRUPT_RESERVED_MASK 0xCC
781
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_RESERVED_MASK 0xC0
782
+
783
+ #define USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_MASK 0x30
784
+ #define USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_PERIODIC 0x00
785
+ #define USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_NOTIFICATION 0x10
786
+ #define USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_RESERVED10 0x20
787
+ #define USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_RESERVED11 0x30
788
+ #define USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE(bmAttr) (bmAttr & USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_MASK)
789
+
790
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_MASK 0x0C
791
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_NO_SYNCHRONIZATION 0x00
792
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_ASYNCHRONOUS 0x04
793
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_ADAPTIVE 0x08
794
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_SYNCHRONOUS 0x0C
795
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION(bmAttr) (bmAttr & USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_MASK)
796
+
797
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_MASK 0x30
798
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_DATA_ENDOINT 0x00
799
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_FEEDBACK_ENDPOINT 0x10
800
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_IMPLICIT_FEEDBACK_DATA_ENDPOINT 0x20
801
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_RESERVED 0x30
802
+ #define USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE(bmAttr) (bmAttr & USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_MASK)
803
+
804
+ //
805
+ // USB_ENDPOINT_DESCRIPTOR wMaxPacketSize
806
+ //
807
+ typedef union _USB_HIGH_SPEED_MAXPACKET {
808
+ struct _MP {
809
+ USHORT MaxPacket:11; // 0-10
810
+ USHORT HSmux:2; // 11-12
811
+ USHORT Reserved:3; // 13-15
812
+ };
813
+ USHORT us;
814
+ } USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET;
815
+
816
+ C_ASSERT(sizeof(USB_HIGH_SPEED_MAXPACKET) == 2);
817
+
818
+ #define USB_ENDPOINT_SUPERSPEED_BULK_MAX_PACKET_SIZE 1024
819
+ #define USB_ENDPOINT_SUPERSPEED_CONTROL_MAX_PACKET_SIZE 512
820
+ #define USB_ENDPOINT_SUPERSPEED_ISO_MAX_PACKET_SIZE 1024
821
+ #define USB_ENDPOINT_SUPERSPEED_INTERRUPT_MAX_PACKET_SIZE 1024
822
+
823
+ //
824
+ // USB 1.1: 9.6.5 String, Table 9-12. UNICODE String Descriptor
825
+ // USB 2.0: 9.6.7 String, Table 9-16. UNICODE String Descriptor
826
+ // USB 3.0: 9.6.8 String, Table 9-22. UNICODE String Descriptor
827
+ //
828
+ typedef struct _USB_STRING_DESCRIPTOR {
829
+ UCHAR bLength;
830
+ UCHAR bDescriptorType;
831
+ WCHAR bString[1];
832
+ } USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR;
833
+
834
+ #define MAXIMUM_USB_STRING_LENGTH 255
835
+
836
+ //
837
+ // USB 3.0: 9.6.7 SuperSpeed Endpoint Companion, Table 9-20. SuperSpeed Endpoint Companion Descriptor
838
+ //
839
+ typedef struct _USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR {
840
+ UCHAR bLength;
841
+ UCHAR bDescriptorType;
842
+ UCHAR bMaxBurst;
843
+ union {
844
+ UCHAR AsUchar;
845
+ struct {
846
+ UCHAR MaxStreams:5;
847
+ UCHAR Reserved1:3;
848
+ } Bulk;
849
+ struct {
850
+ UCHAR Mult:2;
851
+ UCHAR Reserved2:5;
852
+ UCHAR SspCompanion:1;
853
+ } Isochronous;
854
+ } bmAttributes;
855
+ USHORT wBytesPerInterval;
856
+ } USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR, *PUSB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR;
857
+
858
+ C_ASSERT(sizeof(USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR) == 6);
859
+
860
+ #define USB_SUPERSPEED_ISOCHRONOUS_MAX_MULTIPLIER 2
861
+
862
+ //
863
+ // USB 3.1: 9.6.8 SuperSpeedPlus Isoch Endpoint Companion, Table 9-27. SuperSpeedPlus Isoch Endpoint Companion Descriptor
864
+ //
865
+ typedef struct _USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR {
866
+ UCHAR bLength;
867
+ UCHAR bDescriptorType;
868
+ USHORT wReserved;
869
+ ULONG dwBytesPerInterval;
870
+ } USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR, *PUSB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR;
871
+
872
+ C_ASSERT(sizeof(USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR) == 8);
873
+
874
+ #define USB_SUPERSPEEDPLUS_ISOCHRONOUS_MIN_BYTESPERINTERVAL 0xC001
875
+ #define USB_SUPERSPEEDPLUS_ISOCHRONOUS_MAX_BYTESPERINTERVAL 0xFFFFFF
876
+
877
+ //
878
+ // USB 2.0: 9.6.6.1 eUSB2 Isochronous Endpoint Companion Descriptor, Table 9-X. eUSB2 Isochronous Endpoint Companion Descriptor
879
+ //
880
+ typedef struct _EUSB2_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR {
881
+ UCHAR bLength;
882
+ UCHAR bDescriptorType;
883
+ USHORT wMaxPacketSize;
884
+ ULONG dwBytesPerInterval;
885
+ } EUSB2_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR , *PEUSB2_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR;
886
+
887
+ C_ASSERT(sizeof(EUSB2_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR) == 8);
888
+
889
+ #define USB_HIGHSPEED_EUSB2_ISOCHRONOUS_MIN_BYTESPERINTERVAL 0x0C01
890
+ #define USB_HIGHSPEED_EUSB2_ISOCHRONOUS_MAX_BYTESPERINTERVAL 0x1800
891
+
892
+
893
+ //
894
+ // Chapter 11 Hub Specification (USB 1.1, USB 2.0)
895
+ // Chapter 10 Hub, Host Downstream Port, and Device Upstream Port Specification (3.0)
896
+ //
897
+
898
+ //
899
+ // USB 1.1: 11.15.2.1 Hub Descriptor, Table 11-8. Hub Descriptor
900
+ // USB 2.0: 11.23.2.1 Hub Descriptor, Table 11-13. Hub Descriptor
901
+ //
902
+ typedef struct _USB_HUB_DESCRIPTOR {
903
+ UCHAR bDescriptorLength;
904
+ UCHAR bDescriptorType;
905
+ UCHAR bNumberOfPorts;
906
+ USHORT wHubCharacteristics;
907
+ UCHAR bPowerOnToPowerGood;
908
+ UCHAR bHubControlCurrent;
909
+ UCHAR bRemoveAndPowerMask[64];
910
+ } USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
911
+
912
+ #define USB_20_HUB_DESCRIPTOR_TYPE 0x29
913
+
914
+ //
915
+ // USB 3.0: 10.13.2.1 Hub Descriptor, Table 10-3. SuperSpeed Hub Descriptor
916
+ //
917
+ typedef struct _USB_30_HUB_DESCRIPTOR {
918
+ UCHAR bLength;
919
+ UCHAR bDescriptorType;
920
+ UCHAR bNumberOfPorts;
921
+ USHORT wHubCharacteristics;
922
+ UCHAR bPowerOnToPowerGood;
923
+ UCHAR bHubControlCurrent;
924
+ UCHAR bHubHdrDecLat;
925
+ USHORT wHubDelay;
926
+ USHORT DeviceRemovable;
927
+ } USB_30_HUB_DESCRIPTOR, *PUSB_30_HUB_DESCRIPTOR;
928
+
929
+ #define USB_30_HUB_DESCRIPTOR_TYPE 0x2A
930
+
931
+ //
932
+ // USB 1.1: 11.16.2 Class-specific Requests, Table 11-11. Hub Class Request Codes
933
+ //
934
+ #define USB_REQUEST_GET_STATE 0x02
935
+ //
936
+ // USB 2.0: 11.24.2 Class-specific Requests, Table 11-16. Hub Class Request Codes
937
+ //
938
+ #define USB_REQUEST_CLEAR_TT_BUFFER 0x08
939
+ #define USB_REQUEST_RESET_TT 0x09
940
+ #define USB_REQUEST_GET_TT_STATE 0x0A
941
+ #define USB_REQUEST_STOP_TT 0x0B
942
+ //
943
+ // USB 3.0: 10.14.2 Class-specific Requests, Table 10-6. Hub Class Request Codes
944
+ //
945
+ #define USB_REQUEST_SET_HUB_DEPTH 0x0C
946
+ #define USB_REQUEST_GET_PORT_ERR_COUNT 0x0D
947
+
948
+ //
949
+ // USB 1.1: 11.16.2 Class-specific Requests, Table 11-12. Hub Class Feature Selectors
950
+ // USB 2.0: 11.24.2 Class-specific Requests, Table 11-17. Hub Class Feature Selectors
951
+ // USB 3.0: 10.14.2 Class-specific Requests, Table 10-7. Hub Class Feature Selectors
952
+ //
953
+ /*
954
+ typedef enum _USB_HUB_FEATURE_SELECTOR {
955
+ C_HUB_LOCAL_POWER = 0,
956
+ C_HUB_OVER_CURRENT = 1
957
+ } USB_HUB_FEATURE_SELECTOR, *PUSB_HUB_FEATURE_SELECTOR;
958
+
959
+ typedef enum _USB_PORT_FEATURE_SELECTOR {
960
+ PORT_CONNECTION = 0,
961
+ PORT_ENABLE = 1,
962
+ PORT_SUSPEND = 2,
963
+ PORT_OVER_CURRENT = 3,
964
+ PORT_RESET = 4,
965
+ PORT_LINK_STATE = 5,
966
+ PORT_POWER = 8,
967
+ PORT_LOW_SPEED = 9,
968
+ C_PORT_CONNECTION = 16,
969
+ C_PORT_ENABLE = 17,
970
+ C_PORT_SUSPEND = 18,
971
+ C_PORT_OVER_CURRENT = 19,
972
+ C_PORT_RESET = 20,
973
+ PORT_TEST = 21,
974
+ PORT_INDICATOR = 22,
975
+ PORT_U1_TIMEOUT = 23,
976
+ PORT_U2_TIMEOUT = 24,
977
+ C_PORT_LINK_STATE = 25,
978
+ C_PORT_CONFIG_ERROR = 26,
979
+ PORT_REMOTE_WAKE_MASK = 27,
980
+ BH_PORT_RESET = 28,
981
+ C_BH_PORT_RESET = 29,
982
+ FORCE_LINKPM_ACCEPT = 30
983
+ } USB_PORT_FEATURE_SELECTOR, *PUSB_PORT_FEATURE_SELECTOR;
984
+ */
985
+
986
+ //
987
+ // USB 1.1: 11.16.2.5 Get Hub Status, Table 11-13. Hub Status Field, wHubStatus
988
+ // USB 2.0: 11.24.2.6 Get Hub Status, Table 11-19. Hub Status Field, wHubStatus
989
+ // USB 3.0, 10.14.2.4 Get Hub Status, Table 10-8. Hub Status Field, wHubStatus
990
+ //
991
+ typedef union _USB_HUB_STATUS {
992
+ USHORT AsUshort16;
993
+ struct {
994
+ USHORT LocalPowerLost:1;
995
+ USHORT OverCurrent:1;
996
+ USHORT Reserved:14;
997
+ };
998
+ } USB_HUB_STATUS, *PUSB_HUB_STATUS;
999
+
1000
+ C_ASSERT(sizeof(USB_HUB_STATUS) == sizeof(USHORT));
1001
+
1002
+ //
1003
+ // USB 1.1: 11.16.2.5 Get Hub Status, Table 11-14. Hub Change Field, wHubChange
1004
+ // USB 2.0: 11.24.2.6 Get Hub Status, Table 11-20. Hub Change Field, wHubChange
1005
+ // USB 3.0, 10.14.2.4 Get Hub Status, Table 10-9. Hub Change Field, wHubChange
1006
+ //
1007
+ typedef union _USB_HUB_CHANGE {
1008
+ USHORT AsUshort16;
1009
+ struct {
1010
+ USHORT LocalPowerChange:1;
1011
+ USHORT OverCurrentChange:1;
1012
+ USHORT Reserved:14;
1013
+ };
1014
+ } USB_HUB_CHANGE, *PUSB_HUB_CHANGE;
1015
+
1016
+ C_ASSERT(sizeof(USB_HUB_CHANGE) == sizeof(USHORT));
1017
+
1018
+ typedef union _USB_HUB_STATUS_AND_CHANGE {
1019
+ ULONG AsUlong32;
1020
+ struct {
1021
+ USB_HUB_STATUS HubStatus; // 0-15
1022
+ USB_HUB_CHANGE HubChange; // 16-32
1023
+ };
1024
+ } USB_HUB_STATUS_AND_CHANGE, *PUSB_HUB_STATUS_AND_CHANGE;
1025
+
1026
+ C_ASSERT(sizeof(USB_HUB_STATUS_AND_CHANGE) == sizeof(ULONG));
1027
+
1028
+ //
1029
+ // USB 1.1: 11.16.2.6.1 Port Status Bits, Table 11-15. Port Status Field, wPortStatus
1030
+ // USB 2.0: 11.24.2.7.1 Port Status Bits, Table 11-21. Port Status Field, wPortStatus
1031
+ //
1032
+ typedef union _USB_20_PORT_STATUS {
1033
+ USHORT AsUshort16;
1034
+ struct {
1035
+ USHORT CurrentConnectStatus:1; // 0
1036
+ USHORT PortEnabledDisabled:1; // 1
1037
+ USHORT Suspend:1; // 2
1038
+ USHORT OverCurrent:1; // 3
1039
+ USHORT Reset:1; // 4
1040
+ USHORT L1:1; // 5
1041
+ USHORT Reserved0:2; // 6-7
1042
+ USHORT PortPower:1; // 8
1043
+ USHORT LowSpeedDeviceAttached:1; // 9
1044
+ USHORT HighSpeedDeviceAttached:1; // 10 (USB 1.1 Reserved)
1045
+ USHORT PortTestMode:1; // 11 (USB 1.1 Reserved)
1046
+ USHORT PortIndicatorControl:1; // 12 (USB 1.1 Reserved)
1047
+ USHORT Reserved1:3; // 13-15
1048
+ };
1049
+ } USB_20_PORT_STATUS, *PUSB_20_PORT_STATUS;
1050
+
1051
+ C_ASSERT(sizeof(USB_20_PORT_STATUS) == sizeof(USHORT));
1052
+
1053
+ #define USB_PORT_STATUS_CONNECT 0x0001
1054
+ #define USB_PORT_STATUS_ENABLE 0x0002
1055
+ #define USB_PORT_STATUS_SUSPEND 0x0004
1056
+ #define USB_PORT_STATUS_OVER_CURRENT 0x0008
1057
+ #define USB_PORT_STATUS_RESET 0x0010
1058
+ #define USB_PORT_STATUS_POWER 0x0100
1059
+ #define USB_PORT_STATUS_LOW_SPEED 0x0200
1060
+ #define USB_PORT_STATUS_HIGH_SPEED 0x0400
1061
+
1062
+ //
1063
+ // USB 1.1: 11.16.2.6.2 Port Status Change Bits, Table 11-16. Port Change Field, wPortChange
1064
+ // USB 2.0: 11.24.2.7.2 Port Status Change Bits, Table 11-22. Port Change Field, wPortChange
1065
+ //
1066
+ typedef union _USB_20_PORT_CHANGE {
1067
+ USHORT AsUshort16;
1068
+ struct {
1069
+ USHORT ConnectStatusChange:1; // 0
1070
+ USHORT PortEnableDisableChange:1; // 1
1071
+ USHORT SuspendChange:1; // 2
1072
+ USHORT OverCurrentIndicatorChange:1; // 3
1073
+ USHORT ResetChange:1; // 4
1074
+ USHORT Reserved2:11; // 5-15
1075
+ };
1076
+ } USB_20_PORT_CHANGE, *PUSB_20_PORT_CHANGE;
1077
+
1078
+ C_ASSERT(sizeof(USB_20_PORT_CHANGE) == sizeof(USHORT));
1079
+
1080
+ //
1081
+ // USB 3.0: 10.14.2.6.1 Port Status Bits, Table 10-10. Port Status Field, wPortStatus
1082
+ //
1083
+ typedef union _USB_30_PORT_STATUS {
1084
+ USHORT AsUshort16;
1085
+ struct {
1086
+ USHORT CurrentConnectStatus:1; // 0
1087
+ USHORT PortEnabledDisabled:1; // 1
1088
+ USHORT Reserved0:1; // 2
1089
+ USHORT OverCurrent:1; // 3
1090
+ USHORT Reset:1; // 4
1091
+ USHORT PortLinkState:4; // 5-8
1092
+ USHORT PortPower:1; // 9
1093
+ USHORT NegotiatedDeviceSpeed:3; // 10-12
1094
+ USHORT Reserved1:3; // 13-15
1095
+ };
1096
+ } USB_30_PORT_STATUS, *PUSB_30_PORT_STATUS;
1097
+
1098
+ C_ASSERT(sizeof(USB_30_PORT_STATUS) == sizeof(USHORT));
1099
+
1100
+ #define PORT_LINK_STATE_U0 0
1101
+ #define PORT_LINK_STATE_U1 1
1102
+ #define PORT_LINK_STATE_U2 2
1103
+ #define PORT_LINK_STATE_U3 3
1104
+ #define PORT_LINK_STATE_DISABLED 4
1105
+ #define PORT_LINK_STATE_RX_DETECT 5
1106
+ #define PORT_LINK_STATE_INACTIVE 6
1107
+ #define PORT_LINK_STATE_POLLING 7
1108
+ #define PORT_LINK_STATE_RECOVERY 8
1109
+ #define PORT_LINK_STATE_HOT_RESET 9
1110
+ #define PORT_LINK_STATE_COMPLIANCE_MODE 10
1111
+ #define PORT_LINK_STATE_LOOPBACK 11
1112
+ #define PORT_LINK_STATE_TEST_MODE 11 // xHCI-specific, replacing LOOPBACK
1113
+
1114
+ //
1115
+ // USB 3.0: 10.14.2.6.2 Port Status Change Bits, Table 10-11. Port Change Field, wPortChange
1116
+ //
1117
+ typedef union _USB_30_PORT_CHANGE {
1118
+ USHORT AsUshort16;
1119
+ struct {
1120
+ USHORT ConnectStatusChange:1; // 0
1121
+ USHORT Reserved2:2; // 1-2
1122
+ USHORT OverCurrentIndicatorChange:1; // 3
1123
+ USHORT ResetChange:1; // 4
1124
+ USHORT BHResetChange:1; // 5
1125
+ USHORT PortLinkStateChange:1; // 6
1126
+ USHORT PortConfigErrorChange:1; // 7
1127
+ USHORT Reserved3:8; // 8-15
1128
+ };
1129
+ } USB_30_PORT_CHANGE, *PUSB_30_PORT_CHANGE;
1130
+
1131
+ C_ASSERT(sizeof(USB_30_PORT_CHANGE) == sizeof(USHORT));
1132
+
1133
+ typedef union _USB_PORT_STATUS {
1134
+ USHORT AsUshort16;
1135
+ USB_20_PORT_STATUS Usb20PortStatus;
1136
+ USB_30_PORT_STATUS Usb30PortStatus;
1137
+ } USB_PORT_STATUS, *PUSB_PORT_STATUS;
1138
+
1139
+ C_ASSERT(sizeof(USB_PORT_STATUS) == sizeof(USHORT));
1140
+
1141
+ typedef union _USB_PORT_CHANGE {
1142
+ USHORT AsUshort16;
1143
+ USB_20_PORT_CHANGE Usb20PortChange;
1144
+ USB_30_PORT_CHANGE Usb30PortChange;
1145
+ } USB_PORT_CHANGE, *PUSB_PORT_CHANGE;
1146
+
1147
+ C_ASSERT(sizeof(USB_PORT_CHANGE) == sizeof(USHORT));
1148
+
1149
+ typedef union _USB_PORT_EXT_STATUS {
1150
+ ULONG AsUlong32;
1151
+ struct {
1152
+ ULONG RxSublinkSpeedID:4;
1153
+ ULONG TxSublinkSpeedID:4;
1154
+ ULONG RxLaneCount:4;
1155
+ ULONG TxLaneCount:4;
1156
+ ULONG Reserved:16;
1157
+ };
1158
+ } USB_PORT_EXT_STATUS, *PUSB_PORT_EXT_STATUS;
1159
+
1160
+ C_ASSERT(sizeof(USB_PORT_EXT_STATUS) == sizeof(ULONG));
1161
+
1162
+ typedef union _USB_PORT_STATUS_AND_CHANGE {
1163
+ ULONG AsUlong32;
1164
+ struct {
1165
+ USB_PORT_STATUS PortStatus; // 0-15
1166
+ USB_PORT_CHANGE PortChange; // 16-31
1167
+ };
1168
+ } USB_PORT_STATUS_AND_CHANGE, *PUSB_PORT_STATUS_AND_CHANGE;
1169
+
1170
+ C_ASSERT(sizeof(USB_PORT_STATUS_AND_CHANGE) == sizeof(ULONG));
1171
+
1172
+ typedef union _USB_PORT_EXT_STATUS_AND_CHANGE {
1173
+ ULONG64 AsUlong64;
1174
+ struct {
1175
+ USB_PORT_STATUS_AND_CHANGE PortStatusChange; // 0-31
1176
+ USB_PORT_EXT_STATUS PortExtStatus; // 32-63
1177
+ };
1178
+ } USB_PORT_EXT_STATUS_AND_CHANGE, *PUSB_PORT_EXT_STATUS_AND_CHANGE;
1179
+
1180
+ C_ASSERT(sizeof(USB_PORT_EXT_STATUS_AND_CHANGE) == sizeof(ULONG64));
1181
+
1182
+ //
1183
+ // USB 3.0: 10.14.2.10 Set Port Feature, Table 10-14. Downstream Port Remote Wake Mask Encoding
1184
+ //
1185
+ typedef union _USB_HUB_30_PORT_REMOTE_WAKE_MASK {
1186
+ UCHAR AsUchar8;
1187
+ struct {
1188
+ UCHAR ConnectRemoteWakeEnable:1; // 0
1189
+ UCHAR DisconnectRemoteWakeEnable:1; // 1
1190
+ UCHAR OverCurrentRemoteWakeEnable:1; // 2
1191
+ UCHAR Reserved0:5; // 3-7
1192
+ };
1193
+ } USB_HUB_30_PORT_REMOTE_WAKE_MASK, *PUSB_HUB_30_PORT_REMOTE_WAKE_MASK;
1194
+
1195
+ C_ASSERT(sizeof(USB_HUB_30_PORT_REMOTE_WAKE_MASK) == sizeof(UCHAR));
1196
+
1197
+ //
1198
+ // USB 3.0: 9.4.9 Set Feature, Table 9-7. Suspend Options
1199
+ //
1200
+ typedef union _USB_FUNCTION_SUSPEND_OPTIONS {
1201
+ UCHAR AsUchar;
1202
+ struct {
1203
+ UCHAR PowerState:1; // 0
1204
+ UCHAR RemoteWakeEnabled:1; // 1
1205
+ UCHAR Reserved:6; // 2-7
1206
+ };
1207
+ } USB_FUNCTION_SUSPEND_OPTIONS, *PUSB_FUNCTION_SUSPEND_OPTIONS;
1208
+
1209
+ C_ASSERT(sizeof(USB_FUNCTION_SUSPEND_OPTIONS) == sizeof(UCHAR));
1210
+
1211
+ //
1212
+ // USB Interface Power Management Specification definitions.
1213
+ //
1214
+ // The USB Interface Power Management Specification was never released
1215
+ // and these definitions should not be used. They are only included
1216
+ // here to preserve compatibility with the previous usb100.h header
1217
+ // file.
1218
+ //
1219
+ #define USB_FEATURE_INTERFACE_POWER_D0 0x0002
1220
+ #define USB_FEATURE_INTERFACE_POWER_D1 0x0003
1221
+ #define USB_FEATURE_INTERFACE_POWER_D2 0x0004
1222
+ #define USB_FEATURE_INTERFACE_POWER_D3 0x0005
1223
+
1224
+ #define USB_SUPPORT_D0_COMMAND 0x01
1225
+ #define USB_SUPPORT_D1_COMMAND 0x02
1226
+ #define USB_SUPPORT_D2_COMMAND 0x04
1227
+ #define USB_SUPPORT_D3_COMMAND 0x08
1228
+
1229
+ #define USB_SUPPORT_D1_WAKEUP 0x10
1230
+ #define USB_SUPPORT_D2_WAKEUP 0x20
1231
+
1232
+ typedef struct _USB_CONFIGURATION_POWER_DESCRIPTOR {
1233
+ UCHAR bLength;
1234
+ UCHAR bDescriptorType;
1235
+ UCHAR SelfPowerConsumedD0[3];
1236
+ UCHAR bPowerSummaryId;
1237
+ UCHAR bBusPowerSavingD1;
1238
+ UCHAR bSelfPowerSavingD1;
1239
+ UCHAR bBusPowerSavingD2;
1240
+ UCHAR bSelfPowerSavingD2;
1241
+ UCHAR bBusPowerSavingD3;
1242
+ UCHAR bSelfPowerSavingD3;
1243
+ USHORT TransitionTimeFromD1;
1244
+ USHORT TransitionTimeFromD2;
1245
+ USHORT TransitionTimeFromD3;
1246
+ } USB_CONFIGURATION_POWER_DESCRIPTOR, *PUSB_CONFIGURATION_POWER_DESCRIPTOR;
1247
+
1248
+ typedef struct _USB_INTERFACE_POWER_DESCRIPTOR {
1249
+ UCHAR bLength;
1250
+ UCHAR bDescriptorType;
1251
+ UCHAR bmCapabilitiesFlags;
1252
+ UCHAR bBusPowerSavingD1;
1253
+ UCHAR bSelfPowerSavingD1;
1254
+ UCHAR bBusPowerSavingD2;
1255
+ UCHAR bSelfPowerSavingD2;
1256
+ UCHAR bBusPowerSavingD3;
1257
+ UCHAR bSelfPowerSavingD3;
1258
+ USHORT TransitionTimeFromD1;
1259
+ USHORT TransitionTimeFromD2;
1260
+ USHORT TransitionTimeFromD3;
1261
+ } USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR;
1262
+
1263
+ #if _MSC_VER >= 1200
1264
+ #pragma warning(pop)
1265
+ #endif
1266
+
1267
+ #include <POPPACK.H>
1268
+
1269
+
1270
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
1271
+ #pragma endregion
1272
+
1273
+ #endif
msvc/Windows Kits/10/Include/10.0.26100.0/shared/uuids.h ADDED
@@ -0,0 +1,1842 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //------------------------------------------------------------------------------
2
+ // File: uuids.h
3
+ //
4
+ // Desc: Contains the GUIDs for the MediaType type, subtype fields and format
5
+ // types for standard media types, and also class ids for well-known
6
+ // components.
7
+ //
8
+ // Copyright (c) 1992 - 2002, Microsoft Corporation. All rights reserved.
9
+ //------------------------------------------------------------------------------
10
+
11
+
12
+ //
13
+ // We want to use this list for generating strings for debugging too
14
+ // so we redefine OUR_GUID_ENTRY depending on what we want to do
15
+ //
16
+ // It is imperative that all entries in this file are declared using
17
+ // OUR_GUID_ENTRY as that macro might have been defined in advance of
18
+ // including this file. See wxdebug.cpp in sdk\classes\base.
19
+ //
20
+
21
+ #include <winapifamily.h>
22
+
23
+ #pragma region Desktop Family
24
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
25
+
26
+ #ifndef OUR_GUID_ENTRY
27
+ #define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
28
+ DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8);
29
+ #endif
30
+
31
+
32
+ // -- to allow consistent labeling of Media types and subtypes --
33
+
34
+ #define MEDIATYPE_NULL GUID_NULL
35
+ #define MEDIASUBTYPE_NULL GUID_NULL
36
+
37
+ // -- Use this subtype if you don't have a use for a subtype for your type
38
+ // e436eb8e-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_None
39
+ OUR_GUID_ENTRY(MEDIASUBTYPE_None,
40
+ 0xe436eb8e, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
41
+
42
+
43
+ // -- major types ---
44
+
45
+
46
+ // 73646976-0000-0010-8000-00AA00389B71 'vids' == MEDIATYPE_Video
47
+ OUR_GUID_ENTRY(MEDIATYPE_Video,
48
+ 0x73646976, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
49
+
50
+ // 73647561-0000-0010-8000-00AA00389B71 'auds' == MEDIATYPE_Audio
51
+ OUR_GUID_ENTRY(MEDIATYPE_Audio,
52
+ 0x73647561, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
53
+
54
+ // 73747874-0000-0010-8000-00AA00389B71 'txts' == MEDIATYPE_Text
55
+ OUR_GUID_ENTRY(MEDIATYPE_Text,
56
+ 0x73747874, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
57
+
58
+ // 7364696D-0000-0010-8000-00AA00389B71 'mids' == MEDIATYPE_Midi
59
+ OUR_GUID_ENTRY(MEDIATYPE_Midi,
60
+ 0x7364696D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
61
+
62
+ // e436eb83-524f-11ce-9f53-0020af0ba770 MEDIATYPE_Stream
63
+ OUR_GUID_ENTRY(MEDIATYPE_Stream,
64
+ 0xe436eb83, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
65
+
66
+ // 73(s)76(v)61(a)69(i)-0000-0010-8000-00AA00389B71 'iavs' == MEDIATYPE_Interleaved
67
+ OUR_GUID_ENTRY(MEDIATYPE_Interleaved,
68
+ 0x73766169, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
69
+
70
+ // 656c6966-0000-0010-8000-00AA00389B71 'file' == MEDIATYPE_File
71
+ OUR_GUID_ENTRY(MEDIATYPE_File,
72
+ 0x656c6966, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
73
+
74
+ // 73636d64-0000-0010-8000-00AA00389B71 'scmd' == MEDIATYPE_ScriptCommand
75
+ OUR_GUID_ENTRY(MEDIATYPE_ScriptCommand,
76
+ 0x73636d64, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
77
+
78
+ // 670AEA80-3A82-11d0-B79B-00AA003767A7 MEDIATYPE_AUXLine21Data
79
+ OUR_GUID_ENTRY(MEDIATYPE_AUXLine21Data,
80
+ 0x670aea80, 0x3a82, 0x11d0, 0xb7, 0x9b, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7)
81
+
82
+ // {11264ACB-37DE-4eba-8C35-7F04A1A68332}
83
+ OUR_GUID_ENTRY(MEDIATYPE_AUXTeletextPage,
84
+ 0x11264acb, 0x37de, 0x4eba, 0x8c, 0x35, 0x7f, 0x4, 0xa1, 0xa6, 0x83, 0x32)
85
+
86
+ // AEB312E9-3357-43ca-B701-97EC198E2B62 MEDIATYPE_CC_CONTAINER
87
+ OUR_GUID_ENTRY(MEDIATYPE_CC_CONTAINER,
88
+ 0xaeb312e9, 0x3357, 0x43ca, 0xb7, 0x1, 0x97, 0xec, 0x19, 0x8e, 0x2b, 0x62)
89
+
90
+ // FB77E152-53B2-499c-B46B-509FC33EDFD7 MEDIATYPE_DTVCCData
91
+ OUR_GUID_ENTRY(MEDIATYPE_DTVCCData,
92
+ 0xfb77e152, 0x53b2, 0x499c, 0xb4, 0x6b, 0x50, 0x9f, 0xc3, 0x3e, 0xdf, 0xd7)
93
+
94
+ // B88B8A89-B049-4C80-ADCF-5898985E22C1 MEDIATYPE_MSTVCaption
95
+ OUR_GUID_ENTRY(MEDIATYPE_MSTVCaption,
96
+ 0xB88B8A89, 0xB049, 0x4C80, 0xAD, 0xCF, 0x58, 0x98, 0x98, 0x5E, 0x22, 0xC1)
97
+
98
+ // F72A76E1-EB0A-11D0-ACE4-0000C0CC16BA MEDIATYPE_VBI
99
+ OUR_GUID_ENTRY(MEDIATYPE_VBI,
100
+ 0xf72a76e1, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
101
+
102
+ // 34FFCBC3-D5B3-4171-9002-D4C60301697F DVB_SUBTITLES
103
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DVB_SUBTITLES,
104
+ 0x34FFCBC3, 0xD5B3, 0x4171, 0x90, 0x02, 0xD4, 0xC6, 0x03, 0x01, 0x69, 0x7F)
105
+
106
+ // 059DD67D-2E55-4d41-8D1B-01F5E4F50607 ISDB_CAPTIONS
107
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ISDB_CAPTIONS,
108
+ 0x059dd67d, 0x2e55, 0x4d41, 0x8d, 0x1b, 0x01, 0xf5, 0xe4, 0xf5, 0x06, 0x07)
109
+
110
+ // 36dc6d28-f1a6-4216-9048-9cfcefeb5eba ISDB_SUPERIMPOSE
111
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ISDB_SUPERIMPOSE,
112
+ 0x36dc6d28, 0xf1a6, 0x4216, 0x90, 0x48, 0x9c, 0xfc, 0xef, 0xeb, 0x5e, 0xba)
113
+
114
+ // 0482DEE3-7817-11cf-8a03-00aa006ecb65 MEDIATYPE_Timecode
115
+ OUR_GUID_ENTRY(MEDIATYPE_Timecode,
116
+ 0x482dee3, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
117
+
118
+ // 74726c6d-0000-0010-8000-00AA00389B71 'lmrt' == MEDIATYPE_LMRT
119
+ OUR_GUID_ENTRY(MEDIATYPE_LMRT,
120
+ 0x74726c6d, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
121
+
122
+ // 74726c6d-0000-0010-8000-00AA00389B71 'urls' == MEDIATYPE_URL_STREAM
123
+ OUR_GUID_ENTRY(MEDIATYPE_URL_STREAM,
124
+ 0x736c7275, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
125
+
126
+ // -- sub types ---
127
+
128
+ // 4C504C43-0000-0010-8000-00AA00389B71 'CLPL' == MEDIASUBTYPE_CLPL
129
+ OUR_GUID_ENTRY(MEDIASUBTYPE_CLPL,
130
+ 0x4C504C43, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
131
+
132
+ // 56595559-0000-0010-8000-00AA00389B71 'YUYV' == MEDIASUBTYPE_YUYV
133
+ OUR_GUID_ENTRY(MEDIASUBTYPE_YUYV,
134
+ 0x56595559, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
135
+
136
+ // 56555949-0000-0010-8000-00AA00389B71 'IYUV' == MEDIASUBTYPE_IYUV
137
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IYUV,
138
+ 0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
139
+
140
+ // 39555659-0000-0010-8000-00AA00389B71 'YVU9' == MEDIASUBTYPE_YVU9
141
+ OUR_GUID_ENTRY(MEDIASUBTYPE_YVU9,
142
+ 0x39555659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
143
+
144
+ // 31313459-0000-0010-8000-00AA00389B71 'Y411' == MEDIASUBTYPE_Y411
145
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Y411,
146
+ 0x31313459, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
147
+
148
+ // 50313459-0000-0010-8000-00AA00389B71 'Y41P' == MEDIASUBTYPE_Y41P
149
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Y41P,
150
+ 0x50313459, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
151
+
152
+ // 32595559-0000-0010-8000-00AA00389B71 'YUY2' == MEDIASUBTYPE_YUY2
153
+ OUR_GUID_ENTRY(MEDIASUBTYPE_YUY2,
154
+ 0x32595559, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
155
+
156
+ // 55595659-0000-0010-8000-00AA00389B71 'YVYU' == MEDIASUBTYPE_YVYU
157
+ OUR_GUID_ENTRY(MEDIASUBTYPE_YVYU,
158
+ 0x55595659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
159
+
160
+ // 59565955-0000-0010-8000-00AA00389B71 'UYVY' == MEDIASUBTYPE_UYVY
161
+ OUR_GUID_ENTRY(MEDIASUBTYPE_UYVY,
162
+ 0x59565955, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
163
+
164
+ // 31313259-0000-0010-8000-00AA00389B71 'Y211' == MEDIASUBTYPE_Y211
165
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Y211,
166
+ 0x31313259, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
167
+
168
+ // 524a4c43-0000-0010-8000-00AA00389B71 'CLJR' == MEDIASUBTYPE_CLJR
169
+ OUR_GUID_ENTRY(MEDIASUBTYPE_CLJR,
170
+ 0x524a4c43, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
171
+
172
+ // 39304649-0000-0010-8000-00AA00389B71 'IF09' == MEDIASUBTYPE_IF09
173
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IF09,
174
+ 0x39304649, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
175
+
176
+ // 414c5043-0000-0010-8000-00AA00389B71 'CPLA' == MEDIASUBTYPE_CPLA
177
+ OUR_GUID_ENTRY(MEDIASUBTYPE_CPLA,
178
+ 0x414c5043, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
179
+
180
+ // 47504A4D-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_MJPG
181
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MJPG,
182
+ 0x47504A4D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
183
+
184
+ // 4A4D5654-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_TVMJ
185
+ OUR_GUID_ENTRY(MEDIASUBTYPE_TVMJ,
186
+ 0x4A4D5654, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
187
+
188
+ // 454B4157-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_WAKE
189
+ OUR_GUID_ENTRY(MEDIASUBTYPE_WAKE,
190
+ 0x454B4157, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
191
+
192
+ // 43434643-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_CFCC
193
+ OUR_GUID_ENTRY(MEDIASUBTYPE_CFCC,
194
+ 0x43434643, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
195
+
196
+ // 47504A49-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_IJPG
197
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IJPG,
198
+ 0x47504A49, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
199
+
200
+ // 6D756C50-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Plum
201
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Plum,
202
+ 0x6D756C50, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
203
+
204
+ // FAST DV-Master
205
+ // 53435644-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_DVCS
206
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DVCS,
207
+ 0x53435644, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
208
+
209
+ // H.264 compressed video stream
210
+ // 34363248-0000-0010-8000-00AA00389B71 'H264' == MEDIASUBTYPE_H264
211
+ OUR_GUID_ENTRY(MEDIASUBTYPE_H264,
212
+ 0x34363248, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
213
+
214
+ // FAST DV-Master
215
+ // 44535644-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_DVSD
216
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DVSD,
217
+ 0x44535644, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
218
+
219
+ // MIROVideo DV
220
+ // 4656444D-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_MDVF
221
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MDVF,
222
+ 0x4656444D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
223
+
224
+ // e436eb78-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB1
225
+ // e436eb78-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB1
226
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB1,
227
+ 0xe436eb78, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
228
+
229
+ // e436eb79-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB4
230
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB4,
231
+ 0xe436eb79, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
232
+
233
+ // e436eb7a-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB8
234
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB8,
235
+ 0xe436eb7a, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
236
+
237
+ // e436eb7b-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB565
238
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB565,
239
+ 0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
240
+
241
+ // e436eb7c-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB555
242
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB555,
243
+ 0xe436eb7c, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
244
+
245
+ // e436eb7d-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB24
246
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB24,
247
+ 0xe436eb7d, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
248
+
249
+ // e436eb7e-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB32
250
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB32,
251
+ 0xe436eb7e, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
252
+
253
+
254
+ //
255
+ // RGB surfaces that contain per pixel alpha values.
256
+ //
257
+
258
+ // 297C55AF-E209-4cb3-B757-C76D6B9C88A8 MEDIASUBTYPE_ARGB1555
259
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB1555,
260
+ 0x297c55af, 0xe209, 0x4cb3, 0xb7, 0x57, 0xc7, 0x6d, 0x6b, 0x9c, 0x88, 0xa8)
261
+
262
+ // 6E6415E6-5C24-425f-93CD-80102B3D1CCA MEDIASUBTYPE_ARGB4444
263
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB4444,
264
+ 0x6e6415e6, 0x5c24, 0x425f, 0x93, 0xcd, 0x80, 0x10, 0x2b, 0x3d, 0x1c, 0xca)
265
+
266
+ // 773c9ac0-3274-11d0-B724-00aa006c1A01 MEDIASUBTYPE_ARGB32
267
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB32,
268
+ 0x773c9ac0, 0x3274, 0x11d0, 0xb7, 0x24, 0x0, 0xaa, 0x0, 0x6c, 0x1a, 0x1 )
269
+
270
+
271
+ // 2f8bb76d-b644-4550-acf3-d30caa65d5c5 MEDIASUBTYPE_A2R10G10B10
272
+ OUR_GUID_ENTRY(MEDIASUBTYPE_A2R10G10B10,
273
+ 0x2f8bb76d, 0xb644, 0x4550, 0xac, 0xf3, 0xd3, 0x0c, 0xaa, 0x65, 0xd5, 0xc5)
274
+
275
+ // 576f7893-bdf6-48c4-875f-ae7b81834567 MEDIASUBTYPE_A2B10G10R10
276
+ OUR_GUID_ENTRY(MEDIASUBTYPE_A2B10G10R10,
277
+ 0x576f7893, 0xbdf6, 0x48c4, 0x87, 0x5f, 0xae, 0x7b, 0x81, 0x83, 0x45, 0x67)
278
+
279
+
280
+ // 56555941-0000-0010-8000-00AA00389B71 'AYUV' == MEDIASUBTYPE_AYUV
281
+ //
282
+ // See the DX-VA header and documentation for a description of this format.
283
+ //
284
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AYUV,
285
+ 0x56555941, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
286
+
287
+ // 34344941-0000-0010-8000-00AA00389B71 'AI44' == MEDIASUBTYPE_AI44
288
+ //
289
+ // See the DX-VA header and documentation for a description of this format.
290
+ //
291
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AI44,
292
+ 0x34344941, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
293
+
294
+ // 34344149-0000-0010-8000-00AA00389B71 'IA44' == MEDIASUBTYPE_IA44
295
+ //
296
+ // See the DX-VA header and documentation for a description of this format.
297
+ //
298
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IA44,
299
+ 0x34344149, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
300
+
301
+
302
+ //
303
+ // DirectX7 D3D Render Target media subtypes.
304
+ //
305
+
306
+ // 32335237-0000-0010-8000-00AA00389B71 '7R32' == MEDIASUBTYPE_RGB32_D3D_DX7_RT
307
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB32_D3D_DX7_RT,
308
+ 0x32335237, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
309
+
310
+ // 36315237-0000-0010-8000-00AA00389B71 '7R16' == MEDIASUBTYPE_RGB16_D3D_DX7_RT
311
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB16_D3D_DX7_RT,
312
+ 0x36315237, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
313
+
314
+ // 38384137-0000-0010-8000-00AA00389B71 '7A88' == MEDIASUBTYPE_ARGB32_D3D_DX7_RT
315
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB32_D3D_DX7_RT,
316
+ 0x38384137, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
317
+
318
+ // 34344137-0000-0010-8000-00AA00389B71 '7A44' == MEDIASUBTYPE_ARGB4444_D3D_DX7_RT
319
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB4444_D3D_DX7_RT,
320
+ 0x34344137, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
321
+
322
+ // 35314137-0000-0010-8000-00AA00389B71 '7A15' == MEDIASUBTYPE_ARGB1555_D3D_DX7_RT
323
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB1555_D3D_DX7_RT,
324
+ 0x35314137, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
325
+
326
+
327
+ //
328
+ // DirectX9 D3D Render Target media subtypes.
329
+ //
330
+
331
+ // 32335239-0000-0010-8000-00AA00389B71 '9R32' == MEDIASUBTYPE_RGB32_D3D_DX9_RT
332
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB32_D3D_DX9_RT,
333
+ 0x32335239, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
334
+
335
+ // 36315239-0000-0010-8000-00AA00389B71 '9R16' == MEDIASUBTYPE_RGB16_D3D_DX9_RT
336
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RGB16_D3D_DX9_RT,
337
+ 0x36315239, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
338
+
339
+ // 38384139-0000-0010-8000-00AA00389B71 '9A88' == MEDIASUBTYPE_ARGB32_D3D_DX9_RT
340
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB32_D3D_DX9_RT,
341
+ 0x38384139, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
342
+
343
+ // 34344139-0000-0010-8000-00AA00389B71 '9A44' == MEDIASUBTYPE_ARGB4444_D3D_DX9_RT
344
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB4444_D3D_DX9_RT,
345
+ 0x34344139, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
346
+
347
+ // 35314139-0000-0010-8000-00AA00389B71 '9A15' == MEDIASUBTYPE_ARGB1555_D3D_DX9_RT
348
+ OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB1555_D3D_DX9_RT,
349
+ 0x35314139, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
350
+
351
+
352
+ #define MEDIASUBTYPE_HASALPHA(mt) ( ((mt).subtype == MEDIASUBTYPE_ARGB4444) || \
353
+ ((mt).subtype == MEDIASUBTYPE_ARGB32) || \
354
+ ((mt).subtype == MEDIASUBTYPE_AYUV) || \
355
+ ((mt).subtype == MEDIASUBTYPE_AI44) || \
356
+ ((mt).subtype == MEDIASUBTYPE_IA44) || \
357
+ ((mt).subtype == MEDIASUBTYPE_ARGB1555) || \
358
+ ((mt).subtype == MEDIASUBTYPE_ARGB32_D3D_DX7_RT) || \
359
+ ((mt).subtype == MEDIASUBTYPE_ARGB4444_D3D_DX7_RT) || \
360
+ ((mt).subtype == MEDIASUBTYPE_ARGB1555_D3D_DX7_RT) || \
361
+ ((mt).subtype == MEDIASUBTYPE_ARGB32_D3D_DX9_RT) || \
362
+ ((mt).subtype == MEDIASUBTYPE_ARGB4444_D3D_DX9_RT) || \
363
+ ((mt).subtype == MEDIASUBTYPE_ARGB1555_D3D_DX9_RT) )
364
+
365
+ #define MEDIASUBTYPE_HASALPHA7(mt) (((mt).subtype == MEDIASUBTYPE_ARGB32_D3D_DX7_RT) || \
366
+ ((mt).subtype == MEDIASUBTYPE_ARGB4444_D3D_DX7_RT) || \
367
+ ((mt).subtype == MEDIASUBTYPE_ARGB1555_D3D_DX7_RT) )
368
+
369
+ #define MEDIASUBTYPE_D3D_DX7_RT(mt) (((mt).subtype == MEDIASUBTYPE_ARGB32_D3D_DX7_RT) || \
370
+ ((mt).subtype == MEDIASUBTYPE_ARGB4444_D3D_DX7_RT) || \
371
+ ((mt).subtype == MEDIASUBTYPE_ARGB1555_D3D_DX7_RT) || \
372
+ ((mt).subtype == MEDIASUBTYPE_RGB32_D3D_DX7_RT) || \
373
+ ((mt).subtype == MEDIASUBTYPE_RGB16_D3D_DX7_RT))
374
+
375
+ #define MEDIASUBTYPE_HASALPHA9(mt) (((mt).subtype == MEDIASUBTYPE_ARGB32_D3D_DX9_RT) || \
376
+ ((mt).subtype == MEDIASUBTYPE_ARGB4444_D3D_DX9_RT) || \
377
+ ((mt).subtype == MEDIASUBTYPE_ARGB1555_D3D_DX9_RT) )
378
+
379
+
380
+ #define MEDIASUBTYPE_D3D_DX9_RT(mt) (((mt).subtype == MEDIASUBTYPE_ARGB32_D3D_DX9_RT) || \
381
+ ((mt).subtype == MEDIASUBTYPE_ARGB4444_D3D_DX9_RT) || \
382
+ ((mt).subtype == MEDIASUBTYPE_ARGB1555_D3D_DX9_RT) || \
383
+ ((mt).subtype == MEDIASUBTYPE_RGB32_D3D_DX9_RT) || \
384
+ ((mt).subtype == MEDIASUBTYPE_RGB16_D3D_DX9_RT))
385
+
386
+
387
+ //
388
+ // DX-VA uncompressed surface formats
389
+ //
390
+
391
+ // 32315659-0000-0010-8000-00AA00389B71 'YV12' == MEDIASUBTYPE_YV12
392
+ OUR_GUID_ENTRY(MEDIASUBTYPE_YV12,
393
+ 0x32315659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
394
+
395
+ // 3231564E-0000-0010-8000-00AA00389B71 'NV12' == MEDIASUBTYPE_NV12
396
+ OUR_GUID_ENTRY(MEDIASUBTYPE_NV12,
397
+ 0x3231564E, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
398
+
399
+ // 3131564E-0000-0010-8000-00AA00389B71 'NV11' == MEDIASUBTYPE_NV11
400
+ #ifndef MEDIASUBTYPE_NV11_DEFINED
401
+ #define MEDIASUBTYPE_NV11_DEFINED
402
+ OUR_GUID_ENTRY(MEDIASUBTYPE_NV11,
403
+ 0x3131564E, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
404
+ #endif
405
+
406
+ // 38303250-0000-0010-8000-00AA00389B71 'P208' == MEDIASUBTYPE_P208
407
+ OUR_GUID_ENTRY(MEDIASUBTYPE_P208,
408
+ '802P', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
409
+
410
+ // 38303250-0000-0010-8000-00AA00389B71 'P210' == MEDIASUBTYPE_P210
411
+ OUR_GUID_ENTRY(MEDIASUBTYPE_P210,
412
+ '012P', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
413
+
414
+ // 38303250-0000-0010-8000-00AA00389B71 'P216' == MEDIASUBTYPE_P216
415
+ OUR_GUID_ENTRY(MEDIASUBTYPE_P216,
416
+ '612P', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
417
+
418
+ // 38303250-0000-0010-8000-00AA00389B71 'P010' == MEDIASUBTYPE_P010
419
+ OUR_GUID_ENTRY(MEDIASUBTYPE_P010,
420
+ '010P', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
421
+
422
+ // 38303250-0000-0010-8000-00AA00389B71 'P016' == MEDIASUBTYPE_P016
423
+ OUR_GUID_ENTRY(MEDIASUBTYPE_P016,
424
+ '610P', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
425
+
426
+ // 38303250-0000-0010-8000-00AA00389B71 'Y210' == MEDIASUBTYPE_Y210
427
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Y210,
428
+ '012Y', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
429
+
430
+ // 38303250-0000-0010-8000-00AA00389B71 'Y216' == MEDIASUBTYPE_Y216
431
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Y216,
432
+ '612Y', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
433
+
434
+ // 38303450-0000-0010-8000-00AA00389B71 'P408' == MEDIASUBTYPE_P408
435
+ OUR_GUID_ENTRY(MEDIASUBTYPE_P408,
436
+ '804P', 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
437
+
438
+ // 3432564E-0000-0010-8000-00AA00389B71 'NV24' == MEDIASUBTYPE_NV24
439
+ OUR_GUID_ENTRY(MEDIASUBTYPE_NV24,
440
+ 0x3432564E, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
441
+
442
+ // 4F303234-0000-0010-8000-00AA00389B71 '420O' == MEDIASUBTYPE_420O
443
+ OUR_GUID_ENTRY(MEDIASUBTYPE_420O,
444
+ 0x4F303234, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
445
+
446
+ // 31434D49-0000-0010-8000-00AA00389B71 'IMC1' == MEDIASUBTYPE_IMC1
447
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IMC1,
448
+ 0x31434D49, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
449
+
450
+ // 32434d49-0000-0010-8000-00AA00389B71 'IMC2' == MEDIASUBTYPE_IMC2
451
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IMC2,
452
+ 0x32434D49, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
453
+
454
+ // 33434d49-0000-0010-8000-00AA00389B71 'IMC3' == MEDIASUBTYPE_IMC3
455
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IMC3,
456
+ 0x33434D49, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
457
+
458
+ // 34434d49-0000-0010-8000-00AA00389B71 'IMC4' == MEDIASUBTYPE_IMC4
459
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IMC4,
460
+ 0x34434D49, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
461
+
462
+ // 30343353-0000-0010-8000-00AA00389B71 'S340' == MEDIASUBTYPE_S340
463
+ OUR_GUID_ENTRY(MEDIASUBTYPE_S340,
464
+ 0x30343353, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
465
+
466
+ // 32343353-0000-0010-8000-00AA00389B71 'S342' == MEDIASUBTYPE_S342
467
+ OUR_GUID_ENTRY(MEDIASUBTYPE_S342,
468
+ 0x32343353, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
469
+
470
+
471
+ // e436eb7f-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_Overlay
472
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Overlay,
473
+ 0xe436eb7f, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
474
+
475
+ // e436eb80-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEGPacket
476
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Packet,
477
+ 0xe436eb80, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
478
+
479
+ // e436eb81-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1Payload
480
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Payload,
481
+ 0xe436eb81, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
482
+
483
+ // 00000050-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_MPEG1AudioPayload
484
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1AudioPayload,
485
+ 0x00000050, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71)
486
+
487
+ // e436eb82-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1SystemStream
488
+ OUR_GUID_ENTRY(MEDIATYPE_MPEG1SystemStream,
489
+ 0xe436eb82, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
490
+
491
+ // the next consecutive number is assigned to MEDIATYPE_Stream and appears higher up
492
+ // e436eb84-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1System
493
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1System,
494
+ 0xe436eb84, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
495
+
496
+ // e436eb85-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1VideoCD
497
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1VideoCD,
498
+ 0xe436eb85, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
499
+
500
+ // e436eb86-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1Video
501
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Video,
502
+ 0xe436eb86, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
503
+
504
+ // e436eb87-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1Audio
505
+ OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Audio,
506
+ 0xe436eb87, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
507
+
508
+ // e436eb88-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_Avi
509
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Avi,
510
+ 0xe436eb88, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
511
+
512
+ // {3DB80F90-9412-11d1-ADED-0000F8754B99} MEDIASUBTYPE_Asf
513
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Asf,
514
+ 0x3db80f90, 0x9412, 0x11d1, 0xad, 0xed, 0x0, 0x0, 0xf8, 0x75, 0x4b, 0x99)
515
+
516
+ // e436eb89-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_QTMovie
517
+ OUR_GUID_ENTRY(MEDIASUBTYPE_QTMovie,
518
+ 0xe436eb89, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
519
+
520
+ // 617a7072-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Rpza
521
+ OUR_GUID_ENTRY(MEDIASUBTYPE_QTRpza,
522
+ 0x617a7072, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
523
+
524
+ // 20636d73-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Smc
525
+ OUR_GUID_ENTRY(MEDIASUBTYPE_QTSmc,
526
+ 0x20636d73, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
527
+
528
+ // 20656c72-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Rle
529
+ OUR_GUID_ENTRY(MEDIASUBTYPE_QTRle,
530
+ 0x20656c72, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
531
+
532
+ // 6765706a-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Jpeg
533
+ OUR_GUID_ENTRY(MEDIASUBTYPE_QTJpeg,
534
+ 0x6765706a, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
535
+
536
+ // e436eb8a-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_PCMAudio_Obsolete
537
+ OUR_GUID_ENTRY(MEDIASUBTYPE_PCMAudio_Obsolete,
538
+ 0xe436eb8a, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
539
+
540
+ // 00000001-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_PCM
541
+ OUR_GUID_ENTRY(MEDIASUBTYPE_PCM,
542
+ 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71)
543
+
544
+ // e436eb8b-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_WAVE
545
+ OUR_GUID_ENTRY(MEDIASUBTYPE_WAVE,
546
+ 0xe436eb8b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
547
+
548
+ // e436eb8c-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_AU
549
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AU,
550
+ 0xe436eb8c, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
551
+
552
+ // e436eb8d-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_AIFF
553
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AIFF,
554
+ 0xe436eb8d, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
555
+
556
+ // 64(d)73(s)76(v)64(d)-0000-0010-8000-00AA00389B71 'dvsd' == MEDIASUBTYPE_dvsd
557
+ OUR_GUID_ENTRY(MEDIASUBTYPE_dvsd,
558
+ 0x64737664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
559
+
560
+ // 64(d)68(h)76(v)64(d)-0000-0010-8000-00AA00389B71 'dvhd' == MEDIASUBTYPE_dvhd
561
+ OUR_GUID_ENTRY(MEDIASUBTYPE_dvhd,
562
+ 0x64687664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
563
+
564
+ // 6c(l)73(s)76(v)64(d)-0000-0010-8000-00AA00389B71 'dvsl' == MEDIASUBTYPE_dvsl
565
+ OUR_GUID_ENTRY(MEDIASUBTYPE_dvsl,
566
+ 0x6c737664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
567
+
568
+ // 35(5)32(2)76(v)64(d)-0000-0010-8000-00AA00389B71 'dv25' == MEDIASUBTYPE_dv25
569
+ OUR_GUID_ENTRY(MEDIASUBTYPE_dv25,
570
+ 0x35327664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
571
+
572
+ // 30(0)35(5)76(v)64(d)-0000-0010-8000-00AA00389B71 'dv50' == MEDIASUBTYPE_dv50
573
+ OUR_GUID_ENTRY(MEDIASUBTYPE_dv50,
574
+ 0x30357664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
575
+
576
+ // 31(1)68(h)76(v)64(d)-0000-0010-8000-00AA00389B71 'dvh1' == MEDIASUBTYPE_dvh1
577
+ OUR_GUID_ENTRY(MEDIASUBTYPE_dvh1,
578
+ 0x31687664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
579
+
580
+ // 6E8D4A22-310C-11d0-B79A-00AA003767A7 MEDIASUBTYPE_Line21_BytePair
581
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_BytePair,
582
+ 0x6e8d4a22, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7)
583
+
584
+ // 6E8D4A23-310C-11d0-B79A-00AA003767A7 MEDIASUBTYPE_Line21_GOPPacket
585
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_GOPPacket,
586
+ 0x6e8d4a23, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7)
587
+
588
+ // 6E8D4A24-310C-11d0-B79A-00AA003767A7 MEDIASUBTYPE_Line21_VBIRawData
589
+ OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_VBIRawData,
590
+ 0x6e8d4a24, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7)
591
+
592
+ //0AF414BC-4ED2-445e-9839-8F095568AB3C MEDIASUBTYPE_708_608Data
593
+ OUR_GUID_ENTRY(MEDIASUBTYPE_708_608Data,
594
+ 0xaf414bc, 0x4ed2, 0x445e, 0x98, 0x39, 0x8f, 0x9, 0x55, 0x68, 0xab, 0x3c)
595
+
596
+ // F52ADDAA-36F0-43F5-95EA-6D866484262A MEDIASUBTYPE_DtvCcData
597
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DtvCcData,
598
+ 0xF52ADDAA, 0x36F0, 0x43F5, 0x95, 0xEA, 0x6D, 0x86, 0x64, 0x84, 0x26, 0x2A)
599
+
600
+ // 7EA626DB-54DA-437b-BE9F-F73073ADFA3C MEDIASUBTYPE_CC_CONTAINER
601
+ OUR_GUID_ENTRY(MEDIASUBTYPE_CC_CONTAINER,
602
+ 0x7ea626db, 0x54da, 0x437b, 0xbe, 0x9f, 0xf7, 0x30, 0x73, 0xad, 0xfa, 0x3c)
603
+
604
+ // F72A76E3-EB0A-11D0-ACE4-0000C0CC16BA MEDIASUBTYPE_TELETEXT
605
+ OUR_GUID_ENTRY(MEDIASUBTYPE_TELETEXT,
606
+ 0xf72a76e3, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
607
+
608
+ // 663DA43C-03E8-4e9a-9CD5-BF11ED0DEF76 MEDIASUBTYPE_VBI
609
+ OUR_GUID_ENTRY(MEDIASUBTYPE_VBI,
610
+ 0x663da43c, 0x3e8, 0x4e9a, 0x9c, 0xd5, 0xbf, 0x11, 0xed, 0xd, 0xef, 0x76)
611
+
612
+ // 2791D576-8E7A-466F-9E90-5D3F3083738B MEDIASUBTYPE_WSS
613
+ OUR_GUID_ENTRY(MEDIASUBTYPE_WSS,
614
+ 0x2791D576, 0x8E7A, 0x466F, 0x9E, 0x90, 0x5D, 0x3F, 0x30, 0x83, 0x73, 0x8B)
615
+
616
+ // 01CA73E3-DCE6-4575-AFE1-2BF1C902CAF3 MEDIASUBTYPE_XDS
617
+ OUR_GUID_ENTRY(MEDIASUBTYPE_XDS,
618
+ 0x1ca73e3, 0xdce6, 0x4575, 0xaf, 0xe1, 0x2b, 0xf1, 0xc9, 0x2, 0xca, 0xf3)
619
+
620
+ // A1B3F620-9792-4d8d-81A4-86AF25772090 MEDIASUBTYPE_VPS
621
+ OUR_GUID_ENTRY(MEDIASUBTYPE_VPS,
622
+ 0xa1b3f620, 0x9792, 0x4d8d, 0x81, 0xa4, 0x86, 0xaf, 0x25, 0x77, 0x20, 0x90)
623
+
624
+ // derived from WAVE_FORMAT_DRM
625
+ // 00000009-0000-0010-8000-00aa00389b71
626
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DRM_Audio,
627
+ 0x00000009, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
628
+
629
+ // derived from WAVE_FORMAT_IEEE_FLOAT
630
+ // 00000003-0000-0010-8000-00aa00389b71
631
+ OUR_GUID_ENTRY(MEDIASUBTYPE_IEEE_FLOAT,
632
+ 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
633
+
634
+ // derived from WAVE_FORMAT_DOLBY_AC3_SPDIF
635
+ // 00000092-0000-0010-8000-00aa00389b71
636
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3_SPDIF,
637
+ 0x00000092, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
638
+
639
+ // derived from WAVE_FORMAT_RAW_SPORT
640
+ // 00000240-0000-0010-8000-00aa00389b71
641
+ OUR_GUID_ENTRY(MEDIASUBTYPE_RAW_SPORT,
642
+ 0x00000240, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
643
+
644
+ // derived from wave format tag 0x241, call it SPDIF_TAG_241h for now
645
+ // 00000241-0000-0010-8000-00aa00389b71
646
+ OUR_GUID_ENTRY(MEDIASUBTYPE_SPDIF_TAG_241h,
647
+ 0x00000241, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71)
648
+
649
+
650
+
651
+ // DirectShow DSS definitions
652
+
653
+ // A0AF4F81-E163-11d0-BAD9-00609744111A
654
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DssVideo,
655
+ 0xa0af4f81, 0xe163, 0x11d0, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
656
+
657
+ // A0AF4F82-E163-11d0-BAD9-00609744111A
658
+ OUR_GUID_ENTRY(MEDIASUBTYPE_DssAudio,
659
+ 0xa0af4f82, 0xe163, 0x11d0, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
660
+
661
+ // 5A9B6A40-1A22-11D1-BAD9-00609744111A
662
+ OUR_GUID_ENTRY(MEDIASUBTYPE_VPVideo,
663
+ 0x5a9b6a40, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
664
+
665
+ // 5A9B6A41-1A22-11D1-BAD9-00609744111A
666
+ OUR_GUID_ENTRY(MEDIASUBTYPE_VPVBI,
667
+ 0x5a9b6a41, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
668
+
669
+ // BF87B6E0-8C27-11d0-B3F0-00AA003761C5 Capture graph building
670
+ OUR_GUID_ENTRY(CLSID_CaptureGraphBuilder,
671
+ 0xBF87B6E0, 0x8C27, 0x11d0, 0xB3, 0xF0, 0x0, 0xAA, 0x00, 0x37, 0x61, 0xC5)
672
+
673
+ // BF87B6E1-8C27-11d0-B3F0-00AA003761C5 New Capture graph building
674
+ OUR_GUID_ENTRY(CLSID_CaptureGraphBuilder2,
675
+ 0xBF87B6E1, 0x8C27, 0x11d0, 0xB3, 0xF0, 0x0, 0xAA, 0x00, 0x37, 0x61, 0xC5)
676
+
677
+ // e436ebb0-524f-11ce-9f53-0020af0ba770 Prototype filtergraph
678
+ OUR_GUID_ENTRY(CLSID_ProtoFilterGraph,
679
+ 0xe436ebb0, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
680
+
681
+ // e436ebb1-524f-11ce-9f53-0020af0ba770 Reference clock
682
+ OUR_GUID_ENTRY(CLSID_SystemClock,
683
+ 0xe436ebb1, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
684
+
685
+ // e436ebb2-524f-11ce-9f53-0020af0ba770 Filter Mapper
686
+ OUR_GUID_ENTRY(CLSID_FilterMapper,
687
+ 0xe436ebb2, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
688
+
689
+ // e436ebb3-524f-11ce-9f53-0020af0ba770 Filter Graph
690
+ OUR_GUID_ENTRY(CLSID_FilterGraph,
691
+ 0xe436ebb3, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
692
+
693
+ // e436ebb8-524f-11ce-9f53-0020af0ba770 Filter Graph no thread
694
+ OUR_GUID_ENTRY(CLSID_FilterGraphNoThread,
695
+ 0xe436ebb8, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
696
+
697
+ // a3ecbc41-581a-4476-b693-a63340462d8b
698
+ OUR_GUID_ENTRY(CLSID_FilterGraphPrivateThread,
699
+ 0xa3ecbc41, 0x581a, 0x4476, 0xb6, 0x93, 0xa6, 0x33, 0x40, 0x46, 0x2d, 0x8b)
700
+
701
+ // e4bbd160-4269-11ce-838d-00aa0055595a MPEG System stream
702
+ OUR_GUID_ENTRY(CLSID_MPEG1Doc,
703
+ 0xe4bbd160, 0x4269, 0x11ce, 0x83, 0x8d, 0x0, 0xaa, 0x0, 0x55, 0x59, 0x5a)
704
+
705
+ // 701722e0-8ae3-11ce-a85c-00aa002feab5 MPEG file reader
706
+ OUR_GUID_ENTRY(CLSID_FileSource,
707
+ 0x701722e0, 0x8ae3, 0x11ce, 0xa8, 0x5c, 0x00, 0xaa, 0x00, 0x2f, 0xea, 0xb5)
708
+
709
+ // 26C25940-4CA9-11ce-A828-00AA002FEAB5 Takes MPEG1 packets as input
710
+ OUR_GUID_ENTRY(CLSID_MPEG1PacketPlayer,
711
+ 0x26c25940, 0x4ca9, 0x11ce, 0xa8, 0x28, 0x0, 0xaa, 0x0, 0x2f, 0xea, 0xb5)
712
+
713
+ // 336475d0-942a-11ce-a870-00aa002feab5 MPEG splitter
714
+ OUR_GUID_ENTRY(CLSID_MPEG1Splitter,
715
+ 0x336475d0, 0x942a, 0x11ce, 0xa8, 0x70, 0x00, 0xaa, 0x00, 0x2f, 0xea, 0xb5)
716
+
717
+ // feb50740-7bef-11ce-9bd9-0000e202599c MPEG video decoder
718
+ OUR_GUID_ENTRY(CLSID_CMpegVideoCodec,
719
+ 0xfeb50740, 0x7bef, 0x11ce, 0x9b, 0xd9, 0x0, 0x0, 0xe2, 0x2, 0x59, 0x9c)
720
+
721
+ // 4a2286e0-7bef-11ce-9bd9-0000e202599c MPEG audio decoder
722
+ OUR_GUID_ENTRY(CLSID_CMpegAudioCodec,
723
+ 0x4a2286e0, 0x7bef, 0x11ce, 0x9b, 0xd9, 0x0, 0x0, 0xe2, 0x2, 0x59, 0x9c)
724
+
725
+ // e30629d3-27e5-11ce-875d-00608cb78066 Text renderer
726
+ OUR_GUID_ENTRY(CLSID_TextRender,
727
+ 0xe30629d3, 0x27e5, 0x11ce, 0x87, 0x5d, 0x0, 0x60, 0x8c, 0xb7, 0x80, 0x66)
728
+
729
+
730
+
731
+ // {F8388A40-D5BB-11d0-BE5A-0080C706568E}
732
+ OUR_GUID_ENTRY(CLSID_InfTee,
733
+ 0xf8388a40, 0xd5bb, 0x11d0, 0xbe, 0x5a, 0x0, 0x80, 0xc7, 0x6, 0x56, 0x8e)
734
+
735
+ // 1b544c20-fd0b-11ce-8c63-00aa0044b51e Avi Stream Splitter
736
+ OUR_GUID_ENTRY(CLSID_AviSplitter,
737
+ 0x1b544c20, 0xfd0b, 0x11ce, 0x8c, 0x63, 0x0, 0xaa, 0x00, 0x44, 0xb5, 0x1e)
738
+
739
+ // 1b544c21-fd0b-11ce-8c63-00aa0044b51e Avi File Reader
740
+ OUR_GUID_ENTRY(CLSID_AviReader,
741
+ 0x1b544c21, 0xfd0b, 0x11ce, 0x8c, 0x63, 0x0, 0xaa, 0x00, 0x44, 0xb5, 0x1e)
742
+
743
+ // 1b544c22-fd0b-11ce-8c63-00aa0044b51e Vfw 2.0 Capture Driver
744
+ OUR_GUID_ENTRY(CLSID_VfwCapture,
745
+ 0x1b544c22, 0xfd0b, 0x11ce, 0x8c, 0x63, 0x0, 0xaa, 0x00, 0x44, 0xb5, 0x1e)
746
+
747
+ OUR_GUID_ENTRY(CLSID_CaptureProperties,
748
+ 0x1B544c22, 0xFD0B, 0x11ce, 0x8C, 0x63, 0x00, 0xAA, 0x00, 0x44, 0xB5, 0x1F)
749
+
750
+ //e436ebb4-524f-11ce-9f53-0020af0ba770 Control Distributor
751
+ OUR_GUID_ENTRY(CLSID_FGControl,
752
+ 0xe436ebb4, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
753
+
754
+ // 44584800-F8EE-11ce-B2D4-00DD01101B85 .MOV reader (old)
755
+ OUR_GUID_ENTRY(CLSID_MOVReader,
756
+ 0x44584800, 0xf8ee, 0x11ce, 0xb2, 0xd4, 0x00, 0xdd, 0x1, 0x10, 0x1b, 0x85)
757
+
758
+ // D51BD5A0-7548-11cf-A520-0080C77EF58A QT Splitter
759
+ OUR_GUID_ENTRY(CLSID_QuickTimeParser,
760
+ 0xd51bd5a0, 0x7548, 0x11cf, 0xa5, 0x20, 0x0, 0x80, 0xc7, 0x7e, 0xf5, 0x8a)
761
+
762
+ // FDFE9681-74A3-11d0-AFA7-00AA00B67A42 QT Decoder
763
+ OUR_GUID_ENTRY(CLSID_QTDec,
764
+ 0xfdfe9681, 0x74a3, 0x11d0, 0xaf, 0xa7, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
765
+
766
+ // D3588AB0-0781-11ce-B03A-0020AF0BA770 AVIFile-based reader
767
+ OUR_GUID_ENTRY(CLSID_AVIDoc,
768
+ 0xd3588ab0, 0x0781, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0xb, 0xa7, 0x70)
769
+
770
+ // 70e102b0-5556-11ce-97c0-00aa0055595a Video renderer
771
+ OUR_GUID_ENTRY(CLSID_VideoRenderer,
772
+ 0x70e102b0, 0x5556, 0x11ce, 0x97, 0xc0, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
773
+
774
+ // 1643e180-90f5-11ce-97d5-00aa0055595a Colour space convertor
775
+ OUR_GUID_ENTRY(CLSID_Colour,
776
+ 0x1643e180, 0x90f5, 0x11ce, 0x97, 0xd5, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
777
+
778
+ // 1da08500-9edc-11cf-bc10-00aa00ac74f6 VGA 16 color ditherer
779
+ OUR_GUID_ENTRY(CLSID_Dither,
780
+ 0x1da08500, 0x9edc, 0x11cf, 0xbc, 0x10, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6)
781
+
782
+ // 07167665-5011-11cf-BF33-00AA0055595A Modex video renderer
783
+ OUR_GUID_ENTRY(CLSID_ModexRenderer,
784
+ 0x7167665, 0x5011, 0x11cf, 0xbf, 0x33, 0x0, 0xaa, 0x0, 0x55, 0x59, 0x5a)
785
+
786
+ // e30629d1-27e5-11ce-875d-00608cb78066 Waveout audio renderer
787
+ OUR_GUID_ENTRY(CLSID_AudioRender,
788
+ 0xe30629d1, 0x27e5, 0x11ce, 0x87, 0x5d, 0x0, 0x60, 0x8c, 0xb7, 0x80, 0x66)
789
+
790
+ // 05589faf-c356-11ce-bf01-00aa0055595a Audio Renderer Property Page
791
+ OUR_GUID_ENTRY(CLSID_AudioProperties,
792
+ 0x05589faf, 0xc356, 0x11ce, 0xbf, 0x01, 0x0, 0xaa, 0x0, 0x55, 0x59, 0x5a)
793
+
794
+ // 79376820-07D0-11cf-A24D-0020AFD79767 DSound audio renderer
795
+ OUR_GUID_ENTRY(CLSID_DSoundRender,
796
+ 0x79376820, 0x07D0, 0x11CF, 0xA2, 0x4D, 0x0, 0x20, 0xAF, 0xD7, 0x97, 0x67)
797
+
798
+ // e30629d2-27e5-11ce-875d-00608cb78066 Wavein audio recorder
799
+ OUR_GUID_ENTRY(CLSID_AudioRecord,
800
+ 0xe30629d2, 0x27e5, 0x11ce, 0x87, 0x5d, 0x0, 0x60, 0x8c, 0xb7, 0x80, 0x66)
801
+
802
+ // {2CA8CA52-3C3F-11d2-B73D-00C04FB6BD3D} IAMAudioInputMixer property page
803
+ OUR_GUID_ENTRY(CLSID_AudioInputMixerProperties,
804
+ 0x2ca8ca52, 0x3c3f, 0x11d2, 0xb7, 0x3d, 0x0, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d)
805
+
806
+ // {CF49D4E0-1115-11ce-B03A-0020AF0BA770} AVI Decoder
807
+ OUR_GUID_ENTRY(CLSID_AVIDec,
808
+ 0xcf49d4e0, 0x1115, 0x11ce, 0xb0, 0x3a, 0x0, 0x20, 0xaf, 0xb, 0xa7, 0x70)
809
+
810
+ // {A888DF60-1E90-11cf-AC98-00AA004C0FA9} AVI ICDraw* wrapper
811
+ OUR_GUID_ENTRY(CLSID_AVIDraw,
812
+ 0xa888df60, 0x1e90, 0x11cf, 0xac, 0x98, 0x0, 0xaa, 0x0, 0x4c, 0xf, 0xa9)
813
+
814
+ // 6a08cf80-0e18-11cf-a24d-0020afd79767 ACM Wrapper
815
+ OUR_GUID_ENTRY(CLSID_ACMWrapper,
816
+ 0x6a08cf80, 0x0e18, 0x11cf, 0xa2, 0x4d, 0x0, 0x20, 0xaf, 0xd7, 0x97, 0x67)
817
+
818
+ // {e436ebb5-524f-11ce-9f53-0020af0ba770} Async File Reader
819
+ OUR_GUID_ENTRY(CLSID_AsyncReader,
820
+ 0xe436ebb5, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
821
+
822
+ // {e436ebb6-524f-11ce-9f53-0020af0ba770} Async URL Reader
823
+ OUR_GUID_ENTRY(CLSID_URLReader,
824
+ 0xe436ebb6, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
825
+
826
+ // {e436ebb7-524f-11ce-9f53-0020af0ba770} IPersistMoniker PID
827
+ OUR_GUID_ENTRY(CLSID_PersistMonikerPID,
828
+ 0xe436ebb7, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70)
829
+
830
+ // {D76E2820-1563-11cf-AC98-00AA004C0FA9}
831
+ OUR_GUID_ENTRY(CLSID_AVICo,
832
+ 0xd76e2820, 0x1563, 0x11cf, 0xac, 0x98, 0x0, 0xaa, 0x0, 0x4c, 0xf, 0xa9)
833
+
834
+ // {8596E5F0-0DA5-11d0-BD21-00A0C911CE86}
835
+ OUR_GUID_ENTRY(CLSID_FileWriter,
836
+ 0x8596e5f0, 0xda5, 0x11d0, 0xbd, 0x21, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
837
+
838
+ // {E2510970-F137-11CE-8B67-00AA00A3F1A6} AVI mux filter
839
+ OUR_GUID_ENTRY(CLSID_AviDest,
840
+ 0xe2510970, 0xf137, 0x11ce, 0x8b, 0x67, 0x0, 0xaa, 0x0, 0xa3, 0xf1, 0xa6)
841
+
842
+ // {C647B5C0-157C-11d0-BD23-00A0C911CE86}
843
+ OUR_GUID_ENTRY(CLSID_AviMuxProptyPage,
844
+ 0xc647b5c0, 0x157c, 0x11d0, 0xbd, 0x23, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
845
+
846
+ // {0A9AE910-85C0-11d0-BD42-00A0C911CE86}
847
+ OUR_GUID_ENTRY(CLSID_AviMuxProptyPage1,
848
+ 0xa9ae910, 0x85c0, 0x11d0, 0xbd, 0x42, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
849
+
850
+ // {07b65360-c445-11ce-afde-00aa006c14f4}
851
+ OUR_GUID_ENTRY(CLSID_AVIMIDIRender,
852
+ 0x07b65360, 0xc445, 0x11ce, 0xaf, 0xde, 0x00, 0xaa, 0x00, 0x6c, 0x14, 0xf4)
853
+
854
+ // {187463A0-5BB7-11d3-ACBE-0080C75E246E} WMSDK-based ASF reader
855
+ OUR_GUID_ENTRY(CLSID_WMAsfReader,
856
+ 0x187463a0, 0x5bb7, 0x11d3, 0xac, 0xbe, 0x0, 0x80, 0xc7, 0x5e, 0x24, 0x6e)
857
+
858
+ // {7c23220e-55bb-11d3-8b16-00c04fb6bd3d} WMSDK-based ASF writer
859
+ OUR_GUID_ENTRY(CLSID_WMAsfWriter,
860
+ 0x7c23220e, 0x55bb, 0x11d3, 0x8b, 0x16, 0x0, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d)
861
+
862
+ // {afb6c280-2c41-11d3-8a60-0000f81e0e4a}
863
+ OUR_GUID_ENTRY(CLSID_MPEG2Demultiplexer,
864
+ 0xafb6c280, 0x2c41, 0x11d3, 0x8a, 0x60, 0x00, 0x00, 0xf8, 0x1e, 0x0e, 0x4a)
865
+
866
+ // {687D3367-3644-467a-ADFE-6CD7A85C4A2C}
867
+ OUR_GUID_ENTRY(CLSID_MPEG2Demultiplexer_NoClock,
868
+ 0x687d3367, 0x3644, 0x467a, 0xad, 0xfe, 0x6c, 0xd7, 0xa8, 0x5c, 0x4a, 0x2c)
869
+
870
+ // {3ae86b20-7be8-11d1-abe6-00a0c905f375}
871
+ OUR_GUID_ENTRY(CLSID_MMSPLITTER,
872
+ 0x3ae86b20, 0x7be8, 0x11d1, 0xab, 0xe6, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75)
873
+
874
+ // {2DB47AE5-CF39-43c2-B4D6-0CD8D90946F4}
875
+ OUR_GUID_ENTRY(CLSID_StreamBufferSink,
876
+ 0x2db47ae5, 0xcf39, 0x43c2, 0xb4, 0xd6, 0xc, 0xd8, 0xd9, 0x9, 0x46, 0xf4)
877
+
878
+ // {E2448508-95DA-4205-9A27-7EC81E723B1A}
879
+ OUR_GUID_ENTRY(CLSID_SBE2Sink,
880
+ 0xe2448508, 0x95da, 0x4205, 0x9a, 0x27, 0x7e, 0xc8, 0x1e, 0x72, 0x3b, 0x1a)
881
+
882
+ // {C9F5FE02-F851-4eb5-99EE-AD602AF1E619}
883
+ OUR_GUID_ENTRY(CLSID_StreamBufferSource,
884
+ 0xc9f5fe02, 0xf851, 0x4eb5, 0x99, 0xee, 0xad, 0x60, 0x2a, 0xf1, 0xe6, 0x19)
885
+
886
+ // {FA8A68B2-C864-4ba2-AD53-D3876A87494B}
887
+ OUR_GUID_ENTRY(CLSID_StreamBufferConfig,
888
+ 0xfa8a68b2, 0xc864, 0x4ba2, 0xad, 0x53, 0xd3, 0x87, 0x6a, 0x87, 0x49, 0x4b)
889
+
890
+ // {E37A73F8-FB01-43dc-914E-AAEE76095AB9}
891
+ OUR_GUID_ENTRY(CLSID_StreamBufferPropertyHandler,
892
+ 0xe37a73f8, 0xfb01, 0x43dc, 0x91, 0x4e, 0xaa, 0xee, 0x76, 0x9, 0x5a, 0xb9)
893
+
894
+ // {713790EE-5EE1-45ba-8070-A1337D2762FA}
895
+ OUR_GUID_ENTRY(CLSID_StreamBufferThumbnailHandler,
896
+ 0x713790ee, 0x5ee1, 0x45ba, 0x80, 0x70, 0xa1, 0x33, 0x7d, 0x27, 0x62, 0xfa)
897
+
898
+ // {6CFAD761-735D-4aa5-8AFC-AF91A7D61EBA}
899
+ OUR_GUID_ENTRY(CLSID_Mpeg2VideoStreamAnalyzer,
900
+ 0x6cfad761, 0x735d, 0x4aa5, 0x8a, 0xfc, 0xaf, 0x91, 0xa7, 0xd6, 0x1e, 0xba)
901
+
902
+ // {CCAA63AC-1057-4778-AE92-1206AB9ACEE6}
903
+ OUR_GUID_ENTRY(CLSID_StreamBufferRecordingAttributes,
904
+ 0xccaa63ac, 0x1057, 0x4778, 0xae, 0x92, 0x12, 0x6, 0xab, 0x9a, 0xce, 0xe6)
905
+
906
+ // {D682C4BA-A90A-42fe-B9E1-03109849C423}
907
+ OUR_GUID_ENTRY(CLSID_StreamBufferComposeRecording,
908
+ 0xd682c4ba, 0xa90a, 0x42fe, 0xb9, 0xe1, 0x3, 0x10, 0x98, 0x49, 0xc4, 0x23)
909
+
910
+ // {93A094D7-51E8-485b-904A-8D6B97DC6B39}
911
+ OUR_GUID_ENTRY(CLSID_SBE2File,
912
+ 0x93a094d7, 0x51e8, 0x485b, 0x90, 0x4a, 0x8d, 0x6b, 0x97, 0xdc, 0x6b, 0x39)
913
+
914
+ // {B1B77C00-C3E4-11cf-AF79-00AA00B67A42} DV video decoder
915
+ OUR_GUID_ENTRY(CLSID_DVVideoCodec,
916
+ 0xb1b77c00, 0xc3e4, 0x11cf, 0xaf, 0x79, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
917
+
918
+ // {13AA3650-BB6F-11d0-AFB9-00AA00B67A42} DV video encoder
919
+ OUR_GUID_ENTRY(CLSID_DVVideoEnc,
920
+ 0x13aa3650, 0xbb6f, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
921
+
922
+ // {4EB31670-9FC6-11cf-AF6E-00AA00B67A42} DV splitter
923
+ OUR_GUID_ENTRY(CLSID_DVSplitter,
924
+ 0x4eb31670, 0x9fc6, 0x11cf, 0xaf, 0x6e, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
925
+
926
+ // {129D7E40-C10D-11d0-AFB9-00AA00B67A42} DV muxer
927
+ OUR_GUID_ENTRY(CLSID_DVMux,
928
+ 0x129d7e40, 0xc10d, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
929
+
930
+ // {060AF76C-68DD-11d0-8FC1-00C04FD9189D}
931
+ OUR_GUID_ENTRY(CLSID_SeekingPassThru,
932
+ 0x60af76c, 0x68dd, 0x11d0, 0x8f, 0xc1, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d)
933
+
934
+ // 6E8D4A20-310C-11d0-B79A-00AA003767A7 Line21 (CC) Decoder
935
+ OUR_GUID_ENTRY(CLSID_Line21Decoder,
936
+ 0x6e8d4a20, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7)
937
+
938
+ // E4206432-01A1-4BEE-B3E1-3702C8EDC574 Line21 (CC) Decoder v2
939
+ OUR_GUID_ENTRY(CLSID_Line21Decoder2,
940
+ 0xe4206432, 0x01a1, 0x4bee, 0xb3, 0xe1, 0x37, 0x02, 0xc8, 0xed, 0xc5, 0x74)
941
+
942
+ OUR_GUID_ENTRY(CLSID_CCAFilter,
943
+ 0x3d07a539, 0x35ca, 0x447c, 0x9b, 0x5, 0x8d, 0x85, 0xce, 0x92, 0x4f, 0x9e)
944
+
945
+ // {CD8743A1-3736-11d0-9E69-00C04FD7C15B}
946
+ OUR_GUID_ENTRY(CLSID_OverlayMixer,
947
+ 0xcd8743a1, 0x3736, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
948
+
949
+ // {814B9800-1C88-11d1-BAD9-00609744111A}
950
+ OUR_GUID_ENTRY(CLSID_VBISurfaces,
951
+ 0x814b9800, 0x1c88, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
952
+
953
+ // {70BC06E0-5666-11d3-A184-00105AEF9F33} WST Teletext Decoder
954
+ OUR_GUID_ENTRY(CLSID_WSTDecoder,
955
+ 0x70bc06e0, 0x5666, 0x11d3, 0xa1, 0x84, 0x0, 0x10, 0x5a, 0xef, 0x9f, 0x33)
956
+
957
+ // {301056D0-6DFF-11d2-9EEB-006008039E37}
958
+ OUR_GUID_ENTRY(CLSID_MjpegDec,
959
+ 0x301056d0, 0x6dff, 0x11d2, 0x9e, 0xeb, 0x0, 0x60, 0x8, 0x3, 0x9e, 0x37)
960
+
961
+ // {B80AB0A0-7416-11d2-9EEB-006008039E37}
962
+ OUR_GUID_ENTRY(CLSID_MJPGEnc,
963
+ 0xb80ab0a0, 0x7416, 0x11d2, 0x9e, 0xeb, 0x0, 0x60, 0x8, 0x3, 0x9e, 0x37)
964
+
965
+
966
+
967
+ // pnp objects and categories
968
+ // 62BE5D10-60EB-11d0-BD3B-00A0C911CE86 ICreateDevEnum
969
+ OUR_GUID_ENTRY(CLSID_SystemDeviceEnum,
970
+ 0x62BE5D10,0x60EB,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
971
+
972
+ // 4315D437-5B8C-11d0-BD3B-00A0C911CE86
973
+ OUR_GUID_ENTRY(CLSID_CDeviceMoniker,
974
+ 0x4315D437,0x5B8C,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
975
+
976
+ // 860BB310-5D01-11d0-BD3B-00A0C911CE86 Video capture category
977
+ OUR_GUID_ENTRY(CLSID_VideoInputDeviceCategory,
978
+ 0x860BB310,0x5D01,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
979
+ OUR_GUID_ENTRY(CLSID_CVidCapClassManager,
980
+ 0x860BB310,0x5D01,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86)
981
+
982
+ // 083863F1-70DE-11d0-BD40-00A0C911CE86 Filter category
983
+ OUR_GUID_ENTRY(CLSID_LegacyAmFilterCategory,
984
+ 0x083863F1,0x70DE,0x11d0,0xBD,0x40,0x00,0xA0,0xC9,0x11,0xCE,0x86)
985
+ OUR_GUID_ENTRY(CLSID_CQzFilterClassManager,
986
+ 0x083863F1,0x70DE,0x11d0,0xBD,0x40,0x00,0xA0,0xC9,0x11,0xCE,0x86)
987
+
988
+ // 33D9A760-90C8-11d0-BD43-00A0C911CE86
989
+ OUR_GUID_ENTRY(CLSID_VideoCompressorCategory,
990
+ 0x33d9a760, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
991
+ OUR_GUID_ENTRY(CLSID_CIcmCoClassManager,
992
+ 0x33d9a760, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
993
+
994
+ // 33D9A761-90C8-11d0-BD43-00A0C911CE86
995
+ OUR_GUID_ENTRY(CLSID_AudioCompressorCategory,
996
+ 0x33d9a761, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
997
+ OUR_GUID_ENTRY(CLSID_CAcmCoClassManager,
998
+ 0x33d9a761, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
999
+
1000
+ // 33D9A762-90C8-11d0-BD43-00A0C911CE86 Audio source cateogry
1001
+ OUR_GUID_ENTRY(CLSID_AudioInputDeviceCategory,
1002
+ 0x33d9a762, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
1003
+ OUR_GUID_ENTRY(CLSID_CWaveinClassManager,
1004
+ 0x33d9a762, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
1005
+
1006
+ // E0F158E1-CB04-11d0-BD4E-00A0C911CE86 Audio renderer category
1007
+ OUR_GUID_ENTRY(CLSID_AudioRendererCategory,
1008
+ 0xe0f158e1, 0xcb04, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
1009
+ OUR_GUID_ENTRY(CLSID_CWaveOutClassManager,
1010
+ 0xe0f158e1, 0xcb04, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
1011
+
1012
+ // 4EFE2452-168A-11d1-BC76-00C04FB9453B Midi renderer category
1013
+ OUR_GUID_ENTRY(CLSID_MidiRendererCategory,
1014
+ 0x4EfE2452, 0x168A, 0x11d1, 0xBC, 0x76, 0x0, 0xc0, 0x4F, 0xB9, 0x45, 0x3B)
1015
+ OUR_GUID_ENTRY(CLSID_CMidiOutClassManager,
1016
+ 0x4EfE2452, 0x168A, 0x11d1, 0xBC, 0x76, 0x0, 0xc0, 0x4F, 0xB9, 0x45, 0x3B)
1017
+
1018
+ // CC7BFB41-F175-11d1-A392-00E0291F3959 External Renderers Category
1019
+ OUR_GUID_ENTRY(CLSID_TransmitCategory,
1020
+ 0xcc7bfb41, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59)
1021
+
1022
+ // CC7BFB46-F175-11d1-A392-00E0291F3959 Device Control Filters
1023
+ OUR_GUID_ENTRY(CLSID_DeviceControlCategory,
1024
+ 0xcc7bfb46, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59)
1025
+
1026
+ // DA4E3DA0-D07D-11d0-BD50-00A0C911CE86
1027
+ OUR_GUID_ENTRY(CLSID_ActiveMovieCategories,
1028
+ 0xda4e3da0, 0xd07d, 0x11d0, 0xbd, 0x50, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
1029
+
1030
+ // 2721AE20-7E70-11D0-A5D6-28DB04C10000
1031
+ OUR_GUID_ENTRY(CLSID_DVDHWDecodersCategory,
1032
+ 0x2721AE20, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00)
1033
+
1034
+ // 7D22E920-5CA9-4787-8C2B-A6779BD11781 Encoder API encoder category
1035
+ OUR_GUID_ENTRY(CLSID_MediaEncoderCategory,
1036
+ 0x7D22E920, 0x5CA9, 0x4787, 0x8C, 0x2B, 0xA6, 0x77, 0x9B, 0xD1, 0x17, 0x81)
1037
+
1038
+ // 236C9559-ADCE-4736-BF72-BAB34E392196 Encoder API multiplexer category
1039
+ OUR_GUID_ENTRY(CLSID_MediaMultiplexerCategory,
1040
+ 0x236C9559, 0xADCE, 0x4736, 0xBF, 0x72, 0xBA, 0xB3, 0x4E, 0x39, 0x21, 0x96)
1041
+
1042
+ // CDA42200-BD88-11d0-BD4E-00A0C911CE86
1043
+ OUR_GUID_ENTRY(CLSID_FilterMapper2,
1044
+ 0xcda42200, 0xbd88, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
1045
+
1046
+
1047
+ // 1e651cc0-b199-11d0-8212-00c04fc32c45
1048
+ OUR_GUID_ENTRY(CLSID_MemoryAllocator,
1049
+ 0x1e651cc0, 0xb199, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45)
1050
+
1051
+ // CDBD8D00-C193-11d0-BD4E-00A0C911CE86
1052
+ OUR_GUID_ENTRY(CLSID_MediaPropertyBag,
1053
+ 0xcdbd8d00, 0xc193, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86)
1054
+
1055
+ // FCC152B7-F372-11d0-8E00-00C04FD7C08B
1056
+ OUR_GUID_ENTRY(CLSID_DvdGraphBuilder,
1057
+ 0xFCC152B7, 0xF372, 0x11d0, 0x8E, 0x00, 0x00, 0xC0, 0x4F, 0xD7, 0xC0, 0x8B)
1058
+
1059
+ // 9B8C4620-2C1A-11d0-8493-00A02438AD48
1060
+ OUR_GUID_ENTRY(CLSID_DVDNavigator,
1061
+ 0x9b8c4620, 0x2c1a, 0x11d0, 0x84, 0x93, 0x0, 0xa0, 0x24, 0x38, 0xad, 0x48)
1062
+
1063
+ // f963c5cf-a659-4a93-9638-caf3cd277d13
1064
+ OUR_GUID_ENTRY(CLSID_DVDState,
1065
+ 0xf963c5cf, 0xa659, 0x4a93, 0x96, 0x38, 0xca, 0xf3, 0xcd, 0x27, 0x7d, 0x13)
1066
+
1067
+ // CC58E280-8AA1-11d1-B3F1-00AA003761C5
1068
+ OUR_GUID_ENTRY(CLSID_SmartTee,
1069
+ 0xcc58e280, 0x8aa1, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5)
1070
+
1071
+ // FB056BA0-2502-45B9-8E86-2B40DE84AD29
1072
+ OUR_GUID_ENTRY(CLSID_DtvCcFilter,
1073
+ 0xfb056ba0, 0x2502, 0x45b9, 0x8e, 0x86, 0x2b, 0x40, 0xde, 0x84, 0xad, 0x29)
1074
+
1075
+ // 2F7EE4B6-6FF5-4EB4-B24A-2BFC41117171
1076
+ OUR_GUID_ENTRY(CLSID_CaptionsFilter,
1077
+ 0x2F7EE4B6, 0x6FF5, 0x4EB4, 0xB2, 0x4A, 0x2B, 0xFC, 0x41, 0x11, 0x71, 0x71)
1078
+
1079
+ // {9F22CFEA-CE07-41ab-8BA0-C7364AF90AF9}
1080
+ OUR_GUID_ENTRY(CLSID_SubtitlesFilter,
1081
+ 0x9f22cfea, 0xce07, 0x41ab, 0x8b, 0xa0, 0xc7, 0x36, 0x4a, 0xf9, 0x0a, 0xf9)
1082
+
1083
+ // {8670C736-F614-427b-8ADA-BBADC587194B}
1084
+ OUR_GUID_ENTRY(CLSID_DirectShowPluginControl,
1085
+ 0x8670c736, 0xf614, 0x427b, 0x8a, 0xda, 0xbb, 0xad, 0xc5, 0x87, 0x19, 0x4b)
1086
+
1087
+
1088
+ // -- format types ---
1089
+
1090
+ // 0F6417D6-C318-11D0-A43F-00A0C9223196 FORMAT_None
1091
+ OUR_GUID_ENTRY(FORMAT_None,
1092
+ 0x0F6417D6, 0xc318, 0x11d0, 0xa4, 0x3f, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96)
1093
+
1094
+ // 05589f80-c356-11ce-bf01-00aa0055595a FORMAT_VideoInfo
1095
+ OUR_GUID_ENTRY(FORMAT_VideoInfo,
1096
+ 0x05589f80, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1097
+
1098
+ // F72A76A0-EB0A-11d0-ACE4-0000C0CC16BA FORMAT_VideoInfo2
1099
+ OUR_GUID_ENTRY(FORMAT_VideoInfo2,
1100
+ 0xf72a76A0, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1101
+
1102
+ // 05589f81-c356-11ce-bf01-00aa0055595a FORMAT_WaveFormatEx
1103
+ OUR_GUID_ENTRY(FORMAT_WaveFormatEx,
1104
+ 0x05589f81, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1105
+
1106
+ // 05589f82-c356-11ce-bf01-00aa0055595a FORMAT_MPEGVideo
1107
+ OUR_GUID_ENTRY(FORMAT_MPEGVideo,
1108
+ 0x05589f82, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1109
+
1110
+ // 05589f83-c356-11ce-bf01-00aa0055595a FORMAT_MPEGStreams
1111
+ OUR_GUID_ENTRY(FORMAT_MPEGStreams,
1112
+ 0x05589f83, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1113
+
1114
+ // 05589f84-c356-11ce-bf01-00aa0055595a FORMAT_DvInfo, DVINFO
1115
+ OUR_GUID_ENTRY(FORMAT_DvInfo,
1116
+ 0x05589f84, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1117
+
1118
+ // C7ECF04D-4582-4869-9ABB-BFB523B62EDF FORMAT_525WSS
1119
+ OUR_GUID_ENTRY(FORMAT_525WSS,
1120
+ 0xc7ecf04d, 0x4582, 0x4869, 0x9a, 0xbb, 0xbf, 0xb5, 0x23, 0xb6, 0x2e, 0xdf)
1121
+
1122
+ // -- Video related GUIDs ---
1123
+
1124
+ // 944d4c00-dd52-11ce-bf0e-00aa0055595a
1125
+ OUR_GUID_ENTRY(CLSID_DirectDrawProperties,
1126
+ 0x944d4c00, 0xdd52, 0x11ce, 0xbf, 0x0e, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1127
+
1128
+ // 59ce6880-acf8-11cf-b56e-0080c7c4b68a
1129
+ OUR_GUID_ENTRY(CLSID_PerformanceProperties,
1130
+ 0x59ce6880, 0xacf8, 0x11cf, 0xb5, 0x6e, 0x00, 0x80, 0xc7, 0xc4, 0xb6, 0x8a)
1131
+
1132
+ // 418afb70-f8b8-11ce-aac6-0020af0b99a3
1133
+ OUR_GUID_ENTRY(CLSID_QualityProperties,
1134
+ 0x418afb70, 0xf8b8, 0x11ce, 0xaa, 0xc6, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3)
1135
+
1136
+ // 61ded640-e912-11ce-a099-00aa00479a58
1137
+ OUR_GUID_ENTRY(IID_IBaseVideoMixer,
1138
+ 0x61ded640, 0xe912, 0x11ce, 0xa0, 0x99, 0x00, 0xaa, 0x00, 0x47, 0x9a, 0x58)
1139
+
1140
+ // 36d39eb0-dd75-11ce-bf0e-00aa0055595a
1141
+ OUR_GUID_ENTRY(IID_IDirectDrawVideo,
1142
+ 0x36d39eb0, 0xdd75, 0x11ce, 0xbf, 0x0e, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1143
+
1144
+ // bd0ecb0-f8e2-11ce-aac6-0020af0b99a3
1145
+ OUR_GUID_ENTRY(IID_IQualProp,
1146
+ 0x1bd0ecb0, 0xf8e2, 0x11ce, 0xaa, 0xc6, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3)
1147
+
1148
+ // {CE292861-FC88-11d0-9E69-00C04FD7C15B}
1149
+ OUR_GUID_ENTRY(CLSID_VPObject,
1150
+ 0xce292861, 0xfc88, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1151
+
1152
+ // {CE292862-FC88-11d0-9E69-00C04FD7C15B}
1153
+ OUR_GUID_ENTRY(IID_IVPObject,
1154
+ 0xce292862, 0xfc88, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1155
+
1156
+ // {25DF12C1-3DE0-11d1-9E69-00C04FD7C15B}
1157
+ OUR_GUID_ENTRY(IID_IVPControl,
1158
+ 0x25df12c1, 0x3de0, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1159
+
1160
+ // {814B9801-1C88-11d1-BAD9-00609744111A}
1161
+ OUR_GUID_ENTRY(CLSID_VPVBIObject,
1162
+ 0x814b9801, 0x1c88, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
1163
+
1164
+ // {814B9802-1C88-11d1-BAD9-00609744111A}
1165
+ OUR_GUID_ENTRY(IID_IVPVBIObject,
1166
+ 0x814b9802, 0x1c88, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
1167
+
1168
+ // {BC29A660-30E3-11d0-9E69-00C04FD7C15B}
1169
+ OUR_GUID_ENTRY(IID_IVPConfig,
1170
+ 0xbc29a660, 0x30e3, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1171
+
1172
+ // {C76794A1-D6C5-11d0-9E69-00C04FD7C15B}
1173
+ OUR_GUID_ENTRY(IID_IVPNotify,
1174
+ 0xc76794a1, 0xd6c5, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1175
+
1176
+ // {EBF47183-8764-11d1-9E69-00C04FD7C15B}
1177
+ OUR_GUID_ENTRY(IID_IVPNotify2,
1178
+ 0xebf47183, 0x8764, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1179
+
1180
+
1181
+ // {EC529B00-1A1F-11D1-BAD9-00609744111A}
1182
+ OUR_GUID_ENTRY(IID_IVPVBIConfig,
1183
+ 0xec529b00, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
1184
+
1185
+ // {EC529B01-1A1F-11D1-BAD9-00609744111A}
1186
+ OUR_GUID_ENTRY(IID_IVPVBINotify,
1187
+ 0xec529b01, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a)
1188
+
1189
+ // {593CDDE1-0759-11d1-9E69-00C04FD7C15B}
1190
+ OUR_GUID_ENTRY(IID_IMixerPinConfig,
1191
+ 0x593cdde1, 0x759, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1192
+
1193
+ // {EBF47182-8764-11d1-9E69-00C04FD7C15B}
1194
+ OUR_GUID_ENTRY(IID_IMixerPinConfig2,
1195
+ 0xebf47182, 0x8764, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b)
1196
+
1197
+
1198
+ // This is a real pain in the neck. The OLE GUIDs are separated out into a
1199
+ // different file from the main header files. The header files can then be
1200
+ // included multiple times and are protected with the following statements,
1201
+ //
1202
+ // #ifndef __SOMETHING_DEFINED__
1203
+ // #define __SOMETHING_DEFINED__
1204
+ // all the header contents
1205
+ // #endif // __SOMETHING_DEFINED__
1206
+ //
1207
+ // When the actual GUIDs are to be defined (using initguid) the GUID header
1208
+ // file can then be included to really define them just once. Unfortunately
1209
+ // DirectDraw has the GUIDs defined in the main header file. So if the base
1210
+ // classes bring in ddraw.h to get at the DirectDraw structures and so on
1211
+ // nobody would then be able to really include ddraw.h to allocate the GUID
1212
+ // memory structures because of the aforementioned header file protection
1213
+ // Therefore the DirectDraw GUIDs are defined and allocated for real here
1214
+
1215
+ #ifndef __DDRAW_INCLUDED__
1216
+ OUR_GUID_ENTRY(CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35)
1217
+ OUR_GUID_ENTRY(CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56)
1218
+ OUR_GUID_ENTRY(IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
1219
+ OUR_GUID_ENTRY(IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56)
1220
+ OUR_GUID_ENTRY(IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
1221
+ OUR_GUID_ENTRY(IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27)
1222
+ OUR_GUID_ENTRY(IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB)
1223
+ OUR_GUID_ENTRY(IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B)
1224
+ OUR_GUID_ENTRY(IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b)
1225
+ OUR_GUID_ENTRY(IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
1226
+ OUR_GUID_ENTRY(IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
1227
+ OUR_GUID_ENTRY(IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8)
1228
+ #endif
1229
+
1230
+ #ifndef __DVP_INCLUDED__
1231
+ OUR_GUID_ENTRY(IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60)
1232
+ #endif
1233
+
1234
+ #ifndef __DDKM_INCLUDED__
1235
+ OUR_GUID_ENTRY(IID_IDirectDrawKernel, 0x8D56C120,0x6A08,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8)
1236
+ OUR_GUID_ENTRY(IID_IDirectDrawSurfaceKernel, 0x60755DA0,0x6A40,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8)
1237
+ #endif
1238
+
1239
+ // 0618aa30-6bc4-11cf-bf36-00aa0055595a
1240
+ OUR_GUID_ENTRY(CLSID_ModexProperties,
1241
+ 0x0618aa30, 0x6bc4, 0x11cf, 0xbf, 0x36, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1242
+
1243
+ // dd1d7110-7836-11cf-bf47-00aa0055595a
1244
+ OUR_GUID_ENTRY(IID_IFullScreenVideo,
1245
+ 0xdd1d7110, 0x7836, 0x11cf, 0xbf, 0x47, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a)
1246
+
1247
+ // 53479470-f1dd-11cf-bc42-00aa00ac74f6
1248
+ OUR_GUID_ENTRY(IID_IFullScreenVideoEx,
1249
+ 0x53479470, 0xf1dd, 0x11cf, 0xbc, 0x42, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6)
1250
+
1251
+ // {101193C0-0BFE-11d0-AF91-00AA00B67A42} DV decoder property
1252
+ OUR_GUID_ENTRY(CLSID_DVDecPropertiesPage,
1253
+ 0x101193c0, 0xbfe, 0x11d0, 0xaf, 0x91, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
1254
+
1255
+ // {4150F050-BB6F-11d0-AFB9-00AA00B67A42} DV encoder property
1256
+ OUR_GUID_ENTRY(CLSID_DVEncPropertiesPage,
1257
+ 0x4150f050, 0xbb6f, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
1258
+
1259
+ // {4DB880E0-C10D-11d0-AFB9-00AA00B67A42} DV Muxer property
1260
+ OUR_GUID_ENTRY(CLSID_DVMuxPropertyPage,
1261
+ 0x4db880e0, 0xc10d, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42)
1262
+
1263
+
1264
+ // -- Direct Sound Audio related GUID ---
1265
+
1266
+ // 546F4260-D53E-11cf-B3F0-00AA003761C5
1267
+ OUR_GUID_ENTRY(IID_IAMDirectSound,
1268
+ 0x546f4260, 0xd53e, 0x11cf, 0xb3, 0xf0, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5)
1269
+
1270
+ // -- MPEG audio decoder properties
1271
+
1272
+ // {b45dd570-3c77-11d1-abe1-00a0c905f375}
1273
+ OUR_GUID_ENTRY(IID_IMpegAudioDecoder,
1274
+ 0xb45dd570, 0x3c77, 0x11d1, 0xab, 0xe1, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75)
1275
+
1276
+ // --- Line21 Decoder interface GUID ---
1277
+
1278
+ // 6E8D4A21-310C-11d0-B79A-00AA003767A7 IID_IAMLine21Decoder
1279
+ OUR_GUID_ENTRY(IID_IAMLine21Decoder,
1280
+ 0x6e8d4a21, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7)
1281
+
1282
+ // --- WST Decoder interface GUID ---
1283
+
1284
+ // C056DE21-75C2-11d3-A184-00105AEF9F33 IID_IAMWstDecoder
1285
+ OUR_GUID_ENTRY(IID_IAMWstDecoder,
1286
+ 0xc056de21, 0x75c2, 0x11d3, 0xa1, 0x84, 0x0, 0x10, 0x5a, 0xef, 0x9f, 0x33)
1287
+
1288
+ // --- WST Decoder Property Page ---
1289
+
1290
+ // 04E27F80-91E4-11d3-A184-00105AEF9F33 WST Decoder Property Page
1291
+ OUR_GUID_ENTRY(CLSID_WstDecoderPropertyPage,
1292
+ 0x4e27f80, 0x91e4, 0x11d3, 0xa1, 0x84, 0x0, 0x10, 0x5a, 0xef, 0x9f, 0x33)
1293
+
1294
+
1295
+ // -- Analog video related GUIDs ---
1296
+
1297
+
1298
+ // -- format types ---
1299
+ // 0482DDE0-7817-11cf-8A03-00AA006ECB65
1300
+ OUR_GUID_ENTRY(FORMAT_AnalogVideo,
1301
+ 0x482dde0, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1302
+
1303
+
1304
+ // -- major type, Analog Video
1305
+
1306
+ // 0482DDE1-7817-11cf-8A03-00AA006ECB65
1307
+ OUR_GUID_ENTRY(MEDIATYPE_AnalogVideo,
1308
+ 0x482dde1, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1309
+
1310
+
1311
+ // -- Analog Video subtypes, NTSC
1312
+
1313
+ // 0482DDE2-7817-11cf-8A03-00AA006ECB65
1314
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_NTSC_M,
1315
+ 0x482dde2, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1316
+
1317
+ // -- Analog Video subtypes, PAL
1318
+
1319
+ // 0482DDE5-7817-11cf-8A03-00AA006ECB65
1320
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_B,
1321
+ 0x482dde5, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1322
+
1323
+ // 0482DDE6-7817-11cf-8A03-00AA006ECB65
1324
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_D,
1325
+ 0x482dde6, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1326
+
1327
+ // 0482DDE7-7817-11cf-8A03-00AA006ECB65
1328
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_G,
1329
+ 0x482dde7, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1330
+
1331
+ // 0482DDE8-7817-11cf-8A03-00AA006ECB65
1332
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_H,
1333
+ 0x482dde8, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1334
+
1335
+ // 0482DDE9-7817-11cf-8A03-00AA006ECB65
1336
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_I,
1337
+ 0x482dde9, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1338
+
1339
+ // 0482DDEA-7817-11cf-8A03-00AA006ECB65
1340
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_M,
1341
+ 0x482ddea, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1342
+
1343
+ // 0482DDEB-7817-11cf-8A03-00AA006ECB65
1344
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_N,
1345
+ 0x482ddeb, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1346
+
1347
+ // 0482DDEC-7817-11cf-8A03-00AA006ECB65
1348
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_N_COMBO,
1349
+ 0x482ddec, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1350
+
1351
+ // -- Analog Video subtypes, SECAM
1352
+
1353
+ // 0482DDF0-7817-11cf-8A03-00AA006ECB65
1354
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_B,
1355
+ 0x482ddf0, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1356
+
1357
+ // 0482DDF1-7817-11cf-8A03-00AA006ECB65
1358
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_D,
1359
+ 0x482ddf1, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1360
+
1361
+ // 0482DDF2-7817-11cf-8A03-00AA006ECB65
1362
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_G,
1363
+ 0x482ddf2, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1364
+
1365
+ // 0482DDF3-7817-11cf-8A03-00AA006ECB65
1366
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_H,
1367
+ 0x482ddf3, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1368
+
1369
+ // 0482DDF4-7817-11cf-8A03-00AA006ECB65
1370
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_K,
1371
+ 0x482ddf4, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1372
+
1373
+ // 0482DDF5-7817-11cf-8A03-00AA006ECB65
1374
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_K1,
1375
+ 0x482ddf5, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1376
+
1377
+ // 0482DDF6-7817-11cf-8A03-00AA006ECB65
1378
+ OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_L,
1379
+ 0x482ddf6, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1380
+
1381
+
1382
+ // -- External audio related GUIDs ---
1383
+
1384
+ // -- major types, Analog Audio
1385
+
1386
+ // 0482DEE1-7817-11cf-8a03-00aa006ecb65
1387
+ OUR_GUID_ENTRY(MEDIATYPE_AnalogAudio,
1388
+ 0x482dee1, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1389
+
1390
+ // -- Video analysis related GUIDs ---
1391
+
1392
+ // -- format types used by VA -- H.264, captioning
1393
+
1394
+ // {A4EFC024-873E-4da3-898B-474DDBD79FD0}
1395
+ OUR_GUID_ENTRY(FORMAT_CAPTIONED_H264VIDEO,
1396
+ 0xa4efc024, 0x873e, 0x4da3, 0x89, 0x8b, 0x47, 0x4d, 0xdb, 0xd7, 0x9f, 0xd0)
1397
+
1398
+ // -- media, media subtype, and format types, CC container
1399
+
1400
+ // {50997A4A-E508-4054-A2B2-10FF0AC1A69A}
1401
+ OUR_GUID_ENTRY(FORMAT_CC_CONTAINER,
1402
+ 0x50997a4a, 0xe508, 0x4054, 0xa2, 0xb2, 0x10, 0xff, 0xa, 0xc1, 0xa6, 0x9a)
1403
+
1404
+ // {3ED9CB31-FD10-4ade-BCCC-FB9105D2F3EF}
1405
+ OUR_GUID_ENTRY(CAPTION_FORMAT_ATSC,
1406
+ 0x3ed9cb31, 0xfd10, 0x4ade, 0xbc, 0xcc, 0xfb, 0x91, 0x5, 0xd2, 0xf3, 0xef)
1407
+
1408
+ // {12230DB4-FF2A-447e-BB88-6841C416D068}
1409
+ OUR_GUID_ENTRY(CAPTION_FORMAT_DVB,
1410
+ 0x12230db4, 0xff2a, 0x447e, 0xbb, 0x88, 0x68, 0x41, 0xc4, 0x16, 0xd0, 0x68)
1411
+
1412
+ // {E9CA1CE7-915E-47be-9BB9-BF1D8A13A5EC}
1413
+ OUR_GUID_ENTRY(CAPTION_FORMAT_DIRECTV,
1414
+ 0xe9ca1ce7, 0x915e, 0x47be, 0x9b, 0xb9, 0xbf, 0x1d, 0x8a, 0x13, 0xa5, 0xec)
1415
+
1416
+ // {EBB1A262-1158-4b99-AE80-92AC776952C4}
1417
+ OUR_GUID_ENTRY(CAPTION_FORMAT_ECHOSTAR,
1418
+ 0xebb1a262, 0x1158, 0x4b99, 0xae, 0x80, 0x92, 0xac, 0x77, 0x69, 0x52, 0xc4)
1419
+
1420
+ // -- format types, MPEG-2
1421
+
1422
+ // {7AB2ADA2-81B6-4f14-B3C8-D0C486393B67}
1423
+ OUR_GUID_ENTRY(FORMAT_CAPTIONED_MPEG2VIDEO,
1424
+ 0x7ab2ada2, 0x81b6, 0x4f14, 0xb3, 0xc8, 0xd0, 0xc4, 0x86, 0x39, 0x3b, 0x67)
1425
+
1426
+ //
1427
+ // DirectShow's include file based on ksmedia.h from WDM DDK
1428
+ //
1429
+ #include "ksuuids.h"
1430
+
1431
+
1432
+ // -- Well known time format GUIDs ---
1433
+
1434
+
1435
+ // 00000000-0000-0000-0000-000000000000
1436
+ OUR_GUID_ENTRY(TIME_FORMAT_NONE,
1437
+ 0L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
1438
+
1439
+ // 7b785570-8c82-11cf-bc0c-00aa00ac74f6
1440
+ OUR_GUID_ENTRY(TIME_FORMAT_FRAME,
1441
+ 0x7b785570, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6)
1442
+
1443
+ // 7b785571-8c82-11cf-bc0c-00aa00ac74f6
1444
+ OUR_GUID_ENTRY(TIME_FORMAT_BYTE,
1445
+ 0x7b785571, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6)
1446
+
1447
+ // 7b785572-8c82-11cf-bc0c-00aa00ac74f6
1448
+ OUR_GUID_ENTRY(TIME_FORMAT_SAMPLE,
1449
+ 0x7b785572, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6)
1450
+
1451
+ // 7b785573-8c82-11cf-bc0c-00aa00ac74f6
1452
+ OUR_GUID_ENTRY(TIME_FORMAT_FIELD,
1453
+ 0x7b785573, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6)
1454
+
1455
+
1456
+ // 7b785574-8c82-11cf-bc0c-00aa00ac74f6
1457
+ OUR_GUID_ENTRY(TIME_FORMAT_MEDIA_TIME,
1458
+ 0x7b785574, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6)
1459
+
1460
+
1461
+ // for IKsPropertySet
1462
+
1463
+ // 9B00F101-1567-11d1-B3F1-00AA003761C5
1464
+ OUR_GUID_ENTRY(AMPROPSETID_Pin,
1465
+ 0x9b00f101, 0x1567, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5)
1466
+
1467
+ // fb6c4281-0353-11d1-905f-0000c0cc16ba
1468
+ OUR_GUID_ENTRY(PIN_CATEGORY_CAPTURE,
1469
+ 0xfb6c4281, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1470
+
1471
+ // fb6c4282-0353-11d1-905f-0000c0cc16ba
1472
+ OUR_GUID_ENTRY(PIN_CATEGORY_PREVIEW,
1473
+ 0xfb6c4282, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1474
+
1475
+ // fb6c4283-0353-11d1-905f-0000c0cc16ba
1476
+ OUR_GUID_ENTRY(PIN_CATEGORY_ANALOGVIDEOIN,
1477
+ 0xfb6c4283, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1478
+
1479
+ // fb6c4284-0353-11d1-905f-0000c0cc16ba
1480
+ OUR_GUID_ENTRY(PIN_CATEGORY_VBI,
1481
+ 0xfb6c4284, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1482
+
1483
+ // fb6c4285-0353-11d1-905f-0000c0cc16ba
1484
+ OUR_GUID_ENTRY(PIN_CATEGORY_VIDEOPORT,
1485
+ 0xfb6c4285, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1486
+
1487
+ // fb6c4286-0353-11d1-905f-0000c0cc16ba
1488
+ OUR_GUID_ENTRY(PIN_CATEGORY_NABTS,
1489
+ 0xfb6c4286, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1490
+
1491
+ // fb6c4287-0353-11d1-905f-0000c0cc16ba
1492
+ OUR_GUID_ENTRY(PIN_CATEGORY_EDS,
1493
+ 0xfb6c4287, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1494
+
1495
+ // fb6c4288-0353-11d1-905f-0000c0cc16ba
1496
+ OUR_GUID_ENTRY(PIN_CATEGORY_TELETEXT,
1497
+ 0xfb6c4288, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1498
+
1499
+ // fb6c4289-0353-11d1-905f-0000c0cc16ba
1500
+ OUR_GUID_ENTRY(PIN_CATEGORY_CC,
1501
+ 0xfb6c4289, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1502
+
1503
+ // fb6c428a-0353-11d1-905f-0000c0cc16ba
1504
+ OUR_GUID_ENTRY(PIN_CATEGORY_STILL,
1505
+ 0xfb6c428a, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1506
+
1507
+ // fb6c428b-0353-11d1-905f-0000c0cc16ba
1508
+ OUR_GUID_ENTRY(PIN_CATEGORY_TIMECODE,
1509
+ 0xfb6c428b, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1510
+
1511
+ // fb6c428c-0353-11d1-905f-0000c0cc16ba
1512
+ OUR_GUID_ENTRY(PIN_CATEGORY_VIDEOPORT_VBI,
1513
+ 0xfb6c428c, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba)
1514
+
1515
+
1516
+ // the following special GUIDS are used by ICaptureGraphBuilder::FindInterface
1517
+
1518
+ // {AC798BE0-98E3-11d1-B3F1-00AA003761C5}
1519
+ OUR_GUID_ENTRY(LOOK_UPSTREAM_ONLY,
1520
+ 0xac798be0, 0x98e3, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5)
1521
+
1522
+ // {AC798BE1-98E3-11d1-B3F1-00AA003761C5}
1523
+ OUR_GUID_ENTRY(LOOK_DOWNSTREAM_ONLY,
1524
+ 0xac798be1, 0x98e3, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5)
1525
+
1526
+ // -------------------------------------------------------------------------
1527
+ // KSProxy GUIDS
1528
+ // -------------------------------------------------------------------------
1529
+
1530
+ // {266EEE41-6C63-11cf-8A03-00AA006ECB65}
1531
+ OUR_GUID_ENTRY(CLSID_TVTunerFilterPropertyPage,
1532
+ 0x266eee41, 0x6c63, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65)
1533
+
1534
+ // {71F96461-78F3-11d0-A18C-00A0C9118956}
1535
+ OUR_GUID_ENTRY(CLSID_CrossbarFilterPropertyPage,
1536
+ 0x71f96461, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56)
1537
+
1538
+ // {71F96463-78F3-11d0-A18C-00A0C9118956}
1539
+ OUR_GUID_ENTRY(CLSID_TVAudioFilterPropertyPage,
1540
+ 0x71f96463, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56)
1541
+
1542
+ // {71F96464-78F3-11d0-A18C-00A0C9118956}
1543
+ OUR_GUID_ENTRY(CLSID_VideoProcAmpPropertyPage,
1544
+ 0x71f96464, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56)
1545
+
1546
+ // {71F96465-78F3-11d0-A18C-00A0C9118956}
1547
+ OUR_GUID_ENTRY(CLSID_CameraControlPropertyPage,
1548
+ 0x71f96465, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56)
1549
+
1550
+ // {71F96466-78F3-11d0-A18C-00A0C9118956}
1551
+ OUR_GUID_ENTRY(CLSID_AnalogVideoDecoderPropertyPage,
1552
+ 0x71f96466, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56)
1553
+
1554
+ // {71F96467-78F3-11d0-A18C-00A0C9118956}
1555
+ OUR_GUID_ENTRY(CLSID_VideoStreamConfigPropertyPage,
1556
+ 0x71f96467, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56)
1557
+
1558
+ // {37E92A92-D9AA-11d2-BF84-8EF2B1555AED} Audio Renderer Advanced Property Page
1559
+ OUR_GUID_ENTRY(CLSID_AudioRendererAdvancedProperties,
1560
+ 0x37e92a92, 0xd9aa, 0x11d2, 0xbf, 0x84, 0x8e, 0xf2, 0xb1, 0x55, 0x5a, 0xed)
1561
+
1562
+
1563
+ // -------------------------------------------------------------------------
1564
+ // VMR GUIDS
1565
+ // -------------------------------------------------------------------------
1566
+
1567
+ // {B87BEB7B-8D29-423f-AE4D-6582C10175AC}
1568
+ OUR_GUID_ENTRY(CLSID_VideoMixingRenderer,
1569
+ 0xB87BEB7B, 0x8D29, 0x423f, 0xAE, 0x4D, 0x65, 0x82, 0xC1, 0x01, 0x75, 0xAC)
1570
+
1571
+ // {6BC1CFFA-8FC1-4261-AC22-CFB4CC38DB50}
1572
+ OUR_GUID_ENTRY(CLSID_VideoRendererDefault,
1573
+ 0x6BC1CFFA, 0x8FC1, 0x4261, 0xAC, 0x22, 0xCF, 0xB4, 0xCC, 0x38, 0xDB, 0x50)
1574
+
1575
+ // {99d54f63-1a69-41ae-aa4d-c976eb3f0713}
1576
+ OUR_GUID_ENTRY(CLSID_AllocPresenter,
1577
+ 0x99d54f63, 0x1a69, 0x41ae, 0xaa, 0x4d, 0xc9, 0x76, 0xeb, 0x3f, 0x07, 0x13)
1578
+
1579
+ // {4444ac9e-242e-471b-a3c7-45dcd46352bc}
1580
+ OUR_GUID_ENTRY(CLSID_AllocPresenterDDXclMode,
1581
+ 0x4444ac9e, 0x242e, 0x471b, 0xa3, 0xc7, 0x45, 0xdc, 0xd4, 0x63, 0x52, 0xbc)
1582
+
1583
+ // {6f26a6cd-967b-47fd-874a-7aed2c9d25a2}
1584
+ OUR_GUID_ENTRY(CLSID_VideoPortManager,
1585
+ 0x6f26a6cd, 0x967b, 0x47fd, 0x87, 0x4a, 0x7a, 0xed, 0x2c, 0x9d, 0x25, 0xa2)
1586
+
1587
+
1588
+ // -------------------------------------------------------------------------
1589
+ // VMR GUIDS for DX9
1590
+ // -------------------------------------------------------------------------
1591
+
1592
+ // {51b4abf3-748f-4e3b-a276-c828330e926a}
1593
+ OUR_GUID_ENTRY(CLSID_VideoMixingRenderer9,
1594
+ 0x51b4abf3, 0x748f, 0x4e3b, 0xa2, 0x76, 0xc8, 0x28, 0x33, 0x0e, 0x92, 0x6a)
1595
+
1596
+
1597
+ // -------------------------------------------------------------------------
1598
+ // EVR GUIDS
1599
+ // -------------------------------------------------------------------------
1600
+
1601
+ // {FA10746C-9B63-4b6c-BC49-FC300EA5F256}
1602
+ OUR_GUID_ENTRY(CLSID_EnhancedVideoRenderer,
1603
+ 0xfa10746c, 0x9b63, 0x4b6c, 0xbc, 0x49, 0xfc, 0x30, 0xe, 0xa5, 0xf2, 0x56)
1604
+
1605
+ #ifndef __EVR_GUIDS__
1606
+ #define __EVR_GUIDS__
1607
+
1608
+ // {E474E05A-AB65-4f6a-827C-218B1BAAF31F}
1609
+ OUR_GUID_ENTRY(CLSID_MFVideoMixer9,
1610
+ 0xE474E05A, 0xAB65, 0x4f6a, 0x82, 0x7C, 0x21, 0x8B, 0x1B, 0xAA, 0xF3, 0x1F)
1611
+
1612
+ // {98455561-5136-4d28-AB08-4CEE40EA2781}
1613
+ OUR_GUID_ENTRY(CLSID_MFVideoPresenter9,
1614
+ 0x98455561, 0x5136, 0x4d28, 0xab, 0x8, 0x4c, 0xee, 0x40, 0xea, 0x27, 0x81)
1615
+
1616
+ #endif // __EVR_GUIDS__
1617
+
1618
+ // {a0a7a57b-59b2-4919-a694-add0a526c373}
1619
+ OUR_GUID_ENTRY(CLSID_EVRTearlessWindowPresenter9,
1620
+ 0xa0a7a57b, 0x59b2, 0x4919, 0xa6, 0x94, 0xad, 0xd0, 0xa5, 0x26, 0xc3, 0x73)
1621
+
1622
+ // {62079164-233b-41f8-a80f-f01705f514a8}
1623
+ OUR_GUID_ENTRY(CLSID_EVRPlaybackPipelineOptimizer,
1624
+ 0x62079164, 0x233b, 0x41f8, 0xa8, 0x0f, 0xf0, 0x17, 0x05, 0xf5, 0x14, 0xa8)
1625
+
1626
+ // {e447df01-10ca-4d17-b17e-6a840f8a3a4c}
1627
+ // {e447df02-10ca-4d17-b17e-6a840f8a3a4c}
1628
+ // {e447df03-10ca-4d17-b17e-6a840f8a3a4c}
1629
+ // {e447df04-10ca-4d17-b17e-6a840f8a3a4c}
1630
+ // {e447df05-10ca-4d17-b17e-6a840f8a3a4c}
1631
+ // {e447df06-10ca-4d17-b17e-6a840f8a3a4c}
1632
+ // {e447df07-10ca-4d17-b17e-6a840f8a3a4c}
1633
+ // {e447df08-10ca-4d17-b17e-6a840f8a3a4c}
1634
+ // {e447df09-10ca-4d17-b17e-6a840f8a3a4c}
1635
+ // {e447df0a-10ca-4d17-b17e-6a840f8a3a4c}
1636
+ OUR_GUID_ENTRY( EVRConfig_ForceBob, 0xe447df01,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1637
+ OUR_GUID_ENTRY( EVRConfig_AllowDropToBob, 0xe447df02,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1638
+ OUR_GUID_ENTRY( EVRConfig_ForceThrottle, 0xe447df03,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1639
+ OUR_GUID_ENTRY( EVRConfig_AllowDropToThrottle, 0xe447df04,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1640
+ OUR_GUID_ENTRY( EVRConfig_ForceHalfInterlace, 0xe447df05,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1641
+ OUR_GUID_ENTRY( EVRConfig_AllowDropToHalfInterlace,0xe447df06,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1642
+ OUR_GUID_ENTRY( EVRConfig_ForceScaling, 0xe447df07,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1643
+ OUR_GUID_ENTRY( EVRConfig_AllowScaling, 0xe447df08,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1644
+ OUR_GUID_ENTRY( EVRConfig_ForceBatching, 0xe447df09,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1645
+ OUR_GUID_ENTRY( EVRConfig_AllowBatching, 0xe447df0a,0x10ca,0x4d17,0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c)
1646
+
1647
+
1648
+ // -------------------------------------------------------------------------
1649
+ // BDA Network Provider GUIDS
1650
+ // -------------------------------------------------------------------------
1651
+
1652
+ // This is the GUID for the generic NP which would replace ATSC, DVBT, DVBS
1653
+ // and DVBC NP. All the other GUIDs are still kept for backward compatibility
1654
+ // {B2F3A67C-29DA-4c78-8831-091ED509A475}
1655
+ OUR_GUID_ENTRY(CLSID_NetworkProvider,
1656
+ 0xb2f3a67c, 0x29da, 0x4c78, 0x88, 0x31, 0x9, 0x1e, 0xd5, 0x9, 0xa4, 0x75)
1657
+
1658
+ // {0DAD2FDD-5FD7-11D3-8F50-00C04F7971E2}
1659
+ OUR_GUID_ENTRY(CLSID_ATSCNetworkProvider,
1660
+ 0x0dad2fdd, 0x5fd7, 0x11d3, 0x8f, 0x50, 0x00, 0xc0, 0x4f, 0x79, 0x71, 0xe2)
1661
+
1662
+ // {E3444D16-5AC4-4386-88DF-13FD230E1DDA}
1663
+ OUR_GUID_ENTRY(CLSID_ATSCNetworkPropertyPage,
1664
+ 0xe3444d16, 0x5ac4, 0x4386, 0x88, 0xdf, 0x13, 0xfd, 0x23, 0x0e, 0x1d, 0xda)
1665
+
1666
+ // {FA4B375A-45B4-4d45-8440-263957B11623}
1667
+ OUR_GUID_ENTRY(CLSID_DVBSNetworkProvider,
1668
+ 0xfa4b375a, 0x45b4, 0x4d45, 0x84, 0x40, 0x26, 0x39, 0x57, 0xb1, 0x16, 0x23)
1669
+
1670
+ // {216C62DF-6D7F-4e9a-8571-05F14EDB766A}
1671
+ OUR_GUID_ENTRY(CLSID_DVBTNetworkProvider,
1672
+ 0x216c62df, 0x6d7f, 0x4e9a, 0x85, 0x71, 0x5, 0xf1, 0x4e, 0xdb, 0x76, 0x6a)
1673
+
1674
+ // {DC0C0FE7-0485-4266-B93F-68FBF80ED834}
1675
+ OUR_GUID_ENTRY(CLSID_DVBCNetworkProvider,
1676
+ 0xdc0c0fe7, 0x485, 0x4266, 0xb9, 0x3f, 0x68, 0xfb, 0xf8, 0xe, 0xd8, 0x34)
1677
+
1678
+ // -------------------------------------------------------------------------
1679
+ // attribute GUIDs
1680
+ // -------------------------------------------------------------------------
1681
+
1682
+ // {EB7836CA-14FF-4919-BCE7-3AF12319E50C}
1683
+ OUR_GUID_ENTRY(DSATTRIB_UDCRTag,
1684
+ 0xEB7836CA, 0x14FF, 0x4919, 0xbc, 0xe7, 0x3a, 0xf1, 0x23, 0x19, 0xe5, 0x0c)
1685
+
1686
+ // {2F5BAE02-7B8F-4f60-82D6-E4EA2F1F4C99}
1687
+ OUR_GUID_ENTRY(DSATTRIB_PicSampleSeq,
1688
+ 0x2f5bae02, 0x7b8f, 0x4f60, 0x82, 0xd6, 0xe4, 0xea, 0x2f, 0x1f, 0x4c, 0x99)
1689
+
1690
+ // {5A5F08CA-55C2-4033-92AB-55DB8F781226}
1691
+ OUR_GUID_ENTRY(DSATTRIB_OptionalVideoAttributes,
1692
+ 0x5A5F08CA, 0x55C2, 0x4033, 0x92, 0xAB, 0x55, 0xDB, 0x8F, 0x78, 0x12, 0x26)
1693
+
1694
+ // {e7e050fb-dd5d-40dd-9915-35dcb81bdc8a}
1695
+ OUR_GUID_ENTRY(DSATTRIB_CC_CONTAINER_INFO,
1696
+ 0xe7e050fb, 0xdd5d, 0x40dd, 0x99, 0x15, 0x35, 0xDC, 0xB8, 0x1B, 0xDC, 0x8a)
1697
+
1698
+ // {B622F612-47AD-4671-AD6C-05A98E65DE3A}
1699
+ OUR_GUID_ENTRY(DSATTRIB_TRANSPORT_PROPERTIES,
1700
+ 0xb622f612, 0x47ad, 0x4671, 0xad, 0x6c, 0x5, 0xa9, 0x8e, 0x65, 0xde, 0x3a)
1701
+
1702
+ // {e0b56679-12b9-43cc-b7df-578caa5a7b63}
1703
+ OUR_GUID_ENTRY(DSATTRIB_PBDATAG_ATTRIBUTE,
1704
+ 0xe0b56679, 0x12b9, 0x43cc, 0xb7, 0xdf, 0x57, 0x8c, 0xaa, 0x5a, 0x7b, 0x63)
1705
+
1706
+ // {0c1a5614-30cd-4f40-bcbf-d03e52306207}
1707
+ OUR_GUID_ENTRY( DSATTRIB_CAPTURE_STREAMTIME,
1708
+ 0x0c1a5614, 0x30cd, 0x4f40, 0xbc, 0xbf, 0xd0, 0x3e, 0x52, 0x30, 0x62, 0x07)
1709
+
1710
+ // {5FB5673B-0A2A-4565-827B-6853FD75E611} DSATTRIB_DSHOW_STREAM_DESC
1711
+ OUR_GUID_ENTRY(DSATTRIB_DSHOW_STREAM_DESC,
1712
+ 0x5fb5673b, 0xa2a, 0x4565, 0x82, 0x7b, 0x68, 0x53, 0xfd, 0x75, 0xe6, 0x11)
1713
+
1714
+ // {892CD111-72F3-411d-8B91-A9E9123AC29A}
1715
+ OUR_GUID_ENTRY(DSATTRIB_SAMPLE_LIVE_STREAM_TIME,
1716
+ 0x892cd111, 0x72f3, 0x411d, 0x8b, 0x91, 0xa9, 0xe9, 0x12, 0x3a, 0xc2, 0x9a)
1717
+
1718
+ // UUID for supported UDRI TAG tables
1719
+ OUR_GUID_ENTRY( UUID_UdriTagTables,
1720
+ 0xe1b98d74, 0x9778, 0x4878, 0xb6, 0x64, 0xeb, 0x20, 0x20, 0x36, 0x4d, 0x88)
1721
+
1722
+ // UUID for supported WMDRM TAG tables
1723
+ OUR_GUID_ENTRY( UUID_WMDRMTagTables,
1724
+ 0x5DCD1101, 0x9263, 0x45bb, 0xa4, 0xd5, 0xc4, 0x15, 0xab, 0x8c, 0x58, 0x9c)
1725
+
1726
+ // -------------------------------------------------------------------------
1727
+ // TVE Receiver filter guids
1728
+ // -------------------------------------------------------------------------
1729
+
1730
+ // The CLSID used by the TVE Receiver filter
1731
+ // {05500280-FAA5-4DF9-8246-BFC23AC5CEA8}
1732
+ OUR_GUID_ENTRY(CLSID_DShowTVEFilter,
1733
+ 0x05500280, 0xFAA5, 0x4DF9, 0x82, 0x46, 0xBF, 0xC2, 0x3A, 0xC5, 0xCE, 0xA8)
1734
+
1735
+ // {05500281-FAA5-4DF9-8246-BFC23AC5CEA8}
1736
+ OUR_GUID_ENTRY(CLSID_TVEFilterTuneProperties,
1737
+ 0x05500281, 0xFAA5, 0x4DF9, 0x82, 0x46, 0xBF, 0xC2, 0x3A, 0xC5, 0xCE, 0xA8)
1738
+
1739
+
1740
+ // {05500282-FAA5-4DF9-8246-BFC23AC5CEA8}
1741
+ OUR_GUID_ENTRY(CLSID_TVEFilterCCProperties,
1742
+ 0x05500282, 0xFAA5, 0x4DF9, 0x82, 0x46, 0xBF, 0xC2, 0x3A, 0xC5, 0xCE, 0xA8)
1743
+
1744
+ // {05500283-FAA5-4DF9-8246-BFC23AC5CEA8}
1745
+ OUR_GUID_ENTRY(CLSID_TVEFilterStatsProperties,
1746
+ 0x05500283, 0xFAA5, 0x4DF9, 0x82, 0x46, 0xBF, 0xC2, 0x3A, 0xC5, 0xCE, 0xA8)
1747
+
1748
+ // -------------------------------------------------------------------------
1749
+ // Defined ENCAPI parameter GUIDs
1750
+ // -------------------------------------------------------------------------
1751
+
1752
+ // The CLSID for the original IVideoEncoder proxy plug-in
1753
+ // {B43C4EEC-8C32-4791-9102-508ADA5EE8E7}
1754
+ OUR_GUID_ENTRY(CLSID_IVideoEncoderProxy,
1755
+ 0xb43c4eec, 0x8c32, 0x4791, 0x91, 0x2, 0x50, 0x8a, 0xda, 0x5e, 0xe8, 0xe7)
1756
+
1757
+ // The CLSID for the ICodecAPI proxy plug-in
1758
+ // {7ff0997a-1999-4286-a73c-622b8814e7eb}
1759
+ OUR_GUID_ENTRY(CLSID_ICodecAPIProxy,
1760
+ 0x7ff0997a, 0x1999, 0x4286, 0xa7, 0x3c, 0x62, 0x2b, 0x88, 0x14, 0xe7, 0xeb )
1761
+
1762
+ // The CLSID for the combination ICodecAPI/IVideoEncoder proxy plug-in
1763
+ // {b05dabd9-56e5-4fdc-afa4-8a47e91f1c9c}
1764
+ OUR_GUID_ENTRY(CLSID_IVideoEncoderCodecAPIProxy,
1765
+ 0xb05dabd9, 0x56e5, 0x4fdc, 0xaf, 0xa4, 0x8a, 0x47, 0xe9, 0x1f, 0x1c, 0x9c )
1766
+
1767
+ #ifndef __ENCODER_API_GUIDS__
1768
+ #define __ENCODER_API_GUIDS__
1769
+
1770
+ // {49CC4C43-CA83-4ad4-A9AF-F3696AF666DF}
1771
+ OUR_GUID_ENTRY(ENCAPIPARAM_BITRATE,
1772
+ 0x49cc4c43, 0xca83, 0x4ad4, 0xa9, 0xaf, 0xf3, 0x69, 0x6a, 0xf6, 0x66, 0xdf)
1773
+
1774
+ // {703F16A9-3D48-44a1-B077-018DFF915D19}
1775
+ OUR_GUID_ENTRY(ENCAPIPARAM_PEAK_BITRATE,
1776
+ 0x703f16a9, 0x3d48, 0x44a1, 0xb0, 0x77, 0x1, 0x8d, 0xff, 0x91, 0x5d, 0x19)
1777
+
1778
+ // {EE5FB25C-C713-40d1-9D58-C0D7241E250F}
1779
+ OUR_GUID_ENTRY(ENCAPIPARAM_BITRATE_MODE,
1780
+ 0xee5fb25c, 0xc713, 0x40d1, 0x9d, 0x58, 0xc0, 0xd7, 0x24, 0x1e, 0x25, 0xf)
1781
+
1782
+ // {0C0171DB-FEFC-4af7-9991-A5657C191CD1}
1783
+ OUR_GUID_ENTRY(ENCAPIPARAM_SAP_MODE,
1784
+ 0xc0171db, 0xfefc, 0x4af7, 0x99, 0x91, 0xa5, 0x65, 0x7c, 0x19, 0x1c, 0xd1)
1785
+
1786
+ // for kernel control
1787
+
1788
+ // {62b12acf-f6b0-47d9-9456-96f22c4e0b9d}
1789
+ OUR_GUID_ENTRY(CODECAPI_CHANGELISTS,
1790
+ 0x62b12acf, 0xf6b0, 0x47d9, 0x94, 0x56, 0x96, 0xf2, 0x2c, 0x4e, 0x0b, 0x9d)
1791
+
1792
+ // {7112e8e1-3d03-47ef-8e60-03f1cf537301 }
1793
+ OUR_GUID_ENTRY(CODECAPI_VIDEO_ENCODER,
1794
+ 0x7112e8e1, 0x3d03, 0x47ef, 0x8e, 0x60, 0x03, 0xf1, 0xcf, 0x53, 0x73, 0x01)
1795
+
1796
+ // {b9d19a3e-f897-429c-bc46-8138b7272b2d }
1797
+ OUR_GUID_ENTRY(CODECAPI_AUDIO_ENCODER,
1798
+ 0xb9d19a3e, 0xf897, 0x429c, 0xbc, 0x46, 0x81, 0x38, 0xb7, 0x27, 0x2b, 0x2d)
1799
+
1800
+ // {6c5e6a7c-acf8-4f55-a999-1a628109051b }
1801
+ OUR_GUID_ENTRY(CODECAPI_SETALLDEFAULTS,
1802
+ 0x6c5e6a7c, 0xacf8, 0x4f55, 0xa9, 0x99, 0x1a, 0x62, 0x81, 0x09, 0x05, 0x1b)
1803
+
1804
+ // {6a577e92-83e1-4113-adc2-4fcec32f83a1 }
1805
+ OUR_GUID_ENTRY(CODECAPI_ALLSETTINGS,
1806
+ 0x6a577e92, 0x83e1, 0x4113, 0xad, 0xc2, 0x4f, 0xce, 0xc3, 0x2f, 0x83, 0xa1)
1807
+
1808
+ // {0581af97-7693-4dbd-9dca-3f9ebd6585a1 }
1809
+ OUR_GUID_ENTRY(CODECAPI_SUPPORTSEVENTS,
1810
+ 0x0581af97, 0x7693, 0x4dbd, 0x9d, 0xca, 0x3f, 0x9e, 0xbd, 0x65, 0x85, 0xa1 )
1811
+
1812
+ // {1cb14e83-7d72-4657-83fd-47a2c5b9d13d }
1813
+ OUR_GUID_ENTRY(CODECAPI_CURRENTCHANGELIST,
1814
+ 0x1cb14e83, 0x7d72, 0x4657, 0x83, 0xfd, 0x47, 0xa2, 0xc5, 0xb9, 0xd1, 0x3d )
1815
+
1816
+ // {1f26a602-2b5c-4b63-b8e8-9ea5c1a7dc2e}
1817
+ OUR_GUID_ENTRY(CLSID_SBE2MediaTypeProfile,
1818
+ 0x1f26a602, 0x2b5c, 0x4b63, 0xb8, 0xe8, 0x9e, 0xa5, 0xc1, 0xa7, 0xdc, 0x2e )
1819
+
1820
+ // {3E458037-0CA6-41aa-A594-2AA6C02D709B}
1821
+ OUR_GUID_ENTRY(CLSID_SBE2FileScan,
1822
+ 0x3e458037, 0xca6, 0x41aa, 0xa5, 0x94, 0x2a, 0xa6, 0xc0, 0x2d, 0x70, 0x9b) ;
1823
+
1824
+ // When generating strmiids.lib, include codecapi definitions
1825
+ #ifdef INITGUID
1826
+ #define UUID_GEN
1827
+ #include <codecapi.h>
1828
+ #endif
1829
+
1830
+ #endif // __ENCODER_API_GUIDS__
1831
+
1832
+ // -----------------------------------------------
1833
+ // Used for decoders that exposing ICodecAPI
1834
+ // -----------------------------------------------
1835
+ OUR_GUID_ENTRY(CODECAPI_AVDecMmcssClass,
1836
+ 0xe0ad4828, 0xdf66, 0x4893, 0x9f, 0x33, 0x78, 0x8a, 0xa4, 0xec, 0x40, 0x82)
1837
+
1838
+ #undef OUR_GUID_ENTRY
1839
+
1840
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
1841
+ #pragma endregion
1842
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/vhf.h ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All Rights Reserved.
4
+
5
+ Module Name:
6
+
7
+ vhf.h
8
+
9
+ Abstract:
10
+
11
+ This is the Virtual HID Framework (VHF) interface for both User mode and Kernel mode.
12
+
13
+ Revision History:
14
+
15
+ --*/
16
+
17
+ #ifndef __VHF_H__
18
+ #define __VHF_H__
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ #if(NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
25
+
26
+ //
27
+ // _HID_XFER_PACKET structure is defined in hidclass.h. If hidclass.h is
28
+ // not already included, then the structure will not be defined at this
29
+ // point. Instead of requiring that hidclass.h be included, define this
30
+ // structure in this header if not already defined.
31
+ //
32
+ #ifndef __HIDCLASS_H__
33
+
34
+ typedef struct _HID_XFER_PACKET {
35
+ PUCHAR reportBuffer;
36
+ ULONG reportBufferLen;
37
+ UCHAR reportId;
38
+ } HID_XFER_PACKET, *PHID_XFER_PACKET;
39
+
40
+ #endif
41
+
42
+ typedef PVOID VHFHANDLE;
43
+ typedef PVOID VHFOPERATIONHANDLE;
44
+
45
+ typedef
46
+ _Function_class_(EVT_VHF_READY_FOR_NEXT_READ_REPORT)
47
+ _IRQL_requires_max_(DISPATCH_LEVEL)
48
+ _IRQL_requires_same_
49
+ VOID
50
+ EVT_VHF_READY_FOR_NEXT_READ_REPORT(
51
+ _In_
52
+ PVOID VhfClientContext
53
+ );
54
+
55
+ typedef EVT_VHF_READY_FOR_NEXT_READ_REPORT *PEVT_VHF_READY_FOR_NEXT_READ_REPORT;
56
+
57
+ typedef
58
+ _Function_class_(EVT_VHF_CLEANUP)
59
+ _IRQL_requires_max_(DISPATCH_LEVEL)
60
+ _IRQL_requires_same_
61
+ VOID
62
+ EVT_VHF_CLEANUP(
63
+ _In_
64
+ PVOID VhfClientContext
65
+ );
66
+
67
+ typedef EVT_VHF_CLEANUP *PEVT_VHF_CLEANUP;
68
+
69
+ typedef
70
+ _Function_class_(EVT_VHF_ASYNC_OPERATION)
71
+ _IRQL_requires_max_(DISPATCH_LEVEL)
72
+ _IRQL_requires_same_
73
+ VOID
74
+ EVT_VHF_ASYNC_OPERATION(
75
+ _In_
76
+ PVOID VhfClientContext,
77
+ _In_
78
+ VHFOPERATIONHANDLE VhfOperationHandle,
79
+ _In_opt_
80
+ PVOID VhfOperationContext,
81
+ _In_
82
+ PHID_XFER_PACKET HidTransferPacket
83
+ );
84
+
85
+ typedef EVT_VHF_ASYNC_OPERATION *PEVT_VHF_ASYNC_OPERATION;
86
+
87
+ typedef struct _VHF_CONFIG {
88
+
89
+ ULONG Size;
90
+
91
+ PVOID VhfClientContext;
92
+
93
+ ULONG OperationContextSize;
94
+
95
+ #ifdef _KERNEL_MODE
96
+ PDEVICE_OBJECT DeviceObject;
97
+ #else
98
+ HANDLE FileHandle;
99
+ #endif
100
+
101
+ USHORT VendorID;
102
+ USHORT ProductID;
103
+ USHORT VersionNumber;
104
+
105
+ GUID ContainerID;
106
+
107
+ USHORT InstanceIDLength;
108
+ _Field_size_bytes_full_(InstanceIDLength)
109
+ PWSTR InstanceID;
110
+
111
+ USHORT ReportDescriptorLength;
112
+ _Field_size_full_(ReportDescriptorLength)
113
+ PUCHAR ReportDescriptor;
114
+
115
+ PEVT_VHF_READY_FOR_NEXT_READ_REPORT EvtVhfReadyForNextReadReport;
116
+ PEVT_VHF_ASYNC_OPERATION EvtVhfAsyncOperationGetFeature;
117
+ PEVT_VHF_ASYNC_OPERATION EvtVhfAsyncOperationSetFeature;
118
+ PEVT_VHF_ASYNC_OPERATION EvtVhfAsyncOperationWriteReport;
119
+ PEVT_VHF_ASYNC_OPERATION EvtVhfAsyncOperationGetInputReport;
120
+ PEVT_VHF_CLEANUP EvtVhfCleanup;
121
+
122
+ USHORT HardwareIDsLength;
123
+ _Field_size_bytes_full_(HardwareIDsLength)
124
+ PWSTR HardwareIDs;
125
+
126
+ } VHF_CONFIG, *PVHF_CONFIG;
127
+
128
+ FORCEINLINE
129
+ VOID
130
+ VHF_CONFIG_INIT(
131
+ _Out_
132
+ PVHF_CONFIG Config,
133
+ #ifdef _KERNEL_MODE
134
+ _In_
135
+ PDEVICE_OBJECT DeviceObject,
136
+ #else
137
+ _In_
138
+ HANDLE FileHandle,
139
+ #endif
140
+ _In_
141
+ USHORT ReportDescriptorLength,
142
+ _In_reads_bytes_(ReportDescriptorLength)
143
+ PUCHAR ReportDescriptor
144
+ )
145
+ {
146
+ RtlZeroMemory(Config, sizeof(VHF_CONFIG));
147
+
148
+ Config->Size = sizeof(VHF_CONFIG);
149
+ Config->VhfClientContext = NULL;
150
+ Config->OperationContextSize = 0;
151
+
152
+ #ifdef _KERNEL_MODE
153
+ Config->DeviceObject = DeviceObject;
154
+ #else
155
+ Config->FileHandle = FileHandle;
156
+ #endif
157
+
158
+ Config->VendorID = 0;
159
+ Config->ProductID = 0;
160
+ Config->VersionNumber = 0;
161
+
162
+ Config->ReportDescriptorLength = ReportDescriptorLength;
163
+ Config->ReportDescriptor = ReportDescriptor;
164
+
165
+ Config->EvtVhfReadyForNextReadReport = NULL;
166
+ Config->EvtVhfCleanup = NULL;
167
+ Config->EvtVhfAsyncOperationGetFeature = NULL;
168
+ Config->EvtVhfAsyncOperationSetFeature = NULL;
169
+ Config->EvtVhfAsyncOperationWriteReport = NULL;
170
+ Config->EvtVhfAsyncOperationGetInputReport = NULL;
171
+ }
172
+
173
+ _IRQL_requires_(PASSIVE_LEVEL)
174
+ _Must_inspect_result_
175
+ NTSTATUS
176
+ VhfCreate(
177
+ _In_
178
+ PVHF_CONFIG VhfConfig,
179
+ _Out_
180
+ VHFHANDLE* VhfHandle
181
+ );
182
+
183
+ _IRQL_requires_max_(DISPATCH_LEVEL)
184
+ _Must_inspect_result_
185
+ NTSTATUS
186
+ VhfStart(
187
+ _In_
188
+ VHFHANDLE VhfHandle
189
+ );
190
+
191
+ _When_(Wait == __true, _IRQL_requires_(PASSIVE_LEVEL))
192
+ _When_(Wait == __false, _IRQL_requires_max_(DISPATCH_LEVEL))
193
+ VOID
194
+ VhfDelete(
195
+ _In_
196
+ VHFHANDLE VhfHandle,
197
+ _In_
198
+ BOOLEAN Wait
199
+ );
200
+
201
+ _IRQL_requires_max_(DISPATCH_LEVEL)
202
+ _Must_inspect_result_
203
+ NTSTATUS
204
+ VhfReadReportSubmit(
205
+ _In_
206
+ VHFHANDLE VhfHandle,
207
+ _In_
208
+ PHID_XFER_PACKET HidTransferPacket
209
+ );
210
+
211
+ _IRQL_requires_max_(DISPATCH_LEVEL)
212
+ NTSTATUS
213
+ VhfAsyncOperationComplete(
214
+ _In_
215
+ VHFOPERATIONHANDLE VhfOperationHandle,
216
+ _In_
217
+ NTSTATUS CompletionStatus
218
+ );
219
+
220
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
221
+
222
+ #ifdef __cplusplus
223
+ }
224
+ #endif
225
+
226
+ #endif // __VHF_H__
msvc/Windows Kits/10/Include/10.0.26100.0/shared/vmgenerationcounter.h ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All Rights Reserved.
4
+
5
+ Module Name:
6
+
7
+ vmgenerationcounter.h
8
+
9
+ Abstract:
10
+
11
+ This file implements the published interface for the virtual machine
12
+ generation counter.
13
+
14
+ --*/
15
+
16
+ #ifdef _MSC_VER
17
+ #pragma once
18
+ #endif
19
+
20
+ #pragma region Desktop Family
21
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
22
+
23
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
24
+
25
+ // {3ff2c92b-6598-4e60-8e1c-0ccf4927e319}
26
+ DEFINE_GUID(GUID_DEVINTERFACE_VM_GENCOUNTER,
27
+ 0x3ff2c92b, 0x6598, 0x4e60, 0x8e, 0x1c, 0x0c, 0xcf, 0x49, 0x27, 0xe3, 0x19);
28
+
29
+ #define VM_GENCOUNTER_SYMBOLIC_LINK_NAME L"\\VmGenerationCounter"
30
+
31
+ #define IOCTL_VMGENCOUNTER_READ CTL_CODE(FILE_DEVICE_ACPI, 0x1, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
32
+
33
+ typedef struct _VM_GENCOUNTER
34
+ {
35
+ ULONGLONG GenerationCount;
36
+ ULONGLONG GenerationCountHigh;
37
+ } VM_GENCOUNTER, *PVM_GENCOUNTER;
38
+
39
+ #endif // (NTDDI_VERSION >= NTDDI_WINXP)
40
+
41
+ #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
42
+ #pragma endregion
43
+
44
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/warning.h ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef _WARNING_H_
2
+ #define _WARNING_H_
3
+
4
+
5
+ #pragma warning(3:4092) // sizeof returns 'unsigned long'
6
+ #pragma warning(4:4096) // '__cdecl' must be used with '...'
7
+ #pragma warning(4:4121) // structure is sensitive to alignment
8
+ #pragma warning(3:4125) // decimal digit in octal sequence
9
+ #pragma warning(3:4130) // logical operation on address of string constant
10
+ #pragma warning(3:4132) // const object should be initialized
11
+ #if defined(_DBG_MEMCPY_INLINE_)
12
+ #pragma warning(disable:4163) // not available as an intrinsic function
13
+ #endif
14
+ #pragma warning(disable:4206) // Source File is empty
15
+ #pragma warning(4:4101) // Unreferenced local variable
16
+ #pragma warning(4:4208) // delete[exp] - exp evaluated but ignored
17
+ #pragma warning(3:4212) // function declaration used ellipsis
18
+ #pragma warning(3:4242) // convertion possible loss of data
19
+ #if defined(_M_IA64)
20
+ #pragma warning(disable:4714) // function marked as __forceinline not inlined
21
+ // (VC7.1: inlining is not allowed in finally)
22
+ #endif
23
+ #pragma warning(4:4267) // convertion from size_t to smaller type
24
+ #pragma warning(disable:4312) // conversion to type of greater size
25
+ #pragma warning(4:4313) // Mismatched types / format string specifiers
26
+ #pragma warning(disable:4324) // structure padded due to __declspec(align())
27
+ #pragma warning(error:4700) // Local used w/o being initialized
28
+ #pragma warning(error:4703) // Local pointer potentially used used w/o being initialized
29
+ #pragma warning(error:4754) // Bad integer overflow checks warning (ineffective check)
30
+ #pragma warning(error:4013) // function' undefined - assuming extern returning int
31
+ #pragma warning(error:4551) // Function call missing argument list
32
+ #pragma warning(error:4806) // unsafe operation involving type 'bool'
33
+ #pragma warning(disable:4826) // pointer sign extension
34
+ #pragma warning(4:4509) // use of SEH with destructor
35
+ #pragma warning(4:4177) // pragma data_seg s/b at global scope
36
+ #pragma warning(disable:4274) // #ident ignored
37
+ #pragma warning(disable:4786) // identifier was truncated to 255 chararcers in debug information.
38
+ #pragma warning(disable:4503) // decorated name length exceeded, name was truncated.
39
+ #pragma warning(disable:4263) // Derived override doesn't match base - who cares...
40
+ #pragma warning(disable:4264) // base function is hidden - again who cares.
41
+ #pragma warning(disable:4710) // Function marked as inline - wasn't
42
+ #pragma warning(disable:4917) // A GUID can only be associated with a class, interface or namespace
43
+ #pragma warning(error:4552) // <<, >> ops used to no effect (probably missing an = sign)
44
+ #pragma warning(error:4553) // == op used w/o effect (probably s/b an = sign)
45
+ #pragma warning(3:4288) // nonstandard extension used (loop counter)
46
+ #pragma warning(3:4532) // jump out of __finally block
47
+ #pragma warning(error:4296) // expression is always true/false
48
+ #pragma warning(3:4546) // function call before comma missing argument list
49
+ // disable until __noop(arg,arg,arg) doesn't generate false hits.
50
+ // #pragma warning(3:4547) // '<' : operator before comma has no effect; expected operator with side-effect
51
+ // #pragma warning(3:4548) // expression before comma has no effect; expected expression with side-effect
52
+
53
+ #pragma warning(disable:4306) // conversion from smaller to greater size
54
+
55
+ #if _MSC_VER > 1300
56
+ #pragma warning(disable:4356) // static member cannot be initialized via derived class
57
+ #endif
58
+
59
+ // Ignoring these warnings can cause blatantly incorrect code generation.
60
+ // Since not all projects are -W4 -WX, treat as errors explicitly
61
+ #pragma warning(error:4028) // C4028: formal parameter different from declaration
62
+ #pragma warning(error:4029) // C4029: declared formal parameter list different from definition
63
+
64
+ #if 0
65
+ #pragma warning(3:4100) // Unreferenced formal parameter
66
+ #pragma warning(3:4701) // local may be used w/o init
67
+ // VSTS: 14791840: Disabling C4702 due to unmanageable number of instances
68
+ // that are triggered when certain inlining occurs, which can vary based on the build flavors.
69
+ // #pragma warning(3:4702) // Unreachable code
70
+ #pragma warning(3:4706) // assignment w/i conditional expression
71
+ #pragma warning(3:4709) // command operator w/o index expression
72
+ #endif
73
+
74
+ #if !defined(__cplusplus) && !defined(DONT_REDEFINE_TRYEXCEPT_IN_WARNING_H)
75
+ // DONT_REDEFINE_TRYEXCEPT_IN_WARNING_H allows C files to opt-out of getting these symbols redefined so that they can be used as regular C identifiers for variables
76
+ #undef try
77
+ #undef except
78
+ #undef finally
79
+ #undef leave
80
+ #define try __try
81
+ #define except __except
82
+ #define finally __finally
83
+ #define leave __leave
84
+ #endif
85
+
86
+ #pragma warning(disable: 4068) // turn off unknown pragma warning so prefast pragmas won't show
87
+ // show up in build.wrn/build.err
88
+
89
+ // Macros for suppressing PREfast warnings
90
+ #include <suppress.h>
91
+
92
+
93
+ #if _MSC_FULL_VER >= 140040702
94
+ #pragma warning(disable:4430) // default-int warning (C++)
95
+ #pragma warning(disable:4431) // default-int warning (C)
96
+ #pragma warning(disable:4812) // obsolete template destructor syntax
97
+ #endif
98
+
99
+
100
+ #if defined(_M_IA64) && _MSC_VER > 1310
101
+ #define __TYPENAME typename
102
+ #elif defined(_M_IX86) && _MSC_FULL_VER >= 13102154
103
+ #define __TYPENAME typename
104
+ #elif defined(_M_AMD64) && _MSC_VER >= 1400
105
+ #define __TYPENAME typename
106
+ #elif defined(_M_ARM) || defined(_M_ARM64)
107
+ #define __TYPENAME typename
108
+ #else
109
+ #define __TYPENAME
110
+ #endif
111
+
112
+ #if _MSC_VER > 1400
113
+ #if !defined(DONT_DISABLE_PCH_WARNINGS_IN_WARNING_H)
114
+ #pragma warning(disable:4603) // macro is not defined or definition is different after precompiled header use
115
+ #pragma warning(disable:4627) // skipped when looking for precompiled header use
116
+ #endif
117
+ #endif
118
+
119
+ #ifdef _PREFAST_
120
+ #pragma warning(disable:4091) // (If prefast only): annotations followed by ; are ignored (actual text is not that clear).
121
+ #endif
122
+
123
+ #endif // _WARNING_H_
124
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/wdmguid.h ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ wdmguid.h
8
+
9
+ Abstract:
10
+
11
+ Defines GUIDs for function device classes and device events used in
12
+ Plug & Play.
13
+
14
+ Revision History:
15
+
16
+ --*/
17
+ #include <winapifamily.h>
18
+
19
+ #pragma region Desktop Family
20
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
21
+
22
+
23
+ #ifndef FAR
24
+ #define FAR
25
+ #endif
26
+
27
+ //
28
+ // Device events that can be broadcasted to drivers and user-mode apps.
29
+ //
30
+
31
+ #if (NTDDI_VERSION >= NTDDI_WIN2K)
32
+ // {cb3a4001-46f0-11d0-b08f-00609713053f}
33
+ DEFINE_GUID( GUID_HWPROFILE_QUERY_CHANGE, 0xcb3a4001L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
34
+ // {cb3a4002-46f0-11d0-b08f-00609713053f}
35
+ DEFINE_GUID( GUID_HWPROFILE_CHANGE_CANCELLED, 0xcb3a4002L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
36
+ // {cb3a4003-46f0-11d0-b08f-00609713053f}
37
+ DEFINE_GUID( GUID_HWPROFILE_CHANGE_COMPLETE, 0xcb3a4003L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
38
+ // {cb3a4004-46f0-11d0-b08f-00609713053f}
39
+ DEFINE_GUID( GUID_DEVICE_INTERFACE_ARRIVAL, 0xcb3a4004L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
40
+ // {cb3a4005-46f0-11d0-b08f-00609713053f}
41
+ DEFINE_GUID( GUID_DEVICE_INTERFACE_REMOVAL, 0xcb3a4005L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
42
+ // {cb3a4006-46f0-11d0-b08f-00609713053f}
43
+ DEFINE_GUID( GUID_TARGET_DEVICE_QUERY_REMOVE, 0xcb3a4006L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
44
+ // {cb3a4007-46f0-11d0-b08f-00609713053f}
45
+ DEFINE_GUID( GUID_TARGET_DEVICE_REMOVE_CANCELLED, 0xcb3a4007L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
46
+ // {cb3a4008-46f0-11d0-b08f-00609713053f}
47
+ DEFINE_GUID( GUID_TARGET_DEVICE_REMOVE_COMPLETE, 0xcb3a4008L, 0x46f0, 0x11d0, 0xb0, 0x8f, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3f );
48
+ // {aca73f8e-8d23-11d1-ac7d-0000f87571d0}
49
+ DEFINE_GUID( GUID_PNP_CUSTOM_NOTIFICATION, 0xACA73F8EL, 0x8D23, 0x11D1, 0xAC, 0x7D, 0x00, 0x00, 0xF8, 0x75, 0x71, 0xD0 );
50
+ // {c2cf0660-eb7a-11d1-bd7f-0000f87571d0}
51
+ DEFINE_GUID( GUID_PNP_POWER_NOTIFICATION, 0xC2CF0660L, 0xEB7A, 0x11D1, 0xBD, 0x7F, 0x00, 0x00, 0xF8, 0x75, 0x71, 0xD0 );
52
+ #endif
53
+
54
+ #if (NTDDI_VERSION >= NTDDI_VISTA)
55
+ // {29c69b3e-c79a-43bf-bbde-a932fa1bea7e}
56
+ DEFINE_GUID( GUID_PNP_POWER_SETTING_CHANGE, 0x29C69B3EL, 0xC79A, 0x43BF, 0xBB, 0xDE, 0xA9, 0x32, 0xFA, 0x1B, 0xEA, 0x7E );
57
+ #endif
58
+
59
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
60
+ // {fcf528f6-a82f-47b1-ad3a-8050594cad28}
61
+ DEFINE_GUID( GUID_TARGET_DEVICE_TRANSPORT_RELATIONS_CHANGED, 0xfcf528f6, 0xa82f, 0x47b1, 0xad, 0x3a, 0x80, 0x50, 0x59, 0x4c, 0xad, 0x28 );
62
+ #endif
63
+
64
+ #if (NTDDI_VERSION >= NTDDI_WIN10_19H1)
65
+ // {de373def-a85c-4f76-8cbf-f96bea8bd10f}
66
+ DEFINE_GUID( GUID_KERNEL_SOFT_RESTART_PREPARE, 0xde373def, 0xa85c, 0x4f76, 0x8c, 0xbf, 0xf9, 0x6b, 0xea, 0x8b, 0xd1, 0x0f );
67
+ // {31d737e7-8c0b-468a-956e-9f433ec358fb}
68
+ DEFINE_GUID( GUID_KERNEL_SOFT_RESTART_CANCEL, 0x31d737e7, 0x8c0b, 0x468a, 0x95, 0x6e, 0x9f, 0x43, 0x3e, 0xc3, 0x58, 0xfb );
69
+ // {90d889de-8704-44cf-8115-ed8528d2b2da}
70
+ DEFINE_GUID( GUID_RECOVERY_PCI_PREPARE_SHUTDOWN, 0x90d889de, 0x8704, 0x44cf, 0x81, 0x15, 0xed, 0x85, 0x28, 0xd2, 0xb2, 0xda );
71
+ // {4b9770ea-bde7-400b-a9b9-4f684f54cc2a}
72
+ DEFINE_GUID( GUID_RECOVERY_NVMED_PREPARE_SHUTDOWN, 0x4b9770ea, 0xbde7, 0x400b, 0xa9, 0xb9, 0x4f, 0x68, 0x4f, 0x54, 0xcc, 0x2a );
73
+ #endif
74
+
75
+ #if (NTDDI_VERSION >= NTDDI_WIN10_MN)
76
+ // {20e91abd-350a-4d4f-8577-99c81507473a}
77
+ DEFINE_GUID( GUID_KERNEL_SOFT_RESTART_FINALIZE, 0x20e91abd, 0x350a, 0x4d4f, 0x85, 0x77, 0x99, 0xc8, 0x15, 0x07, 0x47, 0x3a );
78
+ #endif
79
+
80
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
81
+ // {af855082-530b-4a85-b5a6-120b63089451}
82
+ DEFINE_GUID( GUID_KERNEL_SOFT_RESTART_PRE_COMPLETE, 0xaf855082, 0x530b, 0x4a85, 0xb5, 0xa6, 0x12, 0x0b, 0x63, 0x08, 0x94, 0x51 );
83
+ #endif
84
+
85
+ //
86
+ // Interface GUIDs used for IRP_MN_QUERY_INTERFACE
87
+ //
88
+
89
+ #if (NTDDI_VERSION >= NTDDI_WIN2K)
90
+ // {496b8280-6f25-11d0-beaf-08002be2092f}
91
+ DEFINE_GUID( GUID_BUS_INTERFACE_STANDARD, 0x496B8280L, 0x6F25, 0x11D0, 0xBE, 0xAF, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F );
92
+ // {496b8281-6f25-11d0-beaf-08002be2092f}
93
+ DEFINE_GUID( GUID_PCI_BUS_INTERFACE_STANDARD, 0x496B8281L, 0x6F25, 0x11D0, 0xBE, 0xAF, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F );
94
+ // {de94e966-fdff-4c9c-9998-6747b150e74c}
95
+ DEFINE_GUID( GUID_PCI_BUS_INTERFACE_STANDARD2, 0xde94e966L, 0xfdff, 0x4c9c, 0x99, 0x98, 0x67, 0x47, 0xb1, 0x50, 0xe7, 0x4c );
96
+ // {e644f185-8c0e-11d0-becf-08002be2092f}
97
+ DEFINE_GUID( GUID_ARBITER_INTERFACE_STANDARD, 0xe644f185L, 0x8c0e, 0x11d0, 0xbe, 0xcf, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f );
98
+ // {6c154a92-aacf-11d0-8d2a-00a0c906b244}
99
+ DEFINE_GUID( GUID_TRANSLATOR_INTERFACE_STANDARD, 0x6c154a92L, 0xaacf, 0x11d0, 0x8d, 0x2a, 0x00, 0xa0, 0xc9, 0x06, 0xb2, 0x44 );
100
+ // {b091a08a-ba97-11d0-bd14-00aa00b7b32a}
101
+ DEFINE_GUID( GUID_ACPI_INTERFACE_STANDARD, 0xb091a08aL, 0xba97, 0x11d0, 0xbd, 0x14, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a );
102
+ // {70941bf4-0073-11d1-a09e-00c04fc340b1}
103
+ DEFINE_GUID( GUID_INT_ROUTE_INTERFACE_STANDARD, 0x70941bf4L, 0x0073, 0x11d1, 0xa0, 0x9e, 0x00, 0xc0, 0x4f, 0xc3, 0x40, 0xb1 );
104
+ // {76173af0-c504-11d1-947f-00c04fb960ee}
105
+ DEFINE_GUID( GUID_PCMCIA_BUS_INTERFACE_STANDARD, 0x76173af0L, 0xc504, 0x11d1, 0x94, 0x7f, 0x00, 0xc0, 0x4f, 0xb9, 0x60, 0xee );
106
+ // {06141966-7245-6369-462e-4e656c736f6e}
107
+ DEFINE_GUID( GUID_ACPI_REGS_INTERFACE_STANDARD, 0x06141966L, 0x7245, 0x6369, 0x46, 0x2e, 0x4e, 0x65, 0x6c, 0x73, 0x6f, 0x6e );
108
+ // {50feb0de-596a-11d2-a5b8-0000f81a4619}
109
+ DEFINE_GUID( GUID_LEGACY_DEVICE_DETECTION_STANDARD, 0x50feb0deL, 0x596a, 0x11d2, 0xa5, 0xb8, 0x00, 0x00, 0xf8, 0x1a, 0x46, 0x19 );
110
+ // {d1b82c26-bf49-45ef-b216-71cbd7889b57}
111
+ DEFINE_GUID( GUID_PCI_DEVICE_PRESENT_INTERFACE, 0xd1b82c26L, 0xbf49, 0x45ef, 0xb2, 0x16, 0x71, 0xcb, 0xd7, 0x88, 0x9b, 0x57 );
112
+ // {aeb895f0-5586-11d1-8d84-00a0c906b244}
113
+ DEFINE_GUID( GUID_MF_ENUMERATION_INTERFACE, 0xaeb895f0L, 0x5586, 0x11d1, 0x8d, 0x84, 0x00, 0xa0, 0xc9, 0x06, 0xb2, 0x44 );
114
+ // {2aeb0243-6a6e-486b-82fc-d815f6b97006}
115
+ DEFINE_GUID( GUID_REENUMERATE_SELF_INTERFACE_STANDARD, 0x2aeb0243, 0x6a6e, 0x486b, 0x82, 0xfc, 0xd8, 0x15, 0xf6, 0xb9, 0x70, 0x06 );
116
+ #endif
117
+
118
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
119
+ // {b15cfce8-06d1-4d37-9d4c-bedde0c2a6ff}
120
+ DEFINE_GUID( GUID_AGP_TARGET_BUS_INTERFACE_STANDARD, 0xB15CFCE8L, 0x06D1, 0x4D37, 0x9D, 0x4C, 0xBE, 0xDD, 0xE0, 0xC2, 0xA6, 0xFF );
121
+ // {3a8d0384-6505-40ca-bc39-56c15f8c5fed}
122
+ DEFINE_GUID( GUID_ACPI_CMOS_INTERFACE_STANDARD, 0x3a8d0384L, 0x6505, 0x40ca, 0xbc, 0x39, 0x56, 0xc1, 0x5f, 0x8c, 0x5f, 0xed );
123
+ // {f14f609b-cbbd-4957-a674-bc00213f1c97}
124
+ DEFINE_GUID( GUID_ACPI_PORT_RANGES_INTERFACE_STANDARD, 0xf14f609bL, 0xcbbd, 0x4957, 0xa6, 0x74, 0xbc, 0x0, 0x21, 0x3f, 0x1c, 0x97 );
125
+ #endif
126
+
127
+ #if (NTDDI_VERSION >= NTDDI_VISTA)
128
+ // {e8695f63-1831-4870-a8cf-9c2f03f9dcb5}
129
+ DEFINE_GUID( GUID_ACPI_INTERFACE_STANDARD2, 0xe8695f63L, 0x1831, 0x4870, 0xa8, 0xcf, 0x9c, 0x2f, 0x03, 0xf9, 0xdc, 0xb5 );
130
+ // {70211b0e-0afb-47db-afc1-410bf842497a}
131
+ DEFINE_GUID( GUID_PNP_LOCATION_INTERFACE, 0x70211b0e, 0x0afb, 0x47db, 0xaf, 0xc1, 0x41, 0x0b, 0xf8, 0x42, 0x49, 0x7a );
132
+ // {146cd41c-dae3-4437-8aff-2af3f038099b}
133
+ DEFINE_GUID( GUID_PCI_EXPRESS_LINK_QUIESCENT_INTERFACE, 0x146cd41cL, 0xdae3, 0x4437, 0x8a, 0xff, 0x2a, 0xf3, 0xf0, 0x38, 0x09, 0x9b );
134
+ // {83a7734a-84c7-4161-9a98-6000ed0c4a33}
135
+ DEFINE_GUID( GUID_PCI_EXPRESS_ROOT_PORT_INTERFACE, 0x83a7734aL, 0x84c7, 0x4161, 0x9a, 0x98, 0x60, 0x00, 0xed, 0x0c, 0x4a, 0x33 );
136
+ // {1a6a460b-194f-455d-b34b-b84c5b05712b}
137
+ DEFINE_GUID( GUID_MSIX_TABLE_CONFIG_INTERFACE, 0x1a6a460b, 0x194f, 0x455d, 0xb3, 0x4b, 0xb8, 0x4c, 0x5b, 0x05, 0x71, 0x2b );
138
+ // {b38290e5-3cd0-4f9d-9937-f5fe2b44d47a}
139
+ DEFINE_GUID( GUID_D3COLD_SUPPORT_INTERFACE, 0xb38290e5, 0x3cd0, 0x4f9d, 0x99, 0x37, 0xf5, 0xfe, 0x2b, 0x44, 0xd4, 0x7a );
140
+ #endif
141
+
142
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
143
+ // {37b17e9a-c21c-4296-972d-11c4b32b28f0}
144
+ DEFINE_GUID( GUID_PROCESSOR_PCC_INTERFACE_STANDARD, 0x37b17e9a, 0xc21c, 0x4296, 0x97, 0x2d, 0x11, 0xc4, 0xb3, 0x2b, 0x28, 0xf0);
145
+ // {64897b47-3a4a-4d75-bc74-89dd6c078293}
146
+ DEFINE_GUID( GUID_PCI_VIRTUALIZATION_INTERFACE, 0x64897b47, 0x3a4a, 0x4d75, 0xbc, 0x74, 0x89, 0xdd, 0x6c, 0x7, 0x82, 0x93);
147
+ #endif
148
+
149
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
150
+ // {3ee8ba63-0f59-4a24-8a45-35808bdd1249}
151
+ DEFINE_GUID( GUID_PCC_INTERFACE_STANDARD, 0x3ee8ba63, 0x0f59, 0x4a24, 0x8a, 0x45, 0x35, 0x80, 0x8b, 0xdd, 0x12, 0x49);
152
+ // {7cce62ce-c189-4814-a6a7-12112089e938}
153
+ DEFINE_GUID( GUID_PCC_INTERFACE_INTERNAL, 0x7cce62ce, 0xc189, 0x4814, 0xa6, 0xa7, 0x12, 0x11, 0x20, 0x89, 0xe9, 0x38);
154
+ // {ecbe47a8-c498-4bb9-bd70-e867e0940d22}
155
+ DEFINE_GUID( GUID_THERMAL_COOLING_INTERFACE, 0xecbe47a8L, 0xc498, 0x4bb9, 0xbd, 0x70, 0xe8, 0x67, 0xe0, 0x94, 0x0d, 0x22 );
156
+ // {67593984-7cc0-4760-8d01-cbffd2d080f7}
157
+ DEFINE_GUID( GUID_PCI_LINK_CONFIG_INTERFACE, 0x67593984, 0x7cc0, 0x4760, 0x8d, 0x01, 0xcb, 0xff, 0xd2, 0xd0, 0x80, 0xf7 );
158
+ #endif
159
+
160
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GA)
161
+ DEFINE_GUID( GUID_POWER_LIMIT_INTERFACE, 0x3b96f4f2, 0xce49, 0x44d1, 0x91, 0xf8, 0x65, 0x2b, 0x81, 0x21, 0xe9, 0x3a);
162
+ #endif
163
+
164
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
165
+ // {b520f7fa-8a5a-4e40-a3f6-6be1e162d935}
166
+ DEFINE_GUID( GUID_DMA_CACHE_COHERENCY_INTERFACE, 0xb520f7fa, 0x8a5a, 0x4e40, 0xa3, 0xf6, 0x6b, 0xe1, 0xe1, 0x62, 0xd9, 0x35 );
167
+ // {649fdf26-3bc0-4813-ad24-7e0c1eda3fa3}
168
+ DEFINE_GUID( GUID_DEVICE_RESET_INTERFACE_STANDARD, 0x649fdf26, 0x3bc0, 0x4813, 0xad, 0x24, 0x7e, 0xc, 0x1e, 0xda, 0x3f, 0xa3 );
169
+ // {1efee0b2-d278-4ae4-bddc-1b34dd648043}
170
+ DEFINE_GUID( GUID_IOMMU_BUS_INTERFACE, 0x1efee0b2, 0xd278, 0x4ae4, 0xbd, 0xdc, 0x1b, 0x34, 0xdd, 0x64, 0x80, 0x43 );
171
+ // {6e7f1451-199e-4acc-ba2d-762b4edf4674}
172
+ DEFINE_GUID( GUID_PCI_SECURITY_INTERFACE, 0x6e7f1451, 0x199e, 0x4acc, 0xba, 0x2d, 0x76, 0x2b, 0x4e, 0xdf, 0x46, 0x74);
173
+ #endif
174
+
175
+ #if (NTDDI_VERSION >= NTDDI_WIN10_TH2)
176
+ // {25944783-ce79-4232-815e-4a30014e8eb4}
177
+ DEFINE_GUID( GUID_SCM_BUS_INTERFACE, 0x25944783, 0xce79, 0x4232, 0x81, 0x5e, 0x4a, 0x30, 0x1, 0x4e, 0x8e, 0xb4);
178
+ #endif
179
+
180
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
181
+ // {370f67e1-4ff5-4a94-9a35-06c5d9cc30e2}
182
+ DEFINE_GUID( GUID_SECURE_DRIVER_INTERFACE, 0x370f67e1, 0x4ff5, 0x4a94, 0x9a, 0x35, 0x6, 0xc5, 0xd9, 0xcc, 0x30, 0xe2 );
183
+ // {49d67af8-916c-4ee8-9df1-889f17d21e91}
184
+ DEFINE_GUID( GUID_SDEV_IDENTIFIER_INTERFACE, 0x49d67af8, 0x916c, 0x4ee8, 0x9d, 0xf1, 0x88, 0x9f, 0x17, 0xd2, 0x1e, 0x91 );
185
+ // {8de064ff-b630-42e4-88ea-6f24c8641175}
186
+ DEFINE_GUID( GUID_SCM_BUS_NVD_INTERFACE, 0x8de064ff, 0xb630, 0x42e4, 0x88, 0xea, 0x6f, 0x24, 0xc8, 0x64, 0x11, 0x75 );
187
+ // {9b89307d-d76b-4f48-b186-54041ae92e8d}
188
+ DEFINE_GUID( GUID_SCM_BUS_LD_INTERFACE, 0x9b89307d, 0xd76b, 0x4f48, 0xb1, 0x86, 0x54, 0x4, 0x1a, 0xe9, 0x2e, 0x8d );
189
+ // {0079c21b-917e-405e-a9ce-0732b5bbcebd}
190
+ DEFINE_GUID( GUID_SCM_PHYSICAL_NVDIMM_INTERFACE, 0x79c21b, 0x917e, 0x405e, 0xa9, 0xce, 0x7, 0x32, 0xb5, 0xbb, 0xce, 0xbd );
191
+ // {b8e992ec-a797-4dc4-8846-84d041707446}
192
+ DEFINE_GUID( GUID_PNP_EXTENDED_ADDRESS_INTERFACE, 0xb8e992ec, 0xa797, 0x4dc4, 0x88, 0x46, 0x84, 0xd0, 0x41, 0x70, 0x74, 0x46);
193
+ #endif
194
+
195
+ // TODO_NTDDI_WIN10_RS4
196
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
197
+ // {0044d8aa-f664-4588-9ffc-2afeaf5950b9}
198
+ DEFINE_GUID( GUID_D3COLD_AUX_POWER_AND_TIMING_INTERFACE, 0x44d8aa, 0xf664, 0x4588, 0x9f, 0xfc, 0x2a, 0xfe, 0xaf, 0x59, 0x50, 0xb9 );
199
+ // {2df3f7a8-b9b3-4063-9215-b5d14a0b266e}
200
+ DEFINE_GUID( GUID_PCI_FPGA_CONTROL_INTERFACE, 0x2df3f7a8, 0xb9b3, 0x4063, 0x92, 0x15, 0xb5, 0xd1, 0x4a, 0x0b, 0x26, 0x6e );
201
+ // {348a5ebb-ba24-44b7-9916-285687735117}
202
+ DEFINE_GUID( GUID_PCI_PTM_CONTROL_INTERFACE, 0x348a5ebb, 0xba24, 0x44b7, 0x99, 0x16, 0x28, 0x56, 0x87, 0x73, 0x51, 0x17 );
203
+ #endif
204
+
205
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
206
+ // {27d0102d-bfb2-4164-81dd-dbb82f968b48}
207
+ DEFINE_GUID( GUID_BUS_RESOURCE_UPDATE_INTERFACE, 0x27d0102d, 0xbfb2, 0x4164, 0x81, 0xdd, 0xdb, 0xb8, 0x2f, 0x96, 0x8b, 0x48);
208
+ #endif
209
+
210
+ #if (NTDDI_VERSION >= NTDDI_WIN10_19H1)
211
+ // {4d95573d-b774-488a-b120-4f284a9eff51}
212
+ DEFINE_GUID( GUID_NPEM_CONTROL_INTERFACE, 0x4d95573d, 0xb774, 0x488a, 0xb1, 0x20, 0x4f, 0x28, 0x4a, 0x9e, 0xff, 0x51);
213
+ #endif
214
+
215
+ #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
216
+ // {010a7fe8-96f5-4943-bedf-95e651b93412}
217
+ DEFINE_GUID( GUID_PCI_ATS_INTERFACE, 0x10a7fe8, 0x96f5, 0x4943, 0xbe, 0xdf, 0x95, 0xe6, 0x51, 0xb9, 0x34, 0x12);
218
+ #endif
219
+
220
+ //
221
+ // Bus type GUIDs
222
+ //
223
+
224
+ #if (NTDDI_VERSION >= NTDDI_WIN2K)
225
+ // {1530ea73-086b-11d1-a09f-00c04fc340b1}
226
+ DEFINE_GUID( GUID_BUS_TYPE_INTERNAL, 0x1530ea73L, 0x086b, 0x11d1, 0xa0, 0x9f, 0x00, 0xc0, 0x4f, 0xc3, 0x40, 0xb1 );
227
+ // {09343630-af9f-11d0-92e9-0000f81e1b30}
228
+ DEFINE_GUID( GUID_BUS_TYPE_PCMCIA, 0x09343630L, 0xaf9f, 0x11d0, 0x92, 0xE9, 0x00, 0x00, 0xf8, 0x1e, 0x1b, 0x30 );
229
+ // {c8ebdfb0-b510-11d0-80e5-00a0c92542e3}
230
+ DEFINE_GUID( GUID_BUS_TYPE_PCI, 0xc8ebdfb0L, 0xb510, 0x11d0, 0x80, 0xe5, 0x00, 0xa0, 0xc9, 0x25, 0x42, 0xe3 );
231
+ // {e676f854-d87d-11d0-92b2-00a0c9055fc5}
232
+ DEFINE_GUID( GUID_BUS_TYPE_ISAPNP, 0xe676f854L, 0xd87d, 0x11d0, 0x92, 0xb2, 0x00, 0xa0, 0xc9, 0x05, 0x5f, 0xc5 );
233
+ // {ddc35509-f3fc-11d0-a537-0000f8753ed1}
234
+ DEFINE_GUID( GUID_BUS_TYPE_EISA, 0xddc35509L, 0xf3fc, 0x11d0, 0xa5, 0x37, 0x00, 0x00, 0xf8, 0x75, 0x3e, 0xd1 );
235
+ // {1c75997a-dc33-11d0-92b2-00a0c9055fc5}
236
+ DEFINE_GUID( GUID_BUS_TYPE_MCA, 0x1c75997aL, 0xdc33, 0x11d0, 0x92, 0xb2, 0x00, 0xa0, 0xc9, 0x05, 0x5f, 0xc5 );
237
+ // {77114a87-8944-11d1-bd90-00a0c906be2d}
238
+ DEFINE_GUID( GUID_BUS_TYPE_SERENUM, 0x77114a87L, 0x8944, 0x11d1, 0xbd, 0x90, 0x00, 0xa0, 0xc9, 0x06, 0xbe, 0x2d );
239
+ // {9d7debbc-c85d-11d1-9eb4-006008c3a19a}
240
+ DEFINE_GUID( GUID_BUS_TYPE_USB, 0x9d7debbcL, 0xc85d, 0x11d1, 0x9e, 0xb4, 0x00, 0x60, 0x08, 0xc3, 0xa1, 0x9a );
241
+ #endif
242
+
243
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
244
+ // {c4ca1000-2ddc-11d5-a17a-00c04f60524d}
245
+ DEFINE_GUID( GUID_BUS_TYPE_LPTENUM, 0xc4ca1000L, 0x2ddc, 0x11d5, 0xa1, 0x7a, 0x00, 0xc0, 0x4f, 0x60, 0x52, 0x4d );
246
+ // {441ee000-4342-11d5-a184-00c04f60524d}
247
+ DEFINE_GUID( GUID_BUS_TYPE_USBPRINT, 0x441ee000L, 0x4342, 0x11d5, 0xa1, 0x84, 0x00, 0xc0, 0x4f, 0x60, 0x52, 0x4d );
248
+ // {441ee001-4342-11d5-a184-00c04f60524d}
249
+ DEFINE_GUID( GUID_BUS_TYPE_DOT4PRT, 0x441ee001L, 0x4342, 0x11d5, 0xa1, 0x84, 0x00, 0xc0, 0x4f, 0x60, 0x52, 0x4d );
250
+ // {f74e73eb-9ac5-45eb-be4d-772cc71ddfb3}
251
+ DEFINE_GUID( GUID_BUS_TYPE_1394, 0xf74e73ebL, 0x9ac5, 0x45eb, 0xbe, 0x4d, 0x77, 0x2c, 0xc7, 0x1d, 0xdf, 0xb3 );
252
+ // {eeaf37d0-1963-47c4-aa48-72476db7cf49}
253
+ DEFINE_GUID( GUID_BUS_TYPE_HID, 0xeeaf37d0L, 0x1963, 0x47c4, 0xaa, 0x48, 0x72, 0x47, 0x6d, 0xb7, 0xcf, 0x49 );
254
+ // {c06ff265-ae09-48f0-812c-16753d7cba83}
255
+ DEFINE_GUID( GUID_BUS_TYPE_AVC, 0xc06ff265L, 0xae09, 0x48f0, 0x81, 0x2c, 0x16, 0x75, 0x3d, 0x7c, 0xba, 0x83 );
256
+ // {7ae17dc1-c944-44d6-881f-4c2e61053bc1}
257
+ DEFINE_GUID( GUID_BUS_TYPE_IRDA, 0x7ae17dc1L, 0xc944, 0x44d6, 0x88, 0x1f, 0x4c, 0x2e, 0x61, 0x05, 0x3b, 0xc1 );
258
+ // {e700cc04-4036-4e89-9579-89ebf45f00cd}
259
+ DEFINE_GUID( GUID_BUS_TYPE_SD, 0xe700cc04L, 0x4036, 0x4e89, 0x95, 0x79, 0x89, 0xeb, 0xf4, 0x5f, 0x00, 0xcd );
260
+ #endif
261
+
262
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
263
+ // {d7b46895-001a-4942-891f-a7d46610a843}
264
+ DEFINE_GUID( GUID_BUS_TYPE_ACPI, 0xd7b46895L, 0x001a, 0x4942, 0x89, 0x1f, 0xa7, 0xd4, 0x66, 0x10, 0xa8, 0x43 );
265
+ // {06d10322-7de0-4cef-8e25-197d0e7442e2}
266
+ DEFINE_GUID( GUID_BUS_TYPE_SW_DEVICE, 0x06d10322L, 0x7de0, 0x4cef, 0x8e, 0x25, 0x19, 0x7d, 0x0e, 0x74, 0x42, 0xe2 );
267
+ #endif
268
+
269
+ #if (NTDDI_VERSION >= NTDDI_WIN10_TH2)
270
+ // {375a5912-804c-45aa-bdc2-fdd25a1d9512}
271
+ DEFINE_GUID( GUID_BUS_TYPE_SCM, 0x375a5912L, 0x804c, 0x45aa, 0xbd, 0xc2, 0xfd, 0xd2, 0x5a, 0x1d, 0x95, 0x12 );
272
+ #endif
273
+
274
+ //
275
+ // Power management WMI guids for device control
276
+ //
277
+
278
+ #if (NTDDI_VERSION >= NTDDI_WIN2K)
279
+ // {827c0a6f-feb0-11d0-bd26-00aa00b7b32a}
280
+ DEFINE_GUID( GUID_POWER_DEVICE_ENABLE, 0x827c0a6fL, 0xfeb0, 0x11d0, 0xbd, 0x26, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a );
281
+ // {a45da735-feb0-11d0-bd26-00aa00b7b32a}
282
+ DEFINE_GUID( GUID_POWER_DEVICE_TIMEOUTS, 0xa45da735L, 0xfeb0, 0x11d0, 0xbd, 0x26, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a );
283
+ // {a9546a82-feb0-11d0-bd26-00aa00b7b32a}
284
+ DEFINE_GUID( GUID_POWER_DEVICE_WAKE_ENABLE, 0xa9546a82L, 0xfeb0, 0x11d0, 0xbd, 0x26, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a );
285
+ #endif
286
+
287
+ //
288
+ // User-Mode Driver Framework device events for detecting driver host crashes.
289
+ //
290
+
291
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
292
+ // {c43d25bd-9346-40ee-a2d2-d70c15f8b75b}
293
+ DEFINE_GUID( GUID_WUDF_DEVICE_HOST_PROBLEM, 0xc43d25bdL, 0x9346, 0x40ee, 0xa2, 0xd2, 0xd7, 0x0c, 0x15, 0xf8, 0xb7, 0x5b );
294
+ #endif
295
+
296
+ //
297
+ // Dynamic partitioning replace interface.
298
+ //
299
+
300
+ #if (NTDDI_VERSION >= NTDDI_VISTA)
301
+ // {52363f5b-d891-429b-8195-aec5fef6853c}
302
+ DEFINE_GUID(GUID_PARTITION_UNIT_INTERFACE_STANDARD, 0x52363f5bL, 0xd891, 0x429b, 0x81, 0x95, 0xae, 0xc5, 0xfe, 0xf6, 0x85, 0x3c);
303
+ #endif
304
+
305
+ #if (NTDDI_VERSION >= NTDDI_WINBLUE)
306
+ // {9cc6b8ff-32e2-4834-b1de-b32ef8880a4b}
307
+ DEFINE_GUID(GUID_QUERY_CRASHDUMP_FUNCTIONS, 0x9cc6b8ff, 0x32e2, 0x4834, 0xb1, 0xde, 0xb3, 0x2e, 0xf8, 0x88, 0x0a, 0x4b);
308
+ #endif
309
+
310
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
311
+ #pragma endregion
312
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winapifamily.h ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ winapifamily.h
8
+
9
+ Abstract:
10
+
11
+ Master include file for API family partitioning.
12
+
13
+ */
14
+
15
+ #ifndef _INC_WINAPIFAMILY
16
+ #define _INC_WINAPIFAMILY
17
+
18
+ #if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
19
+ #if _MSC_VER >= 1200
20
+ #pragma warning(push)
21
+ #pragma warning(disable:4001) /* nonstandard extension 'single line comment' was used */
22
+ #endif
23
+ #pragma once
24
+ #endif // defined(_MSC_VER) && !defined(MOFCOMP_PASS)
25
+
26
+ #include <winpackagefamily.h>
27
+
28
+ /*
29
+ * When compiling C and C++ code using SDK header files, the development
30
+ * environment can specify a target platform by #define-ing the
31
+ * pre-processor symbol WINAPI_FAMILY to one of the following values.
32
+ * Each FAMILY value denotes an application family for which a different
33
+ * subset of the total set of header-file-defined APIs are available.
34
+ * Setting the WINAPI_FAMILY value will effectively hide from the
35
+ * editing and compilation environments the existence of APIs that
36
+ * are not applicable to the family of applications targeting a
37
+ * specific platform.
38
+ */
39
+
40
+ /* In Windows 10, WINAPI_PARTITIONs will be used to add additional
41
+ * device specific APIs to a particular WINAPI_FAMILY.
42
+ * For example, when writing Windows Universal apps, specifying
43
+ * WINAPI_FAMILY_APP will hide phone APIs from compilation.
44
+ * However, specifying WINAPI_PARTITION_PHONE_APP=1 additionally, will
45
+ * unhide any API hidden behind the partition, to the compiler.
46
+
47
+ * The following partitions are currently defined:
48
+ * WINAPI_PARTITION_DESKTOP // usable for Desktop Win32 apps (but not store apps)
49
+ * WINAPI_PARTITION_APP // usable for Windows Universal store apps
50
+ * WINAPI_PARTITION_PC_APP // specific to Desktop-only store apps
51
+ * WINAPI_PARTITION_PHONE_APP // specific to Phone-only store apps
52
+ * WINAPI_PARTITION_SYSTEM // specific to System applications
53
+ * WINAPI_PARTITION_GAMES // specific to games and apps
54
+
55
+ * The following partitions are indirect partitions and defined in
56
+ * winpackagefamily.h. These partitions are related to package based
57
+ * partitions. For example, specifying WINAPI_PARTITION_SERVER=1 will light up
58
+ * any API hidden behind the package based partitions that are bound to
59
+ * WINAPI_PARTITION_SERVER, to the compiler.
60
+ * WINAPI_PARTITION_SERVER // specific to Server applications
61
+ */
62
+
63
+ /*
64
+ * The WINAPI_FAMILY values of 0 and 1 are reserved to ensure that
65
+ * an error will occur if WINAPI_FAMILY is set to any
66
+ * WINAPI_PARTITION value (which must be 0 or 1, see below).
67
+ */
68
+ #define WINAPI_FAMILY_PC_APP 2 /* Windows Store Applications */
69
+ #define WINAPI_FAMILY_PHONE_APP 3 /* Windows Phone Applications */
70
+ #define WINAPI_FAMILY_SYSTEM 4 /* Windows Drivers and Tools */
71
+ #define WINAPI_FAMILY_SERVER 5 /* Windows Server Applications */
72
+ #define WINAPI_FAMILY_GAMES 6 /* Windows Games and Applications */
73
+ #define WINAPI_FAMILY_DESKTOP_APP 100 /* Windows Desktop Applications */
74
+ /* The value of WINAPI_FAMILY_DESKTOP_APP may change in future SDKs. */
75
+ /* Additional WINAPI_FAMILY values may be defined in future SDKs. */
76
+
77
+ /*
78
+ * For compatibility with Windows 8 header files, the following
79
+ * synonym for WINAPI_FAMILY_PC_APP is temporarily #define'd.
80
+ * Use of this symbol should be considered deprecated.
81
+ */
82
+ #define WINAPI_FAMILY_APP WINAPI_FAMILY_PC_APP
83
+
84
+ /*
85
+ * If no WINAPI_FAMILY value is specified, then all APIs available to
86
+ * Windows desktop applications are exposed.
87
+ */
88
+ #ifndef WINAPI_FAMILY
89
+ #define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
90
+ #endif
91
+
92
+ /*
93
+ * API PARTITONs are part of an indirection mechanism for mapping between
94
+ * individual APIs and the FAMILYs to which they apply.
95
+ * Each PARTITION is a category or subset of named APIs. PARTITIONs
96
+ * are permitted to have overlapping membership -- some single API
97
+ * might be part of more than one PARTITION. PARTITIONS are each #define-ed
98
+ * to be either 1 or 0 or depending on the platform at which the app is targeted.
99
+ */
100
+
101
+ /*
102
+ * The mapping between families and partitions is summarized here.
103
+ * An X indicates that the given partition is active for the given
104
+ * platform/family.
105
+ *
106
+ * +---------------------------+
107
+ * | *Partition* |
108
+ * +---+---+---+---+---+---+---+
109
+ * | | | | | | | |
110
+ * | | | | | | | |
111
+ * | | | | P | | | |
112
+ * | | | | H | | | |
113
+ * | D | | | O | | | |
114
+ * | E | | P | N | S | S | |
115
+ * | S | | C | E | Y | E | G |
116
+ * | K | | _ | _ | S | R | A |
117
+ * | T | A | A | A | T | V | M |
118
+ * +-------------------------+----+ O | P | P | P | E | E | E |
119
+ * | *Platform/Family* \| P | P | P | P | M | R | S |
120
+ * +------------------------------+---+---+---+---+---+---+---+
121
+ * | WINAPI_FAMILY_DESKTOP_APP | X | X | X | | | | |
122
+ * +------------------------------+---+---+---+---+---+---+---+
123
+ * | WINAPI_FAMILY_PC_APP | | X | X | | | | |
124
+ * +------------------------------+---+---+---+---+---+---+---+
125
+ * | WINAPI_FAMILY_PHONE_APP | | X | | X | | | |
126
+ * +----------------------------- +---+---+---+---+---+---+---+
127
+ * | WINAPI_FAMILY_SYSTEM | | | | | X | | |
128
+ * +----------------------------- +---+---+---+---+---+---+---+
129
+ * | WINAPI_FAMILY_SERVER | | | | | X | X | |
130
+ * +------------------------------+---+---+---+---+---+---+---+
131
+ * | WINAPI_FAMILY_GAMES | | | | | | | X |
132
+ * +------------------------------+---+---+---+---+---+---+---+
133
+ *
134
+ * The table above is encoded in the following expressions,
135
+ * each of which evaluates to 1 or 0.
136
+ *
137
+ * Whenever a new family is added, all of these expressions
138
+ * need to be reconsidered.
139
+ */
140
+ #if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP && \
141
+ WINAPI_FAMILY != WINAPI_FAMILY_PC_APP && \
142
+ WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP && \
143
+ WINAPI_FAMILY != WINAPI_FAMILY_SYSTEM && \
144
+ WINAPI_FAMILY != WINAPI_FAMILY_GAMES && \
145
+ WINAPI_FAMILY != WINAPI_FAMILY_SERVER
146
+ #error Unknown WINAPI_FAMILY value. Was it defined in terms of a WINAPI_PARTITION_* value?
147
+ #endif
148
+
149
+ #ifndef WINAPI_PARTITION_DESKTOP
150
+ #define WINAPI_PARTITION_DESKTOP (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
151
+ #endif
152
+
153
+ #ifndef WINAPI_PARTITION_APP
154
+ #define WINAPI_PARTITION_APP \
155
+ (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \
156
+ WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || \
157
+ WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
158
+ #endif
159
+
160
+ #ifndef WINAPI_PARTITION_PC_APP
161
+ #define WINAPI_PARTITION_PC_APP \
162
+ (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \
163
+ WINAPI_FAMILY == WINAPI_FAMILY_PC_APP)
164
+ #endif
165
+
166
+ #ifndef WINAPI_PARTITION_PHONE_APP
167
+ #define WINAPI_PARTITION_PHONE_APP (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
168
+ #endif
169
+
170
+ #ifndef WINAPI_PARTITION_GAMES
171
+ #define WINAPI_PARTITION_GAMES \
172
+ (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || \
173
+ WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
174
+ #endif
175
+
176
+ /*
177
+ * SYSTEM is the only partition defined here.
178
+ * All other System based editions are defined as packages
179
+ * on top of the System partition.
180
+ * See winpackagefamily.h for packages level partitions
181
+ */
182
+ #ifndef WINAPI_PARTITION_SYSTEM
183
+ #define WINAPI_PARTITION_SYSTEM \
184
+ (WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM || \
185
+ WINAPI_FAMILY == WINAPI_FAMILY_SERVER)
186
+ #endif
187
+
188
+ /*
189
+ * For compatibility with Windows Phone 8 header files, the following
190
+ * synonym for WINAPI_PARTITION_PHONE_APP is temporarily #define'd.
191
+ * Use of this symbol should be regarded as deprecated.
192
+ */
193
+ #define WINAPI_PARTITION_PHONE WINAPI_PARTITION_PHONE_APP
194
+
195
+ /*
196
+ * Header files use the WINAPI_FAMILY_PARTITION macro to assign one or
197
+ * more declarations to some group of partitions. The macro chooses
198
+ * whether the preprocessor will emit or omit a sequence of declarations
199
+ * bracketed by an #if/#endif pair. All header file references to the
200
+ * WINAPI_PARTITION_* values should be in the form of occurrences of
201
+ * WINAPI_FAMILY_PARTITION(...).
202
+ *
203
+ * For example, the following usage of WINAPI_FAMILY_PARTITION identifies
204
+ * a sequence of declarations that are part of both the Windows Desktop
205
+ * Partition and the Windows-Phone-Specific Store Partition:
206
+ *
207
+ * #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PHONE_APP)
208
+ * ...
209
+ * #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PHONE_APP)
210
+ *
211
+ * The comment on the closing #endif allow tools as well as people to find the
212
+ * matching #ifdef properly.
213
+ *
214
+ * Usages of WINAPI_FAMILY_PARTITION may be combined, when the partitition definitions are
215
+ * related. In particular one might use declarations like
216
+ *
217
+ * #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
218
+ *
219
+ * or
220
+ *
221
+ * #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE_APP)
222
+ *
223
+ * Direct references to WINAPI_PARTITION_ values (eg #if !WINAPI_FAMILY_PARTITION_...)
224
+ * should not be used.
225
+ */
226
+ #define WINAPI_FAMILY_PARTITION(Partitions) (Partitions)
227
+
228
+ /*
229
+ * Macro used to #define or typedef a symbol used for selective deprecation
230
+ * of individual methods of a COM interfaces that are otherwise available
231
+ * for a given set of partitions.
232
+ */
233
+ #define _WINAPI_DEPRECATED_DECLARATION __declspec(deprecated("This API cannot be used in the context of the caller's application type."))
234
+
235
+ /*
236
+ * For compatibility with Windows 8 header files, the following
237
+ * symbol is temporarily conditionally #define'd. Additional symbols
238
+ * like this should be not defined in winapifamily.h, but rather should be
239
+ * introduced locally to the header files of the component that needs them.
240
+ */
241
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
242
+ # define APP_DEPRECATED_HRESULT HRESULT _WINAPI_DEPRECATED_DECLARATION
243
+ #endif // WINAPIFAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
244
+
245
+ #if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
246
+ #if _MSC_VER >= 1200
247
+ #pragma warning(pop)
248
+ #endif
249
+ #endif
250
+
251
+ #endif /* !_INC_WINAPIFAMILY */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winbio_err.h ADDED
@@ -0,0 +1,1023 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) 2007 Microsoft Corporation
4
+
5
+
6
+ Module Name:
7
+
8
+ winbio_err.h
9
+
10
+ Abstract:
11
+
12
+ Definitions of error codes used by
13
+ Windows Biometric Framework components.
14
+
15
+
16
+ Environment:
17
+
18
+ User or Kernel mode.
19
+
20
+ Revision History:
21
+
22
+ --*/
23
+
24
+ #ifndef _WINBIO_ERR_H_06269BBC_B52E_4d0d_9D35_D23BEA12DE5D_
25
+ #define _WINBIO_ERR_H_06269BBC_B52E_4d0d_9D35_D23BEA12DE5D_
26
+
27
+
28
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
29
+
30
+ //
31
+ // For now, WINBIO errors are piggy-backing on the Security
32
+ // facility code. That may change in a future revision.
33
+ //
34
+ //
35
+ // Error conditions -- values are in the range: 0x8001 - 0xFFFF
36
+ //
37
+ //
38
+ // Values are 32 bit values laid out as follows:
39
+ //
40
+ // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
41
+ // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
42
+ // +---+-+-+-----------------------+-------------------------------+
43
+ // |Sev|C|R| Facility | Code |
44
+ // +---+-+-+-----------------------+-------------------------------+
45
+ //
46
+ // where
47
+ //
48
+ // Sev - is the severity code
49
+ //
50
+ // 00 - Success
51
+ // 01 - Informational
52
+ // 10 - Warning
53
+ // 11 - Error
54
+ //
55
+ // C - is the Customer code flag
56
+ //
57
+ // R - is a reserved bit
58
+ //
59
+ // Facility - is the facility code
60
+ //
61
+ // Code - is the facility's status code
62
+ //
63
+ //
64
+ // Define the facility codes
65
+ //
66
+ #define FACILITY_WINBIO 0x9
67
+ #define FACILITY_NONE 0x0
68
+
69
+
70
+ //
71
+ // Define the severity codes
72
+ //
73
+
74
+
75
+ //
76
+ // MessageId: WINBIO_E_UNSUPPORTED_FACTOR
77
+ //
78
+ // MessageText:
79
+ //
80
+ // Windows Biometric Service doesn't support the specified biometric factor.
81
+ //
82
+ #define WINBIO_E_UNSUPPORTED_FACTOR ((HRESULT)0x80098001L)
83
+
84
+ //
85
+ // MessageId: WINBIO_E_INVALID_UNIT
86
+ //
87
+ // MessageText:
88
+ //
89
+ // The unit ID number doesn't correspond to a valid biometric device.
90
+ //
91
+ #define WINBIO_E_INVALID_UNIT ((HRESULT)0x80098002L)
92
+
93
+ //
94
+ // MessageId: WINBIO_E_UNKNOWN_ID
95
+ //
96
+ // MessageText:
97
+ //
98
+ // The biometric sample doesn't match any known identity.
99
+ //
100
+ #define WINBIO_E_UNKNOWN_ID ((HRESULT)0x80098003L)
101
+
102
+ //
103
+ // MessageId: WINBIO_E_CANCELED
104
+ //
105
+ // MessageText:
106
+ //
107
+ // The biometric operation was canceled before it could complete.
108
+ //
109
+ #define WINBIO_E_CANCELED ((HRESULT)0x80098004L)
110
+
111
+ //
112
+ // MessageId: WINBIO_E_NO_MATCH
113
+ //
114
+ // MessageText:
115
+ //
116
+ // The biometric sample doesn't match the specified identity or sub-factor.
117
+ //
118
+ #define WINBIO_E_NO_MATCH ((HRESULT)0x80098005L)
119
+
120
+ //
121
+ // MessageId: WINBIO_E_CAPTURE_ABORTED
122
+ //
123
+ // MessageText:
124
+ //
125
+ // A biometric sample could not be captured because the operation was aborted.
126
+ //
127
+ #define WINBIO_E_CAPTURE_ABORTED ((HRESULT)0x80098006L)
128
+
129
+ //
130
+ // MessageId: WINBIO_E_ENROLLMENT_IN_PROGRESS
131
+ //
132
+ // MessageText:
133
+ //
134
+ // An enrollment transaction could not be started because another enrollment is already in progress.
135
+ //
136
+ #define WINBIO_E_ENROLLMENT_IN_PROGRESS ((HRESULT)0x80098007L)
137
+
138
+ //
139
+ // MessageId: WINBIO_E_BAD_CAPTURE
140
+ //
141
+ // MessageText:
142
+ //
143
+ // The captured sample cannot be used for any further biometric operations.
144
+ //
145
+ #define WINBIO_E_BAD_CAPTURE ((HRESULT)0x80098008L)
146
+
147
+ //
148
+ // MessageId: WINBIO_E_INVALID_CONTROL_CODE
149
+ //
150
+ // MessageText:
151
+ //
152
+ // The biometric unit doesn't support the specified unit control code.
153
+ //
154
+ #define WINBIO_E_INVALID_CONTROL_CODE ((HRESULT)0x80098009L)
155
+
156
+ //
157
+ // WINBIO_E_FACTOR_NOT_PRESENT - 0x8009800A
158
+ // [OBSOLETE] - DO NOT USE
159
+ //
160
+
161
+ //
162
+ // MessageId: WINBIO_E_DATA_COLLECTION_IN_PROGRESS
163
+ //
164
+ // MessageText:
165
+ //
166
+ // The driver already has a pending data collection operation in progress.
167
+ //
168
+ #define WINBIO_E_DATA_COLLECTION_IN_PROGRESS ((HRESULT)0x8009800BL)
169
+
170
+ //
171
+ // MessageId: WINBIO_E_UNSUPPORTED_DATA_FORMAT
172
+ //
173
+ // MessageText:
174
+ //
175
+ // The biometric sensor driver does not support the requested data format.
176
+ //
177
+ #define WINBIO_E_UNSUPPORTED_DATA_FORMAT ((HRESULT)0x8009800CL)
178
+
179
+ //
180
+ // MessageId: WINBIO_E_UNSUPPORTED_DATA_TYPE
181
+ //
182
+ // MessageText:
183
+ //
184
+ // The biometric sensor driver does not support the requested data type.
185
+ //
186
+ #define WINBIO_E_UNSUPPORTED_DATA_TYPE ((HRESULT)0x8009800DL)
187
+
188
+ //
189
+ // MessageId: WINBIO_E_UNSUPPORTED_PURPOSE
190
+ //
191
+ // MessageText:
192
+ //
193
+ // The biometric sensor driver does not support the requested data purpose.
194
+ //
195
+ #define WINBIO_E_UNSUPPORTED_PURPOSE ((HRESULT)0x8009800EL)
196
+
197
+ //
198
+ // MessageId: WINBIO_E_INVALID_DEVICE_STATE
199
+ //
200
+ // MessageText:
201
+ //
202
+ // The biometric unit is not in the proper state to perform the specified operation.
203
+ //
204
+ #define WINBIO_E_INVALID_DEVICE_STATE ((HRESULT)0x8009800FL)
205
+
206
+ //
207
+ // MessageId: WINBIO_E_DEVICE_BUSY
208
+ //
209
+ // MessageText:
210
+ //
211
+ // The operation could not be performed because the sensor device was busy.
212
+ //
213
+ #define WINBIO_E_DEVICE_BUSY ((HRESULT)0x80098010L)
214
+
215
+ //
216
+ // MessageId: WINBIO_E_DATABASE_CANT_CREATE
217
+ //
218
+ // MessageText:
219
+ //
220
+ // The biometric unit's storage adapter was unable to create a new database.
221
+ //
222
+ #define WINBIO_E_DATABASE_CANT_CREATE ((HRESULT)0x80098011L)
223
+
224
+ //
225
+ // MessageId: WINBIO_E_DATABASE_CANT_OPEN
226
+ //
227
+ // MessageText:
228
+ //
229
+ // The biometric unit's storage adapter was unable to open an existing database.
230
+ //
231
+ #define WINBIO_E_DATABASE_CANT_OPEN ((HRESULT)0x80098012L)
232
+
233
+ //
234
+ // MessageId: WINBIO_E_DATABASE_CANT_CLOSE
235
+ //
236
+ // MessageText:
237
+ //
238
+ // The biometric unit's storage adapter was unable to close a database.
239
+ //
240
+ #define WINBIO_E_DATABASE_CANT_CLOSE ((HRESULT)0x80098013L)
241
+
242
+ //
243
+ // MessageId: WINBIO_E_DATABASE_CANT_ERASE
244
+ //
245
+ // MessageText:
246
+ //
247
+ // The biometric unit's storage adapter was unable to erase a database.
248
+ //
249
+ #define WINBIO_E_DATABASE_CANT_ERASE ((HRESULT)0x80098014L)
250
+
251
+ //
252
+ // MessageId: WINBIO_E_DATABASE_CANT_FIND
253
+ //
254
+ // MessageText:
255
+ //
256
+ // The biometric unit's storage adapter was unable to find a database.
257
+ //
258
+ #define WINBIO_E_DATABASE_CANT_FIND ((HRESULT)0x80098015L)
259
+
260
+ //
261
+ // MessageId: WINBIO_E_DATABASE_ALREADY_EXISTS
262
+ //
263
+ // MessageText:
264
+ //
265
+ // The biometric unit's storage adapter was unable to create a database because that database already exists.
266
+ //
267
+ #define WINBIO_E_DATABASE_ALREADY_EXISTS ((HRESULT)0x80098016L)
268
+
269
+ //
270
+ // WINBIO_E_DATABASE_INVALID_NAME - 0x80098017
271
+ // [OBSOLETE] - DO NOT USE
272
+ //
273
+
274
+ //
275
+ // MessageId: WINBIO_E_DATABASE_FULL
276
+ //
277
+ // MessageText:
278
+ //
279
+ // The biometric unit's storage adapter was unable to add a record to the database because the database is full.
280
+ //
281
+ #define WINBIO_E_DATABASE_FULL ((HRESULT)0x80098018L)
282
+
283
+ //
284
+ // MessageId: WINBIO_E_DATABASE_LOCKED
285
+ //
286
+ // MessageText:
287
+ //
288
+ // The database is locked and its contents are inaccessible.
289
+ //
290
+ #define WINBIO_E_DATABASE_LOCKED ((HRESULT)0x80098019L)
291
+
292
+ //
293
+ // MessageId: WINBIO_E_DATABASE_CORRUPTED
294
+ //
295
+ // MessageText:
296
+ //
297
+ // The contents of the database have become corrupted and are inaccessible.
298
+ //
299
+ #define WINBIO_E_DATABASE_CORRUPTED ((HRESULT)0x8009801AL)
300
+
301
+ //
302
+ // MessageId: WINBIO_E_DATABASE_NO_SUCH_RECORD
303
+ //
304
+ // MessageText:
305
+ //
306
+ // No records were deleted because the specified identity and sub-factor are not present in the database.
307
+ //
308
+ #define WINBIO_E_DATABASE_NO_SUCH_RECORD ((HRESULT)0x8009801BL)
309
+
310
+ //
311
+ // MessageId: WINBIO_E_DUPLICATE_ENROLLMENT
312
+ //
313
+ // MessageText:
314
+ //
315
+ // The specified identity and sub-factor are already enrolled in the database.
316
+ //
317
+ #define WINBIO_E_DUPLICATE_ENROLLMENT ((HRESULT)0x8009801CL)
318
+
319
+ //
320
+ // MessageId: WINBIO_E_DATABASE_READ_ERROR
321
+ //
322
+ // MessageText:
323
+ //
324
+ // An error occurred while trying to read from the database.
325
+ //
326
+ #define WINBIO_E_DATABASE_READ_ERROR ((HRESULT)0x8009801DL)
327
+
328
+ //
329
+ // MessageId: WINBIO_E_DATABASE_WRITE_ERROR
330
+ //
331
+ // MessageText:
332
+ //
333
+ // An error occurred while trying to write to the database.
334
+ //
335
+ #define WINBIO_E_DATABASE_WRITE_ERROR ((HRESULT)0x8009801EL)
336
+
337
+ //
338
+ // MessageId: WINBIO_E_DATABASE_NO_RESULTS
339
+ //
340
+ // MessageText:
341
+ //
342
+ // No records in the database matched the query.
343
+ //
344
+ #define WINBIO_E_DATABASE_NO_RESULTS ((HRESULT)0x8009801FL)
345
+
346
+ //
347
+ // MessageId: WINBIO_E_DATABASE_NO_MORE_RECORDS
348
+ //
349
+ // MessageText:
350
+ //
351
+ // All records from the most recent database query have been viewed.
352
+ //
353
+ #define WINBIO_E_DATABASE_NO_MORE_RECORDS ((HRESULT)0x80098020L)
354
+
355
+ //
356
+ // MessageId: WINBIO_E_DATABASE_EOF
357
+ //
358
+ // MessageText:
359
+ //
360
+ // A database operation unexpectedly encountered the end of the file.
361
+ //
362
+ #define WINBIO_E_DATABASE_EOF ((HRESULT)0x80098021L)
363
+
364
+ //
365
+ // MessageId: WINBIO_E_DATABASE_BAD_INDEX_VECTOR
366
+ //
367
+ // MessageText:
368
+ //
369
+ // A database operation failed due to a malformed index vector.
370
+ //
371
+ #define WINBIO_E_DATABASE_BAD_INDEX_VECTOR ((HRESULT)0x80098022L)
372
+
373
+ //
374
+ // WINBIO_E_INVALID_IDENTITY - 0x80098023
375
+ // [OBSOLETE] - DO NOT USE
376
+ //
377
+
378
+ //
379
+ // MessageId: WINBIO_E_INCORRECT_BSP
380
+ //
381
+ // MessageText:
382
+ //
383
+ // The biometric unit doesn't belong to the specified service provider.
384
+ //
385
+ #define WINBIO_E_INCORRECT_BSP ((HRESULT)0x80098024L)
386
+
387
+ //
388
+ // MessageId: WINBIO_E_INCORRECT_SENSOR_POOL
389
+ //
390
+ // MessageText:
391
+ //
392
+ // The biometric unit doesn't belong to the specified sensor pool.
393
+ //
394
+ #define WINBIO_E_INCORRECT_SENSOR_POOL ((HRESULT)0x80098025L)
395
+
396
+ //
397
+ // MessageId: WINBIO_E_NO_CAPTURE_DATA
398
+ //
399
+ // MessageText:
400
+ //
401
+ // The sensor adapter's capture buffer is empty.
402
+ //
403
+ #define WINBIO_E_NO_CAPTURE_DATA ((HRESULT)0x80098026L)
404
+
405
+ //
406
+ // MessageId: WINBIO_E_INVALID_SENSOR_MODE
407
+ //
408
+ // MessageText:
409
+ //
410
+ // The sensor adapter doesn't support the sensor mode specified in the configuration.
411
+ //
412
+ #define WINBIO_E_INVALID_SENSOR_MODE ((HRESULT)0x80098027L)
413
+
414
+ //
415
+ // MessageId: WINBIO_E_LOCK_VIOLATION
416
+ //
417
+ // MessageText:
418
+ //
419
+ // The requested operation cannot be performed due to a locking conflict.
420
+ //
421
+ #define WINBIO_E_LOCK_VIOLATION ((HRESULT)0x8009802AL)
422
+
423
+ //
424
+ // MessageId: WINBIO_E_DUPLICATE_TEMPLATE
425
+ //
426
+ // MessageText:
427
+ //
428
+ // The data in a biometric template matches another template already in the database.
429
+ //
430
+ #define WINBIO_E_DUPLICATE_TEMPLATE ((HRESULT)0x8009802BL)
431
+
432
+ //
433
+ // MessageId: WINBIO_E_INVALID_OPERATION
434
+ //
435
+ // MessageText:
436
+ //
437
+ // The requested operation is not valid for the current state of the session or biometric unit.
438
+ //
439
+ #define WINBIO_E_INVALID_OPERATION ((HRESULT)0x8009802CL)
440
+
441
+ //
442
+ // MessageId: WINBIO_E_SESSION_BUSY
443
+ //
444
+ // MessageText:
445
+ //
446
+ // The session cannot begin a new operation because another operation is already in progress.
447
+ //
448
+ #define WINBIO_E_SESSION_BUSY ((HRESULT)0x8009802DL)
449
+
450
+ //
451
+ // WINBIO_E_ASYNC_OPERATION_IN_PROGRESS - 0x8009802E
452
+ // [OBSOLETE] - DO NOT USE
453
+ //
454
+
455
+ //
456
+ // WINBIO_E_INVALID_ASYNC_OPERATION - 0x8009802F
457
+ // [OBSOLETE] - DO NOT USE
458
+ //
459
+
460
+ //
461
+ // MessageId: WINBIO_E_CRED_PROV_DISABLED
462
+ //
463
+ // MessageText:
464
+ //
465
+ // System policy settings have disabled the Windows biometric credential provider.
466
+ //
467
+ #define WINBIO_E_CRED_PROV_DISABLED ((HRESULT)0x80098030L)
468
+
469
+ //
470
+ // MessageId: WINBIO_E_CRED_PROV_NO_CREDENTIAL
471
+ //
472
+ // MessageText:
473
+ //
474
+ // The requested credential was not found.
475
+ //
476
+ #define WINBIO_E_CRED_PROV_NO_CREDENTIAL ((HRESULT)0x80098031L)
477
+
478
+ //
479
+ // MessageId: WINBIO_E_DISABLED
480
+ //
481
+ // MessageText:
482
+ //
483
+ // System policy settings have disabled the Windows biometric service.
484
+ //
485
+ #define WINBIO_E_DISABLED ((HRESULT)0x80098032L)
486
+
487
+ //
488
+ // MessageId: WINBIO_E_CONFIGURATION_FAILURE
489
+ //
490
+ // MessageText:
491
+ //
492
+ // The biometric unit could not be configured.
493
+ //
494
+ #define WINBIO_E_CONFIGURATION_FAILURE ((HRESULT)0x80098033L)
495
+
496
+ //
497
+ // MessageId: WINBIO_E_SENSOR_UNAVAILABLE
498
+ //
499
+ // MessageText:
500
+ //
501
+ // A private pool cannot be created because one or more biometric units are not available.
502
+ //
503
+ #define WINBIO_E_SENSOR_UNAVAILABLE ((HRESULT)0x80098034L)
504
+
505
+ //
506
+ // MessageId: WINBIO_E_SAS_ENABLED
507
+ //
508
+ // MessageText:
509
+ //
510
+ // A secure attention sequence (CTRL-ALT-DEL) is required for logon.
511
+ //
512
+ #define WINBIO_E_SAS_ENABLED ((HRESULT)0x80098035L)
513
+
514
+ //
515
+ // MessageId: WINBIO_E_DEVICE_FAILURE
516
+ //
517
+ // MessageText:
518
+ //
519
+ // A biometric sensor has failed.
520
+ //
521
+ #define WINBIO_E_DEVICE_FAILURE ((HRESULT)0x80098036L)
522
+
523
+ //
524
+ // MessageId: WINBIO_E_FAST_USER_SWITCH_DISABLED
525
+ //
526
+ // MessageText:
527
+ //
528
+ // Fast user switching is disabled.
529
+ //
530
+ #define WINBIO_E_FAST_USER_SWITCH_DISABLED ((HRESULT)0x80098037L)
531
+
532
+ //
533
+ // MessageId: WINBIO_E_NOT_ACTIVE_CONSOLE
534
+ //
535
+ // MessageText:
536
+ //
537
+ // The System sensor pool cannot be opened from Terminal Server client sessions.
538
+ //
539
+ #define WINBIO_E_NOT_ACTIVE_CONSOLE ((HRESULT)0x80098038L)
540
+
541
+ //
542
+ // MessageId: WINBIO_E_EVENT_MONITOR_ACTIVE
543
+ //
544
+ // MessageText:
545
+ //
546
+ // There is already an active event monitor associated with the specified session.
547
+ //
548
+ #define WINBIO_E_EVENT_MONITOR_ACTIVE ((HRESULT)0x80098039L)
549
+
550
+ //
551
+ // MessageId: WINBIO_E_INVALID_PROPERTY_TYPE
552
+ //
553
+ // MessageText:
554
+ //
555
+ // The value specified is not a valid property type.
556
+ //
557
+ #define WINBIO_E_INVALID_PROPERTY_TYPE ((HRESULT)0x8009803AL)
558
+
559
+ //
560
+ // MessageId: WINBIO_E_INVALID_PROPERTY_ID
561
+ //
562
+ // MessageText:
563
+ //
564
+ // The value specified is not a valid property ID.
565
+ //
566
+ #define WINBIO_E_INVALID_PROPERTY_ID ((HRESULT)0x8009803BL)
567
+
568
+ //
569
+ // MessageId: WINBIO_E_UNSUPPORTED_PROPERTY
570
+ //
571
+ // MessageText:
572
+ //
573
+ // The biometric unit doesn't support the specified property.
574
+ //
575
+ #define WINBIO_E_UNSUPPORTED_PROPERTY ((HRESULT)0x8009803CL)
576
+
577
+ //
578
+ // MessageId: WINBIO_E_ADAPTER_INTEGRITY_FAILURE
579
+ //
580
+ // MessageText:
581
+ //
582
+ // The adapter binary did not pass its integrity check.
583
+ //
584
+ #define WINBIO_E_ADAPTER_INTEGRITY_FAILURE ((HRESULT)0x8009803DL)
585
+
586
+ //
587
+ // MessageId: WINBIO_E_INCORRECT_SESSION_TYPE
588
+ //
589
+ // MessageText:
590
+ //
591
+ // This operation requires a different type of session handle.
592
+ //
593
+ #define WINBIO_E_INCORRECT_SESSION_TYPE ((HRESULT)0x8009803EL)
594
+
595
+ //
596
+ // MessageId: WINBIO_E_SESSION_HANDLE_CLOSED
597
+ //
598
+ // MessageText:
599
+ //
600
+ // This session handle has already been closed.
601
+ //
602
+ #define WINBIO_E_SESSION_HANDLE_CLOSED ((HRESULT)0x8009803FL)
603
+
604
+ //
605
+ // MessageId: WINBIO_E_DEADLOCK_DETECTED
606
+ //
607
+ // MessageText:
608
+ //
609
+ // The requested operation was aborted because it would have caused a deadlock.
610
+ //
611
+ #define WINBIO_E_DEADLOCK_DETECTED ((HRESULT)0x80098040L)
612
+
613
+ //
614
+ // MessageId: WINBIO_E_NO_PREBOOT_IDENTITY
615
+ //
616
+ // MessageText:
617
+ //
618
+ // There is no pre-boot logon identity available.
619
+ //
620
+ #define WINBIO_E_NO_PREBOOT_IDENTITY ((HRESULT)0x80098041L)
621
+
622
+ //
623
+ // MessageId: WINBIO_E_MAX_ERROR_COUNT_EXCEEDED
624
+ //
625
+ // MessageText:
626
+ //
627
+ // The operation was aborted because there were too many errors.
628
+ //
629
+ #define WINBIO_E_MAX_ERROR_COUNT_EXCEEDED ((HRESULT)0x80098042L)
630
+
631
+ //
632
+ // MessageId: WINBIO_E_AUTO_LOGON_DISABLED
633
+ //
634
+ // MessageText:
635
+ //
636
+ // System policy settings have disabled pre-boot auto-logon using biometrics.
637
+ //
638
+ #define WINBIO_E_AUTO_LOGON_DISABLED ((HRESULT)0x80098043L)
639
+
640
+
641
+ #endif // (NTDDI_VERSION >= NTDDI_WIN7)
642
+
643
+
644
+ #if (NTDDI_VERSION >= NTDDI_WIN9)
645
+
646
+
647
+ //
648
+ // MessageId: WINBIO_E_INVALID_TICKET
649
+ //
650
+ // MessageText:
651
+ //
652
+ // The specified ticket is either incorrect or has expired.
653
+ //
654
+ #define WINBIO_E_INVALID_TICKET ((HRESULT)0x80098044L)
655
+
656
+ //
657
+ // MessageId: WINBIO_E_TICKET_QUOTA_EXCEEDED
658
+ //
659
+ // MessageText:
660
+ //
661
+ // The calling process has too many outstanding tickets.
662
+ //
663
+ #define WINBIO_E_TICKET_QUOTA_EXCEEDED ((HRESULT)0x80098045L)
664
+
665
+ //
666
+ // MessageId: WINBIO_E_DATA_PROTECTION_FAILURE
667
+ //
668
+ // MessageText:
669
+ //
670
+ // The biometric service could not decrypt the data.
671
+ //
672
+ #define WINBIO_E_DATA_PROTECTION_FAILURE ((HRESULT)0x80098046L)
673
+
674
+ //
675
+ // MessageId: WINBIO_E_CRED_PROV_SECURITY_LOCKOUT
676
+ //
677
+ // MessageText:
678
+ //
679
+ // Biometric authentication has been disabled because of too many unregistered fingerpint scans.
680
+ //
681
+ #define WINBIO_E_CRED_PROV_SECURITY_LOCKOUT ((HRESULT)0x80098047L)
682
+
683
+ //
684
+ // MessageId: WINBIO_E_UNSUPPORTED_POOL_TYPE
685
+ //
686
+ // MessageText:
687
+ //
688
+ // The requested pool type is not supported by this biometric factor.
689
+ //
690
+ #define WINBIO_E_UNSUPPORTED_POOL_TYPE ((HRESULT)0x80098048L)
691
+
692
+ //
693
+ // MessageId: WINBIO_E_SELECTION_REQUIRED
694
+ //
695
+ // MessageText:
696
+ //
697
+ // A specific individual must be selected in order to perform an enrollment.
698
+ //
699
+ #define WINBIO_E_SELECTION_REQUIRED ((HRESULT)0x80098049L)
700
+
701
+ //
702
+ // MessageId: WINBIO_E_PRESENCE_MONITOR_ACTIVE
703
+ //
704
+ // MessageText:
705
+ //
706
+ // A presence monitor is already active on that session.
707
+ //
708
+ #define WINBIO_E_PRESENCE_MONITOR_ACTIVE ((HRESULT)0x8009804AL)
709
+
710
+ //
711
+ // MessageId: WINBIO_E_INVALID_SUBFACTOR
712
+ //
713
+ // MessageText:
714
+ //
715
+ // The specified sub-factor value is out of range or is not supported.
716
+ //
717
+ #define WINBIO_E_INVALID_SUBFACTOR ((HRESULT)0x8009804BL)
718
+
719
+ //
720
+ // MessageId: WINBIO_E_INVALID_CALIBRATION_FORMAT_ARRAY
721
+ //
722
+ // MessageText:
723
+ //
724
+ // The sensor adapter returned an invalid calibration format array.
725
+ //
726
+ #define WINBIO_E_INVALID_CALIBRATION_FORMAT_ARRAY ((HRESULT)0x8009804CL)
727
+
728
+ //
729
+ // MessageId: WINBIO_E_NO_SUPPORTED_CALIBRATION_FORMAT
730
+ //
731
+ // MessageText:
732
+ //
733
+ // The sensor and engine adapter don't share a common calibration format.
734
+ //
735
+ #define WINBIO_E_NO_SUPPORTED_CALIBRATION_FORMAT ((HRESULT)0x8009804DL)
736
+
737
+ //
738
+ // MessageId: WINBIO_E_UNSUPPORTED_SENSOR_CALIBRATION_FORMAT
739
+ //
740
+ // MessageText:
741
+ //
742
+ // The sensor adapter does not support the requested calibration format.
743
+ //
744
+ #define WINBIO_E_UNSUPPORTED_SENSOR_CALIBRATION_FORMAT ((HRESULT)0x8009804EL)
745
+
746
+ //
747
+ // MessageId: WINBIO_E_CALIBRATION_BUFFER_TOO_SMALL
748
+ //
749
+ // MessageText:
750
+ //
751
+ // The requested calibration buffer size is too small.
752
+ //
753
+ #define WINBIO_E_CALIBRATION_BUFFER_TOO_SMALL ((HRESULT)0x8009804FL)
754
+
755
+ //
756
+ // MessageId: WINBIO_E_CALIBRATION_BUFFER_TOO_LARGE
757
+ //
758
+ // MessageText:
759
+ //
760
+ // The requested calibration buffer size is too large.
761
+ //
762
+ #define WINBIO_E_CALIBRATION_BUFFER_TOO_LARGE ((HRESULT)0x80098050L)
763
+
764
+ //
765
+ // MessageId: WINBIO_E_CALIBRATION_BUFFER_INVALID
766
+ //
767
+ // MessageText:
768
+ //
769
+ // The sensor adapter cannot process the contents of the calibration buffer.
770
+ //
771
+ #define WINBIO_E_CALIBRATION_BUFFER_INVALID ((HRESULT)0x80098051L)
772
+
773
+
774
+ #endif // (NTDDI_VERSION >= NTDDI_WIN9)
775
+
776
+
777
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
778
+
779
+ //
780
+ // MessageId: WINBIO_E_INVALID_KEY_IDENTIFIER
781
+ //
782
+ // MessageText:
783
+ //
784
+ // The key identifier is invalid.
785
+ //
786
+ #define WINBIO_E_INVALID_KEY_IDENTIFIER ((HRESULT)0x80098052L)
787
+
788
+ //
789
+ // MessageId: WINBIO_E_KEY_CREATION_FAILED
790
+ //
791
+ // MessageText:
792
+ //
793
+ // The key cannot be created.
794
+ //
795
+ #define WINBIO_E_KEY_CREATION_FAILED ((HRESULT)0x80098053L)
796
+
797
+ //
798
+ // MessageId: WINBIO_E_KEY_IDENTIFIER_BUFFER_TOO_SMALL
799
+ //
800
+ // MessageText:
801
+ //
802
+ // The key identifier buffer is too small.
803
+ //
804
+ #define WINBIO_E_KEY_IDENTIFIER_BUFFER_TOO_SMALL ((HRESULT)0x80098054L)
805
+
806
+ //
807
+ // MessageId: WINBIO_E_PROPERTY_UNAVAILABLE
808
+ //
809
+ // MessageText:
810
+ //
811
+ // The biometric unt is unable to provide data for this property at the present time.
812
+ //
813
+ #define WINBIO_E_PROPERTY_UNAVAILABLE ((HRESULT)0x80098055L)
814
+
815
+
816
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS1)
817
+
818
+
819
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
820
+
821
+ //
822
+ // MessageId: WINBIO_E_POLICY_PROTECTION_UNAVAILABLE
823
+ //
824
+ // MessageText:
825
+ //
826
+ // Policy protection is not available because a TPM 2.0 device is either not present or not supported.
827
+ //
828
+ #define WINBIO_E_POLICY_PROTECTION_UNAVAILABLE ((HRESULT)0x80098056L)
829
+
830
+ //
831
+ // MessageId: WINBIO_E_INSECURE_SENSOR
832
+ //
833
+ // MessageText:
834
+ //
835
+ // The biometric sensor does not support a secure hardware data path.
836
+ //
837
+ #define WINBIO_E_INSECURE_SENSOR ((HRESULT)0x80098057L)
838
+
839
+ //
840
+ // MessageId: WINBIO_E_INVALID_BUFFER_ID
841
+ //
842
+ // MessageText:
843
+ //
844
+ // The identifier does not refer to a valid buffer.
845
+ //
846
+ #define WINBIO_E_INVALID_BUFFER_ID ((HRESULT)0x80098058L)
847
+
848
+ //
849
+ // MessageId: WINBIO_E_INVALID_BUFFER
850
+ //
851
+ // MessageText:
852
+ //
853
+ // The contents of the buffer are not valid.
854
+ //
855
+ #define WINBIO_E_INVALID_BUFFER ((HRESULT)0x80098059L)
856
+
857
+ //
858
+ // MessageId: WINBIO_E_TRUSTLET_INTEGRITY_FAIL
859
+ //
860
+ // MessageText:
861
+ //
862
+ // The Windows Biometric Service secure component was compromised.
863
+ //
864
+ #define WINBIO_E_TRUSTLET_INTEGRITY_FAIL ((HRESULT)0x8009805AL)
865
+
866
+
867
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS2)
868
+
869
+
870
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
871
+
872
+ //
873
+ // MessageId: WINBIO_E_ENROLLMENT_CANCELED_BY_SUSPEND
874
+ //
875
+ // MessageText:
876
+ //
877
+ // The Windows Biometric Service canceled the enrollment because the platform entered a suspended state.
878
+ //
879
+ #define WINBIO_E_ENROLLMENT_CANCELED_BY_SUSPEND ((HRESULT)0x8009805BL)
880
+
881
+
882
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS2)
883
+
884
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
885
+
886
+
887
+ //
888
+ // Informational messages -- values are in the range: 0x0001 - 0x7FFF
889
+ //
890
+ //
891
+ // MessageId: WINBIO_I_MORE_DATA
892
+ //
893
+ // MessageText:
894
+ //
895
+ // Another sample is needed for the current enrollment template.
896
+ //
897
+ #define WINBIO_I_MORE_DATA ((HRESULT)0x00090001L)
898
+
899
+
900
+ #endif // (NTDDI_VERSION >= NTDDI_WIN7)
901
+
902
+
903
+ #if (NTDDI_VERSION >= NTDDI_WIN9)
904
+
905
+ //
906
+ // MessageId: WINBIO_I_EXTENDED_STATUS_INFORMATION
907
+ //
908
+ // MessageText:
909
+ //
910
+ // Return data includes multiple status values, which must be checked separately.
911
+ //
912
+ #define WINBIO_I_EXTENDED_STATUS_INFORMATION ((HRESULT)0x00090002L)
913
+
914
+
915
+ #endif // (NTDDI_VERSION >= NTDDI_WIN9)
916
+
917
+
918
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
919
+
920
+ //
921
+ // These messages match the Reject Detail errors
922
+ // returned by fingerprint readers. They provide
923
+ // extra information to help a user recover from
924
+ // a failed biometric operation.
925
+ //
926
+ #ifndef WINBIO_REJECT_DETAILS_DEFINED
927
+ #define WINBIO_REJECT_DETAILS_DEFINED
928
+ //
929
+ // MessageId: WINBIO_FP_TOO_HIGH
930
+ //
931
+ // MessageText:
932
+ //
933
+ // Position your finger lower on the fingerprint reader.
934
+ //
935
+ #define WINBIO_FP_TOO_HIGH ((WINBIO_REJECT_DETAIL)0x00000001L)
936
+
937
+ //
938
+ // MessageId: WINBIO_FP_TOO_LOW
939
+ //
940
+ // MessageText:
941
+ //
942
+ // Position your finger higher on the fingerprint reader.
943
+ //
944
+ #define WINBIO_FP_TOO_LOW ((WINBIO_REJECT_DETAIL)0x00000002L)
945
+
946
+ //
947
+ // MessageId: WINBIO_FP_TOO_LEFT
948
+ //
949
+ // MessageText:
950
+ //
951
+ // Position your finger more to the right on the fingerprint reader.
952
+ //
953
+ #define WINBIO_FP_TOO_LEFT ((WINBIO_REJECT_DETAIL)0x00000003L)
954
+
955
+ //
956
+ // MessageId: WINBIO_FP_TOO_RIGHT
957
+ //
958
+ // MessageText:
959
+ //
960
+ // Position your finger more to the left on the fingerprint reader.
961
+ //
962
+ #define WINBIO_FP_TOO_RIGHT ((WINBIO_REJECT_DETAIL)0x00000004L)
963
+
964
+ //
965
+ // MessageId: WINBIO_FP_TOO_FAST
966
+ //
967
+ // MessageText:
968
+ //
969
+ // Move your finger more slowly on the fingerprint reader.
970
+ //
971
+ #define WINBIO_FP_TOO_FAST ((WINBIO_REJECT_DETAIL)0x00000005L)
972
+
973
+ //
974
+ // MessageId: WINBIO_FP_TOO_SLOW
975
+ //
976
+ // MessageText:
977
+ //
978
+ // Move your finger more quickly on the fingerprint reader.
979
+ //
980
+ #define WINBIO_FP_TOO_SLOW ((WINBIO_REJECT_DETAIL)0x00000006L)
981
+
982
+ //
983
+ // MessageId: WINBIO_FP_POOR_QUALITY
984
+ //
985
+ // MessageText:
986
+ //
987
+ // The fingerprint reader could not capture a good sample. Check to be sure the sensor is clean.
988
+ //
989
+ #define WINBIO_FP_POOR_QUALITY ((WINBIO_REJECT_DETAIL)0x00000007L)
990
+
991
+ //
992
+ // MessageId: WINBIO_FP_TOO_SKEWED
993
+ //
994
+ // MessageText:
995
+ //
996
+ // Hold your finger flat and straight when you use the fingerprint reader.
997
+ //
998
+ #define WINBIO_FP_TOO_SKEWED ((WINBIO_REJECT_DETAIL)0x00000008L)
999
+
1000
+ //
1001
+ // MessageId: WINBIO_FP_TOO_SHORT
1002
+ //
1003
+ // MessageText:
1004
+ //
1005
+ // Use a longer stroke when scanning your fingerprint.
1006
+ //
1007
+ #define WINBIO_FP_TOO_SHORT ((WINBIO_REJECT_DETAIL)0x00000009L)
1008
+
1009
+ //
1010
+ // MessageId: WINBIO_FP_MERGE_FAILURE
1011
+ //
1012
+ // MessageText:
1013
+ //
1014
+ // The fingerprint reader could not capture a good sample. Check to be sure the sensor is clean.
1015
+ //
1016
+ #define WINBIO_FP_MERGE_FAILURE ((WINBIO_REJECT_DETAIL)0x0000000AL)
1017
+
1018
+ #endif // (ifndef WINBIO_REJECT_DETAILS_DEFINED)
1019
+
1020
+ #endif // (NTDDI_VERSION >= NTDDI_WIN7)
1021
+
1022
+ #endif // _WINBIO_ERR_H_06269BBC_B52E_4d0d_9D35_D23BEA12DE5D_
1023
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winbio_ioctl.h ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) 2007 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ winbio_ioctl.h
8
+
9
+ Abstract:
10
+ Biometric device class/port IOCTL codes. This file is required for all code
11
+ user mode and kernel mode, using Biometric IOCTL's, defines, data structures
12
+
13
+ Revision History:
14
+
15
+ --*/
16
+
17
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
18
+
19
+ #include "winbio_types.h"
20
+
21
+ #pragma once
22
+ #include <winapifamily.h>
23
+
24
+ #pragma region Desktop Family
25
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
26
+
27
+
28
+ #ifdef __cplusplus
29
+ extern "C" {
30
+ #endif
31
+
32
+ #ifndef FILE_DEVICE_BIOMETRIC
33
+ #define FILE_DEVICE_BIOMETRIC 0x00000044
34
+ #else
35
+ #if 0x00000044 != FILE_DEVICE_BIOMETRIC
36
+ #error "Incorrect Biometric Device Definition"
37
+ #endif
38
+ #endif
39
+
40
+ //
41
+ // {E2B5183A-99EA-4cc3-AD6B-80CA8D715B80}
42
+ //
43
+ DEFINE_GUID( GUID_DEVINTERFACE_BIOMETRIC_READER,
44
+ 0xe2b5183a, 0x99ea, 0x4cc3, 0xad, 0x6b, 0x80, 0xca, 0x8d, 0x71, 0x5b, 0x80);
45
+
46
+
47
+ //
48
+ ///////////////////////////////////////////////////////////////////////////////
49
+ //
50
+ // Biometric Device IOCTLs
51
+ //
52
+
53
+ #define BIO_CTL_CODE(code) CTL_CODE(FILE_DEVICE_BIOMETRIC, \
54
+ (code), \
55
+ METHOD_BUFFERED, \
56
+ FILE_ANY_ACCESS)
57
+
58
+ //
59
+ // Mandatory IOCTLs
60
+ //
61
+ #define IOCTL_BIOMETRIC_GET_ATTRIBUTES BIO_CTL_CODE(0x001)
62
+ #define IOCTL_BIOMETRIC_RESET BIO_CTL_CODE(0x002)
63
+ #define IOCTL_BIOMETRIC_CALIBRATE BIO_CTL_CODE(0x003)
64
+ #define IOCTL_BIOMETRIC_GET_SENSOR_STATUS BIO_CTL_CODE(0x004)
65
+ #define IOCTL_BIOMETRIC_CAPTURE_DATA BIO_CTL_CODE(0x005)
66
+
67
+ //
68
+ // Optional IOCTL for updating the firmware
69
+ //
70
+ #define IOCTL_BIOMETRIC_UPDATE_FIRMWARE BIO_CTL_CODE(0x006)
71
+
72
+ //
73
+ // Optional IOCTL for retrieving supported hash algorthims
74
+ // Capability: WINBIO_CAPABILITY_PROCESSING, WINBIO_CAPABILITY_ENCRYPTION
75
+ //
76
+ #define IOCTL_BIOMETRIC_GET_SUPPORTED_ALGORITHMS BIO_CTL_CODE(0x007)
77
+
78
+ //
79
+ // Optional IOCTLs to set indicator status
80
+ // Capability: WINBIO_CAPABILITY_INDICATOR
81
+ //
82
+ #define IOCTL_BIOMETRIC_GET_INDICATOR BIO_CTL_CODE(0x008)
83
+ #define IOCTL_BIOMETRIC_SET_INDICATOR BIO_CTL_CODE(0x009)
84
+
85
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
86
+
87
+ //
88
+ // Optional IOCTL to retrieve sensor-type information
89
+ // in a vendor-specific format
90
+ //
91
+ #define IOCTL_BIOMETRIC_GET_PRIVATE_SENSOR_TYPE BIO_CTL_CODE(0x00A)
92
+
93
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS3)
94
+
95
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
96
+
97
+ //
98
+ // Optional IOCTLs for support of the Secure Connection Protocol (SCP) V1
99
+ // Capability: WINBIO_CAPABILITY_SCP_V1
100
+ //
101
+ #define IOCTL_BIOMETRIC_CONNECT_SECURE BIO_CTL_CODE(0x00B)
102
+ #define IOCTL_BIOMETRIC_CAPTURE_ENCRYPTED_DATA BIO_CTL_CODE(0x00C)
103
+
104
+ //
105
+ // Optional IOCTL for wake-on-touch support.
106
+ // Capability: WINBIO_CAPABILITY_WAKE
107
+ // The WBDI driver must hold this IOCTL in non-power-managed IO queue.
108
+ // The Windows Biometric Framework will send this IOCTL on transition to a low
109
+ // power state. When the sensor wishes to wake the host, it should complete this
110
+ // IOCTL.
111
+ //
112
+ #define IOCTL_BIOMETRIC_NOTIFY_WAKE BIO_CTL_CODE(0x00D)
113
+
114
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS4)
115
+
116
+ //
117
+ // Vendor control codes are specified at 0x800:
118
+ //
119
+ //
120
+ #define IOCTL_BIOMETRIC_VENDOR CTL_CODE(FILE_DEVICE_BIOMETRIC, 0x800, 0, 0)
121
+
122
+
123
+ //
124
+ ///////////////////////////////////////////////////////////////////////////////
125
+ //
126
+ // IOCTL payload and type definitions
127
+ //
128
+
129
+ //
130
+ // WINBIO version
131
+ //
132
+
133
+ #define WINBIO_WBDI_MAJOR_VERSION 0x1
134
+ #define WINBIO_WBDI_MINOR_VERSION 0x0
135
+
136
+
137
+ //
138
+ // OUT payload for IOCTL_BIOMETRIC_GET_ATTRIBUTES
139
+ //
140
+ typedef struct _WINBIO_SENSOR_ATTRIBUTES {
141
+ DWORD PayloadSize;
142
+ HRESULT WinBioHresult;
143
+ WINBIO_VERSION WinBioVersion;
144
+ WINBIO_BIOMETRIC_TYPE SensorType;
145
+ WINBIO_BIOMETRIC_SENSOR_SUBTYPE SensorSubType;
146
+ WINBIO_CAPABILITIES Capabilities;
147
+ WINBIO_STRING ManufacturerName;
148
+ WINBIO_STRING ModelName;
149
+ WINBIO_STRING SerialNumber;
150
+ WINBIO_VERSION FirmwareVersion;
151
+ DWORD SupportedFormatEntries;
152
+ WINBIO_REGISTERED_FORMAT SupportedFormat[1]; // Defined as a length of 1 to avoid compiler warning.
153
+ } WINBIO_SENSOR_ATTRIBUTES, *PWINBIO_SENSOR_ATTRIBUTES;
154
+
155
+ //
156
+ // The WINBIO_DATA structure associates a length, in
157
+ // bytes, with an arbitrary block of contiguous memory.
158
+ //
159
+ typedef struct _WINBIO_DATA{
160
+ DWORD Size;
161
+ BYTE Data[1]; // Defined as a length of 1 to avoid compiler warning.
162
+ } WINBIO_DATA, *PWINBIO_DATA;
163
+
164
+
165
+ //
166
+ // IN payload for IOCTL_BIOMETRIC_UPDATE_FIRMWARE
167
+ //
168
+ typedef struct _WINBIO_UPDATE_FIRMWARE {
169
+ DWORD PayloadSize;
170
+ WINBIO_DATA FirmwareData;
171
+ } WINBIO_UPDATE_FIRMWARE, *PWINBIO_UPDATE_FIRMWARE;
172
+
173
+
174
+ //
175
+ // OUT payload for IOCTL_BIOMETRIC_CALIBRATE
176
+ //
177
+ typedef struct _WINBIO_CALIBRATION_INFO {
178
+ DWORD PayloadSize;
179
+ HRESULT WinBioHresult;
180
+ WINBIO_DATA CalibrationData;
181
+ } WINBIO_CALIBRATION_INFO, *PWINBIO_CALIBRATION_INFO;
182
+
183
+
184
+ //
185
+ // OUT payload for IOCTL_BIOMETRIC_GET_SENSOR_STATUS
186
+ //
187
+ typedef struct _WINBIO_DIAGNOSTICS {
188
+ DWORD PayloadSize;
189
+ HRESULT WinBioHresult;
190
+ WINBIO_SENSOR_STATUS SensorStatus;
191
+ WINBIO_DATA VendorDiagnostics;
192
+ } WINBIO_DIAGNOSTICS, *PWINBIO_DIAGNOSTICS;
193
+
194
+
195
+ //
196
+ // OUT payload for IOCTL_BIOMETRIC_RESET
197
+ // OUT payload for IOCTL_BIOMETRIC_UPDATE_FIRMWARE
198
+ //
199
+ typedef struct _WINBIO_BLANK_PAYLOAD {
200
+ DWORD PayloadSize;
201
+ HRESULT WinBioHresult;
202
+ } WINBIO_BLANK_PAYLOAD, *PWINBIO_BLANK_PAYLOAD;
203
+
204
+
205
+ //
206
+ // Parameters for a capture operation.
207
+ // IN payload for IOCTL_BIOMETRIC_CAPTURE_DATA
208
+ //
209
+
210
+ typedef struct _WINBIO_CAPTURE_PARAMETERS {
211
+ DWORD PayloadSize;
212
+ WINBIO_BIR_PURPOSE Purpose;
213
+ WINBIO_REGISTERED_FORMAT Format;
214
+ WINBIO_UUID VendorFormat;
215
+ WINBIO_BIR_DATA_FLAGS Flags;
216
+ } WINBIO_CAPTURE_PARAMETERS, *PWINBIO_CAPTURE_PARAMETERS;
217
+
218
+ //
219
+ // A container for biometric captured data.
220
+ // OUT payload for IOCTL_BIOMETRIC_CAPTURE_DATA
221
+ //
222
+ typedef struct _WINBIO_CAPTURE_DATA {
223
+ DWORD PayloadSize;
224
+ HRESULT WinBioHresult;
225
+ WINBIO_SENSOR_STATUS SensorStatus;
226
+ WINBIO_REJECT_DETAIL RejectDetail;
227
+ WINBIO_DATA CaptureData;
228
+ } WINBIO_CAPTURE_DATA, *PWINBIO_CAPTURE_DATA;
229
+
230
+
231
+ //
232
+ // OUT payload for IOCTL_BIOMETRIC_GET_SUPPORTED_ALGORITHMS
233
+ //
234
+ typedef struct _WINBIO_SUPPORTED_ALGORITHMS {
235
+ DWORD PayloadSize;
236
+ HRESULT WinBioHresult;
237
+ DWORD NumberOfAlgorithms;
238
+ WINBIO_DATA AlgorithmData;
239
+ } WINBIO_SUPPORTED_ALGORITHMS, *PWINBIO_SUPPORTED_ALGORITHMS;
240
+
241
+
242
+ //
243
+ // OUT payload for IOCTL_GET_INDICATOR
244
+ //
245
+ typedef struct _WINBIO_GET_INDICATOR {
246
+ DWORD PayloadSize;
247
+ HRESULT WinBioHresult;
248
+ WINBIO_INDICATOR_STATUS IndicatorStatus;
249
+ } WINBIO_GET_INDICATOR, *PWINBIO_GET_INDICATOR;
250
+
251
+
252
+ //
253
+ // IN payload for IOCTL_SET_INDICATOR
254
+ //
255
+ typedef struct _WINBIO_SET_INDICATOR {
256
+ DWORD PayloadSize;
257
+ WINBIO_INDICATOR_STATUS IndicatorStatus;
258
+ } WINBIO_SET_INDICATOR, *PWINBIO_SET_INDICATOR;
259
+
260
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
261
+
262
+ //
263
+ // OUT payload for IOCTL_BIOMETRIC_GET_PRIVATE_SENSOR_TYPE
264
+ //
265
+ typedef struct _WINBIO_PRIVATE_SENSOR_TYPE_INFO {
266
+ DWORD PayloadSize;
267
+ HRESULT WinBioHresult;
268
+ WINBIO_DATA PrivateSensorTypeInfo;
269
+ } WINBIO_PRIVATE_SENSOR_TYPE_INFO, *PWINBIO_PRIVATE_SENSOR_TYPE_INFO;
270
+
271
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS3)
272
+
273
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
274
+
275
+ //
276
+ // IN payload for IOCTL_BIOMETRIC_CONNECT_SECURE is a WINBIO_SECURE_CONNECTION_PARAMS structure
277
+ //
278
+
279
+ //
280
+ // OUT payload for IOCTL_BIOMETRIC_CONNECT_SECURE is a WINBIO_SECURE_CONNECTION_DATA structure
281
+ //
282
+
283
+ //
284
+ // IN payload for IOCTL_BIOMETRIC_CAPTURE_ENCRYPTED_DATA
285
+ //
286
+ typedef struct _WINBIO_ENCRYPTED_CAPTURE_PARAMS {
287
+ DWORD PayloadSize;
288
+ WINBIO_BIR_PURPOSE Purpose;
289
+ WINBIO_REGISTERED_FORMAT Format;
290
+ WINBIO_UUID VendorFormat;
291
+ WINBIO_BIR_DATA_FLAGS Flags;
292
+ DWORD NonceSize;
293
+ // Nonce[NonceSize]
294
+ } WINBIO_ENCRYPTED_CAPTURE_PARAMS, *PWINBIO_ENCRYPTED_CAPTURE_PARAMS;
295
+
296
+ //
297
+ // OUT payload for IOCTL_BIOMETRIC_CAPTURE_ENCRYPTED_DATA is a WINBIO_CAPTURE_DATA structure
298
+ //
299
+
300
+ //
301
+ // OUT payload for IOCTL_BIOMETRIC_NOTIFY_WAKE
302
+ //
303
+ typedef struct _WINBIO_NOTIFY_WAKE {
304
+ DWORD PayloadSize;
305
+ HRESULT WinBioHresult;
306
+ WINBIO_WAKE_REASON Reason;
307
+ } WINBIO_NOTIFY_WAKE, *PWINBIO_NOTIFY_WAKE;
308
+
309
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS4)
310
+
311
+ #ifdef __cplusplus
312
+ }
313
+ #endif
314
+
315
+
316
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
317
+ #pragma endregion
318
+
319
+ #endif // (NTDDI_VERSION >= NTDDI_WIN7)
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winbio_types.h ADDED
@@ -0,0 +1,2470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) 2007 Microsoft Corporation
4
+
5
+
6
+ Module Name:
7
+
8
+ winbio_types.h
9
+
10
+ Abstract:
11
+
12
+ Type definitions, constants, and structures used
13
+ by Windows Biometrics components.
14
+
15
+
16
+ Environment:
17
+
18
+ User or Kernel mode.
19
+
20
+ Revision History:
21
+
22
+ --*/
23
+
24
+ #ifndef _WINBIO_TYPES_H_712486DB_3EF5_41da_937A_55DCB7B66A53_
25
+ #define _WINBIO_TYPES_H_712486DB_3EF5_41da_937A_55DCB7B66A53_
26
+
27
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
28
+
29
+ #pragma warning( push )
30
+ #pragma warning( disable : 4324 ) // structure-padding message
31
+
32
+ #ifdef __cplusplus
33
+ extern "C"{
34
+ #endif
35
+
36
+ ///////////////////////////////////////////////////////////////////////////////
37
+ //
38
+ // Types used throughout WinBio
39
+ //
40
+ ///////////////////////////////////////////////////////////////////////////////
41
+
42
+ typedef ULONG WINBIO_UNIT_ID, *PWINBIO_UNIT_ID;
43
+ typedef ULONG WINBIO_SESSION_HANDLE, *PWINBIO_SESSION_HANDLE;
44
+ typedef WINBIO_SESSION_HANDLE WINBIO_FRAMEWORK_HANDLE, *PWINBIO_FRAMEWORK_HANDLE;
45
+
46
+ //
47
+ // A GUID
48
+ //
49
+ typedef GUID WINBIO_UUID, *PWINBIO_UUID;
50
+
51
+ //
52
+ // Represents a NULL-terminated Unicode character
53
+ // string inside a fixed-length buffer.
54
+ //
55
+ #define WINBIO_MAX_STRING_LEN 256
56
+ typedef WCHAR WINBIO_STRING[WINBIO_MAX_STRING_LEN];
57
+ typedef WINBIO_STRING *PWINBIO_STRING;
58
+
59
+ //
60
+ // Version
61
+ //
62
+ typedef struct _WINBIO_VERSION {
63
+ DWORD MajorVersion;
64
+ DWORD MinorVersion;
65
+ } WINBIO_VERSION, *PWINBIO_VERSION;
66
+
67
+ ///////////////////////////////////////////////////////////////////////////////
68
+ //
69
+ // Enumeration for template identity types...
70
+ //
71
+ typedef ULONG WINBIO_IDENTITY_TYPE, *PWINBIO_IDENTITY_TYPE;
72
+
73
+ #ifdef MIDL_PASS
74
+
75
+ const WINBIO_IDENTITY_TYPE WINBIO_ID_TYPE_NULL = (WINBIO_IDENTITY_TYPE)0; // The Identity structure is empty.
76
+ const WINBIO_IDENTITY_TYPE WINBIO_ID_TYPE_WILDCARD = (WINBIO_IDENTITY_TYPE)1; // The Identity matches "all identities".
77
+ const WINBIO_IDENTITY_TYPE WINBIO_ID_TYPE_GUID = (WINBIO_IDENTITY_TYPE)2; // A GUID identifies the template.
78
+ const WINBIO_IDENTITY_TYPE WINBIO_ID_TYPE_SID = (WINBIO_IDENTITY_TYPE)3; // An account SID identifies the template.
79
+ const WINBIO_IDENTITY_TYPE WINBIO_ID_TYPE_SECURE_ID = (WINBIO_IDENTITY_TYPE)4; // A secure ID identifies the template.
80
+
81
+ const ULONG SECURITY_MAX_SID_SIZE = (ULONG)68;
82
+ const ULONG WINBIO_IDENTITY_SECURE_ID_SIZE = (ULONG)32;
83
+
84
+ typedef union switch(WINBIO_IDENTITY_TYPE Type) _WINBIO_IDENTITY {
85
+ case WINBIO_ID_TYPE_NULL: ULONG Null;
86
+ case WINBIO_ID_TYPE_WILDCARD: ULONG Wildcard;
87
+ case WINBIO_ID_TYPE_GUID: GUID TemplateGuid;
88
+ case WINBIO_ID_TYPE_SID: struct {
89
+ ULONG Size;
90
+ UCHAR Data[SECURITY_MAX_SID_SIZE];
91
+ } AccountSid;
92
+ case WINBIO_ID_TYPE_SECURE_ID: UCHAR SecureId[WINBIO_IDENTITY_SECURE_ID_SIZE];
93
+ } WINBIO_IDENTITY;
94
+
95
+ #else // MIDL_PASS
96
+
97
+ #define WINBIO_ID_TYPE_NULL ((WINBIO_IDENTITY_TYPE)0) // The Identity structure is empty.
98
+ #define WINBIO_ID_TYPE_WILDCARD ((WINBIO_IDENTITY_TYPE)1) // The Identity matches "all identities"
99
+ #define WINBIO_ID_TYPE_GUID ((WINBIO_IDENTITY_TYPE)2) // A GUID identifies the template.
100
+ #define WINBIO_ID_TYPE_SID ((WINBIO_IDENTITY_TYPE)3) // An account SID identifies the template.
101
+ #define WINBIO_ID_TYPE_SECURE_ID ((WINBIO_IDENTITY_TYPE)4) // A secure ID identifies the template.
102
+
103
+ //
104
+ // Structure that contains the identity value associated
105
+ // with a biometric template.
106
+ //
107
+ //#ifndef SECURITY_MAX_SID_SIZE
108
+ //#define SECURITY_MAX_SID_SIZE 68
109
+ //#endif
110
+ #define WINBIO_IDENTITY_SECURE_ID_SIZE ((ULONG)32)
111
+ typedef struct _WINBIO_IDENTITY {
112
+ WINBIO_IDENTITY_TYPE Type;
113
+ union {
114
+ ULONG Null;
115
+ ULONG Wildcard;
116
+ GUID TemplateGuid;
117
+ struct {
118
+ ULONG Size;
119
+ UCHAR Data[SECURITY_MAX_SID_SIZE];
120
+ } AccountSid;
121
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
122
+ UCHAR SecureId[WINBIO_IDENTITY_SECURE_ID_SIZE];
123
+ #endif
124
+ } Value;
125
+ } WINBIO_IDENTITY;
126
+
127
+ #endif // MIDL_PASS
128
+
129
+ typedef WINBIO_IDENTITY *PWINBIO_IDENTITY;
130
+
131
+ #define WINBIO_IDENTITY_WILDCARD ((ULONG)0x25066282)
132
+
133
+
134
+ ///////////////////////////////////////////////////////////////////////////////
135
+ //
136
+ // Bitmask describing the supported set of biometric types (factors).
137
+ //
138
+ typedef ULONG32 WINBIO_BIOMETRIC_TYPE, *PWINBIO_BIOMETRIC_TYPE;
139
+
140
+ #ifdef MIDL_PASS
141
+
142
+ const WINBIO_BIOMETRIC_TYPE WINBIO_STANDARD_TYPE_MASK = (WINBIO_BIOMETRIC_TYPE)0x00FFFFFF;
143
+
144
+ const WINBIO_BIOMETRIC_TYPE WINBIO_NO_TYPE_AVAILABLE = (WINBIO_BIOMETRIC_TYPE)0x00000000;
145
+
146
+ //
147
+ // Standard biometric types (from NISTIR 6529-A)
148
+ //
149
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_MULTIPLE = (WINBIO_BIOMETRIC_TYPE)0x00000001;
150
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_FACIAL_FEATURES = (WINBIO_BIOMETRIC_TYPE)0x00000002;
151
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_VOICE = (WINBIO_BIOMETRIC_TYPE)0x00000004;
152
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_FINGERPRINT = (WINBIO_BIOMETRIC_TYPE)0x00000008;
153
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_IRIS = (WINBIO_BIOMETRIC_TYPE)0x00000010;
154
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_RETINA = (WINBIO_BIOMETRIC_TYPE)0x00000020;
155
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_HAND_GEOMETRY = (WINBIO_BIOMETRIC_TYPE)0x00000040;
156
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_SIGNATURE_DYNAMICS = (WINBIO_BIOMETRIC_TYPE)0x00000080;
157
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_KEYSTROKE_DYNAMICS = (WINBIO_BIOMETRIC_TYPE)0x00000100;
158
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_LIP_MOVEMENT = (WINBIO_BIOMETRIC_TYPE)0x00000200;
159
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_THERMAL_FACE_IMAGE = (WINBIO_BIOMETRIC_TYPE)0x00000400;
160
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_THERMAL_HAND_IMAGE = (WINBIO_BIOMETRIC_TYPE)0x00000800;
161
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_GAIT = (WINBIO_BIOMETRIC_TYPE)0x00001000;
162
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_SCENT = (WINBIO_BIOMETRIC_TYPE)0x00002000;
163
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_DNA = (WINBIO_BIOMETRIC_TYPE)0x00004000;
164
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_EAR_SHAPE = (WINBIO_BIOMETRIC_TYPE)0x00008000;
165
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_FINGER_GEOMETRY = (WINBIO_BIOMETRIC_TYPE)0x00010000;
166
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_PALM_PRINT = (WINBIO_BIOMETRIC_TYPE)0x00020000;
167
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_VEIN_PATTERN = (WINBIO_BIOMETRIC_TYPE)0x00040000;
168
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_FOOT_PRINT = (WINBIO_BIOMETRIC_TYPE)0x00080000;
169
+ //
170
+ // WinBio extended types
171
+ //
172
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_OTHER = (WINBIO_BIOMETRIC_TYPE)0x40000000;
173
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_PASSWORD = (WINBIO_BIOMETRIC_TYPE)0x80000000;
174
+
175
+ const WINBIO_BIOMETRIC_TYPE WINBIO_TYPE_ANY = (WINBIO_BIOMETRIC_TYPE)(WINBIO_STANDARD_TYPE_MASK | WINBIO_TYPE_OTHER | WINBIO_TYPE_PASSWORD);
176
+
177
+ #else // MIDL_PASS
178
+
179
+ #define WINBIO_STANDARD_TYPE_MASK ((WINBIO_BIOMETRIC_TYPE)0x00FFFFFF)
180
+
181
+ #define WINBIO_NO_TYPE_AVAILABLE ((WINBIO_BIOMETRIC_TYPE)0x00000000)
182
+ //
183
+ // Standard biometric types (from NISTIR 6529-A)
184
+ //
185
+ #define WINBIO_TYPE_MULTIPLE ((WINBIO_BIOMETRIC_TYPE)0x00000001)
186
+ #define WINBIO_TYPE_FACIAL_FEATURES ((WINBIO_BIOMETRIC_TYPE)0x00000002)
187
+ #define WINBIO_TYPE_VOICE ((WINBIO_BIOMETRIC_TYPE)0x00000004)
188
+ #define WINBIO_TYPE_FINGERPRINT ((WINBIO_BIOMETRIC_TYPE)0x00000008)
189
+ #define WINBIO_TYPE_IRIS ((WINBIO_BIOMETRIC_TYPE)0x00000010)
190
+ #define WINBIO_TYPE_RETINA ((WINBIO_BIOMETRIC_TYPE)0x00000020)
191
+ #define WINBIO_TYPE_HAND_GEOMETRY ((WINBIO_BIOMETRIC_TYPE)0x00000040)
192
+ #define WINBIO_TYPE_SIGNATURE_DYNAMICS ((WINBIO_BIOMETRIC_TYPE)0x00000080)
193
+ #define WINBIO_TYPE_KEYSTROKE_DYNAMICS ((WINBIO_BIOMETRIC_TYPE)0x00000100)
194
+ #define WINBIO_TYPE_LIP_MOVEMENT ((WINBIO_BIOMETRIC_TYPE)0x00000200)
195
+ #define WINBIO_TYPE_THERMAL_FACE_IMAGE ((WINBIO_BIOMETRIC_TYPE)0x00000400)
196
+ #define WINBIO_TYPE_THERMAL_HAND_IMAGE ((WINBIO_BIOMETRIC_TYPE)0x00000800)
197
+ #define WINBIO_TYPE_GAIT ((WINBIO_BIOMETRIC_TYPE)0x00001000)
198
+ #define WINBIO_TYPE_SCENT ((WINBIO_BIOMETRIC_TYPE)0x00002000)
199
+ #define WINBIO_TYPE_DNA ((WINBIO_BIOMETRIC_TYPE)0x00004000)
200
+ #define WINBIO_TYPE_EAR_SHAPE ((WINBIO_BIOMETRIC_TYPE)0x00008000)
201
+ #define WINBIO_TYPE_FINGER_GEOMETRY ((WINBIO_BIOMETRIC_TYPE)0x00010000)
202
+ #define WINBIO_TYPE_PALM_PRINT ((WINBIO_BIOMETRIC_TYPE)0x00020000)
203
+ #define WINBIO_TYPE_VEIN_PATTERN ((WINBIO_BIOMETRIC_TYPE)0x00040000)
204
+ #define WINBIO_TYPE_FOOT_PRINT ((WINBIO_BIOMETRIC_TYPE)0x00080000)
205
+ //
206
+ // WinBio extended types
207
+ //
208
+ #define WINBIO_TYPE_OTHER ((WINBIO_BIOMETRIC_TYPE)0x40000000)
209
+ #define WINBIO_TYPE_PASSWORD ((WINBIO_BIOMETRIC_TYPE)0x80000000)
210
+
211
+ #define WINBIO_TYPE_ANY ((WINBIO_BIOMETRIC_TYPE)(WINBIO_STANDARD_TYPE_MASK | \
212
+ WINBIO_TYPE_OTHER | \
213
+ WINBIO_TYPE_PASSWORD))
214
+
215
+ #endif // MIDL_PASS
216
+
217
+ //
218
+ // WinBio sensor sub-types. These are defined per Biometric type, and are
219
+ // defined only for fingerprints in this version.
220
+ //
221
+ typedef ULONG WINBIO_BIOMETRIC_SENSOR_SUBTYPE, *PWINBIO_BIOMETRIC_SENSOR_SUBTYPE;
222
+
223
+ #define WINBIO_SENSOR_SUBTYPE_UNKNOWN ((WINBIO_BIOMETRIC_SENSOR_SUBTYPE)0x00000000)
224
+
225
+ #define WINBIO_FP_SENSOR_SUBTYPE_SWIPE ((WINBIO_BIOMETRIC_SENSOR_SUBTYPE)0x00000001)
226
+ #define WINBIO_FP_SENSOR_SUBTYPE_TOUCH ((WINBIO_BIOMETRIC_SENSOR_SUBTYPE)0x00000002)
227
+
228
+ //
229
+ // Bitmask of sensor capabilities
230
+ //
231
+ typedef ULONG WINBIO_CAPABILITIES, *PWINBIO_CAPABILITIES;
232
+
233
+ #define WINBIO_CAPABILITY_SENSOR ((WINBIO_CAPABILITIES)0x00000001)
234
+ #define WINBIO_CAPABILITY_MATCHING ((WINBIO_CAPABILITIES)0x00000002)
235
+ #define WINBIO_CAPABILITY_DATABASE ((WINBIO_CAPABILITIES)0x00000004)
236
+ #define WINBIO_CAPABILITY_PROCESSING ((WINBIO_CAPABILITIES)0x00000008)
237
+ #define WINBIO_CAPABILITY_ENCRYPTION ((WINBIO_CAPABILITIES)0x00000010)
238
+ #define WINBIO_CAPABILITY_NAVIGATION ((WINBIO_CAPABILITIES)0x00000020)
239
+ #define WINBIO_CAPABILITY_INDICATOR ((WINBIO_CAPABILITIES)0x00000040)
240
+
241
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
242
+
243
+ #define WINBIO_CAPABILITY_VIRTUAL_SENSOR ((WINBIO_CAPABILITIES)0x00000080)
244
+
245
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
246
+
247
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
248
+
249
+ #define WINBIO_CAPABILITY_SECURE_SENSOR ((WINBIO_CAPABILITIES)0x00000100)
250
+
251
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS1)
252
+
253
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
254
+
255
+ // Secure Connection Protocol (SCP) V1 --> Secure Fingerprints
256
+ #define WINBIO_CAPABILITY_SCP_V1 ((WINBIO_CAPABILITIES)0x00000200)
257
+
258
+ // Modern standby support
259
+ #define WINBIO_CAPABILITY_WAKE ((WINBIO_CAPABILITIES)0x00000400)
260
+
261
+ //
262
+ // Constants for the SCP V1 protocol
263
+ //
264
+ typedef USHORT WINBIO_SCP_VERSION;
265
+ #define WINBIO_SCP_VERSION_1 1
266
+
267
+ // Sizes for the fixed V1 cipher suite
268
+ #define WINBIO_SCP_RANDOM_SIZE_V1 32
269
+ #define WINBIO_SCP_DIGEST_SIZE_V1 32 // SHA256
270
+ #define WINBIO_SCP_CURVE_FIELD_SIZE_V1 32 // NIST P256
271
+ #define WINBIO_SCP_PUBLIC_KEY_SIZE_V1 65 // 0x04||x||y
272
+ #define WINBIO_SCP_PRIVATE_KEY_SIZE_V1 32 // log_2(n)/8
273
+ #define WINBIO_SCP_SIGNATURE_SIZE_V1 64 // r||s
274
+ #define WINBIO_SCP_ENCRYPTION_BLOCK_SIZE_V1 16 // AES
275
+ #define WINBIO_SCP_ENCRYPTION_KEY_SIZE_V1 32 // AES256
276
+
277
+ typedef USHORT WINBIO_SCP_FLAGS;
278
+ #define WINBIO_SCP_FLAG_RECONNECT ((WINBIO_SCP_FLAGS)0x0001)
279
+
280
+ //
281
+ // Secure Connection Protocol structures
282
+ //
283
+ typedef struct _WINBIO_SECURE_CONNECTION_PARAMS {
284
+ DWORD PayloadSize;
285
+ WINBIO_SCP_VERSION Version; // WINBIO_SCP_VERSION_1
286
+ WINBIO_SCP_FLAGS Flags;
287
+ // Required fields:
288
+ // HostRandom[WINBIO_SCP_RANDOM_SIZE_V1];
289
+ // Fields omitted for reconnection:
290
+ // PublicKey[WINBIO_SCP_PUBLIC_KEY_SIZE_V1]
291
+ } WINBIO_SECURE_CONNECTION_PARAMS, *PWINBIO_SECURE_CONNECTION_PARAMS;
292
+
293
+ typedef struct _WINBIO_SECURE_CONNECTION_DATA {
294
+ DWORD Size;
295
+ WINBIO_SCP_VERSION Version; // WINBIO_SCP_VERSION_1
296
+ WINBIO_SCP_FLAGS Flags;
297
+ DWORD ModelCertificateSize;
298
+ DWORD IntermediateCA1Size;
299
+ DWORD IntermediateCA2Size;
300
+ // Required fields:
301
+ // Mac[WINBIO_SCP_DIGEST_SIZE_V1];
302
+ // Fields omitted for reconnection:
303
+ // DeviceRandom[WINBIO_SCP_RANDOM_SIZE_V1]
304
+ // ModelCertificate[ModelCertificateSize]
305
+ // DevicePublicKey[WINBIO_SCP_PUBLIC_KEY_SIZE_V1]
306
+ // FirmwarePublicKey[WINBIO_SPC_PUBLIC_KEY_SIZE_V1]
307
+ // FirmwareHash[WINBIO_SCP_DIGEST_SIZE_V1]
308
+ // ModelSignature[WINBIO_SCP_SIGNATURE_SIZE_V1]
309
+ // DeviceSignature[WINBIO_SCP_SIGNATURE_SIZE_V1]
310
+ // Field required the driver needs to append for full connection:
311
+ // IntermediateCA1[IntermediateCA1Size]
312
+ // IntermediateCA2[IntermediateCA2Size]
313
+ } WINBIO_SECURE_CONNECTION_DATA, *PWINBIO_SECURE_CONNECTION_DATA;
314
+
315
+ //
316
+ // Values representing the reason the sensor woke the host
317
+ //
318
+ typedef ULONG WINBIO_WAKE_REASON, *PWINBIO_WAKE_REASON;
319
+
320
+ #define WINBIO_WAKE_REASON_UNKNOWN ((WINBIO_WAKE_REASON)0)
321
+ #define WINBIO_WAKE_REASON_TOUCH ((WINBIO_WAKE_REASON)1)
322
+
323
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS4)
324
+
325
+ //
326
+ // Values representing the operating status of a sensor
327
+ //
328
+ typedef ULONG WINBIO_SENSOR_STATUS, *PWINBIO_SENSOR_STATUS;
329
+
330
+ #define WINBIO_SENSOR_STATUS_UNKNOWN ((WINBIO_SENSOR_STATUS)0)
331
+ #define WINBIO_SENSOR_ACCEPT ((WINBIO_SENSOR_STATUS)1)
332
+ #define WINBIO_SENSOR_REJECT ((WINBIO_SENSOR_STATUS)2)
333
+ #define WINBIO_SENSOR_READY ((WINBIO_SENSOR_STATUS)3)
334
+ #define WINBIO_SENSOR_BUSY ((WINBIO_SENSOR_STATUS)4)
335
+ #define WINBIO_SENSOR_NOT_CALIBRATED ((WINBIO_SENSOR_STATUS)5)
336
+ #define WINBIO_SENSOR_FAILURE ((WINBIO_SENSOR_STATUS)6)
337
+
338
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
339
+
340
+ //
341
+ // The following only apply to VIRTUAL_SENSOR units
342
+ //
343
+ #define WINBIO_SENSOR_AVAILABLE ((WINBIO_SENSOR_STATUS)7)
344
+ #define WINBIO_SENSOR_UNAVAILABLE ((WINBIO_SENSOR_STATUS)8)
345
+
346
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
347
+
348
+ //
349
+ // Values used to set the indicator on or off
350
+ //
351
+ // By default, sensors will not have a light on.
352
+ // Applications can use these values to enable
353
+ // or disable indicator lights on the sensor.
354
+ // WINBIO_SENSOR_STATUS will provide more detail
355
+ // about the status of the light when it is "on."
356
+ //
357
+ typedef DWORD WINBIO_INDICATOR_STATUS, *PWINBIO_INDICATOR_STATUS;
358
+
359
+ #define WINBIO_INDICATOR_ON ((WINBIO_INDICATOR_STATUS)1)
360
+ #define WINBIO_INDICATOR_OFF ((WINBIO_INDICATOR_STATUS)2)
361
+
362
+ ///////////////////////////////////////////////////////////////////////////////
363
+ //
364
+ // Sensor operating modes
365
+ //
366
+ typedef ULONG WINBIO_SENSOR_MODE, *PWINBIO_SENSOR_MODE;
367
+
368
+ #define WINBIO_SENSOR_UNKNOWN_MODE ((WINBIO_SENSOR_MODE)0)
369
+ #define WINBIO_SENSOR_BASIC_MODE ((WINBIO_SENSOR_MODE)1)
370
+ #define WINBIO_SENSOR_ADVANCED_MODE ((WINBIO_SENSOR_MODE)2)
371
+ #define WINBIO_SENSOR_NAVIGATION_MODE ((WINBIO_SENSOR_MODE)3)
372
+ #define WINBIO_SENSOR_SLEEP_MODE ((WINBIO_SENSOR_MODE)4)
373
+
374
+ ///////////////////////////////////////////////////////////////////////////////
375
+ //
376
+ // Factor-specific value giving additional information about
377
+ // a biometric measurement (e.g., *which* finger a fingerprint
378
+ // sample was taken from).
379
+ //
380
+ typedef UCHAR WINBIO_BIOMETRIC_SUBTYPE, *PWINBIO_BIOMETRIC_SUBTYPE;
381
+
382
+ #define WINBIO_SUBTYPE_NO_INFORMATION ((WINBIO_BIOMETRIC_SUBTYPE)0x00)
383
+ #define WINBIO_SUBTYPE_ANY ((WINBIO_BIOMETRIC_SUBTYPE)0xFF)
384
+ //
385
+ // If the biometric type is WINBIO_TYPE_FINGERPRINT, WinBio uses
386
+ // 'WINBIO_ANSI_381_POS_xyz' constants to represent fingerprint sub-type
387
+ // information. (These are defined below in the WINBIO_BDB_ANSI_381_RECORD.)
388
+ //
389
+ // If the biometric type is WINBIO_TYPE_FACIAL_FEATURES, WinBio uses
390
+ // 'WINBIO_ANSI_385_xyz' constants to represent facial image sub-type
391
+ // information.
392
+ //
393
+
394
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
395
+
396
+ ///////////////////////////////////////////////////////////////////////////////
397
+ //
398
+ // Biometric unit security level
399
+ //
400
+ typedef ULONG WINBIO_UNIT_SECURITY_LEVEL, *PWINBIO_UNIT_SECURITY_LEVEL;
401
+
402
+ #define WINBIO_UNIT_SECURITY_LEVEL_NORMAL ((WINBIO_UNIT_SECURITY_LEVEL)0)
403
+ #define WINBIO_UNIT_SECURITY_LEVEL_VBS ((WINBIO_UNIT_SECURITY_LEVEL)1)
404
+
405
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS5)
406
+
407
+ ///////////////////////////////////////////////////////////////////////////////
408
+ //
409
+ // Factor-specific value that describes the reason a
410
+ // biometric sampling operation failed.
411
+ //
412
+ typedef ULONG WINBIO_REJECT_DETAIL, *PWINBIO_REJECT_DETAIL;
413
+
414
+ #ifndef WINBIO_REJECT_DETAILS_DEFINED
415
+ #define WINBIO_REJECT_DETAILS_DEFINED
416
+
417
+ //
418
+ // Reject detail values for WINBIO_TYPE_FINGERPRINT
419
+ //
420
+ #define WINBIO_FP_TOO_HIGH ((WINBIO_REJECT_DETAIL)1)
421
+ #define WINBIO_FP_TOO_LOW ((WINBIO_REJECT_DETAIL)2)
422
+ #define WINBIO_FP_TOO_LEFT ((WINBIO_REJECT_DETAIL)3)
423
+ #define WINBIO_FP_TOO_RIGHT ((WINBIO_REJECT_DETAIL)4)
424
+ #define WINBIO_FP_TOO_FAST ((WINBIO_REJECT_DETAIL)5)
425
+ #define WINBIO_FP_TOO_SLOW ((WINBIO_REJECT_DETAIL)6)
426
+ #define WINBIO_FP_POOR_QUALITY ((WINBIO_REJECT_DETAIL)7)
427
+ #define WINBIO_FP_TOO_SKEWED ((WINBIO_REJECT_DETAIL)8)
428
+ #define WINBIO_FP_TOO_SHORT ((WINBIO_REJECT_DETAIL)9)
429
+ #define WINBIO_FP_MERGE_FAILURE ((WINBIO_REJECT_DETAIL)10)
430
+
431
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
432
+
433
+ //
434
+ // REJECT_DETAIL values for IRIS and FACIAL_FEATURES contain multiple fields:
435
+ //
436
+ // - Flags requesting proof-of-liveness behaviors from the user [0xFF000000]
437
+ // - Flags indicating of position errors [0x00FF0000]
438
+ // - A (single) enumerated value explaining the reason for the rejection. [0x0000FFFF]
439
+ //
440
+ // This mask covers the upper 8 bits of the reject detail value, where
441
+ // the proof-of-liveness behaviors are located.
442
+ //
443
+ #define WINBIO_REJECT_DETAIL_ANTI_SPOOF_MASK ((WINBIO_REJECT_DETAIL)0xFF000000)
444
+
445
+ //
446
+ // Anti-spoofing behaviors...
447
+ //
448
+ #define WINBIO_ANTI_SPOOF_TURN_SIDE_TO_SIDE ((WINBIO_REJECT_DETAIL)0x01000000)
449
+
450
+ //
451
+ // This mask covers the range of bits devoted to position errors...
452
+ //
453
+ #define WINBIO_REJECT_DETAIL_POSITION_MASK ((WINBIO_REJECT_DETAIL)0x00FF0000)
454
+
455
+ //
456
+ // This mask covers the lower 16 bits, where the enumerated reason for the
457
+ // rejection is located.
458
+ //
459
+ #define WINBIO_REJECT_DETAIL_REASON_MASK ((WINBIO_REJECT_DETAIL)0x0000FFFF)
460
+
461
+ //
462
+ // Reject detail values for WINBIO_TYPE_IRIS
463
+ //
464
+ #define WINBIO_IRIS_POOR_QUALITY ((WINBIO_REJECT_DETAIL)1)
465
+ #define WINBIO_IRIS_TOO_BRIGHT ((WINBIO_REJECT_DETAIL)2)
466
+ #define WINBIO_IRIS_TOO_DARK ((WINBIO_REJECT_DETAIL)3)
467
+ #define WINBIO_IRIS_SPOOF_DETECTED ((WINBIO_REJECT_DETAIL)4)
468
+ #define WINBIO_IRIS_TOO_SKEWED ((WINBIO_REJECT_DETAIL)5)
469
+ #define WINBIO_IRIS_TOO_CLOSED ((WINBIO_REJECT_DETAIL)6)
470
+ #define WINBIO_IRIS_GLARE ((WINBIO_REJECT_DETAIL)7)
471
+ #define WINBIO_IRIS_DIRTY_LENS ((WINBIO_REJECT_DETAIL)8)
472
+ #define WINBIO_IRIS_POOR_FOCUS ((WINBIO_REJECT_DETAIL)9)
473
+
474
+ // Camera orientation doesn't match mandatory value in EXTENDED_SENSOR_INFO
475
+ #define WINBIO_IRIS_WRONG_ORIENTATION ((WINBIO_REJECT_DETAIL)10)
476
+
477
+ //
478
+ // Positioning errors...
479
+ //
480
+ #define WINBIO_IRIS_TOO_HIGH ((WINBIO_REJECT_DETAIL)0x00010000)
481
+ #define WINBIO_IRIS_TOO_LOW ((WINBIO_REJECT_DETAIL)0x00020000)
482
+ #define WINBIO_IRIS_TOO_LEFT ((WINBIO_REJECT_DETAIL)0x00040000)
483
+ #define WINBIO_IRIS_TOO_RIGHT ((WINBIO_REJECT_DETAIL)0x00080000)
484
+ #define WINBIO_IRIS_TOO_NEAR ((WINBIO_REJECT_DETAIL)0x00100000)
485
+ #define WINBIO_IRIS_TOO_FAR ((WINBIO_REJECT_DETAIL)0x00200000)
486
+
487
+ //
488
+ // Reject detail values for WINBIO_TYPE_FACIAL_FEATURES
489
+ //
490
+ #define WINBIO_FACE_POOR_QUALITY ((WINBIO_REJECT_DETAIL)1)
491
+ #define WINBIO_FACE_TOO_BRIGHT ((WINBIO_REJECT_DETAIL)2)
492
+ #define WINBIO_FACE_TOO_DARK ((WINBIO_REJECT_DETAIL)3)
493
+ //
494
+ // SPOOF_DETECTED indicates that the recognition component believes the
495
+ // face is not live, but is coming from a replayed video feed, a photo,
496
+ // or a 3-D sculpture.
497
+ //
498
+ #define WINBIO_FACE_SPOOF_DETECTED ((WINBIO_REJECT_DETAIL)4)
499
+ #define WINBIO_FACE_AMBIGUOUS_TARGET ((WINBIO_REJECT_DETAIL)5)
500
+ // WINBIO_FACE_EYES_OCCLUDED is deprecated. Use WINBIO_FACE_OCCLUDED instead
501
+ #define WINBIO_FACE_EYES_OCCLUDED ((WINBIO_REJECT_DETAIL)6)
502
+ // WINBIO_FACE_OCCLUDED indicates that the user's eyes, mouth or nose are occluded.
503
+ // This is create to replace WINBIO_FACE_EYES_OCCLUDED
504
+ #define WINBIO_FACE_OCCLUDED ((WINBIO_REJECT_DETAIL)6)
505
+
506
+ // Camera orientation doesn't match mandatory value in EXTENDED_SENSOR_INFO
507
+ #define WINBIO_FACE_WRONG_ORIENTATION ((WINBIO_REJECT_DETAIL)7)
508
+
509
+ //
510
+ // Positioning errors...
511
+ //
512
+ #define WINBIO_FACE_TOO_HIGH ((WINBIO_REJECT_DETAIL)0x00010000)
513
+ #define WINBIO_FACE_TOO_LOW ((WINBIO_REJECT_DETAIL)0x00020000)
514
+ #define WINBIO_FACE_TOO_LEFT ((WINBIO_REJECT_DETAIL)0x00040000)
515
+ #define WINBIO_FACE_TOO_RIGHT ((WINBIO_REJECT_DETAIL)0x00080000)
516
+ #define WINBIO_FACE_TOO_NEAR ((WINBIO_REJECT_DETAIL)0x00100000)
517
+ #define WINBIO_FACE_TOO_FAR ((WINBIO_REJECT_DETAIL)0x00200000)
518
+
519
+ //
520
+ // Reject detail values for WINBIO_TYPE_VOICE
521
+ //
522
+ #define WINBIO_VOICE_POOR_QUALITY ((WINBIO_REJECT_DETAIL)1)
523
+ #define WINBIO_VOICE_TOO_SLOW ((WINBIO_REJECT_DETAIL)2)
524
+ #define WINBIO_VOICE_TOO_FAST ((WINBIO_REJECT_DETAIL)3)
525
+ #define WINBIO_VOICE_NO_KEYWORD ((WINBIO_REJECT_DETAIL)4)
526
+ #define WINBIO_VOICE_PROCESSING_ERROR ((WINBIO_REJECT_DETAIL)5)
527
+
528
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
529
+
530
+ #endif // WINBIO_REJECT_DETAILS_DEFINED
531
+
532
+
533
+ ///////////////////////////////////////////////////////////////////////////////
534
+ //
535
+ // Biometric Information Record (BIR)
536
+ //
537
+ ///////////////////////////////////////////////////////////////////////////////
538
+ //
539
+ // +---------------------------------------+
540
+ // 1. | WINBIO_BIR |
541
+ // +---------------------------------------+
542
+ // 2. | WINBIO_BIR_HEADER |
543
+ // +---------------------------------------+
544
+ // 3. | Standard Data Block (optional) |
545
+ // | |
546
+ // | WINBIO_BDB_ANSI_381_HEADER |
547
+ // | [0] WINBIO_BDB_ANSI_381_RECORD |
548
+ // | : |
549
+ // | [N] WINBIO_BDB_ANSI_381_RECORD |
550
+ // +---------------------------------------+
551
+ // 4. | Vendor Data Block (optional) |
552
+ // +---------------------------------------+
553
+ // 5. | Signature Block (optional) |
554
+ // +---------------------------------------+
555
+ //
556
+ // NOTES:
557
+ // - The format of the Standard Data Block is determined
558
+ // by the 'BiometricDataFormat' field of WINBIO_BIR_HEADER.
559
+ //
560
+ // - Currently, the only supported format for the Standard
561
+ // Data Block is ANSI 381 fingerprint image data. Data in
562
+ // any other form must go into the Vendor Data Block instead.
563
+ //
564
+ // - It's vital that BIR structures and sub-structures be aligned
565
+ // on 8-byte boundaries. This means both C++ and MIDL compilation
566
+ // with at least /Zp8 alignment. This also applies to BIRs that
567
+ // are allocated dynamically from the heap.
568
+ //
569
+ #define WINBIO_BIR_ALIGN_SIZE (8)
570
+ //
571
+ // Also define legacy typo to be synonymous
572
+ //
573
+ #define WINBIO_BIR_ALGIN_SIZE WINBIO_BIR_ALIGN_SIZE
574
+
575
+ //
576
+ // The following gives the location and size of a block
577
+ // in a BIR. The offset is measured from the beginning of
578
+ // the WINBIO_BIR structure.
579
+ //
580
+ typedef struct _WINBIO_BIR_DATA {
581
+ ULONG Size;
582
+ ULONG Offset;
583
+ } WINBIO_BIR_DATA;
584
+
585
+ typedef WINBIO_BIR_DATA *PWINBIO_BIR_DATA;
586
+
587
+ //
588
+ // Top-level structure contains offset/size
589
+ // information needed to find other items.
590
+ //
591
+ typedef struct _WINBIO_BIR {
592
+ WINBIO_BIR_DATA HeaderBlock;
593
+ WINBIO_BIR_DATA StandardDataBlock;
594
+ WINBIO_BIR_DATA VendorDataBlock;
595
+ WINBIO_BIR_DATA SignatureBlock;
596
+ } WINBIO_BIR;
597
+
598
+ typedef WINBIO_BIR *PWINBIO_BIR;
599
+
600
+ ///////////////////////////////////////////////////////////////////////////////
601
+ //
602
+ // Elements used in a BIR header
603
+ //
604
+ ///////////////////////////////////////////////////////////////////////////////
605
+ //
606
+ // BIR 'ValidFields' flags...
607
+ //
608
+ #define WINBIO_BIR_FIELD_SUBHEAD_COUNT ((USHORT)0x0001)
609
+ #define WINBIO_BIR_FIELD_PRODUCT_ID ((USHORT)0x0002)
610
+ #define WINBIO_BIR_FIELD_PATRON_ID ((USHORT)0x0004)
611
+ #define WINBIO_BIR_FIELD_INDEX ((USHORT)0x0008)
612
+
613
+ #define WINBIO_BIR_FIELD_CREATION_DATE ((USHORT)0x0010)
614
+ #define WINBIO_BIR_FIELD_VALIDITY_PERIOD ((USHORT)0x0020)
615
+ #define WINBIO_BIR_FIELD_BIOMETRIC_TYPE ((USHORT)0x0040)
616
+ #define WINBIO_BIR_FIELD_BIOMETRIC_SUBTYPE ((USHORT)0x0080)
617
+
618
+ #define WINBIO_BIR_FIELD_CBEFF_HEADER_VERSION ((USHORT)0x0100)
619
+ #define WINBIO_BIR_FIELD_PATRON_HEADER_VERSION ((USHORT)0x0200)
620
+ #define WINBIO_BIR_FIELD_BIOMETRIC_PURPOSE ((USHORT)0x0400)
621
+ #define WINBIO_BIR_FIELD_BIOMETRIC_CONDITION ((USHORT)0x0800)
622
+
623
+ #define WINBIO_BIR_FIELD_QUALITY ((USHORT)0x1000)
624
+ #define WINBIO_BIR_FIELD_CREATOR ((USHORT)0x2000)
625
+ #define WINBIO_BIR_FIELD_CHALLENGE ((USHORT)0x4000)
626
+ #define WINBIO_BIR_FIELD_PAYLOAD ((USHORT)0x8000)
627
+
628
+ //
629
+ // The following collection of optional fields will NEVER be
630
+ // part of a WinBio BIR. If any of these bits are asserted,
631
+ // the BIR is malformed.
632
+ //
633
+ #define WINBIO_BIR_FIELD_NEVER_VALID (WINBIO_BIR_FIELD_SUBHEAD_COUNT | \
634
+ WINBIO_BIR_FIELD_PATRON_ID | \
635
+ WINBIO_BIR_FIELD_INDEX | \
636
+ WINBIO_BIR_FIELD_CHALLENGE | \
637
+ WINBIO_BIR_FIELD_PAYLOAD )
638
+
639
+ ///////////////////////////////////////////////////////////////////////////////
640
+ //
641
+ // BIR 'HeaderVersion' and 'PatronHeaderVersion' fields:
642
+ //
643
+ // Versions are represented as 8-bit values of the
644
+ // form: 0xNM, where 'N' is the major version and 'M'
645
+ // is the minor version.
646
+ //
647
+ typedef UCHAR WINBIO_BIR_VERSION, *PWINBIO_BIR_VERSION;
648
+
649
+ #define WINBIO_CBEFF_HEADER_VERSION ((WINBIO_BIR_VERSION)0x11)
650
+ #define WINBIO_PATRON_HEADER_VERSION ((WINBIO_BIR_VERSION)0x11)
651
+
652
+ ///////////////////////////////////////////////////////////////////////////////
653
+ //
654
+ // BIR 'DataFlags' field:
655
+ // * Security and integrity-checking options
656
+ // PRIVACY - BDB is encrypted
657
+ // INTEGRITY - BDB is signed or MAC'ed
658
+ // SIGNED - 1 -> BDB is signed; 0 -> BDB is MAC'ed
659
+ // * Processing level of the data
660
+ //
661
+ typedef UCHAR WINBIO_BIR_DATA_FLAGS, *PWINBIO_BIR_DATA_FLAGS;
662
+
663
+ #define WINBIO_DATA_FLAG_PRIVACY ((UCHAR)0x02)
664
+ #define WINBIO_DATA_FLAG_INTEGRITY ((UCHAR)0x01)
665
+ #define WINBIO_DATA_FLAG_SIGNED ((UCHAR)0x04)
666
+
667
+ #define WINBIO_DATA_FLAG_RAW ((UCHAR)0x20)
668
+ #define WINBIO_DATA_FLAG_INTERMEDIATE ((UCHAR)0x40)
669
+ #define WINBIO_DATA_FLAG_PROCESSED ((UCHAR)0x80)
670
+
671
+ #define WINBIO_DATA_FLAG_OPTION_MASK_PRESENT ((UCHAR)0x08) // Always '1'.
672
+
673
+ ///////////////////////////////////////////////////////////////////////////////
674
+ //
675
+ // BIR 'Purpose' field:
676
+ //
677
+ // A value defining the purpose for which the BIR
678
+ //
679
+ // - is intended, when used as input to a WinBio function
680
+ //
681
+ // - is suitable, when used as output from a WinBio function
682
+ // or within a BIR header.
683
+ //
684
+ // NOTE:
685
+ // In a WINBIO BIR, the 'Purpose' field is defined as a set of flag bits
686
+ // rather than an enumerated type (as specified in NISTIR 6529-A). Transferring
687
+ // a WINBIO BIR to another environment (e.g., BioAPI) will require conversion.
688
+ //
689
+ // The suggested way to handle this conversion is to generate a set of nested
690
+ // BIRs for any WINBIO BIRs that have multiple 'Purpose' bits set.
691
+ //
692
+ typedef UCHAR WINBIO_BIR_PURPOSE, *PWINBIO_BIR_PURPOSE;
693
+
694
+ #define WINBIO_NO_PURPOSE_AVAILABLE ((WINBIO_BIR_PURPOSE)0x00)
695
+ #define WINBIO_PURPOSE_VERIFY ((WINBIO_BIR_PURPOSE)0x01)
696
+ #define WINBIO_PURPOSE_IDENTIFY ((WINBIO_BIR_PURPOSE)0x02)
697
+ #define WINBIO_PURPOSE_ENROLL ((WINBIO_BIR_PURPOSE)0x04)
698
+ #define WINBIO_PURPOSE_ENROLL_FOR_VERIFICATION ((WINBIO_BIR_PURPOSE)0x08)
699
+ #define WINBIO_PURPOSE_ENROLL_FOR_IDENTIFICATION ((WINBIO_BIR_PURPOSE)0x10)
700
+ #define WINBIO_PURPOSE_AUDIT ((WINBIO_BIR_PURPOSE)0x80)
701
+
702
+ ///////////////////////////////////////////////////////////////////////////////
703
+ //
704
+ // BIR 'DataQuality' field:
705
+ //
706
+ // FIndicates the relative quality of the biometric
707
+ // data in the BIR.
708
+ //
709
+ // Quality measurements are represented as signed
710
+ // integers in the range 0-100, except:
711
+ //
712
+ // -1 Quality measurements are supported by the
713
+ // BIR creator, but no value is set in the BIR.
714
+ //
715
+ // -2 Quality measurements are not supported
716
+ // by the BIR creator.
717
+ //
718
+ typedef CHAR WINBIO_BIR_QUALITY, *PWINBIO_BIR_QUALITY;
719
+
720
+ #define WINBIO_DATA_QUALITY_NOT_SET ((WINBIO_BIR_QUALITY)-1)
721
+ #define WINBIO_DATA_QUALITY_NOT_SUPPORTED ((WINBIO_BIR_QUALITY)-2)
722
+
723
+ ///////////////////////////////////////////////////////////////////////////////
724
+ //
725
+ // BIR 'BiometricDataFormat' and 'ProductId' fields:
726
+ //
727
+ // Identifies a registered data format as a pair consisting of
728
+ // an IBIA-assigned owner value plus an owner-assigned format-type
729
+ // value.
730
+ //
731
+ typedef struct _WINBIO_REGISTERED_FORMAT {
732
+ USHORT Owner;
733
+ USHORT Type;
734
+ } WINBIO_REGISTERED_FORMAT, *PWINBIO_REGISTERED_FORMAT;
735
+
736
+ #define WINBIO_NO_FORMAT_OWNER_AVAILABLE ((USHORT)0)
737
+ #define WINBIO_NO_FORMAT_TYPE_AVAILABLE ((USHORT)0)
738
+
739
+ ///////////////////////////////////////////////////////////////////////////////
740
+ //
741
+ // NISTIR 6529-A -- Common Biometric Exchange Formats Framework (CBEFF)
742
+ // April 5, 2004
743
+ //
744
+ // CBEFF Patron Format A: Standard Biometric Header Block
745
+ //
746
+ // NOTE:
747
+ // This structure is COMPATIBLE with CBEFF Patron Format A in that
748
+ // it can be transformed to/from a fully-conformant Format A record.
749
+ // The following fields are NOT part of this structure:
750
+ // - Subheader -- WinBio doesn't support nested CBEFF structures
751
+ // - Patron format owner/type -- used only for nested CBEFF structures
752
+ // - Index
753
+ // - Creator
754
+ // - Challenge/response
755
+ // - Payload
756
+ //
757
+ ///////////////////////////////////////////////////////////////////////////////
758
+ typedef struct _WINBIO_BIR_HEADER {
759
+ //
760
+ // Mask indicating which fields are valid
761
+ //
762
+ // Annex A -- Note (1) to Table A.1
763
+ //
764
+ USHORT ValidFields;
765
+
766
+ //
767
+ // CBEFF Header version
768
+ //
769
+ // SECTION 5.2.1.3
770
+ //
771
+ WINBIO_BIR_VERSION HeaderVersion; // = WINBIO_CBEFF_HEADER_VERSION
772
+
773
+ //
774
+ // Patron header version
775
+ //
776
+ // SECTION 5.2.1.4
777
+ //
778
+ WINBIO_BIR_VERSION PatronHeaderVersion; // = WINBIO_PATRON_HEADER_VERSION
779
+
780
+ //
781
+ // 'DataFlags' is a combination of the 'Security
782
+ // Options' field and the 'Biometric Data Type'
783
+ // (RAW, INTERMEDIATE,PROCESSED) field.
784
+ //
785
+ // SECTION 5.2.1.1, 5.2.1.2, and 5.2.1.7
786
+ //
787
+ WINBIO_BIR_DATA_FLAGS DataFlags;
788
+
789
+ //
790
+ // Biometric type
791
+ //
792
+ // SECTION 5.2.1.5
793
+ //
794
+ WINBIO_BIOMETRIC_TYPE Type;
795
+
796
+ //
797
+ // Biometric subtype
798
+ //
799
+ // SECTION 5.2.1.6
800
+ //
801
+ WINBIO_BIOMETRIC_SUBTYPE Subtype;
802
+
803
+ //
804
+ // Intended use of the data
805
+ //
806
+ // SECTION 5.2.1.8
807
+ //
808
+ WINBIO_BIR_PURPOSE Purpose;
809
+
810
+ //
811
+ // Biometric data quality
812
+ //
813
+ // SECTION 5.2.1.9
814
+ //
815
+ WINBIO_BIR_QUALITY DataQuality;
816
+
817
+ //
818
+ // Creation date and time of this BIR (in UTC)
819
+ //
820
+ // SECTION 5.2.1.10
821
+ //
822
+ LARGE_INTEGER CreationDate;
823
+
824
+ //
825
+ // Validity period of this BIR (in UTC)
826
+ //
827
+ // SECTION 5.2.1.11
828
+ //
829
+ struct {
830
+ LARGE_INTEGER BeginDate;
831
+ LARGE_INTEGER EndDate;
832
+ } ValidityPeriod;
833
+
834
+ ///////////////////////////////////////////////////////////////////////////
835
+ //
836
+ // Data format of Standard Data Block.
837
+ //
838
+ // NOTE: If BIR doesn't contain 'StandardDataBlock'
839
+ // element, this is set to "no owner/type available".
840
+ //
841
+ WINBIO_REGISTERED_FORMAT BiometricDataFormat;
842
+
843
+ //
844
+ // Product identifier for the component that
845
+ // generated the 'StandardDataBlock' element.
846
+ //
847
+ // NOTE: If BIR doesn't contain 'StandardDataBlock'
848
+ // element, this is set to "no owner/type available".
849
+ //
850
+ WINBIO_REGISTERED_FORMAT ProductId;
851
+
852
+ } WINBIO_BIR_HEADER;
853
+
854
+ typedef WINBIO_BIR_HEADER *PWINBIO_BIR_HEADER;
855
+
856
+
857
+ ///////////////////////////////////////////////////////////////////////////////
858
+ //
859
+ // ANSI INCITS 381-2004 -- Finger Image-Based Data Interchange Format
860
+ //
861
+ ///////////////////////////////////////////////////////////////////////////////
862
+ //
863
+ // SECTION 7 -- Registered Format
864
+ //
865
+ // WINBIO_BIR_HEADER.BiometricDataFormat.Owner = WINBIO_ANSI_381_FORMAT_OWNER
866
+ // WINBIO_BIR_HEADER.BiometricDataFormat.Type = WINBIO_ANSI_381_FORMAT_TYPE
867
+ //
868
+ #define WINBIO_ANSI_381_FORMAT_OWNER ((USHORT)0x001B) // INCITS Technical Committee M1
869
+ #define WINBIO_ANSI_381_FORMAT_TYPE ((USHORT)0x0401) // ANSI-381
870
+
871
+ //
872
+ // SECTION 7.1 -- General Record Header
873
+ //
874
+ typedef struct _WINBIO_BDB_ANSI_381_HEADER {
875
+ ULONG64 RecordLength; // Only the low 6 bytes of this number are valid.
876
+ // sizeof(WINBIO_BDB_ANSI_381_HEADER)
877
+ // + sizeof( all WINBIO_BDB_ANSI_381_RECORD records)
878
+
879
+ ULONG FormatIdentifier; // Must be 0x46495200 (ASCII: 'F' 'I' 'R' 0x0)
880
+ ULONG VersionNumber; // Must be 0x30313000 (ASCII: '0' '1' '0' 0x0)
881
+
882
+ WINBIO_REGISTERED_FORMAT ProductId;
883
+
884
+ USHORT CaptureDeviceId;
885
+ USHORT ImageAcquisitionLevel;
886
+ USHORT HorizontalScanResolution;
887
+ USHORT VerticalScanResolution;
888
+ USHORT HorizontalImageResolution;
889
+ USHORT VerticalImageResolution;
890
+
891
+ UCHAR ElementCount; // Number of finger/palm records in the block
892
+ UCHAR ScaleUnits; // cm or inch
893
+ UCHAR PixelDepth; // 1-16 bits per pixel (2-64K gray levels)
894
+ UCHAR ImageCompressionAlg;
895
+
896
+ USHORT Reserved;
897
+ // 38 bytes (because of unused 2 bytes in ULONG64) vs. 36 bytes defined in ANSI INCITS spec
898
+
899
+ } WINBIO_BDB_ANSI_381_HEADER;
900
+
901
+ typedef WINBIO_BDB_ANSI_381_HEADER *PWINBIO_BDB_ANSI_381_HEADER;
902
+
903
+ //
904
+ // SECTION 7.1.6 Image acquistion level
905
+ //
906
+ // Table 1 -- Image acquistion setting levels
907
+ //
908
+ #define WINBIO_ANSI_381_IMG_ACQ_LEVEL_10 ((USHORT)10)
909
+ #define WINBIO_ANSI_381_IMG_ACQ_LEVEL_20 ((USHORT)20)
910
+ #define WINBIO_ANSI_381_IMG_ACQ_LEVEL_30 ((USHORT)30)
911
+ #define WINBIO_ANSI_381_IMG_ACQ_LEVEL_31 ((USHORT)31)
912
+ #define WINBIO_ANSI_381_IMG_ACQ_LEVEL_40 ((USHORT)40)
913
+ #define WINBIO_ANSI_381_IMG_ACQ_LEVEL_41 ((USHORT)41)
914
+
915
+ //
916
+ // SECTION 7.1.8 -- Scale units
917
+ //
918
+ #define WINBIO_ANSI_381_PIXELS_PER_INCH ((UCHAR)0x01)
919
+ #define WINBIO_ANSI_381_PIXELS_PER_CM ((UCHAR)0x02)
920
+
921
+ //
922
+ // SECTION 7.1.14 -- Image compression algorithm
923
+ //
924
+ // Table 3 -- Compression algorithm codes
925
+ //
926
+ #define WINBIO_ANSI_381_IMG_UNCOMPRESSED ((UCHAR)0)
927
+ #define WINBIO_ANSI_381_IMG_BIT_PACKED ((UCHAR)1)
928
+ #define WINBIO_ANSI_381_IMG_COMPRESSED_WSQ ((UCHAR)2)
929
+ #define WINBIO_ANSI_381_IMG_COMPRESSED_JPEG ((UCHAR)3)
930
+ #define WINBIO_ANSI_381_IMG_COMPRESSED_JPEG2000 ((UCHAR)4)
931
+ #define WINBIO_ANSI_381_IMG_COMPRESSED_PNG ((UCHAR)5)
932
+
933
+ //
934
+ // SECTION 7.2 -- Finger Record Header
935
+ //
936
+ typedef struct _WINBIO_BDB_ANSI_381_RECORD {
937
+ ULONG BlockLength; // sizeof(WINBIO_BDB_ANSI_381_RECORD)
938
+ // + sizeof(image data)
939
+ USHORT HorizontalLineLength; // Number of pixels in a horizontal line
940
+ USHORT VerticalLineLength; // Number of horizontal lines in the image
941
+ WINBIO_BIOMETRIC_SUBTYPE Position;
942
+ UCHAR CountOfViews; // Must be set to one (1)
943
+ UCHAR ViewNumber; // Must be set to one (1)
944
+ UCHAR ImageQuality; // Reserved -- must be set to 254 (0xFE)
945
+ UCHAR ImpressionType;
946
+ UCHAR Reserved; // Must be set to zero
947
+ // 14 bytes of header data
948
+ } WINBIO_BDB_ANSI_381_RECORD;
949
+ //
950
+ // Followed immediately by compressed/uncompressed image data.
951
+ // (Image data must be < 43 * 10^8 bytes in length.)
952
+ //
953
+
954
+ typedef WINBIO_BDB_ANSI_381_RECORD *PWINBIO_BDB_ANSI_381_RECORD;
955
+
956
+ //
957
+ // SECTION 7.2.2 -- Finger position codes
958
+ //
959
+ // Table 5 -- Finger position codes, areas, and maximum dimensions
960
+ //
961
+ #define WINBIO_ANSI_381_POS_UNKNOWN ((WINBIO_BIOMETRIC_SUBTYPE)0)
962
+ #define WINBIO_ANSI_381_POS_RH_THUMB ((WINBIO_BIOMETRIC_SUBTYPE)1)
963
+ #define WINBIO_ANSI_381_POS_RH_INDEX_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)2)
964
+ #define WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)3)
965
+ #define WINBIO_ANSI_381_POS_RH_RING_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)4)
966
+ #define WINBIO_ANSI_381_POS_RH_LITTLE_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)5)
967
+ #define WINBIO_ANSI_381_POS_LH_THUMB ((WINBIO_BIOMETRIC_SUBTYPE)6)
968
+ #define WINBIO_ANSI_381_POS_LH_INDEX_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)7)
969
+ #define WINBIO_ANSI_381_POS_LH_MIDDLE_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)8)
970
+ #define WINBIO_ANSI_381_POS_LH_RING_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)9)
971
+ #define WINBIO_ANSI_381_POS_LH_LITTLE_FINGER ((WINBIO_BIOMETRIC_SUBTYPE)10)
972
+
973
+ #define WINBIO_ANSI_381_POS_RH_FOUR_FINGERS ((WINBIO_BIOMETRIC_SUBTYPE)13)
974
+ #define WINBIO_ANSI_381_POS_LH_FOUR_FINGERS ((WINBIO_BIOMETRIC_SUBTYPE)14)
975
+ #define WINBIO_ANSI_381_POS_TWO_THUMBS ((WINBIO_BIOMETRIC_SUBTYPE)15)
976
+ //
977
+ // Table 6 -- Palm codes, areas, and maximum dimensions
978
+ //
979
+ #define WINBIO_ANSI_381_POS_UNKNOWN_PALM ((WINBIO_BIOMETRIC_SUBTYPE)20)
980
+ #define WINBIO_ANSI_381_POS_RH_FULL_PALM ((WINBIO_BIOMETRIC_SUBTYPE)21)
981
+ #define WINBIO_ANSI_381_POS_RH_WRITERS_PALM ((WINBIO_BIOMETRIC_SUBTYPE)22)
982
+ #define WINBIO_ANSI_381_POS_LH_FULL_PALM ((WINBIO_BIOMETRIC_SUBTYPE)23)
983
+ #define WINBIO_ANSI_381_POS_LH_WRITERS_PALM ((WINBIO_BIOMETRIC_SUBTYPE)24)
984
+ #define WINBIO_ANSI_381_POS_RH_LOWER_PALM ((WINBIO_BIOMETRIC_SUBTYPE)25)
985
+ #define WINBIO_ANSI_381_POS_RH_UPPER_PALM ((WINBIO_BIOMETRIC_SUBTYPE)26)
986
+ #define WINBIO_ANSI_381_POS_LH_LOWER_PALM ((WINBIO_BIOMETRIC_SUBTYPE)27)
987
+ #define WINBIO_ANSI_381_POS_LH_UPPER_PALM ((WINBIO_BIOMETRIC_SUBTYPE)28)
988
+ #define WINBIO_ANSI_381_POS_RH_OTHER ((WINBIO_BIOMETRIC_SUBTYPE)29)
989
+ #define WINBIO_ANSI_381_POS_LH_OTHER ((WINBIO_BIOMETRIC_SUBTYPE)30)
990
+ #define WINBIO_ANSI_381_POS_RH_INTERDIGITAL ((WINBIO_BIOMETRIC_SUBTYPE)31)
991
+ #define WINBIO_ANSI_381_POS_RH_THENAR ((WINBIO_BIOMETRIC_SUBTYPE)32)
992
+ #define WINBIO_ANSI_381_POS_RH_HYPOTHENAR ((WINBIO_BIOMETRIC_SUBTYPE)33)
993
+ #define WINBIO_ANSI_381_POS_LH_INTERDIGITAL ((WINBIO_BIOMETRIC_SUBTYPE)34)
994
+ #define WINBIO_ANSI_381_POS_LH_THENAR ((WINBIO_BIOMETRIC_SUBTYPE)35)
995
+ #define WINBIO_ANSI_381_POS_LH_HYPOTHENAR ((WINBIO_BIOMETRIC_SUBTYPE)36)
996
+
997
+ //
998
+ // SECTION 7.2.6 -- Impression-Type Codes
999
+ //
1000
+ // Table 7 -- Finger and palm impression types
1001
+ //
1002
+ #define WINBIO_ANSI_381_IMP_TYPE_LIVE_SCAN_PLAIN ((UCHAR)0)
1003
+ #define WINBIO_ANSI_381_IMP_TYPE_LIVE_SCAN_ROLLED ((UCHAR)1)
1004
+ #define WINBIO_ANSI_381_IMP_TYPE_NONLIVE_SCAN_PLAIN ((UCHAR)2)
1005
+ #define WINBIO_ANSI_381_IMP_TYPE_NONLIVE_SCAN_ROLLED ((UCHAR)3)
1006
+ #define WINBIO_ANSI_381_IMP_TYPE_LATENT ((UCHAR)7)
1007
+ #define WINBIO_ANSI_381_IMP_TYPE_SWIPE ((UCHAR)8)
1008
+ #define WINBIO_ANSI_381_IMP_TYPE_LIVE_SCAN_CONTACTLESS ((UCHAR)9)
1009
+
1010
+
1011
+ #if (NTDDI_VERSION >= NTDDI_WIN9)
1012
+
1013
+ //
1014
+ // Sub-factor values for untagged fingerprints.
1015
+ // Microsoft-specific extension -- not part of ANSI/ISO standard
1016
+ //
1017
+ #define WINBIO_FINGER_UNSPECIFIED_POS_01 ((WINBIO_BIOMETRIC_SUBTYPE)0xF5)
1018
+ #define WINBIO_FINGER_UNSPECIFIED_POS_02 ((WINBIO_BIOMETRIC_SUBTYPE)0xF6)
1019
+ #define WINBIO_FINGER_UNSPECIFIED_POS_03 ((WINBIO_BIOMETRIC_SUBTYPE)0xF7)
1020
+ #define WINBIO_FINGER_UNSPECIFIED_POS_04 ((WINBIO_BIOMETRIC_SUBTYPE)0xF8)
1021
+ #define WINBIO_FINGER_UNSPECIFIED_POS_05 ((WINBIO_BIOMETRIC_SUBTYPE)0xF9)
1022
+ #define WINBIO_FINGER_UNSPECIFIED_POS_06 ((WINBIO_BIOMETRIC_SUBTYPE)0xFA)
1023
+ #define WINBIO_FINGER_UNSPECIFIED_POS_07 ((WINBIO_BIOMETRIC_SUBTYPE)0xFB)
1024
+ #define WINBIO_FINGER_UNSPECIFIED_POS_08 ((WINBIO_BIOMETRIC_SUBTYPE)0xFC)
1025
+ #define WINBIO_FINGER_UNSPECIFIED_POS_09 ((WINBIO_BIOMETRIC_SUBTYPE)0xFD)
1026
+ #define WINBIO_FINGER_UNSPECIFIED_POS_10 ((WINBIO_BIOMETRIC_SUBTYPE)0xFE)
1027
+
1028
+ #endif // (NTDDI_VERSION >= NTDDI_WIN9)
1029
+
1030
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1031
+ //
1032
+ // Sub-factor values for face recognition, taken from:
1033
+ //
1034
+ // ANSI/INCITS 385-2004: "Face Recognition Format for Data Interchange"
1035
+ //
1036
+ // 385-2004 defines two types of frontal face images: full resolution and low
1037
+ // resolution. In practice, WinBio will use only full resolution images for
1038
+ // face recognition.
1039
+ //
1040
+ #define WINBIO_ANSI_385_FACE_TYPE_UNKNOWN ((WINBIO_BIOMETRIC_SUBTYPE)0)
1041
+ #define WINBIO_ANSI_385_FACE_FRONTAL_FULL ((WINBIO_BIOMETRIC_SUBTYPE)1)
1042
+ #define WINBIO_ANSI_385_FACE_FRONTAL_TOKEN ((WINBIO_BIOMETRIC_SUBTYPE)2)
1043
+
1044
+ //
1045
+ // Sub-factor values for iris recognition.
1046
+ //
1047
+ // Microsoft-specific extension -- not part of ANSI/ISO standards
1048
+ // (ANSI/INCITS 379-2004 doesn't define any left/right eye values)
1049
+ //
1050
+ #define WINBIO_IRIS_TYPE_UNKNOWN ((WINBIO_BIOMETRIC_SUBTYPE)0)
1051
+ #define WINBIO_IRIS_LEFT_EYE ((WINBIO_BIOMETRIC_SUBTYPE)0xF5)
1052
+ #define WINBIO_IRIS_RIGHT_EYE ((WINBIO_BIOMETRIC_SUBTYPE)0xF6)
1053
+ #define WINBIO_IRIS_UNSPECIFIED_POS_01 ((WINBIO_BIOMETRIC_SUBTYPE)0xF7)
1054
+ #define WINBIO_IRIS_UNSPECIFIED_POS_02 ((WINBIO_BIOMETRIC_SUBTYPE)0xF8)
1055
+ #define WINBIO_IRIS_BOTH_EYES ((WINBIO_BIOMETRIC_SUBTYPE)0xF9)
1056
+ #define WINBIO_IRIS_EITHER_EYE ((WINBIO_BIOMETRIC_SUBTYPE)0xFA)
1057
+
1058
+ //
1059
+ // Sub-factor values for voice recognition.
1060
+ //
1061
+ // Microsoft-specific extension. Each "sub-factor" is a separate utterance.
1062
+ //
1063
+ // An enrollment appication can create multiple templates for a single SID,
1064
+ // each template corresponding to a unique "utterance". The enrollment's
1065
+ // SubFactor value is used to identify a specific utterance. The SubFactor
1066
+ // can be any value between WINBIO_VOICE_MIN_UTTERANCE and WINBIO_VOICE_MAX_UTTERANCE.
1067
+ // After enrollment, WinBioIdentify will return the utterance ID through the
1068
+ // SubFactor return value.
1069
+ //
1070
+ #define WINBIO_VOICE_TYPE_UNKNOWN ((WINBIO_BIOMETRIC_SUBTYPE)0)
1071
+
1072
+ #define WINBIO_VOICE_MIN_UTTERANCE ((WINBIO_BIOMETRIC_SUBTYPE)1)
1073
+ #define WINBIO_VOICE_MAX_UTTERANCE ((WINBIO_BIOMETRIC_SUBTYPE)32)
1074
+
1075
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1076
+
1077
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
1078
+
1079
+ ///////////////////////////////////////////////////////////////////////////////
1080
+ //
1081
+ // Validation header placed at the beginning of every secure buffer.
1082
+ //
1083
+ ///////////////////////////////////////////////////////////////////////////////
1084
+ typedef struct _WINBIO_SECURE_BUFFER_HEADER_V1 {
1085
+ ULONG Type; // WINBIO_SECURE_BUFFER_TYPE_V1
1086
+ ULONG Size; // sizeof(this structure)
1087
+ ULONG Flags; // Buffer creator must set to zero
1088
+ ULONGLONG ValidationTag; // Buffer creator must set
1089
+ } WINBIO_SECURE_BUFFER_HEADER_V1, *PWINBIO_SECURE_BUFFER_HEADER_V1;
1090
+
1091
+ #define WINBIO_SECURE_BUFFER_TYPE_V1 ((ULONG)0xB9BE0001)
1092
+
1093
+ #endif // NTDDI_VERSION >= NTDDI_WIN10_RS2
1094
+
1095
+ //
1096
+ // Sensor pool type identifiers
1097
+ //
1098
+ typedef ULONG WINBIO_POOL_TYPE, *PWINBIO_POOL_TYPE;
1099
+
1100
+ #define WINBIO_POOL_UNKNOWN ((WINBIO_POOL_TYPE)0)
1101
+ #define WINBIO_POOL_SYSTEM ((WINBIO_POOL_TYPE)1)
1102
+ #define WINBIO_POOL_PRIVATE ((WINBIO_POOL_TYPE)2)
1103
+ #define WINBIO_POOL_UNASSIGNED ((WINBIO_POOL_TYPE)3) // Reserved for Microsoft - do not use.
1104
+
1105
+ //
1106
+ // Specific access rights for Biometric Units
1107
+ //
1108
+ #define BIO_UNIT_RAW ((USHORT)0x0001)
1109
+ #define BIO_UNIT_MAINTENANCE ((USHORT)0x0002)
1110
+ #define BIO_UNIT_OPEN_SESSION ((USHORT)0x0004)
1111
+ #define BIO_UNIT_EXTENDED_ACCESS ((USHORT)0x0008)
1112
+ #define BIO_UNIT_ENROLL ((USHORT)0x0010)
1113
+
1114
+ #if (NTDDI_VERSION >= NTDDI_WIN9)
1115
+
1116
+ #define BIO_UNIT_DELETE_TEMPLATE ((USHORT)0x0020)
1117
+ #define BIO_UNIT_CONTROL_UNIT ((USHORT)0x0040)
1118
+
1119
+ #endif // (NTDDI_VERSION >= NTDDI_WIN9)
1120
+
1121
+ //
1122
+ // OpenSession parameter that controls session attributes...
1123
+ //
1124
+ typedef ULONG WINBIO_SESSION_FLAGS, *PWINBIO_SESSION_FLAGS;
1125
+ //
1126
+ // Sensor configuration flags...
1127
+ //
1128
+ #define WINBIO_FLAG_DEFAULT ((WINBIO_SESSION_FLAGS)0x00000000)
1129
+ #define WINBIO_FLAG_BASIC ((WINBIO_SESSION_FLAGS)((WINBIO_SENSOR_BASIC_MODE & 0xFFFF)<<16))
1130
+ #define WINBIO_FLAG_ADVANCED ((WINBIO_SESSION_FLAGS)((WINBIO_SENSOR_ADVANCED_MODE & 0xFFFF)<<16))
1131
+ //
1132
+ // Desired access flags...
1133
+ //
1134
+ #define WINBIO_FLAG_RAW ((WINBIO_SESSION_FLAGS)BIO_UNIT_RAW)
1135
+ #define WINBIO_FLAG_MAINTENANCE ((WINBIO_SESSION_FLAGS)BIO_UNIT_MAINTENANCE)
1136
+
1137
+ //
1138
+ // Well-known database IDs used by WinBioOpenSession
1139
+ //
1140
+ #define WINBIO_DB_DEFAULT ((GUID *)1)
1141
+ #define WINBIO_DB_BOOTSTRAP ((GUID *)2)
1142
+ #define WINBIO_DB_ONCHIP ((GUID *)3)
1143
+
1144
+ //
1145
+ // Identify one of the components in a Biometric Unit's
1146
+ // processing pipeline (for ControlUnit operations)...
1147
+ //
1148
+ typedef ULONG WINBIO_COMPONENT, *PWINBIO_COMPONENT;
1149
+
1150
+ #define WINBIO_COMPONENT_SENSOR ((WINBIO_COMPONENT)1)
1151
+ #define WINBIO_COMPONENT_ENGINE ((WINBIO_COMPONENT)2)
1152
+ #define WINBIO_COMPONENT_STORAGE ((WINBIO_COMPONENT)3)
1153
+
1154
+ //
1155
+ // Event Monitor stuff...
1156
+ //
1157
+ typedef ULONG WINBIO_EVENT_TYPE, *PWINBIO_EVENT_TYPE;
1158
+
1159
+ #ifdef MIDL_PASS
1160
+
1161
+ //
1162
+ // Generic events
1163
+ //
1164
+ const WINBIO_EVENT_TYPE WINBIO_EVENT_ERROR = (WINBIO_EVENT_TYPE)0xFFFFFFFF;
1165
+
1166
+ //
1167
+ // Fingerprint events.
1168
+ //
1169
+ const WINBIO_EVENT_TYPE WINBIO_EVENT_FP_UNCLAIMED = (WINBIO_EVENT_TYPE)0x00000001;
1170
+ const WINBIO_EVENT_TYPE WINBIO_EVENT_FP_UNCLAIMED_IDENTIFY = (WINBIO_EVENT_TYPE)0x00000002;
1171
+
1172
+ typedef union switch(WINBIO_EVENT_TYPE Type) _WINBIO_EVENT {
1173
+
1174
+ case WINBIO_EVENT_FP_UNCLAIMED: struct {
1175
+ WINBIO_UNIT_ID UnitId;
1176
+ WINBIO_REJECT_DETAIL RejectDetail;
1177
+ } Unclaimed;
1178
+
1179
+ case WINBIO_EVENT_FP_UNCLAIMED_IDENTIFY: struct {
1180
+ WINBIO_UNIT_ID UnitId;
1181
+ WINBIO_IDENTITY Identity;
1182
+ WINBIO_BIOMETRIC_SUBTYPE SubFactor;
1183
+ WINBIO_REJECT_DETAIL RejectDetail;
1184
+ } UnclaimedIdentify;
1185
+
1186
+ case WINBIO_EVENT_ERROR: struct {
1187
+ HRESULT ErrorCode;
1188
+ } Error;
1189
+ } WINBIO_EVENT, *PWINBIO_EVENT;
1190
+
1191
+ #else // MIDL_PASS
1192
+
1193
+ //
1194
+ // Generic events
1195
+ //
1196
+ #define WINBIO_EVENT_ERROR ((WINBIO_EVENT_TYPE)0xFFFFFFFF)
1197
+
1198
+ //
1199
+ // Fingerprint events.
1200
+ //
1201
+ #define WINBIO_EVENT_FP_UNCLAIMED ((WINBIO_EVENT_TYPE)0x00000001)
1202
+ #define WINBIO_EVENT_FP_UNCLAIMED_IDENTIFY ((WINBIO_EVENT_TYPE)0x00000002)
1203
+
1204
+
1205
+ //
1206
+ // Event structure passed back to applications.
1207
+ //
1208
+ typedef struct _WINBIO_EVENT {
1209
+ WINBIO_EVENT_TYPE Type;
1210
+ union {
1211
+ struct {
1212
+ WINBIO_UNIT_ID UnitId;
1213
+ WINBIO_REJECT_DETAIL RejectDetail;
1214
+ } Unclaimed;
1215
+ struct {
1216
+ WINBIO_UNIT_ID UnitId;
1217
+ WINBIO_IDENTITY Identity;
1218
+ WINBIO_BIOMETRIC_SUBTYPE SubFactor;
1219
+ WINBIO_REJECT_DETAIL RejectDetail;
1220
+ } UnclaimedIdentify;
1221
+ struct {
1222
+ HRESULT ErrorCode;
1223
+ } Error;
1224
+ } Parameters;
1225
+ } WINBIO_EVENT, *PWINBIO_EVENT;
1226
+
1227
+ #endif // MIDL_PASS
1228
+
1229
+ #if (NTDDI_VERSION >= NTDDI_WIN9)
1230
+ //
1231
+ // Tickets used by data protection and credential release APIs
1232
+ //
1233
+ typedef ULONG64 WINBIO_PROTECTION_TICKET, *PWINBIO_PROTECTION_TICKET;
1234
+
1235
+ #endif // (NTDDI_VERSION >= NTDDI_WIN9)
1236
+
1237
+ #define WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT ((ULONG)78) // Number of ULONG slots in the array
1238
+
1239
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1240
+
1241
+ ///////////////////////////////////////////////////////////////////////////////
1242
+ //
1243
+ // Items required by the presence-monitoring components
1244
+ //
1245
+ ///////////////////////////////////////////////////////////////////////////////
1246
+ //
1247
+ // Types of presence-change events recognized by WinBio
1248
+ //
1249
+ typedef ULONG WINBIO_PRESENCE_CHANGE, *PWINBIO_PRESENCE_CHANGE;
1250
+
1251
+ #define WINBIO_PRESENCE_CHANGE_TYPE_UNKNOWN ((WINBIO_PRESENCE_CHANGE)0)
1252
+ #define WINBIO_PRESENCE_CHANGE_TYPE_UPDATE_ALL ((WINBIO_PRESENCE_CHANGE)1)
1253
+ #define WINBIO_PRESENCE_CHANGE_TYPE_ARRIVE ((WINBIO_PRESENCE_CHANGE)2)
1254
+ #define WINBIO_PRESENCE_CHANGE_TYPE_RECOGNIZE ((WINBIO_PRESENCE_CHANGE)3)
1255
+ #define WINBIO_PRESENCE_CHANGE_TYPE_DEPART ((WINBIO_PRESENCE_CHANGE)4)
1256
+ #define WINBIO_PRESENCE_CHANGE_TYPE_TRACK ((WINBIO_PRESENCE_CHANGE)5)
1257
+
1258
+ #ifdef MIDL_PASS
1259
+
1260
+ //
1261
+ // Factor-specific extended information about a single presence
1262
+ //
1263
+ typedef [switch_type(WINBIO_BIOMETRIC_TYPE)] union _WINBIO_PRESENCE_PROPERTIES {
1264
+
1265
+ [case(WINBIO_NO_TYPE_AVAILABLE)]
1266
+ ULONG32 Null;
1267
+
1268
+ [case(WINBIO_TYPE_FACIAL_FEATURES)]
1269
+ struct {
1270
+ RECT BoundingBox;
1271
+ LONG Distance;
1272
+ struct {
1273
+ WINBIO_UUID AdapterId;
1274
+ ULONG Data[WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT];
1275
+ } OpaqueEngineData;
1276
+ // [...] other face-specific properties
1277
+ } FacialFeatures;
1278
+
1279
+ [case(WINBIO_TYPE_IRIS)]
1280
+ struct {
1281
+ RECT EyeBoundingBox_1;
1282
+ RECT EyeBoundingBox_2;
1283
+ POINT PupilCenter_1;
1284
+ POINT PupilCenter_2;
1285
+ LONG Distance;
1286
+ } Iris;
1287
+ } WINBIO_PRESENCE_PROPERTIES, *PWINBIO_PRESENCE_PROPERTIES;
1288
+
1289
+ //
1290
+ // A single individual...
1291
+ //
1292
+ typedef struct _WINBIO_PRESENCE {
1293
+ WINBIO_BIOMETRIC_TYPE Factor;
1294
+ WINBIO_BIOMETRIC_SUBTYPE SubFactor;
1295
+ HRESULT Status;
1296
+ WINBIO_REJECT_DETAIL RejectDetail;
1297
+ WINBIO_IDENTITY Identity;
1298
+ ULONGLONG TrackingId;
1299
+ WINBIO_PROTECTION_TICKET Ticket;
1300
+ [switch_is(Factor)] WINBIO_PRESENCE_PROPERTIES Properties;
1301
+ struct {
1302
+ ULONG Size;
1303
+ UCHAR Data[32];
1304
+ } Authorization;
1305
+ } WINBIO_PRESENCE, *PWINBIO_PRESENCE;
1306
+
1307
+ #else // MIDL_PASS
1308
+
1309
+ typedef union _WINBIO_PRESENCE_PROPERTIES {
1310
+ struct {
1311
+ RECT BoundingBox;
1312
+ LONG Distance;
1313
+ struct {
1314
+ WINBIO_UUID AdapterId;
1315
+ ULONG Data[WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT];
1316
+ } OpaqueEngineData;
1317
+ // [...] other face-specific properties
1318
+ } FacialFeatures;
1319
+
1320
+ struct {
1321
+ RECT EyeBoundingBox_1;
1322
+ RECT EyeBoundingBox_2;
1323
+ POINT PupilCenter_1;
1324
+ POINT PupilCenter_2;
1325
+ LONG Distance;
1326
+ } Iris;
1327
+
1328
+ /*
1329
+ struct {
1330
+ WINBIO_COORDINATES Location;
1331
+ // [...] other voice-specific properties
1332
+ } Voice;
1333
+ */
1334
+ } WINBIO_PRESENCE_PROPERTIES, *PWINBIO_PRESENCE_PROPERTIES;
1335
+
1336
+ typedef struct _WINBIO_PRESENCE {
1337
+ WINBIO_BIOMETRIC_TYPE Factor;
1338
+ WINBIO_BIOMETRIC_SUBTYPE SubFactor;
1339
+ HRESULT Status;
1340
+ WINBIO_REJECT_DETAIL RejectDetail;
1341
+ WINBIO_IDENTITY Identity;
1342
+ ULONGLONG TrackingId;
1343
+ WINBIO_PROTECTION_TICKET Ticket;
1344
+ WINBIO_PRESENCE_PROPERTIES Properties;
1345
+ struct {
1346
+ ULONG Size;
1347
+ UCHAR Data[32];
1348
+ } Authorization;
1349
+ } WINBIO_PRESENCE, *PWINBIO_PRESENCE;
1350
+
1351
+ #endif // MIDL_PASS
1352
+
1353
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1354
+
1355
+ ///////////////////////////////////////////////////////////////////////////////
1356
+ //
1357
+ // Schemata returned by enumeration APIs...
1358
+ //
1359
+ ///////////////////////////////////////////////////////////////////////////////
1360
+ //
1361
+ // Results from EnumServiceProviders...
1362
+ //
1363
+ typedef struct _WINBIO_BSP_SCHEMA {
1364
+ WINBIO_BIOMETRIC_TYPE BiometricFactor;
1365
+ WINBIO_UUID BspId;
1366
+ WINBIO_STRING Description;
1367
+ WINBIO_STRING Vendor;
1368
+ WINBIO_VERSION Version;
1369
+ } WINBIO_BSP_SCHEMA, *PWINBIO_BSP_SCHEMA;
1370
+
1371
+ //
1372
+ // Results from EnumBiometricUnits...
1373
+ //
1374
+ typedef struct _WINBIO_UNIT_SCHEMA {
1375
+ WINBIO_UNIT_ID UnitId;
1376
+ WINBIO_POOL_TYPE PoolType;
1377
+ WINBIO_BIOMETRIC_TYPE BiometricFactor;
1378
+ WINBIO_BIOMETRIC_SENSOR_SUBTYPE SensorSubType;
1379
+ WINBIO_CAPABILITIES Capabilities;
1380
+ WINBIO_STRING DeviceInstanceId;
1381
+ WINBIO_STRING Description;
1382
+ WINBIO_STRING Manufacturer;
1383
+ WINBIO_STRING Model;
1384
+ WINBIO_STRING SerialNumber;
1385
+ WINBIO_VERSION FirmwareVersion;
1386
+ } WINBIO_UNIT_SCHEMA, *PWINBIO_UNIT_SCHEMA;
1387
+
1388
+ ///////////////////////////////////////////////////////////////////////////////
1389
+ //
1390
+ // Definitions for the 'Attributes' database value...
1391
+ //
1392
+ ///////////////////////////////////////////////////////////////////////////////
1393
+ #define WINBIO_DATABASE_TYPE_MASK ((ULONG)0x0000FFFF)
1394
+ //
1395
+ // Type values...
1396
+ //
1397
+ #define WINBIO_DATABASE_TYPE_FILE ((ULONG)0x00000001)
1398
+ #define WINBIO_DATABASE_TYPE_DBMS ((ULONG)0x00000002)
1399
+ #define WINBIO_DATABASE_TYPE_ONCHIP ((ULONG)0x00000003)
1400
+ #define WINBIO_DATABASE_TYPE_SMARTCARD ((ULONG)0x00000004)
1401
+
1402
+ #define WINBIO_DATABASE_FLAG_MASK ((ULONG)0xFFFF0000)
1403
+ //
1404
+ // Flag values...
1405
+ //
1406
+ #define WINBIO_DATABASE_FLAG_REMOVABLE ((ULONG)0x00010000)
1407
+ #define WINBIO_DATABASE_FLAG_REMOTE ((ULONG)0x00020000)
1408
+
1409
+ //
1410
+ // Results from EnumDatabases...
1411
+ //
1412
+ typedef struct _WINBIO_STORAGE_SCHEMA {
1413
+ WINBIO_BIOMETRIC_TYPE BiometricFactor;
1414
+ WINBIO_UUID DatabaseId;
1415
+ WINBIO_UUID DataFormat;
1416
+ ULONG Attributes;
1417
+ WINBIO_STRING FilePath;
1418
+ WINBIO_STRING ConnectionString;
1419
+ } WINBIO_STORAGE_SCHEMA, *PWINBIO_STORAGE_SCHEMA;
1420
+
1421
+ ///////////////////////////////////////////////////////////////////////////////
1422
+ //
1423
+ // Bit flags for WinBio framework change notification...
1424
+ //
1425
+ typedef ULONG WINBIO_FRAMEWORK_CHANGE_TYPE, *PWINBIO_FRAMEWORK_CHANGE_TYPE;
1426
+
1427
+ #define WINBIO_FRAMEWORK_CHANGE_UNIT ((WINBIO_FRAMEWORK_CHANGE_TYPE)0x00000001)
1428
+
1429
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
1430
+
1431
+ #define WINBIO_FRAMEWORK_CHANGE_UNIT_STATUS ((WINBIO_FRAMEWORK_CHANGE_TYPE)0x00000002)
1432
+
1433
+ #endif // NTDDI_VERSION >= NTDDI_WIN10_RS2
1434
+
1435
+ ///////////////////////////////////////////////////////////////////////////////
1436
+ //
1437
+ // Maximum number of bytes in a single capture...
1438
+ //
1439
+
1440
+ #ifdef MIDL_PASS
1441
+
1442
+ const ULONG WINBIO_MAX_SAMPLE_BUFFER_SIZE = 0x7FFFFFFF;
1443
+
1444
+ #else // MIDL_PASS
1445
+
1446
+ #define WINBIO_MAX_SAMPLE_BUFFER_SIZE ((ULONG)0x7FFFFFFF)
1447
+
1448
+ #endif // MIDL_PASS
1449
+
1450
+ ///////////////////////////////////////////////////////////////////////////////
1451
+ //
1452
+ // Results of asynchronous operations...
1453
+ //
1454
+ ///////////////////////////////////////////////////////////////////////////////
1455
+ //
1456
+ // Enumeration specifying what kind of operation is being completed...
1457
+ //
1458
+ typedef ULONG WINBIO_OPERATION_TYPE, *PWINBIO_OPERATION_TYPE;
1459
+
1460
+ //
1461
+ // Session-based operations...
1462
+ //
1463
+ #define WINBIO_OPERATION_NONE ((WINBIO_OPERATION_TYPE)0)
1464
+ #define WINBIO_OPERATION_OPEN ((WINBIO_OPERATION_TYPE)1)
1465
+ #define WINBIO_OPERATION_CLOSE ((WINBIO_OPERATION_TYPE)2)
1466
+ #define WINBIO_OPERATION_VERIFY ((WINBIO_OPERATION_TYPE)3)
1467
+ #define WINBIO_OPERATION_IDENTIFY ((WINBIO_OPERATION_TYPE)4)
1468
+ #define WINBIO_OPERATION_LOCATE_SENSOR ((WINBIO_OPERATION_TYPE)5)
1469
+ #define WINBIO_OPERATION_ENROLL_BEGIN ((WINBIO_OPERATION_TYPE)6)
1470
+ #define WINBIO_OPERATION_ENROLL_CAPTURE ((WINBIO_OPERATION_TYPE)7)
1471
+ #define WINBIO_OPERATION_ENROLL_COMMIT ((WINBIO_OPERATION_TYPE)8)
1472
+ #define WINBIO_OPERATION_ENROLL_DISCARD ((WINBIO_OPERATION_TYPE)9)
1473
+ #define WINBIO_OPERATION_ENUM_ENROLLMENTS ((WINBIO_OPERATION_TYPE)10)
1474
+ #define WINBIO_OPERATION_DELETE_TEMPLATE ((WINBIO_OPERATION_TYPE)11)
1475
+ #define WINBIO_OPERATION_CAPTURE_SAMPLE ((WINBIO_OPERATION_TYPE)12)
1476
+ #define WINBIO_OPERATION_GET_PROPERTY ((WINBIO_OPERATION_TYPE)13)
1477
+ #define WINBIO_OPERATION_SET_PROPERTY ((WINBIO_OPERATION_TYPE)14)
1478
+ #define WINBIO_OPERATION_GET_EVENT ((WINBIO_OPERATION_TYPE)15)
1479
+ #define WINBIO_OPERATION_LOCK_UNIT ((WINBIO_OPERATION_TYPE)16)
1480
+ #define WINBIO_OPERATION_UNLOCK_UNIT ((WINBIO_OPERATION_TYPE)17)
1481
+ #define WINBIO_OPERATION_CONTROL_UNIT ((WINBIO_OPERATION_TYPE)18)
1482
+ #define WINBIO_OPERATION_CONTROL_UNIT_PRIVILEGED ((WINBIO_OPERATION_TYPE)19)
1483
+
1484
+ //
1485
+ // Framework operations...
1486
+ //
1487
+ #define WINBIO_OPERATION_OPEN_FRAMEWORK ((WINBIO_OPERATION_TYPE)20)
1488
+ #define WINBIO_OPERATION_CLOSE_FRAMEWORK ((WINBIO_OPERATION_TYPE)21)
1489
+ #define WINBIO_OPERATION_ENUM_SERVICE_PROVIDERS ((WINBIO_OPERATION_TYPE)22)
1490
+ #define WINBIO_OPERATION_ENUM_BIOMETRIC_UNITS ((WINBIO_OPERATION_TYPE)23)
1491
+ #define WINBIO_OPERATION_ENUM_DATABASES ((WINBIO_OPERATION_TYPE)24)
1492
+ #define WINBIO_OPERATION_UNIT_ARRIVAL ((WINBIO_OPERATION_TYPE)25)
1493
+ #define WINBIO_OPERATION_UNIT_REMOVAL ((WINBIO_OPERATION_TYPE)26)
1494
+
1495
+ ///////////////////////////////////////////////////////////////////////////////
1496
+ ///////////////////////////////////////////////////////////////////////////////
1497
+
1498
+
1499
+ ///////////////////////////////////////////////////////////////////////////////
1500
+ //
1501
+ // Things related to get/set property operations
1502
+ //
1503
+ typedef ULONG32 WINBIO_PROPERTY_TYPE, *PWINBIO_PROPERTY_TYPE;
1504
+
1505
+ #define WINBIO_PROPERTY_TYPE_SESSION ((WINBIO_PROPERTY_TYPE)1)
1506
+ #define WINBIO_PROPERTY_TYPE_UNIT ((WINBIO_PROPERTY_TYPE)2)
1507
+ #define WINBIO_PROPERTY_TYPE_TEMPLATE ((WINBIO_PROPERTY_TYPE)3)
1508
+
1509
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1510
+
1511
+ #define WINBIO_PROPERTY_TYPE_ACCOUNT ((WINBIO_PROPERTY_TYPE)4)
1512
+
1513
+ #ifdef MIDL_PASS
1514
+
1515
+ //
1516
+ // Limit the size of an ingoing property buffer for the server
1517
+ //
1518
+ const ULONG WINBIO_MAX_SET_PROPERTY_BUFFER_SIZE = 0x1000;
1519
+
1520
+ #else // MIDL_PASS
1521
+
1522
+ #define WINBIO_MAX_SET_PROPERTY_BUFFER_SIZE ((ULONG)0x1000)
1523
+
1524
+ #endif // MIDL_PASS
1525
+
1526
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1527
+
1528
+ typedef ULONG32 WINBIO_PROPERTY_ID, *PWINBIO_PROPERTY_ID;
1529
+
1530
+
1531
+ ///////////////////////////////////////////////////////////////////////////
1532
+ //
1533
+ // WINBIO_PROPERTY_TYPE_SESSION properties...
1534
+ //
1535
+ ///////////////////////////////////////////////////////////////////////////
1536
+ //
1537
+ // (None)
1538
+ //
1539
+
1540
+
1541
+ ///////////////////////////////////////////////////////////////////////////
1542
+ //
1543
+ // WINBIO_PROPERTY_TYPE_UNIT properties...
1544
+ //
1545
+ ///////////////////////////////////////////////////////////////////////////
1546
+ //
1547
+ // WINBIO_PROPERTY_SAMPLE_HINT
1548
+ //
1549
+ // Description:
1550
+ // Estimate of the maximum number of good biometric
1551
+ // samples required to complete an enrollment template.
1552
+ //
1553
+ // Access:
1554
+ // Read-only
1555
+ //
1556
+ // Inputs:
1557
+ // SessionHandle - must be valid
1558
+ // UnitId - must be valid
1559
+ // Identity - must be NULL
1560
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
1561
+ //
1562
+ // Outputs:
1563
+ // PropertyBuffer - points to a ULONG buffer containing the hint
1564
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(ULONG)
1565
+ //
1566
+ #define WINBIO_PROPERTY_SAMPLE_HINT ((WINBIO_PROPERTY_ID)1)
1567
+
1568
+
1569
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1570
+
1571
+ ///////////////////////////////////////////////////////////////////////////////
1572
+ //
1573
+ // WINBIO_PROPERTY_EXTENDED_SENSOR_INFO
1574
+ //
1575
+ // Description:
1576
+ // Returns extended information about the capabilities
1577
+ // and attributes of the Sensor component connected to
1578
+ // a specific biometric unit.
1579
+ //
1580
+ // Access:
1581
+ // Read-only
1582
+ //
1583
+ // Inputs:
1584
+ // SessionHandle - must be valid
1585
+ // UnitId - must be valid
1586
+ // Identity - must be NULL
1587
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
1588
+ //
1589
+ // Outputs:
1590
+ // PropertyBuffer - points to a buffer containing a WINBIO_EXTENDED_SENSOR_INFO structure
1591
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_EXTENDED_SENSOR_INFO)
1592
+ //
1593
+ #define WINBIO_PROPERTY_EXTENDED_SENSOR_INFO ((WINBIO_PROPERTY_ID)2)
1594
+
1595
+ //
1596
+ // Enumeration for mandatory orientation...
1597
+ //
1598
+ typedef ULONG WINBIO_ORIENTATION, *PWINBIO_ORIENTATION;
1599
+
1600
+ #define WINBIO_ORIENTATION_UNSPECIFIED ((WINBIO_ORIENTATION)0)
1601
+ #define WINBIO_ORIENTATION_LANDSCAPE ((WINBIO_ORIENTATION)1)
1602
+ #define WINBIO_ORIENTATION_PORTRAIT ((WINBIO_ORIENTATION)2)
1603
+ #define WINBIO_ORIENTATION_ANY ((WINBIO_ORIENTATION)3)
1604
+
1605
+ #ifdef MIDL_PASS
1606
+
1607
+ //
1608
+ // Factor-specific extended information about a single adapter
1609
+ //
1610
+ typedef struct _WINBIO_EXTENDED_SENSOR_INFO {
1611
+ WINBIO_CAPABILITIES GenericSensorCapabilities;
1612
+
1613
+ WINBIO_BIOMETRIC_TYPE Factor;
1614
+ [switch_is(Factor)] union
1615
+ {
1616
+ [case(WINBIO_NO_TYPE_AVAILABLE)]
1617
+ ULONG32 Null;
1618
+
1619
+ [case(WINBIO_TYPE_FACIAL_FEATURES)]
1620
+ struct {
1621
+ RECT FrameSize; // Camera frame size, in pixels; (top, left) fields always (0,0)
1622
+ POINT FrameOffset; // Offset of face camera frame from video camera, in pixels. (0, 0) indicates complete overlap
1623
+ WINBIO_ORIENTATION MandatoryOrientation;
1624
+ struct {
1625
+ WCHAR ColorSensorId[260];
1626
+ WCHAR InfraredSensorId[260];
1627
+ UINT32 InfraredSensorRotationAngle;
1628
+ } HardwareInfo;
1629
+ } FacialFeatures;
1630
+
1631
+ [case(WINBIO_TYPE_FINGERPRINT)]
1632
+ struct {
1633
+ ULONG32 Reserved; // Reserved for future expansion
1634
+ } Fingerprint;
1635
+
1636
+ [case(WINBIO_TYPE_IRIS)]
1637
+ struct {
1638
+ RECT FrameSize; // Iris camera frame size, in pixels; (top, left) fields always (0,0)
1639
+ POINT FrameOffset; // Offset of iris camera frame from video camera, in pixels. (0, 0) indicates complete overlap
1640
+ WINBIO_ORIENTATION MandatoryOrientation;
1641
+ } Iris;
1642
+
1643
+ [case(WINBIO_TYPE_VOICE)]
1644
+ struct {
1645
+ ULONG32 Reserved; // Reserved for future expansion
1646
+ } Voice;
1647
+ } Specific;
1648
+ } WINBIO_EXTENDED_SENSOR_INFO, *PWINBIO_EXTENDED_SENSOR_INFO;
1649
+
1650
+ #else // MIDL_PASS
1651
+
1652
+ typedef struct _WINBIO_EXTENDED_SENSOR_INFO {
1653
+ WINBIO_CAPABILITIES GenericSensorCapabilities;
1654
+
1655
+ WINBIO_BIOMETRIC_TYPE Factor;
1656
+ union
1657
+ {
1658
+ ULONG32 Null;
1659
+
1660
+ struct {
1661
+ RECT FrameSize; // Camera frame size, in pixels; (top, left) fields always (0,0)
1662
+ POINT FrameOffset; // Offset of face camera frame from video camera, in pixels. (0, 0) indicates complete overlap
1663
+ WINBIO_ORIENTATION MandatoryOrientation;
1664
+ struct {
1665
+ WCHAR ColorSensorId[260];
1666
+ WCHAR InfraredSensorId[260];
1667
+ UINT32 InfraredSensorRotationAngle;
1668
+ } HardwareInfo;
1669
+ } FacialFeatures;
1670
+
1671
+ struct {
1672
+ ULONG32 Reserved; // Reserved for future expansion
1673
+ } Fingerprint;
1674
+
1675
+ struct {
1676
+ RECT FrameSize; // Iris camera frame size, in pixels; (top, left) fields always (0,0)
1677
+ POINT FrameOffset; // Offset of iris camera frame from video camera, in pixels. (0, 0) indicates complete overlap
1678
+ WINBIO_ORIENTATION MandatoryOrientation;
1679
+ } Iris;
1680
+
1681
+ struct {
1682
+ ULONG32 Reserved; // Reserved for future expansion
1683
+ } Voice;
1684
+ } Specific;
1685
+ } WINBIO_EXTENDED_SENSOR_INFO, *PWINBIO_EXTENDED_SENSOR_INFO;
1686
+
1687
+ #endif // MIDL_PASS
1688
+
1689
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1690
+
1691
+ ///////////////////////////////////////////////////////////////////////////////
1692
+ //
1693
+ // WINBIO_PROPERTY_EXTENDED_ENGINE_INFO
1694
+ //
1695
+ // Description:
1696
+ // Returns extended information about the capabilities
1697
+ // and attributes of the Engine component connected to
1698
+ // a specific biometric unit.
1699
+ //
1700
+ // Access:
1701
+ // Read-only
1702
+ //
1703
+ // Inputs:
1704
+ // SessionHandle - must be valid
1705
+ // UnitId - must be valid
1706
+ // Identity - must be NULL
1707
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
1708
+ //
1709
+ // Outputs:
1710
+ // PropertyBuffer - points to a buffer containing a WINBIO_EXTENDED_ENGINE_INFO structure
1711
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_EXTENDED_ENGINE_INFO)
1712
+ //
1713
+ #define WINBIO_PROPERTY_EXTENDED_ENGINE_INFO ((WINBIO_PROPERTY_ID)3)
1714
+
1715
+ //
1716
+ // Generic Engine Capabilities
1717
+ //
1718
+ #define WINBIO_ENG_CAP_ITERATIVE_IMPROVEMENT ((WINBIO_CAPABILITIES)0x00000001)
1719
+ #define WINBIO_ENG_CAP_SPOOF_DETECTION ((WINBIO_CAPABILITIES)0x00000002)
1720
+
1721
+ #ifdef MIDL_PASS
1722
+
1723
+ typedef struct _WINBIO_EXTENDED_ENGINE_INFO {
1724
+ WINBIO_CAPABILITIES GenericEngineCapabilities;
1725
+
1726
+ WINBIO_BIOMETRIC_TYPE Factor;
1727
+ [switch_is(Factor)] union
1728
+ {
1729
+ [case(WINBIO_NO_TYPE_AVAILABLE)]
1730
+ ULONG32 Null;
1731
+
1732
+ [case(WINBIO_TYPE_FACIAL_FEATURES)]
1733
+ struct {
1734
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1735
+ struct {
1736
+ ULONG32 Null;
1737
+ } EnrollmentRequirements;
1738
+ } FacialFeatures;
1739
+
1740
+ [case(WINBIO_TYPE_FINGERPRINT)]
1741
+ struct {
1742
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1743
+ struct {
1744
+ ULONG GeneralSamples;
1745
+ ULONG Center;
1746
+ ULONG TopEdge;
1747
+ ULONG BottomEdge;
1748
+ ULONG LeftEdge;
1749
+ ULONG RightEdge;
1750
+ } EnrollmentRequirements;
1751
+ } Fingerprint;
1752
+
1753
+ [case(WINBIO_TYPE_IRIS)]
1754
+ struct {
1755
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1756
+ struct {
1757
+ ULONG32 Null;
1758
+ } EnrollmentRequirements;
1759
+ } Iris;
1760
+
1761
+ [case(WINBIO_TYPE_VOICE)]
1762
+ struct {
1763
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1764
+ struct {
1765
+ ULONG32 Null;
1766
+ } EnrollmentRequirements;
1767
+ } Voice;
1768
+ } Specific;
1769
+ } WINBIO_EXTENDED_ENGINE_INFO, *PWINBIO_EXTENDED_ENGINE_INFO;
1770
+
1771
+ #else // MIDL_PASS
1772
+
1773
+ typedef struct _WINBIO_EXTENDED_ENGINE_INFO {
1774
+ WINBIO_CAPABILITIES GenericEngineCapabilities;
1775
+
1776
+ WINBIO_BIOMETRIC_TYPE Factor;
1777
+ union
1778
+ {
1779
+ ULONG32 Null;
1780
+
1781
+ struct {
1782
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1783
+ struct {
1784
+ ULONG32 Null;
1785
+ } EnrollmentRequirements;
1786
+ } FacialFeatures;
1787
+
1788
+ struct {
1789
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1790
+ struct {
1791
+ ULONG GeneralSamples;
1792
+ ULONG Center;
1793
+ ULONG TopEdge;
1794
+ ULONG BottomEdge;
1795
+ ULONG LeftEdge;
1796
+ ULONG RightEdge;
1797
+ } EnrollmentRequirements;
1798
+ } Fingerprint;
1799
+
1800
+ struct {
1801
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1802
+ struct {
1803
+ ULONG32 Null;
1804
+ } EnrollmentRequirements;
1805
+ } Iris;
1806
+
1807
+ struct {
1808
+ WINBIO_CAPABILITIES Capabilities; // Reserved for future expansion
1809
+ struct {
1810
+ ULONG32 Null;
1811
+ } EnrollmentRequirements;
1812
+ } Voice;
1813
+ } Specific;
1814
+ } WINBIO_EXTENDED_ENGINE_INFO, *PWINBIO_EXTENDED_ENGINE_INFO;
1815
+
1816
+ #endif // MIDL_PASS
1817
+
1818
+ ///////////////////////////////////////////////////////////////////////////////
1819
+ //
1820
+ // WINBIO_PROPERTY_EXTENDED_STORAGE_INFO
1821
+ //
1822
+ // Description:
1823
+ // Returns extended information about the capabilities
1824
+ // and attributes of the Storage component connected to
1825
+ // a specific biometric unit.
1826
+ //
1827
+ // Access:
1828
+ // Read-only
1829
+ //
1830
+ // Inputs:
1831
+ // SessionHandle - must be valid
1832
+ // UnitId - must be valid
1833
+ // Identity - must be NULL
1834
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
1835
+ //
1836
+ // Outputs:
1837
+ // PropertyBuffer - points to a buffer containing a WINBIO_EXTENDED_STORAGE_INFO structure
1838
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_EXTENDED_STORAGE_INFO)
1839
+ //
1840
+ #define WINBIO_PROPERTY_EXTENDED_STORAGE_INFO ((WINBIO_PROPERTY_ID)4)
1841
+
1842
+ #ifdef MIDL_PASS
1843
+
1844
+ typedef struct _WINBIO_EXTENDED_STORAGE_INFO {
1845
+ WINBIO_CAPABILITIES GenericStorageCapabilities;
1846
+
1847
+ WINBIO_BIOMETRIC_TYPE Factor;
1848
+ [switch_is(Factor)] union
1849
+ {
1850
+ [case(WINBIO_NO_TYPE_AVAILABLE)]
1851
+ ULONG32 Null;
1852
+
1853
+ [case(WINBIO_TYPE_FACIAL_FEATURES)]
1854
+ struct {
1855
+ WINBIO_CAPABILITIES Capabilities;
1856
+ // Reserved for future expansion
1857
+ } FacialFeatures;
1858
+
1859
+ [case(WINBIO_TYPE_FINGERPRINT)]
1860
+ struct {
1861
+ WINBIO_CAPABILITIES Capabilities;
1862
+ // Reserved for future expansion
1863
+ } Fingerprint;
1864
+
1865
+ [case(WINBIO_TYPE_IRIS)]
1866
+ struct {
1867
+ WINBIO_CAPABILITIES Capabilities;
1868
+ // Reserved for future expansion
1869
+ } Iris;
1870
+
1871
+ [case(WINBIO_TYPE_VOICE)]
1872
+ struct {
1873
+ WINBIO_CAPABILITIES Capabilities;
1874
+ // Reserved for future expansion
1875
+ } Voice;
1876
+ } Specific;
1877
+ } WINBIO_EXTENDED_STORAGE_INFO, *PWINBIO_EXTENDED_STORAGE_INFO;
1878
+
1879
+ #else // MIDL_PASS
1880
+
1881
+ typedef struct _WINBIO_EXTENDED_STORAGE_INFO {
1882
+ WINBIO_CAPABILITIES GenericStorageCapabilities;
1883
+
1884
+ WINBIO_BIOMETRIC_TYPE Factor;
1885
+ union
1886
+ {
1887
+ ULONG32 Null;
1888
+
1889
+ struct {
1890
+ WINBIO_CAPABILITIES Capabilities;
1891
+ // Reserved for future expansion
1892
+ } FacialFeatures;
1893
+
1894
+ struct {
1895
+ WINBIO_CAPABILITIES Capabilities;
1896
+ // Reserved for future expansion
1897
+ } Fingerprint;
1898
+
1899
+ struct {
1900
+ WINBIO_CAPABILITIES Capabilities;
1901
+ // Reserved for future expansion
1902
+ } Iris;
1903
+
1904
+ struct {
1905
+ WINBIO_CAPABILITIES Capabilities;
1906
+ // Reserved for future expansion
1907
+ } Voice;
1908
+ } Specific;
1909
+ } WINBIO_EXTENDED_STORAGE_INFO, *PWINBIO_EXTENDED_STORAGE_INFO;
1910
+
1911
+ #endif // MIDL_PASS
1912
+
1913
+ ///////////////////////////////////////////////////////////////////////////////
1914
+ //
1915
+ // WINBIO_PROPERTY_EXTENDED_ENROLLMENT_STATUS
1916
+ //
1917
+ // Description:
1918
+ // Returns extended information about the status of an
1919
+ // in-progress enrollment on a particular biometric unit.
1920
+ // If no enrollment is in progress on the BU, it returns
1921
+ // WINBIO_E_INVALID_OPERATION in the 'TemplateStatus' field.
1922
+ //
1923
+ // Access:
1924
+ // Read-only
1925
+ //
1926
+ // Inputs:
1927
+ // SessionHandle - must be valid
1928
+ // UnitId - must be valid
1929
+ // Identity - must be NULL
1930
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
1931
+ //
1932
+ // Outputs:
1933
+ // PropertyBuffer - points to a buffer containing a WINBIO_EXTENDED_ENROLLMENT_STATUS structure
1934
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_EXTENDED_ENROLLMENT_STATUS)
1935
+ //
1936
+ #define WINBIO_PROPERTY_EXTENDED_ENROLLMENT_STATUS ((WINBIO_PROPERTY_ID)5)
1937
+
1938
+ #ifdef MIDL_PASS
1939
+
1940
+ typedef struct _WINBIO_EXTENDED_ENROLLMENT_STATUS {
1941
+ HRESULT TemplateStatus;
1942
+ WINBIO_REJECT_DETAIL RejectDetail;
1943
+ ULONG PercentComplete;
1944
+
1945
+ WINBIO_BIOMETRIC_TYPE Factor;
1946
+ WINBIO_BIOMETRIC_SUBTYPE SubFactor;
1947
+ [switch_is(Factor)] union
1948
+ {
1949
+ [case(WINBIO_NO_TYPE_AVAILABLE)]
1950
+ ULONG32 Null;
1951
+
1952
+ [case(WINBIO_TYPE_FACIAL_FEATURES)]
1953
+ struct {
1954
+ RECT BoundingBox;
1955
+ LONG Distance;
1956
+ struct {
1957
+ WINBIO_UUID AdapterId;
1958
+ ULONG Data[WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT];
1959
+ } OpaqueEngineData;
1960
+ } FacialFeatures;
1961
+
1962
+ [case(WINBIO_TYPE_FINGERPRINT)]
1963
+ struct {
1964
+ ULONG GeneralSamples;
1965
+ ULONG Center;
1966
+ ULONG TopEdge;
1967
+ ULONG BottomEdge;
1968
+ ULONG LeftEdge;
1969
+ ULONG RightEdge;
1970
+ } Fingerprint;
1971
+
1972
+ [case(WINBIO_TYPE_IRIS)]
1973
+ struct {
1974
+ RECT EyeBoundingBox_1;
1975
+ RECT EyeBoundingBox_2;
1976
+ POINT PupilCenter_1;
1977
+ POINT PupilCenter_2;
1978
+ LONG Distance;
1979
+ ULONG GridPointCompletionPercent;
1980
+ UINT16 GridPointIndex;
1981
+ struct
1982
+ {
1983
+ double X;
1984
+ double Y;
1985
+ double Z;
1986
+ } Point3D;
1987
+ BOOL StopCaptureAndShowCriticalFeedback;
1988
+ } Iris;
1989
+
1990
+ [case(WINBIO_TYPE_VOICE)]
1991
+ struct {
1992
+ ULONG32 Reserved; // Reserved for future expansion
1993
+ } Voice;
1994
+ } Specific;
1995
+ } WINBIO_EXTENDED_ENROLLMENT_STATUS, *PWINBIO_EXTENDED_ENROLLMENT_STATUS;
1996
+
1997
+ #else // MIDL_PASS
1998
+
1999
+ typedef struct _WINBIO_EXTENDED_ENROLLMENT_STATUS {
2000
+ HRESULT TemplateStatus;
2001
+ WINBIO_REJECT_DETAIL RejectDetail;
2002
+ ULONG PercentComplete;
2003
+
2004
+ WINBIO_BIOMETRIC_TYPE Factor;
2005
+ WINBIO_BIOMETRIC_SUBTYPE SubFactor;
2006
+ union
2007
+ {
2008
+ ULONG32 Null;
2009
+
2010
+ struct {
2011
+ RECT BoundingBox;
2012
+ LONG Distance;
2013
+ struct {
2014
+ WINBIO_UUID AdapterId;
2015
+ ULONG Data[WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT];
2016
+ } OpaqueEngineData;
2017
+ } FacialFeatures;
2018
+
2019
+ struct {
2020
+ ULONG GeneralSamples;
2021
+ ULONG Center;
2022
+ ULONG TopEdge;
2023
+ ULONG BottomEdge;
2024
+ ULONG LeftEdge;
2025
+ ULONG RightEdge;
2026
+ } Fingerprint;
2027
+
2028
+ struct {
2029
+ RECT EyeBoundingBox_1;
2030
+ RECT EyeBoundingBox_2;
2031
+ POINT PupilCenter_1;
2032
+ POINT PupilCenter_2;
2033
+ LONG Distance;
2034
+ ULONG GridPointCompletionPercent;
2035
+ UINT16 GridPointIndex;
2036
+ struct
2037
+ {
2038
+ double X;
2039
+ double Y;
2040
+ double Z;
2041
+ } Point3D;
2042
+ BOOL StopCaptureAndShowCriticalFeedback;
2043
+ } Iris;
2044
+
2045
+ struct {
2046
+ ULONG32 Reserved; // Reserved for future expansion
2047
+ } Voice;
2048
+ } Specific;
2049
+ } WINBIO_EXTENDED_ENROLLMENT_STATUS, *PWINBIO_EXTENDED_ENROLLMENT_STATUS;
2050
+
2051
+ #endif // MIDL_PASS
2052
+
2053
+ ///////////////////////////////////////////////////////////////////////////////
2054
+ //
2055
+ // WINBIO_PROPERTY_EXTENDED_UNIT_STATUS
2056
+ //
2057
+ // Description:
2058
+ // Returns extended information about the current status
2059
+ // of a specific biometric unit.
2060
+ //
2061
+ // Access:
2062
+ // Read-only
2063
+ //
2064
+ // Inputs:
2065
+ // SessionHandle - must be valid
2066
+ // UnitId - must be valid
2067
+ // Identity - must be NULL
2068
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
2069
+ //
2070
+ // Outputs:
2071
+ // PropertyBuffer - points to a buffer containing a WINBIO_EXTENDED_UNIT_STATUS structure
2072
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_EXTENDED_UNIT_STATUS)
2073
+ //
2074
+ #define WINBIO_PROPERTY_EXTENDED_UNIT_STATUS ((WINBIO_PROPERTY_ID)6)
2075
+
2076
+ typedef struct _WINBIO_EXTENDED_UNIT_STATUS {
2077
+ WINBIO_SENSOR_STATUS Availability;
2078
+ ULONG ReasonCode;
2079
+ } WINBIO_EXTENDED_UNIT_STATUS, *PWINBIO_EXTENDED_UNIT_STATUS;
2080
+
2081
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
2082
+
2083
+ ///////////////////////////////////////////////////////////////////////////////
2084
+ //
2085
+ // WINBIO_PROPERTY_UNIT_SECURITY_LEVEL
2086
+ //
2087
+ // Description:
2088
+ // Returns the security level a specific biometric unit
2089
+ // is running as.
2090
+ //
2091
+ // Access:
2092
+ // Read-only
2093
+ //
2094
+ // Inputs:
2095
+ // SessionHandle - must be valid
2096
+ // UnitId - must be valid
2097
+ // Identity - must be NULL
2098
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
2099
+ //
2100
+ // Outputs:
2101
+ // PropertyBuffer - points to a WINBIO_UNIT_SECURITY_LEVEL buffer containing the level
2102
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_UNIT_SECURITY_LEVEL)
2103
+ //
2104
+ #define WINBIO_PROPERTY_UNIT_SECURITY_LEVEL ((WINBIO_PROPERTY_ID)7)
2105
+
2106
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS5)
2107
+
2108
+ #if (NTDDI_VERSION >= NTDDI_WIN10_19H1)
2109
+
2110
+ ///////////////////////////////////////////////////////////////////////////////
2111
+ //
2112
+ // WINBIO_PROPERTY_FP_BU_STATE
2113
+ //
2114
+ // Description:
2115
+ // Returns information on whether a FP sensor is currently
2116
+ // attached to the machine, in addition to any relevant FP
2117
+ // biometric unit (BU) creation error codes.
2118
+ //
2119
+ // Access:
2120
+ // Read-only
2121
+ //
2122
+ // Inputs:
2123
+ // SessionHandle - must be valid
2124
+ // UnitId - must be zero
2125
+ // Identity - must be NULL
2126
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
2127
+ //
2128
+ // Outputs:
2129
+ // PropertyBuffer - points to buffer containing a WINBIO_FP_BU_STATE structure
2130
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_FP_BU_STATE)
2131
+ //
2132
+ #define WINBIO_PROPERTY_FP_BU_STATE ((WINBIO_PROPERTY_ID)8)
2133
+
2134
+ typedef struct _WINBIO_FP_BU_STATE {
2135
+ BOOL SensorAttached;
2136
+ HRESULT CreationResult;
2137
+ } WINBIO_FP_BU_STATE, *PWINBIO_FP_BU_STATE;
2138
+
2139
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_19H1)
2140
+
2141
+ #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
2142
+
2143
+ ///////////////////////////////////////////////////////////////////////////////
2144
+ //
2145
+ // WINBIO_PROPERTY_FP_IS_IMPROVING
2146
+ //
2147
+ // Description:
2148
+ // Returns information on whether a FP sensor is currently
2149
+ // set to improve recognition through extra enrollment templates.
2150
+ // Duplicate enrollment records are permitted while this is set.
2151
+ //
2152
+ // Access:
2153
+ // Read-only
2154
+ //
2155
+ // Inputs:
2156
+ // SessionHandle - must be valid
2157
+ // UnitId - must be valid
2158
+ // Identity - must be NULL
2159
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
2160
+ //
2161
+ // Outputs:
2162
+ // PropertyBuffer - points to BOOL buffer containing the improvement status
2163
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(BOOL)
2164
+ //
2165
+ #define WINBIO_PROPERTY_FP_IS_IMPROVING ((WINBIO_PROPERTY_ID)9)
2166
+
2167
+ #define WINBIO_OPERATION_IMPROVE_BEGIN ((WINBIO_OPERATION_TYPE)35)
2168
+ #define WINBIO_OPERATION_IMPROVE_END ((WINBIO_OPERATION_TYPE)36)
2169
+
2170
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_VB)
2171
+
2172
+ ///////////////////////////////////////////////////////////////////////////
2173
+ //
2174
+ // WINBIO_PROPERTY_TYPE_TEMPLATE properties...
2175
+ //
2176
+ ///////////////////////////////////////////////////////////////////////////
2177
+ //
2178
+ // (None)
2179
+ //
2180
+
2181
+
2182
+ ///////////////////////////////////////////////////////////////////////////
2183
+ //
2184
+ // WINBIO_PROPERTY_TYPE_ACCOUNT properties...
2185
+ //
2186
+ ///////////////////////////////////////////////////////////////////////////
2187
+ //
2188
+ // WINBIO_PROPERTY_ANTI_SPOOF_POLICY
2189
+ //
2190
+ // Description:
2191
+ // Gets or sets the values of the anti-spoofing policy for a
2192
+ // specific user account.
2193
+ //
2194
+ // Performing a 'Get' operation with the wildcard identity returns
2195
+ // the system default value of this policy.
2196
+ //
2197
+ // Access:
2198
+ // Read/Write
2199
+ //
2200
+ // Non-privileged users can only modify their own policy setting. If
2201
+ // the 'Identity' argument refers to another account -- or contains a
2202
+ // wildcard identifier value -- WinBioSetProperty will fail.
2203
+ //
2204
+ // Inputs:
2205
+ // SessionHandle - must be valid
2206
+ // UnitId - must be zero
2207
+ // Identity - account SID to be queried or changed. If NULL, the
2208
+ // SID associated with SessionHandle will be used.
2209
+ // SubFactor - must be WINBIO_SUBTYPE_NO_INFORMATION
2210
+ //
2211
+ // Outputs:
2212
+ // PropertyBuffer - points to a buffer containing a WINBIO_ANTI_SPOOF_POLICY structure
2213
+ // PropertyBufferSize - points to a SIZE_T variable containing sizeof(WINBIO_ANTI_SPOOF_POLICY)
2214
+ //
2215
+ #define WINBIO_PROPERTY_ANTI_SPOOF_POLICY ((WINBIO_PROPERTY_ID)1)
2216
+
2217
+ typedef enum _WINBIO_ANTI_SPOOF_POLICY_ACTION
2218
+ {
2219
+ WINBIO_ANTI_SPOOF_DISABLE = 0x00000000,
2220
+ WINBIO_ANTI_SPOOF_ENABLE = 0x00000001,
2221
+ WINBIO_ANTI_SPOOF_REMOVE = 0x00000002,
2222
+ } WINBIO_ANTI_SPOOF_POLICY_ACTION, *PWINBIO_ANTI_SPOOF_POLICY_ACTION;
2223
+
2224
+ typedef enum _WINBIO_POLICY_SOURCE
2225
+ {
2226
+ WINBIO_POLICY_UNKNOWN = 0x00000000,
2227
+ WINBIO_POLICY_DEFAULT = 0x00000001,
2228
+ WINBIO_POLICY_LOCAL = 0x00000002,
2229
+ WINBIO_POLICY_ADMIN = 0x00000003,
2230
+ } WINBIO_POLICY_SOURCE, *PWINBIO_POLICY_SOURCE;
2231
+
2232
+
2233
+ typedef struct _WINBIO_ANTI_SPOOF_POLICY {
2234
+ WINBIO_ANTI_SPOOF_POLICY_ACTION Action;
2235
+ WINBIO_POLICY_SOURCE Source;
2236
+ } WINBIO_ANTI_SPOOF_POLICY, *PWINBIO_ANTI_SPOOF_POLICY;
2237
+
2238
+
2239
+ #if (NTDDI_VERSION >= NTDDI_WIN9)
2240
+
2241
+ ///////////////////////////////////////////////////////////////////////////////
2242
+ //
2243
+ // Async ticket operations...
2244
+ //
2245
+ ///////////////////////////////////////////////////////////////////////////////
2246
+ #define WINBIO_OPERATION_IDENTIFY_AND_RELEASE_TICKET ((WINBIO_OPERATION_TYPE)27)
2247
+ #define WINBIO_OPERATION_VERIFY_AND_RELEASE_TICKET ((WINBIO_OPERATION_TYPE)28)
2248
+
2249
+ #endif // (NTDDI_VERSION >= NTDDI_WIN9)
2250
+
2251
+
2252
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
2253
+
2254
+ ///////////////////////////////////////////////////////////////////////////////
2255
+ //
2256
+ // Facial features operations...
2257
+ //
2258
+ ///////////////////////////////////////////////////////////////////////////////
2259
+ #define WINBIO_OPERATION_MONITOR_PRESENCE ((WINBIO_OPERATION_TYPE)29)
2260
+ #define WINBIO_OPERATION_ENROLL_SELECT ((WINBIO_OPERATION_TYPE)30)
2261
+
2262
+ #endif // (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
2263
+
2264
+ ///////////////////////////////////////////////////////////////////////////////
2265
+ //
2266
+ // Credential management
2267
+ //
2268
+ ///////////////////////////////////////////////////////////////////////////////
2269
+
2270
+ typedef enum _WINBIO_CREDENTIAL_TYPE
2271
+ {
2272
+ WINBIO_CREDENTIAL_PASSWORD = 0x00000001,
2273
+ WINBIO_CREDENTIAL_ALL = 0xffffffff,
2274
+ } WINBIO_CREDENTIAL_TYPE;
2275
+
2276
+ typedef enum _WINBIO_CREDENTIAL_FORMAT
2277
+ {
2278
+ WINBIO_PASSWORD_GENERIC = 0x00000001,
2279
+ WINBIO_PASSWORD_PACKED = 0x00000002,
2280
+ WINBIO_PASSWORD_PROTECTED = 0x00000003,
2281
+ } WINBIO_CREDENTIAL_FORMAT;
2282
+
2283
+ typedef enum _WINBIO_CREDENTIAL_STATE {
2284
+ WINBIO_CREDENTIAL_NOT_SET = 0x00000001,
2285
+ WINBIO_CREDENTIAL_SET = 0x00000002,
2286
+ } WINBIO_CREDENTIAL_STATE, *PWINBIO_CREDENTIAL_STATE;
2287
+
2288
+ ///////////////////////////////////////////////////////////////////////////////
2289
+ ///////////////////////////////////////////////////////////////////////////////
2290
+ ///////////////////////////////////////////////////////////////////////////////
2291
+
2292
+
2293
+ ///////////////////////////////////////////////////////////////////////////////
2294
+ //
2295
+ // Settings
2296
+ //
2297
+ ///////////////////////////////////////////////////////////////////////////////
2298
+
2299
+ typedef ULONG32 WINBIO_SETTING_SOURCE_TYPE, *PWINBIO_SETTING_SOURCE_TYPE;
2300
+
2301
+ #define WINBIO_SETTING_SOURCE_INVALID ((WINBIO_SETTING_SOURCE_TYPE)0)
2302
+ #define WINBIO_SETTING_SOURCE_DEFAULT ((WINBIO_SETTING_SOURCE_TYPE)1)
2303
+ #define WINBIO_SETTING_SOURCE_POLICY ((WINBIO_SETTING_SOURCE_TYPE)2)
2304
+ #define WINBIO_SETTING_SOURCE_LOCAL ((WINBIO_SETTING_SOURCE_TYPE)3)
2305
+
2306
+ typedef ULONG32 WINBIO_SETTING_TYPE, *PWINBIO_SETTING_TYPE;
2307
+
2308
+ #define WINBIO_SETTING_TYPE_PERIPHERALS_WITH_ESS ((WINBIO_SETTING_TYPE)0)
2309
+ #define WINBIO_SETTING_TYPE_ESS_ENABLED ((WINBIO_SETTING_TYPE)1)
2310
+
2311
+ typedef struct _WINBIO_EXTENDED_ENROLLMENT_PARAMETERS {
2312
+ SIZE_T Size;
2313
+ WINBIO_BIOMETRIC_SUBTYPE SubFactor;
2314
+ } WINBIO_EXTENDED_ENROLLMENT_PARAMETERS, *PWINBIO_EXTENDED_ENROLLMENT_PARAMETERS;
2315
+
2316
+ typedef struct _WINBIO_ACCOUNT_POLICY {
2317
+ WINBIO_IDENTITY Identity;
2318
+ WINBIO_ANTI_SPOOF_POLICY_ACTION AntiSpoofBehavior;
2319
+ } WINBIO_ACCOUNT_POLICY, *PWINBIO_ACCOUNT_POLICY;
2320
+
2321
+
2322
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS2)
2323
+
2324
+ #define WINBIO_OPERATION_ENROLL_AUTHORIZE ((WINBIO_OPERATION_TYPE)31)
2325
+ #define WINBIO_OPERATION_ENROLL_REVOKE ((WINBIO_OPERATION_TYPE)32)
2326
+ #define WINBIO_OPERATION_GET_PROTECTION_POLICY ((WINBIO_OPERATION_TYPE)33)
2327
+
2328
+ typedef struct _WINBIO_PROTECTION_POLICY
2329
+ {
2330
+ ULONG Version;
2331
+ WINBIO_IDENTITY Identity;
2332
+ WINBIO_UUID DatabaseId;
2333
+ ULONGLONG UserState;
2334
+ SIZE_T PolicySize;
2335
+ UCHAR Policy[128];
2336
+ } WINBIO_PROTECTION_POLICY, *PWINBIO_PROTECTION_POLICY;
2337
+
2338
+ typedef ULONG32 WINBIO_MATCH_TYPE, *PWINBIO_MATCH_TYPE;
2339
+
2340
+ #define WINBIO_MATCH_SOFTWARE ((WINBIO_MATCH_TYPE)1)
2341
+ #define WINBIO_MATCH_TRUSTED_EXECUTION_ENVIRONMENT ((WINBIO_MATCH_TYPE)2)
2342
+ #define WINBIO_MATCH_ON_CHIP ((WINBIO_MATCH_TYPE)3)
2343
+
2344
+ typedef ULONG32 WINBIO_PROTECTION_TYPE, *PWINBIO_PROTECTION_TYPE;
2345
+
2346
+ #define WINBIO_PROTECTION_SOFTWARE ((WINBIO_PROTECTION_TYPE)1)
2347
+ #define WINBIO_PROTECTION_TRUSTED_EXECUTION_ENVIRONMENT ((WINBIO_PROTECTION_TYPE)2)
2348
+
2349
+ typedef struct _WINBIO_GESTURE_METADATA
2350
+ {
2351
+ SIZE_T Size;
2352
+ WINBIO_BIOMETRIC_TYPE BiometricType;
2353
+ WINBIO_MATCH_TYPE MatchType;
2354
+ WINBIO_PROTECTION_TYPE ProtectionType;
2355
+ } WINBIO_GESTURE_METADATA, *PWINBIO_GESTURE_METADATA;
2356
+
2357
+ //
2358
+ // Framework operation - async unit status update notification...
2359
+ //
2360
+ #define WINBIO_OPERATION_NOTIFY_UNIT_STATUS_CHANGE ((WINBIO_OPERATION_TYPE)34)
2361
+
2362
+ typedef ULONG32 WINBIO_TELEMETRY_TYPE, *PWINBIO_TELEMETRY_TYPE;
2363
+
2364
+ #define WINBIO_TELEMETRY_AUTH ((WINBIO_TELEMETRY_TYPE)1)
2365
+ #define WINBIO_TELEMETRY_ENROLLMENT ((WINBIO_TELEMETRY_TYPE)2)
2366
+
2367
+
2368
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS2)
2369
+
2370
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
2371
+
2372
+ #ifdef MIDL_PASS
2373
+
2374
+ //
2375
+ // Limit the size of vendor-specific type info about a sensor to 4K
2376
+ //
2377
+ const ULONG WINBIO_MAX_PRIVATE_SENSOR_TYPE_INFO_BUFFER_SIZE = 0x1000;
2378
+
2379
+ #else // MIDL_PASS
2380
+
2381
+ #define WINBIO_MAX_PRIVATE_SENSOR_TYPE_INFO_BUFFER_SIZE ((ULONG)0x1000)
2382
+
2383
+ #endif // MIDL_PASS
2384
+
2385
+ #endif // (NTDDI_VERSION >= NTDDI_WIN10_RS3)
2386
+
2387
+ # if (NTDDI_VERSION >= NTDDI_WIN11_GE)
2388
+
2389
+ ///////////////////////////////////////////////////////////////////////////////
2390
+ //
2391
+ // Ess state query
2392
+ //
2393
+ ///////////////////////////////////////////////////////////////////////////////
2394
+
2395
+ typedef ULONG64 WINBIO_ESS_STATE, *PWINBIO_ESS_STATE;
2396
+
2397
+ enum WINBIO_ESS_STATE_FLAGS
2398
+ {
2399
+ // This PC does not have TPM 2.0
2400
+ WINBIO_ESS_REQUIRES_TPM2 = 0x00000001,
2401
+
2402
+ // This PC is not VBS capable.
2403
+ WINBIO_ESS_REQUIRES_VBS_CAPABLE = 0x00000002,
2404
+
2405
+ // This PC has a Windows Hello container not backed by VBS.
2406
+ WINBIO_ESS_REQUIRES_NON_VBS_WINDOWS_HELLO_ABSENCE = 0x00000004,
2407
+
2408
+ // This PC does not have a Windows Hello container backed by VBS.
2409
+ WINBIO_ESS_REQUIRES_VBS_WINDOWS_HELLO = 0x00000008,
2410
+
2411
+ // This PC does not have VBS running.
2412
+ WINBIO_ESS_REQUIRES_VBS_RUNNING = 0x00000010,
2413
+
2414
+ // This PC is missing VBS encryption keys.
2415
+ WINBIO_ESS_REQUIRES_VBS_ENCRYPTION_KEY = 0x00000020,
2416
+
2417
+ // On this PC, ESS is disabled either using a "Enhanced Sign-in Security" toggle in Accounts -> Sign-in options under "Additional settings" or
2418
+ // using a policy.
2419
+ // By default following flag will not be set.
2420
+ WINBIO_ESS_REQUIRES_ENABLEMENT = 0x00000040,
2421
+
2422
+ // On this PC, ESS is managed using a policy available through group policy or MDM policy.
2423
+ // MDM policy: ./Device/Vendor/MSFT/PassportForWork/Biometrics/EnableESSwithSupportedPeripherals
2424
+ // Group policy: Computer Configuration\Administrative Templates\Windows Components\Windows Hello for Business\Enable ESS with Supported Peripherals
2425
+ WINBIO_ESS_MANAGED_BY_POLICY = 0x00000080,
2426
+
2427
+ // This PC contains enrollments performed using biometric sensors that are not ESS-capable.
2428
+ WINBIO_ESS_REQUIRES_NON_VBS_BIOMETRIC_ENROLLMENT_ABSENCE = 0x00000100,
2429
+
2430
+ // This PC does not have enrollments performed using ESS capable biometric sensors.
2431
+ WINBIO_ESS_REQUIRES_VBS_BIOMETRIC_ENROLLMENT = 0x00000200,
2432
+
2433
+ // This PC does not have a ESS capable face camera sensor.
2434
+ WINBIO_ESS_REQUIRES_FACE_SENSOR = 0x00000400,
2435
+
2436
+ // This PC does not have a ESS FPR sensor.
2437
+ WINBIO_ESS_REQUIRES_FPR_SENSOR = 0x00000800,
2438
+
2439
+ // This PC could not start biometrics trustlet needed for ESS.
2440
+ WINBIO_ESS_REQUIRES_ISOLATED_PROCESS = 0x00001000,
2441
+
2442
+ // This PC blocked non-ESS capable fingerprint sensor.
2443
+ WINBIO_ESS_BLOCKED_NON_ESS_FPR = 0x00002000,
2444
+
2445
+ // This PC blocked non-ESS capable face camera sensor.
2446
+ WINBIO_ESS_BLOCKED_NON_ESS_CAMERA = 0x00004000,
2447
+
2448
+ // This PC's ESS state is determined based on if they have non ESS enrollments
2449
+ WINBIO_ESS_SOURCE_DEFAULT = 0x00008000
2450
+ };
2451
+
2452
+ // Returns biometric capable sensor type connected to the PC.
2453
+ typedef struct _WINBIO_CONNECTED_SENSOR
2454
+ {
2455
+ WINBIO_BIOMETRIC_TYPE biometricType;
2456
+ BOOL isEnhancedSignInSecurityCapable;
2457
+ } WINBIO_CONNECTED_SENSOR, *PWINBIO_CONNECTED_SENSOR;
2458
+
2459
+ #endif // (NTDDI_VERSION >= NTDDI_WIN11_GE)
2460
+
2461
+ #ifdef __cplusplus
2462
+ } // extern "C"
2463
+ #endif
2464
+
2465
+ #pragma warning( pop )
2466
+
2467
+ #endif // (NTDDI_VERSION >= NTDDI_WIN7)
2468
+
2469
+ #endif // _WINBIO_TYPES_H_712486DB_3EF5_41da_937A_55DCB7B66A53_
2470
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/windef.h ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <winapifamily.h>
2
+
3
+ /****************************************************************************
4
+ * *
5
+ * windef.h -- Basic Windows Type Definitions *
6
+ * *
7
+ * Copyright (c) Microsoft Corporation. All rights reserved. *
8
+ * *
9
+ ****************************************************************************/
10
+
11
+
12
+ #ifndef _WINDEF_
13
+ #define _WINDEF_
14
+ #pragma once
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ #ifdef _M_CEE_PURE
21
+ #define WINAPI_INLINE __clrcall
22
+ #endif
23
+
24
+ #include <minwindef.h>
25
+
26
+ #ifndef WINVER
27
+ #define WINVER 0x0500
28
+ #endif /* WINVER */
29
+
30
+ #ifndef NT_INCLUDED
31
+ #include <winnt.h>
32
+ #endif /* NT_INCLUDED */
33
+
34
+ #ifndef WIN_INTERNAL
35
+
36
+ #pragma region Application Family or OneCore Family or Games Family
37
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
38
+
39
+ DECLARE_HANDLE (HWND);
40
+ DECLARE_HANDLE (HHOOK);
41
+
42
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
43
+ #pragma endregion
44
+
45
+ #ifdef WINABLE
46
+
47
+ #pragma region Desktop Family
48
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
49
+
50
+ DECLARE_HANDLE (HEVENT);
51
+
52
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
53
+ #pragma endregion
54
+
55
+ #endif
56
+ #endif
57
+
58
+ #pragma region Application Family
59
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
60
+
61
+ #if !defined(_MAC) || !defined(GDI_INTERNAL)
62
+ #ifdef STRICT
63
+ typedef void NEAR* HGDIOBJ;
64
+ #else
65
+ DECLARE_HANDLE(HGDIOBJ);
66
+ #endif
67
+ #endif
68
+
69
+ #if !defined(_MAC) || !defined(WIN_INTERNAL)
70
+ DECLARE_HANDLE(HACCEL);
71
+ #endif
72
+ #if !defined(_MAC) || !defined(GDI_INTERNAL)
73
+ DECLARE_HANDLE(HBITMAP);
74
+ DECLARE_HANDLE(HBRUSH);
75
+ #endif
76
+ #if(WINVER >= 0x0400)
77
+ DECLARE_HANDLE(HCOLORSPACE);
78
+ #endif /* WINVER >= 0x0400 */
79
+ #if !defined(_MAC) || !defined(GDI_INTERNAL)
80
+ DECLARE_HANDLE(HDC);
81
+ #endif
82
+ DECLARE_HANDLE(HGLRC); // OpenGL
83
+ DECLARE_HANDLE(HDESK);
84
+ DECLARE_HANDLE(HENHMETAFILE);
85
+ #if !defined(_MAC) || !defined(GDI_INTERNAL)
86
+ DECLARE_HANDLE(HFONT);
87
+ #endif
88
+ DECLARE_HANDLE(HICON);
89
+ #if !defined(_MAC) || !defined(WIN_INTERNAL)
90
+ DECLARE_HANDLE(HMENU);
91
+ #endif
92
+ #if !defined(_MAC) || !defined(GDI_INTERNAL)
93
+ DECLARE_HANDLE(HPALETTE);
94
+ DECLARE_HANDLE(HPEN);
95
+ #endif
96
+
97
+ #if(WINVER >= 0x0400)
98
+ DECLARE_HANDLE(HWINEVENTHOOK);
99
+ #endif /* WINVER >= 0x0400 */
100
+
101
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
102
+ #pragma endregion
103
+
104
+ #if(WINVER >= 0x0500)
105
+ #ifndef _MAC
106
+
107
+ #pragma region Application Family
108
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
109
+
110
+ DECLARE_HANDLE(HMONITOR);
111
+
112
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
113
+ #pragma endregion
114
+
115
+ #endif
116
+
117
+ #pragma region Desktop Family
118
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
119
+
120
+ DECLARE_HANDLE(HUMPD);
121
+
122
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
123
+ #pragma endregion
124
+
125
+ #endif /* WINVER >= 0x0500 */
126
+
127
+ #pragma region Application Family
128
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
129
+
130
+ #ifndef _MAC
131
+ typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */
132
+ #else
133
+ DECLARE_HANDLE(HCURSOR); /* HICONs & HCURSORs are not polymorphic */
134
+ #endif
135
+
136
+ typedef DWORD COLORREF;
137
+
138
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
139
+ #pragma endregion
140
+
141
+ #pragma region Desktop Family
142
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
143
+
144
+ typedef DWORD *LPCOLORREF;
145
+
146
+ #define HFILE_ERROR ((HFILE)-1)
147
+
148
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
149
+ #pragma endregion
150
+
151
+ #pragma region Application Family or Games Family
152
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
153
+
154
+ typedef struct tagRECT
155
+ {
156
+ LONG left;
157
+ LONG top;
158
+ LONG right;
159
+ LONG bottom;
160
+ } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
161
+
162
+ typedef const RECT FAR* LPCRECT;
163
+
164
+ typedef struct _RECTL /* rcl */
165
+ {
166
+ LONG left;
167
+ LONG top;
168
+ LONG right;
169
+ LONG bottom;
170
+ } RECTL, *PRECTL, *LPRECTL;
171
+
172
+ typedef const RECTL FAR* LPCRECTL;
173
+
174
+ typedef struct tagPOINT
175
+ {
176
+ LONG x;
177
+ LONG y;
178
+ } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
179
+
180
+ typedef struct _POINTL /* ptl */
181
+ {
182
+ LONG x;
183
+ LONG y;
184
+ } POINTL, *PPOINTL;
185
+
186
+ typedef struct tagSIZE
187
+ {
188
+ LONG cx;
189
+ LONG cy;
190
+ } SIZE, *PSIZE, *LPSIZE;
191
+
192
+ typedef SIZE SIZEL;
193
+ typedef SIZE *PSIZEL, *LPSIZEL;
194
+
195
+ typedef struct tagPOINTS
196
+ {
197
+ #ifndef _MAC
198
+ SHORT x;
199
+ SHORT y;
200
+ #else
201
+ SHORT y;
202
+ SHORT x;
203
+ #endif
204
+ } POINTS, *PPOINTS, *LPPOINTS;
205
+
206
+ #define APP_LOCAL_DEVICE_ID_SIZE 32
207
+ typedef struct APP_LOCAL_DEVICE_ID
208
+ {
209
+ BYTE value[APP_LOCAL_DEVICE_ID_SIZE];
210
+ } APP_LOCAL_DEVICE_ID;
211
+
212
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
213
+ #pragma endregion
214
+
215
+ /* mode selections for the device mode function */
216
+ #define DM_UPDATE 1
217
+ #define DM_COPY 2
218
+ #define DM_PROMPT 4
219
+ #define DM_MODIFY 8
220
+
221
+ #define DM_IN_BUFFER DM_MODIFY
222
+ #define DM_IN_PROMPT DM_PROMPT
223
+ #define DM_OUT_BUFFER DM_COPY
224
+ #define DM_OUT_DEFAULT DM_UPDATE
225
+
226
+ /* device capabilities indices */
227
+ #define DC_FIELDS 1
228
+ #define DC_PAPERS 2
229
+ #define DC_PAPERSIZE 3
230
+ #define DC_MINEXTENT 4
231
+ #define DC_MAXEXTENT 5
232
+ #define DC_BINS 6
233
+ #define DC_DUPLEX 7
234
+ #define DC_SIZE 8
235
+ #define DC_EXTRA 9
236
+ #define DC_VERSION 10
237
+ #define DC_DRIVER 11
238
+ #define DC_BINNAMES 12
239
+ #define DC_ENUMRESOLUTIONS 13
240
+ #define DC_FILEDEPENDENCIES 14
241
+ #define DC_TRUETYPE 15
242
+ #define DC_PAPERNAMES 16
243
+ #define DC_ORIENTATION 17
244
+ #define DC_COPIES 18
245
+
246
+ #ifdef __cplusplus
247
+ }
248
+ #endif
249
+
250
+ #pragma region Desktop Family
251
+
252
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
253
+
254
+ #define _DPI_AWARENESS_CONTEXTS_
255
+
256
+ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT);
257
+
258
+ typedef enum DPI_AWARENESS {
259
+ DPI_AWARENESS_INVALID = -1,
260
+ DPI_AWARENESS_UNAWARE = 0,
261
+ DPI_AWARENESS_SYSTEM_AWARE = 1,
262
+ DPI_AWARENESS_PER_MONITOR_AWARE = 2
263
+ } DPI_AWARENESS;
264
+
265
+ #define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1)
266
+ #define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2)
267
+ #define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3)
268
+ #define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4)
269
+ #define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5)
270
+
271
+ typedef enum DPI_HOSTING_BEHAVIOR {
272
+ DPI_HOSTING_BEHAVIOR_INVALID = -1,
273
+ DPI_HOSTING_BEHAVIOR_DEFAULT = 0,
274
+ DPI_HOSTING_BEHAVIOR_MIXED = 1
275
+ } DPI_HOSTING_BEHAVIOR;
276
+
277
+ #endif
278
+
279
+ #endif /* _WINDEF_ */
280
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/windnsdef.h ADDED
@@ -0,0 +1,1693 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (2024) Microsoft. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ windnsdef.h
8
+
9
+ Abstract:
10
+
11
+ Domain Name System (DNS) definitions.
12
+
13
+ Revision History:
14
+
15
+ --*/
16
+
17
+
18
+ #ifndef _WINDNSDEF_INCLUDED_
19
+ #define _WINDNSDEF_INCLUDED_
20
+
21
+ #if _MSC_VER > 1000
22
+ #pragma once
23
+ #endif
24
+
25
+ #include <winapifamily.h>
26
+
27
+ #pragma region Desktop Family or OneCore Family or Games Family
28
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
29
+
30
+ #ifdef __cplusplus
31
+ extern "C" {
32
+ #endif
33
+
34
+
35
+ #ifndef QWORD
36
+ typedef unsigned __int64 QWORD, *PQWORD;
37
+ #endif
38
+
39
+ //
40
+ // IP Address
41
+ //
42
+
43
+ typedef DWORD IP4_ADDRESS, *PIP4_ADDRESS;
44
+
45
+ #define SIZEOF_IP4_ADDRESS (4)
46
+ #define IP4_ADDRESS_STRING_LENGTH (16)
47
+
48
+ // Backcompat only -- length def contains terminating NULL
49
+
50
+ #define IP4_ADDRESS_STRING_BUFFER_LENGTH (16)
51
+
52
+ //
53
+ // IPv6 Address
54
+ //
55
+
56
+ #ifdef MIDL_PASS
57
+
58
+ #ifdef _WIN64
59
+ #pragma pack(push, 8)
60
+ #else
61
+ #pragma pack(push, 4)
62
+ #endif
63
+
64
+ typedef struct
65
+ {
66
+ QWORD IP6Qword[2];
67
+ }
68
+ IP6_ADDRESS, *PIP6_ADDRESS;
69
+
70
+ #pragma pack(pop)
71
+
72
+ #else // MIDL_PASS
73
+
74
+ typedef union
75
+ {
76
+ #ifdef _WIN64
77
+ QWORD IP6Qword[2];
78
+ #endif
79
+ DWORD IP6Dword[4];
80
+ WORD IP6Word[8];
81
+ BYTE IP6Byte[16];
82
+ #ifdef IN6_ADDR
83
+ IN6_ADDR In6;
84
+ #endif
85
+ }
86
+ IP6_ADDRESS, *PIP6_ADDRESS;
87
+
88
+ #endif // MIDL_PASS
89
+
90
+ #define DNS_ADDR_MAX_SOCKADDR_LENGTH (32)
91
+
92
+ //
93
+ // DNS Message Header
94
+ //
95
+
96
+ typedef struct _DNS_HEADER_EXT
97
+ {
98
+ WORD Reserved : 15;
99
+ WORD DnssecOk : 1;
100
+ BYTE chRcode;
101
+ BYTE chVersion;
102
+ }
103
+ DNS_HEADER_EXT, *PDNS_HEADER_EXT;
104
+
105
+ //
106
+ // DNS Record Types
107
+ //
108
+ // _TYPE_ defines are in host byte order.
109
+ // _RTYPE_ defines are in net byte order.
110
+ //
111
+ // Generally always deal with types in host byte order as we index
112
+ // resource record functions by type.
113
+ //
114
+
115
+ #define DNS_TYPE_ZERO 0x0000
116
+
117
+ // RFC 1034/1035
118
+ #define DNS_TYPE_A 0x0001 // 1
119
+ #define DNS_TYPE_NS 0x0002 // 2
120
+ #define DNS_TYPE_MD 0x0003 // 3
121
+ #define DNS_TYPE_MF 0x0004 // 4
122
+ #define DNS_TYPE_CNAME 0x0005 // 5
123
+ #define DNS_TYPE_SOA 0x0006 // 6
124
+ #define DNS_TYPE_MB 0x0007 // 7
125
+ #define DNS_TYPE_MG 0x0008 // 8
126
+ #define DNS_TYPE_MR 0x0009 // 9
127
+ #define DNS_TYPE_NULL 0x000a // 10
128
+ #define DNS_TYPE_WKS 0x000b // 11
129
+ #define DNS_TYPE_PTR 0x000c // 12
130
+ #define DNS_TYPE_HINFO 0x000d // 13
131
+ #define DNS_TYPE_MINFO 0x000e // 14
132
+ #define DNS_TYPE_MX 0x000f // 15
133
+ #define DNS_TYPE_TEXT 0x0010 // 16
134
+
135
+ // RFC 1183
136
+ #define DNS_TYPE_RP 0x0011 // 17
137
+ #define DNS_TYPE_AFSDB 0x0012 // 18
138
+ #define DNS_TYPE_X25 0x0013 // 19
139
+ #define DNS_TYPE_ISDN 0x0014 // 20
140
+ #define DNS_TYPE_RT 0x0015 // 21
141
+
142
+ // RFC 1348
143
+ #define DNS_TYPE_NSAP 0x0016 // 22
144
+ #define DNS_TYPE_NSAPPTR 0x0017 // 23
145
+
146
+ // RFC 2065 (DNS security)
147
+ #define DNS_TYPE_SIG 0x0018 // 24
148
+ #define DNS_TYPE_KEY 0x0019 // 25
149
+
150
+ // RFC 1664 (X.400 mail)
151
+ #define DNS_TYPE_PX 0x001a // 26
152
+
153
+ // RFC 1712 (Geographic position)
154
+ #define DNS_TYPE_GPOS 0x001b // 27
155
+
156
+ // RFC 1886 (IPv6 Address)
157
+ #define DNS_TYPE_AAAA 0x001c // 28
158
+
159
+ // RFC 1876 (Geographic location)
160
+ #define DNS_TYPE_LOC 0x001d // 29
161
+
162
+ // RFC 2065 (Secure negative response)
163
+ #define DNS_TYPE_NXT 0x001e // 30
164
+
165
+ // Patton (Endpoint Identifier)
166
+ #define DNS_TYPE_EID 0x001f // 31
167
+
168
+ // Patton (Nimrod Locator)
169
+ #define DNS_TYPE_NIMLOC 0x0020 // 32
170
+
171
+ // RFC 2052 (Service location)
172
+ #define DNS_TYPE_SRV 0x0021 // 33
173
+
174
+ // ATM Standard something-or-another (ATM Address)
175
+ #define DNS_TYPE_ATMA 0x0022 // 34
176
+
177
+ // RFC 2168 (Naming Authority Pointer)
178
+ #define DNS_TYPE_NAPTR 0x0023 // 35
179
+
180
+ // RFC 2230 (Key Exchanger)
181
+ #define DNS_TYPE_KX 0x0024 // 36
182
+
183
+ // RFC 2538 (CERT)
184
+ #define DNS_TYPE_CERT 0x0025 // 37
185
+
186
+ // A6 Draft (A6)
187
+ #define DNS_TYPE_A6 0x0026 // 38
188
+
189
+ // DNAME Draft (DNAME)
190
+ #define DNS_TYPE_DNAME 0x0027 // 39
191
+
192
+ // Eastlake (Kitchen Sink)
193
+ #define DNS_TYPE_SINK 0x0028 // 40
194
+
195
+ // RFC 2671 (EDNS OPT)
196
+ #define DNS_TYPE_OPT 0x0029 // 41
197
+
198
+ // RFC 4034 (DNSSEC DS)
199
+ #define DNS_TYPE_DS 0x002b // 43
200
+
201
+ // RFC 4034 (DNSSEC RRSIG)
202
+ #define DNS_TYPE_RRSIG 0x002e // 46
203
+
204
+ // RFC 4034 (DNSSEC NSEC)
205
+ #define DNS_TYPE_NSEC 0x002f // 47
206
+
207
+ // RFC 4034 (DNSSEC DNSKEY)
208
+ #define DNS_TYPE_DNSKEY 0x0030 // 48
209
+
210
+ // RFC 4701 (DHCID)
211
+ #define DNS_TYPE_DHCID 0x0031 // 49
212
+
213
+ // RFC 5155 (DNSSEC NSEC3)
214
+ #define DNS_TYPE_NSEC3 0x0032 // 50
215
+
216
+ // RFC 5155 (DNSSEC NSEC3PARAM)
217
+ #define DNS_TYPE_NSEC3PARAM 0x0033 // 51
218
+
219
+ // RFC 6698 (TLSA)
220
+ #define DNS_TYPE_TLSA 0x0034 // 52
221
+
222
+ // draft-ietf-dnsop-svcb-https
223
+ #define DNS_TYPE_SVCB 0x0040 // 64
224
+
225
+ // draft-ietf-dnsop-svcb-https
226
+ #define DNS_TYPE_HTTPS 0x0041 // 65
227
+
228
+ //
229
+ // IANA Reserved
230
+ //
231
+
232
+ #define DNS_TYPE_UINFO 0x0064 // 100
233
+ #define DNS_TYPE_UID 0x0065 // 101
234
+ #define DNS_TYPE_GID 0x0066 // 102
235
+ #define DNS_TYPE_UNSPEC 0x0067 // 103
236
+
237
+ //
238
+ // Query only types (1035, 1995)
239
+ // - Crawford (ADDRS)
240
+ // - TKEY draft (TKEY)
241
+ // - TSIG draft (TSIG)
242
+ // - RFC 1995 (IXFR)
243
+ // - RFC 1035 (AXFR up)
244
+ //
245
+
246
+ #define DNS_TYPE_ADDRS 0x00f8 // 248
247
+ #define DNS_TYPE_TKEY 0x00f9 // 249
248
+ #define DNS_TYPE_TSIG 0x00fa // 250
249
+ #define DNS_TYPE_IXFR 0x00fb // 251
250
+ #define DNS_TYPE_AXFR 0x00fc // 252
251
+ #define DNS_TYPE_MAILB 0x00fd // 253
252
+ #define DNS_TYPE_MAILA 0x00fe // 254
253
+ #define DNS_TYPE_ALL 0x00ff // 255
254
+ #define DNS_TYPE_ANY 0x00ff // 255
255
+
256
+ //
257
+ // Private use Microsoft types -- See www.iana.org/assignments/dns-parameters
258
+ //
259
+
260
+ #define DNS_TYPE_WINS 0xff01 // 64K - 255
261
+ #define DNS_TYPE_WINSR 0xff02 // 64K - 254
262
+ #define DNS_TYPE_NBSTAT (DNS_TYPE_WINSR)
263
+
264
+ //
265
+ // DNS Record Types -- Net Byte Order
266
+ //
267
+
268
+ #define DNS_RTYPE_A 0x0100 // 1
269
+ #define DNS_RTYPE_NS 0x0200 // 2
270
+ #define DNS_RTYPE_MD 0x0300 // 3
271
+ #define DNS_RTYPE_MF 0x0400 // 4
272
+ #define DNS_RTYPE_CNAME 0x0500 // 5
273
+ #define DNS_RTYPE_SOA 0x0600 // 6
274
+ #define DNS_RTYPE_MB 0x0700 // 7
275
+ #define DNS_RTYPE_MG 0x0800 // 8
276
+ #define DNS_RTYPE_MR 0x0900 // 9
277
+ #define DNS_RTYPE_NULL 0x0a00 // 10
278
+ #define DNS_RTYPE_WKS 0x0b00 // 11
279
+ #define DNS_RTYPE_PTR 0x0c00 // 12
280
+ #define DNS_RTYPE_HINFO 0x0d00 // 13
281
+ #define DNS_RTYPE_MINFO 0x0e00 // 14
282
+ #define DNS_RTYPE_MX 0x0f00 // 15
283
+ #define DNS_RTYPE_TEXT 0x1000 // 16
284
+ #define DNS_RTYPE_RP 0x1100 // 17
285
+ #define DNS_RTYPE_AFSDB 0x1200 // 18
286
+ #define DNS_RTYPE_X25 0x1300 // 19
287
+ #define DNS_RTYPE_ISDN 0x1400 // 20
288
+ #define DNS_RTYPE_RT 0x1500 // 21
289
+ #define DNS_RTYPE_NSAP 0x1600 // 22
290
+ #define DNS_RTYPE_NSAPPTR 0x1700 // 23
291
+ #define DNS_RTYPE_SIG 0x1800 // 24
292
+ #define DNS_RTYPE_KEY 0x1900 // 25
293
+ #define DNS_RTYPE_PX 0x1a00 // 26
294
+ #define DNS_RTYPE_GPOS 0x1b00 // 27
295
+ #define DNS_RTYPE_AAAA 0x1c00 // 28
296
+ #define DNS_RTYPE_LOC 0x1d00 // 29
297
+ #define DNS_RTYPE_NXT 0x1e00 // 30
298
+ #define DNS_RTYPE_EID 0x1f00 // 31
299
+ #define DNS_RTYPE_NIMLOC 0x2000 // 32
300
+ #define DNS_RTYPE_SRV 0x2100 // 33
301
+ #define DNS_RTYPE_ATMA 0x2200 // 34
302
+ #define DNS_RTYPE_NAPTR 0x2300 // 35
303
+ #define DNS_RTYPE_KX 0x2400 // 36
304
+ #define DNS_RTYPE_CERT 0x2500 // 37
305
+ #define DNS_RTYPE_A6 0x2600 // 38
306
+ #define DNS_RTYPE_DNAME 0x2700 // 39
307
+ #define DNS_RTYPE_SINK 0x2800 // 40
308
+ #define DNS_RTYPE_OPT 0x2900 // 41
309
+
310
+ #define DNS_RTYPE_DS 0x2b00 // 43
311
+ #define DNS_RTYPE_RRSIG 0x2e00 // 46
312
+ #define DNS_RTYPE_NSEC 0x2f00 // 47
313
+ #define DNS_RTYPE_DNSKEY 0x3000 // 48
314
+ #define DNS_RTYPE_DHCID 0x3100 // 49
315
+ #define DNS_RTYPE_NSEC3 0x3200 // 50
316
+ #define DNS_RTYPE_NSEC3PARAM 0x3300 // 51
317
+ #define DNS_RTYPE_TLSA 0x3400 // 52
318
+
319
+ //
320
+ // IANA Reserved
321
+ //
322
+
323
+ #define DNS_RTYPE_UINFO 0x6400 // 100
324
+ #define DNS_RTYPE_UID 0x6500 // 101
325
+ #define DNS_RTYPE_GID 0x6600 // 102
326
+ #define DNS_RTYPE_UNSPEC 0x6700 // 103
327
+
328
+ //
329
+ // Query only types
330
+ //
331
+
332
+ #define DNS_RTYPE_TKEY 0xf900 // 249
333
+ #define DNS_RTYPE_TSIG 0xfa00 // 250
334
+ #define DNS_RTYPE_IXFR 0xfb00 // 251
335
+ #define DNS_RTYPE_AXFR 0xfc00 // 252
336
+ #define DNS_RTYPE_MAILB 0xfd00 // 253
337
+ #define DNS_RTYPE_MAILA 0xfe00 // 254
338
+ #define DNS_RTYPE_ALL 0xff00 // 255
339
+ #define DNS_RTYPE_ANY 0xff00 // 255
340
+
341
+ //
342
+ // Private use Microsoft types -- See www.iana.org/assignments/dns-parameters
343
+ //
344
+
345
+ #define DNS_RTYPE_WINS 0x01ff // 64K - 255
346
+ #define DNS_RTYPE_WINSR 0x02ff // 64K - 254
347
+
348
+ //
349
+ // Record type specific definitions
350
+ //
351
+
352
+ //
353
+ // ATMA (ATM address type) formats
354
+ //
355
+ // Define these directly for any environment (ex NT4)
356
+ // without winsock2 ATM support (ws2atm.h)
357
+ //
358
+
359
+ #ifndef ATMA_E164
360
+ #define DNS_ATMA_FORMAT_E164 1
361
+ #define DNS_ATMA_FORMAT_AESA 2
362
+ #define DNS_ATMA_MAX_ADDR_LENGTH (20)
363
+ #else
364
+ #define DNS_ATMA_FORMAT_E164 ATM_E164
365
+ #define DNS_ATMA_FORMAT_AESA ATM_AESA
366
+ #define DNS_ATMA_MAX_ADDR_LENGTH ATM_ADDR_SIZE
367
+ #endif
368
+
369
+ #define DNS_ATMA_AESA_ADDR_LENGTH (20)
370
+ #define DNS_ATMA_MAX_RECORD_LENGTH (DNS_ATMA_MAX_ADDR_LENGTH+1)
371
+
372
+ //
373
+ // DNSSEC defs
374
+ //
375
+
376
+ // DNSSEC algorithms
377
+
378
+ #define DNSSEC_ALGORITHM_RSAMD5 1
379
+ #define DNSSEC_ALGORITHM_RSASHA1 5
380
+ #define DNSSEC_ALGORITHM_RSASHA1_NSEC3 7
381
+ #define DNSSEC_ALGORITHM_RSASHA256 8
382
+ #define DNSSEC_ALGORITHM_RSASHA512 10
383
+ #define DNSSEC_ALGORITHM_ECDSAP256_SHA256 13
384
+ #define DNSSEC_ALGORITHM_ECDSAP384_SHA384 14
385
+ #define DNSSEC_ALGORITHM_NULL 253
386
+ #define DNSSEC_ALGORITHM_PRIVATE 254
387
+
388
+ // DNSSEC DS record digest algorithms
389
+
390
+ #define DNSSEC_DIGEST_ALGORITHM_SHA1 1
391
+ #define DNSSEC_DIGEST_ALGORITHM_SHA256 2
392
+ #define DNSSEC_DIGEST_ALGORITHM_SHA384 4
393
+
394
+ // DNSSEC KEY protocol table
395
+
396
+ #define DNSSEC_PROTOCOL_NONE 0
397
+ #define DNSSEC_PROTOCOL_TLS 1
398
+ #define DNSSEC_PROTOCOL_EMAIL 2
399
+ #define DNSSEC_PROTOCOL_DNSSEC 3
400
+ #define DNSSEC_PROTOCOL_IPSEC 4
401
+
402
+ // DNSSEC KEY flag field
403
+
404
+ #define DNSSEC_KEY_FLAG_NOAUTH 0x0001
405
+ #define DNSSEC_KEY_FLAG_NOCONF 0x0002
406
+ #define DNSSEC_KEY_FLAG_FLAG2 0x0004
407
+ #define DNSSEC_KEY_FLAG_EXTEND 0x0008
408
+ #define DNSSEC_KEY_FLAG_
409
+ #define DNSSEC_KEY_FLAG_FLAG4 0x0010
410
+ #define DNSSEC_KEY_FLAG_FLAG5 0x0020
411
+
412
+ // bits 6,7 are name type
413
+
414
+ #define DNSSEC_KEY_FLAG_USER 0x0000
415
+ #define DNSSEC_KEY_FLAG_ZONE 0x0040
416
+ #define DNSSEC_KEY_FLAG_HOST 0x0080
417
+ #define DNSSEC_KEY_FLAG_NTPE3 0x00c0
418
+
419
+ // bits 8-11 are reserved for future use
420
+
421
+ #define DNSSEC_KEY_FLAG_FLAG8 0x0100
422
+ #define DNSSEC_KEY_FLAG_FLAG9 0x0200
423
+ #define DNSSEC_KEY_FLAG_FLAG10 0x0400
424
+ #define DNSSEC_KEY_FLAG_FLAG11 0x0800
425
+
426
+ // bits 12-15 are sig field
427
+
428
+ #define DNSSEC_KEY_FLAG_SIG0 0x0000
429
+ #define DNSSEC_KEY_FLAG_SIG1 0x1000
430
+ #define DNSSEC_KEY_FLAG_SIG2 0x2000
431
+ #define DNSSEC_KEY_FLAG_SIG3 0x3000
432
+ #define DNSSEC_KEY_FLAG_SIG4 0x4000
433
+ #define DNSSEC_KEY_FLAG_SIG5 0x5000
434
+ #define DNSSEC_KEY_FLAG_SIG6 0x6000
435
+ #define DNSSEC_KEY_FLAG_SIG7 0x7000
436
+ #define DNSSEC_KEY_FLAG_SIG8 0x8000
437
+ #define DNSSEC_KEY_FLAG_SIG9 0x9000
438
+ #define DNSSEC_KEY_FLAG_SIG10 0xa000
439
+ #define DNSSEC_KEY_FLAG_SIG11 0xb000
440
+ #define DNSSEC_KEY_FLAG_SIG12 0xc000
441
+ #define DNSSEC_KEY_FLAG_SIG13 0xd000
442
+ #define DNSSEC_KEY_FLAG_SIG14 0xe000
443
+ #define DNSSEC_KEY_FLAG_SIG15 0xf000
444
+
445
+
446
+ //
447
+ // TKEY modes
448
+ //
449
+
450
+ #define DNS_TKEY_MODE_SERVER_ASSIGN 1
451
+ #define DNS_TKEY_MODE_DIFFIE_HELLMAN 2
452
+ #define DNS_TKEY_MODE_GSS 3
453
+ #define DNS_TKEY_MODE_RESOLVER_ASSIGN 4
454
+
455
+
456
+ //
457
+ // DNS resource record structure
458
+ //
459
+
460
+ //
461
+ // Record data for specific types
462
+ //
463
+
464
+ typedef struct
465
+ {
466
+ IP4_ADDRESS IpAddress;
467
+ }
468
+ DNS_A_DATA, *PDNS_A_DATA;
469
+
470
+ typedef struct
471
+ {
472
+ PWSTR pNameHost;
473
+ }
474
+ DNS_PTR_DATAW, *PDNS_PTR_DATAW;
475
+
476
+ typedef struct
477
+ {
478
+ PSTR pNameHost;
479
+ }
480
+ DNS_PTR_DATAA, *PDNS_PTR_DATAA;
481
+
482
+ typedef struct
483
+ {
484
+ PWSTR pNamePrimaryServer;
485
+ PWSTR pNameAdministrator;
486
+ DWORD dwSerialNo;
487
+ DWORD dwRefresh;
488
+ DWORD dwRetry;
489
+ DWORD dwExpire;
490
+ DWORD dwDefaultTtl;
491
+ }
492
+ DNS_SOA_DATAW, *PDNS_SOA_DATAW;
493
+
494
+ typedef struct
495
+ {
496
+ PSTR pNamePrimaryServer;
497
+ PSTR pNameAdministrator;
498
+ DWORD dwSerialNo;
499
+ DWORD dwRefresh;
500
+ DWORD dwRetry;
501
+ DWORD dwExpire;
502
+ DWORD dwDefaultTtl;
503
+ }
504
+ DNS_SOA_DATAA, *PDNS_SOA_DATAA;
505
+
506
+ typedef struct
507
+ {
508
+ PWSTR pNameMailbox;
509
+ PWSTR pNameErrorsMailbox;
510
+ }
511
+ DNS_MINFO_DATAW, *PDNS_MINFO_DATAW;
512
+
513
+ typedef struct
514
+ {
515
+ PSTR pNameMailbox;
516
+ PSTR pNameErrorsMailbox;
517
+ }
518
+ DNS_MINFO_DATAA, *PDNS_MINFO_DATAA;
519
+
520
+ typedef struct
521
+ {
522
+ PWSTR pNameExchange;
523
+ WORD wPreference;
524
+ WORD Pad; // keep ptrs DWORD aligned
525
+ }
526
+ DNS_MX_DATAW, *PDNS_MX_DATAW;
527
+
528
+ typedef struct
529
+ {
530
+ PSTR pNameExchange;
531
+ WORD wPreference;
532
+ WORD Pad; // keep ptrs DWORD aligned
533
+ }
534
+ DNS_MX_DATAA, *PDNS_MX_DATAA;
535
+
536
+ typedef struct
537
+ {
538
+ DWORD dwStringCount;
539
+ #ifdef MIDL_PASS
540
+ [size_is(dwStringCount)] PWSTR pStringArray[];
541
+ #else
542
+ PWSTR pStringArray[1];
543
+ #endif
544
+ }
545
+ DNS_TXT_DATAW, *PDNS_TXT_DATAW;
546
+
547
+ typedef struct
548
+ {
549
+ DWORD dwStringCount;
550
+ #ifdef MIDL_PASS
551
+ [size_is(dwStringCount)] PSTR pStringArray[];
552
+ #else
553
+ PSTR pStringArray[1];
554
+ #endif
555
+ }
556
+ DNS_TXT_DATAA, *PDNS_TXT_DATAA;
557
+
558
+ typedef struct
559
+ {
560
+ DWORD dwByteCount;
561
+ #ifdef MIDL_PASS
562
+ [size_is(dwByteCount)] BYTE Data[];
563
+ #else
564
+ BYTE Data[1];
565
+ #endif
566
+ }
567
+ DNS_NULL_DATA, *PDNS_NULL_DATA;
568
+
569
+ typedef struct
570
+ {
571
+ IP4_ADDRESS IpAddress;
572
+ UCHAR chProtocol;
573
+ BYTE BitMask[1];
574
+ }
575
+ DNS_WKS_DATA, *PDNS_WKS_DATA;
576
+
577
+ typedef struct
578
+ {
579
+ IP6_ADDRESS Ip6Address;
580
+ }
581
+ DNS_AAAA_DATA, *PDNS_AAAA_DATA;
582
+
583
+ typedef struct
584
+ {
585
+ WORD wTypeCovered;
586
+ BYTE chAlgorithm;
587
+ BYTE chLabelCount;
588
+ DWORD dwOriginalTtl;
589
+ DWORD dwExpiration;
590
+ DWORD dwTimeSigned;
591
+ WORD wKeyTag;
592
+ WORD wSignatureLength;
593
+ PWSTR pNameSigner;
594
+ #ifdef MIDL_PASS
595
+ [size_is(wSignatureLength)] BYTE Signature[];
596
+ #else
597
+ BYTE Signature[1];
598
+ #endif
599
+ }
600
+ DNS_SIG_DATAW, *PDNS_SIG_DATAW, DNS_RRSIG_DATAW, *PDNS_RRSIG_DATAW;
601
+
602
+ typedef struct
603
+ {
604
+ WORD wTypeCovered;
605
+ BYTE chAlgorithm;
606
+ BYTE chLabelCount;
607
+ DWORD dwOriginalTtl;
608
+ DWORD dwExpiration;
609
+ DWORD dwTimeSigned;
610
+ WORD wKeyTag;
611
+ WORD wSignatureLength;
612
+ PSTR pNameSigner;
613
+ #ifdef MIDL_PASS
614
+ [size_is(wSignatureLength)] BYTE Signature[];
615
+ #else
616
+ BYTE Signature[1];
617
+ #endif
618
+ }
619
+ DNS_SIG_DATAA, *PDNS_SIG_DATAA, DNS_RRSIG_DATAA, *PDNS_RRSIG_DATAA;
620
+
621
+ typedef struct
622
+ {
623
+ WORD wFlags;
624
+ BYTE chProtocol;
625
+ BYTE chAlgorithm;
626
+ WORD wKeyLength;
627
+ WORD wPad; // keep byte field aligned
628
+ #ifdef MIDL_PASS
629
+ [size_is(wKeyLength)] BYTE Key[];
630
+ #else
631
+ BYTE Key[1];
632
+ #endif
633
+ }
634
+ DNS_KEY_DATA, *PDNS_KEY_DATA, DNS_DNSKEY_DATA, *PDNS_DNSKEY_DATA;
635
+
636
+ typedef struct
637
+ {
638
+ DWORD dwByteCount;
639
+ #ifdef MIDL_PASS
640
+ [size_is(dwByteCount)] BYTE DHCID[];
641
+ #else
642
+ BYTE DHCID[1];
643
+ #endif
644
+ }
645
+ DNS_DHCID_DATA, *PDNS_DHCID_DATA;
646
+
647
+ typedef struct
648
+ {
649
+ PWSTR pNextDomainName;
650
+ WORD wTypeBitMapsLength;
651
+ WORD wPad; // keep byte field aligned
652
+ #ifdef MIDL_PASS
653
+ [size_is(wTypeBitMapsLength)] BYTE TypeBitMaps[];
654
+ #else
655
+ BYTE TypeBitMaps[1];
656
+ #endif
657
+ }
658
+ DNS_NSEC_DATAW, *PDNS_NSEC_DATAW;
659
+
660
+ typedef struct
661
+ {
662
+ PSTR pNextDomainName;
663
+ WORD wTypeBitMapsLength;
664
+ WORD wPad; // keep byte field aligned
665
+ #ifdef MIDL_PASS
666
+ [size_is(wTypeBitMapsLength)] BYTE TypeBitMaps[];
667
+ #else
668
+ BYTE TypeBitMaps[1];
669
+ #endif
670
+ }
671
+ DNS_NSEC_DATAA, *PDNS_NSEC_DATAA;
672
+
673
+ typedef struct
674
+ {
675
+ BYTE chAlgorithm;
676
+ BYTE bFlags;
677
+ WORD wIterations;
678
+ BYTE bSaltLength;
679
+ BYTE bHashLength;
680
+ WORD wTypeBitMapsLength;
681
+ #ifdef MIDL_PASS
682
+ [size_is(bSaltLength+bHashLength+wTypeBitMapsLength)] BYTE chData[];
683
+ #else
684
+ BYTE chData[1];
685
+ #endif
686
+ }
687
+ DNS_NSEC3_DATA, *PDNS_NSEC3_DATA;
688
+
689
+ typedef struct
690
+ {
691
+ BYTE chAlgorithm;
692
+ BYTE bFlags;
693
+ WORD wIterations;
694
+ BYTE bSaltLength;
695
+ BYTE bPad[3]; // keep salt field aligned
696
+ #ifdef MIDL_PASS
697
+ [size_is(bSaltLength)] BYTE pbSalt[];
698
+ #else
699
+ BYTE pbSalt[1];
700
+ #endif
701
+ }
702
+ DNS_NSEC3PARAM_DATA, *PDNS_NSEC3PARAM_DATA;
703
+
704
+ typedef struct
705
+ {
706
+ BYTE bCertUsage;
707
+ BYTE bSelector;
708
+ BYTE bMatchingType;
709
+ WORD bCertificateAssociationDataLength;
710
+ BYTE bPad[3]; // keep certificate association data field aligned
711
+ #ifdef MIDL_PASS
712
+ [size_is(bCertificateAssociationDataLength)] BYTE bCertificateAssociationData[];
713
+ #else
714
+ BYTE bCertificateAssociationData[1];
715
+ #endif
716
+ }
717
+ DNS_TLSA_DATA, *PDNS_TLSA_DATA;
718
+
719
+ typedef struct
720
+ {
721
+ WORD wKeyTag;
722
+ BYTE chAlgorithm;
723
+ BYTE chDigestType;
724
+ WORD wDigestLength;
725
+ WORD wPad; // keep byte field aligned
726
+ #ifdef MIDL_PASS
727
+ [size_is(wDigestLength)] BYTE Digest[];
728
+ #else
729
+ BYTE Digest[1];
730
+ #endif
731
+ }
732
+ DNS_DS_DATA, *PDNS_DS_DATA;
733
+
734
+ typedef struct
735
+ {
736
+ WORD wDataLength;
737
+ WORD wPad; // keep byte field aligned
738
+ #ifdef MIDL_PASS
739
+ [size_is(wDataLength)] BYTE Data[];
740
+ #else
741
+ BYTE Data[1];
742
+ #endif
743
+ }
744
+ DNS_OPT_DATA, *PDNS_OPT_DATA;
745
+
746
+ typedef struct
747
+ {
748
+ WORD wVersion;
749
+ WORD wSize;
750
+ WORD wHorPrec;
751
+ WORD wVerPrec;
752
+ DWORD dwLatitude;
753
+ DWORD dwLongitude;
754
+ DWORD dwAltitude;
755
+ }
756
+ DNS_LOC_DATA, *PDNS_LOC_DATA;
757
+
758
+ typedef struct
759
+ {
760
+ PWSTR pNameNext;
761
+ WORD wNumTypes;
762
+ #ifdef MIDL_PASS
763
+ [size_is(wNumTypes)] WORD wTypes[];
764
+ #else
765
+ WORD wTypes[1];
766
+ #endif
767
+ }
768
+ DNS_NXT_DATAW, *PDNS_NXT_DATAW;
769
+
770
+ typedef struct
771
+ {
772
+ PSTR pNameNext;
773
+ WORD wNumTypes;
774
+ #ifdef MIDL_PASS
775
+ [size_is(wNumTypes)] WORD wTypes[];
776
+ #else
777
+ WORD wTypes[1];
778
+ #endif
779
+ }
780
+ DNS_NXT_DATAA, *PDNS_NXT_DATAA;
781
+
782
+ typedef struct
783
+ {
784
+ PWSTR pNameTarget;
785
+ WORD wPriority;
786
+ WORD wWeight;
787
+ WORD wPort;
788
+ WORD Pad; // keep ptrs DWORD aligned
789
+ }
790
+ DNS_SRV_DATAW, *PDNS_SRV_DATAW;
791
+
792
+ typedef struct
793
+ {
794
+ PSTR pNameTarget;
795
+ WORD wPriority;
796
+ WORD wWeight;
797
+ WORD wPort;
798
+ WORD Pad; // keep ptrs DWORD aligned
799
+ }
800
+ DNS_SRV_DATAA, *PDNS_SRV_DATAA;
801
+
802
+ typedef struct
803
+ {
804
+ WORD wOrder;
805
+ WORD wPreference;
806
+ PWSTR pFlags;
807
+ PWSTR pService;
808
+ PWSTR pRegularExpression;
809
+ PWSTR pReplacement;
810
+ }
811
+ DNS_NAPTR_DATAW, *PDNS_NAPTR_DATAW;
812
+
813
+ typedef struct
814
+ {
815
+ WORD wOrder;
816
+ WORD wPreference;
817
+ PSTR pFlags;
818
+ PSTR pService;
819
+ PSTR pRegularExpression;
820
+ PSTR pReplacement;
821
+ }
822
+ DNS_NAPTR_DATAA, *PDNS_NAPTR_DATAA;
823
+
824
+
825
+
826
+ typedef struct
827
+ {
828
+ BYTE AddressType;
829
+ BYTE Address[ DNS_ATMA_MAX_ADDR_LENGTH ];
830
+
831
+ // E164 -- Null terminated string of less than
832
+ // DNS_ATMA_MAX_ADDR_LENGTH
833
+ //
834
+ // For NSAP (AESA) BCD encoding of exactly
835
+ // DNS_ATMA_AESA_ADDR_LENGTH
836
+ }
837
+ DNS_ATMA_DATA, *PDNS_ATMA_DATA;
838
+
839
+
840
+ typedef struct
841
+ {
842
+ PWSTR pNameAlgorithm;
843
+
844
+ #ifdef MIDL_PASS
845
+ [size_is(cAlgNameLength)]
846
+ #endif
847
+ PBYTE pAlgorithmPacket;
848
+
849
+ #ifdef MIDL_PASS
850
+ [size_is(wKeyLength)]
851
+ #endif
852
+ PBYTE pKey;
853
+
854
+ #ifdef MIDL_PASS
855
+ [size_is(wOtherLength)]
856
+ #endif
857
+ PBYTE pOtherData;
858
+
859
+ DWORD dwCreateTime;
860
+ DWORD dwExpireTime;
861
+ WORD wMode;
862
+ WORD wError;
863
+ WORD wKeyLength;
864
+ WORD wOtherLength;
865
+ UCHAR cAlgNameLength;
866
+ BOOL bPacketPointers;
867
+ }
868
+ DNS_TKEY_DATAW, *PDNS_TKEY_DATAW;
869
+
870
+ typedef struct
871
+ {
872
+ PSTR pNameAlgorithm;
873
+
874
+ #ifdef MIDL_PASS
875
+ [size_is(cAlgNameLength)]
876
+ #endif
877
+ PBYTE pAlgorithmPacket;
878
+
879
+ #ifdef MIDL_PASS
880
+ [size_is(wKeyLength)]
881
+ #endif
882
+ PBYTE pKey;
883
+
884
+ #ifdef MIDL_PASS
885
+ [size_is(wOtherLength)]
886
+ #endif
887
+ PBYTE pOtherData;
888
+
889
+ DWORD dwCreateTime;
890
+ DWORD dwExpireTime;
891
+ WORD wMode;
892
+ WORD wError;
893
+ WORD wKeyLength;
894
+ WORD wOtherLength;
895
+ UCHAR cAlgNameLength;
896
+ BOOL bPacketPointers;
897
+ }
898
+ DNS_TKEY_DATAA, *PDNS_TKEY_DATAA;
899
+
900
+ typedef struct
901
+ {
902
+ PWSTR pNameAlgorithm;
903
+
904
+ #ifdef MIDL_PASS
905
+ [size_is(cAlgNameLength)]
906
+ #endif
907
+ PBYTE pAlgorithmPacket;
908
+
909
+ #ifdef MIDL_PASS
910
+ [size_is(wSigLength)]
911
+ #endif
912
+ PBYTE pSignature;
913
+
914
+ #ifdef MIDL_PASS
915
+ [size_is(wOtherLength)]
916
+ #endif
917
+ PBYTE pOtherData;
918
+
919
+ LONGLONG i64CreateTime;
920
+ WORD wFudgeTime;
921
+ WORD wOriginalXid;
922
+ WORD wError;
923
+ WORD wSigLength;
924
+ WORD wOtherLength;
925
+ UCHAR cAlgNameLength;
926
+ BOOL bPacketPointers;
927
+ }
928
+ DNS_TSIG_DATAW, *PDNS_TSIG_DATAW;
929
+
930
+ typedef struct
931
+ {
932
+ PSTR pNameAlgorithm;
933
+
934
+ #ifdef MIDL_PASS
935
+ [size_is(cAlgNameLength)]
936
+ #endif
937
+ PBYTE pAlgorithmPacket;
938
+
939
+ #ifdef MIDL_PASS
940
+ [size_is(wSigLength)]
941
+ #endif
942
+ PBYTE pSignature;
943
+
944
+ #ifdef MIDL_PASS
945
+ [size_is(wOtherLength)]
946
+ #endif
947
+ PBYTE pOtherData;
948
+
949
+ LONGLONG i64CreateTime;
950
+ WORD wFudgeTime;
951
+ WORD wOriginalXid;
952
+ WORD wError;
953
+ WORD wSigLength;
954
+ WORD wOtherLength;
955
+ UCHAR cAlgNameLength;
956
+ BOOL bPacketPointers;
957
+ }
958
+ DNS_TSIG_DATAA, *PDNS_TSIG_DATAA;
959
+
960
+ typedef struct
961
+ {
962
+ DWORD dwByteCount;
963
+ #ifdef MIDL_PASS
964
+ [size_is(dwByteCount)] BYTE bData[];
965
+ #else
966
+ BYTE bData[1];
967
+ #endif
968
+ }
969
+ DNS_UNKNOWN_DATA, *PDNS_UNKNOWN_DATA;
970
+
971
+ //
972
+ // MS only types -- only hit the wire in MS-MS zone transfer
973
+ //
974
+
975
+ typedef struct
976
+ {
977
+ DWORD dwMappingFlag;
978
+ DWORD dwLookupTimeout;
979
+ DWORD dwCacheTimeout;
980
+ DWORD cWinsServerCount;
981
+ #ifdef MIDL_PASS
982
+ [size_is(cWinsServerCount)]
983
+ IP4_ADDRESS WinsServers[];
984
+ #else
985
+ IP4_ADDRESS WinsServers[1];
986
+ #endif
987
+ }
988
+ DNS_WINS_DATA, *PDNS_WINS_DATA;
989
+
990
+ typedef struct
991
+ {
992
+ DWORD dwMappingFlag;
993
+ DWORD dwLookupTimeout;
994
+ DWORD dwCacheTimeout;
995
+ PWSTR pNameResultDomain;
996
+ }
997
+ DNS_WINSR_DATAW, *PDNS_WINSR_DATAW;
998
+
999
+ typedef struct
1000
+ {
1001
+ DWORD dwMappingFlag;
1002
+ DWORD dwLookupTimeout;
1003
+ DWORD dwCacheTimeout;
1004
+ PSTR pNameResultDomain;
1005
+ }
1006
+ DNS_WINSR_DATAA, *PDNS_WINSR_DATAA;
1007
+
1008
+ #define DDR_MAX_IP_HINTS 4
1009
+
1010
+ typedef enum _DNS_SVCB_PARAM_TYPE
1011
+ {
1012
+ DnsSvcbParamMandatory = 0,
1013
+ DnsSvcbParamAlpn = 1,
1014
+ DnsSvcbParamNoDefaultAlpn = 2,
1015
+ DnsSvcbParamPort = 3,
1016
+ DnsSvcbParamIpv4Hint = 4,
1017
+ DnsSvcbParamEch = 5,
1018
+ DnsSvcbParamIpv6Hint = 6,
1019
+ DnsSvcbParamDohPath = 7,
1020
+ DnsSvcbParamDohPathOpenDns = 65432,
1021
+ } DNS_SVCB_PARAM_TYPE;
1022
+
1023
+ typedef struct _DNS_SVCB_PARAM_MANDATORY
1024
+ {
1025
+ WORD cMandatoryKeys;
1026
+ WORD rgwMandatoryKeys[1];
1027
+ } DNS_SVCB_PARAM_MANDATORY;
1028
+
1029
+ typedef struct _DNS_SVCB_PARAM_ALPN_ID
1030
+ {
1031
+ BYTE cBytes;
1032
+ BYTE *pbId;
1033
+ } DNS_SVCB_PARAM_ALPN_ID;
1034
+
1035
+ typedef struct _DNS_SVCB_PARAM_ALPN
1036
+ {
1037
+ WORD cIds;
1038
+ DNS_SVCB_PARAM_ALPN_ID rgIds[1];
1039
+ } DNS_SVCB_PARAM_ALPN;
1040
+
1041
+ typedef struct _DNS_SVCB_PARAM_IPV4
1042
+ {
1043
+ WORD cIps;
1044
+ IP4_ADDRESS rgIps[1];
1045
+ } DNS_SVCB_PARAM_IPV4;
1046
+
1047
+ typedef struct _DNS_SVCB_PARAM_IPV6
1048
+ {
1049
+ WORD cIps;
1050
+ IP6_ADDRESS rgIps[1];
1051
+ } DNS_SVCB_PARAM_IPV6;
1052
+
1053
+ typedef struct _DNS_SVCB_PARAM_UNKNOWN
1054
+ {
1055
+ WORD cBytes;
1056
+ BYTE pbSvcParamValue[1];
1057
+ } DNS_SVCB_PARAM_UNKNOWN;
1058
+
1059
+ #pragma warning(push)
1060
+ #pragma warning(disable: 4201) // nameless struct/union (anonymous union for SVCB parameter variants)
1061
+ typedef struct _DNS_SVCB_PARAM
1062
+ {
1063
+ WORD wSvcParamKey;
1064
+ union
1065
+ {
1066
+ DNS_SVCB_PARAM_IPV4 *pIpv4Hints;
1067
+ DNS_SVCB_PARAM_IPV6 *pIpv6Hints;
1068
+ DNS_SVCB_PARAM_MANDATORY *pMandatory;
1069
+ DNS_SVCB_PARAM_ALPN *pAlpn;
1070
+ WORD wPort;
1071
+ DNS_SVCB_PARAM_UNKNOWN *pUnknown;
1072
+ PSTR pszDohPath;
1073
+ PVOID pReserved;
1074
+ };
1075
+ } DNS_SVCB_PARAM;
1076
+ #pragma warning(pop)
1077
+
1078
+ typedef struct _DNS_SVCB_DATA
1079
+ {
1080
+ WORD wSvcPriority;
1081
+ PSTR pszTargetName;
1082
+ WORD cSvcParams;
1083
+ DNS_SVCB_PARAM *pSvcParams;
1084
+ } DNS_SVCB_DATA;
1085
+
1086
+ //
1087
+ // Unicode/ANSI record types
1088
+ //
1089
+
1090
+ #ifdef UNICODE
1091
+ typedef DNS_PTR_DATAW DNS_PTR_DATA, *PDNS_PTR_DATA;
1092
+ typedef DNS_SOA_DATAW DNS_SOA_DATA, *PDNS_SOA_DATA;
1093
+ typedef DNS_MINFO_DATAW DNS_MINFO_DATA, *PDNS_MINFO_DATA;
1094
+ typedef DNS_MX_DATAW DNS_MX_DATA, *PDNS_MX_DATA;
1095
+ typedef DNS_TXT_DATAW DNS_TXT_DATA, *PDNS_TXT_DATA;
1096
+ typedef DNS_SIG_DATAW DNS_SIG_DATA, *PDNS_SIG_DATA;
1097
+ typedef DNS_NXT_DATAW DNS_NXT_DATA, *PDNS_NXT_DATA;
1098
+ typedef DNS_SRV_DATAW DNS_SRV_DATA, *PDNS_SRV_DATA;
1099
+ typedef DNS_NAPTR_DATAW DNS_NAPTR_DATA, *PDNS_NAPTR_DATA;
1100
+ typedef DNS_RRSIG_DATAW DNS_RRSIG_DATA, *PDNS_RRSIG_DATA;
1101
+ typedef DNS_NSEC_DATAW DNS_NSEC_DATA, *PDNS_NSEC_DATA;
1102
+ typedef DNS_TKEY_DATAW DNS_TKEY_DATA, *PDNS_TKEY_DATA;
1103
+ typedef DNS_TSIG_DATAW DNS_TSIG_DATA, *PDNS_TSIG_DATA;
1104
+ typedef DNS_WINSR_DATAW DNS_WINSR_DATA, *PDNS_WINSR_DATA;
1105
+ #else
1106
+ typedef DNS_PTR_DATAA DNS_PTR_DATA, *PDNS_PTR_DATA;
1107
+ typedef DNS_SOA_DATAA DNS_SOA_DATA, *PDNS_SOA_DATA;
1108
+ typedef DNS_MINFO_DATAA DNS_MINFO_DATA, *PDNS_MINFO_DATA;
1109
+ typedef DNS_MX_DATAA DNS_MX_DATA, *PDNS_MX_DATA;
1110
+ typedef DNS_TXT_DATAA DNS_TXT_DATA, *PDNS_TXT_DATA;
1111
+ typedef DNS_SIG_DATAA DNS_SIG_DATA, *PDNS_SIG_DATA;
1112
+ typedef DNS_NXT_DATAA DNS_NXT_DATA, *PDNS_NXT_DATA;
1113
+ typedef DNS_SRV_DATAA DNS_SRV_DATA, *PDNS_SRV_DATA;
1114
+ typedef DNS_NAPTR_DATAA DNS_NAPTR_DATA, *PDNS_NAPTR_DATA;
1115
+ typedef DNS_RRSIG_DATAA DNS_RRSIG_DATA, *PDNS_RRSIG_DATA;
1116
+ typedef DNS_NSEC_DATAA DNS_NSEC_DATA, *PDNS_NSEC_DATA;
1117
+ typedef DNS_TKEY_DATAA DNS_TKEY_DATA, *PDNS_TKEY_DATA;
1118
+ typedef DNS_TSIG_DATAA DNS_TSIG_DATA, *PDNS_TSIG_DATA;
1119
+ typedef DNS_WINSR_DATAA DNS_WINSR_DATA, *PDNS_WINSR_DATA;
1120
+ #endif
1121
+
1122
+ //
1123
+ // Length of non-fixed-length data types
1124
+ //
1125
+
1126
+ #define DNS_TEXT_RECORD_LENGTH(StringCount) \
1127
+ (FIELD_OFFSET(DNS_TXT_DATA, pStringArray) + ((StringCount) * sizeof(PCHAR)))
1128
+
1129
+ #define DNS_NULL_RECORD_LENGTH(ByteCount) \
1130
+ (FIELD_OFFSET(DNS_NULL_DATA, Data) + (ByteCount))
1131
+
1132
+ #define DNS_WKS_RECORD_LENGTH(ByteCount) \
1133
+ (FIELD_OFFSET(DNS_WKS_DATA, BitMask) + (ByteCount))
1134
+
1135
+ #define DNS_WINS_RECORD_LENGTH(IpCount) \
1136
+ (FIELD_OFFSET(DNS_WINS_DATA, WinsServers) + ((IpCount) * sizeof(IP4_ADDRESS)))
1137
+
1138
+ #define DNS_KEY_RECORD_LENGTH(ByteCount) \
1139
+ (FIELD_OFFSET(DNS_KEY_DATA, Key) + (ByteCount))
1140
+
1141
+ #define DNS_SIG_RECORD_LENGTH(ByteCount) \
1142
+ (FIELD_OFFSET(DNS_SIG_DATA, Signature) + (ByteCount))
1143
+
1144
+ #define DNS_NSEC_RECORD_LENGTH(ByteCount) \
1145
+ (FIELD_OFFSET(DNS_NSEC_DATA, TypeBitMaps) + (ByteCount))
1146
+
1147
+ #define DNS_DS_RECORD_LENGTH(ByteCount) \
1148
+ (FIELD_OFFSET(DNS_DS_DATA, Digest) + (ByteCount))
1149
+
1150
+ #define DNS_OPT_RECORD_LENGTH(ByteCount) \
1151
+ (FIELD_OFFSET(DNS_OPT_DATA, Data) + (ByteCount))
1152
+
1153
+ #define DNS_DHCID_RECORD_LENGTH(ByteCount) \
1154
+ (FIELD_OFFSET(DNS_DHCID_DATA, DHCID) + (ByteCount))
1155
+
1156
+ #define DNS_NSEC3_RECORD_LENGTH(ByteCount) \
1157
+ (FIELD_OFFSET(DNS_NSEC3_DATA, chData) + (ByteCount))
1158
+
1159
+ #define DNS_NSEC3PARAM_RECORD_LENGTH(ByteCount) \
1160
+ (FIELD_OFFSET(DNS_NSEC3PARAM_DATA, pbSalt) + (ByteCount))
1161
+
1162
+ #define DNS_TLSA_RECORD_LENGTH(ByteCount) \
1163
+ (FIELD_OFFSET(DNS_TLSA_DATA, bCertificateAssociationData) + (ByteCount))
1164
+
1165
+ #define DNS_UNKNOWN_RECORD_LENGTH(ByteCount) \
1166
+ (FIELD_OFFSET(DNS_UNKNOWN_DATA, bData) + (ByteCount))
1167
+
1168
+ //
1169
+ // Record flags
1170
+ //
1171
+
1172
+ typedef struct _DnsRecordFlags
1173
+ {
1174
+ DWORD Section : 2;
1175
+ DWORD Delete : 1;
1176
+ DWORD CharSet : 2;
1177
+ DWORD Unused : 3;
1178
+
1179
+ DWORD Reserved : 24;
1180
+ }
1181
+ DNS_RECORD_FLAGS;
1182
+
1183
+ //
1184
+ // Wire Record Sections
1185
+ //
1186
+ // Useable both in record flags "Section" and as index into
1187
+ // wire message header section counts.
1188
+ //
1189
+
1190
+ typedef enum _DnsSection
1191
+ {
1192
+ DnsSectionQuestion,
1193
+ DnsSectionAnswer,
1194
+ DnsSectionAuthority,
1195
+ DnsSectionAddtional,
1196
+ }
1197
+ DNS_SECTION;
1198
+
1199
+ // Update message section names
1200
+
1201
+ #define DnsSectionZone DnsSectionQuestion
1202
+ #define DnsSectionPrereq DnsSectionAnswer
1203
+ #define DnsSectionUpdate DnsSectionAuthority
1204
+
1205
+
1206
+ //
1207
+ // Record flags as bit flags
1208
+ // These may be or'd together to set the fields
1209
+ //
1210
+
1211
+ // RR Section in packet
1212
+
1213
+ #define DNSREC_SECTION (0x00000003)
1214
+
1215
+ #define DNSREC_QUESTION (0x00000000)
1216
+ #define DNSREC_ANSWER (0x00000001)
1217
+ #define DNSREC_AUTHORITY (0x00000002)
1218
+ #define DNSREC_ADDITIONAL (0x00000003)
1219
+
1220
+ // RR Section in packet (update)
1221
+
1222
+ #define DNSREC_ZONE (0x00000000)
1223
+ #define DNSREC_PREREQ (0x00000001)
1224
+ #define DNSREC_UPDATE (0x00000002)
1225
+
1226
+ // Delete RR (update) or No-exist (prerequisite)
1227
+
1228
+ #define DNSREC_DELETE (0x00000004)
1229
+ #define DNSREC_NOEXIST (0x00000004)
1230
+
1231
+
1232
+ //
1233
+ // Record \ RR set structure
1234
+ //
1235
+ // Note: The dwReserved flag serves to insure that the substructures
1236
+ // start on 64-bit boundaries. Do NOT pack this structure, as the
1237
+ // substructures may contain pointers or int64 values which are
1238
+ // properly aligned unpacked.
1239
+ //
1240
+
1241
+ #ifdef MIDL_PASS
1242
+
1243
+ #define PDNS_RECORD PVOID
1244
+ #define PDNS_RECORDA PVOID
1245
+ #define PDNS_RECORDW PVOID
1246
+
1247
+ #else
1248
+
1249
+ typedef _Struct_size_bytes_(FIELD_OFFSET(struct _DnsRecordW, Data) + wDataLength) struct _DnsRecordW
1250
+ {
1251
+ struct _DnsRecordW * pNext;
1252
+ PWSTR pName;
1253
+ WORD wType;
1254
+ WORD wDataLength; // Not referenced for DNS record types
1255
+ // defined above.
1256
+ union
1257
+ {
1258
+ DWORD DW; // flags as DWORD
1259
+ DNS_RECORD_FLAGS S; // flags as structure
1260
+
1261
+ } Flags;
1262
+
1263
+ DWORD dwTtl;
1264
+ DWORD dwReserved;
1265
+
1266
+ // Record Data
1267
+
1268
+ union
1269
+ {
1270
+ DNS_A_DATA A;
1271
+ DNS_SOA_DATAW SOA, Soa;
1272
+ DNS_PTR_DATAW PTR, Ptr,
1273
+ NS, Ns,
1274
+ CNAME, Cname,
1275
+ DNAME, Dname,
1276
+ MB, Mb,
1277
+ MD, Md,
1278
+ MF, Mf,
1279
+ MG, Mg,
1280
+ MR, Mr;
1281
+ DNS_MINFO_DATAW MINFO, Minfo,
1282
+ RP, Rp;
1283
+ DNS_MX_DATAW MX, Mx,
1284
+ AFSDB, Afsdb,
1285
+ RT, Rt;
1286
+ DNS_TXT_DATAW HINFO, Hinfo,
1287
+ ISDN, Isdn,
1288
+ TXT, Txt,
1289
+ X25;
1290
+ DNS_NULL_DATA Null;
1291
+ DNS_WKS_DATA WKS, Wks;
1292
+ DNS_AAAA_DATA AAAA;
1293
+ DNS_KEY_DATA KEY, Key;
1294
+ DNS_SIG_DATAW SIG, Sig;
1295
+ DNS_ATMA_DATA ATMA, Atma;
1296
+ DNS_NXT_DATAW NXT, Nxt;
1297
+ DNS_SRV_DATAW SRV, Srv;
1298
+ DNS_NAPTR_DATAW NAPTR, Naptr;
1299
+ DNS_OPT_DATA OPT, Opt;
1300
+ DNS_DS_DATA DS, Ds;
1301
+ DNS_RRSIG_DATAW RRSIG, Rrsig;
1302
+ DNS_NSEC_DATAW NSEC, Nsec;
1303
+ DNS_DNSKEY_DATA DNSKEY, Dnskey;
1304
+ DNS_TKEY_DATAW TKEY, Tkey;
1305
+ DNS_TSIG_DATAW TSIG, Tsig;
1306
+ DNS_WINS_DATA WINS, Wins;
1307
+ DNS_WINSR_DATAW WINSR, WinsR, NBSTAT, Nbstat;
1308
+ DNS_DHCID_DATA DHCID;
1309
+ DNS_NSEC3_DATA NSEC3, Nsec3;
1310
+ DNS_NSEC3PARAM_DATA NSEC3PARAM, Nsec3Param;
1311
+ DNS_TLSA_DATA TLSA, Tlsa;
1312
+ DNS_SVCB_DATA SVCB, Svcb;
1313
+ DNS_UNKNOWN_DATA UNKNOWN, Unknown;
1314
+ PBYTE pDataPtr;
1315
+
1316
+ } Data;
1317
+ }
1318
+ DNS_RECORDW, *PDNS_RECORDW;
1319
+
1320
+ typedef struct _DnsRecordOptW
1321
+ {
1322
+ struct _DnsRecordW * pNext;
1323
+ PWSTR pName;
1324
+ WORD wType;
1325
+ WORD wDataLength; // Not referenced for DNS record types
1326
+ // defined above.
1327
+ union
1328
+ {
1329
+ DWORD DW; // flags as DWORD
1330
+ DNS_RECORD_FLAGS S; // flags as structure
1331
+
1332
+ } Flags;
1333
+
1334
+ DNS_HEADER_EXT ExtHeader; // TTL
1335
+ WORD wPayloadSize; // dwReserved;
1336
+ WORD wReserved;
1337
+
1338
+ // Record Data
1339
+ union
1340
+ {
1341
+ DNS_OPT_DATA OPT, Opt;
1342
+
1343
+ } Data;
1344
+ }
1345
+ DNS_RECORD_OPTW, *PDNS_RECORD_OPTW;
1346
+
1347
+
1348
+ typedef _Struct_size_bytes_(FIELD_OFFSET(struct _DnsRecordA, Data) + wDataLength) struct _DnsRecordA
1349
+ {
1350
+ struct _DnsRecordA * pNext;
1351
+ PSTR pName;
1352
+ WORD wType;
1353
+ WORD wDataLength; // Not referenced for DNS record types
1354
+ // defined above.
1355
+ union
1356
+ {
1357
+ DWORD DW; // flags as DWORD
1358
+ DNS_RECORD_FLAGS S; // flags as structure
1359
+
1360
+ } Flags;
1361
+
1362
+ DWORD dwTtl;
1363
+ DWORD dwReserved;
1364
+
1365
+ // Record Data
1366
+
1367
+ union
1368
+ {
1369
+ DNS_A_DATA A;
1370
+ DNS_SOA_DATAA SOA, Soa;
1371
+ DNS_PTR_DATAA PTR, Ptr,
1372
+ NS, Ns,
1373
+ CNAME, Cname,
1374
+ DNAME, Dname,
1375
+ MB, Mb,
1376
+ MD, Md,
1377
+ MF, Mf,
1378
+ MG, Mg,
1379
+ MR, Mr;
1380
+ DNS_MINFO_DATAA MINFO, Minfo,
1381
+ RP, Rp;
1382
+ DNS_MX_DATAA MX, Mx,
1383
+ AFSDB, Afsdb,
1384
+ RT, Rt;
1385
+ DNS_TXT_DATAA HINFO, Hinfo,
1386
+ ISDN, Isdn,
1387
+ TXT, Txt,
1388
+ X25;
1389
+ DNS_NULL_DATA Null;
1390
+ DNS_WKS_DATA WKS, Wks;
1391
+ DNS_AAAA_DATA AAAA;
1392
+ DNS_KEY_DATA KEY, Key;
1393
+ DNS_SIG_DATAA SIG, Sig;
1394
+ DNS_ATMA_DATA ATMA, Atma;
1395
+ DNS_NXT_DATAA NXT, Nxt;
1396
+ DNS_SRV_DATAA SRV, Srv;
1397
+ DNS_NAPTR_DATAA NAPTR, Naptr;
1398
+ DNS_OPT_DATA OPT, Opt;
1399
+ DNS_DS_DATA DS, Ds;
1400
+ DNS_RRSIG_DATAA RRSIG, Rrsig;
1401
+ DNS_NSEC_DATAA NSEC, Nsec;
1402
+ DNS_DNSKEY_DATA DNSKEY, Dnskey;
1403
+ DNS_TKEY_DATAA TKEY, Tkey;
1404
+ DNS_TSIG_DATAA TSIG, Tsig;
1405
+ DNS_WINS_DATA WINS, Wins;
1406
+ DNS_WINSR_DATAA WINSR, WinsR, NBSTAT, Nbstat;
1407
+ DNS_DHCID_DATA DHCID;
1408
+ DNS_NSEC3_DATA NSEC3, Nsec3;
1409
+ DNS_NSEC3PARAM_DATA NSEC3PARAM, Nsec3Param;
1410
+ DNS_TLSA_DATA TLSA, Tlsa;
1411
+ DNS_SVCB_DATA SVCB, Svcb;
1412
+ DNS_UNKNOWN_DATA UNKNOWN, Unknown;
1413
+ PBYTE pDataPtr;
1414
+
1415
+ } Data;
1416
+ }
1417
+ DNS_RECORDA, *PDNS_RECORDA;
1418
+
1419
+
1420
+ typedef struct _DnsRecordOptA
1421
+ {
1422
+ struct _DnsRecordA * pNext;
1423
+ PSTR pName;
1424
+ WORD wType;
1425
+ WORD wDataLength; // Not referenced for DNS record types
1426
+ // defined above.
1427
+ union
1428
+ {
1429
+ DWORD DW; // flags as DWORD
1430
+ DNS_RECORD_FLAGS S; // flags as structure
1431
+
1432
+ } Flags;
1433
+
1434
+ DNS_HEADER_EXT ExtHeader; // TTL
1435
+ WORD wPayloadSize; // dwReserved;
1436
+ WORD wReserved;
1437
+
1438
+ // Record Data
1439
+
1440
+ union
1441
+ {
1442
+ DNS_OPT_DATA OPT, Opt;
1443
+
1444
+ } Data;
1445
+ }
1446
+ DNS_RECORD_OPTA, *PDNS_RECORD_OPTA;
1447
+
1448
+
1449
+ #ifdef UNICODE
1450
+ typedef DNS_RECORDW DNS_RECORD, *PDNS_RECORD;
1451
+ typedef DNS_RECORD_OPTW DNS_RECORD_OPT, *PDNS_RECORD_OPT;
1452
+ #else
1453
+ typedef DNS_RECORDA DNS_RECORD, *PDNS_RECORD;
1454
+ typedef DNS_RECORD_OPTA DNS_RECORD_OPT, *PDNS_RECORD_OPT;
1455
+ #endif
1456
+
1457
+ //
1458
+ // Header or fixed size of DNS_RECORD
1459
+ //
1460
+
1461
+ #define DNS_RECORD_FIXED_SIZE FIELD_OFFSET( DNS_RECORD, Data )
1462
+ #define SIZEOF_DNS_RECORD_HEADER DNS_RECORD_FIXED_SIZE
1463
+
1464
+ #endif // MIDL_PASS
1465
+
1466
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
1467
+ #pragma endregion
1468
+
1469
+ #pragma region Desktop Family or OneCore Family or Games Family
1470
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
1471
+
1472
+ //
1473
+ // DNS public types
1474
+ //
1475
+
1476
+ #if !defined(_Return_type_success_)
1477
+ # define _Return_type_success_(expr)
1478
+ #endif
1479
+
1480
+ typedef _Return_type_success_(return == 0) LONG DNS_STATUS;
1481
+ typedef DNS_STATUS *PDNS_STATUS;
1482
+
1483
+ //
1484
+ // DNS Address structures representing both IPv4 and IPv6 addresses.
1485
+ //
1486
+
1487
+ #pragma pack(push, 1)
1488
+
1489
+ #if defined( MIDL_PASS )
1490
+
1491
+ typedef struct _DnsAddr
1492
+ {
1493
+ CHAR MaxSa[ DNS_ADDR_MAX_SOCKADDR_LENGTH ];
1494
+ DWORD DnsAddrUserDword[ 8 ];
1495
+ }
1496
+ DNS_ADDR, *PDNS_ADDR;
1497
+
1498
+ typedef struct _DnsAddrArray
1499
+ {
1500
+ DWORD MaxCount;
1501
+ DWORD AddrCount;
1502
+ DWORD Tag;
1503
+ WORD Family;
1504
+ WORD WordReserved;
1505
+ DWORD Flags;
1506
+ DWORD MatchFlag;
1507
+ DWORD Reserved1;
1508
+ DWORD Reserved2;
1509
+ [size_is( AddrCount )] DNS_ADDR AddrArray[];
1510
+ }
1511
+ DNS_ADDR_ARRAY, *PDNS_ADDR_ARRAY;
1512
+
1513
+ #elif !defined( USE_PRIVATE_DNS_ADDR )
1514
+
1515
+ typedef struct _DnsAddr
1516
+ {
1517
+ CHAR MaxSa[ DNS_ADDR_MAX_SOCKADDR_LENGTH ];
1518
+ union
1519
+ {
1520
+ DWORD DnsAddrUserDword[ 8 ];
1521
+ }
1522
+ Data;
1523
+ }
1524
+ DNS_ADDR, *PDNS_ADDR;
1525
+
1526
+ typedef struct _DnsAddrArray
1527
+ {
1528
+ DWORD MaxCount;
1529
+ DWORD AddrCount;
1530
+ DWORD Tag;
1531
+ WORD Family;
1532
+ WORD WordReserved;
1533
+ DWORD Flags;
1534
+ DWORD MatchFlag;
1535
+ DWORD Reserved1;
1536
+ DWORD Reserved2;
1537
+ DNS_ADDR AddrArray[ 1 ];
1538
+ }
1539
+ DNS_ADDR_ARRAY, *PDNS_ADDR_ARRAY;
1540
+
1541
+ #endif // MIDL_PASS
1542
+ #pragma pack(pop)
1543
+
1544
+ //
1545
+ // DNS UDP packets no more than 512 bytes
1546
+ //
1547
+
1548
+ #define DNS_RFC_MAX_UDP_PACKET_LENGTH (512)
1549
+
1550
+
1551
+ //
1552
+ // DNS Names limited to 255, 63 in any one label
1553
+ //
1554
+
1555
+ #define DNS_MAX_NAME_LENGTH (255)
1556
+ #define DNS_MAX_LABEL_LENGTH (63)
1557
+ #define DNS_MAX_NAME_BUFFER_LENGTH (256)
1558
+ #define DNS_MAX_LABEL_BUFFER_LENGTH (64)
1559
+
1560
+ #pragma pack(push, 1)
1561
+
1562
+ //
1563
+ // DNS Message Header
1564
+ //
1565
+
1566
+ typedef struct _DNS_HEADER
1567
+ {
1568
+ WORD Xid;
1569
+
1570
+ #ifdef MIDL_PASS
1571
+ WORD Flags;
1572
+ #else
1573
+ BYTE RecursionDesired : 1;
1574
+ BYTE Truncation : 1;
1575
+ BYTE Authoritative : 1;
1576
+ BYTE Opcode : 4;
1577
+ BYTE IsResponse : 1;
1578
+
1579
+ BYTE ResponseCode : 4;
1580
+ BYTE CheckingDisabled : 1;
1581
+ BYTE AuthenticatedData : 1;
1582
+ BYTE Reserved : 1;
1583
+ BYTE RecursionAvailable : 1;
1584
+ #endif
1585
+
1586
+ WORD QuestionCount;
1587
+ WORD AnswerCount;
1588
+ WORD NameServerCount;
1589
+ WORD AdditionalCount;
1590
+ }
1591
+ DNS_HEADER, *PDNS_HEADER;
1592
+
1593
+ //
1594
+ // Flags as WORD
1595
+ //
1596
+
1597
+ #define DNS_HEADER_FLAGS(pHead) ( *((PWORD)(pHead)+1) )
1598
+
1599
+ #pragma pack(pop)
1600
+
1601
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
1602
+ #pragma endregion
1603
+
1604
+
1605
+ #pragma region Desktop Family or OneCore Family
1606
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
1607
+
1608
+ typedef enum _DNS_CHARSET
1609
+ {
1610
+ DnsCharSetUnknown,
1611
+ DnsCharSetUnicode,
1612
+ DnsCharSetUtf8,
1613
+ DnsCharSetAnsi,
1614
+ }
1615
+ DNS_CHARSET;
1616
+
1617
+ typedef struct _DNS_MESSAGE_BUFFER
1618
+ {
1619
+ DNS_HEADER MessageHead;
1620
+ CHAR MessageBody[1];
1621
+ }
1622
+ DNS_MESSAGE_BUFFER, *PDNS_MESSAGE_BUFFER;
1623
+
1624
+ #define DNS_CUSTOM_SERVER_TYPE_UDP 0x1
1625
+ #define DNS_CUSTOM_SERVER_TYPE_DOH 0x2
1626
+ #define DNS_CUSTOM_SERVER_TYPE_DOT 0x3
1627
+
1628
+ #define DNS_CUSTOM_SERVER_UDP_FALLBACK 0x1
1629
+ #define DNS_CUSTOM_SERVER_UPGRADE_FROM_WELL_KNOWN_SERVERS 0x2
1630
+
1631
+ #pragma warning(push)
1632
+ #pragma warning(disable: 4201) // nameless struct/union (anonymous unions for DNS_CUSTOM_SERVER representation variants)
1633
+
1634
+ #ifdef MIDL_PASS
1635
+
1636
+ typedef struct _DNS_CUSTOM_SERVER
1637
+ {
1638
+ DWORD dwServerType;
1639
+ ULONG64 ullFlags;
1640
+
1641
+ [switch_type(DWORD)]
1642
+ [switch_is(dwServerType)]
1643
+ union
1644
+ {
1645
+ [case(DNS_CUSTOM_SERVER_TYPE_DOH)] PWSTR pwszTemplate;
1646
+ [case(DNS_CUSTOM_SERVER_TYPE_DOT)] PWSTR pwszHostname;
1647
+ [case(DNS_CUSTOM_SERVER_TYPE_UDP)] ;
1648
+ };
1649
+
1650
+ CHAR MaxSa[DNS_ADDR_MAX_SOCKADDR_LENGTH];
1651
+ } DNS_CUSTOM_SERVER;
1652
+
1653
+ #else
1654
+
1655
+ typedef struct _DNS_CUSTOM_SERVER
1656
+ {
1657
+ DWORD dwServerType;
1658
+ ULONG64 ullFlags;
1659
+
1660
+ union
1661
+ {
1662
+ PWSTR pwszTemplate;
1663
+ PWSTR pwszHostname;
1664
+ };
1665
+
1666
+ union
1667
+ {
1668
+ #ifdef _WS2TCPIP_H_
1669
+ SOCKADDR_INET ServerAddr;
1670
+ #endif
1671
+ CHAR MaxSa[DNS_ADDR_MAX_SOCKADDR_LENGTH];
1672
+ };
1673
+ } DNS_CUSTOM_SERVER;
1674
+
1675
+ #endif // MIDL_PASS
1676
+
1677
+ #pragma warning(pop)
1678
+
1679
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
1680
+ #pragma endregion
1681
+
1682
+
1683
+ #pragma region Desktop Family or OneCore Family or Games Family
1684
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
1685
+
1686
+ #ifdef __cplusplus
1687
+ }
1688
+ #endif /* __cplusplus */
1689
+
1690
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
1691
+ #pragma endregion
1692
+
1693
+ #endif // _WINDNSDEF_INCLUDED_
msvc/Windows Kits/10/Include/10.0.26100.0/shared/windot11.h ADDED
The diff for this file is too large to render. See raw diff
 
msvc/Windows Kits/10/Include/10.0.26100.0/shared/windowsx.h ADDED
@@ -0,0 +1,1380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************************************************\
2
+ * *
3
+ * windowsx.h - Macro APIs, window message crackers, and control APIs *
4
+ * *
5
+ * Version Win32 / Windows NT *
6
+ * *
7
+ * Copyright (c) 1992-1999, Microsoft Corp. All rights reserved.*
8
+ * *
9
+ \*****************************************************************************/
10
+
11
+ #ifndef _INC_WINDOWSX
12
+ #define _INC_WINDOWSX
13
+
14
+ #if (_MSC_VER >= 1020)
15
+ #pragma once
16
+ #endif
17
+ #include <winapifamily.h>
18
+
19
+ #pragma region Desktop Family
20
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
21
+
22
+
23
+ #ifdef __cplusplus
24
+ extern "C" { /* Assume C declarations for C++ */
25
+ #endif /* __cplusplus */
26
+
27
+ #ifndef SNDMSG
28
+ #ifdef __cplusplus
29
+ #ifndef _MAC
30
+ #define SNDMSG ::SendMessage
31
+ #else
32
+ #define SNDMSG ::AfxSendMessage
33
+ #endif
34
+ #else /* __cplusplus */
35
+ #ifndef _MAC
36
+ #define SNDMSG SendMessage
37
+ #else
38
+ #define SNDMSG AfxSendMessage
39
+ #endif
40
+ #endif /* __cplusplus */
41
+ #endif /* SNDMSG */
42
+
43
+ /****** KERNEL Macro APIs ****************************************************/
44
+
45
+ #define GetInstanceModule(hInstance) (HMODULE)(hInstance)
46
+
47
+ #define GlobalPtrHandle(lp) \
48
+ ((HGLOBAL)GlobalHandle(lp))
49
+
50
+ #define GlobalLockPtr(lp) \
51
+ ((BOOL)GlobalLock(GlobalPtrHandle(lp)))
52
+ #define GlobalUnlockPtr(lp) \
53
+ GlobalUnlock(GlobalPtrHandle(lp))
54
+
55
+ #ifndef _MAC
56
+ #define GlobalAllocPtr(flags, cb) \
57
+ (GlobalLock(GlobalAlloc((flags), (cb))))
58
+ #else
59
+ #define GlobalAllocPtr(flags, cb) \
60
+ (GlobalLock(GlobalAlloc((flags) | GMEM_PMODELOCKSTRATEGY, (cb))))
61
+ #endif
62
+ #define GlobalReAllocPtr(lp, cbNew, flags) \
63
+ (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags))))
64
+ #define GlobalFreePtr(lp) \
65
+ (GlobalUnlockPtr(lp), (BOOL)(ULONG_PTR)GlobalFree(GlobalPtrHandle(lp)))
66
+
67
+ /****** GDI Macro APIs *******************************************************/
68
+
69
+ #define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen))
70
+ #define SelectPen(hdc, hpen) ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen)))
71
+ #define GetStockPen(i) ((HPEN)GetStockObject(i))
72
+
73
+ #define DeleteBrush(hbr) DeleteObject((HGDIOBJ)(HBRUSH)(hbr))
74
+ #define SelectBrush(hdc, hbr) ((HBRUSH)SelectObject((hdc), (HGDIOBJ)(HBRUSH)(hbr)))
75
+ #define GetStockBrush(i) ((HBRUSH)GetStockObject(i))
76
+
77
+ #define DeleteRgn(hrgn) DeleteObject((HGDIOBJ)(HRGN)(hrgn))
78
+
79
+ #ifndef _MAC
80
+ #define CopyRgn(hrgnDst, hrgnSrc) CombineRgn(hrgnDst, hrgnSrc, 0, RGN_COPY)
81
+ #else
82
+ #define AfxCopyRgn(hrgnDst, hrgnSrc) CombineRgn(hrgnDst, hrgnSrc, 0, RGN_COPY)
83
+ #endif
84
+ #define IntersectRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_AND)
85
+ #define SubtractRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_DIFF)
86
+ #ifndef _MAC
87
+ #define UnionRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_OR)
88
+ #define XorRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_XOR)
89
+ #else
90
+ #define AfxUnionRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_OR)
91
+ #define AfxXorRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_XOR)
92
+ #endif
93
+
94
+ #define DeletePalette(hpal) DeleteObject((HGDIOBJ)(HPALETTE)(hpal))
95
+
96
+ #define DeleteFont(hfont) DeleteObject((HGDIOBJ)(HFONT)(hfont))
97
+ #define SelectFont(hdc, hfont) ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT)(hfont)))
98
+ #define GetStockFont(i) ((HFONT)GetStockObject(i))
99
+
100
+ #define DeleteBitmap(hbm) DeleteObject((HGDIOBJ)(HBITMAP)(hbm))
101
+ #define SelectBitmap(hdc, hbm) ((HBITMAP)SelectObject((hdc), (HGDIOBJ)(HBITMAP)(hbm)))
102
+
103
+ #ifndef _MAC
104
+ #define InsetRect(lprc, dx, dy) InflateRect((lprc), -(dx), -(dy))
105
+ #else
106
+ #define AfxInsetRect(lprc, dx, dy) InflateRect((lprc), -(dx), -(dy))
107
+ #endif
108
+
109
+ /****** USER Macro APIs ******************************************************/
110
+
111
+ #define GetWindowInstance(hwnd) ((HMODULE)GetWindowLongPtr(hwnd, GWLP_HINSTANCE))
112
+
113
+ #define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE))
114
+ #define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE))
115
+
116
+ #define GetWindowOwner(hwnd) GetWindow(hwnd, GW_OWNER)
117
+
118
+ #define GetFirstChild(hwnd) GetTopWindow(hwnd)
119
+ #define GetFirstSibling(hwnd) GetWindow(hwnd, GW_HWNDFIRST)
120
+ #define GetLastSibling(hwnd) GetWindow(hwnd, GW_HWNDLAST)
121
+ #define GetNextSibling(hwnd) GetWindow(hwnd, GW_HWNDNEXT)
122
+ #define GetPrevSibling(hwnd) GetWindow(hwnd, GW_HWNDPREV)
123
+
124
+ #define GetWindowID(hwnd) GetDlgCtrlID(hwnd)
125
+
126
+ #define SetWindowRedraw(hwnd, fRedraw) \
127
+ ((void)SNDMSG(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L))
128
+
129
+ #define SubclassWindow(hwnd, lpfn) \
130
+ ((WNDPROC)SetWindowLongPtr((hwnd), GWLP_WNDPROC, (LPARAM)(WNDPROC)(lpfn)))
131
+
132
+ #define IsMinimized(hwnd) IsIconic(hwnd)
133
+ #define IsMaximized(hwnd) IsZoomed(hwnd)
134
+ #define IsRestored(hwnd) ((GetWindowStyle(hwnd) & (WS_MINIMIZE | WS_MAXIMIZE)) == 0L)
135
+
136
+ #define SetWindowFont(hwnd, hfont, fRedraw) FORWARD_WM_SETFONT((hwnd), (hfont), (fRedraw), SNDMSG)
137
+
138
+ #define GetWindowFont(hwnd) FORWARD_WM_GETFONT((hwnd), SNDMSG)
139
+ #if (WINVER >= 0x030a)
140
+
141
+ #ifdef UNIX
142
+ #define MapWindowRect MwMapWindowRect
143
+ LONG MwMapWindowRect(HWND, HWND, RECT *);
144
+ #else
145
+
146
+ #define MapWindowRect(hwndFrom, hwndTo, lprc) \
147
+ MapWindowPoints((hwndFrom), (hwndTo), (POINT *)(lprc), 2)
148
+ #endif /* !UNIX */
149
+ #endif
150
+ #define IsLButtonDown() (GetKeyState(VK_LBUTTON) < 0)
151
+ #define IsRButtonDown() (GetKeyState(VK_RBUTTON) < 0)
152
+ #define IsMButtonDown() (GetKeyState(VK_MBUTTON) < 0)
153
+
154
+ #define SubclassDialog(hwndDlg, lpfn) \
155
+ (SetWindowLongPtr(hwndDlg, DWLP_DLGPROC, (LPARAM)(lpfn)))
156
+
157
+ #define SetDlgMsgResult(hwnd, msg, result) (( \
158
+ (msg) == WM_CTLCOLORMSGBOX || \
159
+ (msg) == WM_CTLCOLOREDIT || \
160
+ (msg) == WM_CTLCOLORLISTBOX || \
161
+ (msg) == WM_CTLCOLORBTN || \
162
+ (msg) == WM_CTLCOLORDLG || \
163
+ (msg) == WM_CTLCOLORSCROLLBAR || \
164
+ (msg) == WM_CTLCOLORSTATIC || \
165
+ (msg) == WM_COMPAREITEM || \
166
+ (msg) == WM_VKEYTOITEM || \
167
+ (msg) == WM_CHARTOITEM || \
168
+ (msg) == WM_QUERYDRAGICON || \
169
+ (msg) == WM_INITDIALOG \
170
+ ) ? (BOOL)(result) : (SetWindowLongPtr((hwnd), DWLP_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE))
171
+
172
+ #define DefDlgProcEx(hwnd, msg, wParam, lParam, pfRecursion) \
173
+ (*(pfRecursion) = TRUE, DefDlgProc(hwnd, msg, wParam, lParam))
174
+
175
+ #define CheckDefDlgRecursion(pfRecursion) \
176
+ if (*(pfRecursion)) { *(pfRecursion) = FALSE; return FALSE; }
177
+
178
+ /****** Message crackers ****************************************************/
179
+
180
+ #define HANDLE_MSG(hwnd, message, fn) \
181
+ case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn))
182
+
183
+ /* void Cls_OnCompacting(HWND hwnd, UINT compactRatio) */
184
+ #define HANDLE_WM_COMPACTING(hwnd, wParam, lParam, fn) \
185
+ ((fn)((hwnd), (UINT)(wParam)), 0L)
186
+ #define FORWARD_WM_COMPACTING(hwnd, compactRatio, fn) \
187
+ (void)(fn)((hwnd), WM_COMPACTING, (WPARAM)(UINT)(compactRatio), 0L)
188
+
189
+ /* void Cls_OnWinIniChange(HWND hwnd, LPCTSTR lpszSectionName) */
190
+ #define HANDLE_WM_WININICHANGE(hwnd, wParam, lParam, fn) \
191
+ ((fn)((hwnd), (LPCTSTR)(lParam)), 0L)
192
+ #define FORWARD_WM_WININICHANGE(hwnd, lpszSectionName, fn) \
193
+ (void)(fn)((hwnd), WM_WININICHANGE, 0L, (LPARAM)(LPCTSTR)(lpszSectionName))
194
+
195
+ /* void Cls_OnSysColorChange(HWND hwnd) */
196
+ #define HANDLE_WM_SYSCOLORCHANGE(hwnd, wParam, lParam, fn) \
197
+ ((fn)(hwnd), 0L)
198
+ #define FORWARD_WM_SYSCOLORCHANGE(hwnd, fn) \
199
+ (void)(fn)((hwnd), WM_SYSCOLORCHANGE, 0L, 0L)
200
+
201
+ /* BOOL Cls_OnQueryNewPalette(HWND hwnd) */
202
+ #define HANDLE_WM_QUERYNEWPALETTE(hwnd, wParam, lParam, fn) \
203
+ MAKELRESULT((BOOL)(fn)(hwnd), 0L)
204
+ #define FORWARD_WM_QUERYNEWPALETTE(hwnd, fn) \
205
+ (BOOL)(DWORD)(fn)((hwnd), WM_QUERYNEWPALETTE, 0L, 0L)
206
+
207
+ /* void Cls_OnPaletteIsChanging(HWND hwnd, HWND hwndPaletteChange) */
208
+ #define HANDLE_WM_PALETTEISCHANGING(hwnd, wParam, lParam, fn) \
209
+ ((fn)((hwnd), (HWND)(wParam)), 0L)
210
+ #define FORWARD_WM_PALETTEISCHANGING(hwnd, hwndPaletteChange, fn) \
211
+ (void)(fn)((hwnd), WM_PALETTEISCHANGING, (WPARAM)(HWND)(hwndPaletteChange), 0L)
212
+
213
+ /* void Cls_OnPaletteChanged(HWND hwnd, HWND hwndPaletteChange) */
214
+ #define HANDLE_WM_PALETTECHANGED(hwnd, wParam, lParam, fn) \
215
+ ((fn)((hwnd), (HWND)(wParam)), 0L)
216
+ #define FORWARD_WM_PALETTECHANGED(hwnd, hwndPaletteChange, fn) \
217
+ (void)(fn)((hwnd), WM_PALETTECHANGED, (WPARAM)(HWND)(hwndPaletteChange), 0L)
218
+
219
+ /* void Cls_OnFontChange(HWND hwnd) */
220
+ #define HANDLE_WM_FONTCHANGE(hwnd, wParam, lParam, fn) \
221
+ ((fn)(hwnd), 0L)
222
+ #define FORWARD_WM_FONTCHANGE(hwnd, fn) \
223
+ (void)(fn)((hwnd), WM_FONTCHANGE, 0L, 0L)
224
+
225
+ /* void Cls_OnSpoolerStatus(HWND hwnd, UINT status, int cJobInQueue) */
226
+ #define HANDLE_WM_SPOOLERSTATUS(hwnd, wParam, lParam, fn) \
227
+ ((fn)((hwnd), (UINT)(wParam), (int)(short)LOWORD(lParam)), 0L)
228
+ #define FORWARD_WM_SPOOLERSTATUS(hwnd, status, cJobInQueue, fn) \
229
+ (void)(fn)((hwnd), WM_SPOOLERSTATUS, (WPARAM)(status), MAKELPARAM((cJobInQueue), 0))
230
+
231
+ /* void Cls_OnDevModeChange(HWND hwnd, LPCTSTR lpszDeviceName) */
232
+ #define HANDLE_WM_DEVMODECHANGE(hwnd, wParam, lParam, fn) \
233
+ ((fn)((hwnd), (LPCTSTR)(lParam)), 0L)
234
+ #define FORWARD_WM_DEVMODECHANGE(hwnd, lpszDeviceName, fn) \
235
+ (void)(fn)((hwnd), WM_DEVMODECHANGE, 0L, (LPARAM)(LPCTSTR)(lpszDeviceName))
236
+
237
+ /* void Cls_OnTimeChange(HWND hwnd) */
238
+ #define HANDLE_WM_TIMECHANGE(hwnd, wParam, lParam, fn) \
239
+ ((fn)(hwnd), 0L)
240
+ #define FORWARD_WM_TIMECHANGE(hwnd, fn) \
241
+ (void)(fn)((hwnd), WM_TIMECHANGE, 0L, 0L)
242
+
243
+ /* void Cls_OnPower(HWND hwnd, int code) */
244
+ #define HANDLE_WM_POWER(hwnd, wParam, lParam, fn) \
245
+ ((fn)((hwnd), (int)(wParam)), 0L)
246
+ #define FORWARD_WM_POWER(hwnd, code, fn) \
247
+ (void)(fn)((hwnd), WM_POWER, (WPARAM)(int)(code), 0L)
248
+
249
+ /* BOOL Cls_OnQueryEndSession(HWND hwnd) */
250
+ #define HANDLE_WM_QUERYENDSESSION(hwnd, wParam, lParam, fn) \
251
+ MAKELRESULT((BOOL)(fn)(hwnd), 0L)
252
+ #define FORWARD_WM_QUERYENDSESSION(hwnd, fn) \
253
+ (BOOL)(DWORD)(fn)((hwnd), WM_QUERYENDSESSION, 0L, 0L)
254
+
255
+ /* void Cls_OnEndSession(HWND hwnd, BOOL fEnding) */
256
+ #define HANDLE_WM_ENDSESSION(hwnd, wParam, lParam, fn) \
257
+ ((fn)((hwnd), (BOOL)(wParam)), 0L)
258
+ #define FORWARD_WM_ENDSESSION(hwnd, fEnding, fn) \
259
+ (void)(fn)((hwnd), WM_ENDSESSION, (WPARAM)(BOOL)(fEnding), 0L)
260
+
261
+ /* void Cls_OnQuit(HWND hwnd, int exitCode) */
262
+ #define HANDLE_WM_QUIT(hwnd, wParam, lParam, fn) \
263
+ ((fn)((hwnd), (int)(wParam)), 0L)
264
+ #define FORWARD_WM_QUIT(hwnd, exitCode, fn) \
265
+ (void)(fn)((hwnd), WM_QUIT, (WPARAM)(exitCode), 0L)
266
+
267
+ /* This message is in Windows 3.1 only */
268
+ /* void Cls_OnSystemError(HWND hwnd, int errCode) */
269
+ #define HANDLE_WM_SYSTEMERROR(hwnd, wParam, lParam, fn) 0L
270
+ #define FORWARD_WM_SYSTEMERROR(hwnd, errCode, fn) 0L
271
+
272
+ /* BOOL Cls_OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct) */
273
+ #define HANDLE_WM_CREATE(hwnd, wParam, lParam, fn) \
274
+ ((fn)((hwnd), (LPCREATESTRUCT)(lParam)) ? 0L : (LRESULT)-1L)
275
+ #define FORWARD_WM_CREATE(hwnd, lpCreateStruct, fn) \
276
+ (BOOL)(DWORD)(fn)((hwnd), WM_CREATE, 0L, (LPARAM)(LPCREATESTRUCT)(lpCreateStruct))
277
+
278
+ /* BOOL Cls_OnNCCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct) */
279
+ #define HANDLE_WM_NCCREATE(hwnd, wParam, lParam, fn) \
280
+ (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (LPCREATESTRUCT)(lParam))
281
+ #define FORWARD_WM_NCCREATE(hwnd, lpCreateStruct, fn) \
282
+ (BOOL)(DWORD)(fn)((hwnd), WM_NCCREATE, 0L, (LPARAM)(LPCREATESTRUCT)(lpCreateStruct))
283
+
284
+ /* void Cls_OnDestroy(HWND hwnd) */
285
+ #define HANDLE_WM_DESTROY(hwnd, wParam, lParam, fn) \
286
+ ((fn)(hwnd), 0L)
287
+ #define FORWARD_WM_DESTROY(hwnd, fn) \
288
+ (void)(fn)((hwnd), WM_DESTROY, 0L, 0L)
289
+
290
+ /* void Cls_OnNCDestroy(HWND hwnd) */
291
+ #define HANDLE_WM_NCDESTROY(hwnd, wParam, lParam, fn) \
292
+ ((fn)(hwnd), 0L)
293
+ #define FORWARD_WM_NCDESTROY(hwnd, fn) \
294
+ (void)(fn)((hwnd), WM_NCDESTROY, 0L, 0L)
295
+
296
+ /* void Cls_OnShowWindow(HWND hwnd, BOOL fShow, UINT status) */
297
+ #define HANDLE_WM_SHOWWINDOW(hwnd, wParam, lParam, fn) \
298
+ ((fn)((hwnd), (BOOL)(wParam), (UINT)(lParam)), 0L)
299
+ #define FORWARD_WM_SHOWWINDOW(hwnd, fShow, status, fn) \
300
+ (void)(fn)((hwnd), WM_SHOWWINDOW, (WPARAM)(BOOL)(fShow), (LPARAM)(UINT)(status))
301
+
302
+ /* void Cls_OnSetRedraw(HWND hwnd, BOOL fRedraw) */
303
+ #define HANDLE_WM_SETREDRAW(hwnd, wParam, lParam, fn) \
304
+ ((fn)((hwnd), (BOOL)(wParam)), 0L)
305
+ #define FORWARD_WM_SETREDRAW(hwnd, fRedraw, fn) \
306
+ (void)(fn)((hwnd), WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L)
307
+
308
+ /* void Cls_OnEnable(HWND hwnd, BOOL fEnable) */
309
+ #define HANDLE_WM_ENABLE(hwnd, wParam, lParam, fn) \
310
+ ((fn)((hwnd), (BOOL)(wParam)), 0L)
311
+ #define FORWARD_WM_ENABLE(hwnd, fEnable, fn) \
312
+ (void)(fn)((hwnd), WM_ENABLE, (WPARAM)(BOOL)(fEnable), 0L)
313
+
314
+ /* void Cls_OnSetText(HWND hwnd, LPCTSTR lpszText) */
315
+ #define HANDLE_WM_SETTEXT(hwnd, wParam, lParam, fn) \
316
+ ((fn)((hwnd), (LPCTSTR)(lParam)), 0L)
317
+ #define FORWARD_WM_SETTEXT(hwnd, lpszText, fn) \
318
+ (void)(fn)((hwnd), WM_SETTEXT, 0L, (LPARAM)(LPCTSTR)(lpszText))
319
+
320
+ /* INT Cls_OnGetText(HWND hwnd, int cchTextMax, LPTSTR lpszText) */
321
+ #define HANDLE_WM_GETTEXT(hwnd, wParam, lParam, fn) \
322
+ (LRESULT)(DWORD)(int)(fn)((hwnd), (int)(wParam), (LPTSTR)(lParam))
323
+ #define FORWARD_WM_GETTEXT(hwnd, cchTextMax, lpszText, fn) \
324
+ (int)(DWORD)(fn)((hwnd), WM_GETTEXT, (WPARAM)(int)(cchTextMax), (LPARAM)(LPTSTR)(lpszText))
325
+
326
+ /* INT Cls_OnGetTextLength(HWND hwnd) */
327
+ #define HANDLE_WM_GETTEXTLENGTH(hwnd, wParam, lParam, fn) \
328
+ (LRESULT)(DWORD)(int)(fn)(hwnd)
329
+ #define FORWARD_WM_GETTEXTLENGTH(hwnd, fn) \
330
+ (int)(DWORD)(fn)((hwnd), WM_GETTEXTLENGTH, 0L, 0L)
331
+
332
+ /* BOOL Cls_OnWindowPosChanging(HWND hwnd, LPWINDOWPOS lpwpos) */
333
+ #define HANDLE_WM_WINDOWPOSCHANGING(hwnd, wParam, lParam, fn) \
334
+ (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (LPWINDOWPOS)(lParam))
335
+ #define FORWARD_WM_WINDOWPOSCHANGING(hwnd, lpwpos, fn) \
336
+ (BOOL)(DWORD)(fn)((hwnd), WM_WINDOWPOSCHANGING, 0L, (LPARAM)(LPWINDOWPOS)(lpwpos))
337
+
338
+ /* void Cls_OnWindowPosChanged(HWND hwnd, const LPWINDOWPOS lpwpos) */
339
+ #define HANDLE_WM_WINDOWPOSCHANGED(hwnd, wParam, lParam, fn) \
340
+ ((fn)((hwnd), (const LPWINDOWPOS)(lParam)), 0L)
341
+ #define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn) \
342
+ (void)(fn)((hwnd), WM_WINDOWPOSCHANGED, 0L, (LPARAM)(const LPWINDOWPOS)(lpwpos))
343
+
344
+ /* void Cls_OnMove(HWND hwnd, int x, int y) */
345
+ #define HANDLE_WM_MOVE(hwnd, wParam, lParam, fn) \
346
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam)), 0L)
347
+ #define FORWARD_WM_MOVE(hwnd, x, y, fn) \
348
+ (void)(fn)((hwnd), WM_MOVE, 0L, MAKELPARAM((x), (y)))
349
+
350
+ /* void Cls_OnSize(HWND hwnd, UINT state, int cx, int cy) */
351
+ #define HANDLE_WM_SIZE(hwnd, wParam, lParam, fn) \
352
+ ((fn)((hwnd), (UINT)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam)), 0L)
353
+ #define FORWARD_WM_SIZE(hwnd, state, cx, cy, fn) \
354
+ (void)(fn)((hwnd), WM_SIZE, (WPARAM)(UINT)(state), MAKELPARAM((cx), (cy)))
355
+
356
+ /* void Cls_OnClose(HWND hwnd) */
357
+ #define HANDLE_WM_CLOSE(hwnd, wParam, lParam, fn) \
358
+ ((fn)(hwnd), 0L)
359
+ #define FORWARD_WM_CLOSE(hwnd, fn) \
360
+ (void)(fn)((hwnd), WM_CLOSE, 0L, 0L)
361
+
362
+ /* BOOL Cls_OnQueryOpen(HWND hwnd) */
363
+ #define HANDLE_WM_QUERYOPEN(hwnd, wParam, lParam, fn) \
364
+ MAKELRESULT((BOOL)(fn)(hwnd), 0L)
365
+ #define FORWARD_WM_QUERYOPEN(hwnd, fn) \
366
+ (BOOL)(DWORD)(fn)((hwnd), WM_QUERYOPEN, 0L, 0L)
367
+
368
+ /* void Cls_OnGetMinMaxInfo(HWND hwnd, LPMINMAXINFO lpMinMaxInfo) */
369
+ #define HANDLE_WM_GETMINMAXINFO(hwnd, wParam, lParam, fn) \
370
+ ((fn)((hwnd), (LPMINMAXINFO)(lParam)), 0L)
371
+ #define FORWARD_WM_GETMINMAXINFO(hwnd, lpMinMaxInfo, fn) \
372
+ (void)(fn)((hwnd), WM_GETMINMAXINFO, 0L, (LPARAM)(LPMINMAXINFO)(lpMinMaxInfo))
373
+
374
+ /* void Cls_OnPaint(HWND hwnd) */
375
+ #define HANDLE_WM_PAINT(hwnd, wParam, lParam, fn) \
376
+ ((fn)(hwnd), 0L)
377
+ #define FORWARD_WM_PAINT(hwnd, fn) \
378
+ (void)(fn)((hwnd), WM_PAINT, 0L, 0L)
379
+
380
+ /* BOOL Cls_OnEraseBkgnd(HWND hwnd, HDC hdc) */
381
+ #define HANDLE_WM_ERASEBKGND(hwnd, wParam, lParam, fn) \
382
+ (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam))
383
+ #define FORWARD_WM_ERASEBKGND(hwnd, hdc, fn) \
384
+ (BOOL)(DWORD)(fn)((hwnd), WM_ERASEBKGND, (WPARAM)(HDC)(hdc), 0L)
385
+
386
+ /* BOOL Cls_OnIconEraseBkgnd(HWND hwnd, HDC hdc) */
387
+ #define HANDLE_WM_ICONERASEBKGND(hwnd, wParam, lParam, fn) \
388
+ (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam))
389
+ #define FORWARD_WM_ICONERASEBKGND(hwnd, hdc, fn) \
390
+ (BOOL)(DWORD)(fn)((hwnd), WM_ICONERASEBKGND, (WPARAM)(HDC)(hdc), 0L)
391
+
392
+ /* void Cls_OnNCPaint(HWND hwnd, HRGN hrgn) */
393
+ #define HANDLE_WM_NCPAINT(hwnd, wParam, lParam, fn) \
394
+ ((fn)((hwnd), (HRGN)(wParam)), 0L)
395
+ #define FORWARD_WM_NCPAINT(hwnd, hrgn, fn) \
396
+ (void)(fn)((hwnd), WM_NCPAINT, (WPARAM)(HRGN)(hrgn), 0L)
397
+
398
+ /* UINT Cls_OnNCCalcSize(HWND hwnd, BOOL fCalcValidRects, NCCALCSIZE_PARAMS * lpcsp) */
399
+ #define HANDLE_WM_NCCALCSIZE(hwnd, wParam, lParam, fn) \
400
+ (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (NCCALCSIZE_PARAMS *)(lParam))
401
+ #define FORWARD_WM_NCCALCSIZE(hwnd, fCalcValidRects, lpcsp, fn) \
402
+ (UINT)(DWORD)(fn)((hwnd), WM_NCCALCSIZE, (WPARAM)(fCalcValidRects), (LPARAM)(NCCALCSIZE_PARAMS *)(lpcsp))
403
+
404
+ /* UINT Cls_OnNCHitTest(HWND hwnd, int x, int y) */
405
+ #define HANDLE_WM_NCHITTEST(hwnd, wParam, lParam, fn) \
406
+ (LRESULT)(DWORD)(UINT)(fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam))
407
+ #define FORWARD_WM_NCHITTEST(hwnd, x, y, fn) \
408
+ (UINT)(DWORD)(fn)((hwnd), WM_NCHITTEST, 0L, MAKELPARAM((x), (y)))
409
+
410
+ /* HICON Cls_OnQueryDragIcon(HWND hwnd) */
411
+ #define HANDLE_WM_QUERYDRAGICON(hwnd, wParam, lParam, fn) \
412
+ (LRESULT)(DWORD)(UINT)(fn)(hwnd)
413
+ #define FORWARD_WM_QUERYDRAGICON(hwnd, fn) \
414
+ (HICON)(UINT)(DWORD)(fn)((hwnd), WM_QUERYDRAGICON, 0L, 0L)
415
+
416
+ #ifdef _INC_SHELLAPI
417
+ /* void Cls_OnDropFiles(HWND hwnd, HDROP hdrop) */
418
+ #define HANDLE_WM_DROPFILES(hwnd, wParam, lParam, fn) \
419
+ ((fn)((hwnd), (HDROP)(wParam)), 0L)
420
+ #define FORWARD_WM_DROPFILES(hwnd, hdrop, fn) \
421
+ (void)(fn)((hwnd), WM_DROPFILES, (WPARAM)(HDROP)(hdrop), 0L)
422
+ #endif /* _INC_SHELLAPI */
423
+
424
+ /* void Cls_OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized) */
425
+ #define HANDLE_WM_ACTIVATE(hwnd, wParam, lParam, fn) \
426
+ ((fn)((hwnd), (UINT)LOWORD(wParam), (HWND)(lParam), (BOOL)HIWORD(wParam)), 0L)
427
+ #define FORWARD_WM_ACTIVATE(hwnd, state, hwndActDeact, fMinimized, fn) \
428
+ (void)(fn)((hwnd), WM_ACTIVATE, MAKEWPARAM((state), (fMinimized)), (LPARAM)(HWND)(hwndActDeact))
429
+
430
+ /* void Cls_OnActivateApp(HWND hwnd, BOOL fActivate, DWORD dwThreadId) */
431
+ #define HANDLE_WM_ACTIVATEAPP(hwnd, wParam, lParam, fn) \
432
+ ((fn)((hwnd), (BOOL)(wParam), (DWORD)(lParam)), 0L)
433
+ #define FORWARD_WM_ACTIVATEAPP(hwnd, fActivate, dwThreadId, fn) \
434
+ (void)(fn)((hwnd), WM_ACTIVATEAPP, (WPARAM)(BOOL)(fActivate), (LPARAM)(dwThreadId))
435
+
436
+ /* BOOL Cls_OnNCActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized) */
437
+ #define HANDLE_WM_NCACTIVATE(hwnd, wParam, lParam, fn) \
438
+ (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (BOOL)(wParam), 0L, 0L)
439
+ #define FORWARD_WM_NCACTIVATE(hwnd, fActive, hwndActDeact, fMinimized, fn) \
440
+ (BOOL)(DWORD)(fn)((hwnd), WM_NCACTIVATE, (WPARAM)(BOOL)(fActive), 0L)
441
+
442
+ /* void Cls_OnSetFocus(HWND hwnd, HWND hwndOldFocus) */
443
+ #define HANDLE_WM_SETFOCUS(hwnd, wParam, lParam, fn) \
444
+ ((fn)((hwnd), (HWND)(wParam)), 0L)
445
+ #define FORWARD_WM_SETFOCUS(hwnd, hwndOldFocus, fn) \
446
+ (void)(fn)((hwnd), WM_SETFOCUS, (WPARAM)(HWND)(hwndOldFocus), 0L)
447
+
448
+ /* void Cls_OnKillFocus(HWND hwnd, HWND hwndNewFocus) */
449
+ #define HANDLE_WM_KILLFOCUS(hwnd, wParam, lParam, fn) \
450
+ ((fn)((hwnd), (HWND)(wParam)), 0L)
451
+ #define FORWARD_WM_KILLFOCUS(hwnd, hwndNewFocus, fn) \
452
+ (void)(fn)((hwnd), WM_KILLFOCUS, (WPARAM)(HWND)(hwndNewFocus), 0L)
453
+
454
+ /* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags) */
455
+ #define HANDLE_WM_KEYDOWN(hwnd, wParam, lParam, fn) \
456
+ ((fn)((hwnd), (UINT)(wParam), TRUE, (int)(short)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
457
+ #define FORWARD_WM_KEYDOWN(hwnd, vk, cRepeat, flags, fn) \
458
+ (void)(fn)((hwnd), WM_KEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((cRepeat), (flags)))
459
+
460
+ /* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags) */
461
+ #define HANDLE_WM_KEYUP(hwnd, wParam, lParam, fn) \
462
+ ((fn)((hwnd), (UINT)(wParam), FALSE, (int)(short)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
463
+ #define FORWARD_WM_KEYUP(hwnd, vk, cRepeat, flags, fn) \
464
+ (void)(fn)((hwnd), WM_KEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((cRepeat), (flags)))
465
+
466
+ /* void Cls_OnChar(HWND hwnd, TCHAR ch, int cRepeat) */
467
+ #define HANDLE_WM_CHAR(hwnd, wParam, lParam, fn) \
468
+ ((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
469
+ #define FORWARD_WM_CHAR(hwnd, ch, cRepeat, fn) \
470
+ (void)(fn)((hwnd), WM_CHAR, (WPARAM)(TCHAR)(ch), MAKELPARAM((cRepeat),0))
471
+
472
+ /* void Cls_OnDeadChar(HWND hwnd, TCHAR ch, int cRepeat) */
473
+ #define HANDLE_WM_DEADCHAR(hwnd, wParam, lParam, fn) \
474
+ ((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
475
+ #define FORWARD_WM_DEADCHAR(hwnd, ch, cRepeat, fn) \
476
+ (void)(fn)((hwnd), WM_DEADCHAR, (WPARAM)(TCHAR)(ch), MAKELPARAM((cRepeat),0))
477
+
478
+ /* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags) */
479
+ #define HANDLE_WM_SYSKEYDOWN(hwnd, wParam, lParam, fn) \
480
+ ((fn)((hwnd), (UINT)(wParam), TRUE, (int)(short)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
481
+ #define FORWARD_WM_SYSKEYDOWN(hwnd, vk, cRepeat, flags, fn) \
482
+ (void)(fn)((hwnd), WM_SYSKEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((cRepeat), (flags)))
483
+
484
+ /* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags) */
485
+ #define HANDLE_WM_SYSKEYUP(hwnd, wParam, lParam, fn) \
486
+ ((fn)((hwnd), (UINT)(wParam), FALSE, (int)(short)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
487
+ #define FORWARD_WM_SYSKEYUP(hwnd, vk, cRepeat, flags, fn) \
488
+ (void)(fn)((hwnd), WM_SYSKEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((cRepeat), (flags)))
489
+
490
+ /* void Cls_OnSysChar(HWND hwnd, TCHAR ch, int cRepeat) */
491
+ #define HANDLE_WM_SYSCHAR(hwnd, wParam, lParam, fn) \
492
+ ((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
493
+ #define FORWARD_WM_SYSCHAR(hwnd, ch, cRepeat, fn) \
494
+ (void)(fn)((hwnd), WM_SYSCHAR, (WPARAM)(TCHAR)(ch), MAKELPARAM((cRepeat), 0))
495
+
496
+ /* void Cls_OnSysDeadChar(HWND hwnd, TCHAR ch, int cRepeat) */
497
+ #define HANDLE_WM_SYSDEADCHAR(hwnd, wParam, lParam, fn) \
498
+ ((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
499
+ #define FORWARD_WM_SYSDEADCHAR(hwnd, ch, cRepeat, fn) \
500
+ (void)(fn)((hwnd), WM_SYSDEADCHAR, (WPARAM)(TCHAR)(ch), MAKELPARAM((cRepeat), 0))
501
+
502
+ /* void Cls_OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags) */
503
+ #define HANDLE_WM_MOUSEMOVE(hwnd, wParam, lParam, fn) \
504
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
505
+ #define FORWARD_WM_MOUSEMOVE(hwnd, x, y, keyFlags, fn) \
506
+ (void)(fn)((hwnd), WM_MOUSEMOVE, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y)))
507
+
508
+ /* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) */
509
+ #define HANDLE_WM_LBUTTONDOWN(hwnd, wParam, lParam, fn) \
510
+ ((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
511
+ #define FORWARD_WM_LBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \
512
+ (void)(fn)((hwnd), (fDoubleClick) ? WM_LBUTTONDBLCLK : WM_LBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y)))
513
+
514
+ /* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) */
515
+ #define HANDLE_WM_LBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
516
+ ((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
517
+
518
+ /* void Cls_OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags) */
519
+ #define HANDLE_WM_LBUTTONUP(hwnd, wParam, lParam, fn) \
520
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
521
+ #define FORWARD_WM_LBUTTONUP(hwnd, x, y, keyFlags, fn) \
522
+ (void)(fn)((hwnd), WM_LBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y)))
523
+
524
+ /* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) */
525
+ #define HANDLE_WM_RBUTTONDOWN(hwnd, wParam, lParam, fn) \
526
+ ((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
527
+ #define FORWARD_WM_RBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \
528
+ (void)(fn)((hwnd), (fDoubleClick) ? WM_RBUTTONDBLCLK : WM_RBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y)))
529
+
530
+ /* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) */
531
+ #define HANDLE_WM_RBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
532
+ ((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
533
+
534
+ /* void Cls_OnRButtonUp(HWND hwnd, int x, int y, UINT flags) */
535
+ #define HANDLE_WM_RBUTTONUP(hwnd, wParam, lParam, fn) \
536
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
537
+ #define FORWARD_WM_RBUTTONUP(hwnd, x, y, keyFlags, fn) \
538
+ (void)(fn)((hwnd), WM_RBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y)))
539
+
540
+ /* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) */
541
+ #define HANDLE_WM_MBUTTONDOWN(hwnd, wParam, lParam, fn) \
542
+ ((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
543
+ #define FORWARD_WM_MBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \
544
+ (void)(fn)((hwnd), (fDoubleClick) ? WM_MBUTTONDBLCLK : WM_MBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y)))
545
+
546
+ /* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) */
547
+ #define HANDLE_WM_MBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
548
+ ((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
549
+
550
+ /* void Cls_OnMButtonUp(HWND hwnd, int x, int y, UINT flags) */
551
+ #define HANDLE_WM_MBUTTONUP(hwnd, wParam, lParam, fn) \
552
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
553
+ #define FORWARD_WM_MBUTTONUP(hwnd, x, y, keyFlags, fn) \
554
+ (void)(fn)((hwnd), WM_MBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y)))
555
+
556
+ /* void Cls_OnMouseWheel(HWND hwnd, int xPos, int yPos, int zDelta, UINT fwKeys) */
557
+ #define HANDLE_WM_MOUSEWHEEL(hwnd, wParam, lParam, fn) \
558
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (int)(short)HIWORD(wParam), (UINT)(short)LOWORD(wParam)), 0L)
559
+ #define FORWARD_WM_MOUSEWHEEL(hwnd, xPos, yPos, zDelta, fwKeys, fn) \
560
+ (void)(fn)((hwnd), WM_MOUSEWHEEL, MAKEWPARAM((fwKeys),(zDelta)), MAKELPARAM((xPos),(yPos)))
561
+
562
+ /* void Cls_OnNCMouseMove(HWND hwnd, int x, int y, UINT codeHitTest) */
563
+ #define HANDLE_WM_NCMOUSEMOVE(hwnd, wParam, lParam, fn) \
564
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
565
+ #define FORWARD_WM_NCMOUSEMOVE(hwnd, x, y, codeHitTest, fn) \
566
+ (void)(fn)((hwnd), WM_NCMOUSEMOVE, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)))
567
+
568
+ /* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest) */
569
+ #define HANDLE_WM_NCLBUTTONDOWN(hwnd, wParam, lParam, fn) \
570
+ ((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
571
+ #define FORWARD_WM_NCLBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \
572
+ (void)(fn)((hwnd), (fDoubleClick) ? WM_NCLBUTTONDBLCLK : WM_NCLBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)))
573
+
574
+ /* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest) */
575
+ #define HANDLE_WM_NCLBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
576
+ ((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
577
+
578
+ /* void Cls_OnNCLButtonUp(HWND hwnd, int x, int y, UINT codeHitTest) */
579
+ #define HANDLE_WM_NCLBUTTONUP(hwnd, wParam, lParam, fn) \
580
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
581
+ #define FORWARD_WM_NCLBUTTONUP(hwnd, x, y, codeHitTest, fn) \
582
+ (void)(fn)((hwnd), WM_NCLBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)))
583
+
584
+ /* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest) */
585
+ #define HANDLE_WM_NCRBUTTONDOWN(hwnd, wParam, lParam, fn) \
586
+ ((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
587
+ #define FORWARD_WM_NCRBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \
588
+ (void)(fn)((hwnd), (fDoubleClick) ? WM_NCRBUTTONDBLCLK : WM_NCRBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) )
589
+
590
+ /* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest) */
591
+ #define HANDLE_WM_NCRBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
592
+ ((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
593
+
594
+ /* void Cls_OnNCRButtonUp(HWND hwnd, int x, int y, UINT codeHitTest) */
595
+ #define HANDLE_WM_NCRBUTTONUP(hwnd, wParam, lParam, fn) \
596
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
597
+ #define FORWARD_WM_NCRBUTTONUP(hwnd, x, y, codeHitTest, fn) \
598
+ (void)(fn)((hwnd), WM_NCRBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) )
599
+
600
+ /* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest) */
601
+ #define HANDLE_WM_NCMBUTTONDOWN(hwnd, wParam, lParam, fn) \
602
+ ((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
603
+ #define FORWARD_WM_NCMBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \
604
+ (void)(fn)((hwnd), (fDoubleClick) ? WM_NCMBUTTONDBLCLK : WM_NCMBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) )
605
+
606
+ /* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest) */
607
+ #define HANDLE_WM_NCMBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
608
+ ((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
609
+
610
+ /* void Cls_OnNCMButtonUp(HWND hwnd, int x, int y, UINT codeHitTest) */
611
+ #define HANDLE_WM_NCMBUTTONUP(hwnd, wParam, lParam, fn) \
612
+ ((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
613
+ #define FORWARD_WM_NCMBUTTONUP(hwnd, x, y, codeHitTest, fn) \
614
+ (void)(fn)((hwnd), WM_NCMBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) )
615
+
616
+ /* int Cls_OnMouseActivate(HWND hwnd, HWND hwndTopLevel, UINT codeHitTest, UINT msg) */
617
+ #define HANDLE_WM_MOUSEACTIVATE(hwnd, wParam, lParam, fn) \
618
+ (LRESULT)(DWORD)(int)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam))
619
+ #define FORWARD_WM_MOUSEACTIVATE(hwnd, hwndTopLevel, codeHitTest, msg, fn) \
620
+ (int)(DWORD)(fn)((hwnd), WM_MOUSEACTIVATE, (WPARAM)(HWND)(hwndTopLevel), MAKELPARAM((codeHitTest), (msg)))
621
+
622
+ /* void Cls_OnCancelMode(HWND hwnd) */
623
+ #define HANDLE_WM_CANCELMODE(hwnd, wParam, lParam, fn) \
624
+ ((fn)(hwnd), 0L)
625
+ #define FORWARD_WM_CANCELMODE(hwnd, fn) \
626
+ (void)(fn)((hwnd), WM_CANCELMODE, 0L, 0L)
627
+
628
+ /* void Cls_OnTimer(HWND hwnd, UINT id) */
629
+ #define HANDLE_WM_TIMER(hwnd, wParam, lParam, fn) \
630
+ ((fn)((hwnd), (UINT)(wParam)), 0L)
631
+ #define FORWARD_WM_TIMER(hwnd, id, fn) \
632
+ (void)(fn)((hwnd), WM_TIMER, (WPARAM)(UINT)(id), 0L)
633
+
634
+ /* void Cls_OnInitMenu(HWND hwnd, HMENU hMenu) */
635
+ #define HANDLE_WM_INITMENU(hwnd, wParam, lParam, fn) \
636
+ ((fn)((hwnd), (HMENU)(wParam)), 0L)
637
+ #define FORWARD_WM_INITMENU(hwnd, hMenu, fn) \
638
+ (void)(fn)((hwnd), WM_INITMENU, (WPARAM)(HMENU)(hMenu), 0L)
639
+
640
+ /* void Cls_OnInitMenuPopup(HWND hwnd, HMENU hMenu, UINT item, BOOL fSystemMenu) */
641
+ #define HANDLE_WM_INITMENUPOPUP(hwnd, wParam, lParam, fn) \
642
+ ((fn)((hwnd), (HMENU)(wParam), (UINT)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L)
643
+ #define FORWARD_WM_INITMENUPOPUP(hwnd, hMenu, item, fSystemMenu, fn) \
644
+ (void)(fn)((hwnd), WM_INITMENUPOPUP, (WPARAM)(HMENU)(hMenu), MAKELPARAM((item),(fSystemMenu)))
645
+
646
+ /* void Cls_OnMenuSelect(HWND hwnd, HMENU hmenu, int item, HMENU hmenuPopup, UINT flags) */
647
+ #define HANDLE_WM_MENUSELECT(hwnd, wParam, lParam, fn) \
648
+ ((fn)((hwnd), (HMENU)(lParam), \
649
+ (HIWORD(wParam) & MF_POPUP) ? 0L : (int)(LOWORD(wParam)), \
650
+ (HIWORD(wParam) & MF_POPUP) ? GetSubMenu((HMENU)lParam, LOWORD(wParam)) : 0L, \
651
+ (UINT)(((short)HIWORD(wParam) == -1) ? 0xFFFFFFFF : HIWORD(wParam))), 0L)
652
+ #define FORWARD_WM_MENUSELECT(hwnd, hmenu, item, hmenuPopup, flags, fn) \
653
+ (void)(fn)((hwnd), WM_MENUSELECT, MAKEWPARAM((item), (flags)), (LPARAM)(HMENU)((hmenu) ? (hmenu) : (hmenuPopup)))
654
+
655
+ /* DWORD Cls_OnMenuChar(HWND hwnd, UINT ch, UINT flags, HMENU hmenu) */
656
+ #define HANDLE_WM_MENUCHAR(hwnd, wParam, lParam, fn) \
657
+ (LRESULT)(DWORD)(fn)((hwnd), (UINT)(LOWORD(wParam)), (UINT)HIWORD(wParam), (HMENU)(lParam))
658
+ #define FORWARD_WM_MENUCHAR(hwnd, ch, flags, hmenu, fn) \
659
+ (DWORD)(fn)((hwnd), WM_MENUCHAR, MAKEWPARAM(flags, (WORD)(ch)), (LPARAM)(HMENU)(hmenu))
660
+
661
+ /* void Cls_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) */
662
+ #define HANDLE_WM_COMMAND(hwnd, wParam, lParam, fn) \
663
+ ((fn)((hwnd), (int)(LOWORD(wParam)), (HWND)(lParam), (UINT)HIWORD(wParam)), 0L)
664
+ #define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \
665
+ (void)(fn)((hwnd), WM_COMMAND, MAKEWPARAM((UINT)(id),(UINT)(codeNotify)), (LPARAM)(HWND)(hwndCtl))
666
+
667
+ /* void Cls_OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos) */
668
+ #define HANDLE_WM_HSCROLL(hwnd, wParam, lParam, fn) \
669
+ ((fn)((hwnd), (HWND)(lParam), (UINT)(LOWORD(wParam)), (int)(short)HIWORD(wParam)), 0L)
670
+ #define FORWARD_WM_HSCROLL(hwnd, hwndCtl, code, pos, fn) \
671
+ (void)(fn)((hwnd), WM_HSCROLL, MAKEWPARAM((UINT)(int)(code),(UINT)(int)(pos)), (LPARAM)(HWND)(hwndCtl))
672
+
673
+ /* void Cls_OnVScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos) */
674
+ #define HANDLE_WM_VSCROLL(hwnd, wParam, lParam, fn) \
675
+ ((fn)((hwnd), (HWND)(lParam), (UINT)(LOWORD(wParam)), (int)(short)HIWORD(wParam)), 0L)
676
+ #define FORWARD_WM_VSCROLL(hwnd, hwndCtl, code, pos, fn) \
677
+ (void)(fn)((hwnd), WM_VSCROLL, MAKEWPARAM((UINT)(int)(code), (UINT)(int)(pos)), (LPARAM)(HWND)(hwndCtl))
678
+
679
+ /* void Cls_OnCut(HWND hwnd) */
680
+ #define HANDLE_WM_CUT(hwnd, wParam, lParam, fn) \
681
+ ((fn)(hwnd), 0L)
682
+ #define FORWARD_WM_CUT(hwnd, fn) \
683
+ (void)(fn)((hwnd), WM_CUT, 0L, 0L)
684
+
685
+ /* void Cls_OnCopy(HWND hwnd) */
686
+ #define HANDLE_WM_COPY(hwnd, wParam, lParam, fn) \
687
+ ((fn)(hwnd), 0L)
688
+ #define FORWARD_WM_COPY(hwnd, fn) \
689
+ (void)(fn)((hwnd), WM_COPY, 0L, 0L)
690
+
691
+ /* void Cls_OnPaste(HWND hwnd) */
692
+ #define HANDLE_WM_PASTE(hwnd, wParam, lParam, fn) \
693
+ ((fn)(hwnd), 0L)
694
+ #define FORWARD_WM_PASTE(hwnd, fn) \
695
+ (void)(fn)((hwnd), WM_PASTE, 0L, 0L)
696
+
697
+ /* void Cls_OnClear(HWND hwnd) */
698
+ #define HANDLE_WM_CLEAR(hwnd, wParam, lParam, fn) \
699
+ ((fn)(hwnd), 0L)
700
+ #define FORWARD_WM_CLEAR(hwnd, fn) \
701
+ (void)(fn)((hwnd), WM_CLEAR, 0L, 0L)
702
+
703
+ /* void Cls_OnUndo(HWND hwnd) */
704
+ #define HANDLE_WM_UNDO(hwnd, wParam, lParam, fn) \
705
+ ((fn)(hwnd), 0L)
706
+ #define FORWARD_WM_UNDO(hwnd, fn) \
707
+ (void)(fn)((hwnd), WM_UNDO, 0L, 0L)
708
+
709
+ /* HANDLE Cls_OnRenderFormat(HWND hwnd, UINT fmt) */
710
+ #define HANDLE_WM_RENDERFORMAT(hwnd, wParam, lParam, fn) \
711
+ (LRESULT)(UINT_PTR)(HANDLE)(fn)((hwnd), (UINT)(wParam))
712
+ #define FORWARD_WM_RENDERFORMAT(hwnd, fmt, fn) \
713
+ (HANDLE)(UINT_PTR)(fn)((hwnd), WM_RENDERFORMAT, (WPARAM)(UINT)(fmt), 0L)
714
+
715
+ /* void Cls_OnRenderAllFormats(HWND hwnd) */
716
+ #define HANDLE_WM_RENDERALLFORMATS(hwnd, wParam, lParam, fn) \
717
+ ((fn)(hwnd), 0L)
718
+ #define FORWARD_WM_RENDERALLFORMATS(hwnd, fn) \
719
+ (void)(fn)((hwnd), WM_RENDERALLFORMATS, 0L, 0L)
720
+
721
+ /* void Cls_OnDestroyClipboard(HWND hwnd) */
722
+ #define HANDLE_WM_DESTROYCLIPBOARD(hwnd, wParam, lParam, fn) \
723
+ ((fn)(hwnd), 0L)
724
+ #define FORWARD_WM_DESTROYCLIPBOARD(hwnd, fn) \
725
+ (void)(fn)((hwnd), WM_DESTROYCLIPBOARD, 0L, 0L)
726
+
727
+ /* void Cls_OnDrawClipboard(HWND hwnd) */
728
+ #define HANDLE_WM_DRAWCLIPBOARD(hwnd, wParam, lParam, fn) \
729
+ ((fn)(hwnd), 0L)
730
+ #define FORWARD_WM_DRAWCLIPBOARD(hwnd, fn) \
731
+ (void)(fn)((hwnd), WM_DRAWCLIPBOARD, 0L, 0L)
732
+
733
+ /* void Cls_OnPaintClipboard(HWND hwnd, HWND hwndCBViewer, const LPPAINTSTRUCT lpPaintStruct) */
734
+ #define HANDLE_WM_PAINTCLIPBOARD(hwnd, wParam, lParam, fn) \
735
+ ((fn)((hwnd), (HWND)(wParam), (const LPPAINTSTRUCT)GlobalLock((HGLOBAL)(lParam))), GlobalUnlock((HGLOBAL)(lParam)), 0L)
736
+ #define FORWARD_WM_PAINTCLIPBOARD(hwnd, hwndCBViewer, lpPaintStruct, fn) \
737
+ (void)(fn)((hwnd), WM_PAINTCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(LPPAINTSTRUCT)(lpPaintStruct))
738
+
739
+ /* void Cls_OnSizeClipboard(HWND hwnd, HWND hwndCBViewer, const LPRECT lprc) */
740
+ #define HANDLE_WM_SIZECLIPBOARD(hwnd, wParam, lParam, fn) \
741
+ ((fn)((hwnd), (HWND)(wParam), (const LPRECT)GlobalLock((HGLOBAL)(lParam))), GlobalUnlock((HGLOBAL)(lParam)), 0L)
742
+ #define FORWARD_WM_SIZECLIPBOARD(hwnd, hwndCBViewer, lprc, fn) \
743
+ (void)(fn)((hwnd), WM_SIZECLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(LPRECT)(lprc))
744
+
745
+ /* void Cls_OnVScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos) */
746
+ #define HANDLE_WM_VSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \
747
+ ((fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (int)(short)HIWORD(lParam)), 0L)
748
+ #define FORWARD_WM_VSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \
749
+ (void)(fn)((hwnd), WM_VSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos)))
750
+
751
+ /* void Cls_OnHScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos) */
752
+ #define HANDLE_WM_HSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \
753
+ ((fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (int)(short)HIWORD(lParam)), 0L)
754
+ #define FORWARD_WM_HSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \
755
+ (void)(fn)((hwnd), WM_HSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos)))
756
+
757
+ /* void Cls_OnAskCBFormatName(HWND hwnd, int cchMax, LPTSTR rgchName) */
758
+ #define HANDLE_WM_ASKCBFORMATNAME(hwnd, wParam, lParam, fn) \
759
+ ((fn)((hwnd), (int)(wParam), (LPTSTR)(lParam)), 0L)
760
+ #define FORWARD_WM_ASKCBFORMATNAME(hwnd, cchMax, rgchName, fn) \
761
+ (void)(fn)((hwnd), WM_ASKCBFORMATNAME, (WPARAM)(int)(cchMax), (LPARAM)(rgchName))
762
+
763
+ /* void Cls_OnChangeCBChain(HWND hwnd, HWND hwndRemove, HWND hwndNext) */
764
+ #define HANDLE_WM_CHANGECBCHAIN(hwnd, wParam, lParam, fn) \
765
+ ((fn)((hwnd), (HWND)(wParam), (HWND)(lParam)), 0L)
766
+ #define FORWARD_WM_CHANGECBCHAIN(hwnd, hwndRemove, hwndNext, fn) \
767
+ (void)(fn)((hwnd), WM_CHANGECBCHAIN, (WPARAM)(HWND)(hwndRemove), (LPARAM)(HWND)(hwndNext))
768
+
769
+ /* BOOL Cls_OnSetCursor(HWND hwnd, HWND hwndCursor, UINT codeHitTest, UINT msg) */
770
+ #define HANDLE_WM_SETCURSOR(hwnd, wParam, lParam, fn) \
771
+ (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam))
772
+ #define FORWARD_WM_SETCURSOR(hwnd, hwndCursor, codeHitTest, msg, fn) \
773
+ (BOOL)(DWORD)(fn)((hwnd), WM_SETCURSOR, (WPARAM)(HWND)(hwndCursor), MAKELPARAM((codeHitTest), (msg)))
774
+
775
+ /* void Cls_OnSysCommand(HWND hwnd, UINT cmd, int x, int y) */
776
+ #define HANDLE_WM_SYSCOMMAND(hwnd, wParam, lParam, fn) \
777
+ ((fn)((hwnd), (UINT)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam)), 0L)
778
+ #define FORWARD_WM_SYSCOMMAND(hwnd, cmd, x, y, fn) \
779
+ (void)(fn)((hwnd), WM_SYSCOMMAND, (WPARAM)(UINT)(cmd), MAKELPARAM((x), (y)))
780
+
781
+ /* HWND Cls_MDICreate(HWND hwnd, const LPMDICREATESTRUCT lpmcs) */
782
+ #define HANDLE_WM_MDICREATE(hwnd, wParam, lParam, fn) \
783
+ (LRESULT)(DWORD)(UINT)(fn)((hwnd), (LPMDICREATESTRUCT)(lParam))
784
+ #define FORWARD_WM_MDICREATE(hwnd, lpmcs, fn) \
785
+ (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDICREATE, 0L, (LPARAM)(LPMDICREATESTRUCT)(lpmcs))
786
+
787
+ /* void Cls_MDIDestroy(HWND hwnd, HWND hwndDestroy) */
788
+ #define HANDLE_WM_MDIDESTROY(hwnd, wParam, lParam, fn) \
789
+ ((fn)((hwnd), (HWND)(wParam)), 0L)
790
+ #define FORWARD_WM_MDIDESTROY(hwnd, hwndDestroy, fn) \
791
+ (void)(fn)((hwnd), WM_MDIDESTROY, (WPARAM)(hwndDestroy), 0L)
792
+
793
+ /* NOTE: Usable only by MDI client windows */
794
+ /* void Cls_MDIActivate(HWND hwnd, BOOL fActive, HWND hwndActivate, HWND hwndDeactivate) */
795
+ #define HANDLE_WM_MDIACTIVATE(hwnd, wParam, lParam, fn) \
796
+ ((fn)((hwnd), (BOOL)(lParam == (LPARAM)hwnd), (HWND)(lParam), (HWND)(wParam)), 0L)
797
+ #define FORWARD_WM_MDIACTIVATE(hwnd, fActive, hwndActivate, hwndDeactivate, fn) \
798
+ (void)(fn)(hwnd, WM_MDIACTIVATE, (WPARAM)(hwndDeactivate), (LPARAM)(hwndActivate))
799
+
800
+ /* void Cls_MDIRestore(HWND hwnd, HWND hwndRestore) */
801
+ #define HANDLE_WM_MDIRESTORE(hwnd, wParam, lParam, fn) \
802
+ ((fn)((hwnd), (HWND)(wParam)), 0L)
803
+ #define FORWARD_WM_MDIRESTORE(hwnd, hwndRestore, fn) \
804
+ (void)(fn)((hwnd), WM_MDIRESTORE, (WPARAM)(hwndRestore), 0L)
805
+
806
+ /* HWND Cls_MDINext(HWND hwnd, HWND hwndCur, BOOL fPrev) */
807
+ #define HANDLE_WM_MDINEXT(hwnd, wParam, lParam, fn) \
808
+ (LRESULT)(HWND)(fn)((hwnd), (HWND)(wParam), (BOOL)lParam)
809
+ #define FORWARD_WM_MDINEXT(hwnd, hwndCur, fPrev, fn) \
810
+ (HWND)(UINT_PTR)(fn)((hwnd), WM_MDINEXT, (WPARAM)(hwndCur), (LPARAM)(fPrev))
811
+
812
+ /* void Cls_MDIMaximize(HWND hwnd, HWND hwndMaximize) */
813
+ #define HANDLE_WM_MDIMAXIMIZE(hwnd, wParam, lParam, fn) \
814
+ ((fn)((hwnd), (HWND)(wParam)), 0L)
815
+ #define FORWARD_WM_MDIMAXIMIZE(hwnd, hwndMaximize, fn) \
816
+ (void)(fn)((hwnd), WM_MDIMAXIMIZE, (WPARAM)(hwndMaximize), 0L)
817
+
818
+ /* BOOL Cls_MDITile(HWND hwnd, UINT cmd) */
819
+ #define HANDLE_WM_MDITILE(hwnd, wParam, lParam, fn) \
820
+ (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam))
821
+ #define FORWARD_WM_MDITILE(hwnd, cmd, fn) \
822
+ (BOOL)(DWORD)(fn)((hwnd), WM_MDITILE, (WPARAM)(cmd), 0L)
823
+
824
+ /* BOOL Cls_MDICascade(HWND hwnd, UINT cmd) */
825
+ #define HANDLE_WM_MDICASCADE(hwnd, wParam, lParam, fn) \
826
+ (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam))
827
+ #define FORWARD_WM_MDICASCADE(hwnd, cmd, fn) \
828
+ (BOOL)(DWORD)(fn)((hwnd), WM_MDICASCADE, (WPARAM)(cmd), 0L)
829
+
830
+ /* void Cls_MDIIconArrange(HWND hwnd) */
831
+ #define HANDLE_WM_MDIICONARRANGE(hwnd, wParam, lParam, fn) \
832
+ ((fn)(hwnd), 0L)
833
+ #define FORWARD_WM_MDIICONARRANGE(hwnd, fn) \
834
+ (void)(fn)((hwnd), WM_MDIICONARRANGE, 0L, 0L)
835
+
836
+ /* HWND Cls_MDIGetActive(HWND hwnd) */
837
+ #define HANDLE_WM_MDIGETACTIVE(hwnd, wParam, lParam, fn) \
838
+ (LRESULT)(UINT_PTR)(fn)(hwnd)
839
+ #define FORWARD_WM_MDIGETACTIVE(hwnd, fn) \
840
+ (HWND)(UINT_PTR)(fn)((hwnd), WM_MDIGETACTIVE, 0L, 0L)
841
+
842
+ /* HMENU Cls_MDISetMenu(HWND hwnd, BOOL fRefresh, HMENU hmenuFrame, HMENU hmenuWindow) */
843
+ #define HANDLE_WM_MDISETMENU(hwnd, wParam, lParam, fn) \
844
+ (LRESULT)(UINT_PTR)(fn)((hwnd), (BOOL)(wParam), (HMENU)(wParam), (HMENU)(lParam))
845
+ #define FORWARD_WM_MDISETMENU(hwnd, fRefresh, hmenuFrame, hmenuWindow, fn) \
846
+ (HMENU)(UINT_PTR)(fn)((hwnd), WM_MDISETMENU, (WPARAM)((fRefresh) ? (hmenuFrame) : 0), (LPARAM)(hmenuWindow))
847
+
848
+ /* void Cls_OnChildActivate(HWND hwnd) */
849
+ #define HANDLE_WM_CHILDACTIVATE(hwnd, wParam, lParam, fn) \
850
+ ((fn)(hwnd), 0L)
851
+ #define FORWARD_WM_CHILDACTIVATE(hwnd, fn) \
852
+ (void)(fn)((hwnd), WM_CHILDACTIVATE, 0L, 0L)
853
+
854
+ /* BOOL Cls_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam) */
855
+ #define HANDLE_WM_INITDIALOG(hwnd, wParam, lParam, fn) \
856
+ (LRESULT)(DWORD)(UINT)(BOOL)(fn)((hwnd), (HWND)(wParam), lParam)
857
+ #define FORWARD_WM_INITDIALOG(hwnd, hwndFocus, lParam, fn) \
858
+ (BOOL)(DWORD)(fn)((hwnd), WM_INITDIALOG, (WPARAM)(HWND)(hwndFocus), (lParam))
859
+
860
+ /* HWND Cls_OnNextDlgCtl(HWND hwnd, HWND hwndSetFocus, BOOL fNext) */
861
+ #define HANDLE_WM_NEXTDLGCTL(hwnd, wParam, lParam, fn) \
862
+ (LRESULT)(UINT_PTR)(HWND)(fn)((hwnd), (HWND)(wParam), (BOOL)(lParam))
863
+ #define FORWARD_WM_NEXTDLGCTL(hwnd, hwndSetFocus, fNext, fn) \
864
+ (HWND)(UINT_PTR)(fn)((hwnd), WM_NEXTDLGCTL, (WPARAM)(HWND)(hwndSetFocus), (LPARAM)(fNext))
865
+
866
+ /* void Cls_OnParentNotify(HWND hwnd, UINT msg, HWND hwndChild, int idChild) */
867
+ #define HANDLE_WM_PARENTNOTIFY(hwnd, wParam, lParam, fn) \
868
+ ((fn)((hwnd), (UINT)LOWORD(wParam), (HWND)(lParam), (UINT)HIWORD(wParam)), 0L)
869
+ #define FORWARD_WM_PARENTNOTIFY(hwnd, msg, hwndChild, idChild, fn) \
870
+ (void)(fn)((hwnd), WM_PARENTNOTIFY, MAKEWPARAM(msg, idChild), (LPARAM)(hwndChild))
871
+
872
+ /* void Cls_OnEnterIdle(HWND hwnd, UINT source, HWND hwndSource) */
873
+ #define HANDLE_WM_ENTERIDLE(hwnd, wParam, lParam, fn) \
874
+ ((fn)((hwnd), (UINT)(wParam), (HWND)(lParam)), 0L)
875
+ #define FORWARD_WM_ENTERIDLE(hwnd, source, hwndSource, fn) \
876
+ (void)(fn)((hwnd), WM_ENTERIDLE, (WPARAM)(UINT)(source), (LPARAM)(HWND)(hwndSource))
877
+
878
+ /* UINT Cls_OnGetDlgCode(HWND hwnd, LPMSG lpmsg) */
879
+ #define HANDLE_WM_GETDLGCODE(hwnd, wParam, lParam, fn) \
880
+ (LRESULT)(DWORD)(UINT)(fn)(hwnd, (LPMSG)(lParam))
881
+ #define FORWARD_WM_GETDLGCODE(hwnd, lpmsg, fn) \
882
+ (UINT)(DWORD)(fn)((hwnd), WM_GETDLGCODE, (lpmsg ? lpmsg->wParam : 0), (LPARAM)(LPMSG)(lpmsg))
883
+
884
+ /* HBRUSH Cls_OnCtlColor(HWND hwnd, HDC hdc, HWND hwndChild, int type) */
885
+ #define HANDLE_WM_CTLCOLORMSGBOX(hwnd, wParam, lParam, fn) \
886
+ (LRESULT)(UINT_PTR)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_MSGBOX)
887
+ #define FORWARD_WM_CTLCOLORMSGBOX(hwnd, hdc, hwndChild, fn) \
888
+ (HBRUSH)(UINT_PTR)(fn)((hwnd), WM_CTLCOLORMSGBOX, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild))
889
+
890
+ #define HANDLE_WM_CTLCOLOREDIT(hwnd, wParam, lParam, fn) \
891
+ (LRESULT)(UINT_PTR)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_EDIT)
892
+ #define FORWARD_WM_CTLCOLOREDIT(hwnd, hdc, hwndChild, fn) \
893
+ (HBRUSH)(UINT_PTR)(fn)((hwnd), WM_CTLCOLOREDIT, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild))
894
+
895
+ #define HANDLE_WM_CTLCOLORLISTBOX(hwnd, wParam, lParam, fn) \
896
+ (LRESULT)(UINT_PTR)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_LISTBOX)
897
+ #define FORWARD_WM_CTLCOLORLISTBOX(hwnd, hdc, hwndChild, fn) \
898
+ (HBRUSH)(UINT_PTR)(fn)((hwnd), WM_CTLCOLORLISTBOX, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild))
899
+
900
+ #define HANDLE_WM_CTLCOLORBTN(hwnd, wParam, lParam, fn) \
901
+ (LRESULT)(UINT_PTR)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_BTN)
902
+ #define FORWARD_WM_CTLCOLORBTN(hwnd, hdc, hwndChild, fn) \
903
+ (HBRUSH)(UINT_PTR)(fn)((hwnd), WM_CTLCOLORBTN, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild))
904
+
905
+ #define HANDLE_WM_CTLCOLORDLG(hwnd, wParam, lParam, fn) \
906
+ (LRESULT)(UINT_PTR)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_DLG)
907
+ #define FORWARD_WM_CTLCOLORDLG(hwnd, hdc, hwndChild, fn) \
908
+ (HBRUSH)(UINT_PTR)(fn)((hwnd), WM_CTLCOLORDLG, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild))
909
+
910
+ #define HANDLE_WM_CTLCOLORSCROLLBAR(hwnd, wParam, lParam, fn) \
911
+ (LRESULT)(UINT_PTR)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_SCROLLBAR)
912
+ #define FORWARD_WM_CTLCOLORSCROLLBAR(hwnd, hdc, hwndChild, fn) \
913
+ (HBRUSH)(UINT_PTR)(fn)((hwnd), WM_CTLCOLORSCROLLBAR, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild))
914
+
915
+ #define HANDLE_WM_CTLCOLORSTATIC(hwnd, wParam, lParam, fn) \
916
+ (LRESULT)(UINT_PTR)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_STATIC)
917
+ #define FORWARD_WM_CTLCOLORSTATIC(hwnd, hdc, hwndChild, fn) \
918
+ (HBRUSH)(UINT_PTR)(fn)((hwnd), WM_CTLCOLORSTATIC, (WPARAM)(HDC)(hdc), (LPARAM)(HWND)(hwndChild))
919
+
920
+ /* void Cls_OnSetFont(HWND hwndCtl, HFONT hfont, BOOL fRedraw) */
921
+ #define HANDLE_WM_SETFONT(hwnd, wParam, lParam, fn) \
922
+ ((fn)((hwnd), (HFONT)(wParam), (BOOL)(lParam)), 0L)
923
+ #define FORWARD_WM_SETFONT(hwnd, hfont, fRedraw, fn) \
924
+ (void)(fn)((hwnd), WM_SETFONT, (WPARAM)(HFONT)(hfont), (LPARAM)(BOOL)(fRedraw))
925
+
926
+ /* HFONT Cls_OnGetFont(HWND hwnd) */
927
+ #define HANDLE_WM_GETFONT(hwnd, wParam, lParam, fn) \
928
+ (LRESULT)(UINT_PTR)(HFONT)(fn)(hwnd)
929
+ #define FORWARD_WM_GETFONT(hwnd, fn) \
930
+ (HFONT)(UINT_PTR)(fn)((hwnd), WM_GETFONT, 0L, 0L)
931
+
932
+ /* void Cls_OnDrawItem(HWND hwnd, const DRAWITEMSTRUCT * lpDrawItem) */
933
+ #define HANDLE_WM_DRAWITEM(hwnd, wParam, lParam, fn) \
934
+ ((fn)((hwnd), (const DRAWITEMSTRUCT *)(lParam)), 0L)
935
+ #define FORWARD_WM_DRAWITEM(hwnd, lpDrawItem, fn) \
936
+ (void)(fn)((hwnd), WM_DRAWITEM, (WPARAM)(((const DRAWITEMSTRUCT *)lpDrawItem)->CtlID), (LPARAM)(const DRAWITEMSTRUCT *)(lpDrawItem))
937
+
938
+ /* void Cls_OnMeasureItem(HWND hwnd, MEASUREITEMSTRUCT * lpMeasureItem) */
939
+ #define HANDLE_WM_MEASUREITEM(hwnd, wParam, lParam, fn) \
940
+ ((fn)((hwnd), (MEASUREITEMSTRUCT *)(lParam)), 0L)
941
+ #define FORWARD_WM_MEASUREITEM(hwnd, lpMeasureItem, fn) \
942
+ (void)(fn)((hwnd), WM_MEASUREITEM, (WPARAM)(((MEASUREITEMSTRUCT *)lpMeasureItem)->CtlID), (LPARAM)(MEASUREITEMSTRUCT *)(lpMeasureItem))
943
+
944
+ /* void Cls_OnDeleteItem(HWND hwnd, const DELETEITEMSTRUCT * lpDeleteItem) */
945
+ #define HANDLE_WM_DELETEITEM(hwnd, wParam, lParam, fn) \
946
+ ((fn)((hwnd), (const DELETEITEMSTRUCT *)(lParam)), 0L)
947
+ #define FORWARD_WM_DELETEITEM(hwnd, lpDeleteItem, fn) \
948
+ (void)(fn)((hwnd), WM_DELETEITEM, (WPARAM)(((const DELETEITEMSTRUCT *)(lpDeleteItem))->CtlID), (LPARAM)(const DELETEITEMSTRUCT *)(lpDeleteItem))
949
+
950
+ /* int Cls_OnCompareItem(HWND hwnd, const COMPAREITEMSTRUCT * lpCompareItem) */
951
+ #define HANDLE_WM_COMPAREITEM(hwnd, wParam, lParam, fn) \
952
+ (LRESULT)(DWORD)(int)(fn)((hwnd), (const COMPAREITEMSTRUCT *)(lParam))
953
+ #define FORWARD_WM_COMPAREITEM(hwnd, lpCompareItem, fn) \
954
+ (int)(DWORD)(fn)((hwnd), WM_COMPAREITEM, (WPARAM)(((const COMPAREITEMSTRUCT *)(lpCompareItem))->CtlID), (LPARAM)(const COMPAREITEMSTRUCT *)(lpCompareItem))
955
+
956
+ /* int Cls_OnVkeyToItem(HWND hwnd, UINT vk, HWND hwndListbox, int iCaret) */
957
+ #define HANDLE_WM_VKEYTOITEM(hwnd, wParam, lParam, fn) \
958
+ (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)LOWORD(wParam), (HWND)(lParam), (int)(short)HIWORD(wParam))
959
+ #define FORWARD_WM_VKEYTOITEM(hwnd, vk, hwndListBox, iCaret, fn) \
960
+ (int)(DWORD)(fn)((hwnd), WM_VKEYTOITEM, MAKEWPARAM((vk), (iCaret)), (LPARAM)(hwndListBox))
961
+
962
+ /* int Cls_OnCharToItem(HWND hwnd, UINT ch, HWND hwndListbox, int iCaret) */
963
+ #define HANDLE_WM_CHARTOITEM(hwnd, wParam, lParam, fn) \
964
+ (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)LOWORD(wParam), (HWND)(lParam), (int)(short)HIWORD(wParam))
965
+ #define FORWARD_WM_CHARTOITEM(hwnd, ch, hwndListBox, iCaret, fn) \
966
+ (int)(DWORD)(fn)((hwnd), WM_CHARTOITEM, MAKEWPARAM((UINT)(ch), (UINT)(iCaret)), (LPARAM)(hwndListBox))
967
+
968
+ /* void Cls_OnQueueSync(HWND hwnd) */
969
+ #define HANDLE_WM_QUEUESYNC(hwnd, wParam, lParam, fn) \
970
+ ((fn)(hwnd), 0L)
971
+ #define FORWARD_WM_QUEUESYNC(hwnd, fn) \
972
+ (void)(fn)((hwnd), WM_QUEUESYNC, 0L, 0L)
973
+ #if (WINVER >= 0x030a)
974
+ /* void Cls_OnCommNotify(HWND hwnd, int cid, UINT flags) */
975
+ #define HANDLE_WM_COMMNOTIFY(hwnd, wParam, lParam, fn) \
976
+ ((fn)((hwnd), (int)(wParam), (UINT)LOWORD(lParam)), 0L)
977
+ #define FORWARD_WM_COMMNOTIFY(hwnd, cid, flags, fn) \
978
+ (void)(fn)((hwnd), WM_COMMNOTIFY, (WPARAM)(cid), MAKELPARAM((flags), 0))
979
+ #endif
980
+
981
+ /* void Cls_OnDisplayChange(HWND hwnd, UINT bitsPerPixel, UINT cxScreen, UINT cyScreen) */
982
+ #define HANDLE_WM_DISPLAYCHANGE(hwnd, wParam, lParam, fn) \
983
+ ((fn)((hwnd), (UINT)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
984
+ #define FORWARD_WM_DISPLAYCHANGE(hwnd, bitsPerPixel, cxScreen, cyScreen, fn) \
985
+ (void)(fn)((hwnd), WM_DISPLAYCHANGE, (WPARAM)(UINT)(bitsPerPixel), (LPARAM)MAKELPARAM((UINT)(cxScreen), (UINT)(cyScreen)))
986
+
987
+ /* BOOL Cls_OnDeviceChange(HWND hwnd, UINT uEvent, DWORD dwEventData) */
988
+ #define HANDLE_WM_DEVICECHANGE(hwnd, wParam, lParam, fn) \
989
+ (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (UINT)(wParam), (DWORD)(lParam))
990
+ #define FORWARD_WM_DEVICECHANGE(hwnd, uEvent, dwEventData, fn) \
991
+ (BOOL)(DWORD)(fn)((hwnd), WM_DEVICECHANGE, (WPARAM)(UINT)(uEvent), (LPARAM)(DWORD)(dwEventData))
992
+
993
+ /* void Cls_OnContextMenu(HWND hwnd, HWND hwndContext, UINT xPos, UINT yPos) */
994
+ #define HANDLE_WM_CONTEXTMENU(hwnd, wParam, lParam, fn) \
995
+ ((fn)((hwnd), (HWND)(wParam), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam)), 0L)
996
+ #define FORWARD_WM_CONTEXTMENU(hwnd, hwndContext, xPos, yPos, fn) \
997
+ (void)(fn)((hwnd), WM_CONTEXTMENU, (WPARAM)(HWND)(hwndContext), MAKELPARAM((UINT)(xPos), (UINT)(yPos)))
998
+
999
+ #define HANDLE_WM_COPYDATA(hwnd, wParam, lParam, fn) \
1000
+ ((fn)((hwnd), (HWND)(wParam), (PCOPYDATASTRUCT)lParam), 0L)
1001
+ #define FORWARD_WM_COPYDATA(hwnd, hwndFrom, pcds, fn) \
1002
+ (BOOL)(UINT)(DWORD)(fn)((hwnd), WM_COPYDATA, (WPARAM)(hwndFrom), (LPARAM)(pcds))
1003
+
1004
+ /* void Cls_OnHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT vk) */
1005
+ #define HANDLE_WM_HOTKEY(hwnd, wParam, lParam, fn) \
1006
+ ((fn)((hwnd), (int)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
1007
+ #define FORWARD_WM_HOTKEY(hwnd, idHotKey, fuModifiers, vk, fn) \
1008
+ (void)(fn)((hwnd), WM_HOTKEY, (WPARAM)(idHotKey), MAKELPARAM((fuModifiers), (vk)))
1009
+
1010
+ /****** Static control message APIs ******************************************/
1011
+
1012
+ #define Static_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable))
1013
+
1014
+ #define Static_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax))
1015
+ #define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
1016
+ #define Static_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz))
1017
+
1018
+ #define Static_SetIcon(hwndCtl, hIcon) ((HICON)(UINT_PTR)SNDMSG((hwndCtl), STM_SETICON, (WPARAM)(HICON)(hIcon), 0L))
1019
+ #define Static_GetIcon(hwndCtl, hIcon) ((HICON)(UINT_PTR)SNDMSG((hwndCtl), STM_GETICON, 0L, 0L))
1020
+
1021
+ /****** Button control message APIs ******************************************/
1022
+
1023
+ #define Button_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable))
1024
+
1025
+ #define Button_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax))
1026
+ #define Button_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
1027
+ #define Button_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz))
1028
+
1029
+ #define Button_GetCheck(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), BM_GETCHECK, 0L, 0L))
1030
+ #define Button_SetCheck(hwndCtl, check) ((void)SNDMSG((hwndCtl), BM_SETCHECK, (WPARAM)(int)(check), 0L))
1031
+
1032
+ #define Button_GetState(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), BM_GETSTATE, 0L, 0L))
1033
+ #define Button_SetState(hwndCtl, state) ((UINT)(DWORD)SNDMSG((hwndCtl), BM_SETSTATE, (WPARAM)(int)(state), 0L))
1034
+
1035
+ #define Button_SetStyle(hwndCtl, style, fRedraw) ((void)SNDMSG((hwndCtl), BM_SETSTYLE, (WPARAM)LOWORD(style), MAKELPARAM(((fRedraw) ? TRUE : FALSE), 0)))
1036
+
1037
+ /****** Edit control message APIs ********************************************/
1038
+
1039
+ #define Edit_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable))
1040
+
1041
+ #define Edit_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax))
1042
+ #define Edit_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
1043
+ #define Edit_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz))
1044
+
1045
+ #define Edit_LimitText(hwndCtl, cchMax) ((void)SNDMSG((hwndCtl), EM_LIMITTEXT, (WPARAM)(cchMax), 0L))
1046
+
1047
+ #define Edit_GetLineCount(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), EM_GETLINECOUNT, 0L, 0L))
1048
+ #ifndef _MAC
1049
+ #define Edit_GetLine(hwndCtl, line, lpch, cchMax) ((*((int *)(lpch)) = (cchMax)), ((int)(DWORD)SNDMSG((hwndCtl), EM_GETLINE, (WPARAM)(int)(line), (LPARAM)(LPTSTR)(lpch))))
1050
+ #else
1051
+ #define Edit_GetLine(hwndCtl, line, lpch, cchMax) ((*((WORD *)(lpch)) = (cchMax)), ((int)(DWORD)SNDMSG((hwndCtl), EM_GETLINE, (WPARAM)(int)(line), (LPARAM)(LPTSTR)(lpch))))
1052
+ #endif
1053
+
1054
+ #define Edit_GetRect(hwndCtl, lprc) ((void)SNDMSG((hwndCtl), EM_GETRECT, 0L, (LPARAM)(RECT *)(lprc)))
1055
+ #define Edit_SetRect(hwndCtl, lprc) ((void)SNDMSG((hwndCtl), EM_SETRECT, 0L, (LPARAM)(const RECT *)(lprc)))
1056
+ #define Edit_SetRectNoPaint(hwndCtl, lprc) ((void)SNDMSG((hwndCtl), EM_SETRECTNP, 0L, (LPARAM)(const RECT *)(lprc)))
1057
+
1058
+ #define Edit_GetSel(hwndCtl) ((DWORD)SNDMSG((hwndCtl), EM_GETSEL, 0L, 0L))
1059
+ #define Edit_SetSel(hwndCtl, ichStart, ichEnd) ((void)SNDMSG((hwndCtl), EM_SETSEL, (ichStart), (ichEnd)))
1060
+ #define Edit_ReplaceSel(hwndCtl, lpszReplace) ((void)SNDMSG((hwndCtl), EM_REPLACESEL, 0L, (LPARAM)(LPCTSTR)(lpszReplace)))
1061
+
1062
+ #define Edit_GetModify(hwndCtl) ((BOOL)(DWORD)SNDMSG((hwndCtl), EM_GETMODIFY, 0L, 0L))
1063
+ #define Edit_SetModify(hwndCtl, fModified) ((void)SNDMSG((hwndCtl), EM_SETMODIFY, (WPARAM)(UINT)(fModified), 0L))
1064
+
1065
+ #define Edit_ScrollCaret(hwndCtl) ((BOOL)(DWORD)SNDMSG((hwndCtl), EM_SCROLLCARET, 0, 0L))
1066
+
1067
+ #define Edit_LineFromChar(hwndCtl, ich) ((int)(DWORD)SNDMSG((hwndCtl), EM_LINEFROMCHAR, (WPARAM)(int)(ich), 0L))
1068
+ #define Edit_LineIndex(hwndCtl, line) ((int)(DWORD)SNDMSG((hwndCtl), EM_LINEINDEX, (WPARAM)(int)(line), 0L))
1069
+ #define Edit_LineLength(hwndCtl, line) ((int)(DWORD)SNDMSG((hwndCtl), EM_LINELENGTH, (WPARAM)(int)(line), 0L))
1070
+
1071
+ #define Edit_Scroll(hwndCtl, dv, dh) ((void)SNDMSG((hwndCtl), EM_LINESCROLL, (WPARAM)(dh), (LPARAM)(dv)))
1072
+
1073
+ #define Edit_CanUndo(hwndCtl) ((BOOL)(DWORD)SNDMSG((hwndCtl), EM_CANUNDO, 0L, 0L))
1074
+ #define Edit_Undo(hwndCtl) ((BOOL)(DWORD)SNDMSG((hwndCtl), EM_UNDO, 0L, 0L))
1075
+ #define Edit_EmptyUndoBuffer(hwndCtl) ((void)SNDMSG((hwndCtl), EM_EMPTYUNDOBUFFER, 0L, 0L))
1076
+
1077
+ #define Edit_SetPasswordChar(hwndCtl, ch) ((void)SNDMSG((hwndCtl), EM_SETPASSWORDCHAR, (WPARAM)(UINT)(ch), 0L))
1078
+
1079
+ #define Edit_SetTabStops(hwndCtl, cTabs, lpTabs) ((void)SNDMSG((hwndCtl), EM_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(const int *)(lpTabs)))
1080
+
1081
+ #define Edit_FmtLines(hwndCtl, fAddEOL) ((BOOL)(DWORD)SNDMSG((hwndCtl), EM_FMTLINES, (WPARAM)(BOOL)(fAddEOL), 0L))
1082
+
1083
+ #define Edit_GetHandle(hwndCtl) ((HLOCAL)(UINT_PTR)SNDMSG((hwndCtl), EM_GETHANDLE, 0L, 0L))
1084
+ #define Edit_SetHandle(hwndCtl, h) ((void)SNDMSG((hwndCtl), EM_SETHANDLE, (WPARAM)(UINT_PTR)(HLOCAL)(h), 0L))
1085
+
1086
+ #if (WINVER >= 0x030a)
1087
+ #define Edit_GetFirstVisibleLine(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), EM_GETFIRSTVISIBLELINE, 0L, 0L))
1088
+
1089
+ #define Edit_SetReadOnly(hwndCtl, fReadOnly) ((BOOL)(DWORD)SNDMSG((hwndCtl), EM_SETREADONLY, (WPARAM)(BOOL)(fReadOnly), 0L))
1090
+
1091
+ #define Edit_GetPasswordChar(hwndCtl) ((TCHAR)(DWORD)SNDMSG((hwndCtl), EM_GETPASSWORDCHAR, 0L, 0L))
1092
+
1093
+ #define Edit_SetWordBreakProc(hwndCtl, lpfnWordBreak) ((void)SNDMSG((hwndCtl), EM_SETWORDBREAKPROC, 0L, (LPARAM)(EDITWORDBREAKPROC)(lpfnWordBreak)))
1094
+ #define Edit_GetWordBreakProc(hwndCtl) ((EDITWORDBREAKPROC)SNDMSG((hwndCtl), EM_GETWORDBREAKPROC, 0L, 0L))
1095
+ #endif /* WINVER >= 0x030a */
1096
+
1097
+ /****** ScrollBar control message APIs ***************************************/
1098
+
1099
+ /* NOTE: flags parameter is a collection of ESB_* values, NOT a boolean! */
1100
+ #define ScrollBar_Enable(hwndCtl, flags) EnableScrollBar((hwndCtl), SB_CTL, (flags))
1101
+
1102
+ #define ScrollBar_Show(hwndCtl, fShow) ShowWindow((hwndCtl), (fShow) ? SW_SHOWNORMAL : SW_HIDE)
1103
+
1104
+ #define ScrollBar_SetPos(hwndCtl, pos, fRedraw) SetScrollPos((hwndCtl), SB_CTL, (pos), (fRedraw))
1105
+ #define ScrollBar_GetPos(hwndCtl) GetScrollPos((hwndCtl), SB_CTL)
1106
+
1107
+ #define ScrollBar_SetRange(hwndCtl, posMin, posMax, fRedraw) SetScrollRange((hwndCtl), SB_CTL, (posMin), (posMax), (fRedraw))
1108
+ #define ScrollBar_GetRange(hwndCtl, lpposMin, lpposMax) GetScrollRange((hwndCtl), SB_CTL, (lpposMin), (lpposMax))
1109
+
1110
+ /****** ListBox control message APIs *****************************************/
1111
+
1112
+ #define ListBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable))
1113
+
1114
+ #define ListBox_GetCount(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETCOUNT, 0L, 0L))
1115
+ #define ListBox_ResetContent(hwndCtl) ((BOOL)(DWORD)SNDMSG((hwndCtl), LB_RESETCONTENT, 0L, 0L))
1116
+
1117
+ #define ListBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SNDMSG((hwndCtl), LB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)(lpsz)))
1118
+ #define ListBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SNDMSG((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpsz)))
1119
+
1120
+ #define ListBox_AddItemData(hwndCtl, data) ((int)(DWORD)SNDMSG((hwndCtl), LB_ADDSTRING, 0L, (LPARAM)(data)))
1121
+ #define ListBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SNDMSG((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data)))
1122
+
1123
+ #define ListBox_DeleteString(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), LB_DELETESTRING, (WPARAM)(int)(index), 0L))
1124
+
1125
+ #define ListBox_GetTextLen(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETTEXTLEN, (WPARAM)(int)(index), 0L))
1126
+ #define ListBox_GetText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpszBuffer)))
1127
+
1128
+ #define ListBox_GetItemData(hwndCtl, index) ((LRESULT)(ULONG_PTR)SNDMSG((hwndCtl), LB_GETITEMDATA, (WPARAM)(int)(index), 0L))
1129
+ #define ListBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SNDMSG((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data)))
1130
+
1131
+ #if (WINVER >= 0x030a)
1132
+ #define ListBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SNDMSG((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
1133
+ #define ListBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SNDMSG((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data)))
1134
+
1135
+ #define ListBox_SetSel(hwndCtl, fSelect, index) ((int)(DWORD)SNDMSG((hwndCtl), LB_SETSEL, (WPARAM)(BOOL)(fSelect), (LPARAM)(index)))
1136
+ #define ListBox_SelItemRange(hwndCtl, fSelect, first, last) ((int)(DWORD)SNDMSG((hwndCtl), LB_SELITEMRANGE, (WPARAM)(BOOL)(fSelect), MAKELPARAM((first), (last))))
1137
+
1138
+ #define ListBox_GetCurSel(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETCURSEL, 0L, 0L))
1139
+ #define ListBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), LB_SETCURSEL, (WPARAM)(int)(index), 0L))
1140
+
1141
+ #define ListBox_SelectString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SNDMSG((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
1142
+ #define ListBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SNDMSG((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data)))
1143
+
1144
+ #define ListBox_GetSel(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETSEL, (WPARAM)(int)(index), 0L))
1145
+ #define ListBox_GetSelCount(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETSELCOUNT, 0L, 0L))
1146
+ #define ListBox_GetTopIndex(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETTOPINDEX, 0L, 0L))
1147
+ #define ListBox_GetSelItems(hwndCtl, cItems, lpItems) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int *)(lpItems)))
1148
+
1149
+ #define ListBox_SetTopIndex(hwndCtl, indexTop) ((int)(DWORD)SNDMSG((hwndCtl), LB_SETTOPINDEX, (WPARAM)(int)(indexTop), 0L))
1150
+
1151
+ #define ListBox_SetColumnWidth(hwndCtl, cxColumn) ((void)SNDMSG((hwndCtl), LB_SETCOLUMNWIDTH, (WPARAM)(int)(cxColumn), 0L))
1152
+ #define ListBox_GetHorizontalExtent(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETHORIZONTALEXTENT, 0L, 0L))
1153
+ #define ListBox_SetHorizontalExtent(hwndCtl, cxExtent) ((void)SNDMSG((hwndCtl), LB_SETHORIZONTALEXTENT, (WPARAM)(int)(cxExtent), 0L))
1154
+
1155
+ #define ListBox_SetTabStops(hwndCtl, cTabs, lpTabs) ((BOOL)(DWORD)SNDMSG((hwndCtl), LB_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(int *)(lpTabs)))
1156
+
1157
+ #define ListBox_GetItemRect(hwndCtl, index, lprc) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETITEMRECT, (WPARAM)(int)(index), (LPARAM)(RECT *)(lprc)))
1158
+
1159
+ #define ListBox_SetCaretIndex(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), LB_SETCARETINDEX, (WPARAM)(int)(index), 0L))
1160
+ #define ListBox_GetCaretIndex(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETCARETINDEX, 0L, 0L))
1161
+
1162
+ #define ListBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SNDMSG((hwndCtl), LB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
1163
+
1164
+ #define ListBox_SetItemHeight(hwndCtl, index, cy) ((int)(DWORD)SNDMSG((hwndCtl), LB_SETITEMHEIGHT, (WPARAM)(int)(index), MAKELPARAM((cy), 0)))
1165
+ #define ListBox_GetItemHeight(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), LB_GETITEMHEIGHT, (WPARAM)(int)(index), 0L))
1166
+ #endif /* WINVER >= 0x030a */
1167
+
1168
+ #define ListBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SNDMSG((hwndCtl), LB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCTSTR)(lpszFileSpec)))
1169
+
1170
+ /****** ComboBox control message APIs ****************************************/
1171
+
1172
+ #define ComboBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable))
1173
+
1174
+ #define ComboBox_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax))
1175
+ #define ComboBox_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl)
1176
+ #define ComboBox_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz))
1177
+
1178
+ #define ComboBox_LimitText(hwndCtl, cchLimit) ((int)(DWORD)SNDMSG((hwndCtl), CB_LIMITTEXT, (WPARAM)(int)(cchLimit), 0L))
1179
+
1180
+ #define ComboBox_GetEditSel(hwndCtl) ((DWORD)SNDMSG((hwndCtl), CB_GETEDITSEL, 0L, 0L))
1181
+ #define ComboBox_SetEditSel(hwndCtl, ichStart, ichEnd) ((int)(DWORD)SNDMSG((hwndCtl), CB_SETEDITSEL, 0L, MAKELPARAM((ichStart), (ichEnd))))
1182
+
1183
+ #define ComboBox_GetCount(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), CB_GETCOUNT, 0L, 0L))
1184
+ #define ComboBox_ResetContent(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), CB_RESETCONTENT, 0L, 0L))
1185
+
1186
+ #define ComboBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SNDMSG((hwndCtl), CB_ADDSTRING, 0L, (LPARAM)(LPCTSTR)(lpsz)))
1187
+ #define ComboBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SNDMSG((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpsz)))
1188
+
1189
+ #define ComboBox_AddItemData(hwndCtl, data) ((int)(DWORD)SNDMSG((hwndCtl), CB_ADDSTRING, 0L, (LPARAM)(data)))
1190
+ #define ComboBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SNDMSG((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data)))
1191
+
1192
+ #define ComboBox_DeleteString(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), CB_DELETESTRING, (WPARAM)(int)(index), 0L))
1193
+
1194
+ #define ComboBox_GetLBTextLen(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), CB_GETLBTEXTLEN, (WPARAM)(int)(index), 0L))
1195
+ #define ComboBox_GetLBText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SNDMSG((hwndCtl), CB_GETLBTEXT, (WPARAM)(int)(index), (LPARAM)(LPCTSTR)(lpszBuffer)))
1196
+
1197
+ #define ComboBox_GetItemData(hwndCtl, index) ((LRESULT)(ULONG_PTR)SNDMSG((hwndCtl), CB_GETITEMDATA, (WPARAM)(int)(index), 0L))
1198
+ #define ComboBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SNDMSG((hwndCtl), CB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data)))
1199
+
1200
+ #define ComboBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SNDMSG((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
1201
+ #define ComboBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SNDMSG((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data)))
1202
+
1203
+ #define ComboBox_GetCurSel(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), CB_GETCURSEL, 0L, 0L))
1204
+ #define ComboBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SNDMSG((hwndCtl), CB_SETCURSEL, (WPARAM)(int)(index), 0L))
1205
+
1206
+ #define ComboBox_SelectString(hwndCtl, indexStart, lpszSelect) ((int)(DWORD)SNDMSG((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszSelect)))
1207
+ #define ComboBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SNDMSG((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data)))
1208
+
1209
+ #define ComboBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SNDMSG((hwndCtl), CB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCTSTR)(lpszFileSpec)))
1210
+
1211
+ #define ComboBox_ShowDropdown(hwndCtl, fShow) ((BOOL)(DWORD)SNDMSG((hwndCtl), CB_SHOWDROPDOWN, (WPARAM)(BOOL)(fShow), 0L))
1212
+
1213
+ #if (WINVER >= 0x030a)
1214
+ #define ComboBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SNDMSG((hwndCtl), CB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind)))
1215
+
1216
+ #define ComboBox_GetDroppedState(hwndCtl) ((BOOL)(DWORD)SNDMSG((hwndCtl), CB_GETDROPPEDSTATE, 0L, 0L))
1217
+ #define ComboBox_GetDroppedControlRect(hwndCtl, lprc) ((void)SNDMSG((hwndCtl), CB_GETDROPPEDCONTROLRECT, 0L, (LPARAM)(RECT *)(lprc)))
1218
+
1219
+ #define ComboBox_GetItemHeight(hwndCtl) ((int)(DWORD)SNDMSG((hwndCtl), CB_GETITEMHEIGHT, 0L, 0L))
1220
+ #define ComboBox_SetItemHeight(hwndCtl, index, cyItem) ((int)(DWORD)SNDMSG((hwndCtl), CB_SETITEMHEIGHT, (WPARAM)(int)(index), (LPARAM)(int)cyItem))
1221
+
1222
+ #define ComboBox_GetExtendedUI(hwndCtl) ((UINT)(DWORD)SNDMSG((hwndCtl), CB_GETEXTENDEDUI, 0L, 0L))
1223
+ #define ComboBox_SetExtendedUI(hwndCtl, flags) ((int)(DWORD)SNDMSG((hwndCtl), CB_SETEXTENDEDUI, (WPARAM)(UINT)(flags), 0L))
1224
+ #endif /* WINVER >= 0x030a */
1225
+
1226
+ /****** Alternate porting layer macros ****************************************/
1227
+
1228
+ /* USER MESSAGES: */
1229
+
1230
+ #define GET_WPARAM(wp, lp) (wp)
1231
+ #define GET_LPARAM(wp, lp) (lp)
1232
+
1233
+ #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
1234
+ #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
1235
+
1236
+ #define GET_WM_ACTIVATE_STATE(wp, lp) LOWORD(wp)
1237
+ #define GET_WM_ACTIVATE_FMINIMIZED(wp, lp) (BOOL)HIWORD(wp)
1238
+ #define GET_WM_ACTIVATE_HWND(wp, lp) (HWND)(lp)
1239
+ #define GET_WM_ACTIVATE_MPS(s, fmin, hwnd) \
1240
+ (WPARAM)MAKELONG((s), (fmin)), (LPARAM)(hwnd)
1241
+
1242
+ #define GET_WM_CHARTOITEM_CHAR(wp, lp) (TCHAR)LOWORD(wp)
1243
+ #define GET_WM_CHARTOITEM_POS(wp, lp) HIWORD(wp)
1244
+ #define GET_WM_CHARTOITEM_HWND(wp, lp) (HWND)(lp)
1245
+ #define GET_WM_CHARTOITEM_MPS(ch, pos, hwnd) \
1246
+ (WPARAM)MAKELONG((pos), (ch)), (LPARAM)(hwnd)
1247
+
1248
+ #define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
1249
+ #define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp)
1250
+ #define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
1251
+ #define GET_WM_COMMAND_MPS(id, hwnd, cmd) \
1252
+ (WPARAM)MAKELONG(id, cmd), (LPARAM)(hwnd)
1253
+
1254
+ #define WM_CTLCOLOR 0x0019
1255
+
1256
+ #define GET_WM_CTLCOLOR_HDC(wp, lp, msg) (HDC)(wp)
1257
+ #define GET_WM_CTLCOLOR_HWND(wp, lp, msg) (HWND)(lp)
1258
+ #define GET_WM_CTLCOLOR_TYPE(wp, lp, msg) (WORD)(msg - WM_CTLCOLORMSGBOX)
1259
+ #define GET_WM_CTLCOLOR_MSG(type) (WORD)(WM_CTLCOLORMSGBOX+(type))
1260
+ #define GET_WM_CTLCOLOR_MPS(hdc, hwnd, type) \
1261
+ (WPARAM)(hdc), (LPARAM)(hwnd)
1262
+
1263
+
1264
+ #define GET_WM_MENUSELECT_CMD(wp, lp) LOWORD(wp)
1265
+ #define GET_WM_MENUSELECT_FLAGS(wp, lp) (UINT)(int)(short)HIWORD(wp)
1266
+ #define GET_WM_MENUSELECT_HMENU(wp, lp) (HMENU)(lp)
1267
+ #define GET_WM_MENUSELECT_MPS(cmd, f, hmenu) \
1268
+ (WPARAM)MAKELONG(cmd, f), (LPARAM)(hmenu)
1269
+
1270
+ /* Note: the following are for interpreting MDIclient to MDI child messages. */
1271
+ #define GET_WM_MDIACTIVATE_FACTIVATE(hwnd, wp, lp) (lp == (LPARAM)hwnd)
1272
+ #define GET_WM_MDIACTIVATE_HWNDDEACT(wp, lp) (HWND)(wp)
1273
+ #define GET_WM_MDIACTIVATE_HWNDACTIVATE(wp, lp) (HWND)(lp)
1274
+ /* Note: the following is for sending to the MDI client window. */
1275
+ #define GET_WM_MDIACTIVATE_MPS(f, hwndD, hwndA)\
1276
+ (WPARAM)(hwndA), 0
1277
+
1278
+ #define GET_WM_MDISETMENU_MPS(hmenuF, hmenuW) (WPARAM)hmenuF, (LPARAM)hmenuW
1279
+
1280
+ #define GET_WM_MENUCHAR_CHAR(wp, lp) (TCHAR)LOWORD(wp)
1281
+ #define GET_WM_MENUCHAR_HMENU(wp, lp) (HMENU)(lp)
1282
+ #define GET_WM_MENUCHAR_FMENU(wp, lp) (BOOL)HIWORD(wp)
1283
+ #define GET_WM_MENUCHAR_MPS(ch, hmenu, f) \
1284
+ (WPARAM)MAKELONG(ch, f), (LPARAM)(hmenu)
1285
+
1286
+ #define GET_WM_PARENTNOTIFY_MSG(wp, lp) LOWORD(wp)
1287
+ #define GET_WM_PARENTNOTIFY_ID(wp, lp) HIWORD(wp)
1288
+ #define GET_WM_PARENTNOTIFY_HWNDCHILD(wp, lp) (HWND)(lp)
1289
+ #define GET_WM_PARENTNOTIFY_X(wp, lp) (int)(short)LOWORD(lp)
1290
+ #define GET_WM_PARENTNOTIFY_Y(wp, lp) (int)(short)HIWORD(lp)
1291
+ #define GET_WM_PARENTNOTIFY_MPS(msg, id, hwnd) \
1292
+ (WPARAM)MAKELONG(id, msg), (LPARAM)(hwnd)
1293
+ #define GET_WM_PARENTNOTIFY2_MPS(msg, x, y) \
1294
+ (WPARAM)MAKELONG(0, msg), MAKELONG(x, y)
1295
+
1296
+ #define GET_WM_VKEYTOITEM_CODE(wp, lp) (int)(short)LOWORD(wp)
1297
+ #define GET_WM_VKEYTOITEM_ITEM(wp, lp) HIWORD(wp)
1298
+ #define GET_WM_VKEYTOITEM_HWND(wp, lp) (HWND)(lp)
1299
+ #define GET_WM_VKEYTOITEM_MPS(code, item, hwnd) \
1300
+ (WPARAM)MAKELONG(item, code), (LPARAM)(hwnd)
1301
+
1302
+ #define GET_EM_SETSEL_START(wp, lp) (INT)(wp)
1303
+ #define GET_EM_SETSEL_END(wp, lp) (lp)
1304
+ #define GET_EM_SETSEL_MPS(iStart, iEnd) \
1305
+ (WPARAM)(iStart), (LPARAM)(iEnd)
1306
+
1307
+ #define GET_EM_LINESCROLL_MPS(vert, horz) \
1308
+ (WPARAM)horz, (LPARAM)vert
1309
+
1310
+ #define GET_WM_CHANGECBCHAIN_HWNDNEXT(wp, lp) (HWND)(lp)
1311
+
1312
+ #define GET_WM_HSCROLL_CODE(wp, lp) LOWORD(wp)
1313
+ #define GET_WM_HSCROLL_POS(wp, lp) HIWORD(wp)
1314
+ #define GET_WM_HSCROLL_HWND(wp, lp) (HWND)(lp)
1315
+ #define GET_WM_HSCROLL_MPS(code, pos, hwnd) \
1316
+ (WPARAM)MAKELONG(code, pos), (LPARAM)(hwnd)
1317
+
1318
+ #define GET_WM_VSCROLL_CODE(wp, lp) LOWORD(wp)
1319
+ #define GET_WM_VSCROLL_POS(wp, lp) HIWORD(wp)
1320
+ #define GET_WM_VSCROLL_HWND(wp, lp) (HWND)(lp)
1321
+ #define GET_WM_VSCROLL_MPS(code, pos, hwnd) \
1322
+ (WPARAM)MAKELONG(code, pos), (LPARAM)(hwnd)
1323
+
1324
+ /****** C runtime porting macros ****************************************/
1325
+
1326
+ #define _ncalloc calloc
1327
+ #define _nexpand _expand
1328
+ #define _ffree free
1329
+ #define _fmalloc malloc
1330
+ #define _fmemccpy _memccpy
1331
+ #define _fmemchr memchr
1332
+ #define _fmemcmp memcmp
1333
+ #define _fmemcpy memcpy
1334
+ #define _fmemicmp _memicmp
1335
+ #define _fmemmove memmove
1336
+ #define _fmemset memset
1337
+ #define _fmsize _msize
1338
+ #define _frealloc realloc
1339
+ #define _fstrcat strcat
1340
+ #define _fstrchr strchr
1341
+ #define _fstrcmp strcmp
1342
+ #define _fstrcpy strcpy
1343
+ #define _fstrcspn strcspn
1344
+ #define _fstrdup _strdup
1345
+ #define _fstricmp _stricmp
1346
+ #define _fstrlen strlen
1347
+ #define _fstrlwr _strlwr
1348
+ #define _fstrncat strncat
1349
+ #define _fstrncmp strncmp
1350
+ #define _fstrncpy strncpy
1351
+ #define _fstrnicmp _strnicmp
1352
+ #define _fstrnset _strnset
1353
+ #define _fstrpbrk strpbrk
1354
+ #define _fstrrchr strrchr
1355
+ #define _fstrrev _strrev
1356
+ #define _fstrset _strset
1357
+ #define _fstrspn strspn
1358
+ #define _fstrstr strstr
1359
+ #define _fstrtok strtok
1360
+ #define _fstrupr _strupr
1361
+ #define _nfree free
1362
+ #define _nmalloc malloc
1363
+ #define _nmsize _msize
1364
+ #define _nrealloc realloc
1365
+ #define _nstrdup _strdup
1366
+ #define hmemcpy MoveMemory
1367
+
1368
+ #ifndef DECLARE_HANDLE32
1369
+ #define DECLARE_HANDLE32 DECLARE_HANDLE
1370
+ #endif
1371
+
1372
+ #ifdef __cplusplus
1373
+ } /* End of extern "C" { */
1374
+ #endif /* __cplusplus */
1375
+
1376
+
1377
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
1378
+ #pragma endregion
1379
+
1380
+ #endif /* !_INC_WINDOWSX */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winerror.h ADDED
The diff for this file is too large to render. See raw diff
 
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winpackagefamily.h ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ winpackagefamily.h
8
+
9
+ Abstract:
10
+
11
+ API family partitioning based on packages.
12
+
13
+ */
14
+
15
+ #ifndef _INC_WINPACKAGEFAMILY
16
+ #define _INC_WINPACKAGEFAMILY
17
+
18
+ #if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
19
+ #if _MSC_VER >= 1200
20
+ #pragma warning(push)
21
+ #pragma warning(disable:4001) /* nonstandard extension 'single line comment' was used */
22
+ #endif
23
+ #pragma once
24
+ #endif // defined(_MSC_VER) && !defined(MOFCOMP_PASS)
25
+
26
+ #ifndef WINAPI_PARTITION_SERVER
27
+ #define WINAPI_PARTITION_SERVER (WINAPI_FAMILY == WINAPI_FAMILY_SERVER)
28
+ #endif
29
+
30
+ /*
31
+ * PARTITIONS based on packages are each #undef'ed below, and then will be #define-ed
32
+ * to be either 1 or 0 or depending on the active WINAPI_FAMILY.
33
+ */
34
+ #undef WINAPI_PARTITION_PKG_WINTRUST
35
+ #undef WINAPI_PARTITION_PKG_WEBSERVICES
36
+ #undef WINAPI_PARTITION_PKG_EVENTLOGSERVICE
37
+ #undef WINAPI_PARTITION_PKG_VHD
38
+ #undef WINAPI_PARTITION_PKG_PERFCOUNTER
39
+ #undef WINAPI_PARTITION_PKG_SECURESTARTUP
40
+ #undef WINAPI_PARTITION_PKG_REMOTEFS
41
+ #undef WINAPI_PARTITION_PKG_BOOTABLESKU
42
+ #undef WINAPI_PARTITION_PKG_CMDTOOLS
43
+ #undef WINAPI_PARTITION_PKG_DISM
44
+ #undef WINAPI_PARTITION_PKG_CORESETUP
45
+ #undef WINAPI_PARTITION_PKG_APPRUNTIME
46
+ #undef WINAPI_PARTITION_PKG_ESENT
47
+ #undef WINAPI_PARTITION_PKG_WINMGMT
48
+ #undef WINAPI_PARTITION_PKG_WNV
49
+ #undef WINAPI_PARTITION_PKG_CLUSTER
50
+ #undef WINAPI_PARTITION_PKG_VSS
51
+ #undef WINAPI_PARTITION_PKG_TRAFFIC
52
+ #undef WINAPI_PARTITION_PKG_ISCSI
53
+ #undef WINAPI_PARTITION_PKG_STORAGE
54
+ #undef WINAPI_PARTITION_PKG_MPSSVC
55
+ #undef WINAPI_PARTITION_PKG_APPXDEPLOYMENT
56
+ #undef WINAPI_PARTITION_PKG_WER
57
+
58
+ /*
59
+ * PARTITIONS for feature packages. Each package might be active for one or more editions
60
+ */
61
+ #define WINAPI_PARTITION_PKG_WINTRUST (WINAPI_PARTITION_SERVER == 1)
62
+ #define WINAPI_PARTITION_PKG_WEBSERVICES (WINAPI_PARTITION_SERVER == 1)
63
+ #define WINAPI_PARTITION_PKG_EVENTLOGSERVICE (WINAPI_PARTITION_SERVER == 1)
64
+ #define WINAPI_PARTITION_PKG_VHD (WINAPI_PARTITION_SERVER == 1)
65
+ #define WINAPI_PARTITION_PKG_PERFCOUNTER (WINAPI_PARTITION_SERVER == 1)
66
+ #define WINAPI_PARTITION_PKG_SECURESTARTUP (WINAPI_PARTITION_SERVER == 1)
67
+ #define WINAPI_PARTITION_PKG_REMOTEFS (WINAPI_PARTITION_SERVER == 1)
68
+ #define WINAPI_PARTITION_PKG_BOOTABLESKU (WINAPI_PARTITION_SERVER == 1)
69
+ #define WINAPI_PARTITION_PKG_CMDTOOLS (WINAPI_PARTITION_SERVER == 1)
70
+ #define WINAPI_PARTITION_PKG_DISM (WINAPI_PARTITION_SERVER == 1)
71
+ #define WINAPI_PARTITION_PKG_CORESETUP (WINAPI_PARTITION_SERVER == 1)
72
+ #define WINAPI_PARTITION_PKG_APPRUNTIME (WINAPI_PARTITION_SERVER == 1)
73
+ #define WINAPI_PARTITION_PKG_ESENT (WINAPI_PARTITION_SERVER == 1)
74
+ #define WINAPI_PARTITION_PKG_WINMGMT (WINAPI_PARTITION_SERVER == 1)
75
+ #define WINAPI_PARTITION_PKG_WNV (WINAPI_PARTITION_SERVER == 1)
76
+ #define WINAPI_PARTITION_PKG_CLUSTER (WINAPI_PARTITION_SERVER == 1)
77
+ #define WINAPI_PARTITION_PKG_VSS (WINAPI_PARTITION_SERVER == 1)
78
+ #define WINAPI_PARTITION_PKG_TRAFFIC (WINAPI_PARTITION_SERVER == 1)
79
+ #define WINAPI_PARTITION_PKG_ISCSI (WINAPI_PARTITION_SERVER == 1)
80
+ #define WINAPI_PARTITION_PKG_STORAGE (WINAPI_PARTITION_SERVER == 1)
81
+ #define WINAPI_PARTITION_PKG_MPSSVC (WINAPI_PARTITION_SERVER == 1)
82
+ #define WINAPI_PARTITION_PKG_APPXDEPLOYMENT (WINAPI_PARTITION_SERVER == 1)
83
+ #define WINAPI_PARTITION_PKG_WER (WINAPI_PARTITION_SERVER == 1)
84
+
85
+ #if defined(_MSC_VER) && !defined(MOFCOMP_PASS)
86
+ #if _MSC_VER >= 1200
87
+ #pragma warning(pop)
88
+ #endif
89
+ #endif
90
+
91
+ #endif /* !_INC_WINPACKAGEFAMILY */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winsmcrd.h ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) 1996 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ winsmcrd.h
8
+
9
+ Abstract:
10
+ Smart Card class/port IOCTL codes. This file is required for all code
11
+ user mode and kernel mode, using Smart Card IOCTL's, defines,
12
+ data structures
13
+
14
+ Revision History:
15
+
16
+ --*/
17
+
18
+
19
+ #ifndef _NTDDSCRD_H2_
20
+ #define _NTDDSCRD_H2_
21
+
22
+ #if defined (_MSC_VER) && (_MSC_VER >= 1020)
23
+ #pragma once
24
+ #endif
25
+
26
+ #ifdef __cplusplus
27
+ extern "C" {
28
+ #endif
29
+
30
+ #if _MSC_VER >= 1200
31
+ #pragma warning(push)
32
+ #pragma warning(disable:4820) // padding added after data member
33
+ #endif
34
+
35
+ #ifdef _WINSCARD_H_
36
+ typedef DWORD ULONG;
37
+ typedef WORD UWORD;
38
+ typedef BYTE UCHAR;
39
+ #else
40
+ typedef ULONG DWORD;
41
+ // typedef UWORD WORD;
42
+ typedef UCHAR BYTE;
43
+ #endif
44
+
45
+ #ifndef DEVICE_TYPE_SMARTCARD
46
+ #define FILE_DEVICE_SMARTCARD 0x00000031
47
+ #else
48
+ #if 0x00000031 != FILE_DEVICE_SMARTCARD
49
+ #error "Incorrect Smart Card Device Definition"
50
+ #endif
51
+ #endif
52
+
53
+
54
+ //
55
+ // Smart card reader interface GUID
56
+ //
57
+ // {50DD5230-BA8A-11D1-BF5D-0000F805F530}
58
+ //
59
+ DEFINE_GUID(GUID_DEVINTERFACE_SMARTCARD_READER,
60
+ 0x50DD5230, 0xBA8A, 0x11D1, 0xBF, 0x5D, 0x00, 0x00, 0xF8, 0x05, 0xF5, 0x30);
61
+
62
+ //
63
+ // Various constants
64
+ //
65
+
66
+ #define SCARD_ATR_LENGTH 33 // ISO 7816-3 spec.
67
+
68
+ //
69
+ ///////////////////////////////////////////////////////////////////////////////
70
+ //
71
+ // Protocol Flag definitions
72
+ //
73
+
74
+ #define SCARD_PROTOCOL_UNDEFINED 0x00000000 // There is no active protocol.
75
+ #define SCARD_PROTOCOL_T0 0x00000001 // T=0 is the active protocol.
76
+ #define SCARD_PROTOCOL_T1 0x00000002 // T=1 is the active protocol.
77
+ #define SCARD_PROTOCOL_RAW 0x00010000 // Raw is the active protocol.
78
+ //
79
+ // This is the mask of ISO defined transmission protocols
80
+ //
81
+ #define SCARD_PROTOCOL_Tx (SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1)
82
+ //
83
+ // Use the default transmission parameters / card clock freq.
84
+ //
85
+ #define SCARD_PROTOCOL_DEFAULT 0x80000000
86
+ //
87
+ // Use optimal transmission parameters / card clock freq.
88
+ // Since using the optimal parameters is the default case no bit is defined to be 1
89
+ //
90
+ #define SCARD_PROTOCOL_OPTIMAL 0x00000000
91
+
92
+
93
+ //
94
+ // Ioctl parameters 1 for IOCTL_SMARTCARD_POWER
95
+ //
96
+ #define SCARD_POWER_DOWN 0 // Power down the card.
97
+ #define SCARD_COLD_RESET 1 // Cycle power and reset the card.
98
+ #define SCARD_WARM_RESET 2 // Force a reset on the card.
99
+
100
+ //
101
+ ///////////////////////////////////////////////////////////////////////////////
102
+ //
103
+ // Reader Action IOCTLs
104
+ //
105
+
106
+ #define SCARD_CTL_CODE(code) CTL_CODE(FILE_DEVICE_SMARTCARD, \
107
+ (code), \
108
+ METHOD_BUFFERED, \
109
+ FILE_ANY_ACCESS)
110
+
111
+ #define IOCTL_SMARTCARD_POWER SCARD_CTL_CODE( 1)
112
+ #define IOCTL_SMARTCARD_GET_ATTRIBUTE SCARD_CTL_CODE( 2)
113
+ #define IOCTL_SMARTCARD_SET_ATTRIBUTE SCARD_CTL_CODE( 3)
114
+ #define IOCTL_SMARTCARD_CONFISCATE SCARD_CTL_CODE( 4)
115
+ #define IOCTL_SMARTCARD_TRANSMIT SCARD_CTL_CODE( 5)
116
+ #define IOCTL_SMARTCARD_EJECT SCARD_CTL_CODE( 6)
117
+ #define IOCTL_SMARTCARD_SWALLOW SCARD_CTL_CODE( 7)
118
+ // #define IOCTL_SMARTCARD_READ SCARD_CTL_CODE( 8) obsolete
119
+ // #define IOCTL_SMARTCARD_WRITE SCARD_CTL_CODE( 9) obsolete
120
+ #define IOCTL_SMARTCARD_IS_PRESENT SCARD_CTL_CODE(10)
121
+ #define IOCTL_SMARTCARD_IS_ABSENT SCARD_CTL_CODE(11)
122
+ #define IOCTL_SMARTCARD_SET_PROTOCOL SCARD_CTL_CODE(12)
123
+ #define IOCTL_SMARTCARD_GET_STATE SCARD_CTL_CODE(14)
124
+ #define IOCTL_SMARTCARD_GET_LAST_ERROR SCARD_CTL_CODE(15)
125
+ #define IOCTL_SMARTCARD_GET_PERF_CNTR SCARD_CTL_CODE(16)
126
+ #define IOCTL_SMARTCARD_GET_FEATURE_REQUEST SCARD_CTL_CODE(3400)
127
+
128
+
129
+ //
130
+ ///////////////////////////////////////////////////////////////////////////////
131
+ //
132
+ // Tags for requesting card and reader attributes
133
+ //
134
+
135
+ #define MAXIMUM_ATTR_STRING_LENGTH 32 // Nothing bigger than this from getAttr
136
+ #define MAXIMUM_SMARTCARD_READERS 10 // Limit the readers on the system
137
+
138
+ #define SCARD_ATTR_VALUE(Class, Tag) ((((ULONG)(Class)) << 16) | ((ULONG)(Tag)))
139
+
140
+ #define SCARD_CLASS_VENDOR_INFO 1 // Vendor information definitions
141
+ #define SCARD_CLASS_COMMUNICATIONS 2 // Communication definitions
142
+ #define SCARD_CLASS_PROTOCOL 3 // Protocol definitions
143
+ #define SCARD_CLASS_POWER_MGMT 4 // Power Management definitions
144
+ #define SCARD_CLASS_SECURITY 5 // Security Assurance definitions
145
+ #define SCARD_CLASS_MECHANICAL 6 // Mechanical characteristic definitions
146
+ #define SCARD_CLASS_VENDOR_DEFINED 7 // Vendor specific definitions
147
+ #define SCARD_CLASS_IFD_PROTOCOL 8 // Interface Device Protocol options
148
+ #define SCARD_CLASS_ICC_STATE 9 // ICC State specific definitions
149
+ #define SCARD_CLASS_PERF 0x7ffe // performace counters
150
+ #define SCARD_CLASS_SYSTEM 0x7fff // System-specific definitions
151
+
152
+ #define SCARD_ATTR_VENDOR_NAME SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0100)
153
+ #define SCARD_ATTR_VENDOR_IFD_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0101)
154
+ #define SCARD_ATTR_VENDOR_IFD_VERSION SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0102)
155
+ #define SCARD_ATTR_VENDOR_IFD_SERIAL_NO SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_INFO, 0x0103)
156
+ #define SCARD_ATTR_CHANNEL_ID SCARD_ATTR_VALUE(SCARD_CLASS_COMMUNICATIONS, 0x0110)
157
+ #define SCARD_ATTR_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0120)
158
+ // #define SCARD_ATTR_ASYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0120)
159
+ #define SCARD_ATTR_DEFAULT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0121)
160
+ #define SCARD_ATTR_MAX_CLK SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0122)
161
+ #define SCARD_ATTR_DEFAULT_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0123)
162
+ #define SCARD_ATTR_MAX_DATA_RATE SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0124)
163
+ #define SCARD_ATTR_MAX_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0125)
164
+ // #define SCARD_ATTR_SYNC_PROTOCOL_TYPES SCARD_ATTR_VALUE(SCARD_CLASS_PROTOCOL, 0x0126)
165
+ #define SCARD_ATTR_POWER_MGMT_SUPPORT SCARD_ATTR_VALUE(SCARD_CLASS_POWER_MGMT, 0x0131)
166
+ #define SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0140)
167
+ #define SCARD_ATTR_USER_AUTH_INPUT_DEVICE SCARD_ATTR_VALUE(SCARD_CLASS_SECURITY, 0x0142)
168
+ #define SCARD_ATTR_CHARACTERISTICS SCARD_ATTR_VALUE(SCARD_CLASS_MECHANICAL, 0x0150)
169
+
170
+ #define SCARD_ATTR_CURRENT_PROTOCOL_TYPE SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0201)
171
+ #define SCARD_ATTR_CURRENT_CLK SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0202)
172
+ #define SCARD_ATTR_CURRENT_F SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0203)
173
+ #define SCARD_ATTR_CURRENT_D SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0204)
174
+ #define SCARD_ATTR_CURRENT_N SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0205)
175
+ #define SCARD_ATTR_CURRENT_W SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0206)
176
+ #define SCARD_ATTR_CURRENT_IFSC SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0207)
177
+ #define SCARD_ATTR_CURRENT_IFSD SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0208)
178
+ #define SCARD_ATTR_CURRENT_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x0209)
179
+ #define SCARD_ATTR_CURRENT_CWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020a)
180
+ #define SCARD_ATTR_CURRENT_EBC_ENCODING SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020b)
181
+ #define SCARD_ATTR_EXTENDED_BWT SCARD_ATTR_VALUE(SCARD_CLASS_IFD_PROTOCOL, 0x020c)
182
+
183
+ #define SCARD_ATTR_ICC_PRESENCE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0300)
184
+ #define SCARD_ATTR_ICC_INTERFACE_STATUS SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0301)
185
+ #define SCARD_ATTR_CURRENT_IO_STATE SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0302)
186
+ #define SCARD_ATTR_ATR_STRING SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0303)
187
+ #define SCARD_ATTR_ICC_TYPE_PER_ATR SCARD_ATTR_VALUE(SCARD_CLASS_ICC_STATE, 0x0304)
188
+
189
+ #define SCARD_ATTR_ESC_RESET SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA000)
190
+ #define SCARD_ATTR_ESC_CANCEL SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA003)
191
+ #define SCARD_ATTR_ESC_AUTHREQUEST SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA005)
192
+ #define SCARD_ATTR_MAXINPUT SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA007)
193
+ #define SCARD_ATTR_VENDOR_SPECIFIC_INFO SCARD_ATTR_VALUE(SCARD_CLASS_VENDOR_DEFINED, 0xA008)
194
+
195
+ #define SCARD_ATTR_DEVICE_UNIT SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0001)
196
+ #define SCARD_ATTR_DEVICE_IN_USE SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0002)
197
+ #define SCARD_ATTR_DEVICE_FRIENDLY_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0003)
198
+ #define SCARD_ATTR_DEVICE_SYSTEM_NAME_A SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0004)
199
+ #define SCARD_ATTR_DEVICE_FRIENDLY_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0005)
200
+ #define SCARD_ATTR_DEVICE_SYSTEM_NAME_W SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0006)
201
+ #define SCARD_ATTR_SUPRESS_T1_IFS_REQUEST SCARD_ATTR_VALUE(SCARD_CLASS_SYSTEM, 0x0007)
202
+
203
+ #define SCARD_PERF_NUM_TRANSMISSIONS SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0001)
204
+ #define SCARD_PERF_BYTES_TRANSMITTED SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0002)
205
+ #define SCARD_PERF_TRANSMISSION_TIME SCARD_ATTR_VALUE(SCARD_CLASS_PERF, 0x0003)
206
+
207
+ #ifdef UNICODE
208
+ #define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_W
209
+ #define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_W
210
+ #else
211
+ #define SCARD_ATTR_DEVICE_FRIENDLY_NAME SCARD_ATTR_DEVICE_FRIENDLY_NAME_A
212
+ #define SCARD_ATTR_DEVICE_SYSTEM_NAME SCARD_ATTR_DEVICE_SYSTEM_NAME_A
213
+ #endif
214
+
215
+
216
+ //
217
+ // T=0 Protocol Defines
218
+ //
219
+
220
+ #define SCARD_T0_HEADER_LENGTH 7
221
+ #define SCARD_T0_CMD_LENGTH 5
222
+
223
+
224
+ //
225
+ // T=1 Protocol Defines
226
+ //
227
+
228
+ #define SCARD_T1_PROLOGUE_LENGTH 3
229
+ #define SCARD_T1_EPILOGUE_LENGTH 2 // CRC
230
+ #define SCARD_T1_EPILOGUE_LENGTH_LRC 1
231
+ #define SCARD_T1_MAX_IFS 254
232
+
233
+
234
+ //
235
+ ///////////////////////////////////////////////////////////////////////////////
236
+ //
237
+ // Reader states
238
+ //
239
+
240
+ #define SCARD_UNKNOWN 0 // This value implies the driver is unaware
241
+ // of the current state of the reader.
242
+ #define SCARD_ABSENT 1 // This value implies there is no card in
243
+ // the reader.
244
+ #define SCARD_PRESENT 2 // This value implies there is a card is
245
+ // present in the reader, but that it has
246
+ // not been moved into position for use.
247
+ #define SCARD_SWALLOWED 3 // This value implies there is a card in the
248
+ // reader in position for use. The card is
249
+ // not powered.
250
+ #define SCARD_POWERED 4 // This value implies there is power is
251
+ // being provided to the card, but the
252
+ // Reader Driver is unaware of the mode of
253
+ // the card.
254
+ #define SCARD_NEGOTIABLE 5 // This value implies the card has been
255
+ // reset and is awaiting PTS negotiation.
256
+ #define SCARD_SPECIFIC 6 // This value implies the card has been
257
+ // reset and specific communication
258
+ // protocols have been established.
259
+
260
+ ////////////////////////////////////////////////////////////////////////////////
261
+ //
262
+ // I/O Services
263
+ //
264
+ // The following services provide access to the I/O capabilities of the
265
+ // reader drivers. Services of the Smart Card are requested by placing the
266
+ // following structure into the protocol buffer:
267
+ //
268
+
269
+
270
+ typedef struct _SCARD_IO_REQUEST{
271
+ DWORD dwProtocol; // Protocol identifier
272
+ DWORD cbPciLength; // Protocol Control Information Length
273
+ } SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST;
274
+ typedef const SCARD_IO_REQUEST *LPCSCARD_IO_REQUEST;
275
+
276
+
277
+ //
278
+ // T=0 protocol services.
279
+ //
280
+
281
+ typedef struct _SCARD_T0_COMMAND {
282
+ BYTE
283
+ bCla, // The instruction class
284
+ bIns, // The instruction code within the instruction class
285
+ bP1,
286
+ bP2, // Parameters to the instruction
287
+ bP3; // Size of I/O Transfer
288
+ } SCARD_T0_COMMAND, *LPSCARD_T0_COMMAND;
289
+
290
+ typedef struct _SCARD_T0_REQUEST {
291
+ SCARD_IO_REQUEST ioRequest;
292
+ BYTE
293
+ bSw1,
294
+ bSw2; // Return codes from the instruction
295
+ #pragma warning(push)
296
+ #pragma warning(disable:4201)
297
+ union
298
+ {
299
+ SCARD_T0_COMMAND CmdBytes;
300
+ BYTE rgbHeader[5];
301
+ } DUMMYUNIONNAME;
302
+ #pragma warning(pop)
303
+ } SCARD_T0_REQUEST;
304
+
305
+ typedef SCARD_T0_REQUEST *PSCARD_T0_REQUEST, *LPSCARD_T0_REQUEST;
306
+
307
+
308
+ //
309
+ // T=1 Protocol Services
310
+ //
311
+
312
+ typedef struct _SCARD_T1_REQUEST {
313
+ SCARD_IO_REQUEST ioRequest;
314
+ } SCARD_T1_REQUEST;
315
+ typedef SCARD_T1_REQUEST *PSCARD_T1_REQUEST, *LPSCARD_T1_REQUEST;
316
+
317
+
318
+ //
319
+ ////////////////////////////////////////////////////////////////////////////////
320
+ //
321
+ // Driver attribute flags
322
+ //
323
+
324
+ #define SCARD_READER_SWALLOWS 0x00000001 // Reader has a card swallowing
325
+ // mechanism.
326
+ #define SCARD_READER_EJECTS 0x00000002 // Reader has a card ejection
327
+ // mechanism.
328
+ #define SCARD_READER_CONFISCATES 0x00000004 // Reader has a card capture
329
+ // mechanism.
330
+ #define SCARD_READER_CONTACTLESS 0x00000008 // Reader supports contactless
331
+
332
+ //
333
+ ///////////////////////////////////////////////////////////////////////////////
334
+ //
335
+ // Type of reader
336
+ //
337
+ #define SCARD_READER_TYPE_SERIAL 0x01
338
+ #define SCARD_READER_TYPE_PARALELL 0x02
339
+ #define SCARD_READER_TYPE_KEYBOARD 0x04
340
+ #define SCARD_READER_TYPE_SCSI 0x08
341
+ #define SCARD_READER_TYPE_IDE 0x10
342
+ #define SCARD_READER_TYPE_USB 0x20
343
+ #define SCARD_READER_TYPE_PCMCIA 0x40
344
+ #define SCARD_READER_TYPE_TPM 0x80
345
+ #define SCARD_READER_TYPE_NFC 0x100
346
+ #define SCARD_READER_TYPE_UICC 0x200
347
+ #define SCARD_READER_TYPE_NGC 0x400
348
+ #define SCARD_READER_TYPE_EMBEDDEDSE 0x800
349
+ #define SCARD_READER_TYPE_VENDOR 0xF0
350
+
351
+ #if _MSC_VER >= 1200
352
+ #pragma warning(pop)
353
+ #endif
354
+
355
+ #ifdef __cplusplus
356
+ }
357
+ #endif
358
+ #endif
359
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/winusbio.h ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************
2
+
3
+ Copyright (c) 2002 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ wusbio.h
8
+
9
+ Abstract:
10
+
11
+ Public header for WINUSB
12
+
13
+ Environment:
14
+
15
+ User and Kernel Mode
16
+
17
+ Notes:
18
+
19
+ THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
20
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
22
+ PURPOSE.
23
+
24
+ Copyright (c) 2001 Microsoft Corporation. All Rights Reserved.
25
+
26
+
27
+ Revision History:
28
+
29
+ 11/12/2002 : created
30
+
31
+
32
+ ****************************************************************************/
33
+
34
+ #ifndef __WUSBIO_H__
35
+ #define __WUSBIO_H__
36
+
37
+ #include <winapifamily.h>
38
+
39
+ #pragma region Desktop Family
40
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
41
+
42
+ #if(NTDDI_VERSION >= NTDDI_WINXP)
43
+
44
+ #include <usb.h>
45
+
46
+ // Pipe policy types
47
+ #define SHORT_PACKET_TERMINATE 0x01
48
+ #define AUTO_CLEAR_STALL 0x02
49
+ #define PIPE_TRANSFER_TIMEOUT 0x03
50
+ #define IGNORE_SHORT_PACKETS 0x04
51
+ #define ALLOW_PARTIAL_READS 0x05
52
+ #define AUTO_FLUSH 0x06
53
+ #define RAW_IO 0x07
54
+ #define MAXIMUM_TRANSFER_SIZE 0x08
55
+ #define RESET_PIPE_ON_RESUME 0x09
56
+
57
+ // Power policy types
58
+ //
59
+ // Add 0x80 for Power policy types in order to prevent overlap with
60
+ // Pipe policy types to prevent "accidentally" setting the wrong value for the
61
+ // wrong type.
62
+ //
63
+ #define AUTO_SUSPEND 0x81
64
+ #define SUSPEND_DELAY 0x83
65
+
66
+ // Device Information types
67
+ #define DEVICE_SPEED 0x01
68
+
69
+ // Device Speeds
70
+ #define LowSpeed 0x01
71
+ #define FullSpeed 0x02
72
+ #define HighSpeed 0x03
73
+
74
+ // {DA812BFF-12C3-46a2-8E2B-DBD3B7834C43}
75
+ #include <initguid.h>
76
+ DEFINE_GUID(WinUSB_TestGuid, 0xda812bff, 0x12c3, 0x46a2, 0x8e, 0x2b, 0xdb, 0xd3, 0xb7, 0x83, 0x4c, 0x43);
77
+
78
+
79
+ typedef struct _WINUSB_PIPE_INFORMATION {
80
+ USBD_PIPE_TYPE PipeType;
81
+ UCHAR PipeId;
82
+ USHORT MaximumPacketSize;
83
+ UCHAR Interval;
84
+ } WINUSB_PIPE_INFORMATION, *PWINUSB_PIPE_INFORMATION;
85
+
86
+
87
+ typedef struct _WINUSB_PIPE_INFORMATION_EX {
88
+ USBD_PIPE_TYPE PipeType;
89
+ UCHAR PipeId;
90
+ USHORT MaximumPacketSize;
91
+ UCHAR Interval;
92
+ ULONG MaximumBytesPerInterval;
93
+ } WINUSB_PIPE_INFORMATION_EX, *PWINUSB_PIPE_INFORMATION_EX;
94
+
95
+ #endif // (NTDDI_VERSION >= NTDDI_WINXP)
96
+
97
+
98
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
99
+ #pragma endregion
100
+
101
+ #endif // __WUSBIO_H__
102
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/wlantypes.h ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ wlantypes.h
8
+
9
+ Abstract:
10
+
11
+ Structures used to hold wlan information.
12
+
13
+ --*/
14
+
15
+ #ifndef __WLANTYPES_H__
16
+ #define __WLANTYPES_H__
17
+ #include <winapifamily.h>
18
+
19
+ #pragma region Desktop Family
20
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
21
+
22
+
23
+ typedef enum _DOT11_BSS_TYPE {
24
+ dot11_BSS_type_infrastructure = 1,
25
+ dot11_BSS_type_independent = 2,
26
+ dot11_BSS_type_any = 3
27
+ } DOT11_BSS_TYPE, * PDOT11_BSS_TYPE;
28
+
29
+ #define DOT11_SSID_MAX_LENGTH 32 // 32 bytes
30
+ typedef struct _DOT11_SSID {
31
+ #ifndef __midl
32
+ _Field_range_(0,32)
33
+ #endif
34
+ ULONG uSSIDLength;
35
+ UCHAR ucSSID[DOT11_SSID_MAX_LENGTH];
36
+ } DOT11_SSID, * PDOT11_SSID;
37
+
38
+
39
+ // DOT11_AUTH_ALGO_LIST
40
+ #ifdef __midl
41
+ // use the 4-byte enum
42
+ typedef [v1_enum] enum _DOT11_AUTH_ALGORITHM {
43
+ #else
44
+ typedef enum _DOT11_AUTH_ALGORITHM {
45
+ #endif
46
+ DOT11_AUTH_ALGO_80211_OPEN = 1,
47
+ DOT11_AUTH_ALGO_80211_SHARED_KEY = 2,
48
+ DOT11_AUTH_ALGO_WPA = 3,
49
+ DOT11_AUTH_ALGO_WPA_PSK = 4,
50
+ DOT11_AUTH_ALGO_WPA_NONE = 5, // used in NatSTA only
51
+ DOT11_AUTH_ALGO_RSNA = 6,
52
+ DOT11_AUTH_ALGO_RSNA_PSK = 7,
53
+ DOT11_AUTH_ALGO_WPA3 = 8, // means WPA3 Enterprise 192 bits
54
+ #if (NTDDI_VERSION >= NTDDI_WIN10_FE)
55
+ DOT11_AUTH_ALGO_WPA3_ENT_192 = DOT11_AUTH_ALGO_WPA3,
56
+ #endif
57
+ DOT11_AUTH_ALGO_WPA3_SAE = 9,
58
+ #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
59
+ DOT11_AUTH_ALGO_OWE = 10,
60
+ #endif
61
+ #if (NTDDI_VERSION >= NTDDI_WIN10_FE)
62
+ DOT11_AUTH_ALGO_WPA3_ENT = 11,
63
+ #endif
64
+ DOT11_AUTH_ALGO_IHV_START = 0x80000000,
65
+ DOT11_AUTH_ALGO_IHV_END = 0xffffffff
66
+ } DOT11_AUTH_ALGORITHM, * PDOT11_AUTH_ALGORITHM;
67
+
68
+ #define DOT11_AUTH_ALGORITHM_OPEN_SYSTEM DOT11_AUTH_ALGO_80211_OPEN
69
+ #define DOT11_AUTH_ALGORITHM_SHARED_KEY DOT11_AUTH_ALGO_80211_SHARED_KEY
70
+ #define DOT11_AUTH_ALGORITHM_WPA DOT11_AUTH_ALGO_WPA
71
+ #define DOT11_AUTH_ALGORITHM_WPA_PSK DOT11_AUTH_ALGO_WPA_PSK
72
+ #define DOT11_AUTH_ALGORITHM_WPA_NONE DOT11_AUTH_ALGO_WPA_NONE
73
+ #define DOT11_AUTH_ALGORITHM_RSNA DOT11_AUTH_ALGO_RSNA
74
+ #define DOT11_AUTH_ALGORITHM_RSNA_PSK DOT11_AUTH_ALGO_RSNA_PSK
75
+ #define DOT11_AUTH_ALGORITHM_WPA3 DOT11_AUTH_ALGO_WPA3
76
+ #if (NTDDI_VERSION >= NTDDI_WIN10_FE)
77
+ #define DOT11_AUTH_ALGORITHM_WPA3_ENT_192 DOT11_AUTH_ALGO_WPA3_ENT_192
78
+ #endif
79
+ #define DOT11_AUTH_ALGORITHM_WPA3_SAE DOT11_AUTH_ALGO_WPA3_SAE
80
+ #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
81
+ #define DOT11_AUTH_ALGORITHM_OWE DOT11_AUTH_ALGO_OWE
82
+ #endif
83
+ #if (NTDDI_VERSION >= NTDDI_WIN10_FE)
84
+ #define DOT11_AUTH_ALGORITHM_WPA3_ENT DOT11_AUTH_ALGO_WPA3_ENT
85
+ #endif
86
+ // Cipher algorithm Ids (for little endian platform)
87
+ #ifdef __midl
88
+ // use the 4-byte enum
89
+ typedef [v1_enum] enum _DOT11_CIPHER_ALGORITHM {
90
+ #else
91
+ typedef enum _DOT11_CIPHER_ALGORITHM {
92
+ #endif
93
+ DOT11_CIPHER_ALGO_NONE = 0x00,
94
+ DOT11_CIPHER_ALGO_WEP40 = 0x01,
95
+ DOT11_CIPHER_ALGO_TKIP = 0x02,
96
+ DOT11_CIPHER_ALGO_CCMP = 0x04,
97
+ DOT11_CIPHER_ALGO_WEP104 = 0x05,
98
+ DOT11_CIPHER_ALGO_BIP = 0x06, // BIP-CMAC-128
99
+ DOT11_CIPHER_ALGO_GCMP = 0x08, // GCMP-128
100
+ DOT11_CIPHER_ALGO_GCMP_256 = 0x09, // GCMP-256
101
+ DOT11_CIPHER_ALGO_CCMP_256 = 0x0a, // CCMP-256
102
+ DOT11_CIPHER_ALGO_BIP_GMAC_128 = 0x0b, // BIP-GMAC-128
103
+ DOT11_CIPHER_ALGO_BIP_GMAC_256 = 0x0c, // BIP-GMAC-256
104
+ DOT11_CIPHER_ALGO_BIP_CMAC_256 = 0x0d, // BIP-CMAC-256
105
+ DOT11_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
106
+ DOT11_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
107
+ DOT11_CIPHER_ALGO_WEP = 0x101,
108
+ DOT11_CIPHER_ALGO_IHV_START = 0x80000000,
109
+ DOT11_CIPHER_ALGO_IHV_END = 0xffffffff
110
+ } DOT11_CIPHER_ALGORITHM, * PDOT11_CIPHER_ALGORITHM;
111
+
112
+ typedef struct DOT11_AUTH_CIPHER_PAIR {
113
+ DOT11_AUTH_ALGORITHM AuthAlgoId;
114
+ DOT11_CIPHER_ALGORITHM CipherAlgoId;
115
+ } DOT11_AUTH_CIPHER_PAIR, * PDOT11_AUTH_CIPHER_PAIR;
116
+
117
+
118
+ #define DOT11_OI_MAX_LENGTH 5 // See 802.11-2012 Section 8.4.1.31
119
+ #define DOT11_OI_MIN_LENGTH 3 // See 802.11-2012 Section 8.4.1.31
120
+ typedef struct _DOT11_OI {
121
+ USHORT OILength; // Must be between DOT11_OI_MIN_LENGTH and DOT11_OI_MAX_LENGTH
122
+ UCHAR OI[DOT11_OI_MAX_LENGTH];
123
+ } DOT11_OI, *PDOT11_OI;
124
+
125
+ //
126
+ // Similar to DOT11_INTERWORKING_ACCESSNETWORKOPTIONS, but it doesn't have bit fields, which are not allowed for RPC interfaces
127
+ //
128
+ typedef struct DOT11_ACCESSNETWORKOPTIONS { // 802.11-2012 Figure 8-352
129
+ UINT8 AccessNetworkType; // 802.11-2012 Table 8-174
130
+ UINT8 Internet; // 1 = Internet connectivity
131
+ UINT8 ASRA; // Additional Step Required for Access
132
+ UINT8 ESR; // Emergency Services Reachable
133
+ UINT8 UESA; // Unauthenticated Emergency Services Available
134
+ } DOT11_ACCESSNETWORKOPTIONS, *PDOT11_ACCESSNETWORKOPTIONS;
135
+
136
+ typedef struct DOT11_VENUEINFO { // 802.11-2012 Figure 8-72
137
+ UINT8 VenueGroup; // 802.11-2012 Table 8-52
138
+ UINT8 VenueType; // 802.11-2012 Table 8-53
139
+ } DOT11_VENUEINFO, *PDOT11_VENUEINFO;
140
+
141
+
142
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
143
+ #pragma endregion
144
+
145
+ #endif // __WLANTYPES_H__
msvc/Windows Kits/10/Include/10.0.26100.0/shared/wmistr.h ADDED
@@ -0,0 +1,527 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ Wmistr.h
8
+
9
+ Abstract:
10
+
11
+ WMI structure definitions
12
+
13
+ --*/
14
+
15
+ #ifndef _WMISTR_
16
+ #define _WMISTR_
17
+
18
+ #pragma once
19
+
20
+ #if _MSC_VER >= 1200
21
+ #pragma warning(push)
22
+ #pragma warning(disable: 4668) // #if not_defined treated as #if 0
23
+ #pragma warning(disable: 4820) // padding added
24
+ #endif
25
+ #pragma warning(disable: 4200) // nonstandard extension used : zero-sized array in struct/union
26
+ #pragma warning(disable: 4201) // nonstandard extension used : nameless struct/union
27
+
28
+ //
29
+ // WNODE definition
30
+ typedef struct _WNODE_HEADER
31
+ {
32
+ ULONG BufferSize; // Size of entire buffer inclusive of this ULONG
33
+ ULONG ProviderId; // Provider Id of driver returning this buffer
34
+ union
35
+ {
36
+ ULONG64 HistoricalContext; // Logger use
37
+ struct
38
+ {
39
+ ULONG Version; // Reserved
40
+ ULONG Linkage; // Linkage field reserved for WMI
41
+ } DUMMYSTRUCTNAME;
42
+ } DUMMYUNIONNAME;
43
+
44
+ union
45
+ {
46
+ ULONG CountLost; // Reserved
47
+ HANDLE KernelHandle; // Kernel handle for data block
48
+ LARGE_INTEGER TimeStamp; // Timestamp as returned in units of 100ns
49
+ // since 1/1/1601
50
+ } DUMMYUNIONNAME2;
51
+ GUID Guid; // Guid for data block returned with results
52
+ ULONG ClientContext;
53
+ ULONG Flags; // Flags, see below
54
+ } WNODE_HEADER, *PWNODE_HEADER;
55
+
56
+ //
57
+ // WNODE_HEADER flags are defined as follows
58
+ #define WNODE_FLAG_ALL_DATA 0x00000001 // set for WNODE_ALL_DATA
59
+ #define WNODE_FLAG_SINGLE_INSTANCE 0x00000002 // set for WNODE_SINGLE_INSTANCE
60
+ #define WNODE_FLAG_SINGLE_ITEM 0x00000004 // set for WNODE_SINGLE_ITEM
61
+ #define WNODE_FLAG_EVENT_ITEM 0x00000008 // set for WNODE_EVENT_ITEM
62
+
63
+ // Set if data block size is
64
+ // identical for all instances
65
+ // (used with WNODE_ALL_DATA
66
+ // only)
67
+ #define WNODE_FLAG_FIXED_INSTANCE_SIZE 0x00000010
68
+
69
+ #define WNODE_FLAG_TOO_SMALL 0x00000020 // set for WNODE_TOO_SMALL
70
+
71
+ // Set when a data provider returns a
72
+ // WNODE_ALL_DATA in which the number of
73
+ // instances and their names returned
74
+ // are identical to those returned from the
75
+ // previous WNODE_ALL_DATA query. Only data
76
+ // blocks registered with dynamic instance
77
+ // names should use this flag.
78
+ #define WNODE_FLAG_INSTANCES_SAME 0x00000040
79
+
80
+ // Instance names are not specified in
81
+ // WNODE_ALL_DATA; values specified at
82
+ // registration are used instead. Always
83
+ // set for guids registered with static
84
+ // instance names
85
+ #define WNODE_FLAG_STATIC_INSTANCE_NAMES 0x00000080
86
+
87
+ #define WNODE_FLAG_INTERNAL 0x00000100 // Used internally by WMI
88
+
89
+ // timestamp should not be modified by
90
+ // a historical logger
91
+ #define WNODE_FLAG_USE_TIMESTAMP 0x00000200
92
+
93
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
94
+ #define WNODE_FLAG_PERSIST_EVENT 0x00000400
95
+ #endif
96
+
97
+ #define WNODE_FLAG_EVENT_REFERENCE 0x00002000
98
+
99
+ // Set if Instance names are ansi. Only set when returning from
100
+ // WMIQuerySingleInstanceA and WMIQueryAllDataA
101
+ #define WNODE_FLAG_ANSI_INSTANCENAMES 0x00004000
102
+
103
+ // Set if WNODE is a method call
104
+ #define WNODE_FLAG_METHOD_ITEM 0x00008000
105
+
106
+ // Set if instance names originated from a PDO
107
+ #define WNODE_FLAG_PDO_INSTANCE_NAMES 0x00010000
108
+
109
+ // The second byte, except the first bit is used exclusively for tracing
110
+ #define WNODE_FLAG_TRACED_GUID 0x00020000 // denotes a trace
111
+
112
+ #define WNODE_FLAG_LOG_WNODE 0x00040000 // request to log Wnode
113
+
114
+ #define WNODE_FLAG_USE_GUID_PTR 0x00080000 // Guid is actually a pointer
115
+
116
+ #define WNODE_FLAG_USE_MOF_PTR 0x00100000 // MOF data are dereferenced
117
+
118
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
119
+ #define WNODE_FLAG_NO_HEADER 0x00200000 // Trace without header
120
+ #endif
121
+
122
+ #if (NTDDI_VERSION >= NTDDI_VISTA)
123
+ #define WNODE_FLAG_SEND_DATA_BLOCK 0x00400000 // Data Block delivery
124
+ #endif
125
+
126
+ // Indicates that the EVENT_TRACE_PROPERTIES struct that this is a part
127
+ // of is at least EVENT_TRACE_PROPERTIES_V2 and contains a version field.
128
+ #define WNODE_FLAG_VERSIONED_PROPERTIES 0x00800000
129
+
130
+ // Set for events that are WNODE_EVENT_REFERENCE
131
+ // Mask for event severity level. Level 0xff is the most severe type of event
132
+ #define WNODE_FLAG_SEVERITY_MASK 0xff000000
133
+
134
+
135
+ //
136
+ // This structure is used within the WNODE_ALL_DATA when the data blocks
137
+ // for the different instances are different lengths. If the data blocks
138
+ // for the different instances are identical lengths then
139
+ // WNODE_FLAG_FIXED_INSTANCE_SIZE should be set and FixedInstanceSize
140
+ // set to the common data block size.
141
+ typedef struct
142
+ {
143
+ ULONG OffsetInstanceData; // Offset from beginning of WNODE_ALL_DATA
144
+ // to Data block for instance
145
+ ULONG LengthInstanceData; // Length of data block for instance
146
+ } OFFSETINSTANCEDATAANDLENGTH, *POFFSETINSTANCEDATAANDLENGTH;
147
+
148
+ #if defined(_MSC_EXTENSIONS)
149
+ typedef struct tagWNODE_ALL_DATA
150
+ {
151
+ struct _WNODE_HEADER WnodeHeader;
152
+
153
+ ULONG DataBlockOffset;// Offset from begin of WNODE to first data block
154
+
155
+ ULONG InstanceCount; // Count of instances whose data follows.
156
+
157
+ // Offset to an array of offsets to the instance names
158
+ ULONG OffsetInstanceNameOffsets;
159
+
160
+ // If WNODE_FLAG_FIXED_INSTANCE_SIZE is set in Flags then
161
+ // FixedInstanceSize specifies the size of each data block. In this case
162
+ // there is one ULONG followed by the data blocks.
163
+ // If WNODE_FLAG_FIXED_INSTANCE_SIZE is not set
164
+ // then OffsetInstanceDataAndLength
165
+ // is an array of OFFSETINSTANCEDATAANDLENGTH that specifies the
166
+ // offsets and lengths of the data blocks for each instance.
167
+ union
168
+ {
169
+ ULONG FixedInstanceSize;
170
+ OFFSETINSTANCEDATAANDLENGTH OffsetInstanceDataAndLength[];
171
+ /* [InstanceCount] */
172
+ } DUMMYUNIONNAME;
173
+
174
+ // padding so that first data block begins on a 8 byte boundary
175
+
176
+ // data blocks and instance names for all instances
177
+
178
+ } WNODE_ALL_DATA, *PWNODE_ALL_DATA;
179
+ #endif
180
+
181
+
182
+ #if defined(_MSC_EXTENSIONS)
183
+ typedef struct tagWNODE_SINGLE_INSTANCE
184
+ {
185
+ struct _WNODE_HEADER WnodeHeader;
186
+
187
+ // Offset from beginning of WNODE_SINGLE_INSTANCE
188
+ // to instance name. Use when
189
+ // WNODE_FLAG_STATIC_INSTANCE_NAMES is reset
190
+ // (Dynamic instance names)
191
+ ULONG OffsetInstanceName;
192
+
193
+ // Instance index when
194
+ // WNODE_FLAG_STATIC_INSTANCE_NAME is set
195
+ ULONG InstanceIndex; // (Static Instance Names)
196
+
197
+ ULONG DataBlockOffset; // offset from beginning of WNODE to data block
198
+ ULONG SizeDataBlock; // Size of data block for instance
199
+
200
+ UCHAR VariableData[];
201
+ // instance names and padding so data block begins on 8 byte boundary
202
+
203
+ // data block
204
+ } WNODE_SINGLE_INSTANCE, *PWNODE_SINGLE_INSTANCE;
205
+ #endif
206
+
207
+
208
+ #if defined(_MSC_EXTENSIONS)
209
+ typedef struct tagWNODE_SINGLE_ITEM
210
+ {
211
+ struct _WNODE_HEADER WnodeHeader;
212
+
213
+ // Offset from beginning of WNODE_SINGLE_INSTANCE
214
+ // to instance name. Examine when
215
+ // WNODE_FLAG_STATIC_INSTANCE_NAME is reset
216
+ // (Dynamic instance names)
217
+ ULONG OffsetInstanceName;
218
+
219
+ // Instance index when
220
+ // WNODE_FLAG_STATIC_INSTANCE_NAME
221
+ ULONG InstanceIndex; // set (Static Instance Names)
222
+
223
+ ULONG ItemId; // Item Id for data item being set
224
+
225
+ ULONG DataBlockOffset; // offset from WNODE begin to data item value
226
+ ULONG SizeDataItem; // Size of data item
227
+
228
+ UCHAR VariableData[];
229
+ // instance names and padding so data value begins on 8 byte boundary
230
+
231
+ // data item value
232
+ } WNODE_SINGLE_ITEM, *PWNODE_SINGLE_ITEM;
233
+ #endif
234
+
235
+ #if defined(_MSC_EXTENSIONS)
236
+ typedef struct tagWNODE_METHOD_ITEM
237
+ {
238
+ struct _WNODE_HEADER WnodeHeader;
239
+
240
+ // Offset from beginning of WNODE_METHOD_ITEM
241
+ // to instance name. Examine when
242
+ // WNODE_FLAG_STATIC_INSTANCE_NAME is reset
243
+ // (Dynamic instance names)
244
+ ULONG OffsetInstanceName;
245
+
246
+ // Instance index when
247
+ // WNODE_FLAG_STATIC_INSTANCE_NAME
248
+ ULONG InstanceIndex; // set (Static Instance Names)
249
+
250
+ ULONG MethodId; // Method id of method being called
251
+
252
+ ULONG DataBlockOffset; // On Entry: offset from WNODE to input data
253
+ // On Return: offset from WNODE to input and
254
+ // output data blocks
255
+ ULONG SizeDataBlock; // On Entry: Size of input data, 0 if no input
256
+ // data
257
+ // On Return: Size of output data, 0 if no output
258
+ // data
259
+
260
+ UCHAR VariableData[];
261
+ // instance names and padding so data value begins on 8 byte boundary
262
+
263
+ // data item value
264
+ } WNODE_METHOD_ITEM, *PWNODE_METHOD_ITEM;
265
+ #endif
266
+
267
+ typedef struct tagWNODE_EVENT_ITEM
268
+ {
269
+ struct _WNODE_HEADER WnodeHeader;
270
+
271
+ // Different data could be here depending upon the flags set in the
272
+ // WNODE_HEADER above. If the WNODE_FLAG_ALL_DATA flag is set then the
273
+ // contents of a WNODE_ALL_DATA (excluding WNODE_HEADER) is here. If the
274
+ // WNODE_FLAG_SINGLE_INSTANCE flag is set then a WNODE_SINGLE_INSTANCE
275
+ // (excluding WNODE_HEADER) is here. Lastly if the WNODE_FLAG_SINGLE_ITEM
276
+ // flag is set then a WNODE_SINGLE_ITEM (excluding WNODE_HEADER) is here.
277
+ } WNODE_EVENT_ITEM, *PWNODE_EVENT_ITEM;
278
+
279
+
280
+ //
281
+ // If a KM data provider needs to fire an event that is larger than the
282
+ // maximum size that WMI allows then it should fire a WNODE_EVENT_REFERENCE
283
+ // that specifies which guid and instance name to query for the actual data
284
+ // that should be part of the event.
285
+ #if defined(_MSC_EXTENSIONS)
286
+ typedef struct tagWNODE_EVENT_REFERENCE
287
+ {
288
+ struct _WNODE_HEADER WnodeHeader;
289
+ GUID TargetGuid;
290
+ ULONG TargetDataBlockSize;
291
+ union
292
+ {
293
+ ULONG TargetInstanceIndex;
294
+ WCHAR TargetInstanceName[];
295
+ } DUMMYUNIONNAME;
296
+ } WNODE_EVENT_REFERENCE, *PWNODE_EVENT_REFERENCE;
297
+ #endif
298
+
299
+
300
+ typedef struct tagWNODE_TOO_SMALL
301
+ {
302
+ struct _WNODE_HEADER WnodeHeader;
303
+ ULONG SizeNeeded; // Size needed to build WNODE result
304
+ } WNODE_TOO_SMALL, *PWNODE_TOO_SMALL;
305
+
306
+
307
+ typedef struct
308
+ {
309
+ GUID Guid; // Guid of data block being registered or updated
310
+ ULONG Flags; // Flags
311
+
312
+ ULONG InstanceCount; // Count of static instances names for the guid
313
+
314
+ union
315
+ {
316
+ // If WMIREG_FLAG_INSTANCE_LIST then this has the offset
317
+ // to a list of InstanceCount counted UNICODE
318
+ // strings placed end to end.
319
+ ULONG InstanceNameList;
320
+
321
+ // If WMIREG_FLAG_INSTANCE_BASENAME then this has the
322
+ // offset to a single counted UNICODE string that
323
+ // has the basename for the instance names.
324
+
325
+ ULONG BaseNameOffset;
326
+
327
+ // If WMIREG_FLAG_INSTANCE_PDO is set then InstanceInfo
328
+ // has the PDO whose device instance path will
329
+ // become the instance name
330
+ ULONG_PTR Pdo;
331
+
332
+ // If WMIREG_FLAG_INSTANCE_REFERENCE then this points to
333
+ // a WMIREGINSTANCEREF structure.
334
+
335
+ ULONG_PTR InstanceInfo;// Offset from beginning of the WMIREGINFO structure to
336
+ } DUMMYUNIONNAME;
337
+
338
+ } WMIREGGUIDW, *PWMIREGGUIDW;
339
+
340
+ typedef WMIREGGUIDW WMIREGGUID;
341
+ typedef PWMIREGGUIDW PWMIREGGUID;
342
+
343
+ // Set if collection must be enabled for the guid before the data provider
344
+ // can be queried for data.
345
+ #define WMIREG_FLAG_EXPENSIVE 0x00000001
346
+
347
+ // Set if instance names for this guid are specified in a static list within
348
+ // the WMIREGINFO
349
+ #define WMIREG_FLAG_INSTANCE_LIST 0x00000004
350
+
351
+ // Set if instance names are to be static and generated by WMI using a
352
+ // base name in the WMIREGINFO and an index
353
+ #define WMIREG_FLAG_INSTANCE_BASENAME 0x00000008
354
+
355
+ // Set if WMI should do automatic mapping of a PDO to device instance name
356
+ // as the instance name for the guid. This flag should only be used by
357
+ // kernel mode data providers.
358
+ #define WMIREG_FLAG_INSTANCE_PDO 0x00000020
359
+
360
+ // Note the flags WMIREG_FLAG_INSTANCE_LIST, WMIREG_FLAG_INSTANCE_BASENAME,
361
+ // WMIREG_FLAG_INSTANCE_REFERENCE and WMIREG_FLAG_INSTANCE_PDO are mutually
362
+ // exclusive.
363
+
364
+ //
365
+ // These flags are only valid in a response to WMI_GUID_REGUPDATE
366
+ #define WMIREG_FLAG_REMOVE_GUID 0x00010000 // Remove support for guid
367
+ #define WMIREG_FLAG_RESERVED1 0x00020000 // Reserved by WMI
368
+ #define WMIREG_FLAG_RESERVED2 0x00040000 // Reserved by WMI
369
+
370
+ // Set if guid is one that is written to trace log.
371
+ // This guid cannot be queried directly via WMI, but must be read using
372
+ // logger apis.
373
+ #define WMIREG_FLAG_TRACED_GUID 0x00080000
374
+
375
+ //
376
+ // Only those Trace Guids that have this bit set can receive
377
+ // Enable/Disable Notifications.
378
+ //
379
+ #define WMIREG_FLAG_TRACE_CONTROL_GUID 0x00001000
380
+
381
+ //
382
+ // Set if the guid is only used for firing events. Guids that can be queried
383
+ // and that fire events should not have this bit set.
384
+ #define WMIREG_FLAG_EVENT_ONLY_GUID 0x00000040
385
+
386
+ #if defined(_MSC_EXTENSIONS)
387
+ typedef struct
388
+ {
389
+ // Size of entire WMIREGINFO structure including this ULONG
390
+ // and any static instance names that follow
391
+ ULONG BufferSize;
392
+
393
+ ULONG NextWmiRegInfo; // Offset to next WMIREGINFO structure
394
+
395
+ ULONG RegistryPath; // Offset from beginning of WMIREGINFO structure to a
396
+ // counted Unicode string containing
397
+ // the driver registry path (under HKLM\CCS\Services)
398
+ // This must be filled only by kernel mode data
399
+ // providers
400
+
401
+ // Offset from beginning of WMIREGINFO structure to a
402
+ // counted Unicode string containing
403
+ // the name of resource in driver file containing MOF info
404
+ ULONG MofResourceName;
405
+
406
+ // Count of WMIREGGUID structures immediately following
407
+ ULONG GuidCount;
408
+ WMIREGGUIDW WmiRegGuid[]; // array of GuidCount WMIREGGUID structures
409
+ // Variable length data including :
410
+ // Instance Names
411
+ } WMIREGINFOW, *PWMIREGINFOW;
412
+
413
+ typedef WMIREGINFOW WMIREGINFO;
414
+ typedef PWMIREGINFOW PWMIREGINFO;
415
+ #endif
416
+
417
+ //
418
+ // WMI request codes
419
+ typedef enum
420
+ {
421
+ #ifndef _WMIKM_
422
+ WMI_GET_ALL_DATA = 0,
423
+ WMI_GET_SINGLE_INSTANCE = 1,
424
+ WMI_SET_SINGLE_INSTANCE = 2,
425
+ WMI_SET_SINGLE_ITEM = 3,
426
+ WMI_ENABLE_EVENTS = 4,
427
+ WMI_DISABLE_EVENTS = 5,
428
+ WMI_ENABLE_COLLECTION = 6,
429
+ WMI_DISABLE_COLLECTION = 7,
430
+ WMI_REGINFO = 8,
431
+ WMI_EXECUTE_METHOD = 9,
432
+ WMI_CAPTURE_STATE = 10
433
+ #endif
434
+ } WMIDPREQUESTCODE;
435
+
436
+ #if defined(_WINNT_) || defined(WINNT)
437
+ //
438
+ // WMI guid objects have the following rights
439
+ // WMIGUID_QUERY
440
+ // WMIGUID_SET
441
+ // WMIGUID_NOTIFICATION
442
+ // WMIGUID_READ_DESCRIPTION
443
+ // WMIGUID_EXECUTE
444
+ // TRACELOG_CREATE_REALTIME
445
+ // TRACELOG_CREATE_ONDISK
446
+ // TRACELOG_GUID_ENABLE
447
+ // TRACELOG_ACCESS_KERNEL_LOGGER
448
+ // TRACELOG_LOG_EVENT or TRACELOG_CREATE_INPROC
449
+ // TRACELOG_ACCESS_REALTIME
450
+ // TRACELOG_REGISTER_GUIDS
451
+ // TRACELOG_JOIN_GROUP
452
+
453
+ //
454
+ // GuidTypes
455
+ //
456
+ //#ifndef _WMIKM_
457
+ #define WMI_GUIDTYPE_TRACECONTROL 0
458
+ #define WMI_GUIDTYPE_TRACE 1
459
+ #define WMI_GUIDTYPE_DATA 2
460
+ #define WMI_GUIDTYPE_EVENT 3
461
+ //#endif
462
+
463
+ //
464
+ // Specific rights for WMI guid objects. These are available from 0x0001 to
465
+ // 0xffff (ie up to 16 rights)
466
+ //
467
+ #define WMIGUID_QUERY 0x0001
468
+ #define WMIGUID_SET 0x0002
469
+ #define WMIGUID_NOTIFICATION 0x0004
470
+ #define WMIGUID_READ_DESCRIPTION 0x0008
471
+ #define WMIGUID_EXECUTE 0x0010
472
+ #define TRACELOG_CREATE_REALTIME 0x0020
473
+ #define TRACELOG_CREATE_ONDISK 0x0040
474
+ #define TRACELOG_GUID_ENABLE 0x0080
475
+ #define TRACELOG_ACCESS_KERNEL_LOGGER 0x0100
476
+ #define TRACELOG_LOG_EVENT 0x0200 // used on Vista and greater
477
+ #define TRACELOG_CREATE_INPROC 0x0200 // used pre-Vista
478
+ #define TRACELOG_ACCESS_REALTIME 0x0400
479
+ #define TRACELOG_REGISTER_GUIDS 0x0800
480
+ #define TRACELOG_JOIN_GROUP 0x1000
481
+
482
+ #define WMIGUID_ALL_ACCESS_WIN2K (STANDARD_RIGHTS_READ | \
483
+ WMIGUID_QUERY | \
484
+ WMIGUID_SET | \
485
+ WMIGUID_NOTIFICATION | \
486
+ WMIGUID_READ_DESCRIPTION | \
487
+ WMIGUID_EXECUTE | \
488
+ TRACELOG_CREATE_REALTIME | \
489
+ TRACELOG_CREATE_ONDISK | \
490
+ TRACELOG_GUID_ENABLE | \
491
+ TRACELOG_ACCESS_KERNEL_LOGGER | \
492
+ TRACELOG_CREATE_INPROC | \
493
+ TRACELOG_ACCESS_REALTIME)
494
+
495
+ #define WMIGUID_ALL_ACCESS_WINXP (WMIGUID_ALL_ACCESS_WIN2K | \
496
+ SYNCHRONIZE | \
497
+ TRACELOG_REGISTER_GUIDS)
498
+
499
+ #define WMIGUID_ALL_ACCESS_RS1 (WMIGUID_ALL_ACCESS_WINXP | \
500
+ TRACELOG_JOIN_GROUP)
501
+
502
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
503
+
504
+ #define WMIGUID_ALL_ACCESS WMIGUID_ALL_ACCESS_RS1
505
+
506
+ #elif (NTDDI_VERSION >= NTDDI_WINXP)
507
+
508
+ #define WMIGUID_ALL_ACCESS WMIGUID_ALL_ACCESS_WINXP
509
+
510
+ #else
511
+
512
+ #define WMIGUID_ALL_ACCESS WMIGUID_ALL_ACCESS_WIN2K
513
+
514
+ #endif
515
+
516
+ #define WMI_GLOBAL_LOGGER_ID 0x0001
517
+ #endif
518
+
519
+ #if _MSC_VER >= 1200
520
+ #pragma warning(pop)
521
+ #else
522
+ #pragma warning(default: 4200) // nonstandard extension used : zero-sized array in struct/union
523
+ #pragma warning(default: 4201) // nonstandard extension used : nameless struct/union
524
+ #endif
525
+
526
+ #endif
527
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/wnnc.h ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <winapifamily.h>
2
+
3
+ /*++
4
+
5
+ Copyright (c) Microsoft Corporation. All rights reserved.
6
+
7
+ Module Name:
8
+
9
+ wnnc.h
10
+
11
+ Abstract:
12
+
13
+ This header provides the Windows Networking WNNC_NET definitions to winnetwk.h
14
+ and the IFS Kit.
15
+
16
+ Environment:
17
+
18
+ User Mode / Kernel Mode
19
+
20
+ Notes:
21
+
22
+ --*/
23
+
24
+ // begin_ntifs
25
+ #ifndef _WNNC_
26
+ #define _WNNC_
27
+
28
+ #pragma region Desktop Family or OneCore Family
29
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
30
+
31
+ //
32
+ // Network types
33
+ //
34
+
35
+ #define WNNC_NET_MSNET 0x00010000
36
+ #define WNNC_NET_SMB 0x00020000
37
+ #define WNNC_NET_NETWARE 0x00030000
38
+ #define WNNC_NET_VINES 0x00040000
39
+ #define WNNC_NET_10NET 0x00050000
40
+ #define WNNC_NET_LOCUS 0x00060000
41
+ #define WNNC_NET_SUN_PC_NFS 0x00070000
42
+ #define WNNC_NET_LANSTEP 0x00080000
43
+ #define WNNC_NET_9TILES 0x00090000
44
+ #define WNNC_NET_LANTASTIC 0x000A0000
45
+ #define WNNC_NET_AS400 0x000B0000
46
+ #define WNNC_NET_FTP_NFS 0x000C0000
47
+ #define WNNC_NET_PATHWORKS 0x000D0000
48
+ #define WNNC_NET_LIFENET 0x000E0000
49
+ #define WNNC_NET_POWERLAN 0x000F0000
50
+ #define WNNC_NET_BWNFS 0x00100000
51
+ #define WNNC_NET_COGENT 0x00110000
52
+ #define WNNC_NET_FARALLON 0x00120000
53
+ #define WNNC_NET_APPLETALK 0x00130000
54
+ #define WNNC_NET_INTERGRAPH 0x00140000
55
+ #define WNNC_NET_SYMFONET 0x00150000
56
+ #define WNNC_NET_CLEARCASE 0x00160000
57
+ #define WNNC_NET_FRONTIER 0x00170000
58
+ #define WNNC_NET_BMC 0x00180000
59
+ #define WNNC_NET_DCE 0x00190000
60
+ #define WNNC_NET_AVID 0x001A0000
61
+ #define WNNC_NET_DOCUSPACE 0x001B0000
62
+ #define WNNC_NET_MANGOSOFT 0x001C0000
63
+ #define WNNC_NET_SERNET 0x001D0000
64
+ #define WNNC_NET_RIVERFRONT1 0X001E0000
65
+ #define WNNC_NET_RIVERFRONT2 0x001F0000
66
+ #define WNNC_NET_DECORB 0x00200000
67
+ #define WNNC_NET_PROTSTOR 0x00210000
68
+ #define WNNC_NET_FJ_REDIR 0x00220000
69
+ #define WNNC_NET_DISTINCT 0x00230000
70
+ #define WNNC_NET_TWINS 0x00240000
71
+ #define WNNC_NET_RDR2SAMPLE 0x00250000
72
+ #define WNNC_NET_CSC 0x00260000
73
+ #define WNNC_NET_3IN1 0x00270000
74
+ #define WNNC_NET_EXTENDNET 0x00290000
75
+ #define WNNC_NET_STAC 0x002A0000
76
+ #define WNNC_NET_FOXBAT 0x002B0000
77
+ #define WNNC_NET_YAHOO 0x002C0000
78
+ #define WNNC_NET_EXIFS 0x002D0000
79
+ #define WNNC_NET_DAV 0x002E0000
80
+ #define WNNC_NET_KNOWARE 0x002F0000
81
+ #define WNNC_NET_OBJECT_DIRE 0x00300000
82
+ #define WNNC_NET_MASFAX 0x00310000
83
+ #define WNNC_NET_HOB_NFS 0x00320000
84
+ #define WNNC_NET_SHIVA 0x00330000
85
+ #define WNNC_NET_IBMAL 0x00340000
86
+ #define WNNC_NET_LOCK 0x00350000
87
+ #define WNNC_NET_TERMSRV 0x00360000
88
+ #define WNNC_NET_SRT 0x00370000
89
+ #define WNNC_NET_QUINCY 0x00380000
90
+ #define WNNC_NET_OPENAFS 0x00390000
91
+ #define WNNC_NET_AVID1 0X003A0000
92
+ #define WNNC_NET_DFS 0x003B0000
93
+ #define WNNC_NET_KWNP 0x003C0000
94
+ #define WNNC_NET_ZENWORKS 0x003D0000
95
+ #define WNNC_NET_DRIVEONWEB 0x003E0000
96
+ #define WNNC_NET_VMWARE 0x003F0000
97
+ #define WNNC_NET_RSFX 0x00400000
98
+ #define WNNC_NET_MFILES 0x00410000
99
+ #define WNNC_NET_MS_NFS 0x00420000
100
+ #define WNNC_NET_GOOGLE 0x00430000
101
+ #define WNNC_NET_NDFS 0x00440000
102
+ #define WNNC_NET_DOCUSHARE 0x00450000
103
+ #define WNNC_NET_AURISTOR_FS 0x00460000
104
+ #define WNNC_NET_SECUREAGENT 0x00470000
105
+ #define WNNC_NET_9P 0x00480000
106
+
107
+ #define WNNC_CRED_MANAGER 0xFFFF0000
108
+
109
+ //
110
+ // Network type aliases
111
+ //
112
+
113
+ #define WNNC_NET_LANMAN WNNC_NET_SMB
114
+
115
+
116
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
117
+ #pragma endregion
118
+
119
+ #endif // _WNNC_
120
+ // end_ntifs
121
+
122
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/ws2def.h ADDED
@@ -0,0 +1,1245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ ws2def.h
8
+
9
+ Abstract:
10
+
11
+ This file contains the core definitions for the Winsock2
12
+ specification that can be used by both user-mode and
13
+ kernel mode modules.
14
+
15
+ This file is included in WINSOCK2.H. User mode applications
16
+ should include WINSOCK2.H rather than including this file
17
+ directly. This file can not be included by a module that also
18
+ includes WINSOCK.H.
19
+
20
+ Environment:
21
+
22
+ user mode or kernel mode
23
+
24
+ --*/
25
+
26
+ #ifndef _WS2DEF_
27
+ #define _WS2DEF_
28
+
29
+ #if _MSC_VER > 1000
30
+ #pragma once
31
+ #endif
32
+ #include <winapifamily.h>
33
+
34
+ #if !defined(_WINSOCK_DEPRECATED_BY)
35
+ #if ((defined(_WINSOCK_DEPRECATED_NO_WARNINGS) || defined(BUILD_WINDOWS)) && !defined(_WINSOCK_DEPRECATE_WARNINGS)) || defined(MIDL_PASS)
36
+ #define _WINSOCK_DEPRECATED_BY(replacement)
37
+ #else
38
+ #define _WINSOCK_DEPRECATED_BY(replacement) __declspec(deprecated("Use " replacement " instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings"))
39
+ #endif
40
+ #endif
41
+
42
+ #ifdef __cplusplus
43
+ extern "C" {
44
+ #endif
45
+
46
+ #if !defined(_WINSOCK2API_) && defined(_WINSOCKAPI_)
47
+ #error Do not include winsock.h and ws2def.h in the same module. Instead include only winsock2.h.
48
+ #endif
49
+
50
+ #pragma warning(push)
51
+ #pragma warning(disable:4201)
52
+ #pragma warning(disable:4214) // bit field types other than int
53
+
54
+ //
55
+ // Allow Winsock components to disable PREfast errors.
56
+ //
57
+
58
+ #if defined(_PREFAST_) && defined(IPV6_PREFAST_SAFE)
59
+ #include <ipv6prefast.h>
60
+ #endif // _PREFAST_
61
+
62
+ #if(_WIN32_WINNT >= 0x0600)
63
+
64
+ #ifdef _MSC_VER
65
+ #define WS2DEF_INLINE __inline
66
+ #else
67
+ #define WS2DEF_INLINE extern inline /* GNU style */
68
+ #endif
69
+
70
+ #endif//(_WIN32_WINNT >= 0x0600)
71
+
72
+ #include <inaddr.h>
73
+
74
+ //#if(_WIN32_WINNT >= 0x0600)
75
+
76
+ #pragma region Desktop Family or OneCore Family or Games Family
77
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
78
+ //
79
+ // Address families.
80
+ //
81
+ typedef USHORT ADDRESS_FAMILY;
82
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
83
+ #pragma endregion
84
+
85
+ //#endif//(_WIN32_WINNT >= 0x0600)
86
+
87
+ //
88
+ // Although AF_UNSPEC is defined for backwards compatibility, using
89
+ // AF_UNSPEC for the "af" parameter when creating a socket is STRONGLY
90
+ // DISCOURAGED. The interpretation of the "protocol" parameter
91
+ // depends on the actual address family chosen. As environments grow
92
+ // to include more and more address families that use overlapping
93
+ // protocol values there is more and more chance of choosing an
94
+ // undesired address family when AF_UNSPEC is used.
95
+ //
96
+ #define AF_UNSPEC 0 // unspecified
97
+ #define AF_UNIX 1 // local to host (pipes, portals)
98
+ #define AF_INET 2 // internetwork: UDP, TCP, etc.
99
+ #define AF_IMPLINK 3 // arpanet imp addresses
100
+ #define AF_PUP 4 // pup protocols: e.g. BSP
101
+ #define AF_CHAOS 5 // mit CHAOS protocols
102
+ #define AF_NS 6 // XEROX NS protocols
103
+ #define AF_IPX AF_NS // IPX protocols: IPX, SPX, etc.
104
+ #define AF_ISO 7 // ISO protocols
105
+ #define AF_OSI AF_ISO // OSI is ISO
106
+ #define AF_ECMA 8 // european computer manufacturers
107
+ #define AF_DATAKIT 9 // datakit protocols
108
+ #define AF_CCITT 10 // CCITT protocols, X.25 etc
109
+ #define AF_SNA 11 // IBM SNA
110
+ #define AF_DECnet 12 // DECnet
111
+ #define AF_DLI 13 // Direct data link interface
112
+ #define AF_LAT 14 // LAT
113
+ #define AF_HYLINK 15 // NSC Hyperchannel
114
+ #define AF_APPLETALK 16 // AppleTalk
115
+ #define AF_NETBIOS 17 // NetBios-style addresses
116
+ #define AF_VOICEVIEW 18 // VoiceView
117
+ #define AF_FIREFOX 19 // Protocols from Firefox
118
+ #define AF_UNKNOWN1 20 // Somebody is using this!
119
+ #define AF_BAN 21 // Banyan
120
+ #define AF_ATM 22 // Native ATM Services
121
+ #define AF_INET6 23 // Internetwork Version 6
122
+ #define AF_CLUSTER 24 // Microsoft Wolfpack
123
+ #define AF_12844 25 // IEEE 1284.4 WG AF
124
+ #define AF_IRDA 26 // IrDA
125
+ #define AF_NETDES 28 // Network Designers OSI & gateway
126
+
127
+ #if(_WIN32_WINNT < 0x0501)
128
+ #define AF_MAX 29
129
+ #else //(_WIN32_WINNT < 0x0501)
130
+
131
+ #define AF_TCNPROCESS 29
132
+ #define AF_TCNMESSAGE 30
133
+ #define AF_ICLFXBM 31
134
+
135
+ #if(_WIN32_WINNT < 0x0600)
136
+ #define AF_MAX 32
137
+ #else //(_WIN32_WINNT < 0x0600)
138
+ #define AF_BTH 32 // Bluetooth RFCOMM/L2CAP protocols
139
+ #if(_WIN32_WINNT < 0x0601)
140
+ #define AF_MAX 33
141
+ #else //(_WIN32_WINNT < 0x0601)
142
+ #define AF_LINK 33
143
+ #if(_WIN32_WINNT < 0x0604)
144
+ #define AF_MAX 34
145
+ #else //(_WIN32_WINNT < 0x0604)
146
+ #define AF_HYPERV 34
147
+ #define AF_MAX 35
148
+ #endif //(_WIN32_WINNT < 0x0604)
149
+ #endif //(_WIN32_WINNT < 0x0601)
150
+ #endif //(_WIN32_WINNT < 0x0600)
151
+
152
+ #endif //(_WIN32_WINNT < 0x0501)
153
+
154
+ //
155
+ // Socket types.
156
+ //
157
+
158
+ #define SOCK_STREAM 1
159
+ #define SOCK_DGRAM 2
160
+ #define SOCK_RAW 3
161
+ #define SOCK_RDM 4
162
+ #define SOCK_SEQPACKET 5
163
+
164
+ //
165
+ // Define a level for socket I/O controls in the same numbering space as
166
+ // IPPROTO_TCP, IPPROTO_IP, etc.
167
+ //
168
+
169
+ #define SOL_SOCKET 0xffff
170
+ #define SOL_IP (SOL_SOCKET-4)
171
+ #define SOL_IPV6 (SOL_SOCKET-5)
172
+
173
+ //
174
+ // Define socket-level options.
175
+ //
176
+
177
+ #define SO_DEBUG 0x0001 // turn on debugging info recording
178
+ #define SO_ACCEPTCONN 0x0002 // socket has had listen()
179
+ #define SO_REUSEADDR 0x0004 // allow local address reuse
180
+ #define SO_KEEPALIVE 0x0008 // keep connections alive
181
+ #define SO_DONTROUTE 0x0010 // just use interface addresses
182
+ #define SO_BROADCAST 0x0020 // permit sending of broadcast msgs
183
+ #define SO_USELOOPBACK 0x0040 // bypass hardware when possible
184
+ #define SO_LINGER 0x0080 // linger on close if data present
185
+ #define SO_OOBINLINE 0x0100 // leave received OOB data in line
186
+
187
+ #define SO_DONTLINGER (int)(~SO_LINGER)
188
+ #define SO_EXCLUSIVEADDRUSE \
189
+ ((int)(~SO_REUSEADDR)) // disallow local address reuse
190
+
191
+ #define SO_SNDBUF 0x1001 // send buffer size
192
+ #define SO_RCVBUF 0x1002 // receive buffer size
193
+ #define SO_SNDLOWAT 0x1003 // send low-water mark
194
+ #define SO_RCVLOWAT 0x1004 // receive low-water mark
195
+ #define SO_SNDTIMEO 0x1005 // send timeout
196
+ #define SO_RCVTIMEO 0x1006 // receive timeout
197
+ #define SO_ERROR 0x1007 // get error status and clear
198
+ #define SO_TYPE 0x1008 // get socket type
199
+ #define SO_BSP_STATE 0x1009 // get socket 5-tuple state
200
+
201
+ #define SO_GROUP_ID 0x2001 // ID of a socket group
202
+ #define SO_GROUP_PRIORITY 0x2002 // the relative priority within a group
203
+ #define SO_MAX_MSG_SIZE 0x2003 // maximum message size
204
+
205
+ #define SO_CONDITIONAL_ACCEPT 0x3002 // enable true conditional accept:
206
+ // connection is not ack-ed to the
207
+ // other side until conditional
208
+ // function returns CF_ACCEPT
209
+ #define SO_PAUSE_ACCEPT 0x3003 // pause accepting new connections
210
+ #define SO_COMPARTMENT_ID 0x3004 // get/set the compartment for a socket
211
+ #if (_WIN32_WINNT >= 0x0600)
212
+ #define SO_RANDOMIZE_PORT 0x3005 // randomize assignment of wildcard ports
213
+ #define SO_PORT_SCALABILITY 0x3006 // enable port scalability
214
+ #define SO_REUSE_UNICASTPORT 0x3007 // defer ephemeral port allocation for
215
+ // outbound connections
216
+ #define SO_REUSE_MULTICASTPORT 0x3008 // enable port reuse and disable unicast
217
+ //reception.
218
+ #define SO_ORIGINAL_DST 0x300F // Query the original destination address
219
+ // of a redirected connection.
220
+ #define IP6T_SO_ORIGINAL_DST SO_ORIGINAL_DST
221
+ #endif //(_WIN32_WINNT >= 0x0600)
222
+
223
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
224
+ #define SO_RECEIVED_HOPLIMIT 0x3010
225
+ #define SO_RECEIVED_PROCESSOR 0x3011 // Receive the processor number packets
226
+ // have been processed by
227
+ #endif // NTDDI_VERSION >= NTDDI_WIN11_GE
228
+
229
+ //
230
+ // Base constant used for defining WSK-specific options.
231
+ //
232
+
233
+ #define WSK_SO_BASE 0x4000
234
+
235
+ //
236
+ // Options to use with [gs]etsockopt at the IPPROTO_TCP level.
237
+ //
238
+
239
+ #define TCP_NODELAY 0x0001
240
+
241
+ #pragma region Desktop Family or OneCore Family or Games Family
242
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
243
+ //
244
+ // Structure used to store most addresses.
245
+ //
246
+ typedef struct sockaddr {
247
+
248
+ #if (_WIN32_WINNT < 0x0600)
249
+ u_short sa_family;
250
+ #else
251
+ ADDRESS_FAMILY sa_family; // Address family.
252
+ #endif //(_WIN32_WINNT < 0x0600)
253
+
254
+ CHAR sa_data[14]; // Up to 14 bytes of direct address.
255
+ } SOCKADDR, *PSOCKADDR, FAR *LPSOCKADDR;
256
+
257
+ #ifndef __CSADDR_DEFINED__
258
+ #define __CSADDR_DEFINED__
259
+
260
+
261
+ /*
262
+ * SockAddr Information
263
+ */
264
+ typedef struct _SOCKET_ADDRESS {
265
+ _Field_size_bytes_(iSockaddrLength) LPSOCKADDR lpSockaddr;
266
+
267
+ // ESP: 791.
268
+ // _When_(
269
+ // lpSockaddr->sa_family == AF_INET,
270
+ // _Field_range_(>=, sizeof(SOCKADDR_IN)))
271
+ // _When_(
272
+ // lpSockaddr->sa_family == AF_INET6,
273
+ // _Field_range_(>=, sizeof(SOCKADDR_IN6)))
274
+ INT iSockaddrLength;
275
+ } SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS;
276
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
277
+ #pragma endregion
278
+
279
+ /*
280
+ * Address list returned via SIO_ADDRESS_LIST_QUERY
281
+ */
282
+ typedef struct _SOCKET_ADDRESS_LIST {
283
+ INT iAddressCount;
284
+ SOCKET_ADDRESS Address[1];
285
+ } SOCKET_ADDRESS_LIST, *PSOCKET_ADDRESS_LIST, FAR *LPSOCKET_ADDRESS_LIST;
286
+
287
+ #if (_WIN32_WINNT >= 0x0600)
288
+
289
+ #define SIZEOF_SOCKET_ADDRESS_LIST(AddressCount) \
290
+ (FIELD_OFFSET(SOCKET_ADDRESS_LIST, Address) + \
291
+ AddressCount * sizeof(SOCKET_ADDRESS))
292
+
293
+ #endif //(_WIN32_WINNT >= 0x0600)
294
+
295
+ /*
296
+ * CSAddr Information
297
+ */
298
+ typedef struct _CSADDR_INFO {
299
+ SOCKET_ADDRESS LocalAddr ;
300
+ SOCKET_ADDRESS RemoteAddr ;
301
+ INT iSocketType ;
302
+ INT iProtocol ;
303
+ } CSADDR_INFO, *PCSADDR_INFO, FAR * LPCSADDR_INFO ;
304
+ #endif /* __CSADDR_DEFINED__ */
305
+
306
+ //
307
+ // Portable socket structure (RFC 2553).
308
+ //
309
+
310
+ //
311
+ // Desired design of maximum size and alignment.
312
+ // These are implementation specific.
313
+ //
314
+ #define _SS_MAXSIZE 128 // Maximum size
315
+ #define _SS_ALIGNSIZE (sizeof(__int64)) // Desired alignment
316
+
317
+ //
318
+ // Definitions used for sockaddr_storage structure paddings design.
319
+ //
320
+
321
+ #if(_WIN32_WINNT >= 0x0600)
322
+ #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(USHORT))
323
+ #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(USHORT) + _SS_PAD1SIZE + _SS_ALIGNSIZE))
324
+ #else
325
+ #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (short))
326
+ #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (short) + _SS_PAD1SIZE \
327
+ + _SS_ALIGNSIZE))
328
+ #endif //(_WIN32_WINNT >= 0x0600)
329
+
330
+ typedef struct sockaddr_storage {
331
+ ADDRESS_FAMILY ss_family; // address family
332
+
333
+ CHAR __ss_pad1[_SS_PAD1SIZE]; // 6 byte pad, this is to make
334
+ // implementation specific pad up to
335
+ // alignment field that follows explicit
336
+ // in the data structure
337
+ __int64 __ss_align; // Field to force desired structure
338
+ CHAR __ss_pad2[_SS_PAD2SIZE]; // 112 byte pad to achieve desired size;
339
+ // _SS_MAXSIZE value minus size of
340
+ // ss_family, __ss_pad1, and
341
+ // __ss_align fields is 112
342
+ } SOCKADDR_STORAGE_LH, *PSOCKADDR_STORAGE_LH, FAR *LPSOCKADDR_STORAGE_LH;
343
+
344
+ #pragma region Desktop Family
345
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
346
+ typedef struct sockaddr_storage_xp {
347
+ short ss_family; // Address family.
348
+
349
+ CHAR __ss_pad1[_SS_PAD1SIZE]; // 6 byte pad, this is to make
350
+ // implementation specific pad up to
351
+ // alignment field that follows explicit
352
+ // in the data structure
353
+ __int64 __ss_align; // Field to force desired structure
354
+ CHAR __ss_pad2[_SS_PAD2SIZE]; // 112 byte pad to achieve desired size;
355
+ // _SS_MAXSIZE value minus size of
356
+ // ss_family, __ss_pad1, and
357
+ // __ss_align fields is 112
358
+ } SOCKADDR_STORAGE_XP, *PSOCKADDR_STORAGE_XP, FAR *LPSOCKADDR_STORAGE_XP;
359
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
360
+ #pragma endregion
361
+
362
+ #if(_WIN32_WINNT >= 0x0600)
363
+ typedef SOCKADDR_STORAGE_LH SOCKADDR_STORAGE;
364
+ typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
365
+ #elif (_WIN32_WINNT >= 0x0501)
366
+ typedef SOCKADDR_STORAGE_XP SOCKADDR_STORAGE;
367
+ typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
368
+ #endif
369
+
370
+ #if(_WIN32_WINNT >= 0x0602)
371
+ typedef struct _SOCKET_PROCESSOR_AFFINITY {
372
+ PROCESSOR_NUMBER Processor;
373
+ USHORT NumaNodeId;
374
+ USHORT Reserved;
375
+ } SOCKET_PROCESSOR_AFFINITY, *PSOCKET_PROCESSOR_AFFINITY;
376
+ #endif //(_WIN32_WINNT >= 0x0602)
377
+
378
+
379
+ /*
380
+ * WinSock 2 extension -- manifest constants for WSAIoctl()
381
+ */
382
+ #define IOC_UNIX 0x00000000
383
+ #define IOC_WS2 0x08000000
384
+ #define IOC_PROTOCOL 0x10000000
385
+ #define IOC_VENDOR 0x18000000
386
+
387
+ #if (_WIN32_WINNT >= 0x0600)
388
+ /*
389
+ * WSK-specific IO control codes are Winsock2 codes with the highest-order
390
+ * 3 bits of the Vendor/AddressFamily-specific field set to 1.
391
+ */
392
+ #define IOC_WSK (IOC_WS2|0x07000000)
393
+ #endif //(_WIN32_WINNT >= 0x0600)
394
+
395
+ #define _WSAIO(x,y) (IOC_VOID|(x)|(y))
396
+ #define _WSAIOR(x,y) (IOC_OUT|(x)|(y))
397
+ #define _WSAIOW(x,y) (IOC_IN|(x)|(y))
398
+ #define _WSAIORW(x,y) (IOC_INOUT|(x)|(y))
399
+
400
+ #define SIO_ASSOCIATE_HANDLE _WSAIOW(IOC_WS2,1)
401
+ #define SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(IOC_WS2,2)
402
+ #define SIO_FIND_ROUTE _WSAIOR(IOC_WS2,3)
403
+ #define SIO_FLUSH _WSAIO(IOC_WS2,4)
404
+ #define SIO_GET_BROADCAST_ADDRESS _WSAIOR(IOC_WS2,5)
405
+ #define SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(IOC_WS2,6)
406
+ #define SIO_GET_QOS _WSAIORW(IOC_WS2,7)
407
+ #define SIO_GET_GROUP_QOS _WSAIORW(IOC_WS2,8)
408
+ #define SIO_MULTIPOINT_LOOPBACK _WSAIOW(IOC_WS2,9)
409
+ #define SIO_MULTICAST_SCOPE _WSAIOW(IOC_WS2,10)
410
+ #define SIO_SET_QOS _WSAIOW(IOC_WS2,11)
411
+ #define SIO_SET_GROUP_QOS _WSAIOW(IOC_WS2,12)
412
+ #define SIO_TRANSLATE_HANDLE _WSAIORW(IOC_WS2,13)
413
+ #define SIO_ROUTING_INTERFACE_QUERY _WSAIORW(IOC_WS2,20)
414
+ #define SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(IOC_WS2,21)
415
+ #define SIO_ADDRESS_LIST_QUERY _WSAIOR(IOC_WS2,22)
416
+ #define SIO_ADDRESS_LIST_CHANGE _WSAIO(IOC_WS2,23)
417
+ #define SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(IOC_WS2,24)
418
+ #define SIO_QUERY_RSS_PROCESSOR_INFO _WSAIOR(IOC_WS2,37)
419
+
420
+ #if(_WIN32_WINNT >= 0x0501)
421
+ #define SIO_ADDRESS_LIST_SORT _WSAIORW(IOC_WS2,25)
422
+ #endif //(_WIN32_WINNT >= 0x0501)
423
+
424
+ #if (_WIN32_WINNT >= 0x0600)
425
+ #define SIO_RESERVED_1 _WSAIOW(IOC_WS2,26)
426
+ #define SIO_RESERVED_2 _WSAIOW(IOC_WS2,33)
427
+ #endif //(_WIN32_WINNT >= 0x0600)
428
+
429
+ #define SIO_GET_MULTIPLE_EXTENSION_FUNCTION_POINTER _WSAIORW(IOC_WS2,36)
430
+
431
+ //
432
+ // Constants and structures defined by the internet system (RFC 790)
433
+ //
434
+
435
+ //
436
+ // N.B. required for backwards compatability to support 0 = IP for the
437
+ // level argument to get/setsockopt.
438
+ //
439
+ #define IPPROTO_IP 0
440
+
441
+ //
442
+ // Protocols. The IPv6 defines are specified in RFC 2292.
443
+ //
444
+ typedef enum {
445
+ #if(_WIN32_WINNT >= 0x0501)
446
+ IPPROTO_HOPOPTS = 0, // IPv6 Hop-by-Hop options
447
+ #endif//(_WIN32_WINNT >= 0x0501)
448
+ IPPROTO_ICMP = 1,
449
+ IPPROTO_IGMP = 2,
450
+ IPPROTO_GGP = 3,
451
+ #if(_WIN32_WINNT >= 0x0501)
452
+ IPPROTO_IPV4 = 4,
453
+ #endif//(_WIN32_WINNT >= 0x0501)
454
+ #if(_WIN32_WINNT >= 0x0600)
455
+ IPPROTO_ST = 5,
456
+ #endif//(_WIN32_WINNT >= 0x0600)
457
+ IPPROTO_TCP = 6,
458
+ #if(_WIN32_WINNT >= 0x0600)
459
+ IPPROTO_CBT = 7,
460
+ IPPROTO_EGP = 8,
461
+ IPPROTO_IGP = 9,
462
+ #endif//(_WIN32_WINNT >= 0x0600)
463
+ IPPROTO_PUP = 12,
464
+ IPPROTO_UDP = 17,
465
+ IPPROTO_IDP = 22,
466
+ #if(_WIN32_WINNT >= 0x0600)
467
+ IPPROTO_RDP = 27,
468
+ #endif//(_WIN32_WINNT >= 0x0600)
469
+
470
+ #if(_WIN32_WINNT >= 0x0501)
471
+ IPPROTO_IPV6 = 41, // IPv6 header
472
+ IPPROTO_ROUTING = 43, // IPv6 Routing header
473
+ IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header
474
+ IPPROTO_ESP = 50, // encapsulating security payload
475
+ IPPROTO_AH = 51, // authentication header
476
+ IPPROTO_ICMPV6 = 58, // ICMPv6
477
+ IPPROTO_NONE = 59, // IPv6 no next header
478
+ IPPROTO_DSTOPTS = 60, // IPv6 Destination options
479
+ #endif//(_WIN32_WINNT >= 0x0501)
480
+
481
+ IPPROTO_ND = 77,
482
+ #if(_WIN32_WINNT >= 0x0501)
483
+ IPPROTO_ICLFXBM = 78,
484
+ #endif//(_WIN32_WINNT >= 0x0501)
485
+ #if(_WIN32_WINNT >= 0x0600)
486
+ IPPROTO_PIM = 103,
487
+ IPPROTO_PGM = 113,
488
+ IPPROTO_L2TP = 115,
489
+ IPPROTO_SCTP = 132,
490
+ #endif//(_WIN32_WINNT >= 0x0600)
491
+ IPPROTO_RAW = 255,
492
+
493
+ IPPROTO_MAX = 256,
494
+ //
495
+ // These are reserved for internal use by Windows.
496
+ //
497
+ IPPROTO_RESERVED_RAW = 257,
498
+ IPPROTO_RESERVED_IPSEC = 258,
499
+ IPPROTO_RESERVED_IPSECOFFLOAD = 259,
500
+ IPPROTO_RESERVED_WNV = 260,
501
+ IPPROTO_RESERVED_MAX = 261
502
+ } IPPROTO, *PIPROTO;
503
+
504
+ //
505
+ // Port/socket numbers: network standard functions
506
+ //
507
+ #define IPPORT_TCPMUX 1
508
+ #define IPPORT_ECHO 7
509
+ #define IPPORT_DISCARD 9
510
+ #define IPPORT_SYSTAT 11
511
+ #define IPPORT_DAYTIME 13
512
+ #define IPPORT_NETSTAT 15
513
+ #define IPPORT_QOTD 17
514
+ #define IPPORT_MSP 18
515
+ #define IPPORT_CHARGEN 19
516
+ #define IPPORT_FTP_DATA 20
517
+ #define IPPORT_FTP 21
518
+ #define IPPORT_TELNET 23
519
+ #define IPPORT_SMTP 25
520
+ #define IPPORT_TIMESERVER 37
521
+ #define IPPORT_NAMESERVER 42
522
+ #define IPPORT_WHOIS 43
523
+ #define IPPORT_MTP 57
524
+
525
+ /*
526
+ * Port/socket numbers: host specific functions
527
+ */
528
+ #define IPPORT_TFTP 69
529
+ #define IPPORT_RJE 77
530
+ #define IPPORT_FINGER 79
531
+ #define IPPORT_TTYLINK 87
532
+ #define IPPORT_SUPDUP 95
533
+
534
+ /*
535
+ * UNIX TCP sockets
536
+ */
537
+ #define IPPORT_POP3 110
538
+ #define IPPORT_NTP 123
539
+ #define IPPORT_EPMAP 135
540
+ #define IPPORT_NETBIOS_NS 137
541
+ #define IPPORT_NETBIOS_DGM 138
542
+ #define IPPORT_NETBIOS_SSN 139
543
+ #define IPPORT_IMAP 143
544
+ #define IPPORT_SNMP 161
545
+ #define IPPORT_SNMP_TRAP 162
546
+ #define IPPORT_IMAP3 220
547
+ #define IPPORT_LDAP 389
548
+ #define IPPORT_HTTPS 443
549
+ #define IPPORT_MICROSOFT_DS 445
550
+ #define IPPORT_EXECSERVER 512
551
+ #define IPPORT_LOGINSERVER 513
552
+ #define IPPORT_CMDSERVER 514
553
+ #define IPPORT_EFSSERVER 520
554
+
555
+ /*
556
+ * UNIX UDP sockets
557
+ */
558
+ #define IPPORT_BIFFUDP 512
559
+ #define IPPORT_WHOSERVER 513
560
+ #define IPPORT_ROUTESERVER 520
561
+ /* 520+1 also used */
562
+
563
+ /*
564
+ * Ports < IPPORT_RESERVED are reserved for
565
+ * privileged processes (e.g. root).
566
+ */
567
+ #define IPPORT_RESERVED 1024
568
+ #if (_WIN32_WINNT >= 0x0600)
569
+ #define IPPORT_REGISTERED_MIN IPPORT_RESERVED
570
+ #define IPPORT_REGISTERED_MAX 0xbfff
571
+ #define IPPORT_DYNAMIC_MIN 0xc000
572
+ #define IPPORT_DYNAMIC_MAX 0xffff
573
+ #endif //(_WIN32_WINNT >= 0x0600)
574
+
575
+ /*
576
+ * Definitions of bits in internet address integers.
577
+ * On subnets, the decomposition of addresses to host and net parts
578
+ * is done according to subnet mask, not the masks here.
579
+ *
580
+ * N.B. RFC-compliant definitions for host-order elements are named IN_xxx,
581
+ * while network-order elements are named IN4_xxx.
582
+ */
583
+ #define IN_CLASSA(i) (((LONG)(i) & 0x80000000) == 0)
584
+ #define IN_CLASSA_NET 0xff000000
585
+ #define IN_CLASSA_NSHIFT 24
586
+ #define IN_CLASSA_HOST 0x00ffffff
587
+ #define IN_CLASSA_MAX 128
588
+
589
+ #define IN_CLASSB(i) (((LONG)(i) & 0xc0000000) == 0x80000000)
590
+ #define IN_CLASSB_NET 0xffff0000
591
+ #define IN_CLASSB_NSHIFT 16
592
+ #define IN_CLASSB_HOST 0x0000ffff
593
+ #define IN_CLASSB_MAX 65536
594
+
595
+ #define IN_CLASSC(i) (((LONG)(i) & 0xe0000000) == 0xc0000000)
596
+ #define IN_CLASSC_NET 0xffffff00
597
+ #define IN_CLASSC_NSHIFT 8
598
+ #define IN_CLASSC_HOST 0x000000ff
599
+
600
+ #define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
601
+ #define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
602
+ #define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
603
+ #define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
604
+ #define IN_MULTICAST(i) IN_CLASSD(i)
605
+
606
+ #define INADDR_ANY (ULONG)0x00000000
607
+ #define INADDR_LOOPBACK 0x7f000001
608
+ #define INADDR_BROADCAST (ULONG)0xffffffff
609
+ #define INADDR_NONE 0xffffffff
610
+
611
+ #pragma region Desktop Family or OneCore Family or Games Family
612
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
613
+
614
+ //
615
+ // Scope ID definition
616
+ //
617
+ typedef enum {
618
+ ScopeLevelInterface = 1,
619
+ ScopeLevelLink = 2,
620
+ ScopeLevelSubnet = 3,
621
+ ScopeLevelAdmin = 4,
622
+ ScopeLevelSite = 5,
623
+ ScopeLevelOrganization = 8,
624
+ ScopeLevelGlobal = 14,
625
+ ScopeLevelCount = 16
626
+ } SCOPE_LEVEL;
627
+
628
+ typedef struct {
629
+ union {
630
+ struct {
631
+ ULONG Zone : 28;
632
+ ULONG Level : 4;
633
+ } DUMMYSTRUCTNAME;
634
+ ULONG Value;
635
+ } DUMMYUNIONNAME;
636
+ } SCOPE_ID, *PSCOPE_ID;
637
+
638
+ #define SCOPEID_UNSPECIFIED_INIT { 0 }
639
+
640
+ //
641
+ // IPv4 Socket address, Internet style
642
+ //
643
+
644
+ typedef struct sockaddr_in {
645
+
646
+ #if(_WIN32_WINNT < 0x0600)
647
+ short sin_family;
648
+ #else //(_WIN32_WINNT < 0x0600)
649
+ ADDRESS_FAMILY sin_family;
650
+ #endif //(_WIN32_WINNT < 0x0600)
651
+
652
+ USHORT sin_port;
653
+ IN_ADDR sin_addr;
654
+ CHAR sin_zero[8];
655
+ } SOCKADDR_IN, *PSOCKADDR_IN;
656
+
657
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
658
+ #pragma endregion
659
+
660
+ //
661
+ // Datalink (MAC) address
662
+ //
663
+ // If you don't use the entire sdl_data field, then fill it starting with the low
664
+ // bytes...
665
+ //
666
+
667
+ #if(_WIN32_WINNT >= 0x0601)
668
+
669
+ typedef struct sockaddr_dl {
670
+ ADDRESS_FAMILY sdl_family;
671
+ UCHAR sdl_data[8];
672
+ UCHAR sdl_zero[4];
673
+ } SOCKADDR_DL, *PSOCKADDR_DL;
674
+
675
+ #endif //(_WIN32_WINNT >= 0x0601)
676
+
677
+ #define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */
678
+ #define IOC_VOID 0x20000000 /* no parameters */
679
+ #define IOC_OUT 0x40000000 /* copy out parameters */
680
+ #define IOC_IN 0x80000000 /* copy in parameters */
681
+ #define IOC_INOUT (IOC_IN|IOC_OUT)
682
+ /* 0x20000000 distinguishes new &
683
+ old ioctl's */
684
+ #define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
685
+
686
+ #define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
687
+
688
+ #define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
689
+
690
+ /*
691
+ * WinSock 2 extension -- WSABUF and QOS struct, include qos.h
692
+ * to pull in FLOWSPEC and related definitions
693
+ */
694
+
695
+ typedef struct _WSABUF {
696
+ ULONG len; /* the length of the buffer */
697
+ _Field_size_bytes_(len) CHAR FAR *buf; /* the pointer to the buffer */
698
+ } WSABUF, FAR * LPWSABUF;
699
+
700
+ /*
701
+ * WSAMSG -- for WSASendMsg
702
+ */
703
+
704
+ typedef struct _WSAMSG {
705
+ _Field_size_bytes_(namelen) LPSOCKADDR name; /* Remote address */
706
+ INT namelen; /* Remote address length */
707
+ LPWSABUF lpBuffers; /* Data buffer array */
708
+
709
+ #if(_WIN32_WINNT >= 0x0600)
710
+ ULONG dwBufferCount; /* Number of elements in the array */
711
+ #else
712
+ DWORD dwBufferCount; /* Number of elements in the array */
713
+ #endif //(_WIN32_WINNT>=0x0600)
714
+
715
+ WSABUF Control; /* Control buffer */
716
+
717
+ #if(_WIN32_WINNT >= 0x0600)
718
+ ULONG dwFlags; /* Flags */
719
+ #else
720
+ DWORD dwFlags; /* Flags */
721
+ #endif //(_WIN32_WINNT>=0x0600)
722
+
723
+ } WSAMSG, *PWSAMSG, * FAR LPWSAMSG;
724
+
725
+ /*
726
+ * Layout of ancillary data objects in the control buffer (RFC 2292).
727
+ */
728
+ #if(_WIN32_WINNT >= 0x0600)
729
+ #define _WSACMSGHDR cmsghdr
730
+ #endif //(_WIN32_WINNT>=0x0600)
731
+
732
+ typedef struct _WSACMSGHDR {
733
+ SIZE_T cmsg_len;
734
+ INT cmsg_level;
735
+ INT cmsg_type;
736
+ /* followed by UCHAR cmsg_data[] */
737
+ } WSACMSGHDR, *PWSACMSGHDR, FAR *LPWSACMSGHDR;
738
+
739
+ #if(_WIN32_WINNT >= 0x0600)
740
+ typedef WSACMSGHDR CMSGHDR, *PCMSGHDR;
741
+ #endif //(_WIN32_WINNT>=0x0600)
742
+
743
+ /*
744
+ * Alignment macros for header and data members of
745
+ * the control buffer.
746
+ */
747
+ #define WSA_CMSGHDR_ALIGN(length) \
748
+ ( ((length) + TYPE_ALIGNMENT(WSACMSGHDR)-1) & \
749
+ (~(TYPE_ALIGNMENT(WSACMSGHDR)-1)) ) \
750
+
751
+ #define WSA_CMSGDATA_ALIGN(length) \
752
+ ( ((length) + MAX_NATURAL_ALIGNMENT-1) & \
753
+ (~(MAX_NATURAL_ALIGNMENT-1)) )
754
+
755
+ #if(_WIN32_WINNT >= 0x0600)
756
+ #define CMSGHDR_ALIGN WSA_CMSGHDR_ALIGN
757
+ #define CMSGDATA_ALIGN WSA_CMSGDATA_ALIGN
758
+ #endif //(_WIN32_WINNT>=0x0600)
759
+
760
+ /*
761
+ * WSA_CMSG_FIRSTHDR
762
+ *
763
+ * Returns a pointer to the first ancillary data object,
764
+ * or a null pointer if there is no ancillary data in the
765
+ * control buffer of the WSAMSG structure.
766
+ *
767
+ * LPCMSGHDR
768
+ * WSA_CMSG_FIRSTHDR (
769
+ * LPWSAMSG msg
770
+ * );
771
+ */
772
+ #define WSA_CMSG_FIRSTHDR(msg) \
773
+ ( ((msg)->Control.len >= sizeof(WSACMSGHDR)) \
774
+ ? (LPWSACMSGHDR)(msg)->Control.buf \
775
+ : (LPWSACMSGHDR)NULL )
776
+
777
+ #if(_WIN32_WINNT >= 0x0600)
778
+ #define CMSG_FIRSTHDR WSA_CMSG_FIRSTHDR
779
+ #endif //(_WIN32_WINNT>=0x0600)
780
+
781
+ /*
782
+ * WSA_CMSG_NXTHDR
783
+ *
784
+ * Returns a pointer to the next ancillary data object,
785
+ * or a null if there are no more data objects.
786
+ *
787
+ * LPCMSGHDR
788
+ * WSA_CMSG_NEXTHDR (
789
+ * LPWSAMSG msg,
790
+ * LPWSACMSGHDR cmsg
791
+ * );
792
+ */
793
+ #define WSA_CMSG_NXTHDR(msg, cmsg) \
794
+ ( ((cmsg) == NULL) \
795
+ ? WSA_CMSG_FIRSTHDR(msg) \
796
+ : ( ( ((PUCHAR)(cmsg) + \
797
+ WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len) + \
798
+ sizeof(WSACMSGHDR) ) > \
799
+ (PUCHAR)((msg)->Control.buf) + \
800
+ (msg)->Control.len ) \
801
+ ? (LPWSACMSGHDR)NULL \
802
+ : (LPWSACMSGHDR)((PUCHAR)(cmsg) + \
803
+ WSA_CMSGHDR_ALIGN((cmsg)->cmsg_len)) ) )
804
+
805
+ #if(_WIN32_WINNT >= 0x0600)
806
+ #define CMSG_NXTHDR WSA_CMSG_NXTHDR
807
+ #endif //(_WIN32_WINNT>=0x0600)
808
+
809
+ /*
810
+ * WSA_CMSG_DATA
811
+ *
812
+ * Returns a pointer to the first byte of data (what is referred
813
+ * to as the cmsg_data member though it is not defined in
814
+ * the structure).
815
+ *
816
+ * Note that RFC 2292 defines this as CMSG_DATA, but that name
817
+ * is already used by wincrypt.h, and so Windows has used WSA_CMSG_DATA.
818
+ *
819
+ * PUCHAR
820
+ * WSA_CMSG_DATA (
821
+ * LPWSACMSGHDR pcmsg
822
+ * );
823
+ */
824
+ #define WSA_CMSG_DATA(cmsg) \
825
+ ( (PUCHAR)(cmsg) + WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) )
826
+
827
+ /*
828
+ * WSA_CMSG_SPACE
829
+ *
830
+ * Returns total size of an ancillary data object given
831
+ * the amount of data. Used to allocate the correct amount
832
+ * of space.
833
+ *
834
+ * SIZE_T
835
+ * WSA_CMSG_SPACE (
836
+ * SIZE_T length
837
+ * );
838
+ */
839
+ #define WSA_CMSG_SPACE(length) \
840
+ (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR) + WSA_CMSGHDR_ALIGN(length)))
841
+
842
+ #if(_WIN32_WINNT >= 0x0600)
843
+ #define CMSG_SPACE WSA_CMSG_SPACE
844
+ #endif //(_WIN32_WINNT>=0x0600)
845
+
846
+ /*
847
+ * WSA_CMSG_LEN
848
+ *
849
+ * Returns the value to store in cmsg_len given the amount of data.
850
+ *
851
+ * SIZE_T
852
+ * WSA_CMSG_LEN (
853
+ * SIZE_T length
854
+ * );
855
+ */
856
+ #define WSA_CMSG_LEN(length) \
857
+ (WSA_CMSGDATA_ALIGN(sizeof(WSACMSGHDR)) + length)
858
+
859
+ #if(_WIN32_WINNT >= 0x0600)
860
+ #define CMSG_LEN WSA_CMSG_LEN
861
+ #endif //(_WIN32_WINNT>=0x0600)
862
+
863
+ /*
864
+ * Definition for flags member of the WSAMSG structure
865
+ * This is in addition to other MSG_xxx flags defined
866
+ * for recv/recvfrom/send/sendto.
867
+ */
868
+ #define MSG_TRUNC 0x0100
869
+ #define MSG_CTRUNC 0x0200
870
+ #define MSG_BCAST 0x0400
871
+ #define MSG_MCAST 0x0800
872
+ #define MSG_ERRQUEUE 0x1000
873
+
874
+ //
875
+ // Flags used in "hints" argument to getaddrinfo()
876
+ // - AI_ADDRCONFIG is supported starting with Vista
877
+ // - default is AI_ADDRCONFIG ON whether the flag is set or not
878
+ // because the performance penalty in not having ADDRCONFIG in
879
+ // the multi-protocol stack environment is severe;
880
+ // this defaulting may be disabled by specifying the AI_ALL flag,
881
+ // in that case AI_ADDRCONFIG must be EXPLICITLY specified to
882
+ // enable ADDRCONFIG behavior
883
+ //
884
+
885
+ #define AI_PASSIVE 0x00000001 // Socket address will be used in bind() call
886
+ #define AI_CANONNAME 0x00000002 // Return canonical name in first ai_canonname
887
+ #define AI_NUMERICHOST 0x00000004 // Nodename must be a numeric address string
888
+ #define AI_NUMERICSERV 0x00000008 // Servicename must be a numeric port number
889
+ #define AI_DNS_ONLY 0x00000010 // Restrict queries to unicast DNS only (no LLMNR, netbios, etc.)
890
+ #define AI_FORCE_CLEAR_TEXT 0x00000020 // Force clear text DNS query
891
+ #define AI_BYPASS_DNS_CACHE 0x00000040 // Bypass DNS cache
892
+ #define AI_RETURN_TTL 0x00000080 // Return record TTL
893
+
894
+ #define AI_ALL 0x00000100 // Query both IP6 and IP4 with AI_V4MAPPED
895
+ #define AI_ADDRCONFIG 0x00000400 // Resolution only if global address configured
896
+ #define AI_V4MAPPED 0x00000800 // On v6 failure, query v4 and convert to V4MAPPED format
897
+
898
+ #define AI_NON_AUTHORITATIVE 0x00004000 // LUP_NON_AUTHORITATIVE
899
+ #define AI_SECURE 0x00008000 // LUP_SECURE
900
+ #define AI_RETURN_PREFERRED_NAMES 0x00010000 // LUP_RETURN_PREFERRED_NAMES
901
+
902
+ #define AI_FQDN 0x00020000 // Return the FQDN in ai_canonname
903
+ #define AI_FILESERVER 0x00040000 // Resolving fileserver name resolution
904
+ #define AI_DISABLE_IDN_ENCODING 0x00080000 // Disable Internationalized Domain Names handling
905
+ #define AI_SECURE_WITH_FALLBACK 0x00100000 // Forces clear text fallback if the secure DNS query fails
906
+ #define AI_EXCLUSIVE_CUSTOM_SERVERS 0x00200000 // Use exclusively the custom DNS servers
907
+ #define AI_RETURN_RESPONSE_FLAGS 0x10000000 // Requests extra information about the DNS results
908
+ #define AI_REQUIRE_SECURE 0x20000000 // Forces the DNS query to be done over seucre protocols
909
+ #define AI_RESOLUTION_HANDLE 0x40000000 // Request resolution handle
910
+ #define AI_EXTENDED 0x80000000 // Indicates this is extended ADDRINFOEX(2/..) struct
911
+
912
+ //
913
+ // Structure used in getaddrinfo() call
914
+ //
915
+
916
+ typedef struct addrinfo
917
+ {
918
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
919
+ int ai_family; // PF_xxx
920
+ int ai_socktype; // SOCK_xxx
921
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
922
+ size_t ai_addrlen; // Length of ai_addr
923
+ char * ai_canonname; // Canonical name for nodename
924
+ _Field_size_bytes_(ai_addrlen) struct sockaddr * ai_addr; // Binary address
925
+ struct addrinfo * ai_next; // Next structure in linked list
926
+ }
927
+ ADDRINFOA, *PADDRINFOA;
928
+
929
+ typedef struct addrinfoW
930
+ {
931
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
932
+ int ai_family; // PF_xxx
933
+ int ai_socktype; // SOCK_xxx
934
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
935
+ size_t ai_addrlen; // Length of ai_addr
936
+ PWSTR ai_canonname; // Canonical name for nodename
937
+ _Field_size_bytes_(ai_addrlen) struct sockaddr * ai_addr; // Binary address
938
+ struct addrinfoW * ai_next; // Next structure in linked list
939
+ }
940
+ ADDRINFOW, *PADDRINFOW;
941
+
942
+ #if (_WIN32_WINNT >= 0x0600)
943
+
944
+ #pragma region App Family or OneCore Family or Games Family
945
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
946
+ typedef struct _WINSOCK_DEPRECATED_BY("ADDRINFOEXW") addrinfoexA
947
+ {
948
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
949
+ int ai_family; // PF_xxx
950
+ int ai_socktype; // SOCK_xxx
951
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
952
+ size_t ai_addrlen; // Length of ai_addr
953
+ char *ai_canonname; // Canonical name for nodename
954
+ struct sockaddr *ai_addr; // Binary address
955
+ void *ai_blob;
956
+ size_t ai_bloblen;
957
+ LPGUID ai_provider;
958
+ struct addrinfoexA *ai_next; // Next structure in linked list
959
+ } ADDRINFOEXA, *PADDRINFOEXA, *LPADDRINFOEXA;
960
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
961
+ #pragma endregion
962
+
963
+ typedef struct addrinfoexW
964
+ {
965
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
966
+ int ai_family; // PF_xxx
967
+ int ai_socktype; // SOCK_xxx
968
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
969
+ size_t ai_addrlen; // Length of ai_addr
970
+ PWSTR ai_canonname; // Canonical name for nodename
971
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr; // Binary address
972
+ _Field_size_(ai_bloblen) void *ai_blob;
973
+ size_t ai_bloblen;
974
+ LPGUID ai_provider;
975
+ struct addrinfoexW *ai_next; // Next structure in linked list
976
+ } ADDRINFOEXW, *PADDRINFOEXW, *LPADDRINFOEXW;
977
+
978
+ #endif
979
+
980
+ #if (_WIN32_WINNT >= 0x0602)
981
+
982
+ #define ADDRINFOEX_VERSION_2 2
983
+ #define ADDRINFOEX_VERSION_3 3
984
+ #define ADDRINFOEX_VERSION_4 4
985
+ #define ADDRINFOEX_VERSION_5 5
986
+ #define ADDRINFOEX_VERSION_6 6
987
+ #define ADDRINFOEX_VERSION_7 7
988
+
989
+ #pragma region Desktop Family
990
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
991
+ typedef struct _WINSOCK_DEPRECATED_BY("ADDRINFOEX2W") addrinfoex2A
992
+ {
993
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
994
+ int ai_family; // PF_xxx
995
+ int ai_socktype; // SOCK_xxx
996
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
997
+ size_t ai_addrlen; // Length of ai_addr
998
+ char *ai_canonname; // Canonical name for nodename
999
+ struct sockaddr *ai_addr; // Binary address
1000
+ void *ai_blob;
1001
+ size_t ai_bloblen;
1002
+ LPGUID ai_provider;
1003
+ struct addrinfoex2A *ai_next; // Next structure in linked list
1004
+ int ai_version;
1005
+ char *ai_fqdn;
1006
+ } ADDRINFOEX2A, *PADDRINFOEX2A, *LPADDRINFOEX2A;
1007
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
1008
+ #pragma endregion
1009
+
1010
+ typedef struct addrinfoex2W
1011
+ {
1012
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
1013
+ int ai_family; // PF_xxx
1014
+ int ai_socktype; // SOCK_xxx
1015
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
1016
+ size_t ai_addrlen; // Length of ai_addr
1017
+ PWSTR ai_canonname; // Canonical name for nodename
1018
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr; // Binary address
1019
+ _Field_size_(ai_bloblen) void *ai_blob;
1020
+ size_t ai_bloblen;
1021
+ LPGUID ai_provider;
1022
+ struct addrinfoex2W *ai_next; // Next structure in linked list
1023
+ int ai_version;
1024
+ PWSTR ai_fqdn;
1025
+ } ADDRINFOEX2W, *PADDRINFOEX2W, *LPADDRINFOEX2W;
1026
+
1027
+ typedef struct addrinfoex3
1028
+ {
1029
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
1030
+ int ai_family; // PF_xxx
1031
+ int ai_socktype; // SOCK_xxx
1032
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
1033
+ size_t ai_addrlen; // Length of ai_addr
1034
+ PWSTR ai_canonname; // Canonical name for nodename
1035
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr; // Binary address
1036
+ _Field_size_(ai_bloblen) void *ai_blob;
1037
+ size_t ai_bloblen;
1038
+ LPGUID ai_provider;
1039
+ struct addrinfoex3 *ai_next; // Next structure in linked list
1040
+ int ai_version;
1041
+ PWSTR ai_fqdn;
1042
+ int ai_interfaceindex;
1043
+ } ADDRINFOEX3, *PADDRINFOEX3, *LPADDRINFOEX3;
1044
+
1045
+ typedef struct addrinfoex4
1046
+ {
1047
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
1048
+ int ai_family; // PF_xxx
1049
+ int ai_socktype; // SOCK_xxx
1050
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
1051
+ size_t ai_addrlen; // Length of ai_addr
1052
+ PWSTR ai_canonname; // Canonical name for nodename
1053
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr; // Binary address
1054
+ _Field_size_(ai_bloblen) void *ai_blob;
1055
+ size_t ai_bloblen;
1056
+ GUID *ai_provider;
1057
+ struct addrinfoex4 *ai_next; // Next structure in linked list
1058
+ int ai_version;
1059
+ PWSTR ai_fqdn;
1060
+ int ai_interfaceindex;
1061
+ HANDLE ai_resolutionhandle;
1062
+ } ADDRINFOEX4, *PADDRINFOEX4, *LPADDRINFOEX4;
1063
+
1064
+ typedef struct addrinfoex5
1065
+ {
1066
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
1067
+ int ai_family; // PF_xxx
1068
+ int ai_socktype; // SOCK_xxx
1069
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
1070
+ size_t ai_addrlen; // Length of ai_addr
1071
+ PWSTR ai_canonname; // Canonical name for nodename
1072
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr; // Binary address
1073
+ _Field_size_(ai_bloblen) void *ai_blob;
1074
+ size_t ai_bloblen;
1075
+ GUID *ai_provider;
1076
+ struct addrinfoex5 *ai_next; // Next structure in linked list
1077
+ int ai_version;
1078
+ PWSTR ai_fqdn;
1079
+ int ai_interfaceindex;
1080
+ HANDLE ai_resolutionhandle;
1081
+ unsigned int ai_ttl; // Number of seconds for which this DNS record is valid
1082
+ } ADDRINFOEX5, *PADDRINFOEX5, *LPADDRINFOEX5;
1083
+
1084
+
1085
+ //
1086
+ // Types of custom DNS servers specified in the ai_servers parameter.
1087
+ // These options will be set in the ai_servertype field in the ADDRINFO_DNS_SERVER struct.
1088
+ //
1089
+
1090
+ #define AI_DNS_SERVER_TYPE_UDP 0x1
1091
+ #define AI_DNS_SERVER_TYPE_DOH 0x2
1092
+ #define AI_DNS_SERVER_TYPE_DOT 0x3
1093
+
1094
+
1095
+ //
1096
+ // Flags for custom servers.
1097
+ // These options will be set in the ai_flags field in the ADDRINFO_DNS_SERVER struct.
1098
+ //
1099
+
1100
+ #define AI_DNS_SERVER_UDP_FALLBACK 0x1
1101
+
1102
+ typedef struct addrinfo_dns_server
1103
+ {
1104
+ unsigned int ai_servertype;
1105
+ unsigned __int64 ai_flags;
1106
+ unsigned int ai_addrlen;
1107
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr;
1108
+
1109
+ union
1110
+ {
1111
+ PWSTR ai_template;
1112
+ PWSTR ai_hostname;
1113
+ };
1114
+ } ADDRINFO_DNS_SERVER;
1115
+
1116
+
1117
+ //
1118
+ // Flags returned through ai_returnflags, when AI_RETURN_RESPONSE_FLAGS is set
1119
+ //
1120
+
1121
+ #define AI_DNS_RESPONSE_SECURE 0x1 // Present if the resolution was done through secure protocols
1122
+ #define AI_DNS_RESPONSE_HOSTFILE 0x2
1123
+
1124
+ typedef struct addrinfoex6
1125
+ {
1126
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
1127
+ int ai_family; // PF_xxx
1128
+ int ai_socktype; // SOCK_xxx
1129
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
1130
+ size_t ai_addrlen; // Length of ai_addr
1131
+ PWSTR ai_canonname; // Canonical name for nodename
1132
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr; // Binary address
1133
+ _Field_size_(ai_bloblen) void *ai_blob;
1134
+ size_t ai_bloblen;
1135
+ GUID *ai_provider;
1136
+ struct addrinfoex5 *ai_next; // Next structure in linked list
1137
+ int ai_version;
1138
+ PWSTR ai_fqdn;
1139
+ int ai_interfaceindex;
1140
+ HANDLE ai_resolutionhandle;
1141
+ unsigned int ai_ttl; // Number of seconds for which this DNS record is valid
1142
+ unsigned int ai_numservers;
1143
+ ADDRINFO_DNS_SERVER *ai_servers;
1144
+ ULONG64 ai_responseflags;
1145
+ } ADDRINFOEX6, *PADDRINFOEX6;
1146
+
1147
+ //
1148
+ // Flags for ai_extraflags
1149
+ //
1150
+
1151
+ #define AI_EXTRA_DNSSEC_REQUIRED 0x0000000000000001 // Set DO and AD bits in request, returns IP address info IF DNSSEC authenticated, NOTE: only the IP address will be returned not the DNSSEC specific records
1152
+
1153
+ typedef struct addrinfoex7
1154
+ {
1155
+ int ai_flags; // AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST
1156
+ int ai_family; // PF_xxx
1157
+ int ai_socktype; // SOCK_xxx
1158
+ int ai_protocol; // 0 or IPPROTO_xxx for IPv4 and IPv6
1159
+ size_t ai_addrlen; // Length of ai_addr
1160
+ PWSTR ai_canonname; // Canonical name for nodename
1161
+ _Field_size_bytes_(ai_addrlen) struct sockaddr *ai_addr; // Binary address
1162
+ _Field_size_(ai_bloblen) void *ai_blob;
1163
+ size_t ai_bloblen;
1164
+ GUID *ai_provider;
1165
+ struct addrinfoex7 *ai_next; // Next structure in linked list
1166
+ int ai_version;
1167
+ PWSTR ai_fqdn;
1168
+ int ai_interfaceindex;
1169
+ HANDLE ai_resolutionhandle;
1170
+ unsigned int ai_ttl; // Number of seconds for which this DNS record is valid
1171
+ unsigned int ai_numservers;
1172
+ ADDRINFO_DNS_SERVER *ai_servers;
1173
+ ULONG64 ai_responseflags;
1174
+ ULONG64 ai_extraflags; // additional dns options
1175
+ } ADDRINFOEX7, *PADDRINFOEX7;
1176
+
1177
+ #endif
1178
+
1179
+ //
1180
+ // Flags for getaddrinfo()
1181
+ //
1182
+
1183
+ // Name Spaces
1184
+
1185
+ #define NS_ALL (0)
1186
+
1187
+ #define NS_SAP (1)
1188
+ #define NS_NDS (2)
1189
+ #define NS_PEER_BROWSE (3)
1190
+ #define NS_SLP (5)
1191
+ #define NS_DHCP (6)
1192
+
1193
+ #define NS_TCPIP_LOCAL (10)
1194
+ #define NS_TCPIP_HOSTS (11)
1195
+ #define NS_DNS (12)
1196
+ #define NS_NETBT (13)
1197
+ #define NS_WINS (14)
1198
+
1199
+ #if(_WIN32_WINNT >= 0x0501)
1200
+ #define NS_NLA (15) /* Network Location Awareness */
1201
+ #endif //(_WIN32_WINNT >= 0x0501)
1202
+
1203
+ #if(_WIN32_WINNT >= 0x0600)
1204
+ #define NS_BTH (16) /* Bluetooth SDP Namespace */
1205
+ #endif //(_WIN32_WINNT >= 0x0600)
1206
+
1207
+ #define NS_NBP (20)
1208
+
1209
+ #define NS_MS (30)
1210
+ #define NS_STDA (31)
1211
+ #define NS_NTDS (32)
1212
+
1213
+ #if(_WIN32_WINNT >= 0x0600)
1214
+ #define NS_EMAIL (37)
1215
+ #define NS_PNRPNAME (38)
1216
+ #define NS_PNRPCLOUD (39)
1217
+ #endif //(_WIN32_WINNT >= 0x0600)
1218
+
1219
+ #define NS_X500 (40)
1220
+ #define NS_NIS (41)
1221
+ #define NS_NISPLUS (42)
1222
+
1223
+ #define NS_WRQ (50)
1224
+
1225
+ #define NS_NETDES (60) /* Network Designers Limited */
1226
+
1227
+ //
1228
+ // Flags for getnameinfo()
1229
+ //
1230
+
1231
+ #define NI_NOFQDN 0x01 /* Only return nodename portion for local hosts */
1232
+ #define NI_NUMERICHOST 0x02 /* Return numeric form of the host's address */
1233
+ #define NI_NAMEREQD 0x04 /* Error if the host's name not in DNS */
1234
+ #define NI_NUMERICSERV 0x08 /* Return numeric form of the service (port #) */
1235
+ #define NI_DGRAM 0x10 /* Service is a datagram service */
1236
+
1237
+ #define NI_MAXHOST 1025 /* Max size of a fully-qualified domain name */
1238
+ #define NI_MAXSERV 32 /* Max size of a service name */
1239
+
1240
+ #pragma warning(pop)
1241
+
1242
+ #ifdef __cplusplus
1243
+ }
1244
+ #endif
1245
+ #endif
msvc/Windows Kits/10/Include/10.0.26100.0/shared/ws2ipdef.h ADDED
@@ -0,0 +1,1029 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ ws2ipdef.h
8
+
9
+ Abstract:
10
+
11
+ This file contains TCP/IP specific information for use
12
+ by WinSock2 compatible applications.
13
+
14
+ Copyright (c) Microsoft Corporation. All rights reserved.
15
+
16
+ To provide the backward compatibility, all the TCP/IP
17
+ specific definitions that were included in the WINSOCK.H
18
+ file are now included in WINSOCK2.H file. WS2TCPIP.H
19
+ file includes only the definitions introduced in the
20
+ "WinSock 2 Protocol-Specific Annex" document.
21
+
22
+ Rev 0.3 Nov 13, 1995
23
+ Rev 0.4 Dec 15, 1996
24
+
25
+ Environment:
26
+
27
+ user mode or kernel mode
28
+
29
+ --*/
30
+
31
+ #ifndef _WS2IPDEF_
32
+ #define _WS2IPDEF_
33
+
34
+ #if _MSC_VER > 1000
35
+ #pragma once
36
+ #endif
37
+ #include <winapifamily.h>
38
+
39
+ #pragma region Desktop Family or OneCore Family or Games Family
40
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
41
+ #ifdef __cplusplus
42
+ extern "C" {
43
+ #endif
44
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
45
+ #pragma endregion
46
+
47
+ #pragma warning(push)
48
+ #pragma warning(disable:4201)
49
+ #pragma warning(disable:4127) // conditional expression is constant
50
+
51
+ #ifdef _PREFAST_
52
+ #pragma prefast(push)
53
+ #pragma prefast(disable: 24002, "This code requires explicit usage of IPv4 address types.")
54
+ #endif
55
+
56
+ #ifndef WS2IPDEF_ASSERT
57
+ #define WS2IPDEF_ASSERT(exp) ((VOID) 0)
58
+ #endif
59
+
60
+ #ifdef _MSC_VER
61
+ #define WS2TCPIP_INLINE __inline
62
+ #else
63
+ #define WS2TCPIP_INLINE extern inline /* GNU style */
64
+ #endif
65
+
66
+ #include <in6addr.h>
67
+
68
+ //
69
+ // Old IPv6 socket address structure (retained for sockaddr_gen definition).
70
+ //
71
+
72
+ struct sockaddr_in6_old {
73
+ SHORT sin6_family; // AF_INET6.
74
+ USHORT sin6_port; // Transport level port number.
75
+ ULONG sin6_flowinfo; // IPv6 flow information.
76
+ IN6_ADDR sin6_addr; // IPv6 address.
77
+ };
78
+
79
+ typedef union sockaddr_gen {
80
+ struct sockaddr Address;
81
+ struct sockaddr_in AddressIn;
82
+ struct sockaddr_in6_old AddressIn6;
83
+ } sockaddr_gen;
84
+
85
+ //
86
+ // Structure to keep interface specific information
87
+ //
88
+
89
+ typedef struct _INTERFACE_INFO {
90
+ ULONG iiFlags; // Interface flags.
91
+ sockaddr_gen iiAddress; // Interface address.
92
+ sockaddr_gen iiBroadcastAddress; // Broadcast address.
93
+ sockaddr_gen iiNetmask; // Network mask.
94
+ } INTERFACE_INFO, FAR *LPINTERFACE_INFO;
95
+
96
+ //
97
+ // New structure that does not have dependency on the address size.
98
+ //
99
+
100
+ typedef struct _INTERFACE_INFO_EX {
101
+ ULONG iiFlags; // Interface flags.
102
+ SOCKET_ADDRESS iiAddress; // Interface address.
103
+ SOCKET_ADDRESS iiBroadcastAddress; // Broadcast address.
104
+ SOCKET_ADDRESS iiNetmask; // Network mask.
105
+ } INTERFACE_INFO_EX, FAR *LPINTERFACE_INFO_EX;
106
+
107
+ //
108
+ // Possible flags for the iiFlags - bitmask.
109
+ //
110
+
111
+ #define IFF_UP 0x00000001 // Interface is up.
112
+ #define IFF_BROADCAST 0x00000002 // Broadcast is supported.
113
+ #define IFF_LOOPBACK 0x00000004 // This is loopback interface.
114
+ #define IFF_POINTTOPOINT 0x00000008 // This is point-to-point interface.
115
+ #define IFF_MULTICAST 0x00000010 // Multicast is supported.
116
+
117
+ //
118
+ // Path MTU discovery states.
119
+ //
120
+
121
+ typedef enum _PMTUD_STATE {
122
+ IP_PMTUDISC_NOT_SET,
123
+ IP_PMTUDISC_DO,
124
+ IP_PMTUDISC_DONT,
125
+ IP_PMTUDISC_PROBE,
126
+ IP_PMTUDISC_MAX
127
+ } PMTUD_STATE, *PPMTUD_STATE;
128
+
129
+ //
130
+ // Options to use with [gs]etsockopt at the IPPROTO_IP level.
131
+ // The values should be consistent with the IPv6 equivalents.
132
+ //
133
+ #define IP_OPTIONS 1 // Set/get IP options.
134
+ #define IP_HDRINCL 2 // Header is included with data.
135
+ #define IP_TOS 3 // IP type of service.
136
+ #define IP_TTL 4 // IP TTL (hop limit).
137
+ #define IP_MULTICAST_IF 9 // IP multicast interface.
138
+ #define IP_MULTICAST_TTL 10 // IP multicast TTL (hop limit).
139
+ #define IP_MULTICAST_LOOP 11 // IP multicast loopback.
140
+ #define IP_ADD_MEMBERSHIP 12 // Add an IP group membership.
141
+ #define IP_DROP_MEMBERSHIP 13 // Drop an IP group membership.
142
+ #define IP_DONTFRAGMENT 14 // Don't fragment IP datagrams.
143
+ #define IP_ADD_SOURCE_MEMBERSHIP 15 // Join IP group/source.
144
+ #define IP_DROP_SOURCE_MEMBERSHIP 16 // Leave IP group/source.
145
+ #define IP_BLOCK_SOURCE 17 // Block IP group/source.
146
+ #define IP_UNBLOCK_SOURCE 18 // Unblock IP group/source.
147
+ #define IP_PKTINFO 19 // Receive packet information.
148
+ #define IP_HOPLIMIT 21 // Receive packet hop limit.
149
+ #define IP_RECVTTL 21 // Receive packet Time To Live (TTL).
150
+ #define IP_RECEIVE_BROADCAST 22 // Allow/block broadcast reception.
151
+ #define IP_RECVIF 24 // Receive arrival interface.
152
+ #define IP_RECVDSTADDR 25 // Receive destination address.
153
+ #define IP_IFLIST 28 // Enable/Disable an interface list.
154
+ #define IP_ADD_IFLIST 29 // Add an interface list entry.
155
+ #define IP_DEL_IFLIST 30 // Delete an interface list entry.
156
+ #define IP_UNICAST_IF 31 // IP unicast interface.
157
+ #define IP_RTHDR 32 // Set/get IPv6 routing header.
158
+ #define IP_GET_IFLIST 33 // Get an interface list.
159
+ #define IP_RECVRTHDR 38 // Receive the routing header.
160
+ #define IP_TCLASS 39 // Packet traffic class.
161
+ #define IP_RECVTCLASS 40 // Receive packet traffic class.
162
+ #define IP_RECVTOS 40 // Receive packet Type Of Service (TOS).
163
+ #define IP_ORIGINAL_ARRIVAL_IF 47 // Original Arrival Interface Index.
164
+ #define IP_ECN 50 // IP ECN codepoint.
165
+ #define IP_RECVECN 50 // Receive ECN codepoints in the IP header.
166
+ #define IP_PKTINFO_EX 51 // Receive extended packet information.
167
+ #define IP_WFP_REDIRECT_RECORDS 60 // WFP's Connection Redirect Records.
168
+ #define IP_WFP_REDIRECT_CONTEXT 70 // WFP's Connection Redirect Context.
169
+ #define IP_MTU_DISCOVER 71 // Set/get path MTU discover state.
170
+ #define IP_MTU 73 // Get path MTU.
171
+ #define IP_NRT_INTERFACE 74 // Set NRT interface constraint (outbound).
172
+ #define IP_RECVERR 75 // Receive ICMP errors.
173
+ #define IP_USER_MTU 76 // Set/get app defined upper bound IP layer MTU.
174
+
175
+ #define IP_UNSPECIFIED_TYPE_OF_SERVICE -1
176
+ #define IP_UNSPECIFIED_USER_MTU MAXULONG
177
+
178
+ #define IPV6_ADDRESS_BITS RTL_BITS_OF(IN6_ADDR)
179
+
180
+ //
181
+ // IPv6 socket address structure, RFC 3493.
182
+ //
183
+
184
+ //
185
+ // NB: The LH version of sockaddr_in6 has the struct tag sockaddr_in6 rather
186
+ // than sockaddr_in6_lh. This is to make sure that standard sockets apps
187
+ // that conform to RFC 2553 (Basic Socket Interface Extensions for IPv6).
188
+ //
189
+ #pragma region Desktop Family or OneCore Family or Games Family
190
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
191
+ typedef struct sockaddr_in6 {
192
+ ADDRESS_FAMILY sin6_family; // AF_INET6.
193
+ USHORT sin6_port; // Transport level port number.
194
+ ULONG sin6_flowinfo; // IPv6 flow information.
195
+ IN6_ADDR sin6_addr; // IPv6 address.
196
+ union {
197
+ ULONG sin6_scope_id; // Set of interfaces for a scope.
198
+ SCOPE_ID sin6_scope_struct;
199
+ };
200
+ } SOCKADDR_IN6_LH, *PSOCKADDR_IN6_LH, FAR *LPSOCKADDR_IN6_LH;
201
+
202
+ typedef struct sockaddr_in6_w2ksp1 {
203
+ short sin6_family; /* AF_INET6 */
204
+ USHORT sin6_port; /* Transport level port number */
205
+ ULONG sin6_flowinfo; /* IPv6 flow information */
206
+ struct in6_addr sin6_addr; /* IPv6 address */
207
+ ULONG sin6_scope_id; /* set of interfaces for a scope */
208
+ } SOCKADDR_IN6_W2KSP1, *PSOCKADDR_IN6_W2KSP1, FAR *LPSOCKADDR_IN6_W2KSP1;
209
+
210
+ #if (NTDDI_VERSION >= NTDDI_VISTA)
211
+ typedef SOCKADDR_IN6_LH SOCKADDR_IN6;
212
+ typedef SOCKADDR_IN6_LH *PSOCKADDR_IN6;
213
+ typedef SOCKADDR_IN6_LH FAR *LPSOCKADDR_IN6;
214
+ #elif(NTDDI_VERSION >= NTDDI_WIN2KSP1)
215
+ typedef SOCKADDR_IN6_W2KSP1 SOCKADDR_IN6;
216
+ typedef SOCKADDR_IN6_W2KSP1 *PSOCKADDR_IN6;
217
+ typedef SOCKADDR_IN6_W2KSP1 FAR *LPSOCKADDR_IN6;
218
+ #else
219
+ typedef SOCKADDR_IN6_LH SOCKADDR_IN6;
220
+ typedef SOCKADDR_IN6_LH *PSOCKADDR_IN6;
221
+ typedef SOCKADDR_IN6_LH FAR *LPSOCKADDR_IN6;
222
+ #endif
223
+
224
+ typedef union _SOCKADDR_INET {
225
+ SOCKADDR_IN Ipv4;
226
+ SOCKADDR_IN6 Ipv6;
227
+ ADDRESS_FAMILY si_family;
228
+ } SOCKADDR_INET, *PSOCKADDR_INET;
229
+
230
+ //
231
+ // Structure to hold a pair of source, destination addresses.
232
+ //
233
+ typedef struct _sockaddr_in6_pair
234
+ {
235
+ PSOCKADDR_IN6 SourceAddress;
236
+ PSOCKADDR_IN6 DestinationAddress;
237
+ } SOCKADDR_IN6_PAIR, *PSOCKADDR_IN6_PAIR;
238
+
239
+ //
240
+ // Macro that works for both IPv4 and IPv6
241
+ //
242
+ #define SS_PORT(ssp) (((PSOCKADDR_IN)(ssp))->sin_port)
243
+
244
+ #if (NTDDI_VERSION >= NTDDI_WIN2KSP1)
245
+ //
246
+ // N.B. These addresses are in network byte order.
247
+ //
248
+
249
+ #define IN6ADDR_ANY_INIT {{{ 0 }}}
250
+
251
+ #define IN6ADDR_LOOPBACK_INIT { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }
252
+
253
+ #define IN6ADDR_ALLNODESONNODE_INIT { \
254
+ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
255
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 \
256
+ }
257
+
258
+ #define IN6ADDR_ALLNODESONLINK_INIT { \
259
+ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
260
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 \
261
+ }
262
+
263
+ #define IN6ADDR_ALLROUTERSONLINK_INIT { \
264
+ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
265
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 \
266
+ }
267
+
268
+ #define IN6ADDR_ALLMLDV2ROUTERSONLINK_INIT { \
269
+ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
270
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16 \
271
+ }
272
+
273
+ #define IN6ADDR_TEREDOINITIALLINKLOCALADDRESS_INIT { \
274
+ 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
275
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe \
276
+ }
277
+
278
+ //
279
+ // The old link local address for XP-SP2/Win2K3 machines.
280
+ //
281
+ #define IN6ADDR_TEREDOOLDLINKLOCALADDRESSXP_INIT { \
282
+ 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
283
+ 0x00, 0x00, 'T', 'E', 'R', 'E', 'D', 'O' \
284
+ }
285
+
286
+ //
287
+ // The old link local address for Vista Beta-2 and earlier machines.
288
+ //
289
+ #define IN6ADDR_TEREDOOLDLINKLOCALADDRESSVISTA_INIT { \
290
+ 0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
291
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff \
292
+ }
293
+
294
+ #define IN6ADDR_LINKLOCALPREFIX_INIT { 0xfe, 0x80, }
295
+
296
+ #define IN6ADDR_MULTICASTPREFIX_INIT { 0xff, 0x00, }
297
+
298
+ #define IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_INIT { \
299
+ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
300
+ 0x00, 0x00, 0x00, 0x01, 0xff, \
301
+ }
302
+
303
+ #define IN6ADDR_V4MAPPEDPREFIX_INIT { \
304
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
305
+ 0x00, 0x00, 0xff, 0xff, \
306
+ }
307
+
308
+ #define IN6ADDR_6TO4PREFIX_INIT { 0x20, 0x02, }
309
+
310
+ #define IN6ADDR_TEREDOPREFIX_INIT { 0x20, 0x01, 0x00, 0x00, }
311
+
312
+ #define IN6ADDR_TEREDOPREFIX_INIT_OLD { 0x3f, 0xfe, 0x83, 0x1f, }
313
+
314
+ #define IN6ADDR_ULAPREFIX_INIT {0xfc }
315
+
316
+ #define IN6ADDR_SITELOCALPREFIX_INIT {0xfe, 0xc0 }
317
+
318
+ #define IN6ADDR_6BONETESTPREFIX_INIT { 0x3f, 0xfe }
319
+
320
+ #define IN6ADDR_LINKLOCALPREFIX_LENGTH 64
321
+
322
+ #define IN6ADDR_MULTICASTPREFIX_LENGTH 8
323
+
324
+ #define IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_LENGTH 104
325
+
326
+ #define IN6ADDR_V4MAPPEDPREFIX_LENGTH 96
327
+
328
+ #define IN6ADDR_6TO4PREFIX_LENGTH 16
329
+
330
+ #define IN6ADDR_TEREDOPREFIX_LENGTH 32
331
+
332
+ #ifdef __cplusplus
333
+ extern "C" {
334
+ #endif
335
+
336
+ //
337
+ // N.B. These addresses are in network byte order.
338
+ //
339
+ extern CONST SCOPE_ID scopeid_unspecified;
340
+
341
+ extern CONST IN_ADDR in4addr_any;
342
+ extern CONST IN_ADDR in4addr_loopback;
343
+ extern CONST IN_ADDR in4addr_broadcast;
344
+ extern CONST IN_ADDR in4addr_allnodesonlink;
345
+ extern CONST IN_ADDR in4addr_allroutersonlink;
346
+ extern CONST IN_ADDR in4addr_alligmpv3routersonlink;
347
+ extern CONST IN_ADDR in4addr_allteredohostsonlink;
348
+ extern CONST IN_ADDR in4addr_linklocalprefix;
349
+ extern CONST IN_ADDR in4addr_multicastprefix;
350
+
351
+ extern CONST IN6_ADDR in6addr_any;
352
+ extern CONST IN6_ADDR in6addr_loopback;
353
+ extern CONST IN6_ADDR in6addr_allnodesonnode;
354
+ extern CONST IN6_ADDR in6addr_allnodesonlink;
355
+ extern CONST IN6_ADDR in6addr_allroutersonlink;
356
+ extern CONST IN6_ADDR in6addr_allmldv2routersonlink;
357
+ extern CONST IN6_ADDR in6addr_teredoinitiallinklocaladdress;
358
+ extern CONST IN6_ADDR in6addr_linklocalprefix;
359
+ extern CONST IN6_ADDR in6addr_multicastprefix;
360
+ extern CONST IN6_ADDR in6addr_solicitednodemulticastprefix;
361
+ extern CONST IN6_ADDR in6addr_v4mappedprefix;
362
+ extern CONST IN6_ADDR in6addr_6to4prefix;
363
+ extern CONST IN6_ADDR in6addr_teredoprefix;
364
+ extern CONST IN6_ADDR in6addr_teredoprefix_old;
365
+
366
+ #ifdef __cplusplus
367
+ }
368
+ #endif
369
+
370
+ #ifndef __midl
371
+
372
+ WS2TCPIP_INLINE
373
+ BOOLEAN
374
+ IN6_ADDR_EQUAL(CONST IN6_ADDR *x, CONST IN6_ADDR *y)
375
+ {
376
+ __int64 UNALIGNED *a;
377
+ __int64 UNALIGNED *b;
378
+
379
+ a = (__int64 UNALIGNED *)x;
380
+ b = (__int64 UNALIGNED *)y;
381
+
382
+ return (BOOLEAN)((a[1] == b[1]) && (a[0] == b[0]));
383
+ }
384
+
385
+ //
386
+ // RFC 3542 uses IN6_ARE_ADDR_EQUAL().
387
+ //
388
+ #define IN6_ARE_ADDR_EQUAL IN6_ADDR_EQUAL
389
+
390
+ WS2TCPIP_INLINE
391
+ BOOLEAN
392
+ IN6_IS_ADDR_UNSPECIFIED(CONST IN6_ADDR *a)
393
+ {
394
+ //
395
+ // We can't use the in6addr_any variable, since that would
396
+ // require existing callers to link with a specific library.
397
+ //
398
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
399
+ (a->s6_words[1] == 0) &&
400
+ (a->s6_words[2] == 0) &&
401
+ (a->s6_words[3] == 0) &&
402
+ (a->s6_words[4] == 0) &&
403
+ (a->s6_words[5] == 0) &&
404
+ (a->s6_words[6] == 0) &&
405
+ (a->s6_words[7] == 0));
406
+ }
407
+
408
+ WS2TCPIP_INLINE
409
+ BOOLEAN
410
+ IN6_IS_ADDR_LOOPBACK(CONST IN6_ADDR *a)
411
+ {
412
+ //
413
+ // We can't use the in6addr_loopback variable, since that would
414
+ // require existing callers to link with a specific library.
415
+ //
416
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
417
+ (a->s6_words[1] == 0) &&
418
+ (a->s6_words[2] == 0) &&
419
+ (a->s6_words[3] == 0) &&
420
+ (a->s6_words[4] == 0) &&
421
+ (a->s6_words[5] == 0) &&
422
+ (a->s6_words[6] == 0) &&
423
+ (a->s6_words[7] == 0x0100));
424
+ }
425
+
426
+ WS2TCPIP_INLINE
427
+ BOOLEAN
428
+ IN6_IS_ADDR_MULTICAST(CONST IN6_ADDR *a)
429
+ {
430
+ return (BOOLEAN)(a->s6_bytes[0] == 0xff);
431
+ }
432
+
433
+ //
434
+ // Does the address have a format prefix
435
+ // that indicates it uses EUI-64 interface identifiers?
436
+ //
437
+ WS2TCPIP_INLINE
438
+ BOOLEAN
439
+ IN6_IS_ADDR_EUI64(CONST IN6_ADDR *a)
440
+ {
441
+ //
442
+ // Format prefixes 001 through 111, except for multicast.
443
+ //
444
+ return (BOOLEAN)(((a->s6_bytes[0] & 0xe0) != 0) &&
445
+ !IN6_IS_ADDR_MULTICAST(a));
446
+ }
447
+
448
+ //
449
+ // Is this the subnet router anycast address?
450
+ // See RFC 2373.
451
+ //
452
+ WS2TCPIP_INLINE
453
+ BOOLEAN
454
+ IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(CONST IN6_ADDR *a)
455
+ {
456
+ return (BOOLEAN)(IN6_IS_ADDR_EUI64(a) &&
457
+ (a->s6_words[4] == 0) &&
458
+ (a->s6_words[5] == 0) &&
459
+ (a->s6_words[6] == 0) &&
460
+ (a->s6_words[7] == 0));
461
+ }
462
+
463
+ //
464
+ // Is this a subnet reserved anycast address?
465
+ // See RFC 2526. It talks about non-EUI-64
466
+ // addresses as well, but IMHO that part
467
+ // of the RFC doesn't make sense. For example,
468
+ // it shouldn't apply to multicast or v4-compatible
469
+ // addresses.
470
+ //
471
+ WS2TCPIP_INLINE
472
+ BOOLEAN
473
+ IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(CONST IN6_ADDR *a)
474
+ {
475
+ return (BOOLEAN)(IN6_IS_ADDR_EUI64(a) &&
476
+ (a->s6_words[4] == 0xfffd) &&
477
+ (a->s6_words[5] == 0xffff) &&
478
+ (a->s6_words[6] == 0xffff) &&
479
+ ((a->s6_words[7] & 0x80ff) == 0x80ff));
480
+ }
481
+
482
+ //
483
+ // As best we can tell from simple inspection,
484
+ // is this an anycast address?
485
+ //
486
+ WS2TCPIP_INLINE
487
+ BOOLEAN
488
+ IN6_IS_ADDR_ANYCAST(CONST IN6_ADDR *a)
489
+ {
490
+ return (IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(a) ||
491
+ IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(a));
492
+ }
493
+
494
+ WS2TCPIP_INLINE
495
+ BOOLEAN
496
+ IN6_IS_ADDR_LINKLOCAL(CONST IN6_ADDR *a)
497
+ {
498
+ return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
499
+ ((a->s6_bytes[1] & 0xc0) == 0x80));
500
+ }
501
+
502
+ WS2TCPIP_INLINE
503
+ BOOLEAN
504
+ IN6_IS_ADDR_SITELOCAL(CONST IN6_ADDR *a)
505
+ {
506
+ return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
507
+ ((a->s6_bytes[1] & 0xc0) == 0xc0));
508
+ }
509
+
510
+ WS2TCPIP_INLINE
511
+ BOOLEAN
512
+ IN6_IS_ADDR_GLOBAL(CONST IN6_ADDR *a)
513
+ {
514
+ //
515
+ // Check the format prefix and exclude addresses
516
+ // whose high 4 bits are all zero or all one.
517
+ // This is a cheap way of excluding v4-compatible,
518
+ // v4-mapped, loopback, multicast, link-local, site-local.
519
+ //
520
+ ULONG High = (a->s6_bytes[0] & 0xf0u);
521
+ return (BOOLEAN)((High != 0) && (High != 0xf0));
522
+ }
523
+
524
+ WS2TCPIP_INLINE
525
+ BOOLEAN
526
+ IN6_IS_ADDR_V4MAPPED(CONST IN6_ADDR *a)
527
+ {
528
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
529
+ (a->s6_words[1] == 0) &&
530
+ (a->s6_words[2] == 0) &&
531
+ (a->s6_words[3] == 0) &&
532
+ (a->s6_words[4] == 0) &&
533
+ (a->s6_words[5] == 0xffff));
534
+ }
535
+
536
+ WS2TCPIP_INLINE
537
+ BOOLEAN
538
+ IN6_IS_ADDR_V4COMPAT(CONST IN6_ADDR *a)
539
+ {
540
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
541
+ (a->s6_words[1] == 0) &&
542
+ (a->s6_words[2] == 0) &&
543
+ (a->s6_words[3] == 0) &&
544
+ (a->s6_words[4] == 0) &&
545
+ (a->s6_words[5] == 0) &&
546
+ !((a->s6_words[6] == 0) &&
547
+ (a->s6_addr[14] == 0) &&
548
+ ((a->s6_addr[15] == 0) || (a->s6_addr[15] == 1))));
549
+ }
550
+
551
+ WS2TCPIP_INLINE
552
+ BOOLEAN
553
+ IN6_IS_ADDR_V4TRANSLATED(CONST IN6_ADDR *a)
554
+ {
555
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
556
+ (a->s6_words[1] == 0) &&
557
+ (a->s6_words[2] == 0) &&
558
+ (a->s6_words[3] == 0) &&
559
+ (a->s6_words[4] == 0xffff) &&
560
+ (a->s6_words[5] == 0));
561
+ }
562
+
563
+ WS2TCPIP_INLINE
564
+ BOOLEAN
565
+ IN6_IS_ADDR_MC_NODELOCAL(CONST IN6_ADDR *a)
566
+ {
567
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
568
+ ((a->s6_bytes[1] & 0xf) == 1));
569
+ }
570
+
571
+ WS2TCPIP_INLINE
572
+ BOOLEAN
573
+ IN6_IS_ADDR_MC_LINKLOCAL(CONST IN6_ADDR *a)
574
+ {
575
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
576
+ ((a->s6_bytes[1] & 0xf) == 2));
577
+ }
578
+
579
+ WS2TCPIP_INLINE
580
+ BOOLEAN
581
+ IN6_IS_ADDR_MC_SITELOCAL(CONST IN6_ADDR *a)
582
+ {
583
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
584
+ ((a->s6_bytes[1] & 0xf) == 5));
585
+ }
586
+
587
+ WS2TCPIP_INLINE
588
+ BOOLEAN
589
+ IN6_IS_ADDR_MC_ORGLOCAL(CONST IN6_ADDR *a)
590
+ {
591
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
592
+ ((a->s6_bytes[1] & 0xf) == 8));
593
+ }
594
+
595
+ WS2TCPIP_INLINE
596
+ BOOLEAN
597
+ IN6_IS_ADDR_MC_GLOBAL(CONST IN6_ADDR *a)
598
+ {
599
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
600
+ ((a->s6_bytes[1] & 0xf) == 0xe));
601
+ }
602
+
603
+ WS2TCPIP_INLINE
604
+ VOID
605
+ IN6_SET_ADDR_UNSPECIFIED(PIN6_ADDR a)
606
+ {
607
+ //
608
+ // We can't use the in6addr_any variable, since that would
609
+ // require existing callers to link with a specific library.
610
+ //
611
+ memset(a->s6_bytes, 0, sizeof(IN6_ADDR));
612
+ }
613
+
614
+ WS2TCPIP_INLINE
615
+ VOID
616
+ IN6_SET_ADDR_LOOPBACK(PIN6_ADDR a)
617
+ {
618
+ //
619
+ // We can't use the in6addr_loopback variable, since that would
620
+ // require existing callers to link with a specific library.
621
+ //
622
+ memset(a->s6_bytes, 0, sizeof(IN6_ADDR));
623
+ a->s6_bytes[15] = 1;
624
+ }
625
+
626
+ WS2TCPIP_INLINE
627
+ VOID
628
+ IN6ADDR_SETANY(PSOCKADDR_IN6 a)
629
+ {
630
+ a->sin6_family = AF_INET6;
631
+ a->sin6_port = 0;
632
+ a->sin6_flowinfo = 0;
633
+ IN6_SET_ADDR_UNSPECIFIED(&a->sin6_addr);
634
+ a->sin6_scope_id = 0;
635
+ }
636
+
637
+ WS2TCPIP_INLINE
638
+ VOID
639
+ IN6ADDR_SETLOOPBACK(PSOCKADDR_IN6 a)
640
+ {
641
+ a->sin6_family = AF_INET6;
642
+ a->sin6_port = 0;
643
+ a->sin6_flowinfo = 0;
644
+ IN6_SET_ADDR_LOOPBACK(&a->sin6_addr);
645
+ a->sin6_scope_id = 0;
646
+ }
647
+
648
+ WS2TCPIP_INLINE
649
+ BOOLEAN
650
+ IN6ADDR_ISANY(CONST SOCKADDR_IN6 *a)
651
+ {
652
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
653
+ return IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr);
654
+ }
655
+
656
+ WS2TCPIP_INLINE
657
+ BOOLEAN
658
+ IN6ADDR_ISLOOPBACK(CONST SOCKADDR_IN6 *a)
659
+ {
660
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
661
+ return IN6_IS_ADDR_LOOPBACK(&a->sin6_addr);
662
+ }
663
+
664
+ WS2TCPIP_INLINE
665
+ BOOLEAN
666
+ IN6ADDR_ISEQUAL(CONST SOCKADDR_IN6 *a, CONST SOCKADDR_IN6 *b)
667
+ {
668
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
669
+ return (BOOLEAN)(a->sin6_scope_id == b->sin6_scope_id &&
670
+ IN6_ADDR_EQUAL(&a->sin6_addr, &b->sin6_addr));
671
+ }
672
+
673
+ WS2TCPIP_INLINE
674
+ BOOLEAN
675
+ IN6ADDR_ISUNSPECIFIED(CONST SOCKADDR_IN6 *a)
676
+ {
677
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
678
+ return (BOOLEAN)(a->sin6_scope_id == 0 &&
679
+ IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr));
680
+ }
681
+
682
+ #endif // __midl
683
+
684
+ #endif // (NTDDI_VERSION >= NTDDI_WIN2KSP1)
685
+
686
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
687
+ #pragma endregion
688
+
689
+ //
690
+ // TCP/IP specific Ioctl codes.
691
+ //
692
+ #define SIO_GET_INTERFACE_LIST _IOR('t', 127, ULONG)
693
+ #define SIO_GET_INTERFACE_LIST_EX _IOR('t', 126, ULONG)
694
+ #define SIO_SET_MULTICAST_FILTER _IOW('t', 125, ULONG)
695
+ #define SIO_GET_MULTICAST_FILTER _IOW('t', 124 | IOC_IN, ULONG)
696
+ #define SIOCSIPMSFILTER SIO_SET_MULTICAST_FILTER
697
+ #define SIOCGIPMSFILTER SIO_GET_MULTICAST_FILTER
698
+
699
+ //
700
+ // Protocol independent ioctls for setting and retrieving multicast filters.
701
+ //
702
+ #define SIOCSMSFILTER _IOW('t', 126, ULONG)
703
+ #define SIOCGMSFILTER _IOW('t', 127 | IOC_IN, ULONG)
704
+
705
+ #if (NTDDI_VERSION >= NTDDI_VISTASP1)
706
+
707
+ #define IDEAL_SEND_BACKLOG_IOCTLS
708
+
709
+ //
710
+ // Query and change notification ioctls for the ideal send backlog size
711
+ // for a given connection. Clients should use the wrappers defined in
712
+ // ws2tcpip.h rather than using these ioctls directly.
713
+ //
714
+
715
+ #define SIO_IDEAL_SEND_BACKLOG_QUERY _IOR('t', 123, ULONG)
716
+ #define SIO_IDEAL_SEND_BACKLOG_CHANGE _IO('t', 122)
717
+
718
+ #endif
719
+
720
+ //
721
+ // Protocol independent multicast source filter options.
722
+ //
723
+ #define MCAST_JOIN_GROUP 41 // Join all sources for a group.
724
+ #define MCAST_LEAVE_GROUP 42 // Drop all sources for a group.
725
+ #define MCAST_BLOCK_SOURCE 43 // Block IP group/source.
726
+ #define MCAST_UNBLOCK_SOURCE 44 // Unblock IP group/source.
727
+ #define MCAST_JOIN_SOURCE_GROUP 45 // Join IP group/source.
728
+ #define MCAST_LEAVE_SOURCE_GROUP 46 // Leave IP group/source.
729
+
730
+ //
731
+ // Definitions of MCAST_INCLUDE and MCAST_EXCLUDE for multicast source filter.
732
+ //
733
+ typedef enum {
734
+ MCAST_INCLUDE = 0,
735
+ MCAST_EXCLUDE
736
+ } MULTICAST_MODE_TYPE;
737
+
738
+ //
739
+ // Structure for IP_MREQ (used by IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP).
740
+ //
741
+ typedef struct ip_mreq {
742
+ IN_ADDR imr_multiaddr; // IP multicast address of group.
743
+ IN_ADDR imr_interface; // Local IP address of interface.
744
+ } IP_MREQ, *PIP_MREQ;
745
+
746
+ //
747
+ // Structure for IP_MREQ_SOURCE (used by IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE
748
+ // etc.).
749
+ //
750
+ typedef struct ip_mreq_source {
751
+ IN_ADDR imr_multiaddr; // IP multicast address of group.
752
+ IN_ADDR imr_sourceaddr; // IP address of source.
753
+ IN_ADDR imr_interface; // Local IP address of interface.
754
+ } IP_MREQ_SOURCE, *PIP_MREQ_SOURCE;
755
+
756
+ //
757
+ // Structure for IP_MSFILTER (used by SIOCSIPMSFILTER and SIOCGIPMSFILTER).
758
+ //
759
+ typedef struct ip_msfilter {
760
+ IN_ADDR imsf_multiaddr; // IP multicast address of group.
761
+ IN_ADDR imsf_interface; // Local IP address of interface.
762
+ MULTICAST_MODE_TYPE imsf_fmode; // Filter mode.
763
+ ULONG imsf_numsrc; // Number of sources in src_list.
764
+ IN_ADDR imsf_slist[1]; // Start of source list.
765
+ } IP_MSFILTER, *PIP_MSFILTER;
766
+
767
+ #define IP_MSFILTER_SIZE(NumSources) \
768
+ (sizeof(IP_MSFILTER) - sizeof(IN_ADDR) + (NumSources) * sizeof(IN_ADDR))
769
+
770
+ //
771
+ // Options to use with [gs]etsockopt at the IPPROTO_IPV6 level.
772
+ // These are specified in RFCs 3493 and 3542.
773
+ // The values should be consistent with the IPv6 equivalents.
774
+ //
775
+ #define IPV6_HOPOPTS 1 // Set/get IPv6 hop-by-hop options.
776
+ #define IPV6_HDRINCL 2 // Header is included with data.
777
+ #define IPV6_UNICAST_HOPS 4 // IP unicast hop limit.
778
+ #define IPV6_MULTICAST_IF 9 // IP multicast interface.
779
+ #define IPV6_MULTICAST_HOPS 10 // IP multicast hop limit.
780
+ #define IPV6_MULTICAST_LOOP 11 // IP multicast loopback.
781
+ #define IPV6_ADD_MEMBERSHIP 12 // Add an IP group membership.
782
+ #define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
783
+ #define IPV6_DROP_MEMBERSHIP 13 // Drop an IP group membership.
784
+ #define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
785
+ #define IPV6_DONTFRAG 14 // Don't fragment IP datagrams.
786
+ #define IPV6_PKTINFO 19 // Receive packet information.
787
+ #define IPV6_HOPLIMIT 21 // Receive packet hop limit.
788
+ #define IPV6_PROTECTION_LEVEL 23 // Set/get IPv6 protection level.
789
+ #define IPV6_RECVIF 24 // Receive arrival interface.
790
+ #define IPV6_RECVDSTADDR 25 // Receive destination address.
791
+ #define IPV6_CHECKSUM 26 // Offset to checksum for raw IP socket send.
792
+ #define IPV6_V6ONLY 27 // Treat wildcard bind as AF_INET6-only.
793
+ #define IPV6_IFLIST 28 // Enable/Disable an interface list.
794
+ #define IPV6_ADD_IFLIST 29 // Add an interface list entry.
795
+ #define IPV6_DEL_IFLIST 30 // Delete an interface list entry.
796
+ #define IPV6_UNICAST_IF 31 // IP unicast interface.
797
+ #define IPV6_RTHDR 32 // Set/get IPv6 routing header.
798
+ #define IPV6_GET_IFLIST 33 // Get an interface list.
799
+ #define IPV6_RECVRTHDR 38 // Receive the routing header.
800
+ #define IPV6_TCLASS 39 // Packet traffic class.
801
+ #define IPV6_RECVTCLASS 40 // Receive packet traffic class.
802
+ #define IPV6_ECN 50 // IPv6 ECN codepoint.
803
+ #define IPV6_RECVECN 50 // Receive ECN codepoints in the IPv6 header.
804
+ #define IPV6_PKTINFO_EX 51 // Receive extended packet information.
805
+ #define IPV6_WFP_REDIRECT_RECORDS 60 // WFP's Connection Redirect Records
806
+ #define IPV6_WFP_REDIRECT_CONTEXT 70 // WFP's Connection Redirect Context
807
+ #define IPV6_MTU_DISCOVER 71 // Set/get path MTU discover state.
808
+ #define IPV6_MTU 72 // Get path MTU.
809
+ #define IPV6_NRT_INTERFACE 74 // Set NRT interface constraint (outbound).
810
+ #define IPV6_RECVERR 75 // Receive ICMPv6 errors.
811
+ #define IPV6_USER_MTU 76 // Set/get app defined upper bound IP layer MTU.
812
+
813
+ #define IP_UNSPECIFIED_HOP_LIMIT -1
814
+
815
+ #define IP_PROTECTION_LEVEL IPV6_PROTECTION_LEVEL
816
+ //
817
+ // Values of IPV6_PROTECTION_LEVEL.
818
+ //
819
+ #define PROTECTION_LEVEL_UNRESTRICTED 10 // For peer-to-peer apps.
820
+ #define PROTECTION_LEVEL_EDGERESTRICTED 20 // Same as unrestricted. Except for
821
+ // Teredo.
822
+ #define PROTECTION_LEVEL_RESTRICTED 30 // For Intranet apps.
823
+
824
+ #if (NTDDI_VERSION < NTDDI_VISTA)
825
+ #define PROTECTION_LEVEL_DEFAULT PROTECTION_LEVEL_EDGERESTRICTED
826
+ #else
827
+ #define PROTECTION_LEVEL_DEFAULT ((UINT)-1)
828
+ #endif
829
+ //
830
+ // Structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP (also,
831
+ // IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP).
832
+ //
833
+ typedef struct ipv6_mreq {
834
+ IN6_ADDR ipv6mr_multiaddr; // IPv6 multicast address.
835
+ ULONG ipv6mr_interface; // Interface index.
836
+ } IPV6_MREQ, *PIPV6_MREQ;
837
+
838
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
839
+ //
840
+ // Structure for GROUP_REQ used by protocol independent source filters
841
+ // (MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP).
842
+ //
843
+ typedef struct group_req {
844
+ ULONG gr_interface; // Interface index.
845
+ SOCKADDR_STORAGE gr_group; // Multicast address.
846
+ } GROUP_REQ, *PGROUP_REQ;
847
+
848
+ //
849
+ // Structure for GROUP_SOURCE_REQ used by protocol independent source filters
850
+ // (MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP etc.).
851
+ //
852
+ typedef struct group_source_req {
853
+ ULONG gsr_interface; // Interface index.
854
+ SOCKADDR_STORAGE gsr_group; // Group address.
855
+ SOCKADDR_STORAGE gsr_source; // Source address.
856
+ } GROUP_SOURCE_REQ, *PGROUP_SOURCE_REQ;
857
+
858
+ //
859
+ // Structure for GROUP_FILTER used by protocol independent source filters
860
+ // (SIOCSMSFILTER and SIOCGMSFILTER).
861
+ //
862
+ typedef struct group_filter {
863
+ ULONG gf_interface; // Interface index.
864
+ SOCKADDR_STORAGE gf_group; // Multicast address.
865
+ MULTICAST_MODE_TYPE gf_fmode; // Filter mode.
866
+ ULONG gf_numsrc; // Number of sources.
867
+ SOCKADDR_STORAGE gf_slist[1]; // Source address.
868
+ } GROUP_FILTER, *PGROUP_FILTER;
869
+
870
+ #define GROUP_FILTER_SIZE(numsrc) \
871
+ (sizeof(GROUP_FILTER) - sizeof(SOCKADDR_STORAGE) \
872
+ + (numsrc) * sizeof(SOCKADDR_STORAGE))
873
+ #endif
874
+
875
+ //
876
+ // Structure for IP_PKTINFO option.
877
+ //
878
+ typedef struct in_pktinfo {
879
+ IN_ADDR ipi_addr; // Source/destination IPv4 address.
880
+ ULONG ipi_ifindex; // Send/receive interface index.
881
+ } IN_PKTINFO, *PIN_PKTINFO;
882
+
883
+ #ifndef MIDL_PASS
884
+ C_ASSERT(sizeof(IN_PKTINFO) == 8);
885
+ #endif
886
+
887
+ //
888
+ // Structure for IPV6_PKTINFO option.
889
+ //
890
+ typedef struct in6_pktinfo {
891
+ IN6_ADDR ipi6_addr; // Source/destination IPv6 address.
892
+ ULONG ipi6_ifindex; // Send/receive interface index.
893
+ } IN6_PKTINFO, *PIN6_PKTINFO;
894
+
895
+ #ifndef MIDL_PASS
896
+ C_ASSERT(sizeof(IN6_PKTINFO) == 20);
897
+ #endif
898
+
899
+ //
900
+ // Structure for IP_PKTINFO_EX option.
901
+ //
902
+ typedef struct in_pktinfo_ex {
903
+ IN_PKTINFO pkt_info;
904
+ SCOPE_ID scope_id;
905
+ } IN_PKTINFO_EX, *PIN_PKTINFO_EX;
906
+
907
+ #ifndef MIDL_PASS
908
+ C_ASSERT(sizeof(IN_PKTINFO_EX) == 12);
909
+ #endif
910
+
911
+ //
912
+ // Structure for IPV6_PKTINFO_EX option.
913
+ //
914
+ typedef struct in6_pktinfo_ex {
915
+ IN6_PKTINFO pkt_info;
916
+ SCOPE_ID scope_id;
917
+ } IN6_PKTINFO_EX, *PIN6_PKTINFO_EX;
918
+
919
+ #ifndef MIDL_PASS
920
+ C_ASSERT(sizeof(IN6_PKTINFO_EX) == 24);
921
+ #endif
922
+
923
+ //
924
+ // Structure for IP_RECVERR option.
925
+ //
926
+ typedef struct in_recverr {
927
+ IPPROTO protocol; // IPPROTO_ICMP or IPPROTO_ICMPV6.
928
+ ULONG info; // MTU if frag needed or pkt too big message.
929
+ UINT8 type;
930
+ UINT8 code;
931
+ } IN_RECVERR, *PIN_RECVERR;
932
+
933
+ //
934
+ // Maximum length of address literals (potentially including a port number)
935
+ // generated by any address-to-string conversion routine. This length can
936
+ // be used when declaring buffers used with getnameinfo, WSAAddressToString,
937
+ // inet_ntoa, etc. We just provide one define, rather than one per api,
938
+ // to avoid confusion.
939
+ //
940
+ // The totals are derived from the following data:
941
+ // 15: IPv4 address
942
+ // 45: IPv6 address including embedded IPv4 address
943
+ // 11: Scope Id
944
+ // 2: Brackets around IPv6 address when port is present
945
+ // 6: Port (including colon)
946
+ // 1: Terminating null byte
947
+ //
948
+ #define INET_ADDRSTRLEN 22
949
+ #define INET6_ADDRSTRLEN 65
950
+
951
+
952
+
953
+ //
954
+ // Options to use with [gs]etsockopt at the IPPROTO_TCP level.
955
+ // TCP_NODELAY is defined in ws2def.h for historical reasons.
956
+ //
957
+
958
+ //
959
+ // Offload preferences supported.
960
+ //
961
+ #define TCP_OFFLOAD_NO_PREFERENCE 0
962
+ #define TCP_OFFLOAD_NOT_PREFERRED 1
963
+ #define TCP_OFFLOAD_PREFERRED 2
964
+
965
+ // TCP_NODELAY 0x0001
966
+ #define TCP_EXPEDITED_1122 0x0002
967
+ #define TCP_KEEPALIVE 3
968
+ #define TCP_MAXSEG 4
969
+ #define TCP_MAXRT 5
970
+ #define TCP_STDURG 6
971
+ #define TCP_NOURG 7
972
+ #define TCP_ATMARK 8
973
+ #define TCP_NOSYNRETRIES 9
974
+ #define TCP_TIMESTAMPS 10
975
+ #define TCP_OFFLOAD_PREFERENCE 11
976
+ #define TCP_CONGESTION_ALGORITHM 12
977
+ #define TCP_DELAY_FIN_ACK 13
978
+ #define TCP_MAXRTMS 14
979
+ #define TCP_FASTOPEN 15
980
+ #define TCP_KEEPCNT 16
981
+ #define TCP_KEEPIDLE TCP_KEEPALIVE
982
+ #define TCP_KEEPINTVL 17
983
+ #define TCP_FAIL_CONNECT_ON_ICMP_ERROR 18
984
+ #define TCP_ICMP_ERROR_INFO 19
985
+
986
+ //
987
+ // Structure for TCP_ICMP_ERROR_INFO option.
988
+ //
989
+ typedef struct icmp_error_info {
990
+ SOCKADDR_INET srcaddress;
991
+ IPPROTO protocol;
992
+ UINT8 type;
993
+ UINT8 code;
994
+ } ICMP_ERROR_INFO, *PICMP_ERROR_INFO;
995
+
996
+
997
+ //
998
+ // Options to use with [gs]etsockopt at the IPPROTO_UDP level.
999
+ // UDP_NOCHECKSUM is defined in ws2tcpip.h for historical reasons.
1000
+ // UDP_CHECKSUM_COVERAGE is defined in ws2tcpip.h for historical reasons.
1001
+ //
1002
+
1003
+ // UDP_NOCHECKSUM 1
1004
+ #define UDP_SEND_MSG_SIZE 2
1005
+ #define UDP_RECV_MAX_COALESCED_SIZE 3
1006
+ // UDP_CHECKSUM_COVERAGE 20
1007
+
1008
+ //
1009
+ // Control message types at the IPPROTO_UDP level.
1010
+ //
1011
+
1012
+ #define UDP_COALESCED_INFO 3
1013
+
1014
+
1015
+ #ifdef _PREFAST_
1016
+ #pragma prefast(pop)
1017
+ #endif
1018
+
1019
+ #pragma warning(pop)
1020
+
1021
+ #pragma region Desktop Family or OneCore Family or Games Family
1022
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
1023
+ #ifdef __cplusplus
1024
+ }
1025
+ #endif /* __cplusplus */
1026
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
1027
+ #pragma endregion
1028
+
1029
+ #endif
msvc/Windows Kits/10/Include/10.0.26100.0/shared/wtypes.h ADDED
@@ -0,0 +1,969 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ /* this ALWAYS GENERATED file contains the definitions for the interfaces */
4
+
5
+
6
+ /* File created by MIDL compiler version 8.01.0628 */
7
+ /* @@MIDL_FILE_HEADING( ) */
8
+
9
+
10
+
11
+ /* verify that the <rpcndr.h> version is high enough to compile this file*/
12
+ #ifndef __REQUIRED_RPCNDR_H_VERSION__
13
+ #define __REQUIRED_RPCNDR_H_VERSION__ 501
14
+ #endif
15
+
16
+ /* verify that the <rpcsal.h> version is high enough to compile this file*/
17
+ #ifndef __REQUIRED_RPCSAL_H_VERSION__
18
+ #define __REQUIRED_RPCSAL_H_VERSION__ 100
19
+ #endif
20
+
21
+ #include "rpc.h"
22
+ #include "rpcndr.h"
23
+
24
+ #ifndef __RPCNDR_H_VERSION__
25
+ #error this stub requires an updated version of <rpcndr.h>
26
+ #endif /* __RPCNDR_H_VERSION__ */
27
+
28
+
29
+ #ifndef __wtypes_h__
30
+ #define __wtypes_h__
31
+
32
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
33
+ #pragma once
34
+ #endif
35
+
36
+ #ifndef DECLSPEC_XFGVIRT
37
+ #if defined(_CONTROL_FLOW_GUARD_XFG)
38
+ #define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
39
+ #else
40
+ #define DECLSPEC_XFGVIRT(base, func)
41
+ #endif
42
+ #endif
43
+
44
+ /* Forward Declarations */
45
+
46
+ /* header files for imported files */
47
+ #include "wtypesbase.h"
48
+
49
+ #ifdef __cplusplus
50
+ extern "C"{
51
+ #endif
52
+
53
+
54
+ /* interface __MIDL_itf_wtypes_0000_0000 */
55
+ /* [local] */
56
+
57
+ //+-------------------------------------------------------------------------
58
+ //
59
+ // Microsoft Windows
60
+ // Copyright (c) Microsoft Corporation. All rights reserved.
61
+ //
62
+ //--------------------------------------------------------------------------
63
+ #if ( _MSC_VER >= 1020 )
64
+ #pragma once
65
+ #endif
66
+ #if _MSC_VER >= 1200
67
+ #pragma warning(push)
68
+ #pragma warning(disable:4820) /* padding added after data member */
69
+ #endif
70
+
71
+
72
+ extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0000_v0_0_c_ifspec;
73
+ extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0000_v0_0_s_ifspec;
74
+
75
+ #ifndef __IWinTypes_INTERFACE_DEFINED__
76
+ #define __IWinTypes_INTERFACE_DEFINED__
77
+
78
+ /* interface IWinTypes */
79
+ /* [unique][version][uuid] */
80
+
81
+ typedef struct tagRemHGLOBAL
82
+ {
83
+ LONG fNullHGlobal;
84
+ ULONG cbData;
85
+ /* [size_is] */ byte data[ 1 ];
86
+ } RemHGLOBAL;
87
+
88
+ typedef struct tagRemHMETAFILEPICT
89
+ {
90
+ LONG mm;
91
+ LONG xExt;
92
+ LONG yExt;
93
+ ULONG cbData;
94
+ /* [size_is] */ byte data[ 1 ];
95
+ } RemHMETAFILEPICT;
96
+
97
+ typedef struct tagRemHENHMETAFILE
98
+ {
99
+ ULONG cbData;
100
+ /* [size_is] */ byte data[ 1 ];
101
+ } RemHENHMETAFILE;
102
+
103
+ typedef struct tagRemHBITMAP
104
+ {
105
+ ULONG cbData;
106
+ /* [size_is] */ byte data[ 1 ];
107
+ } RemHBITMAP;
108
+
109
+ typedef struct tagRemHPALETTE
110
+ {
111
+ ULONG cbData;
112
+ /* [size_is] */ byte data[ 1 ];
113
+ } RemHPALETTE;
114
+
115
+ typedef struct tagRemBRUSH
116
+ {
117
+ ULONG cbData;
118
+ /* [size_is] */ byte data[ 1 ];
119
+ } RemHBRUSH;
120
+
121
+ #if !defined(_WIN32) && !defined(_MPPC_)
122
+ // The following code is for Win16 only
123
+ #ifndef WINAPI // If not included with 3.1 headers...
124
+ #define FAR _far
125
+ #define PASCAL _pascal
126
+ #define CDECL _cdecl
127
+ #define VOID void
128
+ #define WINAPI FAR PASCAL
129
+ #define CALLBACK FAR PASCAL
130
+ #ifndef FALSE
131
+ #define FALSE 0
132
+ #define TRUE 1
133
+ #endif // !FALSE
134
+ #ifndef _BYTE_DEFINED
135
+ #define _BYTE_DEFINED
136
+ typedef byte BYTE;
137
+ #endif // !_BYTE_DEFINED
138
+ #ifndef _WORD_DEFINED
139
+ #define _WORD_DEFINED
140
+ typedef unsigned short WORD;
141
+ #endif // !_WORD_DEFINED
142
+ typedef unsigned int UINT;
143
+ typedef int INT;
144
+ typedef long BOOL;
145
+ #ifndef _LONG_DEFINED
146
+ #define _LONG_DEFINED
147
+ typedef long LONG;
148
+ #endif // !_LONG_DEFINED
149
+ #ifndef _WPARAM_DEFINED
150
+ #define _WPARAM_DEFINED
151
+ typedef UINT_PTR WPARAM;
152
+
153
+ #endif // _WPARAM_DEFINED
154
+ #ifndef _DWORD_DEFINED
155
+ #define _DWORD_DEFINED
156
+ typedef unsigned long DWORD;
157
+ #endif // !_DWORD_DEFINED
158
+ #ifndef _LPARAM_DEFINED
159
+ #define _LPARAM_DEFINED
160
+ typedef LONG_PTR LPARAM;
161
+
162
+ #endif // !_LPARAM_DEFINED
163
+ #ifndef _LRESULT_DEFINED
164
+ #define _LRESULT_DEFINED
165
+ typedef LONG_PTR LRESULT;
166
+
167
+ #endif // !_LRESULT_DEFINED
168
+ typedef void * HANDLE;
169
+ typedef void *HMODULE;
170
+
171
+ typedef void *HINSTANCE;
172
+
173
+ typedef void *HTASK;
174
+
175
+ typedef void *HKEY;
176
+
177
+ typedef void *HDESK;
178
+
179
+ typedef void *HMF;
180
+
181
+ typedef void *HEMF;
182
+
183
+ typedef void *HPEN;
184
+
185
+ typedef void *HRSRC;
186
+
187
+ typedef void *HSTR;
188
+
189
+ typedef void *HWINSTA;
190
+
191
+ typedef void *HKL;
192
+
193
+ typedef void *HGDIOBJ;
194
+
195
+ typedef HANDLE HDWP;
196
+
197
+ #ifndef _HFILE_DEFINED
198
+ #define _HFILE_DEFINED
199
+ typedef INT HFILE;
200
+
201
+ #endif // !_HFILE_DEFINED
202
+ #ifndef _LPWORD_DEFINED
203
+ #define _LPWORD_DEFINED
204
+ typedef WORD *LPWORD;
205
+ #endif // !_LPWORD_DEFINED
206
+ #ifndef _LPDWORD_DEFINED
207
+ #define _LPDWORD_DEFINED
208
+ typedef DWORD *LPDWORD;
209
+ #endif // !_LPDWORD_DEFINED
210
+ typedef char CHAR;
211
+ typedef CHAR *LPSTR;
212
+ typedef const CHAR *LPCSTR;
213
+ #ifndef _WCHAR_DEFINED
214
+ #define _WCHAR_DEFINED
215
+ typedef wchar_t WCHAR;
216
+ typedef WCHAR TCHAR;
217
+ #endif // !_WCHAR_DEFINED
218
+ typedef WCHAR *LPWSTR;
219
+ typedef TCHAR *LPTSTR;
220
+ typedef const WCHAR *LPCWSTR;
221
+ typedef const TCHAR *LPCTSTR;
222
+ #ifndef _COLORREF_DEFINED
223
+ #define _COLORREF_DEFINED
224
+ typedef DWORD COLORREF;
225
+
226
+ #endif // !_COLORREF_DEFINED
227
+ #ifndef _LPCOLORREF_DEFINED
228
+ #define _LPCOLORREF_DEFINED
229
+ typedef DWORD *LPCOLORREF;
230
+
231
+ #endif // !_LPCOLORREF_DEFINED
232
+ typedef HANDLE *LPHANDLE;
233
+ typedef struct _RECTL
234
+ {
235
+ LONG left;
236
+ LONG top;
237
+ LONG right;
238
+ LONG bottom;
239
+ } RECTL;
240
+
241
+ typedef struct _RECTL *PRECTL;
242
+
243
+ typedef struct _RECTL *LPRECTL;
244
+
245
+ typedef struct tagPOINT
246
+ {
247
+ LONG x;
248
+ LONG y;
249
+ } POINT;
250
+
251
+ typedef struct tagPOINT *PPOINT;
252
+
253
+ typedef struct tagPOINT *LPPOINT;
254
+
255
+ typedef struct _POINTL
256
+ {
257
+ LONG x;
258
+ LONG y;
259
+ } POINTL;
260
+
261
+ typedef struct _POINTL *PPOINTL;
262
+
263
+ #ifndef WIN16
264
+ typedef struct tagSIZE
265
+ {
266
+ LONG cx;
267
+ LONG cy;
268
+ } SIZE;
269
+
270
+ typedef struct tagSIZE *PSIZE;
271
+
272
+ typedef struct tagSIZE *LPSIZE;
273
+
274
+ #else // WIN16
275
+ typedef struct tagSIZE
276
+ {
277
+ INT cx;
278
+ INT cy;
279
+ } SIZE, *PSIZE, *LPSIZE;
280
+ #endif // WIN16
281
+ typedef struct tagSIZEL
282
+ {
283
+ LONG cx;
284
+ LONG cy;
285
+ } SIZEL;
286
+
287
+ typedef struct tagSIZEL *PSIZEL;
288
+
289
+ typedef struct tagSIZEL *LPSIZEL;
290
+
291
+ #endif //WINAPI
292
+ #endif //!WIN32 && !MPPC
293
+ #ifndef _PALETTEENTRY_DEFINED
294
+ #define _PALETTEENTRY_DEFINED
295
+ typedef struct tagPALETTEENTRY
296
+ {
297
+ BYTE peRed;
298
+ BYTE peGreen;
299
+ BYTE peBlue;
300
+ BYTE peFlags;
301
+ } PALETTEENTRY;
302
+
303
+ typedef struct tagPALETTEENTRY *PPALETTEENTRY;
304
+
305
+ typedef struct tagPALETTEENTRY *LPPALETTEENTRY;
306
+
307
+ #endif // !_PALETTEENTRY_DEFINED
308
+ #ifndef _LOGPALETTE_DEFINED
309
+ #define _LOGPALETTE_DEFINED
310
+ typedef struct tagLOGPALETTE
311
+ {
312
+ WORD palVersion;
313
+ WORD palNumEntries;
314
+ /* [size_is] */ PALETTEENTRY palPalEntry[ 1 ];
315
+ } LOGPALETTE;
316
+
317
+ typedef struct tagLOGPALETTE *PLOGPALETTE;
318
+
319
+ typedef struct tagLOGPALETTE *LPLOGPALETTE;
320
+
321
+ #endif // !_LOGPALETTE_DEFINED
322
+ #ifndef _WINDEF_
323
+ typedef const RECTL *LPCRECTL;
324
+
325
+ typedef struct tagRECT
326
+ {
327
+ LONG left;
328
+ LONG top;
329
+ LONG right;
330
+ LONG bottom;
331
+ } RECT;
332
+
333
+ typedef struct tagRECT *PRECT;
334
+
335
+ typedef struct tagRECT *LPRECT;
336
+
337
+ typedef const RECT *LPCRECT;
338
+
339
+ #endif //_WINDEF_
340
+ #if 0
341
+ typedef FMTID *REFFMTID;
342
+
343
+ #endif // 0
344
+ #ifndef _ROTFLAGS_DEFINED
345
+ #define _ROTFLAGS_DEFINED
346
+ #define ROTFLAGS_REGISTRATIONKEEPSALIVE 0x1
347
+ #define ROTFLAGS_ALLOWANYCLIENT 0x2
348
+ #endif // !_ROTFLAGS_DEFINED
349
+ #ifndef _ROT_COMPARE_MAX_DEFINED
350
+ #define _ROT_COMPARE_MAX_DEFINED
351
+ #define ROT_COMPARE_MAX 2048
352
+ #endif // !_ROT_COMPARE_MAX_DEFINED
353
+ typedef
354
+ enum tagDVASPECT
355
+ {
356
+ DVASPECT_CONTENT = 1,
357
+ DVASPECT_THUMBNAIL = 2,
358
+ DVASPECT_ICON = 4,
359
+ DVASPECT_DOCPRINT = 8
360
+ } DVASPECT;
361
+
362
+ typedef
363
+ enum tagSTGC
364
+ {
365
+ STGC_DEFAULT = 0,
366
+ STGC_OVERWRITE = 1,
367
+ STGC_ONLYIFCURRENT = 2,
368
+ STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
369
+ STGC_CONSOLIDATE = 8
370
+ } STGC;
371
+
372
+ typedef
373
+ enum tagSTGMOVE
374
+ {
375
+ STGMOVE_MOVE = 0,
376
+ STGMOVE_COPY = 1,
377
+ STGMOVE_SHALLOWCOPY = 2
378
+ } STGMOVE;
379
+
380
+ typedef
381
+ enum tagSTATFLAG
382
+ {
383
+ STATFLAG_DEFAULT = 0,
384
+ STATFLAG_NONAME = 1,
385
+ STATFLAG_NOOPEN = 2
386
+ } STATFLAG;
387
+
388
+ typedef /* [context_handle] */ void *HCONTEXT;
389
+
390
+ #ifndef _LCID_DEFINED
391
+ #define _LCID_DEFINED
392
+ typedef DWORD LCID;
393
+
394
+ #endif // !_LCID_DEFINED
395
+ #ifndef _LANGID_DEFINED
396
+ #define _LANGID_DEFINED
397
+ typedef USHORT LANGID;
398
+
399
+ #endif // !_LANGID_DEFINED
400
+ #define WDT_INPROC_CALL ( 0x48746457 )
401
+
402
+ #define WDT_REMOTE_CALL ( 0x52746457 )
403
+
404
+ #define WDT_INPROC64_CALL ( 0x50746457 )
405
+
406
+ typedef struct _userCLIPFORMAT
407
+ {
408
+ LONG fContext;
409
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0001
410
+ {
411
+ /* [case()] */ DWORD dwValue;
412
+ /* [case()][string] */ wchar_t *pwszName;
413
+ } u;
414
+ } userCLIPFORMAT;
415
+
416
+ typedef /* [unique] */ __RPC_unique_pointer userCLIPFORMAT *wireCLIPFORMAT;
417
+
418
+ typedef /* [wire_marshal] */ WORD CLIPFORMAT;
419
+
420
+ typedef struct _GDI_NONREMOTE
421
+ {
422
+ LONG fContext;
423
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0002
424
+ {
425
+ /* [case()] */ LONG hInproc;
426
+ /* [case()] */ DWORD_BLOB *hRemote;
427
+ } u;
428
+ } GDI_NONREMOTE;
429
+
430
+ typedef struct _userHGLOBAL
431
+ {
432
+ LONG fContext;
433
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0003
434
+ {
435
+ /* [case()] */ LONG hInproc;
436
+ /* [case()] */ FLAGGED_BYTE_BLOB *hRemote;
437
+ /* [case()] */ __int64 hInproc64;
438
+ } u;
439
+ } userHGLOBAL;
440
+
441
+ typedef /* [unique] */ __RPC_unique_pointer userHGLOBAL *wireHGLOBAL;
442
+
443
+ typedef struct _userHMETAFILE
444
+ {
445
+ LONG fContext;
446
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0004
447
+ {
448
+ /* [case()] */ LONG hInproc;
449
+ /* [case()] */ BYTE_BLOB *hRemote;
450
+ /* [case()] */ __int64 hInproc64;
451
+ } u;
452
+ } userHMETAFILE;
453
+
454
+ typedef struct _remoteMETAFILEPICT
455
+ {
456
+ LONG mm;
457
+ LONG xExt;
458
+ LONG yExt;
459
+ userHMETAFILE *hMF;
460
+ } remoteMETAFILEPICT;
461
+
462
+ typedef struct _userHMETAFILEPICT
463
+ {
464
+ LONG fContext;
465
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0005
466
+ {
467
+ /* [case()] */ LONG hInproc;
468
+ /* [case()] */ remoteMETAFILEPICT *hRemote;
469
+ /* [case()] */ __int64 hInproc64;
470
+ } u;
471
+ } userHMETAFILEPICT;
472
+
473
+ typedef struct _userHENHMETAFILE
474
+ {
475
+ LONG fContext;
476
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0006
477
+ {
478
+ /* [case()] */ LONG hInproc;
479
+ /* [case()] */ BYTE_BLOB *hRemote;
480
+ /* [case()] */ __int64 hInproc64;
481
+ } u;
482
+ } userHENHMETAFILE;
483
+
484
+ typedef struct _userBITMAP
485
+ {
486
+ LONG bmType;
487
+ LONG bmWidth;
488
+ LONG bmHeight;
489
+ LONG bmWidthBytes;
490
+ WORD bmPlanes;
491
+ WORD bmBitsPixel;
492
+ ULONG cbSize;
493
+ /* [size_is] */ byte pBuffer[ 1 ];
494
+ } userBITMAP;
495
+
496
+ typedef struct _userHBITMAP
497
+ {
498
+ LONG fContext;
499
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0007
500
+ {
501
+ /* [case()] */ LONG hInproc;
502
+ /* [case()] */ userBITMAP *hRemote;
503
+ /* [case()] */ __int64 hInproc64;
504
+ } u;
505
+ } userHBITMAP;
506
+
507
+ typedef struct _userHPALETTE
508
+ {
509
+ LONG fContext;
510
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0008
511
+ {
512
+ /* [case()] */ LONG hInproc;
513
+ /* [case()] */ LOGPALETTE *hRemote;
514
+ /* [case()] */ __int64 hInproc64;
515
+ } u;
516
+ } userHPALETTE;
517
+
518
+ typedef struct _RemotableHandle
519
+ {
520
+ LONG fContext;
521
+ /* [switch_is] */ /* [switch_type] */ union __MIDL_IWinTypes_0009
522
+ {
523
+ /* [case()] */ LONG hInproc;
524
+ /* [case()] */ LONG hRemote;
525
+ } u;
526
+ } RemotableHandle;
527
+
528
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHWND;
529
+
530
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHMENU;
531
+
532
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHACCEL;
533
+
534
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHBRUSH;
535
+
536
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHFONT;
537
+
538
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHDC;
539
+
540
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHICON;
541
+
542
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHRGN;
543
+
544
+ typedef /* [unique] */ __RPC_unique_pointer RemotableHandle *wireHMONITOR;
545
+
546
+ #if 0
547
+ typedef /* [wire_marshal] */ void *HWND;
548
+
549
+ typedef /* [wire_marshal] */ void *HMENU;
550
+
551
+ typedef /* [wire_marshal] */ void *HACCEL;
552
+
553
+ typedef /* [wire_marshal] */ void *HBRUSH;
554
+
555
+ typedef /* [wire_marshal] */ void *HFONT;
556
+
557
+ typedef /* [wire_marshal] */ void *HDC;
558
+
559
+ typedef /* [wire_marshal] */ void *HICON;
560
+
561
+ typedef /* [wire_marshal] */ void *HRGN;
562
+
563
+ typedef /* [wire_marshal] */ void *HMONITOR;
564
+
565
+ #ifndef _HCURSOR_DEFINED
566
+ #define _HCURSOR_DEFINED
567
+ typedef HICON HCURSOR;
568
+
569
+ #endif // !_HCURSOR_DEFINED
570
+ #endif //0
571
+ #ifndef _TEXTMETRIC_DEFINED
572
+ #define _TEXTMETRIC_DEFINED
573
+ typedef struct tagTEXTMETRICW
574
+ {
575
+ LONG tmHeight;
576
+ LONG tmAscent;
577
+ LONG tmDescent;
578
+ LONG tmInternalLeading;
579
+ LONG tmExternalLeading;
580
+ LONG tmAveCharWidth;
581
+ LONG tmMaxCharWidth;
582
+ LONG tmWeight;
583
+ LONG tmOverhang;
584
+ LONG tmDigitizedAspectX;
585
+ LONG tmDigitizedAspectY;
586
+ WCHAR tmFirstChar;
587
+ WCHAR tmLastChar;
588
+ WCHAR tmDefaultChar;
589
+ WCHAR tmBreakChar;
590
+ BYTE tmItalic;
591
+ BYTE tmUnderlined;
592
+ BYTE tmStruckOut;
593
+ BYTE tmPitchAndFamily;
594
+ BYTE tmCharSet;
595
+ } TEXTMETRICW;
596
+
597
+ typedef struct tagTEXTMETRICW *PTEXTMETRICW;
598
+
599
+ typedef struct tagTEXTMETRICW *LPTEXTMETRICW;
600
+
601
+ #endif // !_TEXTMETRIC_DEFINED
602
+ #ifndef _WIN32 // The following code is for Win16 only
603
+ #ifndef WINAPI // If not included with 3.1 headers...
604
+ typedef struct tagMSG
605
+ {
606
+ HWND hwnd;
607
+ UINT message;
608
+ WPARAM wParam;
609
+ LPARAM lParam;
610
+ DWORD time;
611
+ POINT pt;
612
+ } MSG;
613
+
614
+ typedef struct tagMSG *PMSG;
615
+
616
+ typedef struct tagMSG *NPMSG;
617
+
618
+ typedef struct tagMSG *LPMSG;
619
+
620
+ #endif // _WIN32
621
+ #endif // WINAPI
622
+ typedef /* [unique] */ __RPC_unique_pointer userHBITMAP *wireHBITMAP;
623
+
624
+ typedef /* [unique] */ __RPC_unique_pointer userHPALETTE *wireHPALETTE;
625
+
626
+ typedef /* [unique] */ __RPC_unique_pointer userHENHMETAFILE *wireHENHMETAFILE;
627
+
628
+ typedef /* [unique] */ __RPC_unique_pointer userHMETAFILE *wireHMETAFILE;
629
+
630
+ typedef /* [unique] */ __RPC_unique_pointer userHMETAFILEPICT *wireHMETAFILEPICT;
631
+
632
+ #if 0
633
+ typedef /* [wire_marshal] */ void *HGLOBAL;
634
+
635
+ typedef HGLOBAL HLOCAL;
636
+
637
+ typedef /* [wire_marshal] */ void *HBITMAP;
638
+
639
+ typedef /* [wire_marshal] */ void *HPALETTE;
640
+
641
+ typedef /* [wire_marshal] */ void *HENHMETAFILE;
642
+
643
+ typedef /* [wire_marshal] */ void *HMETAFILE;
644
+
645
+ #endif //0
646
+ typedef /* [wire_marshal] */ void *HMETAFILEPICT;
647
+
648
+
649
+
650
+ extern RPC_IF_HANDLE IWinTypes_v0_1_c_ifspec;
651
+ extern RPC_IF_HANDLE IWinTypes_v0_1_s_ifspec;
652
+ #endif /* __IWinTypes_INTERFACE_DEFINED__ */
653
+
654
+ /* interface __MIDL_itf_wtypes_0000_0001 */
655
+ /* [local] */
656
+
657
+ #if ( _MSC_VER >= 800 )
658
+ #if _MSC_VER >= 1200
659
+ #pragma warning(push)
660
+ #endif
661
+ #pragma warning(disable:4201)
662
+ #endif
663
+ typedef double DATE;
664
+
665
+ #ifndef _tagCY_DEFINED
666
+ #define _tagCY_DEFINED
667
+ #define _CY_DEFINED
668
+ #if 0
669
+ /* the following isn't the real definition of CY, but it is */
670
+ /* what RPC knows how to remote */
671
+ typedef struct tagCY
672
+ {
673
+ LONGLONG int64;
674
+ } CY;
675
+
676
+ #else /* 0 */
677
+ /* real definition that makes the C++ compiler happy */
678
+ typedef union tagCY {
679
+ struct {
680
+ ULONG Lo;
681
+ LONG Hi;
682
+ } DUMMYSTRUCTNAME;
683
+ LONGLONG int64;
684
+ } CY;
685
+ #endif /* 0 */
686
+ #endif /* _tagCY_DEFINED */
687
+ typedef CY *LPCY;
688
+
689
+ #if 0 /* _tagDEC_DEFINED */
690
+ /* The following isn't the real definition of Decimal type, */
691
+ /* but it is what RPC knows how to remote */
692
+ typedef struct tagDEC
693
+ {
694
+ USHORT wReserved;
695
+ BYTE scale;
696
+ BYTE sign;
697
+ ULONG Hi32;
698
+ ULONGLONG Lo64;
699
+ } DECIMAL;
700
+
701
+ #else /* _tagDEC_DEFINED */
702
+ /* real definition that makes the C++ compiler happy */
703
+ typedef struct tagDEC {
704
+ USHORT wReserved;
705
+ union {
706
+ struct {
707
+ BYTE scale;
708
+ BYTE sign;
709
+ } DUMMYSTRUCTNAME;
710
+ USHORT signscale;
711
+ } DUMMYUNIONNAME;
712
+ ULONG Hi32;
713
+ union {
714
+ struct {
715
+ ULONG Lo32;
716
+ ULONG Mid32;
717
+ } DUMMYSTRUCTNAME2;
718
+ ULONGLONG Lo64;
719
+ } DUMMYUNIONNAME2;
720
+ } DECIMAL;
721
+ #define DECIMAL_NEG ((BYTE)0x80)
722
+ #define DECIMAL_SETZERO(dec) \
723
+ {(dec).Lo64 = 0; (dec).Hi32 = 0; (dec).signscale = 0;}
724
+ #endif /* _tagDEC_DEFINED */
725
+ typedef DECIMAL *LPDECIMAL;
726
+
727
+ #if ( _MSC_VER >= 800 )
728
+ #if _MSC_VER >= 1200
729
+ #pragma warning(pop)
730
+ #else
731
+ #pragma warning(default:4201)
732
+ #endif
733
+ #endif
734
+ typedef /* [unique] */ __RPC_unique_pointer FLAGGED_WORD_BLOB *wireBSTR;
735
+
736
+ #ifndef _PREFAST_
737
+ typedef /* [wire_marshal] */ OLECHAR *BSTR;
738
+
739
+ #else // _PREFAST_
740
+ typedef _Null_terminated_ OLECHAR *BSTR;
741
+ #endif
742
+ typedef BSTR *LPBSTR;
743
+
744
+ /* 0 == FALSE, -1 == TRUE */
745
+ typedef short VARIANT_BOOL;
746
+
747
+ /* The BSTRBLOB structure is used by some implementations */
748
+ /* of the IPropertyStorage interface when marshaling BSTRs */
749
+ /* on systems which don't support BSTR marshaling. */
750
+ #ifndef _tagBSTRBLOB_DEFINED
751
+ #define _tagBSTRBLOB_DEFINED
752
+ typedef struct tagBSTRBLOB
753
+ {
754
+ ULONG cbSize;
755
+ /* [size_is] */ BYTE *pData;
756
+ } BSTRBLOB;
757
+
758
+ typedef struct tagBSTRBLOB *LPBSTRBLOB;
759
+
760
+ #endif
761
+ #define VARIANT_TRUE ((VARIANT_BOOL)-1)
762
+ #define VARIANT_FALSE ((VARIANT_BOOL)0)
763
+ typedef struct tagCLIPDATA
764
+ {
765
+ ULONG cbSize;
766
+ LONG ulClipFmt;
767
+ /* [size_is] */ BYTE *pClipData;
768
+ } CLIPDATA;
769
+
770
+ // Macro to calculate the size of the above pClipData
771
+ #define CBPCLIPDATA(clipdata) ( (clipdata).cbSize - sizeof((clipdata).ulClipFmt) )
772
+ typedef unsigned short VARTYPE;
773
+
774
+ /*
775
+ * VARENUM usage key,
776
+ *
777
+ * * [V] - may appear in a VARIANT
778
+ * * [T] - may appear in a TYPEDESC
779
+ * * [P] - may appear in an OLE property set
780
+ * * [S] - may appear in a Safe Array
781
+ *
782
+ *
783
+ * VT_EMPTY [V] [P] nothing
784
+ * VT_NULL [V] [P] SQL style Null
785
+ * VT_I2 [V][T][P][S] 2 byte signed int
786
+ * VT_I4 [V][T][P][S] 4 byte signed int
787
+ * VT_R4 [V][T][P][S] 4 byte real
788
+ * VT_R8 [V][T][P][S] 8 byte real
789
+ * VT_CY [V][T][P][S] currency
790
+ * VT_DATE [V][T][P][S] date
791
+ * VT_BSTR [V][T][P][S] OLE Automation string
792
+ * VT_DISPATCH [V][T] [S] IDispatch *
793
+ * VT_ERROR [V][T][P][S] SCODE
794
+ * VT_BOOL [V][T][P][S] True=-1, False=0
795
+ * VT_VARIANT [V][T][P][S] VARIANT *
796
+ * VT_UNKNOWN [V][T] [S] IUnknown *
797
+ * VT_DECIMAL [V][T] [S] 16 byte fixed point
798
+ * VT_RECORD [V] [P][S] user defined type
799
+ * VT_I1 [V][T][P][s] signed char
800
+ * VT_UI1 [V][T][P][S] unsigned char
801
+ * VT_UI2 [V][T][P][S] unsigned short
802
+ * VT_UI4 [V][T][P][S] ULONG
803
+ * VT_I8 [T][P] signed 64-bit int
804
+ * VT_UI8 [T][P] unsigned 64-bit int
805
+ * VT_INT [V][T][P][S] signed machine int
806
+ * VT_UINT [V][T] [S] unsigned machine int
807
+ * VT_INT_PTR [T] signed machine register size width
808
+ * VT_UINT_PTR [T] unsigned machine register size width
809
+ * VT_VOID [T] C style void
810
+ * VT_HRESULT [T] Standard return type
811
+ * VT_PTR [T] pointer type
812
+ * VT_SAFEARRAY [T] (use VT_ARRAY in VARIANT)
813
+ * VT_CARRAY [T] C style array
814
+ * VT_USERDEFINED [T] user defined type
815
+ * VT_LPSTR [T][P] null terminated string
816
+ * VT_LPWSTR [T][P] wide null terminated string
817
+ * VT_FILETIME [P] FILETIME
818
+ * VT_BLOB [P] Length prefixed bytes
819
+ * VT_STREAM [P] Name of the stream follows
820
+ * VT_STORAGE [P] Name of the storage follows
821
+ * VT_STREAMED_OBJECT [P] Stream contains an object
822
+ * VT_STORED_OBJECT [P] Storage contains an object
823
+ * VT_VERSIONED_STREAM [P] Stream with a GUID version
824
+ * VT_BLOB_OBJECT [P] Blob contains an object
825
+ * VT_CF [P] Clipboard format
826
+ * VT_CLSID [P] A Class ID
827
+ * VT_VECTOR [P] simple counted array
828
+ * VT_ARRAY [V] SAFEARRAY*
829
+ * VT_BYREF [V] void* for local use
830
+ * VT_BSTR_BLOB Reserved for system use
831
+ */
832
+
833
+ enum VARENUM
834
+ {
835
+ VT_EMPTY = 0,
836
+ VT_NULL = 1,
837
+ VT_I2 = 2,
838
+ VT_I4 = 3,
839
+ VT_R4 = 4,
840
+ VT_R8 = 5,
841
+ VT_CY = 6,
842
+ VT_DATE = 7,
843
+ VT_BSTR = 8,
844
+ VT_DISPATCH = 9,
845
+ VT_ERROR = 10,
846
+ VT_BOOL = 11,
847
+ VT_VARIANT = 12,
848
+ VT_UNKNOWN = 13,
849
+ VT_DECIMAL = 14,
850
+ VT_I1 = 16,
851
+ VT_UI1 = 17,
852
+ VT_UI2 = 18,
853
+ VT_UI4 = 19,
854
+ VT_I8 = 20,
855
+ VT_UI8 = 21,
856
+ VT_INT = 22,
857
+ VT_UINT = 23,
858
+ VT_VOID = 24,
859
+ VT_HRESULT = 25,
860
+ VT_PTR = 26,
861
+ VT_SAFEARRAY = 27,
862
+ VT_CARRAY = 28,
863
+ VT_USERDEFINED = 29,
864
+ VT_LPSTR = 30,
865
+ VT_LPWSTR = 31,
866
+ VT_RECORD = 36,
867
+ VT_INT_PTR = 37,
868
+ VT_UINT_PTR = 38,
869
+ VT_FILETIME = 64,
870
+ VT_BLOB = 65,
871
+ VT_STREAM = 66,
872
+ VT_STORAGE = 67,
873
+ VT_STREAMED_OBJECT = 68,
874
+ VT_STORED_OBJECT = 69,
875
+ VT_BLOB_OBJECT = 70,
876
+ VT_CF = 71,
877
+ VT_CLSID = 72,
878
+ VT_VERSIONED_STREAM = 73,
879
+ VT_BSTR_BLOB = 0xfff,
880
+ VT_VECTOR = 0x1000,
881
+ VT_ARRAY = 0x2000,
882
+ VT_BYREF = 0x4000,
883
+ VT_RESERVED = 0x8000,
884
+ VT_ILLEGAL = 0xffff,
885
+ VT_ILLEGALMASKED = 0xfff,
886
+ VT_TYPEMASK = 0xfff
887
+ } ;
888
+ typedef ULONG PROPID;
889
+
890
+ #ifndef PROPERTYKEY_DEFINED
891
+ #define PROPERTYKEY_DEFINED
892
+ typedef struct _tagpropertykey
893
+ {
894
+ GUID fmtid;
895
+ DWORD pid;
896
+ } PROPERTYKEY;
897
+
898
+ #endif
899
+ typedef struct tagCSPLATFORM
900
+ {
901
+ DWORD dwPlatformId;
902
+ DWORD dwVersionHi;
903
+ DWORD dwVersionLo;
904
+ DWORD dwProcessorArch;
905
+ } CSPLATFORM;
906
+
907
+ typedef struct tagQUERYCONTEXT
908
+ {
909
+ DWORD dwContext;
910
+ CSPLATFORM Platform;
911
+ LCID Locale;
912
+ DWORD dwVersionHi;
913
+ DWORD dwVersionLo;
914
+ } QUERYCONTEXT;
915
+
916
+ typedef /* [v1_enum] */
917
+ enum tagTYSPEC
918
+ {
919
+ TYSPEC_CLSID = 0,
920
+ TYSPEC_FILEEXT = ( TYSPEC_CLSID + 1 ) ,
921
+ TYSPEC_MIMETYPE = ( TYSPEC_FILEEXT + 1 ) ,
922
+ TYSPEC_FILENAME = ( TYSPEC_MIMETYPE + 1 ) ,
923
+ TYSPEC_PROGID = ( TYSPEC_FILENAME + 1 ) ,
924
+ TYSPEC_PACKAGENAME = ( TYSPEC_PROGID + 1 ) ,
925
+ TYSPEC_OBJECTID = ( TYSPEC_PACKAGENAME + 1 )
926
+ } TYSPEC;
927
+
928
+ typedef /* [public] */ struct __MIDL___MIDL_itf_wtypes_0000_0001_0001
929
+ {
930
+ DWORD tyspec;
931
+ /* [switch_is] */ /* [switch_type] */ union __MIDL___MIDL_itf_wtypes_0000_0001_0005
932
+ {
933
+ /* [case()] */ CLSID clsid;
934
+ /* [case()] */ LPOLESTR pFileExt;
935
+ /* [case()] */ LPOLESTR pMimeType;
936
+ /* [case()] */ LPOLESTR pProgId;
937
+ /* [case()] */ LPOLESTR pFileName;
938
+ /* [case()] */ struct
939
+ {
940
+ LPOLESTR pPackageName;
941
+ GUID PolicyId;
942
+ } ByName;
943
+ /* [case()] */ struct
944
+ {
945
+ GUID ObjectId;
946
+ GUID PolicyId;
947
+ } ByObjectId;
948
+ } tagged_union;
949
+ } uCLSSPEC;
950
+
951
+ #if _MSC_VER >= 1200
952
+ #pragma warning(pop)
953
+ #endif
954
+
955
+
956
+ extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0001_v0_0_c_ifspec;
957
+ extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0001_v0_0_s_ifspec;
958
+
959
+ /* Additional Prototypes for ALL interfaces */
960
+
961
+ /* end of Additional Prototypes */
962
+
963
+ #ifdef __cplusplus
964
+ }
965
+ #endif
966
+
967
+ #endif
968
+
969
+
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/assert.h ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // assert.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // Defines the assert macro and related functionality.
7
+ //
8
+ #if defined _VCRT_BUILD && !defined _ASSERT_OK
9
+ #error assert.h not for CRT internal use
10
+ #endif
11
+
12
+ #include <corecrt.h>
13
+
14
+ #pragma warning(push)
15
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
+ _UCRT_DISABLE_CLANG_WARNINGS
17
+ _CRT_BEGIN_C_HEADER
18
+
19
+ #if _CRT_HAS_C11
20
+
21
+ #define static_assert _Static_assert
22
+
23
+ #endif // _CRT_HAS_C11
24
+
25
+ #undef assert
26
+
27
+ #ifdef NDEBUG
28
+
29
+ #define assert(expression) ((void)0)
30
+
31
+ #else
32
+
33
+ _ACRTIMP void __cdecl _wassert(
34
+ _In_z_ wchar_t const* _Message,
35
+ _In_z_ wchar_t const* _File,
36
+ _In_ unsigned _Line
37
+ );
38
+
39
+ #define assert(expression) ((void)( \
40
+ (!!(expression)) || \
41
+ (_wassert(_CRT_WIDE(#expression), _CRT_WIDE(__FILE__), (unsigned)(__LINE__)), 0)) \
42
+ )
43
+
44
+ #endif
45
+
46
+
47
+
48
+ _CRT_END_C_HEADER
49
+ _UCRT_RESTORE_CLANG_WARNINGS
50
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/complex.h ADDED
@@ -0,0 +1,580 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // complex.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // The complex math library.
7
+ //
8
+ #pragma once
9
+ #ifndef _COMPLEX
10
+ #define _COMPLEX
11
+
12
+ #include <corecrt.h>
13
+
14
+ #if (_CRT_HAS_CXX17 == 1) && !defined(_CRT_USE_C_COMPLEX_H)
15
+ #include <ccomplex>
16
+ #else // ^^^^ /std:c++17 ^^^^ // vvvv _CRT_USE_C_COMPLEX_H vvvv
17
+
18
+ #pragma warning(push)
19
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
20
+ _UCRT_DISABLE_CLANG_WARNINGS
21
+
22
+ _CRT_BEGIN_C_HEADER
23
+
24
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
25
+ //
26
+ // Types
27
+ //
28
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
29
+ #ifndef _C_COMPLEX_T
30
+ #define _C_COMPLEX_T
31
+ typedef struct _C_double_complex
32
+ {
33
+ double _Val[2];
34
+ } _C_double_complex;
35
+
36
+ typedef struct _C_float_complex
37
+ {
38
+ float _Val[2];
39
+ } _C_float_complex;
40
+
41
+ typedef struct _C_ldouble_complex
42
+ {
43
+ long double _Val[2];
44
+ } _C_ldouble_complex;
45
+ #endif
46
+
47
+ typedef _C_double_complex _Dcomplex;
48
+ typedef _C_float_complex _Fcomplex;
49
+ typedef _C_ldouble_complex _Lcomplex;
50
+
51
+
52
+
53
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
54
+ //
55
+ // Macros
56
+ //
57
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
58
+ #define _DCOMPLEX_(re, im) _Cbuild(re, im)
59
+ #define _FCOMPLEX_(re, im) _FCbuild(re, im)
60
+ #define _LCOMPLEX_(re, im) _LCbuild(re, im)
61
+
62
+ #define _Complex_I _FCbuild(0.0F, 1.0F)
63
+ #define I _Complex_I
64
+
65
+
66
+
67
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
68
+ //
69
+ // Functions
70
+ //
71
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
72
+ _ACRTIMP double __cdecl cabs(_In_ _Dcomplex _Z);
73
+ _ACRTIMP _Dcomplex __cdecl cacos(_In_ _Dcomplex _Z);
74
+ _ACRTIMP _Dcomplex __cdecl cacosh(_In_ _Dcomplex _Z);
75
+ _ACRTIMP double __cdecl carg(_In_ _Dcomplex _Z);
76
+ _ACRTIMP _Dcomplex __cdecl casin(_In_ _Dcomplex _Z);
77
+ _ACRTIMP _Dcomplex __cdecl casinh(_In_ _Dcomplex _Z);
78
+ _ACRTIMP _Dcomplex __cdecl catan(_In_ _Dcomplex _Z);
79
+ _ACRTIMP _Dcomplex __cdecl catanh(_In_ _Dcomplex _Z);
80
+ _ACRTIMP _Dcomplex __cdecl ccos(_In_ _Dcomplex _Z);
81
+ _ACRTIMP _Dcomplex __cdecl ccosh(_In_ _Dcomplex _Z);
82
+ _ACRTIMP _Dcomplex __cdecl cexp(_In_ _Dcomplex _Z);
83
+ _ACRTIMP double __cdecl cimag(_In_ _Dcomplex _Z);
84
+ _ACRTIMP _Dcomplex __cdecl clog(_In_ _Dcomplex _Z);
85
+ _ACRTIMP _Dcomplex __cdecl clog10(_In_ _Dcomplex _Z);
86
+ _ACRTIMP _Dcomplex __cdecl conj(_In_ _Dcomplex _Z);
87
+ _ACRTIMP _Dcomplex __cdecl cpow(_In_ _Dcomplex _X, _In_ _Dcomplex _Y);
88
+ _ACRTIMP _Dcomplex __cdecl cproj(_In_ _Dcomplex _Z);
89
+ _ACRTIMP double __cdecl creal(_In_ _Dcomplex _Z);
90
+ _ACRTIMP _Dcomplex __cdecl csin(_In_ _Dcomplex _Z);
91
+ _ACRTIMP _Dcomplex __cdecl csinh(_In_ _Dcomplex _Z);
92
+ _ACRTIMP _Dcomplex __cdecl csqrt(_In_ _Dcomplex _Z);
93
+ _ACRTIMP _Dcomplex __cdecl ctan(_In_ _Dcomplex _Z);
94
+ _ACRTIMP _Dcomplex __cdecl ctanh(_In_ _Dcomplex _Z);
95
+ _ACRTIMP double __cdecl norm(_In_ _Dcomplex _Z);
96
+
97
+ _ACRTIMP float __cdecl cabsf(_In_ _Fcomplex _Z);
98
+ _ACRTIMP _Fcomplex __cdecl cacosf(_In_ _Fcomplex _Z);
99
+ _ACRTIMP _Fcomplex __cdecl cacoshf(_In_ _Fcomplex _Z);
100
+ _ACRTIMP float __cdecl cargf(_In_ _Fcomplex _Z);
101
+ _ACRTIMP _Fcomplex __cdecl casinf(_In_ _Fcomplex _Z);
102
+ _ACRTIMP _Fcomplex __cdecl casinhf(_In_ _Fcomplex _Z);
103
+ _ACRTIMP _Fcomplex __cdecl catanf(_In_ _Fcomplex _Z);
104
+ _ACRTIMP _Fcomplex __cdecl catanhf(_In_ _Fcomplex _Z);
105
+ _ACRTIMP _Fcomplex __cdecl ccosf(_In_ _Fcomplex _Z);
106
+ _ACRTIMP _Fcomplex __cdecl ccoshf(_In_ _Fcomplex _Z);
107
+ _ACRTIMP _Fcomplex __cdecl cexpf(_In_ _Fcomplex _Z);
108
+ _ACRTIMP float __cdecl cimagf(_In_ _Fcomplex _Z);
109
+ _ACRTIMP _Fcomplex __cdecl clogf(_In_ _Fcomplex _Z);
110
+ _ACRTIMP _Fcomplex __cdecl clog10f(_In_ _Fcomplex _Z);
111
+ _ACRTIMP _Fcomplex __cdecl conjf(_In_ _Fcomplex _Z);
112
+ _ACRTIMP _Fcomplex __cdecl cpowf(_In_ _Fcomplex _X, _In_ _Fcomplex _Y);
113
+ _ACRTIMP _Fcomplex __cdecl cprojf(_In_ _Fcomplex _Z);
114
+ _ACRTIMP float __cdecl crealf(_In_ _Fcomplex _Z);
115
+ _ACRTIMP _Fcomplex __cdecl csinf(_In_ _Fcomplex _Z);
116
+ _ACRTIMP _Fcomplex __cdecl csinhf(_In_ _Fcomplex _Z);
117
+ _ACRTIMP _Fcomplex __cdecl csqrtf(_In_ _Fcomplex _Z);
118
+ _ACRTIMP _Fcomplex __cdecl ctanf(_In_ _Fcomplex _Z);
119
+ _ACRTIMP _Fcomplex __cdecl ctanhf(_In_ _Fcomplex _Z);
120
+ _ACRTIMP float __cdecl normf(_In_ _Fcomplex _Z);
121
+
122
+ _ACRTIMP long double __cdecl cabsl(_In_ _Lcomplex _Z);
123
+ _ACRTIMP _Lcomplex __cdecl cacosl(_In_ _Lcomplex _Z);
124
+ _ACRTIMP _Lcomplex __cdecl cacoshl(_In_ _Lcomplex _Z);
125
+ _ACRTIMP long double __cdecl cargl(_In_ _Lcomplex _Z);
126
+ _ACRTIMP _Lcomplex __cdecl casinl(_In_ _Lcomplex _Z);
127
+ _ACRTIMP _Lcomplex __cdecl casinhl(_In_ _Lcomplex _Z);
128
+ _ACRTIMP _Lcomplex __cdecl catanl(_In_ _Lcomplex _Z);
129
+ _ACRTIMP _Lcomplex __cdecl catanhl(_In_ _Lcomplex _Z);
130
+ _ACRTIMP _Lcomplex __cdecl ccosl(_In_ _Lcomplex _Z);
131
+ _ACRTIMP _Lcomplex __cdecl ccoshl(_In_ _Lcomplex _Z);
132
+ _ACRTIMP _Lcomplex __cdecl cexpl(_In_ _Lcomplex _Z);
133
+ _ACRTIMP long double __cdecl cimagl(_In_ _Lcomplex _Z);
134
+ _ACRTIMP _Lcomplex __cdecl clogl(_In_ _Lcomplex _Z);
135
+ _ACRTIMP _Lcomplex __cdecl clog10l(_In_ _Lcomplex _Z);
136
+ _ACRTIMP _Lcomplex __cdecl conjl(_In_ _Lcomplex _Z);
137
+ _ACRTIMP _Lcomplex __cdecl cpowl(_In_ _Lcomplex _X, _In_ _Lcomplex _Y);
138
+ _ACRTIMP _Lcomplex __cdecl cprojl(_In_ _Lcomplex _Z);
139
+ _ACRTIMP long double __cdecl creall(_In_ _Lcomplex _Z);
140
+ _ACRTIMP _Lcomplex __cdecl csinl(_In_ _Lcomplex _Z);
141
+ _ACRTIMP _Lcomplex __cdecl csinhl(_In_ _Lcomplex _Z);
142
+ _ACRTIMP _Lcomplex __cdecl csqrtl(_In_ _Lcomplex _Z);
143
+ _ACRTIMP _Lcomplex __cdecl ctanl(_In_ _Lcomplex _Z);
144
+ _ACRTIMP _Lcomplex __cdecl ctanhl(_In_ _Lcomplex _Z);
145
+ _ACRTIMP long double __cdecl norml(_In_ _Lcomplex _Z);
146
+
147
+ _ACRTIMP _Dcomplex __cdecl _Cbuild(_In_ double _Re, _In_ double _Im);
148
+ _ACRTIMP _Dcomplex __cdecl _Cmulcc(_In_ _Dcomplex _X, _In_ _Dcomplex _Y);
149
+ _ACRTIMP _Dcomplex __cdecl _Cmulcr(_In_ _Dcomplex _X, _In_ double _Y);
150
+
151
+ _ACRTIMP _Fcomplex __cdecl _FCbuild(_In_ float _Re, _In_ float _Im);
152
+ _ACRTIMP _Fcomplex __cdecl _FCmulcc(_In_ _Fcomplex _X, _In_ _Fcomplex _Y);
153
+ _ACRTIMP _Fcomplex __cdecl _FCmulcr(_In_ _Fcomplex _X, _In_ float _Y);
154
+
155
+ _ACRTIMP _Lcomplex __cdecl _LCbuild(_In_ long double _Re, _In_ long double _Im);
156
+ _ACRTIMP _Lcomplex __cdecl _LCmulcc(_In_ _Lcomplex _X, _In_ _Lcomplex _Y);
157
+ _ACRTIMP _Lcomplex __cdecl _LCmulcr(_In_ _Lcomplex _X, _In_ long double _Y);
158
+
159
+
160
+
161
+ #ifdef __cplusplus
162
+ extern "C++"
163
+ {
164
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
165
+ //
166
+ // double complex overloads
167
+ //
168
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
169
+ inline _Dcomplex __CRTDECL acos(_In_ _Dcomplex _X) throw()
170
+ {
171
+ return cacos(_X);
172
+ }
173
+
174
+ inline _Dcomplex __CRTDECL acosh(_In_ _Dcomplex _X) throw()
175
+ {
176
+ return cacosh(_X);
177
+ }
178
+
179
+ inline _Dcomplex __CRTDECL asin(_In_ _Dcomplex _X) throw()
180
+ {
181
+ return casin(_X);
182
+ }
183
+
184
+ inline _Dcomplex __CRTDECL asinh(_In_ _Dcomplex _X) throw()
185
+ {
186
+ return casinh(_X);
187
+ }
188
+
189
+ inline _Dcomplex __CRTDECL atan(_In_ _Dcomplex _X) throw()
190
+ {
191
+ return catan(_X);
192
+ }
193
+
194
+ inline _Dcomplex __CRTDECL atanh(_In_ _Dcomplex _X) throw()
195
+ {
196
+ return catanh(_X);
197
+ }
198
+
199
+ inline _Dcomplex __CRTDECL cos(_In_ _Dcomplex _X) throw()
200
+ {
201
+ return ccos(_X);
202
+ }
203
+
204
+ inline _Dcomplex __CRTDECL cosh(_In_ _Dcomplex _X) throw()
205
+ {
206
+ return ccosh(_X);
207
+ }
208
+
209
+ inline _Dcomplex __CRTDECL proj(_In_ _Dcomplex _X) throw()
210
+ {
211
+ return cproj(_X);
212
+ }
213
+
214
+ inline _Dcomplex __CRTDECL exp(_In_ _Dcomplex _X) throw()
215
+ {
216
+ return cexp(_X);
217
+ }
218
+
219
+ inline _Dcomplex __CRTDECL log(_In_ _Dcomplex _X) throw()
220
+ {
221
+ return clog(_X);
222
+ }
223
+
224
+ inline _Dcomplex __CRTDECL log10(_In_ _Dcomplex _X) throw()
225
+ {
226
+ return clog10(_X);
227
+ }
228
+
229
+ inline _Dcomplex __CRTDECL pow(_In_ _Dcomplex _X, _In_ _Dcomplex _Y) throw()
230
+ {
231
+ return cpow(_X, _Y);
232
+ }
233
+
234
+ inline _Dcomplex __CRTDECL sin(_In_ _Dcomplex _X) throw()
235
+ {
236
+ return csin(_X);
237
+ }
238
+
239
+ inline _Dcomplex __CRTDECL sinh(_In_ _Dcomplex _X) throw()
240
+ {
241
+ return csinh(_X);
242
+ }
243
+
244
+ inline _Dcomplex __CRTDECL sqrt(_In_ _Dcomplex _X) throw()
245
+ {
246
+ return csqrt(_X);
247
+ }
248
+
249
+ inline _Dcomplex __CRTDECL tan(_In_ _Dcomplex _X) throw()
250
+ {
251
+ return ctan(_X);
252
+ }
253
+
254
+ inline _Dcomplex __CRTDECL tanh(_In_ _Dcomplex _X) throw()
255
+ {
256
+ return ctanh(_X);
257
+ }
258
+
259
+ inline double __CRTDECL abs(_In_ _Dcomplex _X) throw()
260
+ {
261
+ return cabs(_X);
262
+ }
263
+
264
+ inline double __CRTDECL arg(_In_ _Dcomplex _X) throw()
265
+ {
266
+ return carg(_X);
267
+ }
268
+
269
+ inline double __CRTDECL imag(_In_ _Dcomplex _X) throw()
270
+ {
271
+ return cimag(_X);
272
+ }
273
+
274
+ inline double __CRTDECL real(_In_ _Dcomplex _X) throw()
275
+ {
276
+ return creal(_X);
277
+ }
278
+
279
+
280
+
281
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
282
+ //
283
+ // float complex overloads
284
+ //
285
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
286
+ inline _Fcomplex __CRTDECL acos(_In_ _Fcomplex _X) throw()
287
+ {
288
+ return cacosf(_X);
289
+ }
290
+
291
+ inline _Fcomplex __CRTDECL acosh(_In_ _Fcomplex _X) throw()
292
+ {
293
+ return cacoshf(_X);
294
+ }
295
+
296
+ inline _Fcomplex __CRTDECL asin(_In_ _Fcomplex _X) throw()
297
+ {
298
+ return casinf(_X);
299
+ }
300
+
301
+ inline _Fcomplex __CRTDECL asinh(_In_ _Fcomplex _X) throw()
302
+ {
303
+ return casinhf(_X);
304
+ }
305
+
306
+ inline _Fcomplex __CRTDECL atan(_In_ _Fcomplex _X) throw()
307
+ {
308
+ return catanf(_X);
309
+ }
310
+
311
+ inline _Fcomplex __CRTDECL atanh(_In_ _Fcomplex _X) throw()
312
+ {
313
+ return catanhf(_X);
314
+ }
315
+
316
+ inline _Fcomplex __CRTDECL conj(_In_ _Fcomplex _X) throw()
317
+ {
318
+ return conjf(_X);
319
+ }
320
+
321
+ inline _Fcomplex __CRTDECL cos(_In_ _Fcomplex _X) throw()
322
+ {
323
+ return ccosf(_X);
324
+ }
325
+
326
+ inline _Fcomplex __CRTDECL cosh(_In_ _Fcomplex _X) throw()
327
+ {
328
+ return ccoshf(_X);
329
+ }
330
+
331
+ inline _Fcomplex __CRTDECL cproj(_In_ _Fcomplex _X) throw()
332
+ {
333
+ return cprojf(_X);
334
+ }
335
+
336
+ inline _Fcomplex __CRTDECL proj(_In_ _Fcomplex _X) throw()
337
+ {
338
+ return cprojf(_X);
339
+ }
340
+
341
+ inline _Fcomplex __CRTDECL exp(_In_ _Fcomplex _X) throw()
342
+ {
343
+ return cexpf(_X);
344
+ }
345
+
346
+ inline _Fcomplex __CRTDECL log(_In_ _Fcomplex _X) throw()
347
+ {
348
+ return clogf(_X);
349
+ }
350
+
351
+ inline _Fcomplex __CRTDECL log10(_In_ _Fcomplex _X) throw()
352
+ {
353
+ return clog10f(_X);
354
+ }
355
+
356
+ inline float __CRTDECL norm(_In_ _Fcomplex _X) throw()
357
+ {
358
+ return normf(_X);
359
+ }
360
+
361
+ inline _Fcomplex __CRTDECL pow(_In_ _Fcomplex _X, _In_ _Fcomplex _Y) throw()
362
+ {
363
+ return cpowf(_X, _Y);
364
+ }
365
+
366
+ inline _Fcomplex __CRTDECL sin(_In_ _Fcomplex _X) throw()
367
+ {
368
+ return csinf(_X);
369
+ }
370
+
371
+ inline _Fcomplex __CRTDECL sinh(_In_ _Fcomplex _X) throw()
372
+ {
373
+ return csinhf(_X);
374
+ }
375
+
376
+ inline _Fcomplex __CRTDECL sqrt(_In_ _Fcomplex _X) throw()
377
+ {
378
+ return csqrtf(_X);
379
+ }
380
+
381
+ inline _Fcomplex __CRTDECL tan(_In_ _Fcomplex _X) throw()
382
+ {
383
+ return ctanf(_X);
384
+ }
385
+
386
+ inline _Fcomplex __CRTDECL tanh(_In_ _Fcomplex _X) throw()
387
+ {
388
+ return ctanhf(_X);
389
+ }
390
+
391
+ inline float __CRTDECL abs(_In_ _Fcomplex _X) throw()
392
+ {
393
+ return cabsf(_X);
394
+ }
395
+
396
+ inline float __CRTDECL arg(_In_ _Fcomplex _X) throw()
397
+ {
398
+ return cargf(_X);
399
+ }
400
+
401
+ inline float __CRTDECL carg(_In_ _Fcomplex _X) throw()
402
+ {
403
+ return cargf(_X);
404
+ }
405
+
406
+ inline float __CRTDECL cimag(_In_ _Fcomplex _X) throw()
407
+ {
408
+ return cimagf(_X);
409
+ }
410
+
411
+ inline float __CRTDECL creal(_In_ _Fcomplex _X) throw()
412
+ {
413
+ return crealf(_X);
414
+ }
415
+
416
+ inline float __CRTDECL imag(_In_ _Fcomplex _X) throw()
417
+ {
418
+ return cimagf(_X);
419
+ }
420
+
421
+ inline float __CRTDECL real(_In_ _Fcomplex _X) throw()
422
+ {
423
+ return crealf(_X);
424
+ }
425
+
426
+
427
+
428
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
429
+ //
430
+ // long double complex overloads
431
+ //
432
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
433
+ inline _Lcomplex __CRTDECL acos(_In_ _Lcomplex _X) throw()
434
+ {
435
+ return cacosl(_X);
436
+ }
437
+
438
+ inline _Lcomplex __CRTDECL acosh(_In_ _Lcomplex _X) throw()
439
+ {
440
+ return cacoshl(_X);
441
+ }
442
+
443
+ inline _Lcomplex __CRTDECL asin(_In_ _Lcomplex _X) throw()
444
+ {
445
+ return casinl(_X);
446
+ }
447
+
448
+ inline _Lcomplex __CRTDECL asinh(_In_ _Lcomplex _X) throw()
449
+ {
450
+ return casinhl(_X);
451
+ }
452
+
453
+ inline _Lcomplex __CRTDECL atan(_In_ _Lcomplex _X) throw()
454
+ {
455
+ return catanl(_X);
456
+ }
457
+
458
+ inline _Lcomplex __CRTDECL atanh(_In_ _Lcomplex _X) throw()
459
+ {
460
+ return catanhl(_X);
461
+ }
462
+
463
+ inline _Lcomplex __CRTDECL conj(_In_ _Lcomplex _X) throw()
464
+ {
465
+ return conjl(_X);
466
+ }
467
+
468
+ inline _Lcomplex __CRTDECL cos(_In_ _Lcomplex _X) throw()
469
+ {
470
+ return ccosl(_X);
471
+ }
472
+
473
+ inline _Lcomplex __CRTDECL cosh(_In_ _Lcomplex _X) throw()
474
+ {
475
+ return ccoshl(_X);
476
+ }
477
+
478
+ inline _Lcomplex __CRTDECL cproj(_In_ _Lcomplex _X) throw()
479
+ {
480
+ return cprojl(_X);
481
+ }
482
+
483
+ inline _Lcomplex __CRTDECL proj(_In_ _Lcomplex _X) throw()
484
+ {
485
+ return cprojl(_X);
486
+ }
487
+
488
+ inline _Lcomplex __CRTDECL exp(_In_ _Lcomplex _X) throw()
489
+ {
490
+ return cexpl(_X);
491
+ }
492
+
493
+ inline _Lcomplex __CRTDECL log(_In_ _Lcomplex _X) throw()
494
+ {
495
+ return clogl(_X);
496
+ }
497
+
498
+ inline _Lcomplex __CRTDECL log10(_In_ _Lcomplex _X) throw()
499
+ {
500
+ return clog10l(_X);
501
+ }
502
+
503
+ inline long double __CRTDECL norm(_In_ _Lcomplex _X) throw()
504
+ {
505
+ return norml(_X);
506
+ }
507
+
508
+ inline _Lcomplex __CRTDECL pow(_In_ _Lcomplex _X, _In_ _Lcomplex _Y) throw()
509
+ {
510
+ return cpowl(_X, _Y);
511
+ }
512
+
513
+ inline _Lcomplex __CRTDECL sin(_In_ _Lcomplex _X) throw()
514
+ {
515
+ return csinl(_X);
516
+ }
517
+
518
+ inline _Lcomplex __CRTDECL sinh(_In_ _Lcomplex _X) throw()
519
+ {
520
+ return csinhl(_X);
521
+ }
522
+
523
+ inline _Lcomplex __CRTDECL sqrt(_In_ _Lcomplex _X) throw()
524
+ {
525
+ return csqrtl(_X);
526
+ }
527
+
528
+ inline _Lcomplex __CRTDECL tan(_In_ _Lcomplex _X) throw()
529
+ {
530
+ return ctanl(_X);
531
+ }
532
+
533
+ inline _Lcomplex __CRTDECL tanh(_In_ _Lcomplex _X) throw()
534
+ {
535
+ return ctanhl(_X);
536
+ }
537
+
538
+ inline long double __CRTDECL abs(_In_ _Lcomplex _X) throw()
539
+ {
540
+ return cabsl(_X);
541
+ }
542
+
543
+ inline long double __CRTDECL arg(_In_ _Lcomplex _X) throw()
544
+ {
545
+ return cargl(_X);
546
+ }
547
+
548
+ inline long double __CRTDECL carg(_In_ _Lcomplex _X) throw()
549
+ {
550
+ return cargl(_X);
551
+ }
552
+
553
+ inline long double __CRTDECL cimag(_In_ _Lcomplex _X) throw()
554
+ {
555
+ return cimagl(_X);
556
+ }
557
+
558
+ inline long double __CRTDECL creal(_In_ _Lcomplex _X) throw()
559
+ {
560
+ return creall(_X);
561
+ }
562
+
563
+ inline long double __CRTDECL imag(_In_ _Lcomplex _X) throw()
564
+ {
565
+ return cimagl(_X);
566
+ }
567
+
568
+ inline long double __CRTDECL real(_In_ _Lcomplex _X) throw()
569
+ {
570
+ return creall(_X);
571
+ }
572
+
573
+ } // extern "C++"
574
+ #endif // __cplusplus
575
+
576
+ _CRT_END_C_HEADER
577
+ _UCRT_RESTORE_CLANG_WARNINGS
578
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
579
+ #endif // (_CRT_HAS_CXX17 == 1) && !defined(_CRT_USE_C_COMPLEX_H)
580
+ #endif // _COMPLEX
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/conio.h ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // conio.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // This file declares the direct console I/O functions.
7
+ //
8
+ #pragma once
9
+ #ifndef _INC_CONIO // include guard for 3rd party interop
10
+ #define _INC_CONIO
11
+
12
+ #include <corecrt.h>
13
+ #include <corecrt_wconio.h>
14
+
15
+ #pragma warning(push)
16
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
17
+ _UCRT_DISABLE_CLANG_WARNINGS
18
+
19
+ _CRT_BEGIN_C_HEADER
20
+
21
+ _Check_return_wat_
22
+ _Success_(_BufferCount > 0)
23
+ _DCRTIMP errno_t __cdecl _cgets_s(
24
+ _Out_writes_z_(_BufferCount) char* _Buffer,
25
+ _In_ size_t _BufferCount,
26
+ _Out_ size_t* _SizeRead
27
+ );
28
+
29
+ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(
30
+ _Success_(return == 0)
31
+ errno_t, _cgets_s,
32
+ _Out_writes_z_(*_Buffer) char, _Buffer,
33
+ _Out_ size_t*, _SizeRead
34
+ )
35
+
36
+ _Check_return_opt_
37
+ _DCRTIMP int __cdecl _cputs(
38
+ _In_z_ char const* _Buffer
39
+ );
40
+
41
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42
+ //
43
+ // Narrow Character Formatted Output Functions (Console)
44
+ //
45
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
46
+ _Check_return_opt_
47
+ _DCRTIMP int __cdecl __conio_common_vcprintf(
48
+ _In_ unsigned __int64 _Options,
49
+ _In_z_ _Printf_format_string_params_(2) char const* _Format,
50
+ _In_opt_ _locale_t _Locale,
51
+ va_list _ArgList
52
+ );
53
+
54
+ _Check_return_opt_
55
+ _DCRTIMP int __cdecl __conio_common_vcprintf_s(
56
+ _In_ unsigned __int64 _Options,
57
+ _In_z_ _Printf_format_string_params_(2) char const* _Format,
58
+ _In_opt_ _locale_t _Locale,
59
+ va_list _ArgList
60
+ );
61
+
62
+ _Check_return_opt_
63
+ _DCRTIMP int __cdecl __conio_common_vcprintf_p(
64
+ _In_ unsigned __int64 _Options,
65
+ _In_z_ _Printf_format_string_params_(2) char const* _Format,
66
+ _In_opt_ _locale_t _Locale,
67
+ va_list _ArgList
68
+ );
69
+
70
+ _Check_return_opt_
71
+ _CRT_STDIO_INLINE int __CRTDECL _vcprintf_l(
72
+ _In_z_ _Printf_format_string_params_(2) char const* const _Format,
73
+ _In_opt_ _locale_t const _Locale,
74
+ va_list _ArgList
75
+ )
76
+ #if defined _NO_CRT_STDIO_INLINE
77
+ ;
78
+ #else
79
+ {
80
+ return __conio_common_vcprintf(
81
+ _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS,
82
+ _Format, _Locale, _ArgList);
83
+ }
84
+ #endif
85
+
86
+ _Check_return_opt_
87
+ _CRT_STDIO_INLINE int __CRTDECL _vcprintf(
88
+ _In_z_ _Printf_format_string_ char const* const _Format,
89
+ va_list _ArgList
90
+ )
91
+ #if defined _NO_CRT_STDIO_INLINE
92
+ ;
93
+ #else
94
+ {
95
+ return _vcprintf_l(_Format, NULL, _ArgList);
96
+ }
97
+ #endif
98
+
99
+ _Check_return_opt_
100
+ _CRT_STDIO_INLINE int __CRTDECL _vcprintf_s_l(
101
+ _In_z_ _Printf_format_string_params_(2) char const* const _Format,
102
+ _In_opt_ _locale_t const _Locale,
103
+ va_list _ArgList
104
+ )
105
+ #if defined _NO_CRT_STDIO_INLINE
106
+ ;
107
+ #else
108
+ {
109
+ return __conio_common_vcprintf_s(
110
+ _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS,
111
+ _Format, _Locale, _ArgList);
112
+ }
113
+ #endif
114
+
115
+ _Check_return_opt_
116
+ _CRT_STDIO_INLINE int __CRTDECL _vcprintf_s(
117
+ _In_z_ _Printf_format_string_ char const* const _Format,
118
+ va_list _ArgList
119
+ )
120
+ #if defined _NO_CRT_STDIO_INLINE
121
+ ;
122
+ #else
123
+ {
124
+ return _vcprintf_s_l(_Format, NULL, _ArgList);
125
+ }
126
+ #endif
127
+
128
+ _Check_return_opt_
129
+ _CRT_STDIO_INLINE int __CRTDECL _vcprintf_p_l(
130
+ _In_z_ _Printf_format_string_params_(2) char const* const _Format,
131
+ _In_opt_ _locale_t const _Locale,
132
+ va_list _ArgList
133
+ )
134
+ #if defined _NO_CRT_STDIO_INLINE
135
+ ;
136
+ #else
137
+ {
138
+ return __conio_common_vcprintf_p(
139
+ _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS,
140
+ _Format, _Locale, _ArgList);
141
+ }
142
+ #endif
143
+
144
+ _Check_return_opt_
145
+ _CRT_STDIO_INLINE int __CRTDECL _vcprintf_p(
146
+ _In_z_ char const* const _Format,
147
+ va_list _ArgList
148
+ )
149
+ #if defined _NO_CRT_STDIO_INLINE
150
+ ;
151
+ #else
152
+ {
153
+ return _vcprintf_p_l(_Format, NULL, _ArgList);
154
+ }
155
+ #endif
156
+
157
+ _Check_return_opt_
158
+ _CRT_STDIO_INLINE int __CRTDECL _cprintf_l(
159
+ _In_z_ _Printf_format_string_params_(0) char const* const _Format,
160
+ _In_opt_ _locale_t const _Locale,
161
+ ...)
162
+ #if defined _NO_CRT_STDIO_INLINE
163
+ ;
164
+ #else
165
+ {
166
+ int _Result;
167
+ va_list _ArgList;
168
+ __crt_va_start(_ArgList, _Locale);
169
+ _Result = _vcprintf_l(_Format, _Locale, _ArgList);
170
+ __crt_va_end(_ArgList);
171
+ return _Result;
172
+ }
173
+ #endif
174
+
175
+ _Check_return_opt_
176
+ _CRT_STDIO_INLINE int __CRTDECL _cprintf(
177
+ _In_z_ _Printf_format_string_ char const* const _Format,
178
+ ...)
179
+ #if defined _NO_CRT_STDIO_INLINE
180
+ ;
181
+ #else
182
+ {
183
+ int _Result;
184
+ va_list _ArgList;
185
+ __crt_va_start(_ArgList, _Format);
186
+ _Result = _vcprintf_l(_Format, NULL, _ArgList);
187
+ __crt_va_end(_ArgList);
188
+ return _Result;
189
+ }
190
+ #endif
191
+
192
+ _Check_return_opt_
193
+ _CRT_STDIO_INLINE int __CRTDECL _cprintf_s_l(
194
+ _In_z_ _Printf_format_string_params_(0) char const* const _Format,
195
+ _In_opt_ _locale_t const _Locale,
196
+ ...)
197
+ #if defined _NO_CRT_STDIO_INLINE
198
+ ;
199
+ #else
200
+ {
201
+ int _Result;
202
+ va_list _ArgList;
203
+ __crt_va_start(_ArgList, _Locale);
204
+ _Result = _vcprintf_s_l(_Format, _Locale, _ArgList);
205
+ __crt_va_end(_ArgList);
206
+ return _Result;
207
+ }
208
+ #endif
209
+
210
+ _Check_return_opt_
211
+ _CRT_STDIO_INLINE int __CRTDECL _cprintf_s(
212
+ _In_z_ _Printf_format_string_ char const* const _Format,
213
+ ...)
214
+ #if defined _NO_CRT_STDIO_INLINE
215
+ ;
216
+ #else
217
+ {
218
+ int _Result;
219
+ va_list _ArgList;
220
+ __crt_va_start(_ArgList, _Format);
221
+ _Result = _vcprintf_s_l(_Format, NULL, _ArgList);
222
+ __crt_va_end(_ArgList);
223
+ return _Result;
224
+ }
225
+ #endif
226
+
227
+ _Check_return_opt_
228
+ _CRT_STDIO_INLINE int __CRTDECL _cprintf_p_l(
229
+ _In_z_ _Printf_format_string_params_(0) char const* const _Format,
230
+ _In_opt_ _locale_t const _Locale,
231
+ ...)
232
+ #if defined _NO_CRT_STDIO_INLINE
233
+ ;
234
+ #else
235
+ {
236
+ int _Result;
237
+ va_list _ArgList;
238
+ __crt_va_start(_ArgList, _Locale);
239
+ _Result = _vcprintf_p_l(_Format, _Locale, _ArgList);
240
+ __crt_va_end(_ArgList);
241
+ return _Result;
242
+ }
243
+ #endif
244
+
245
+ _Check_return_opt_
246
+ _CRT_STDIO_INLINE int __CRTDECL _cprintf_p(
247
+ _In_z_ _Printf_format_string_ char const* const _Format,
248
+ ...)
249
+ #if defined _NO_CRT_STDIO_INLINE
250
+ ;
251
+ #else
252
+ {
253
+ int _Result;
254
+ va_list _ArgList;
255
+ __crt_va_start(_ArgList, _Format);
256
+ _Result = _vcprintf_p_l(_Format, NULL, _ArgList);
257
+ __crt_va_end(_ArgList);
258
+ return _Result;
259
+ }
260
+ #endif
261
+
262
+
263
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
264
+ //
265
+ // Narrow Character Formatted Input Functions (Console)
266
+ //
267
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
268
+ _Check_return_opt_
269
+ _DCRTIMP int __cdecl __conio_common_vcscanf(
270
+ _In_ unsigned __int64 _Options,
271
+ _In_z_ _Scanf_format_string_params_(2) char const* _Format,
272
+ _In_opt_ _locale_t _Locale,
273
+ va_list _ArgList
274
+ );
275
+
276
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vcscanf_s_l)
277
+ _CRT_STDIO_INLINE int __CRTDECL _vcscanf_l(
278
+ _In_z_ _Scanf_format_string_params_(2) char const* const _Format,
279
+ _In_opt_ _locale_t const _Locale,
280
+ va_list _ArgList
281
+ )
282
+ #if defined _NO_CRT_STDIO_INLINE
283
+ ;
284
+ #else
285
+ {
286
+ return __conio_common_vcscanf(
287
+ _CRT_INTERNAL_LOCAL_SCANF_OPTIONS,
288
+ _Format, _Locale, _ArgList);
289
+ }
290
+ #endif
291
+
292
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vcscanf_s)
293
+ _CRT_STDIO_INLINE int __CRTDECL _vcscanf(
294
+ _In_z_ _Scanf_format_string_params_(1) char const* const _Format,
295
+ va_list _ArgList
296
+ )
297
+ #if defined _NO_CRT_STDIO_INLINE
298
+ ;
299
+ #else
300
+ {
301
+ return _vcscanf_l(_Format, NULL, _ArgList);
302
+ }
303
+ #endif
304
+
305
+ _Check_return_opt_
306
+ _CRT_STDIO_INLINE int __CRTDECL _vcscanf_s_l(
307
+ _In_z_ _Scanf_format_string_params_(2) char const* const _Format,
308
+ _In_opt_ _locale_t const _Locale,
309
+ va_list _ArgList
310
+ )
311
+ #if defined _NO_CRT_STDIO_INLINE
312
+ ;
313
+ #else
314
+ {
315
+ return __conio_common_vcscanf(
316
+ _CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT,
317
+ _Format, _Locale, _ArgList);
318
+ }
319
+ #endif
320
+
321
+ _Check_return_opt_
322
+ _CRT_STDIO_INLINE int __CRTDECL _vcscanf_s(
323
+ _In_z_ _Scanf_format_string_params_(1) char const* const _Format,
324
+ va_list _ArgList
325
+ )
326
+ #if defined _NO_CRT_STDIO_INLINE
327
+ ;
328
+ #else
329
+ {
330
+ return _vcscanf_s_l(_Format, NULL, _ArgList);
331
+ }
332
+ #endif
333
+
334
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_cscanf_s_l)
335
+ _CRT_STDIO_INLINE int __CRTDECL _cscanf_l(
336
+ _In_z_ _Scanf_format_string_params_(0) char const* const _Format,
337
+ _In_opt_ _locale_t const _Locale,
338
+ ...)
339
+ #if defined _NO_CRT_STDIO_INLINE
340
+ ;
341
+ #else
342
+ {
343
+ int _Result;
344
+ va_list _ArgList;
345
+ __crt_va_start(_ArgList, _Locale);
346
+
347
+ _Result = _vcscanf_l(_Format, _Locale, _ArgList);
348
+
349
+ __crt_va_end(_ArgList);
350
+ return _Result;
351
+ }
352
+ #endif
353
+
354
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_cscanf_s)
355
+ _CRT_STDIO_INLINE int __CRTDECL _cscanf(
356
+ _In_z_ _Scanf_format_string_ char const* const _Format,
357
+ ...)
358
+ #if defined _NO_CRT_STDIO_INLINE
359
+ ;
360
+ #else
361
+ {
362
+ int _Result;
363
+ va_list _ArgList;
364
+ __crt_va_start(_ArgList, _Format);
365
+
366
+ _Result = _vcscanf_l(_Format, NULL, _ArgList);
367
+
368
+ __crt_va_end(_ArgList);
369
+ return _Result;
370
+ }
371
+ #endif
372
+
373
+ _Check_return_opt_
374
+ _CRT_STDIO_INLINE int __CRTDECL _cscanf_s_l(
375
+ _In_z_ _Scanf_format_string_params_(0) char const* const _Format,
376
+ _In_opt_ _locale_t const _Locale,
377
+ ...)
378
+ #if defined _NO_CRT_STDIO_INLINE
379
+ ;
380
+ #else
381
+ {
382
+ int _Result;
383
+ va_list _ArgList;
384
+ __crt_va_start(_ArgList, _Locale);
385
+ _Result = _vcscanf_s_l(_Format, _Locale, _ArgList);
386
+ __crt_va_end(_ArgList);
387
+ return _Result;
388
+ }
389
+ #endif
390
+
391
+ _Check_return_opt_
392
+ _CRT_STDIO_INLINE int __CRTDECL _cscanf_s(
393
+ _In_z_ _Scanf_format_string_ char const* const _Format,
394
+ ...)
395
+ #if defined _NO_CRT_STDIO_INLINE
396
+ ;
397
+ #else
398
+ {
399
+ int _Result;
400
+ va_list _ArgList;
401
+ __crt_va_start(_ArgList, _Format);
402
+ _Result = _vcscanf_s_l(_Format, NULL, _ArgList);
403
+ __crt_va_end(_ArgList);
404
+ return _Result;
405
+ }
406
+ #endif
407
+
408
+
409
+ _DCRTIMP int __cdecl _kbhit(void);
410
+
411
+ _Check_return_ _DCRTIMP int __cdecl _getch(void);
412
+ _Check_return_ _DCRTIMP int __cdecl _getche(void);
413
+ _Check_return_opt_ _DCRTIMP int __cdecl _putch (_In_ int _Ch);
414
+ _Check_return_opt_ _DCRTIMP int __cdecl _ungetch(_In_ int _Ch);
415
+
416
+ _Check_return_ _DCRTIMP int __cdecl _getch_nolock (void);
417
+ _Check_return_ _DCRTIMP int __cdecl _getche_nolock (void);
418
+ _Check_return_opt_ _DCRTIMP int __cdecl _putch_nolock (_In_ int _Ch);
419
+ _Check_return_opt_ _DCRTIMP int __cdecl _ungetch_nolock(_In_ int _Ch);
420
+
421
+ #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
422
+
423
+ // Suppress double-deprecation warnings:
424
+ #pragma warning(push)
425
+ #pragma warning(disable: 4141)
426
+
427
+ _Success_(return != 0)
428
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_cgets) _CRT_INSECURE_DEPRECATE(_cgets_s)
429
+ _DCRTIMP char* __cdecl cgets(
430
+ _At_(&_Buffer[0], _In_reads_(1))
431
+ _At_(&_Buffer[1], _Out_writes_(1))
432
+ _At_(&_Buffer[2], _Post_z_ _Out_writes_to_(_Buffer[0], _Buffer[1]))
433
+ char* _Buffer
434
+ );
435
+
436
+ #pragma warning(pop)
437
+
438
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_cputs)
439
+ _DCRTIMP int __cdecl cputs(
440
+ _In_z_ char const* _String
441
+ );
442
+
443
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_getch)
444
+ _DCRTIMP int __cdecl getch(void);
445
+
446
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_getche)
447
+ _DCRTIMP int __cdecl getche(void);
448
+
449
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_kbhit)
450
+ _DCRTIMP int __cdecl kbhit(void);
451
+
452
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_putch)
453
+ _DCRTIMP int __cdecl putch(
454
+ _In_ int _Ch
455
+ );
456
+
457
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_ungetch)
458
+ _DCRTIMP int __cdecl ungetch(
459
+ _In_ int _Ch
460
+ );
461
+
462
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_cprintf)
463
+ _CRT_STDIO_INLINE int __CRTDECL cprintf(
464
+ _In_z_ _Printf_format_string_ char const* const _Format,
465
+ ...)
466
+ #if defined _NO_CRT_STDIO_INLINE
467
+ ;
468
+ #else
469
+ {
470
+ int _Result;
471
+ va_list _ArgList;
472
+ __crt_va_start(_ArgList, _Format);
473
+ _Result = _vcprintf_l(_Format, NULL, _ArgList);
474
+ __crt_va_end(_ArgList);
475
+ return _Result;
476
+ }
477
+ #endif
478
+
479
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_cscanf)
480
+ _CRT_STDIO_INLINE int __CRTDECL cscanf(
481
+ _In_z_ _Scanf_format_string_ char const* const _Format,
482
+ ...)
483
+ #if defined _NO_CRT_STDIO_INLINE
484
+ ;
485
+ #else
486
+ {
487
+ int _Result;
488
+ va_list _ArgList;
489
+ __crt_va_start(_ArgList, _Format);
490
+
491
+ _Result = _vcscanf_l(_Format, NULL, _ArgList);
492
+
493
+ __crt_va_end(_ArgList);
494
+ return _Result;
495
+ }
496
+ #endif
497
+
498
+ #endif // _CRT_INTERNAL_NONSTDC_NAMES
499
+
500
+ _CRT_END_C_HEADER
501
+
502
+ _UCRT_RESTORE_CLANG_WARNINGS
503
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
504
+ #endif // _INC_CONIO
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt.h ADDED
The diff for this file is too large to render. See raw diff
 
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_io.h ADDED
@@ -0,0 +1,572 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_io.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // This file declares the low-level I/O and file handling functionality. These
7
+ // declarations are split out to support the Windows build.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt_share.h>
12
+ #include <corecrt_wio.h>
13
+
14
+ #pragma warning(push)
15
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
+ _UCRT_DISABLE_CLANG_WARNINGS
17
+
18
+ _CRT_BEGIN_C_HEADER
19
+
20
+
21
+
22
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
23
+ //
24
+ // Types
25
+ //
26
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
27
+ #ifdef _USE_32BIT_TIME_T
28
+ #define _finddata_t _finddata32_t
29
+ #define _finddatai64_t _finddata32i64_t
30
+ #else
31
+ #define _finddata_t _finddata64i32_t
32
+ #define _finddatai64_t __finddata64_t
33
+ #endif
34
+
35
+ struct _finddata32_t
36
+ {
37
+ unsigned attrib;
38
+ __time32_t time_create; // -1 for FAT file systems
39
+ __time32_t time_access; // -1 for FAT file systems
40
+ __time32_t time_write;
41
+ _fsize_t size;
42
+ char name[260];
43
+ };
44
+
45
+ struct _finddata32i64_t
46
+ {
47
+ unsigned attrib;
48
+ __time32_t time_create; // -1 for FAT file systems
49
+ __time32_t time_access; // -1 for FAT file systems
50
+ __time32_t time_write;
51
+ __int64 size;
52
+ char name[260];
53
+ };
54
+
55
+ struct _finddata64i32_t
56
+ {
57
+ unsigned attrib;
58
+ __time64_t time_create; // -1 for FAT file systems
59
+ __time64_t time_access; // -1 for FAT file systems
60
+ __time64_t time_write;
61
+ _fsize_t size;
62
+ char name[260];
63
+ };
64
+
65
+ struct __finddata64_t
66
+ {
67
+ unsigned attrib;
68
+ __time64_t time_create; // -1 for FAT file systems
69
+ __time64_t time_access; // -1 for FAT file systems
70
+ __time64_t time_write;
71
+ __int64 size;
72
+ char name[260];
73
+ };
74
+
75
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
76
+ //
77
+ // Macros
78
+ //
79
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
80
+ // File attribute constants for the _findfirst() family of functions
81
+ #define _A_NORMAL 0x00 // Normal file - No read/write restrictions
82
+ #define _A_RDONLY 0x01 // Read only file
83
+ #define _A_HIDDEN 0x02 // Hidden file
84
+ #define _A_SYSTEM 0x04 // System file
85
+ #define _A_SUBDIR 0x10 // Subdirectory
86
+ #define _A_ARCH 0x20 // Archive file
87
+
88
+
89
+
90
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
91
+ //
92
+ // Functions
93
+ //
94
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
95
+ #ifdef _USE_32BIT_TIME_T
96
+ #define _findfirst _findfirst32
97
+ #define _findnext _findnext32
98
+ #define _findfirsti64 _findfirst32i64
99
+ #define _findnexti64 _findnext32i64
100
+ #else
101
+ #define _findfirst _findfirst64i32
102
+ #define _findnext _findnext64i32
103
+ #define _findfirsti64 _findfirst64
104
+ #define _findnexti64 _findnext64
105
+ #endif
106
+
107
+ #if _CRT_FUNCTIONS_REQUIRED
108
+
109
+ _Check_return_
110
+ _ACRTIMP int __cdecl _access(
111
+ _In_z_ char const* _FileName,
112
+ _In_ int _AccessMode
113
+ );
114
+
115
+ _Check_return_wat_
116
+ _ACRTIMP errno_t __cdecl _access_s(
117
+ _In_z_ char const* _FileName,
118
+ _In_ int _AccessMode
119
+ );
120
+
121
+ _Check_return_
122
+ _ACRTIMP int __cdecl _chmod(
123
+ _In_z_ char const* _FileName,
124
+ _In_ int _Mode
125
+ );
126
+
127
+ _Check_return_
128
+ _ACRTIMP int __cdecl _chsize(
129
+ _In_ int _FileHandle,
130
+ _In_ long _Size
131
+ );
132
+
133
+ _Check_return_wat_
134
+ _ACRTIMP errno_t __cdecl _chsize_s(
135
+ _In_ int _FileHandle,
136
+ _In_ __int64 _Size
137
+ );
138
+
139
+ _Check_return_opt_
140
+ _ACRTIMP int __cdecl _close(
141
+ _In_ int _FileHandle
142
+ );
143
+
144
+ _Check_return_opt_
145
+ _ACRTIMP int __cdecl _commit(
146
+ _In_ int _FileHandle
147
+ );
148
+
149
+ _Check_return_ _CRT_INSECURE_DEPRECATE(_sopen_s)
150
+ _ACRTIMP int __cdecl _creat(
151
+ _In_z_ char const* _FileName,
152
+ _In_ int _PermissionMode
153
+ );
154
+
155
+ _Check_return_
156
+ _ACRTIMP int __cdecl _dup(
157
+ _In_ int _FileHandle
158
+ );
159
+
160
+ _Check_return_
161
+ _ACRTIMP int __cdecl _dup2(
162
+ _In_ int _FileHandleSrc,
163
+ _In_ int _FileHandleDst
164
+ );
165
+
166
+ _Check_return_
167
+ _ACRTIMP int __cdecl _eof(
168
+ _In_ int _FileHandle
169
+ );
170
+
171
+ _Check_return_
172
+ _ACRTIMP long __cdecl _filelength(
173
+ _In_ int _FileHandle
174
+ );
175
+
176
+ _Success_(return != -1)
177
+ _Check_return_
178
+ _ACRTIMP intptr_t __cdecl _findfirst32(
179
+ _In_z_ char const* _FileName,
180
+ _Out_ struct _finddata32_t* _FindData
181
+ );
182
+
183
+ _Success_(return != -1)
184
+ _Check_return_
185
+ _ACRTIMP int __cdecl _findnext32(
186
+ _In_ intptr_t _FindHandle,
187
+ _Out_ struct _finddata32_t* _FindData
188
+ );
189
+
190
+ _Check_return_opt_
191
+ _ACRTIMP int __cdecl _findclose(
192
+ _In_ intptr_t _FindHandle
193
+ );
194
+
195
+ _ACRTIMP intptr_t __cdecl _get_osfhandle(
196
+ _In_ int _FileHandle
197
+ );
198
+
199
+ _Check_return_
200
+ _ACRTIMP int __cdecl _isatty(
201
+ _In_ int _FileHandle
202
+ );
203
+
204
+ _ACRTIMP int __cdecl _locking(
205
+ _In_ int _FileHandle,
206
+ _In_ int _LockMode,
207
+ _In_ long _NumOfBytes
208
+ );
209
+
210
+ _Check_return_opt_
211
+ _ACRTIMP long __cdecl _lseek(
212
+ _In_ int _FileHandle,
213
+ _In_ long _Offset,
214
+ _In_ int _Origin
215
+ );
216
+
217
+ _Success_(return == 0)
218
+ _Check_return_wat_
219
+ _ACRTIMP errno_t __cdecl _mktemp_s(
220
+ _Inout_updates_z_(_Size) char* _TemplateName,
221
+ _In_ size_t _Size
222
+ );
223
+
224
+ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(
225
+ errno_t, _mktemp_s,
226
+ _Prepost_z_ char, _TemplateName
227
+ )
228
+
229
+ _Success_(return != 0)
230
+ _Check_return_ __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(
231
+ char *, __RETURN_POLICY_DST, _ACRTIMP, _mktemp,
232
+ _Inout_z_, char, _TemplateName
233
+ )
234
+
235
+ _ACRTIMP int __cdecl _open_osfhandle(
236
+ _In_ intptr_t _OSFileHandle,
237
+ _In_ int _Flags
238
+ );
239
+
240
+ #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
241
+ _Success_(return != -1)
242
+ _Check_return_
243
+ _DCRTIMP int __cdecl _pipe(
244
+ _Out_writes_(2) int* _PtHandles,
245
+ _In_ unsigned int _PipeSize,
246
+ _In_ int _TextMode
247
+ );
248
+ #endif
249
+
250
+ _Success_(return != -1)
251
+ _Check_return_
252
+ _ACRTIMP int __cdecl _read(
253
+ _In_ int _FileHandle,
254
+ _Out_writes_bytes_(_MaxCharCount) void* _DstBuf,
255
+ _In_ unsigned int _MaxCharCount
256
+ );
257
+
258
+ _ACRTIMP int __cdecl remove(
259
+ _In_z_ char const* _FileName
260
+ );
261
+
262
+ _Check_return_
263
+ _ACRTIMP int __cdecl rename(
264
+ _In_z_ char const* _OldFilename,
265
+ _In_z_ char const* _NewFilename
266
+ );
267
+
268
+ _ACRTIMP int __cdecl _unlink(
269
+ _In_z_ char const* _FileName
270
+ );
271
+
272
+ _Check_return_
273
+ _ACRTIMP int __cdecl _setmode(
274
+ _In_ int _FileHandle,
275
+ _In_ int _Mode
276
+ );
277
+
278
+ _Check_return_
279
+ _ACRTIMP long __cdecl _tell(
280
+ _In_ int _FileHandle
281
+ );
282
+
283
+ _CRT_INSECURE_DEPRECATE(_umask_s)
284
+ _ACRTIMP int __cdecl _umask(
285
+ _In_ int _Mode
286
+ );
287
+
288
+ _Check_return_wat_
289
+ _ACRTIMP errno_t __cdecl _umask_s(
290
+ _In_ int _NewMode,
291
+ _Out_ int* _OldMode
292
+ );
293
+
294
+ _ACRTIMP int __cdecl _write(
295
+ _In_ int _FileHandle,
296
+ _In_reads_bytes_(_MaxCharCount) void const* _Buf,
297
+ _In_ unsigned int _MaxCharCount
298
+ );
299
+
300
+ _Check_return_
301
+ _ACRTIMP __int64 __cdecl _filelengthi64(
302
+ _In_ int _FileHandle
303
+ );
304
+
305
+ _Success_(return != -1)
306
+ _Check_return_
307
+ _ACRTIMP intptr_t __cdecl _findfirst32i64(
308
+ _In_z_ char const* _FileName,
309
+ _Out_ struct _finddata32i64_t* _FindData
310
+ );
311
+
312
+ _Success_(return != -1)
313
+ _Check_return_
314
+ _ACRTIMP intptr_t __cdecl _findfirst64i32(
315
+ _In_z_ char const* _FileName,
316
+ _Out_ struct _finddata64i32_t* _FindData
317
+ );
318
+
319
+ _Success_(return != -1)
320
+ _Check_return_
321
+ _ACRTIMP intptr_t __cdecl _findfirst64(
322
+ _In_z_ char const* _FileName,
323
+ _Out_ struct __finddata64_t* _FindData
324
+ );
325
+
326
+ _Success_(return != -1)
327
+ _Check_return_
328
+ _ACRTIMP int __cdecl _findnext32i64(
329
+ _In_ intptr_t _FindHandle,
330
+ _Out_ struct _finddata32i64_t* _FindData
331
+ );
332
+
333
+ _Success_(return != -1)
334
+ _Check_return_
335
+ _ACRTIMP int __cdecl _findnext64i32(
336
+ _In_ intptr_t _FindHandle,
337
+ _Out_ struct _finddata64i32_t* _FindData
338
+ );
339
+
340
+ _Success_(return != -1)
341
+ _Check_return_
342
+ _ACRTIMP int __cdecl _findnext64(
343
+ _In_ intptr_t _FindHandle,
344
+ _Out_ struct __finddata64_t* _FindData
345
+ );
346
+
347
+ _Check_return_opt_
348
+ _ACRTIMP __int64 __cdecl _lseeki64(
349
+ _In_ int _FileHandle,
350
+ _In_ __int64 _Offset,
351
+ _In_ int _Origin
352
+ );
353
+
354
+ _Check_return_
355
+ _ACRTIMP __int64 __cdecl _telli64(
356
+ _In_ int _FileHandle
357
+ );
358
+
359
+ _Check_return_wat_
360
+ _ACRTIMP errno_t __cdecl _sopen_s(
361
+ _Out_ int* _FileHandle,
362
+ _In_z_ char const* _FileName,
363
+ _In_ int _OpenFlag,
364
+ _In_ int _ShareFlag,
365
+ _In_ int _PermissionMode
366
+ );
367
+
368
+ _Check_return_
369
+ _ACRTIMP errno_t __cdecl _sopen_s_nolock(
370
+ _Out_ int* _FileHandle,
371
+ _In_z_ char const* _FileName,
372
+ _In_ int _OpenFlag,
373
+ _In_ int _ShareFlag,
374
+ _In_ int _PermissionMode
375
+ );
376
+
377
+ _ACRTIMP errno_t __cdecl _sopen_dispatch(
378
+ _In_z_ char const* _FileName,
379
+ _In_ int _OFlag,
380
+ _In_ int _ShFlag,
381
+ _In_ int _PMode,
382
+ _Out_ int* _PFileHandle,
383
+ _In_ int _BSecure
384
+ );
385
+
386
+
387
+
388
+ #ifdef __cplusplus
389
+
390
+ // These function do not validate pmode; use _sopen_s instead.
391
+ extern "C++" _Check_return_ _CRT_INSECURE_DEPRECATE(_sopen_s)
392
+ inline int __CRTDECL _open(
393
+ _In_z_ char const* const _FileName,
394
+ _In_ int const _OFlag,
395
+ _In_ int const _PMode = 0
396
+ )
397
+ {
398
+ int _FileHandle;
399
+ // Last parameter passed as 0 because we don't want to validate pmode from _open
400
+ errno_t const _Result = _sopen_dispatch(_FileName, _OFlag, _SH_DENYNO, _PMode, &_FileHandle, 0);
401
+ return _Result ? -1 : _FileHandle;
402
+ }
403
+
404
+ extern "C++" _Check_return_ _CRT_INSECURE_DEPRECATE(_sopen_s)
405
+ inline int __CRTDECL _sopen(
406
+ _In_z_ char const* const _FileName,
407
+ _In_ int const _OFlag,
408
+ _In_ int const _ShFlag,
409
+ _In_ int const _PMode = 0
410
+ )
411
+ {
412
+ int _FileHandle;
413
+ // Last parameter passed as 0 because we don't want to validate pmode from _sopen
414
+ errno_t const _Result = _sopen_dispatch(_FileName, _OFlag, _ShFlag, _PMode, &_FileHandle, 0);
415
+ return _Result ? -1 : _FileHandle;
416
+ }
417
+
418
+ #else
419
+
420
+ _Check_return_ _CRT_INSECURE_DEPRECATE(_sopen_s)
421
+ _ACRTIMP int __cdecl _open(
422
+ _In_z_ char const* _FileName,
423
+ _In_ int _OpenFlag,
424
+ ...);
425
+
426
+ _Check_return_ _CRT_INSECURE_DEPRECATE(_sopen_s)
427
+ _ACRTIMP int __cdecl _sopen(
428
+ _In_z_ char const* _FileName,
429
+ _In_ int _OpenFlag,
430
+ _In_ int _ShareFlag,
431
+ ...);
432
+
433
+ #endif
434
+
435
+
436
+
437
+ #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
438
+ // Suppress warnings about double deprecation
439
+ #pragma warning(push)
440
+ #pragma warning(disable: 4141)
441
+
442
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_access)
443
+ _ACRTIMP int __cdecl access(
444
+ _In_z_ char const* _FileName,
445
+ _In_ int _AccessMode
446
+ );
447
+
448
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_chmod)
449
+ _ACRTIMP int __cdecl chmod(
450
+ _In_z_ char const* _FileName,
451
+ _In_ int _AccessMode
452
+ );
453
+
454
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_chsize)
455
+ _ACRTIMP int __cdecl chsize(
456
+ _In_ int _FileHandle,
457
+ _In_ long _Size
458
+ );
459
+
460
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_close)
461
+ _ACRTIMP int __cdecl close(
462
+ _In_ int _FileHandle
463
+ );
464
+
465
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_creat) _CRT_INSECURE_DEPRECATE(_sopen_s)
466
+ _ACRTIMP int __cdecl creat(
467
+ _In_z_ char const* _FileName,
468
+ _In_ int _PermissionMode
469
+ );
470
+
471
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_dup)
472
+ _ACRTIMP int __cdecl dup(
473
+ _In_ int _FileHandle
474
+ );
475
+
476
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_dup2)
477
+ _ACRTIMP int __cdecl dup2(
478
+ _In_ int _FileHandleSrc,
479
+ _In_ int _FileHandleDst
480
+ );
481
+
482
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_eof)
483
+ _ACRTIMP int __cdecl eof(
484
+ _In_ int _FileHandle
485
+ );
486
+
487
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_filelength)
488
+ _ACRTIMP long __cdecl filelength(
489
+ _In_ int _FileHandle
490
+ );
491
+
492
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_isatty)
493
+ _ACRTIMP int __cdecl isatty(
494
+ _In_ int _FileHandle
495
+ );
496
+
497
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_locking)
498
+ _ACRTIMP int __cdecl locking(
499
+ _In_ int _FileHandle,
500
+ _In_ int _LockMode,
501
+ _In_ long _NumOfBytes
502
+ );
503
+
504
+ _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_lseek)
505
+ _ACRTIMP long __cdecl lseek(
506
+ _In_ int _FileHandle,
507
+ _In_ long _Offset,
508
+ _In_ int _Origin
509
+ );
510
+
511
+ _Success_(return != 0)
512
+ _CRT_NONSTDC_DEPRECATE(_mktemp) _CRT_INSECURE_DEPRECATE(_mktemp_s)
513
+ _ACRTIMP char * __cdecl mktemp(
514
+ _Inout_z_ char* _TemplateName
515
+ );
516
+
517
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_open) _CRT_INSECURE_DEPRECATE(_sopen_s)
518
+ _ACRTIMP int __cdecl open(
519
+ _In_z_ char const* _FileName,
520
+ _In_ int _OpenFlag,
521
+ ...);
522
+
523
+ _Success_(return != -1)
524
+ _CRT_NONSTDC_DEPRECATE(_read)
525
+ _ACRTIMP int __cdecl read(
526
+ _In_ int _FileHandle,
527
+ _Out_writes_bytes_(_MaxCharCount) void* _DstBuf,
528
+ _In_ unsigned int _MaxCharCount
529
+ );
530
+
531
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_setmode)
532
+ _ACRTIMP int __cdecl setmode(
533
+ _In_ int _FileHandle,
534
+ _In_ int _Mode
535
+ );
536
+
537
+ _CRT_NONSTDC_DEPRECATE(_sopen) _CRT_INSECURE_DEPRECATE(_sopen_s)
538
+ _ACRTIMP int __cdecl sopen(
539
+ _In_ char const* _FileName,
540
+ _In_ int _OpenFlag,
541
+ _In_ int _ShareFlag,
542
+ ...);
543
+
544
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_tell)
545
+ _ACRTIMP long __cdecl tell(
546
+ _In_ int _FileHandle
547
+ );
548
+
549
+ _CRT_NONSTDC_DEPRECATE(_umask) _CRT_INSECURE_DEPRECATE(_umask_s)
550
+ _ACRTIMP int __cdecl umask(
551
+ _In_ int _Mode
552
+ );
553
+
554
+ _CRT_NONSTDC_DEPRECATE(_unlink)
555
+ _ACRTIMP int __cdecl unlink(
556
+ _In_z_ char const* _FileName
557
+ );
558
+
559
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_write)
560
+ _ACRTIMP int __cdecl write(
561
+ _In_ int _FileHandle,
562
+ _In_reads_bytes_(_MaxCharCount) void const* _Buf,
563
+ _In_ unsigned int _MaxCharCount
564
+ );
565
+
566
+ #pragma warning(pop)
567
+ #endif // _CRT_INTERNAL_NONSTDC_NAMES
568
+ #endif // _CRT_FUNCTIONS_REQUIRED
569
+
570
+ _CRT_END_C_HEADER
571
+ _UCRT_RESTORE_CLANG_WARNINGS
572
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_malloc.h ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_malloc.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // The memory allocation library. These pieces of the allocation library are
7
+ // shared by both <stdlib.h> and <malloc.h>.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+
13
+ #pragma warning(push)
14
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
15
+ _UCRT_DISABLE_CLANG_WARNINGS
16
+
17
+ _CRT_BEGIN_C_HEADER
18
+
19
+
20
+
21
+ #if defined _DEBUG && defined _CRTDBG_MAP_ALLOC
22
+ #pragma push_macro("_aligned_free")
23
+ #pragma push_macro("_aligned_malloc")
24
+ #pragma push_macro("_aligned_msize")
25
+ #pragma push_macro("_aligned_offset_malloc")
26
+ #pragma push_macro("_aligned_offset_realloc")
27
+ #pragma push_macro("_aligned_offset_recalloc")
28
+ #pragma push_macro("_aligned_realloc")
29
+ #pragma push_macro("_aligned_recalloc")
30
+ #pragma push_macro("_expand")
31
+ #pragma push_macro("_freea")
32
+ #pragma push_macro("_msize")
33
+ #pragma push_macro("_recalloc")
34
+ #pragma push_macro("calloc")
35
+ #pragma push_macro("free")
36
+ #pragma push_macro("malloc")
37
+ #pragma push_macro("realloc")
38
+
39
+ #undef _aligned_free
40
+ #undef _aligned_malloc
41
+ #undef _aligned_msize
42
+ #undef _aligned_offset_malloc
43
+ #undef _aligned_offset_realloc
44
+ #undef _aligned_offset_recalloc
45
+ #undef _aligned_realloc
46
+ #undef _aligned_recalloc
47
+ #undef _expand
48
+ #undef _freea
49
+ #undef _msize
50
+ #undef _recalloc
51
+ #undef calloc
52
+ #undef free
53
+ #undef malloc
54
+ #undef realloc
55
+ #endif
56
+
57
+ _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size)
58
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
59
+ void* __cdecl _calloc_base(
60
+ _In_ size_t _Count,
61
+ _In_ size_t _Size
62
+ );
63
+
64
+ _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size)
65
+ _ACRTIMP _CRT_JIT_INTRINSIC _CRTALLOCATOR _CRTRESTRICT _CRT_HYBRIDPATCHABLE
66
+ void* __cdecl calloc(
67
+ _In_ _CRT_GUARDOVERFLOW size_t _Count,
68
+ _In_ _CRT_GUARDOVERFLOW size_t _Size
69
+ );
70
+
71
+ _Check_return_
72
+ _ACRTIMP int __cdecl _callnewh(
73
+ _In_ size_t _Size
74
+ );
75
+
76
+ _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
77
+ _ACRTIMP _CRTALLOCATOR _CRT_HYBRIDPATCHABLE
78
+ void* __cdecl _expand(
79
+ _Pre_notnull_ void* _Block,
80
+ _In_ _CRT_GUARDOVERFLOW size_t _Size
81
+ );
82
+
83
+ _ACRTIMP
84
+ void __cdecl _free_base(
85
+ _Pre_maybenull_ _Post_invalid_ void* _Block
86
+ );
87
+
88
+ _ACRTIMP _CRT_HYBRIDPATCHABLE
89
+ void __cdecl free(
90
+ _Pre_maybenull_ _Post_invalid_ void* _Block
91
+ );
92
+
93
+ _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
94
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
95
+ void* __cdecl _malloc_base(
96
+ _In_ size_t _Size
97
+ );
98
+
99
+ _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
100
+ _ACRTIMP _CRTALLOCATOR _CRT_JIT_INTRINSIC _CRTRESTRICT _CRT_HYBRIDPATCHABLE
101
+ void* __cdecl malloc(
102
+ _In_ _CRT_GUARDOVERFLOW size_t _Size
103
+ );
104
+
105
+ _Check_return_
106
+ _ACRTIMP
107
+ size_t __cdecl _msize_base(
108
+ _Pre_notnull_ void* _Block
109
+ ) _CRT_NOEXCEPT;
110
+
111
+ _Check_return_
112
+ _ACRTIMP _CRT_HYBRIDPATCHABLE
113
+ size_t __cdecl _msize(
114
+ _Pre_notnull_ void* _Block
115
+ );
116
+
117
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
118
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
119
+ void* __cdecl _realloc_base(
120
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
121
+ _In_ size_t _Size
122
+ );
123
+
124
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
125
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT _CRT_HYBRIDPATCHABLE
126
+ void* __cdecl realloc(
127
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
128
+ _In_ _CRT_GUARDOVERFLOW size_t _Size
129
+ );
130
+
131
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size)
132
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
133
+ void* __cdecl _recalloc_base(
134
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
135
+ _In_ size_t _Count,
136
+ _In_ size_t _Size
137
+ );
138
+
139
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size)
140
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
141
+ void* __cdecl _recalloc(
142
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
143
+ _In_ _CRT_GUARDOVERFLOW size_t _Count,
144
+ _In_ _CRT_GUARDOVERFLOW size_t _Size
145
+ );
146
+
147
+ _ACRTIMP
148
+ void __cdecl _aligned_free(
149
+ _Pre_maybenull_ _Post_invalid_ void* _Block
150
+ );
151
+
152
+ _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
153
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
154
+ void* __cdecl _aligned_malloc(
155
+ _In_ _CRT_GUARDOVERFLOW size_t _Size,
156
+ _In_ size_t _Alignment
157
+ );
158
+
159
+ _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
160
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
161
+ void* __cdecl _aligned_offset_malloc(
162
+ _In_ _CRT_GUARDOVERFLOW size_t _Size,
163
+ _In_ size_t _Alignment,
164
+ _In_ size_t _Offset
165
+ );
166
+
167
+ _Check_return_
168
+ _ACRTIMP
169
+ size_t __cdecl _aligned_msize(
170
+ _Pre_notnull_ void* _Block,
171
+ _In_ size_t _Alignment,
172
+ _In_ size_t _Offset
173
+ );
174
+
175
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
176
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
177
+ void* __cdecl _aligned_offset_realloc(
178
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
179
+ _In_ _CRT_GUARDOVERFLOW size_t _Size,
180
+ _In_ size_t _Alignment,
181
+ _In_ size_t _Offset
182
+ );
183
+
184
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size)
185
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
186
+ void* __cdecl _aligned_offset_recalloc(
187
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
188
+ _In_ _CRT_GUARDOVERFLOW size_t _Count,
189
+ _In_ _CRT_GUARDOVERFLOW size_t _Size,
190
+ _In_ size_t _Alignment,
191
+ _In_ size_t _Offset
192
+ );
193
+
194
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Size)
195
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
196
+ void* __cdecl _aligned_realloc(
197
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
198
+ _In_ _CRT_GUARDOVERFLOW size_t _Size,
199
+ _In_ size_t _Alignment
200
+ );
201
+
202
+ _Success_(return != 0) _Check_return_ _Ret_maybenull_ _Post_writable_byte_size_(_Count * _Size)
203
+ _ACRTIMP _CRTALLOCATOR _CRTRESTRICT
204
+ void* __cdecl _aligned_recalloc(
205
+ _Pre_maybenull_ _Post_invalid_ void* _Block,
206
+ _In_ _CRT_GUARDOVERFLOW size_t _Count,
207
+ _In_ _CRT_GUARDOVERFLOW size_t _Size,
208
+ _In_ size_t _Alignment
209
+ );
210
+
211
+ #if defined _DEBUG && defined _CRTDBG_MAP_ALLOC
212
+ #pragma pop_macro("realloc")
213
+ #pragma pop_macro("malloc")
214
+ #pragma pop_macro("free")
215
+ #pragma pop_macro("calloc")
216
+ #pragma pop_macro("_recalloc")
217
+ #pragma pop_macro("_msize")
218
+ #pragma pop_macro("_freea")
219
+ #pragma pop_macro("_expand")
220
+ #pragma pop_macro("_aligned_recalloc")
221
+ #pragma pop_macro("_aligned_realloc")
222
+ #pragma pop_macro("_aligned_offset_recalloc")
223
+ #pragma pop_macro("_aligned_offset_realloc")
224
+ #pragma pop_macro("_aligned_offset_malloc")
225
+ #pragma pop_macro("_aligned_msize")
226
+ #pragma pop_macro("_aligned_malloc")
227
+ #pragma pop_macro("_aligned_free")
228
+ #endif
229
+
230
+
231
+
232
+ _CRT_END_C_HEADER
233
+ _UCRT_RESTORE_CLANG_WARNINGS
234
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_math.h ADDED
@@ -0,0 +1,1033 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_math.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // The majority of the C Standard Library <math.h> functionality.
7
+ //
8
+ #pragma once
9
+ #ifndef _INC_MATH // include guard for 3rd party interop
10
+ #define _INC_MATH
11
+
12
+ #include <corecrt.h>
13
+
14
+ #pragma warning(push)
15
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
+ _UCRT_DISABLE_CLANG_WARNINGS
17
+
18
+ _CRT_BEGIN_C_HEADER
19
+
20
+ #ifndef __assembler
21
+ // Definition of the _exception struct, which is passed to the matherr function
22
+ // when a floating point exception is detected:
23
+ struct _exception
24
+ {
25
+ int type; // exception type - see below
26
+ char* name; // name of function where error occurred
27
+ double arg1; // first argument to function
28
+ double arg2; // second argument (if any) to function
29
+ double retval; // value to be returned by function
30
+ };
31
+
32
+ // Definition of the _complex struct to be used by those who use the complex
33
+ // functions and want type checking.
34
+ #ifndef _COMPLEX_DEFINED
35
+ #define _COMPLEX_DEFINED
36
+
37
+ struct _complex
38
+ {
39
+ double x, y; // real and imaginary parts
40
+ };
41
+
42
+ #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES && !defined __cplusplus
43
+ // Non-ANSI name for compatibility
44
+ #define complex _complex
45
+ #endif
46
+ #endif
47
+ #endif // __assembler
48
+
49
+
50
+
51
+ // On x86, when not using /arch:SSE2 or greater, floating point operations
52
+ // are performed using the x87 instruction set and FLT_EVAL_METHOD is 2.
53
+ // (When /fp:fast is used, floating point operations may be consistent, so
54
+ // we use the default types.)
55
+ #if defined _M_IX86 && _M_IX86_FP < 2 && !defined _M_FP_FAST
56
+ typedef long double float_t;
57
+ typedef long double double_t;
58
+ #else
59
+ typedef float float_t;
60
+ typedef double double_t;
61
+ #endif
62
+
63
+
64
+
65
+ // Constant definitions for the exception type passed in the _exception struct
66
+ #define _DOMAIN 1 // argument domain error
67
+ #define _SING 2 // argument singularity
68
+ #define _OVERFLOW 3 // overflow range error
69
+ #define _UNDERFLOW 4 // underflow range error
70
+ #define _TLOSS 5 // total loss of precision
71
+ #define _PLOSS 6 // partial loss of precision
72
+
73
+ // Definitions of _HUGE and HUGE_VAL - respectively the XENIX and ANSI names
74
+ // for a value returned in case of error by a number of the floating point
75
+ // math routines.
76
+ #ifndef __assembler
77
+ #ifndef _M_CEE_PURE
78
+ extern double const _HUGE;
79
+ #else
80
+ double const _HUGE = System::Double::PositiveInfinity;
81
+ #endif
82
+ #endif
83
+
84
+ #ifdef __has_builtin
85
+ #define _UCRT_HAS_BUILTIN(x) __has_builtin(x)
86
+ #else
87
+ #define _UCRT_HAS_BUILTIN(x) 0
88
+ #endif
89
+
90
+ #ifndef _HUGE_ENUF
91
+ #define _HUGE_ENUF 1e+300 // _HUGE_ENUF*_HUGE_ENUF must overflow
92
+ #endif
93
+ #ifndef _UCRT_LEGACY_INFINITY
94
+ #define INFINITY ((float)(_HUGE_ENUF))
95
+ #else
96
+ #define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))
97
+ #endif
98
+ #define HUGE_VAL ((double)INFINITY)
99
+ #define HUGE_VALF ((float)INFINITY)
100
+ #define HUGE_VALL ((long double)INFINITY)
101
+
102
+ #if defined _UCRT_NOISY_NAN || defined __midl || !(defined __cplusplus || _UCRT_HAS_BUILTIN(__builtin_nanf))
103
+ #define _UCRT_NAN (-(float)(((float)(_HUGE_ENUF * _HUGE_ENUF)) * 0.0F))
104
+ #else
105
+ #define _UCRT_NAN (__builtin_nanf("0"))
106
+ #endif
107
+
108
+ #ifdef _UCRT_NEGATIVE_NAN
109
+ #define NAN (-_UCRT_NAN)
110
+ #else
111
+ #define NAN _UCRT_NAN
112
+ #endif
113
+
114
+ #define _DENORM (-2)
115
+ #define _FINITE (-1)
116
+ #define _INFCODE 1
117
+ #define _NANCODE 2
118
+
119
+ #define FP_INFINITE _INFCODE
120
+ #define FP_NAN _NANCODE
121
+ #define FP_NORMAL _FINITE
122
+ #define FP_SUBNORMAL _DENORM
123
+ #define FP_ZERO 0
124
+
125
+ #define _C2 1 // 0 if not 2's complement
126
+ #define FP_ILOGB0 (-0x7fffffff - _C2)
127
+ #define FP_ILOGBNAN 0x7fffffff
128
+
129
+ #define MATH_ERRNO 1
130
+ #define MATH_ERREXCEPT 2
131
+ #define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
132
+
133
+ // Values for use as arguments to the _fperrraise function
134
+ #define _FE_DIVBYZERO 0x04
135
+ #define _FE_INEXACT 0x20
136
+ #define _FE_INVALID 0x01
137
+ #define _FE_OVERFLOW 0x08
138
+ #define _FE_UNDERFLOW 0x10
139
+
140
+ #define _D0_C 3 // little-endian, small long doubles
141
+ #define _D1_C 2
142
+ #define _D2_C 1
143
+ #define _D3_C 0
144
+
145
+ #define _DBIAS 0x3fe
146
+ #define _DOFF 4
147
+
148
+ #define _F0_C 1 // little-endian
149
+ #define _F1_C 0
150
+
151
+ #define _FBIAS 0x7e
152
+ #define _FOFF 7
153
+ #define _FRND 1
154
+
155
+ #define _L0_C 3 // little-endian, 64-bit long doubles
156
+ #define _L1_C 2
157
+ #define _L2_C 1
158
+ #define _L3_C 0
159
+
160
+ #define _LBIAS 0x3fe
161
+ #define _LOFF 4
162
+
163
+ // IEEE 754 double properties
164
+ #define _DFRAC ((unsigned short)((1 << _DOFF) - 1))
165
+ #define _DMASK ((unsigned short)(0x7fff & ~_DFRAC))
166
+ #define _DMAX ((unsigned short)((1 << (15 - _DOFF)) - 1))
167
+ #define _DSIGN ((unsigned short)0x8000)
168
+
169
+ // IEEE 754 float properties
170
+ #define _FFRAC ((unsigned short)((1 << _FOFF) - 1))
171
+ #define _FMASK ((unsigned short)(0x7fff & ~_FFRAC))
172
+ #define _FMAX ((unsigned short)((1 << (15 - _FOFF)) - 1))
173
+ #define _FSIGN ((unsigned short)0x8000)
174
+
175
+ // IEEE 754 long double properties
176
+ #define _LFRAC ((unsigned short)(-1))
177
+ #define _LMASK ((unsigned short)0x7fff)
178
+ #define _LMAX ((unsigned short)0x7fff)
179
+ #define _LSIGN ((unsigned short)0x8000)
180
+
181
+ #define _DHUGE_EXP (int)(_DMAX * 900L / 1000)
182
+ #define _FHUGE_EXP (int)(_FMAX * 900L / 1000)
183
+ #define _LHUGE_EXP (int)(_LMAX * 900L / 1000)
184
+
185
+ #define _DSIGN_C(_Val) (((_double_val *)(char*)&(_Val))->_Sh[_D0_C] & _DSIGN)
186
+ #define _FSIGN_C(_Val) (((_float_val *)(char*)&(_Val))->_Sh[_F0_C] & _FSIGN)
187
+ #define _LSIGN_C(_Val) (((_ldouble_val*)(char*)&(_Val))->_Sh[_L0_C] & _LSIGN)
188
+
189
+ void __cdecl _fperrraise(_In_ int _Except);
190
+
191
+ _Check_return_ _ACRTIMP short __cdecl _dclass(_In_ double _X);
192
+ _Check_return_ _ACRTIMP short __cdecl _ldclass(_In_ long double _X);
193
+ _Check_return_ _ACRTIMP short __cdecl _fdclass(_In_ float _X);
194
+
195
+ _Check_return_ _ACRTIMP int __cdecl _dsign(_In_ double _X);
196
+ _Check_return_ _ACRTIMP int __cdecl _ldsign(_In_ long double _X);
197
+ _Check_return_ _ACRTIMP int __cdecl _fdsign(_In_ float _X);
198
+
199
+ _Check_return_ _ACRTIMP int __cdecl _dpcomp(_In_ double _X, _In_ double _Y);
200
+ _Check_return_ _ACRTIMP int __cdecl _ldpcomp(_In_ long double _X, _In_ long double _Y);
201
+ _Check_return_ _ACRTIMP int __cdecl _fdpcomp(_In_ float _X, _In_ float _Y);
202
+
203
+ _Check_return_ _ACRTIMP short __cdecl _dtest(_In_ double* _Px);
204
+ _Check_return_ _ACRTIMP short __cdecl _ldtest(_In_ long double* _Px);
205
+ _Check_return_ _ACRTIMP short __cdecl _fdtest(_In_ float* _Px);
206
+
207
+ _ACRTIMP short __cdecl _d_int(_Inout_ double* _Px, _In_ short _Xexp);
208
+ _ACRTIMP short __cdecl _ld_int(_Inout_ long double* _Px, _In_ short _Xexp);
209
+ _ACRTIMP short __cdecl _fd_int(_Inout_ float* _Px, _In_ short _Xexp);
210
+
211
+ _ACRTIMP short __cdecl _dscale(_Inout_ double* _Px, _In_ long _Lexp);
212
+ _ACRTIMP short __cdecl _ldscale(_Inout_ long double* _Px, _In_ long _Lexp);
213
+ _ACRTIMP short __cdecl _fdscale(_Inout_ float* _Px, _In_ long _Lexp);
214
+
215
+ _ACRTIMP short __cdecl _dunscale(_Out_ short* _Pex, _Inout_ double* _Px);
216
+ _ACRTIMP short __cdecl _ldunscale(_Out_ short* _Pex, _Inout_ long double* _Px);
217
+ _ACRTIMP short __cdecl _fdunscale(_Out_ short* _Pex, _Inout_ float* _Px);
218
+
219
+ _Check_return_ _ACRTIMP short __cdecl _dexp(_Inout_ double* _Px, _In_ double _Y, _In_ long _Eoff);
220
+ _Check_return_ _ACRTIMP short __cdecl _ldexp(_Inout_ long double* _Px, _In_ long double _Y, _In_ long _Eoff);
221
+ _Check_return_ _ACRTIMP short __cdecl _fdexp(_Inout_ float* _Px, _In_ float _Y, _In_ long _Eoff);
222
+
223
+ _Check_return_ _ACRTIMP short __cdecl _dnorm(_Inout_updates_(4) unsigned short* _Ps);
224
+ _Check_return_ _ACRTIMP short __cdecl _fdnorm(_Inout_updates_(2) unsigned short* _Ps);
225
+
226
+ _Check_return_ _ACRTIMP double __cdecl _dpoly(_In_ double _X, _In_reads_(_N) double const* _Tab, _In_ int _N);
227
+ _Check_return_ _ACRTIMP long double __cdecl _ldpoly(_In_ long double _X, _In_reads_(_N) long double const* _Tab, _In_ int _N);
228
+ _Check_return_ _ACRTIMP float __cdecl _fdpoly(_In_ float _X, _In_reads_(_N) float const* _Tab, _In_ int _N);
229
+
230
+ _Check_return_ _ACRTIMP double __cdecl _dlog(_In_ double _X, _In_ int _Baseflag);
231
+ _Check_return_ _ACRTIMP long double __cdecl _ldlog(_In_ long double _X, _In_ int _Baseflag);
232
+ _Check_return_ _ACRTIMP float __cdecl _fdlog(_In_ float _X, _In_ int _Baseflag);
233
+
234
+ _Check_return_ _ACRTIMP double __cdecl _dsin(_In_ double _X, _In_ unsigned int _Qoff);
235
+ _Check_return_ _ACRTIMP long double __cdecl _ldsin(_In_ long double _X, _In_ unsigned int _Qoff);
236
+ _Check_return_ _ACRTIMP float __cdecl _fdsin(_In_ float _X, _In_ unsigned int _Qoff);
237
+
238
+ // double declarations
239
+ typedef union
240
+ { // pun floating type as integer array
241
+ unsigned short _Sh[4];
242
+ double _Val;
243
+ } _double_val;
244
+
245
+ // float declarations
246
+ typedef union
247
+ { // pun floating type as integer array
248
+ unsigned short _Sh[2];
249
+ float _Val;
250
+ } _float_val;
251
+
252
+ // long double declarations
253
+ typedef union
254
+ { // pun floating type as integer array
255
+ unsigned short _Sh[4];
256
+ long double _Val;
257
+ } _ldouble_val;
258
+
259
+ typedef union
260
+ { // pun float types as integer array
261
+ unsigned short _Word[4];
262
+ float _Float;
263
+ double _Double;
264
+ long double _Long_double;
265
+ } _float_const;
266
+
267
+ extern const _float_const _Denorm_C, _Inf_C, _Nan_C, _Snan_C, _Hugeval_C;
268
+ extern const _float_const _FDenorm_C, _FInf_C, _FNan_C, _FSnan_C;
269
+ extern const _float_const _LDenorm_C, _LInf_C, _LNan_C, _LSnan_C;
270
+
271
+ extern const _float_const _Eps_C, _Rteps_C;
272
+ extern const _float_const _FEps_C, _FRteps_C;
273
+ extern const _float_const _LEps_C, _LRteps_C;
274
+
275
+ extern const double _Zero_C, _Xbig_C;
276
+ extern const float _FZero_C, _FXbig_C;
277
+ extern const long double _LZero_C, _LXbig_C;
278
+
279
+ #define _FP_LT 1
280
+ #define _FP_EQ 2
281
+ #define _FP_GT 4
282
+
283
+ #ifndef __cplusplus
284
+
285
+ #define _CLASS_ARG(_Val) __pragma(warning(suppress:6334))(sizeof ((_Val) + (float)0) == sizeof (float) ? 'f' : sizeof ((_Val) + (double)0) == sizeof (double) ? 'd' : 'l')
286
+ #define _CLASSIFY(_Val, _FFunc, _DFunc, _LDFunc) (_CLASS_ARG(_Val) == 'f' ? _FFunc((float)(_Val)) : _CLASS_ARG(_Val) == 'd' ? _DFunc((double)(_Val)) : _LDFunc((long double)(_Val)))
287
+ #define _CLASSIFY2(_Val1, _Val2, _FFunc, _DFunc, _LDFunc) (_CLASS_ARG((_Val1) + (_Val2)) == 'f' ? _FFunc((float)(_Val1), (float)(_Val2)) : _CLASS_ARG((_Val1) + (_Val2)) == 'd' ? _DFunc((double)(_Val1), (double)(_Val2)) : _LDFunc((long double)(_Val1), (long double)(_Val2)))
288
+
289
+ #if defined(__clang__)
290
+ #define fpclassify(_Val) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, _Val)
291
+ #else
292
+ #define fpclassify(_Val) (_CLASSIFY(_Val, _fdclass, _dclass, _ldclass))
293
+ #endif
294
+ #define _FPCOMPARE(_Val1, _Val2) (_CLASSIFY2(_Val1, _Val2, _fdpcomp, _dpcomp, _ldpcomp))
295
+
296
+ #define isfinite(_Val) (fpclassify(_Val) <= 0)
297
+ #define isinf(_Val) (fpclassify(_Val) == FP_INFINITE)
298
+ #define isnan(_Val) (fpclassify(_Val) == FP_NAN)
299
+ #define isnormal(_Val) (fpclassify(_Val) == FP_NORMAL)
300
+ #define signbit(_Val) (_CLASSIFY(_Val, _fdsign, _dsign, _ldsign))
301
+
302
+ #define isgreater(x, y) ((_FPCOMPARE(x, y) & _FP_GT) != 0)
303
+ #define isgreaterequal(x, y) ((_FPCOMPARE(x, y) & (_FP_EQ | _FP_GT)) != 0)
304
+ #define isless(x, y) ((_FPCOMPARE(x, y) & _FP_LT) != 0)
305
+ #define islessequal(x, y) ((_FPCOMPARE(x, y) & (_FP_LT | _FP_EQ)) != 0)
306
+ #define islessgreater(x, y) ((_FPCOMPARE(x, y) & (_FP_LT | _FP_GT)) != 0)
307
+ #define isunordered(x, y) (_FPCOMPARE(x, y) == 0)
308
+
309
+ #else // __cplusplus
310
+ extern "C++"
311
+ {
312
+ _Check_return_ inline int fpclassify(_In_ float _X) throw()
313
+ {
314
+ #if defined(__clang__)
315
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, _X);
316
+ #else
317
+ return _fdtest(&_X);
318
+ #endif
319
+ }
320
+
321
+ _Check_return_ inline int fpclassify(_In_ double _X) throw()
322
+ {
323
+ #if defined(__clang__)
324
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, _X);
325
+ #else
326
+ return _dtest(&_X);
327
+ #endif
328
+ }
329
+
330
+ _Check_return_ inline int fpclassify(_In_ long double _X) throw()
331
+ {
332
+ #if defined(__clang__)
333
+ return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, _X);
334
+ #else
335
+ return _ldtest(&_X);
336
+ #endif
337
+ }
338
+
339
+ _Check_return_ inline bool signbit(_In_ float _X) throw()
340
+ {
341
+ return _fdsign(_X) != 0;
342
+ }
343
+
344
+ _Check_return_ inline bool signbit(_In_ double _X) throw()
345
+ {
346
+ return _dsign(_X) != 0;
347
+ }
348
+
349
+ _Check_return_ inline bool signbit(_In_ long double _X) throw()
350
+ {
351
+ return _ldsign(_X) != 0;
352
+ }
353
+
354
+ _Check_return_ inline int _fpcomp(_In_ float _X, _In_ float _Y) throw()
355
+ {
356
+ return _fdpcomp(_X, _Y);
357
+ }
358
+
359
+ _Check_return_ inline int _fpcomp(_In_ double _X, _In_ double _Y) throw()
360
+ {
361
+ return _dpcomp(_X, _Y);
362
+ }
363
+
364
+ _Check_return_ inline int _fpcomp(_In_ long double _X, _In_ long double _Y) throw()
365
+ {
366
+ return _ldpcomp(_X, _Y);
367
+ }
368
+
369
+ template <class _Trc, class _Tre> struct _Combined_type
370
+ { // determine combined type
371
+ typedef float _Type;
372
+ };
373
+
374
+ template <> struct _Combined_type<float, double>
375
+ { // determine combined type
376
+ typedef double _Type;
377
+ };
378
+
379
+ template <> struct _Combined_type<float, long double>
380
+ { // determine combined type
381
+ typedef long double _Type;
382
+ };
383
+
384
+ template <class _Ty, class _T2> struct _Real_widened
385
+ { // determine widened real type
386
+ typedef long double _Type;
387
+ };
388
+
389
+ template <> struct _Real_widened<float, float>
390
+ { // determine widened real type
391
+ typedef float _Type;
392
+ };
393
+
394
+ template <> struct _Real_widened<float, double>
395
+ { // determine widened real type
396
+ typedef double _Type;
397
+ };
398
+
399
+ template <> struct _Real_widened<double, float>
400
+ { // determine widened real type
401
+ typedef double _Type;
402
+ };
403
+
404
+ template <> struct _Real_widened<double, double>
405
+ { // determine widened real type
406
+ typedef double _Type;
407
+ };
408
+
409
+ template <class _Ty> struct _Real_type
410
+ { // determine equivalent real type
411
+ typedef double _Type; // default is double
412
+ };
413
+
414
+ template <> struct _Real_type<float>
415
+ { // determine equivalent real type
416
+ typedef float _Type;
417
+ };
418
+
419
+ template <> struct _Real_type<long double>
420
+ { // determine equivalent real type
421
+ typedef long double _Type;
422
+ };
423
+
424
+ template <class _T1, class _T2>
425
+ _Check_return_ inline int _fpcomp(_In_ _T1 _X, _In_ _T2 _Y) throw()
426
+ { // compare _Left and _Right
427
+ typedef typename _Combined_type<float,
428
+ typename _Real_widened<
429
+ typename _Real_type<_T1>::_Type,
430
+ typename _Real_type<_T2>::_Type>::_Type>::_Type _Tw;
431
+ return _fpcomp((_Tw)_X, (_Tw)_Y);
432
+ }
433
+
434
+ template <class _Ty>
435
+ _Check_return_ inline bool isfinite(_In_ _Ty _X) throw()
436
+ {
437
+ return fpclassify(_X) <= 0;
438
+ }
439
+
440
+ template <class _Ty>
441
+ _Check_return_ inline bool isinf(_In_ _Ty _X) throw()
442
+ {
443
+ return fpclassify(_X) == FP_INFINITE;
444
+ }
445
+
446
+ template <class _Ty>
447
+ _Check_return_ inline bool isnan(_In_ _Ty _X) throw()
448
+ {
449
+ return fpclassify(_X) == FP_NAN;
450
+ }
451
+
452
+ template <class _Ty>
453
+ _Check_return_ inline bool isnormal(_In_ _Ty _X) throw()
454
+ {
455
+ return fpclassify(_X) == FP_NORMAL;
456
+ }
457
+
458
+ template <class _Ty1, class _Ty2>
459
+ _Check_return_ inline bool isgreater(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
460
+ {
461
+ return (_fpcomp(_X, _Y) & _FP_GT) != 0;
462
+ }
463
+
464
+ template <class _Ty1, class _Ty2>
465
+ _Check_return_ inline bool isgreaterequal(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
466
+ {
467
+ return (_fpcomp(_X, _Y) & (_FP_EQ | _FP_GT)) != 0;
468
+ }
469
+
470
+ template <class _Ty1, class _Ty2>
471
+ _Check_return_ inline bool isless(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
472
+ {
473
+ return (_fpcomp(_X, _Y) & _FP_LT) != 0;
474
+ }
475
+
476
+ template <class _Ty1, class _Ty2>
477
+ _Check_return_ inline bool islessequal(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
478
+ {
479
+ return (_fpcomp(_X, _Y) & (_FP_LT | _FP_EQ)) != 0;
480
+ }
481
+
482
+ template <class _Ty1, class _Ty2>
483
+ _Check_return_ inline bool islessgreater(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
484
+ {
485
+ return (_fpcomp(_X, _Y) & (_FP_LT | _FP_GT)) != 0;
486
+ }
487
+
488
+ template <class _Ty1, class _Ty2>
489
+ _Check_return_ inline bool isunordered(_In_ _Ty1 _X, _In_ _Ty2 _Y) throw()
490
+ {
491
+ return _fpcomp(_X, _Y) == 0;
492
+ }
493
+ } // extern "C++"
494
+ #endif // __cplusplus
495
+
496
+
497
+
498
+ #if _CRT_FUNCTIONS_REQUIRED
499
+
500
+ _Check_return_ int __cdecl abs(_In_ int _X);
501
+ _Check_return_ long __cdecl labs(_In_ long _X);
502
+ _Check_return_ long long __cdecl llabs(_In_ long long _X);
503
+
504
+ _Check_return_ double __cdecl acos(_In_ double _X);
505
+ _Check_return_ double __cdecl asin(_In_ double _X);
506
+ _Check_return_ double __cdecl atan(_In_ double _X);
507
+ _Check_return_ double __cdecl atan2(_In_ double _Y, _In_ double _X);
508
+
509
+ _Check_return_ double __cdecl cos(_In_ double _X);
510
+ _Check_return_ double __cdecl cosh(_In_ double _X);
511
+ _Check_return_ double __cdecl exp(_In_ double _X);
512
+ _Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double _X);
513
+ _Check_return_ double __cdecl fmod(_In_ double _X, _In_ double _Y);
514
+ _Check_return_ double __cdecl log(_In_ double _X);
515
+ _Check_return_ double __cdecl log10(_In_ double _X);
516
+ _Check_return_ double __cdecl pow(_In_ double _X, _In_ double _Y);
517
+ _Check_return_ double __cdecl sin(_In_ double _X);
518
+ _Check_return_ double __cdecl sinh(_In_ double _X);
519
+ _Check_return_ _CRT_JIT_INTRINSIC double __cdecl sqrt(_In_ double _X);
520
+ _Check_return_ double __cdecl tan(_In_ double _X);
521
+ _Check_return_ double __cdecl tanh(_In_ double _X);
522
+
523
+ _Check_return_ _ACRTIMP double __cdecl acosh(_In_ double _X);
524
+ _Check_return_ _ACRTIMP double __cdecl asinh(_In_ double _X);
525
+ _Check_return_ _ACRTIMP double __cdecl atanh(_In_ double _X);
526
+ _Check_return_ _ACRTIMP double __cdecl atof(_In_z_ char const* _String);
527
+ _Check_return_ _ACRTIMP double __cdecl _atof_l(_In_z_ char const* _String, _In_opt_ _locale_t _Locale);
528
+ _Check_return_ _ACRTIMP double __cdecl _cabs(_In_ struct _complex _Complex_value);
529
+ _Check_return_ _ACRTIMP double __cdecl cbrt(_In_ double _X);
530
+ _Check_return_ _ACRTIMP double __cdecl ceil(_In_ double _X);
531
+ _Check_return_ _ACRTIMP double __cdecl _chgsign(_In_ double _X);
532
+ _Check_return_ _ACRTIMP double __cdecl copysign(_In_ double _Number, _In_ double _Sign);
533
+ _Check_return_ _ACRTIMP double __cdecl _copysign(_In_ double _Number, _In_ double _Sign);
534
+ _Check_return_ _ACRTIMP double __cdecl erf(_In_ double _X);
535
+ _Check_return_ _ACRTIMP double __cdecl erfc(_In_ double _X);
536
+ _Check_return_ _ACRTIMP double __cdecl exp2(_In_ double _X);
537
+ _Check_return_ _ACRTIMP double __cdecl expm1(_In_ double _X);
538
+ _Check_return_ _ACRTIMP double __cdecl fdim(_In_ double _X, _In_ double _Y);
539
+ _Check_return_ _ACRTIMP double __cdecl floor(_In_ double _X);
540
+ _Check_return_ _ACRTIMP double __cdecl fma(_In_ double _X, _In_ double _Y, _In_ double _Z);
541
+ _Check_return_ _ACRTIMP double __cdecl fmax(_In_ double _X, _In_ double _Y);
542
+ _Check_return_ _ACRTIMP double __cdecl fmin(_In_ double _X, _In_ double _Y);
543
+ _Check_return_ _ACRTIMP double __cdecl frexp(_In_ double _X, _Out_ int* _Y);
544
+ _Check_return_ _ACRTIMP double __cdecl hypot(_In_ double _X, _In_ double _Y);
545
+ _Check_return_ _ACRTIMP double __cdecl _hypot(_In_ double _X, _In_ double _Y);
546
+ _Check_return_ _ACRTIMP int __cdecl ilogb(_In_ double _X);
547
+ _Check_return_ _ACRTIMP double __cdecl ldexp(_In_ double _X, _In_ int _Y);
548
+ _Check_return_ _ACRTIMP double __cdecl lgamma(_In_ double _X);
549
+ _Check_return_ _ACRTIMP long long __cdecl llrint(_In_ double _X);
550
+ _Check_return_ _ACRTIMP long long __cdecl llround(_In_ double _X);
551
+ _Check_return_ _ACRTIMP double __cdecl log1p(_In_ double _X);
552
+ _Check_return_ _ACRTIMP double __cdecl log2(_In_ double _X);
553
+ _Check_return_ _ACRTIMP double __cdecl logb(_In_ double _X);
554
+ _Check_return_ _ACRTIMP long __cdecl lrint(_In_ double _X);
555
+ _Check_return_ _ACRTIMP long __cdecl lround(_In_ double _X);
556
+
557
+ int __CRTDECL _matherr(_Inout_ struct _exception* _Except);
558
+
559
+ _Check_return_ _ACRTIMP double __cdecl modf(_In_ double _X, _Out_ double* _Y);
560
+ _Check_return_ _ACRTIMP double __cdecl nan(_In_ char const* _X);
561
+ _Check_return_ _ACRTIMP double __cdecl nearbyint(_In_ double _X);
562
+ _Check_return_ _ACRTIMP double __cdecl nextafter(_In_ double _X, _In_ double _Y);
563
+ _Check_return_ _ACRTIMP double __cdecl nexttoward(_In_ double _X, _In_ long double _Y);
564
+ _Check_return_ _ACRTIMP double __cdecl remainder(_In_ double _X, _In_ double _Y);
565
+ _Check_return_ _ACRTIMP double __cdecl remquo(_In_ double _X, _In_ double _Y, _Out_ int* _Z);
566
+ _Check_return_ _ACRTIMP double __cdecl rint(_In_ double _X);
567
+ _Check_return_ _ACRTIMP double __cdecl round(_In_ double _X);
568
+ _Check_return_ _ACRTIMP double __cdecl scalbln(_In_ double _X, _In_ long _Y);
569
+ _Check_return_ _ACRTIMP double __cdecl scalbn(_In_ double _X, _In_ int _Y);
570
+ _Check_return_ _ACRTIMP double __cdecl tgamma(_In_ double _X);
571
+ _Check_return_ _ACRTIMP double __cdecl trunc(_In_ double _X);
572
+ _Check_return_ _ACRTIMP double __cdecl _j0(_In_ double _X );
573
+ _Check_return_ _ACRTIMP double __cdecl _j1(_In_ double _X );
574
+ _Check_return_ _ACRTIMP double __cdecl _jn(int _X, _In_ double _Y);
575
+ _Check_return_ _ACRTIMP double __cdecl _y0(_In_ double _X);
576
+ _Check_return_ _ACRTIMP double __cdecl _y1(_In_ double _X);
577
+ _Check_return_ _ACRTIMP double __cdecl _yn(_In_ int _X, _In_ double _Y);
578
+
579
+ _Check_return_ _ACRTIMP float __cdecl acoshf(_In_ float _X);
580
+ _Check_return_ _ACRTIMP float __cdecl asinhf(_In_ float _X);
581
+ _Check_return_ _ACRTIMP float __cdecl atanhf(_In_ float _X);
582
+ _Check_return_ _ACRTIMP float __cdecl cbrtf(_In_ float _X);
583
+ _Check_return_ _ACRTIMP float __cdecl _chgsignf(_In_ float _X);
584
+ _Check_return_ _ACRTIMP float __cdecl copysignf(_In_ float _Number, _In_ float _Sign);
585
+ _Check_return_ _ACRTIMP float __cdecl _copysignf(_In_ float _Number, _In_ float _Sign);
586
+ _Check_return_ _ACRTIMP float __cdecl erff(_In_ float _X);
587
+ _Check_return_ _ACRTIMP float __cdecl erfcf(_In_ float _X);
588
+ _Check_return_ _ACRTIMP float __cdecl expm1f(_In_ float _X);
589
+ _Check_return_ _ACRTIMP float __cdecl exp2f(_In_ float _X);
590
+ _Check_return_ _ACRTIMP float __cdecl fdimf(_In_ float _X, _In_ float _Y);
591
+ _Check_return_ _ACRTIMP float __cdecl fmaf(_In_ float _X, _In_ float _Y, _In_ float _Z);
592
+ _Check_return_ _ACRTIMP float __cdecl fmaxf(_In_ float _X, _In_ float _Y);
593
+ _Check_return_ _ACRTIMP float __cdecl fminf(_In_ float _X, _In_ float _Y);
594
+ _Check_return_ _ACRTIMP float __cdecl _hypotf(_In_ float _X, _In_ float _Y);
595
+ _Check_return_ _ACRTIMP int __cdecl ilogbf(_In_ float _X);
596
+ _Check_return_ _ACRTIMP float __cdecl lgammaf(_In_ float _X);
597
+ _Check_return_ _ACRTIMP long long __cdecl llrintf(_In_ float _X);
598
+ _Check_return_ _ACRTIMP long long __cdecl llroundf(_In_ float _X);
599
+ _Check_return_ _ACRTIMP float __cdecl log1pf(_In_ float _X);
600
+ _Check_return_ _ACRTIMP float __cdecl log2f(_In_ float _X);
601
+ _Check_return_ _ACRTIMP float __cdecl logbf(_In_ float _X);
602
+ _Check_return_ _ACRTIMP long __cdecl lrintf(_In_ float _X);
603
+ _Check_return_ _ACRTIMP long __cdecl lroundf(_In_ float _X);
604
+ _Check_return_ _ACRTIMP float __cdecl nanf(_In_ char const* _X);
605
+ _Check_return_ _ACRTIMP float __cdecl nearbyintf(_In_ float _X);
606
+ _Check_return_ _ACRTIMP float __cdecl nextafterf(_In_ float _X, _In_ float _Y);
607
+ _Check_return_ _ACRTIMP float __cdecl nexttowardf(_In_ float _X, _In_ long double _Y);
608
+ _Check_return_ _ACRTIMP float __cdecl remainderf(_In_ float _X, _In_ float _Y);
609
+ _Check_return_ _ACRTIMP float __cdecl remquof(_In_ float _X, _In_ float _Y, _Out_ int* _Z);
610
+ _Check_return_ _ACRTIMP float __cdecl rintf(_In_ float _X);
611
+ _Check_return_ _ACRTIMP float __cdecl roundf(_In_ float _X);
612
+ _Check_return_ _ACRTIMP float __cdecl scalblnf(_In_ float _X, _In_ long _Y);
613
+ _Check_return_ _ACRTIMP float __cdecl scalbnf(_In_ float _X, _In_ int _Y);
614
+ _Check_return_ _ACRTIMP float __cdecl tgammaf(_In_ float _X);
615
+ _Check_return_ _ACRTIMP float __cdecl truncf(_In_ float _X);
616
+
617
+ #if defined _M_IX86
618
+
619
+ _Check_return_ _ACRTIMP int __cdecl _set_SSE2_enable(_In_ int _Flag);
620
+
621
+ #endif
622
+
623
+ #if defined _M_X64
624
+
625
+ _Check_return_ _ACRTIMP float __cdecl _logbf(_In_ float _X);
626
+ _Check_return_ _ACRTIMP float __cdecl _nextafterf(_In_ float _X, _In_ float _Y);
627
+ _Check_return_ _ACRTIMP int __cdecl _finitef(_In_ float _X);
628
+ _Check_return_ _ACRTIMP int __cdecl _isnanf(_In_ float _X);
629
+ _Check_return_ _ACRTIMP int __cdecl _fpclassf(_In_ float _X);
630
+
631
+ _Check_return_ _ACRTIMP int __cdecl _set_FMA3_enable(_In_ int _Flag);
632
+ _Check_return_ _ACRTIMP int __cdecl _get_FMA3_enable(void);
633
+
634
+ #elif defined _M_ARM || defined _M_ARM64 || defined _M_HYBRID_X86_ARM64
635
+
636
+ _Check_return_ _ACRTIMP int __cdecl _finitef(_In_ float _X);
637
+ _Check_return_ _ACRTIMP float __cdecl _logbf(_In_ float _X);
638
+
639
+ #endif
640
+
641
+
642
+
643
+ #if defined _M_X64 || defined _M_ARM || defined _M_ARM64 || defined _M_HYBRID_X86_ARM64 || defined _CORECRT_BUILD_APISET || defined _M_ARM64EC
644
+
645
+ _Check_return_ _ACRTIMP float __cdecl acosf(_In_ float _X);
646
+ _Check_return_ _ACRTIMP float __cdecl asinf(_In_ float _X);
647
+ _Check_return_ _ACRTIMP float __cdecl atan2f(_In_ float _Y, _In_ float _X);
648
+ _Check_return_ _ACRTIMP float __cdecl atanf(_In_ float _X);
649
+ _Check_return_ _ACRTIMP float __cdecl ceilf(_In_ float _X);
650
+ _Check_return_ _ACRTIMP float __cdecl cosf(_In_ float _X);
651
+ _Check_return_ _ACRTIMP float __cdecl coshf(_In_ float _X);
652
+ _Check_return_ _ACRTIMP float __cdecl expf(_In_ float _X);
653
+
654
+ #else
655
+
656
+ _Check_return_ __inline float __CRTDECL acosf(_In_ float _X)
657
+ {
658
+ return (float)acos(_X);
659
+ }
660
+
661
+ _Check_return_ __inline float __CRTDECL asinf(_In_ float _X)
662
+ {
663
+ return (float)asin(_X);
664
+ }
665
+
666
+ _Check_return_ __inline float __CRTDECL atan2f(_In_ float _Y, _In_ float _X)
667
+ {
668
+ return (float)atan2(_Y, _X);
669
+ }
670
+
671
+ _Check_return_ __inline float __CRTDECL atanf(_In_ float _X)
672
+ {
673
+ return (float)atan(_X);
674
+ }
675
+
676
+ _Check_return_ __inline float __CRTDECL ceilf(_In_ float _X)
677
+ {
678
+ return (float)ceil(_X);
679
+ }
680
+
681
+ _Check_return_ __inline float __CRTDECL cosf(_In_ float _X)
682
+ {
683
+ return (float)cos(_X);
684
+ }
685
+
686
+ _Check_return_ __inline float __CRTDECL coshf(_In_ float _X)
687
+ {
688
+ return (float)cosh(_X);
689
+ }
690
+
691
+ _Check_return_ __inline float __CRTDECL expf(_In_ float _X)
692
+ {
693
+ return (float)exp(_X);
694
+ }
695
+
696
+ #endif
697
+
698
+ #if defined _M_ARM || defined _M_ARM64 || defined _M_HYBRID_X86_ARM64
699
+
700
+ _Check_return_ _CRT_JIT_INTRINSIC _ACRTIMP float __cdecl fabsf(_In_ float _X);
701
+
702
+ #else
703
+
704
+ #if defined _M_ARM64EC
705
+ _Check_return_ __inline float __CRTDECL fabsf(_In_ float _X);
706
+ #pragma function(fabsf)
707
+ #endif
708
+
709
+ _Check_return_ __inline float __CRTDECL fabsf(_In_ float _X)
710
+ {
711
+ return (float)fabs(_X);
712
+ }
713
+
714
+ #endif
715
+
716
+ #if defined _M_X64 || defined _M_ARM || defined _M_ARM64 || defined _M_HYBRID_X86_ARM64 || defined _M_ARM64EC
717
+
718
+ _Check_return_ _ACRTIMP float __cdecl floorf(_In_ float _X);
719
+ _Check_return_ _ACRTIMP float __cdecl fmodf(_In_ float _X, _In_ float _Y);
720
+
721
+ #else
722
+
723
+ _Check_return_ __inline float __CRTDECL floorf(_In_ float _X)
724
+ {
725
+ return (float)floor(_X);
726
+ }
727
+
728
+ _Check_return_ __inline float __CRTDECL fmodf(_In_ float _X, _In_ float _Y)
729
+ {
730
+ return (float)fmod(_X, _Y);
731
+ }
732
+
733
+ #endif
734
+
735
+ _Check_return_ __inline float __CRTDECL frexpf(_In_ float _X, _Out_ int *_Y)
736
+ {
737
+ return (float)frexp(_X, _Y);
738
+ }
739
+
740
+ _Check_return_ __inline float __CRTDECL hypotf(_In_ float _X, _In_ float _Y)
741
+ {
742
+ return _hypotf(_X, _Y);
743
+ }
744
+
745
+ _Check_return_ __inline float __CRTDECL ldexpf(_In_ float _X, _In_ int _Y)
746
+ {
747
+ return (float)ldexp(_X, _Y);
748
+ }
749
+
750
+ #if defined _M_X64 || defined _M_ARM || defined _M_ARM64 || defined _M_HYBRID_X86_ARM64 || defined _CORECRT_BUILD_APISET || defined _M_ARM64EC
751
+
752
+ _Check_return_ _ACRTIMP float __cdecl log10f(_In_ float _X);
753
+ _Check_return_ _ACRTIMP float __cdecl logf(_In_ float _X);
754
+ _Check_return_ _ACRTIMP float __cdecl modff(_In_ float _X, _Out_ float *_Y);
755
+ _Check_return_ _ACRTIMP float __cdecl powf(_In_ float _X, _In_ float _Y);
756
+ _Check_return_ _ACRTIMP float __cdecl sinf(_In_ float _X);
757
+ _Check_return_ _ACRTIMP float __cdecl sinhf(_In_ float _X);
758
+ _Check_return_ _ACRTIMP float __cdecl sqrtf(_In_ float _X);
759
+ _Check_return_ _ACRTIMP float __cdecl tanf(_In_ float _X);
760
+ _Check_return_ _ACRTIMP float __cdecl tanhf(_In_ float _X);
761
+
762
+ #else
763
+
764
+ _Check_return_ __inline float __CRTDECL log10f(_In_ float _X)
765
+ {
766
+ return (float)log10(_X);
767
+ }
768
+
769
+ _Check_return_ __inline float __CRTDECL logf(_In_ float _X)
770
+ {
771
+ return (float)log(_X);
772
+ }
773
+
774
+ _Check_return_ __inline float __CRTDECL modff(_In_ float _X, _Out_ float* _Y)
775
+ {
776
+ double _F, _I;
777
+ _F = modf(_X, &_I);
778
+ *_Y = (float)_I;
779
+ return (float)_F;
780
+ }
781
+
782
+ _Check_return_ __inline float __CRTDECL powf(_In_ float _X, _In_ float _Y)
783
+ {
784
+ return (float)pow(_X, _Y);
785
+ }
786
+
787
+ _Check_return_ __inline float __CRTDECL sinf(_In_ float _X)
788
+ {
789
+ return (float)sin(_X);
790
+ }
791
+
792
+ _Check_return_ __inline float __CRTDECL sinhf(_In_ float _X)
793
+ {
794
+ return (float)sinh(_X);
795
+ }
796
+
797
+ _Check_return_ __inline float __CRTDECL sqrtf(_In_ float _X)
798
+ {
799
+ return (float)sqrt(_X);
800
+ }
801
+
802
+ _Check_return_ __inline float __CRTDECL tanf(_In_ float _X)
803
+ {
804
+ return (float)tan(_X);
805
+ }
806
+
807
+ _Check_return_ __inline float __CRTDECL tanhf(_In_ float _X)
808
+ {
809
+ return (float)tanh(_X);
810
+ }
811
+
812
+ #endif
813
+
814
+ _Check_return_ _ACRTIMP long double __cdecl acoshl(_In_ long double _X);
815
+
816
+ _Check_return_ __inline long double __CRTDECL acosl(_In_ long double _X)
817
+ {
818
+ return acos((double)_X);
819
+ }
820
+
821
+ _Check_return_ _ACRTIMP long double __cdecl asinhl(_In_ long double _X);
822
+
823
+ _Check_return_ __inline long double __CRTDECL asinl(_In_ long double _X)
824
+ {
825
+ return asin((double)_X);
826
+ }
827
+
828
+ _Check_return_ __inline long double __CRTDECL atan2l(_In_ long double _Y, _In_ long double _X)
829
+ {
830
+ return atan2((double)_Y, (double)_X);
831
+ }
832
+
833
+ _Check_return_ _ACRTIMP long double __cdecl atanhl(_In_ long double _X);
834
+
835
+ _Check_return_ __inline long double __CRTDECL atanl(_In_ long double _X)
836
+ {
837
+ return atan((double)_X);
838
+ }
839
+
840
+ _Check_return_ _ACRTIMP long double __cdecl cbrtl(_In_ long double _X);
841
+
842
+ _Check_return_ __inline long double __CRTDECL ceill(_In_ long double _X)
843
+ {
844
+ return ceil((double)_X);
845
+ }
846
+
847
+ _Check_return_ __inline long double __CRTDECL _chgsignl(_In_ long double _X)
848
+ {
849
+ return _chgsign((double)_X);
850
+ }
851
+
852
+ _Check_return_ _ACRTIMP long double __cdecl copysignl(_In_ long double _Number, _In_ long double _Sign);
853
+
854
+ _Check_return_ __inline long double __CRTDECL _copysignl(_In_ long double _Number, _In_ long double _Sign)
855
+ {
856
+ return _copysign((double)_Number, (double)_Sign);
857
+ }
858
+
859
+ _Check_return_ __inline long double __CRTDECL coshl(_In_ long double _X)
860
+ {
861
+ return cosh((double)_X);
862
+ }
863
+
864
+ _Check_return_ __inline long double __CRTDECL cosl(_In_ long double _X)
865
+ {
866
+ return cos((double)_X);
867
+ }
868
+
869
+ _Check_return_ _ACRTIMP long double __cdecl erfl(_In_ long double _X);
870
+ _Check_return_ _ACRTIMP long double __cdecl erfcl(_In_ long double _X);
871
+
872
+ _Check_return_ __inline long double __CRTDECL expl(_In_ long double _X)
873
+ {
874
+ return exp((double)_X);
875
+ }
876
+
877
+ _Check_return_ _ACRTIMP long double __cdecl exp2l(_In_ long double _X);
878
+ _Check_return_ _ACRTIMP long double __cdecl expm1l(_In_ long double _X);
879
+
880
+ _Check_return_ __inline long double __CRTDECL fabsl(_In_ long double _X)
881
+ {
882
+ return fabs((double)_X);
883
+ }
884
+
885
+ _Check_return_ _ACRTIMP long double __cdecl fdiml(_In_ long double _X, _In_ long double _Y);
886
+
887
+ _Check_return_ __inline long double __CRTDECL floorl(_In_ long double _X)
888
+ {
889
+ return floor((double)_X);
890
+ }
891
+
892
+ _Check_return_ _ACRTIMP long double __cdecl fmal(_In_ long double _X, _In_ long double _Y, _In_ long double _Z);
893
+ _Check_return_ _ACRTIMP long double __cdecl fmaxl(_In_ long double _X, _In_ long double _Y);
894
+ _Check_return_ _ACRTIMP long double __cdecl fminl(_In_ long double _X, _In_ long double _Y);
895
+
896
+ _Check_return_ __inline long double __CRTDECL fmodl(_In_ long double _X, _In_ long double _Y)
897
+ {
898
+ return fmod((double)_X, (double)_Y);
899
+ }
900
+
901
+ _Check_return_ __inline long double __CRTDECL frexpl(_In_ long double _X, _Out_ int *_Y)
902
+ {
903
+ return frexp((double)_X, _Y);
904
+ }
905
+
906
+ _Check_return_ _ACRTIMP int __cdecl ilogbl(_In_ long double _X);
907
+
908
+ _Check_return_ __inline long double __CRTDECL _hypotl(_In_ long double _X, _In_ long double _Y)
909
+ {
910
+ return _hypot((double)_X, (double)_Y);
911
+ }
912
+
913
+ _Check_return_ __inline long double __CRTDECL hypotl(_In_ long double _X, _In_ long double _Y)
914
+ {
915
+ return _hypot((double)_X, (double)_Y);
916
+ }
917
+
918
+ _Check_return_ __inline long double __CRTDECL ldexpl(_In_ long double _X, _In_ int _Y)
919
+ {
920
+ return ldexp((double)_X, _Y);
921
+ }
922
+
923
+ _Check_return_ _ACRTIMP long double __cdecl lgammal(_In_ long double _X);
924
+ _Check_return_ _ACRTIMP long long __cdecl llrintl(_In_ long double _X);
925
+ _Check_return_ _ACRTIMP long long __cdecl llroundl(_In_ long double _X);
926
+
927
+ _Check_return_ __inline long double __CRTDECL logl(_In_ long double _X)
928
+ {
929
+ return log((double)_X);
930
+ }
931
+
932
+ _Check_return_ __inline long double __CRTDECL log10l(_In_ long double _X)
933
+ {
934
+ return log10((double)_X);
935
+ }
936
+
937
+ _Check_return_ _ACRTIMP long double __cdecl log1pl(_In_ long double _X);
938
+ _Check_return_ _ACRTIMP long double __cdecl log2l(_In_ long double _X);
939
+ _Check_return_ _ACRTIMP long double __cdecl logbl(_In_ long double _X);
940
+ _Check_return_ _ACRTIMP long __cdecl lrintl(_In_ long double _X);
941
+ _Check_return_ _ACRTIMP long __cdecl lroundl(_In_ long double _X);
942
+
943
+ _Check_return_ __inline long double __CRTDECL modfl(_In_ long double _X, _Out_ long double* _Y)
944
+ {
945
+ double _F, _I;
946
+ _F = modf((double)_X, &_I);
947
+ *_Y = _I;
948
+ return _F;
949
+ }
950
+
951
+ _Check_return_ _ACRTIMP long double __cdecl nanl(_In_ char const* _X);
952
+ _Check_return_ _ACRTIMP long double __cdecl nearbyintl(_In_ long double _X);
953
+ _Check_return_ _ACRTIMP long double __cdecl nextafterl(_In_ long double _X, _In_ long double _Y);
954
+ _Check_return_ _ACRTIMP long double __cdecl nexttowardl(_In_ long double _X, _In_ long double _Y);
955
+
956
+ _Check_return_ __inline long double __CRTDECL powl(_In_ long double _X, _In_ long double _Y)
957
+ {
958
+ return pow((double)_X, (double)_Y);
959
+ }
960
+
961
+ _Check_return_ _ACRTIMP long double __cdecl remainderl(_In_ long double _X, _In_ long double _Y);
962
+ _Check_return_ _ACRTIMP long double __cdecl remquol(_In_ long double _X, _In_ long double _Y, _Out_ int* _Z);
963
+ _Check_return_ _ACRTIMP long double __cdecl rintl(_In_ long double _X);
964
+ _Check_return_ _ACRTIMP long double __cdecl roundl(_In_ long double _X);
965
+ _Check_return_ _ACRTIMP long double __cdecl scalblnl(_In_ long double _X, _In_ long _Y);
966
+ _Check_return_ _ACRTIMP long double __cdecl scalbnl(_In_ long double _X, _In_ int _Y);
967
+
968
+ _Check_return_ __inline long double __CRTDECL sinhl(_In_ long double _X)
969
+ {
970
+ return sinh((double)_X);
971
+ }
972
+
973
+ _Check_return_ __inline long double __CRTDECL sinl(_In_ long double _X)
974
+ {
975
+ return sin((double)_X);
976
+ }
977
+
978
+ _Check_return_ __inline long double __CRTDECL sqrtl(_In_ long double _X)
979
+ {
980
+ return sqrt((double)_X);
981
+ }
982
+
983
+ _Check_return_ __inline long double __CRTDECL tanhl(_In_ long double _X)
984
+ {
985
+ return tanh((double)_X);
986
+ }
987
+
988
+ _Check_return_ __inline long double __CRTDECL tanl(_In_ long double _X)
989
+ {
990
+ return tan((double)_X);
991
+ }
992
+
993
+ _Check_return_ _ACRTIMP long double __cdecl tgammal(_In_ long double _X);
994
+ _Check_return_ _ACRTIMP long double __cdecl truncl(_In_ long double _X);
995
+
996
+ #ifndef __cplusplus
997
+ #define _matherrl _matherr
998
+ #endif
999
+
1000
+ #endif // _CRT_FUNCTIONS_REQUIRED
1001
+
1002
+ #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
1003
+
1004
+ #define DOMAIN _DOMAIN
1005
+ #define SING _SING
1006
+ #define OVERFLOW _OVERFLOW
1007
+ #define UNDERFLOW _UNDERFLOW
1008
+ #define TLOSS _TLOSS
1009
+ #define PLOSS _PLOSS
1010
+
1011
+ #define matherr _matherr
1012
+
1013
+ #ifndef __assembler
1014
+ #ifndef _M_CEE_PURE
1015
+ extern double HUGE;
1016
+ #else
1017
+ double const HUGE = _HUGE;
1018
+ #endif
1019
+
1020
+ _CRT_NONSTDC_DEPRECATE(_j0) _Check_return_ _ACRTIMP double __cdecl j0(_In_ double _X);
1021
+ _CRT_NONSTDC_DEPRECATE(_j1) _Check_return_ _ACRTIMP double __cdecl j1(_In_ double _X);
1022
+ _CRT_NONSTDC_DEPRECATE(_jn) _Check_return_ _ACRTIMP double __cdecl jn(_In_ int _X, _In_ double _Y);
1023
+ _CRT_NONSTDC_DEPRECATE(_y0) _Check_return_ _ACRTIMP double __cdecl y0(_In_ double _X);
1024
+ _CRT_NONSTDC_DEPRECATE(_y1) _Check_return_ _ACRTIMP double __cdecl y1(_In_ double _X);
1025
+ _CRT_NONSTDC_DEPRECATE(_yn) _Check_return_ _ACRTIMP double __cdecl yn(_In_ int _X, _In_ double _Y);
1026
+ #endif // !__assembler
1027
+
1028
+ #endif // _CRT_INTERNAL_NONSTDC_NAMES
1029
+
1030
+ _CRT_END_C_HEADER
1031
+ _UCRT_RESTORE_CLANG_WARNINGS
1032
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
1033
+ #endif /* _INC_MATH */
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_math_defines.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_math_defines.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // Definitions of useful mathematical constants
7
+ //
8
+ #pragma once
9
+ #ifndef _MATH_DEFINES_DEFINED
10
+ #define _MATH_DEFINES_DEFINED
11
+
12
+ #include <corecrt.h>
13
+
14
+ #pragma warning(push)
15
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
+ _UCRT_DISABLE_CLANG_WARNINGS
17
+
18
+ // Definitions of useful mathematical constants
19
+ //
20
+ // Define _USE_MATH_DEFINES before including <math.h> to expose these macro
21
+ // definitions for common math constants. These are placed under an #ifdef
22
+ // since these commonly-defined names are not part of the C or C++ standards
23
+ #define M_E 2.71828182845904523536 // e
24
+ #define M_LOG2E 1.44269504088896340736 // log2(e)
25
+ #define M_LOG10E 0.434294481903251827651 // log10(e)
26
+ #define M_LN2 0.693147180559945309417 // ln(2)
27
+ #define M_LN10 2.30258509299404568402 // ln(10)
28
+ #define M_PI 3.14159265358979323846 // pi
29
+ #define M_PI_2 1.57079632679489661923 // pi/2
30
+ #define M_PI_4 0.785398163397448309616 // pi/4
31
+ #define M_1_PI 0.318309886183790671538 // 1/pi
32
+ #define M_2_PI 0.636619772367581343076 // 2/pi
33
+ #define M_2_SQRTPI 1.12837916709551257390 // 2/sqrt(pi)
34
+ #define M_SQRT2 1.41421356237309504880 // sqrt(2)
35
+ #define M_SQRT1_2 0.707106781186547524401 // 1/sqrt(2)
36
+
37
+ _UCRT_RESTORE_CLANG_WARNINGS
38
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
39
+ #endif // _MATH_DEFINES_DEFINED
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_memcpy_s.h ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_memcpy_s.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // Inline definitions of memcpy_s and memmove_s
7
+ //
8
+ #pragma once
9
+
10
+ #include <corecrt.h>
11
+ #include <errno.h>
12
+ #include <vcruntime_string.h>
13
+
14
+ #pragma warning(push)
15
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
+ _UCRT_DISABLE_CLANG_WARNINGS
17
+
18
+ _CRT_BEGIN_C_HEADER
19
+
20
+ #ifndef _CRT_MEMCPY_S_INLINE
21
+ #define _CRT_MEMCPY_S_INLINE static __inline
22
+ #endif
23
+
24
+ #define _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(expr, errorcode) \
25
+ { \
26
+ int _Expr_val=!!(expr); \
27
+ if (!(_Expr_val)) \
28
+ { \
29
+ errno = errorcode; \
30
+ _invalid_parameter_noinfo(); \
31
+ return errorcode; \
32
+ } \
33
+ }
34
+
35
+ #if !defined RC_INVOKED && !defined __midl && __STDC_WANT_SECURE_LIB__
36
+
37
+ // TRANSITION OS-58345186: this function should have external linkage.
38
+ _Success_(return == 0)
39
+ _Check_return_opt_
40
+ _CRT_MEMCPY_S_INLINE errno_t __CRTDECL memcpy_s(
41
+ _Out_writes_bytes_to_opt_(_DestinationSize, _SourceSize) void* const _Destination,
42
+ _In_ rsize_t const _DestinationSize,
43
+ _In_reads_bytes_opt_(_SourceSize) void const* const _Source,
44
+ _In_ rsize_t const _SourceSize
45
+ )
46
+ {
47
+ if (_SourceSize == 0)
48
+ {
49
+ return 0;
50
+ }
51
+
52
+ _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_Destination != NULL, EINVAL);
53
+ if (_Source == NULL || _DestinationSize < _SourceSize)
54
+ {
55
+ memset(_Destination, 0, _DestinationSize);
56
+
57
+ _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_Source != NULL, EINVAL);
58
+ _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_DestinationSize >= _SourceSize, ERANGE);
59
+
60
+ // Unreachable, but required to suppress /analyze warnings:
61
+ return EINVAL;
62
+ }
63
+ memcpy(_Destination, _Source, _SourceSize);
64
+ return 0;
65
+ }
66
+
67
+ // TRANSITION OS-58345186: this function should have external linkage.
68
+ _Check_return_wat_
69
+ _CRT_MEMCPY_S_INLINE errno_t __CRTDECL memmove_s(
70
+ _Out_writes_bytes_to_opt_(_DestinationSize, _SourceSize) void* const _Destination,
71
+ _In_ rsize_t const _DestinationSize,
72
+ _In_reads_bytes_opt_(_SourceSize) void const* const _Source,
73
+ _In_ rsize_t const _SourceSize
74
+ )
75
+ {
76
+ if (_SourceSize == 0)
77
+ {
78
+ return 0;
79
+ }
80
+
81
+ _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_Destination != NULL, EINVAL);
82
+ _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_Source != NULL, EINVAL);
83
+ _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE(_DestinationSize >= _SourceSize, ERANGE);
84
+
85
+ memmove(_Destination, _Source, _SourceSize);
86
+ return 0;
87
+ }
88
+
89
+ #endif
90
+
91
+ #undef _CRT_MEMCPY_S_VALIDATE_RETURN_ERRCODE
92
+
93
+ _UCRT_RESTORE_CLANG_WARNINGS
94
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
95
+ _CRT_END_C_HEADER
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_memory.h ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_memory.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // The buffer (memory) manipulation library. These declarations are split out
7
+ // so that they may be included by both <string.h> and <memory.h>. <string.h>
8
+ // does not include <memory.h> to avoid introducing conflicts with other user
9
+ // headers named <memory.h>.
10
+ //
11
+ #pragma once
12
+
13
+ #include <corecrt.h>
14
+ #include <corecrt_memcpy_s.h>
15
+ #include <vcruntime_string.h>
16
+
17
+ #pragma warning(push)
18
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
19
+ _UCRT_DISABLE_CLANG_WARNINGS
20
+
21
+ #ifndef __midl
22
+
23
+ _CRT_BEGIN_C_HEADER
24
+
25
+
26
+
27
+ _Check_return_
28
+ _ACRTIMP int __cdecl _memicmp(
29
+ _In_reads_bytes_opt_(_Size) void const* _Buf1,
30
+ _In_reads_bytes_opt_(_Size) void const* _Buf2,
31
+ _In_ size_t _Size
32
+ );
33
+
34
+ _Check_return_
35
+ _ACRTIMP int __cdecl _memicmp_l(
36
+ _In_reads_bytes_opt_(_Size) void const* _Buf1,
37
+ _In_reads_bytes_opt_(_Size) void const* _Buf2,
38
+ _In_ size_t _Size,
39
+ _In_opt_ _locale_t _Locale
40
+ );
41
+
42
+
43
+
44
+ #if !defined RC_INVOKED && __STDC_WANT_SECURE_LIB__
45
+
46
+ #if defined __cplusplus && _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY
47
+ extern "C++"
48
+ {
49
+ template <size_t _Size, typename _DstType>
50
+ inline typename _CrtEnableIf<(_Size > 1), void *>::_Type __cdecl memcpy(
51
+ _DstType (&_Dst)[_Size],
52
+ _In_reads_bytes_opt_(_SrcSize) void const* _Src,
53
+ _In_ size_t _SrcSize
54
+ ) _CRT_SECURE_CPP_NOTHROW
55
+ {
56
+ return memcpy_s(_Dst, _Size * sizeof(_DstType), _Src, _SrcSize) == 0 ? _Dst : 0;
57
+ }
58
+ }
59
+ #endif
60
+
61
+ #if defined __cplusplus && _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY
62
+ extern "C++"
63
+ {
64
+ template <size_t _Size, typename _DstType>
65
+ inline errno_t __CRTDECL memcpy_s(
66
+ _DstType (&_Dst)[_Size],
67
+ _In_reads_bytes_opt_(_SrcSize) void const* _Src,
68
+ _In_ rsize_t _SrcSize
69
+ ) _CRT_SECURE_CPP_NOTHROW
70
+ {
71
+ return memcpy_s(_Dst, _Size * sizeof(_DstType), _Src, _SrcSize);
72
+ }
73
+ }
74
+ #endif
75
+
76
+ #endif // !defined RC_INVOKED && __STDC_WANT_SECURE_LIB__
77
+
78
+
79
+
80
+ #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
81
+
82
+ _CRT_NONSTDC_DEPRECATE(_memccpy)
83
+ _ACRTIMP void* __cdecl memccpy(
84
+ _Out_writes_bytes_opt_(_Size) void* _Dst,
85
+ _In_reads_bytes_opt_(_Size) void const* _Src,
86
+ _In_ int _Val,
87
+ _In_ size_t _Size
88
+ );
89
+
90
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_memicmp)
91
+ _ACRTIMP int __cdecl memicmp(
92
+ _In_reads_bytes_opt_(_Size) void const* _Buf1,
93
+ _In_reads_bytes_opt_(_Size) void const* _Buf2,
94
+ _In_ size_t _Size
95
+ );
96
+
97
+ #endif // _CRT_INTERNAL_NONSTDC_NAMES
98
+
99
+
100
+
101
+ #if defined __cplusplus
102
+
103
+ extern "C++" _Check_return_
104
+ inline void* __CRTDECL memchr(
105
+ _In_reads_bytes_opt_(_N) void* _Pv,
106
+ _In_ int _C,
107
+ _In_ size_t _N
108
+ )
109
+ {
110
+ void const* const _Pvc = _Pv;
111
+ return const_cast<void*>(memchr(_Pvc, _C, _N));
112
+ }
113
+
114
+ #endif
115
+
116
+
117
+
118
+ _CRT_END_C_HEADER
119
+
120
+ #endif // !__midl
121
+ _UCRT_RESTORE_CLANG_WARNINGS
122
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_search.h ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_search.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // Declarations of functions for sorting and searching. These declarations are
7
+ // split out so that they may be included by both <stdlib.h> and <search.h>.
8
+ // <stdlib.h> does not include <search.h> to avoid introducing conflicts with
9
+ // other user headers named <search.h>.
10
+ //
11
+ #pragma once
12
+
13
+ #include <corecrt.h>
14
+ #include <stddef.h>
15
+
16
+ #pragma warning(push)
17
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
18
+ _UCRT_DISABLE_CLANG_WARNINGS
19
+
20
+ _CRT_BEGIN_C_HEADER
21
+
22
+
23
+ typedef int (__cdecl* _CoreCrtSecureSearchSortCompareFunction)(void*, void const*, void const*);
24
+ typedef int (__cdecl* _CoreCrtNonSecureSearchSortCompareFunction)(void const*, void const*);
25
+
26
+
27
+ #if __STDC_WANT_SECURE_LIB__
28
+
29
+ _Check_return_
30
+ _ACRTIMP void* __cdecl bsearch_s(
31
+ _In_ void const* _Key,
32
+ _In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
33
+ _In_ rsize_t _NumOfElements,
34
+ _In_ rsize_t _SizeOfElements,
35
+ _In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
36
+ _In_opt_ void* _Context
37
+ );
38
+
39
+ _ACRTIMP void __cdecl qsort_s(
40
+ _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
41
+ _In_ rsize_t _NumOfElements,
42
+ _In_ rsize_t _SizeOfElements,
43
+ _In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
44
+ _In_opt_ void* _Context
45
+ );
46
+
47
+ #endif // __STDC_WANT_SECURE_LIB__
48
+
49
+
50
+
51
+ _Check_return_
52
+ _ACRTIMP void* __cdecl bsearch(
53
+ _In_ void const* _Key,
54
+ _In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
55
+ _In_ size_t _NumOfElements,
56
+ _In_ size_t _SizeOfElements,
57
+ _In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
58
+ );
59
+
60
+ _ACRTIMP void __cdecl qsort(
61
+ _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
62
+ _In_ size_t _NumOfElements,
63
+ _In_ size_t _SizeOfElements,
64
+ _In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
65
+ );
66
+
67
+ _Check_return_
68
+ _ACRTIMP void* __cdecl _lfind_s(
69
+ _In_ void const* _Key,
70
+ _In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
71
+ _Inout_ unsigned int* _NumOfElements,
72
+ _In_ size_t _SizeOfElements,
73
+ _In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
74
+ _In_ void* _Context
75
+ );
76
+
77
+ _Check_return_
78
+ _ACRTIMP void* __cdecl _lfind(
79
+ _In_ void const* _Key,
80
+ _In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
81
+ _Inout_ unsigned int* _NumOfElements,
82
+ _In_ unsigned int _SizeOfElements,
83
+ _In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
84
+ );
85
+
86
+ _Check_return_
87
+ _ACRTIMP void* __cdecl _lsearch_s(
88
+ _In_reads_bytes_(_SizeOfElements) void const* _Key,
89
+ _Inout_updates_bytes_((*_NumOfElements + 1) * _SizeOfElements) void* _Base,
90
+ _Inout_ unsigned int* _NumOfElements,
91
+ _In_ size_t _SizeOfElements,
92
+ _In_ _CoreCrtSecureSearchSortCompareFunction _CompareFunction,
93
+ _In_ void* _Context
94
+ );
95
+
96
+ _Check_return_
97
+ _ACRTIMP void* __cdecl _lsearch(
98
+ _In_reads_bytes_(_SizeOfElements) void const* _Key,
99
+ _Inout_updates_bytes_((*_NumOfElements + 1) * _SizeOfElements) void* _Base,
100
+ _Inout_ unsigned int* _NumOfElements,
101
+ _In_ unsigned int _SizeOfElements,
102
+ _In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
103
+ );
104
+
105
+
106
+
107
+ // Managed search routines
108
+ #if defined __cplusplus && defined _M_CEE
109
+ extern "C++"
110
+ {
111
+ typedef int (__clrcall* _CoreCrtMgdSecureSearchSortCompareFunction)(void*, void const*, void const*);
112
+ typedef int (__clrcall* _CoreCrtMgdNonSecureSearchSortCompareFunction)(void const*, void const*);
113
+
114
+ #if __STDC_WANT_SECURE_LIB__
115
+
116
+ _Check_return_
117
+ void* __clrcall bsearch_s(
118
+ _In_ void const* _Key,
119
+ _In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
120
+ _In_ rsize_t _NumOfElements,
121
+ _In_ rsize_t _SizeOfElements,
122
+ _In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
123
+ _In_ void* _Context);
124
+
125
+ void __clrcall qsort_s(
126
+ _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
127
+ _In_ rsize_t _NumOfElements,
128
+ _In_ rsize_t _SizeOfElements,
129
+ _In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
130
+ _In_ void* _Context);
131
+
132
+ #endif // __STDC_WANT_SECURE_LIB__
133
+
134
+ _Check_return_
135
+ void* __clrcall bsearch(
136
+ _In_ void const* _Key,
137
+ _In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
138
+ _In_ size_t _NumOfElements,
139
+ _In_ size_t _SizeOfElements,
140
+ _In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
141
+ );
142
+
143
+ _Check_return_
144
+ void* __clrcall _lfind_s(
145
+ _In_ void const* _Key,
146
+ _In_reads_bytes_(_NumOfElements * _SizeOfElements) void const* _Base,
147
+ _Inout_ unsigned int* _NumOfElements,
148
+ _In_ size_t _SizeOfElements,
149
+ _In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
150
+ _In_ void* _Context
151
+ );
152
+
153
+ _Check_return_
154
+ void* __clrcall _lfind(
155
+ _In_ void const* _Key,
156
+ _In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
157
+ _Inout_ unsigned int* _NumOfElements,
158
+ _In_ unsigned int _SizeOfElements,
159
+ _In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
160
+ );
161
+
162
+ _Check_return_
163
+ void* __clrcall _lsearch_s(
164
+ _In_ void const* _Key,
165
+ _In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void* _Base,
166
+ _In_ unsigned int* _NumOfElements,
167
+ _In_ size_t _SizeOfElements,
168
+ _In_ _CoreCrtMgdSecureSearchSortCompareFunction _CompareFunction,
169
+ _In_ void* _Context
170
+ );
171
+
172
+ _Check_return_
173
+ void* __clrcall _lsearch(
174
+ _In_ void const* _Key,
175
+ _Inout_updates_bytes_((*_NumOfElements) * _SizeOfElements) void* _Base,
176
+ _Inout_ unsigned int* _NumOfElements,
177
+ _In_ unsigned int _SizeOfElements,
178
+ _In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
179
+ );
180
+
181
+ void __clrcall qsort(
182
+ _Inout_updates_bytes_(_NumOfElements * _SizeOfElements) void* _Base,
183
+ _In_ size_t _NumOfElements,
184
+ _In_ size_t _SizeOfElements,
185
+ _In_ _CoreCrtMgdNonSecureSearchSortCompareFunction _CompareFunction
186
+ );
187
+ }
188
+ #endif // defined __cplusplus && defined _M_CEE
189
+
190
+
191
+
192
+ #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
193
+
194
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_lfind)
195
+ _ACRTIMP void* __cdecl lfind(
196
+ _In_ void const* _Key,
197
+ _In_reads_bytes_((*_NumOfElements) * _SizeOfElements) void const* _Base,
198
+ _Inout_ unsigned int* _NumOfElements,
199
+ _In_ unsigned int _SizeOfElements,
200
+ _In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
201
+ );
202
+
203
+ _Check_return_ _CRT_NONSTDC_DEPRECATE(_lsearch)
204
+ _ACRTIMP void* __cdecl lsearch(
205
+ _In_ void const* _Key,
206
+ _Inout_updates_bytes_((*_NumOfElements) * _SizeOfElements) void* _Base,
207
+ _Inout_ unsigned int* _NumOfElements,
208
+ _In_ unsigned int _SizeOfElements,
209
+ _In_ _CoreCrtNonSecureSearchSortCompareFunction _CompareFunction
210
+ );
211
+
212
+ #endif // _CRT_INTERNAL_NONSTDC_NAMES
213
+
214
+
215
+
216
+ _CRT_END_C_HEADER
217
+ _UCRT_RESTORE_CLANG_WARNINGS
218
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_share.h ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_share.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // Defines the file sharing modes for the sopen() family of functions. These
7
+ // declarations are split out to support the Windows build.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+
13
+ #pragma warning(push)
14
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
15
+ _UCRT_DISABLE_CLANG_WARNINGS
16
+
17
+ #define _SH_DENYRW 0x10 // deny read/write mode
18
+ #define _SH_DENYWR 0x20 // deny write mode
19
+ #define _SH_DENYRD 0x30 // deny read mode
20
+ #define _SH_DENYNO 0x40 // deny none mode
21
+ #define _SH_SECURE 0x80 // secure mode
22
+
23
+
24
+
25
+ #if (defined _CRT_DECLARE_NONSTDC_NAMES && _CRT_DECLARE_NONSTDC_NAMES) || (!defined _CRT_DECLARE_NONSTDC_NAMES && !__STDC__)
26
+ #define SH_DENYRW _SH_DENYRW
27
+ #define SH_DENYWR _SH_DENYWR
28
+ #define SH_DENYRD _SH_DENYRD
29
+ #define SH_DENYNO _SH_DENYNO
30
+ #endif
31
+
32
+ _UCRT_RESTORE_CLANG_WARNINGS
33
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_startup.h ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_startup.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // Declarations for the CoreCRT startup functionality, used while initializing
7
+ // the CRT and during app startup and termination.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+ #include <math.h>
13
+ #include <vcruntime_startup.h>
14
+
15
+ #pragma warning(push)
16
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
17
+ _UCRT_DISABLE_CLANG_WARNINGS
18
+
19
+ _CRT_BEGIN_C_HEADER
20
+
21
+
22
+
23
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
24
+ //
25
+ // Exception Filters for main() and DllMain()
26
+ //
27
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
28
+ struct _EXCEPTION_POINTERS;
29
+
30
+ _ACRTIMP int __cdecl _seh_filter_dll(
31
+ _In_ unsigned long _ExceptionNum,
32
+ _In_ struct _EXCEPTION_POINTERS* _ExceptionPtr
33
+ );
34
+
35
+ _ACRTIMP int __cdecl _seh_filter_exe(
36
+ _In_ unsigned long _ExceptionNum,
37
+ _In_ struct _EXCEPTION_POINTERS* _ExceptionPtr
38
+ );
39
+
40
+
41
+
42
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
43
+ //
44
+ // Miscellaneous Runtime Support
45
+ //
46
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
47
+ typedef enum _crt_app_type
48
+ {
49
+ _crt_unknown_app,
50
+ _crt_console_app,
51
+ _crt_gui_app
52
+ } _crt_app_type;
53
+
54
+ _ACRTIMP _crt_app_type __cdecl _query_app_type(void);
55
+
56
+ _ACRTIMP void __cdecl _set_app_type(
57
+ _In_ _crt_app_type _Type
58
+ );
59
+
60
+ typedef int (__cdecl *_UserMathErrorFunctionPointer)(struct _exception *);
61
+
62
+ _ACRTIMP void __cdecl __setusermatherr(
63
+ _UserMathErrorFunctionPointer _UserMathErrorFunction
64
+ );
65
+
66
+ int __cdecl _is_c_termination_complete(void);
67
+
68
+
69
+
70
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
71
+ //
72
+ // Arguments API for main() et al.
73
+ //
74
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
75
+ _ACRTIMP errno_t __cdecl _configure_narrow_argv(
76
+ _In_ _crt_argv_mode mode
77
+ );
78
+
79
+ _ACRTIMP errno_t __cdecl _configure_wide_argv(
80
+ _In_ _crt_argv_mode mode
81
+ );
82
+
83
+ // There is a linkopt for these to disable environment initialization when using
84
+ // the static CRT, so they are not declared _ACRTIMP.
85
+ int __CRTDECL _initialize_narrow_environment(void);
86
+ int __CRTDECL _initialize_wide_environment(void);
87
+
88
+ _ACRTIMP char** __cdecl _get_initial_narrow_environment(void);
89
+ _ACRTIMP wchar_t** __cdecl _get_initial_wide_environment(void);
90
+
91
+ char* __CRTDECL _get_narrow_winmain_command_line(void);
92
+ wchar_t* __CRTDECL _get_wide_winmain_command_line(void);
93
+
94
+ _ACRTIMP char** __cdecl __p__acmdln(void);
95
+ _ACRTIMP wchar_t** __cdecl __p__wcmdln(void);
96
+
97
+ #ifdef _CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY
98
+ extern char* _acmdln;
99
+ extern wchar_t* _wcmdln;
100
+ #else
101
+ #define _acmdln (*__p__acmdln())
102
+ #define _wcmdln (*__p__wcmdln())
103
+ #endif
104
+
105
+
106
+
107
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
108
+ //
109
+ // Initializer and Terminator Support
110
+ //
111
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
112
+ typedef void (__cdecl* _PVFV)(void);
113
+ typedef int (__cdecl* _PIFV)(void);
114
+ typedef void (__cdecl* _PVFI)(int);
115
+
116
+ #ifndef _M_CEE
117
+ _ACRTIMP void __cdecl _initterm(
118
+ _In_reads_(_Last - _First) _In_ _PVFV* _First,
119
+ _In_ _PVFV* _Last
120
+ );
121
+
122
+ _ACRTIMP int __cdecl _initterm_e(
123
+ _In_reads_(_Last - _First) _PIFV* _First,
124
+ _In_ _PIFV* _Last
125
+ );
126
+ #endif
127
+
128
+ #ifndef _CRT_ONEXIT_T_DEFINED
129
+ #define _CRT_ONEXIT_T_DEFINED
130
+
131
+ typedef int (__CRTDECL* _onexit_t)(void);
132
+ #ifdef _M_CEE
133
+ typedef int (__clrcall* _onexit_m_t)(void);
134
+ #endif
135
+ #endif
136
+
137
+ typedef struct _onexit_table_t
138
+ {
139
+ _PVFV* _first;
140
+ _PVFV* _last;
141
+ _PVFV* _end;
142
+ } _onexit_table_t;
143
+
144
+ _ACRTIMP int __cdecl _initialize_onexit_table(
145
+ _In_opt_ _onexit_table_t* _Table
146
+ );
147
+
148
+ _ACRTIMP int __cdecl _register_onexit_function(
149
+ _In_opt_ _onexit_table_t* _Table,
150
+ _In_opt_ _onexit_t _Function
151
+ );
152
+
153
+ _ACRTIMP int __cdecl _execute_onexit_table(
154
+ _In_opt_ _onexit_table_t* _Table
155
+ );
156
+
157
+ _ACRTIMP int __cdecl _crt_atexit(
158
+ _In_opt_ _PVFV _Function
159
+ );
160
+
161
+ _ACRTIMP int __cdecl _crt_at_quick_exit(
162
+ _In_opt_ _PVFV _Function
163
+ );
164
+
165
+
166
+
167
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
168
+ //
169
+ // Static CRT Initialization Support
170
+ //
171
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
172
+ #if _CRT_FUNCTIONS_REQUIRED
173
+
174
+ _Success_(return != 0)
175
+ __crt_bool __cdecl __acrt_initialize(void);
176
+
177
+ _Success_(return != 0)
178
+ __crt_bool __cdecl __acrt_uninitialize(
179
+ _In_ __crt_bool _Terminating
180
+ );
181
+
182
+ _Success_(return != 0)
183
+ __crt_bool __cdecl __acrt_uninitialize_critical(
184
+ _In_ __crt_bool _Terminating
185
+ );
186
+
187
+ _Success_(return != 0)
188
+ __crt_bool __cdecl __acrt_thread_attach(void);
189
+
190
+ _Success_(return != 0)
191
+ __crt_bool __cdecl __acrt_thread_detach(void);
192
+
193
+ #endif // _CRT_FUNCTIONS_REQUIRED
194
+
195
+
196
+
197
+ _CRT_END_C_HEADER
198
+ _UCRT_RESTORE_CLANG_WARNINGS
199
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_stdio_config.h ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_stdio_config.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // Per-module <stdio.h> configuration.
7
+ //
8
+ #pragma once
9
+
10
+ #include <corecrt.h>
11
+
12
+ #pragma warning(push)
13
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
14
+ _UCRT_DISABLE_CLANG_WARNINGS
15
+
16
+ _CRT_BEGIN_C_HEADER
17
+
18
+ #if !defined _NO_CRT_STDIO_INLINE && !_CRT_FUNCTIONS_REQUIRED
19
+ #define _NO_CRT_STDIO_INLINE
20
+ #endif
21
+
22
+ #if defined _NO_CRT_STDIO_INLINE
23
+ #undef _CRT_STDIO_INLINE
24
+ #define _CRT_STDIO_INLINE
25
+ #elif !defined _CRT_STDIO_INLINE
26
+ #define _CRT_STDIO_INLINE __inline
27
+ #endif
28
+
29
+ #if !defined RC_INVOKED // RC has no target architecture
30
+ #if defined _M_IX86
31
+ #define _CRT_INTERNAL_STDIO_SYMBOL_PREFIX "_"
32
+ #elif defined _M_X64 || defined _M_ARM || defined _M_ARM64
33
+ #define _CRT_INTERNAL_STDIO_SYMBOL_PREFIX ""
34
+ #else
35
+ #error Unsupported architecture
36
+ #endif
37
+ #endif
38
+
39
+
40
+
41
+ // Predefine _CRT_STDIO_ISO_WIDE_SPECIFIERS to use ISO-conforming behavior for
42
+ // the wide string printf and scanf functions (%s, %c, and %[] specifiers).
43
+ //
44
+ // Predefine _CRT_STDIO_LEGACY_WIDE_SPECIFIERS to use VC++ 2013 and earlier behavior for
45
+ // the wide string printf and scanf functions (%s, %c, and %[] specifiers).
46
+ //
47
+ // Predefine _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS when building code that does
48
+ // not use these format specifiers without a length modifier and thus can be
49
+ // used with either the legacy (default) or the conforming mode. (This option
50
+ // is intended for use by static libraries).
51
+ #if !defined RC_INVOKED // _CRT_STDIO_LEGACY_WIDE_SPECIFIERS et al. are too long for rc
52
+ #if defined _CRT_STDIO_ISO_WIDE_SPECIFIERS
53
+ #if defined _CRT_STDIO_LEGACY_WIDE_SPECIFIERS
54
+ #error _CRT_STDIO_ISO_WIDE_SPECIFIERS and _CRT_STDIO_LEGACY_WIDE_SPECIFIERS cannot be defined together.
55
+ #endif
56
+
57
+ #if !defined _M_CEE_PURE
58
+ #pragma comment(lib, "iso_stdio_wide_specifiers")
59
+ #pragma comment(linker, "/include:" _CRT_INTERNAL_STDIO_SYMBOL_PREFIX "__PLEASE_LINK_WITH_iso_stdio_wide_specifiers.lib")
60
+ #endif
61
+ #elif defined _CRT_STDIO_LEGACY_WIDE_SPECIFIERS
62
+ #if !defined _M_CEE_PURE
63
+ #pragma comment(lib, "legacy_stdio_wide_specifiers")
64
+ #pragma comment(linker, "/include:" _CRT_INTERNAL_STDIO_SYMBOL_PREFIX "__PLEASE_LINK_WITH_legacy_stdio_wide_specifiers.lib")
65
+ #endif
66
+ #endif
67
+
68
+ #if defined __cplusplus && !defined _CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS
69
+ #ifdef _CRT_STDIO_ISO_WIDE_SPECIFIERS
70
+ #pragma detect_mismatch("_CRT_STDIO_ISO_WIDE_SPECIFIERS", "1")
71
+ #else
72
+ #pragma detect_mismatch("_CRT_STDIO_ISO_WIDE_SPECIFIERS", "0")
73
+ #endif
74
+ #endif
75
+ #endif
76
+
77
+ // If we're compiling mixed managed code, make sure these inline functions are
78
+ // compiled as native to ensure that there is only one instance of each of the
79
+ // function-local static variables.
80
+ #if defined _M_CEE && !defined _M_CEE_PURE
81
+ #pragma managed(push, off)
82
+ #endif
83
+
84
+ #if _CRT_FUNCTIONS_REQUIRED
85
+ // This function must not be inlined into callers to avoid ODR violations. The
86
+ // static local variable has different names in C and in C++ translation units.
87
+ _Check_return_ _Ret_notnull_
88
+ _CRT_INLINE_PURE_SECURITYCRITICAL_ATTRIBUTE
89
+ __declspec(noinline) __inline unsigned __int64* __CRTDECL __local_stdio_printf_options(void)
90
+ {
91
+ static unsigned __int64 _OptionsStorage;
92
+ return &_OptionsStorage;
93
+ }
94
+
95
+ // This function must not be inlined into callers to avoid ODR violations. The
96
+ // static local variable has different names in C and in C++ translation units.
97
+ _Check_return_ _Ret_notnull_
98
+ _CRT_INLINE_PURE_SECURITYCRITICAL_ATTRIBUTE
99
+ __declspec(noinline) __inline unsigned __int64* __CRTDECL __local_stdio_scanf_options(void)
100
+ {
101
+ static unsigned __int64 _OptionsStorage;
102
+ return &_OptionsStorage;
103
+ }
104
+ #endif
105
+
106
+ #if defined _M_CEE && !defined _M_CEE_PURE
107
+ #pragma managed(pop)
108
+ #endif
109
+
110
+ #define _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS (*__local_stdio_printf_options())
111
+ #define _CRT_INTERNAL_LOCAL_SCANF_OPTIONS (*__local_stdio_scanf_options ())
112
+
113
+
114
+
115
+ #define _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION (1ULL << 0)
116
+ #define _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR (1ULL << 1)
117
+ #define _CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS (1ULL << 2)
118
+ #define _CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY (1ULL << 3)
119
+ #define _CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS (1ULL << 4)
120
+ #define _CRT_INTERNAL_PRINTF_STANDARD_ROUNDING (1ULL << 5)
121
+
122
+
123
+ #define _CRT_INTERNAL_SCANF_SECURECRT (1ULL << 0)
124
+ #define _CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS (1ULL << 1)
125
+ #define _CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY (1ULL << 2)
126
+
127
+
128
+
129
+ _CRT_END_C_HEADER
130
+ _UCRT_RESTORE_CLANG_WARNINGS
131
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_terminate.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_terminate.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // The terminate handler
7
+ //
8
+ #pragma once
9
+
10
+ #include <corecrt.h>
11
+
12
+ #pragma warning(push)
13
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
14
+ _UCRT_DISABLE_CLANG_WARNINGS
15
+
16
+ #ifndef RC_INVOKED
17
+
18
+ _CRT_BEGIN_C_HEADER
19
+
20
+ // terminate_handler is the standard name; terminate_function is defined for
21
+ // source compatibility.
22
+ typedef void (__CRTDECL* terminate_handler )(void);
23
+ typedef void (__CRTDECL* terminate_function)(void);
24
+
25
+ #ifdef _M_CEE
26
+ typedef void (__clrcall* __terminate_function_m)();
27
+ typedef void (__clrcall* __terminate_handler_m )();
28
+ #endif
29
+
30
+ #ifdef __cplusplus
31
+
32
+ _ACRTIMP __declspec(noreturn) void __cdecl abort();
33
+ _ACRTIMP __declspec(noreturn) void __cdecl terminate() throw();
34
+
35
+ #ifndef _M_CEE_PURE
36
+
37
+ _ACRTIMP terminate_handler __cdecl set_terminate(
38
+ _In_opt_ terminate_handler _NewTerminateHandler
39
+ ) throw();
40
+
41
+ _ACRTIMP terminate_handler __cdecl _get_terminate();
42
+
43
+ #endif
44
+
45
+ #endif // __cplusplus
46
+
47
+ _CRT_END_C_HEADER
48
+
49
+ #endif // RC_INVOKED
50
+ _UCRT_RESTORE_CLANG_WARNINGS
51
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wconio.h ADDED
@@ -0,0 +1,424 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_wconio.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // This file declares the wide character (wchar_t) console I/O functionality,
7
+ // shared by both <conio.h> and <wchar.h>
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+ #include <corecrt_stdio_config.h>
13
+
14
+ #pragma warning(push)
15
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
+ _UCRT_DISABLE_CLANG_WARNINGS
17
+
18
+ _CRT_BEGIN_C_HEADER
19
+
20
+ #define WEOF ((wint_t)(0xFFFF))
21
+
22
+
23
+
24
+ #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
25
+
26
+ _Check_return_wat_
27
+ _Success_(_BufferCount > 0)
28
+ _DCRTIMP errno_t __cdecl _cgetws_s(
29
+ _Out_writes_to_(_BufferCount, *_SizeRead) wchar_t* _Buffer,
30
+ _In_ size_t _BufferCount,
31
+ _Out_ size_t* _SizeRead
32
+ );
33
+
34
+ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(
35
+ _Success_(return == 0)
36
+ errno_t, _cgetws_s,
37
+ _Out_writes_z_(*_Buffer) wchar_t, _Buffer,
38
+ _In_ size_t*, _SizeRead
39
+ )
40
+
41
+ _Check_return_opt_
42
+ _DCRTIMP int __cdecl _cputws(
43
+ _In_z_ wchar_t const* _Buffer
44
+ );
45
+
46
+ _Check_return_ _DCRTIMP wint_t __cdecl _getwch (void);
47
+ _Check_return_ _DCRTIMP wint_t __cdecl _getwche (void);
48
+ _Check_return_opt_ _DCRTIMP wint_t __cdecl _putwch (_In_ wchar_t _Character);
49
+ _Check_return_opt_ _DCRTIMP wint_t __cdecl _ungetwch(_In_ wint_t _Character);
50
+
51
+ _Check_return_ _DCRTIMP wint_t __cdecl _getwch_nolock (void);
52
+ _Check_return_ _DCRTIMP wint_t __cdecl _getwche_nolock (void);
53
+ _Check_return_opt_ _DCRTIMP wint_t __cdecl _putwch_nolock (_In_ wchar_t _Character);
54
+ _Check_return_opt_ _DCRTIMP wint_t __cdecl _ungetwch_nolock(_In_ wint_t _Character);
55
+
56
+
57
+
58
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59
+ //
60
+ // Wide Character Formatted Output Functions (Console)
61
+ //
62
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
+ _Check_return_opt_
64
+ _DCRTIMP int __cdecl __conio_common_vcwprintf(
65
+ _In_ unsigned __int64 _Options,
66
+ _In_z_ _Printf_format_string_params_(2) wchar_t const* _Format,
67
+ _In_opt_ _locale_t _Locale,
68
+ va_list _ArgList
69
+ );
70
+
71
+ _Check_return_opt_
72
+ _DCRTIMP int __cdecl __conio_common_vcwprintf_s(
73
+ _In_ unsigned __int64 _Options,
74
+ _In_z_ _Printf_format_string_params_(2) wchar_t const* _Format,
75
+ _In_opt_ _locale_t _Locale,
76
+ va_list _ArgList
77
+ );
78
+
79
+ _Check_return_opt_
80
+ _DCRTIMP int __cdecl __conio_common_vcwprintf_p(
81
+ _In_ unsigned __int64 _Options,
82
+ _In_z_ _Printf_format_string_params_(2) wchar_t const* _Format,
83
+ _In_opt_ _locale_t _Locale,
84
+ va_list _ArgList
85
+ );
86
+
87
+ _Check_return_opt_
88
+ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_l(
89
+ _In_z_ _Printf_format_string_params_(2) wchar_t const* const _Format,
90
+ _In_opt_ _locale_t const _Locale,
91
+ va_list _ArgList
92
+ )
93
+ #if defined _NO_CRT_STDIO_INLINE
94
+ ;
95
+ #else
96
+ {
97
+ return __conio_common_vcwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Format, _Locale, _ArgList);
98
+ }
99
+ #endif
100
+
101
+ _Check_return_opt_
102
+ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf(
103
+ _In_z_ _Printf_format_string_ wchar_t const* const _Format,
104
+ va_list _ArgList
105
+ )
106
+ #if defined _NO_CRT_STDIO_INLINE
107
+ ;
108
+ #else
109
+ {
110
+ return _vcwprintf_l(_Format, NULL, _ArgList);
111
+ }
112
+ #endif
113
+
114
+ _Check_return_opt_
115
+ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_s_l(
116
+ _In_z_ _Printf_format_string_params_(2) wchar_t const* const _Format,
117
+ _In_opt_ _locale_t const _Locale,
118
+ va_list _ArgList
119
+ )
120
+ #if defined _NO_CRT_STDIO_INLINE
121
+ ;
122
+ #else
123
+ {
124
+ return __conio_common_vcwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Format, _Locale, _ArgList);
125
+ }
126
+ #endif
127
+
128
+ _Check_return_opt_
129
+ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_s(
130
+ _In_z_ _Printf_format_string_ wchar_t const* const _Format,
131
+ va_list _ArgList
132
+ )
133
+ #if defined _NO_CRT_STDIO_INLINE
134
+ ;
135
+ #else
136
+ {
137
+ return _vcwprintf_s_l(_Format, NULL, _ArgList);
138
+ }
139
+ #endif
140
+
141
+ _Check_return_opt_
142
+ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_p_l(
143
+ _In_z_ _Printf_format_string_params_(2) wchar_t const* const _Format,
144
+ _In_opt_ _locale_t const _Locale,
145
+ va_list _ArgList
146
+ )
147
+ #if defined _NO_CRT_STDIO_INLINE
148
+ ;
149
+ #else
150
+ {
151
+ return __conio_common_vcwprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Format, _Locale, _ArgList);
152
+ }
153
+ #endif
154
+
155
+ _Check_return_opt_
156
+ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_p(
157
+ _In_z_ _Printf_format_string_ const wchar_t* const _Format,
158
+ va_list _ArgList
159
+ )
160
+ #if defined _NO_CRT_STDIO_INLINE
161
+ ;
162
+ #else
163
+ {
164
+ return _vcwprintf_p_l(_Format, NULL, _ArgList);
165
+ }
166
+ #endif
167
+
168
+ _Check_return_opt_
169
+ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_l(
170
+ _In_z_ _Printf_format_string_params_(0) wchar_t const* const _Format,
171
+ _In_opt_ _locale_t const _Locale,
172
+ ...)
173
+ #if defined _NO_CRT_STDIO_INLINE
174
+ ;
175
+ #else
176
+ {
177
+ int _Result;
178
+ va_list _ArgList;
179
+ __crt_va_start(_ArgList, _Locale);
180
+ _Result = _vcwprintf_l(_Format, _Locale, _ArgList);
181
+ __crt_va_end(_ArgList);
182
+ return _Result;
183
+ }
184
+ #endif
185
+
186
+ _Check_return_opt_
187
+ _CRT_STDIO_INLINE int __CRTDECL _cwprintf(
188
+ _In_z_ _Printf_format_string_ wchar_t const* const _Format,
189
+ ...)
190
+ #if defined _NO_CRT_STDIO_INLINE
191
+ ;
192
+ #else
193
+ {
194
+ int _Result;
195
+ va_list _ArgList;
196
+ __crt_va_start(_ArgList, _Format);
197
+ _Result = _vcwprintf_l(_Format, NULL, _ArgList);
198
+ __crt_va_end(_ArgList);
199
+ return _Result;
200
+ }
201
+ #endif
202
+
203
+ _Check_return_opt_
204
+ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_s_l(
205
+ _In_z_ _Printf_format_string_params_(0) wchar_t const* const _Format,
206
+ _In_opt_ _locale_t const _Locale,
207
+ ...)
208
+ #if defined _NO_CRT_STDIO_INLINE
209
+ ;
210
+ #else
211
+ {
212
+ int _Result;
213
+ va_list _ArgList;
214
+ __crt_va_start(_ArgList, _Locale);
215
+ _Result = _vcwprintf_s_l(_Format, _Locale, _ArgList);
216
+ __crt_va_end(_ArgList);
217
+ return _Result;
218
+ }
219
+ #endif
220
+
221
+ _Check_return_opt_
222
+ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_s(
223
+ _In_z_ _Printf_format_string_ wchar_t const* const _Format,
224
+ ...)
225
+ #if defined _NO_CRT_STDIO_INLINE
226
+ ;
227
+ #else
228
+ {
229
+ int _Result;
230
+ va_list _ArgList;
231
+ __crt_va_start(_ArgList, _Format);
232
+ _Result = _vcwprintf_s_l(_Format, NULL, _ArgList);
233
+ __crt_va_end(_ArgList);
234
+ return _Result;
235
+ }
236
+ #endif
237
+
238
+ _Check_return_opt_
239
+ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_p_l(
240
+ _In_z_ _Printf_format_string_params_(0) wchar_t const* const _Format,
241
+ _In_opt_ _locale_t const _Locale,
242
+ ...)
243
+ #if defined _NO_CRT_STDIO_INLINE
244
+ ;
245
+ #else
246
+ {
247
+ int _Result;
248
+ va_list _ArgList;
249
+ __crt_va_start(_ArgList, _Locale);
250
+ _Result = _vcwprintf_p_l(_Format, _Locale, _ArgList);
251
+ __crt_va_end(_ArgList);
252
+ return _Result;
253
+ }
254
+ #endif
255
+
256
+ _Check_return_opt_
257
+ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_p(
258
+ _In_z_ _Printf_format_string_ wchar_t const* const _Format,
259
+ ...)
260
+ #if defined _NO_CRT_STDIO_INLINE
261
+ ;
262
+ #else
263
+ {
264
+ int _Result;
265
+ va_list _ArgList;
266
+ __crt_va_start(_ArgList, _Format);
267
+ _Result = _vcwprintf_p_l(_Format, NULL, _ArgList);
268
+ __crt_va_end(_ArgList);
269
+ return _Result;
270
+ }
271
+ #endif
272
+
273
+
274
+
275
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
276
+ //
277
+ // Wide Character Formatted Input Functions (Console)
278
+ //
279
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
280
+ _Check_return_opt_
281
+ _DCRTIMP int __cdecl __conio_common_vcwscanf(
282
+ _In_ unsigned __int64 _Options,
283
+ _In_z_ _Scanf_format_string_params_(2) wchar_t const* _Format,
284
+ _In_opt_ _locale_t _Locale,
285
+ va_list _ArgList
286
+ );
287
+
288
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vcwscanf_s_l)
289
+ _CRT_STDIO_INLINE int __CRTDECL _vcwscanf_l(
290
+ _In_z_ _Scanf_format_string_params_(2) wchar_t const* const _Format,
291
+ _In_opt_ _locale_t const _Locale,
292
+ va_list _ArgList
293
+ )
294
+ #if defined _NO_CRT_STDIO_INLINE
295
+ ;
296
+ #else
297
+ {
298
+ return __conio_common_vcwscanf(
299
+ _CRT_INTERNAL_LOCAL_SCANF_OPTIONS,
300
+ _Format, _Locale, _ArgList);
301
+ }
302
+ #endif
303
+
304
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vcwscanf_s)
305
+ _CRT_STDIO_INLINE int __CRTDECL _vcwscanf(
306
+ _In_z_ _Scanf_format_string_params_(1) wchar_t const* const _Format,
307
+ va_list _ArgList
308
+ )
309
+ #if defined _NO_CRT_STDIO_INLINE
310
+ ;
311
+ #else
312
+ {
313
+ return _vcwscanf_l(_Format, NULL, _ArgList);
314
+ }
315
+ #endif
316
+
317
+ _Check_return_opt_
318
+ _CRT_STDIO_INLINE int __CRTDECL _vcwscanf_s_l(
319
+ _In_z_ _Scanf_format_string_params_(2) wchar_t const* const _Format,
320
+ _In_opt_ _locale_t const _Locale,
321
+ va_list _ArgList
322
+ )
323
+ #if defined _NO_CRT_STDIO_INLINE
324
+ ;
325
+ #else
326
+ {
327
+ return __conio_common_vcwscanf(
328
+ _CRT_INTERNAL_LOCAL_SCANF_OPTIONS | _CRT_INTERNAL_SCANF_SECURECRT,
329
+ _Format, _Locale, _ArgList);
330
+ }
331
+ #endif
332
+
333
+ _Check_return_opt_
334
+ _CRT_STDIO_INLINE int __CRTDECL _vcwscanf_s(
335
+ _In_z_ _Scanf_format_string_params_(1) wchar_t const* const _Format,
336
+ va_list _ArgList
337
+ )
338
+ #if defined _NO_CRT_STDIO_INLINE
339
+ ;
340
+ #else
341
+ {
342
+ return _vcwscanf_s_l(_Format, NULL, _ArgList);
343
+ }
344
+ #endif
345
+
346
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_cwscanf_s_l)
347
+ _CRT_STDIO_INLINE int __CRTDECL _cwscanf_l(
348
+ _In_z_ _Scanf_format_string_params_(0) wchar_t const* const _Format,
349
+ _In_opt_ _locale_t const _Locale,
350
+ ...)
351
+ #if defined _NO_CRT_STDIO_INLINE
352
+ ;
353
+ #else
354
+ {
355
+ int _Result;
356
+ va_list _ArgList;
357
+ __crt_va_start(_ArgList, _Locale);
358
+
359
+ _Result = _vcwscanf_l(_Format, _Locale, _ArgList);
360
+
361
+ __crt_va_end(_ArgList);
362
+ return _Result;
363
+ }
364
+ #endif
365
+
366
+ _Check_return_opt_ _CRT_INSECURE_DEPRECATE(_cwscanf_s)
367
+ _CRT_STDIO_INLINE int __CRTDECL _cwscanf(
368
+ _In_z_ _Scanf_format_string_ wchar_t const* const _Format,
369
+ ...)
370
+ #if defined _NO_CRT_STDIO_INLINE
371
+ ;
372
+ #else
373
+ {
374
+ int _Result;
375
+ va_list _ArgList;
376
+ __crt_va_start(_ArgList, _Format);
377
+
378
+ _Result = _vcwscanf_l(_Format, NULL, _ArgList);
379
+
380
+ __crt_va_end(_ArgList);
381
+ return _Result;
382
+ }
383
+ #endif
384
+
385
+ _Check_return_opt_
386
+ _CRT_STDIO_INLINE int __CRTDECL _cwscanf_s_l(
387
+ _In_z_ _Scanf_format_string_params_(0) wchar_t const* const _Format,
388
+ _In_opt_ _locale_t const _Locale,
389
+ ...)
390
+ #if defined _NO_CRT_STDIO_INLINE
391
+ ;
392
+ #else
393
+ {
394
+ int _Result;
395
+ va_list _ArgList;
396
+ __crt_va_start(_ArgList, _Locale);
397
+ _Result = _vcwscanf_s_l(_Format, _Locale, _ArgList);
398
+ __crt_va_end(_ArgList);
399
+ return _Result;
400
+ }
401
+ #endif
402
+
403
+ _Check_return_opt_
404
+ _CRT_STDIO_INLINE int __CRTDECL _cwscanf_s(
405
+ _In_z_ _Scanf_format_string_ wchar_t const* const _Format,
406
+ ...)
407
+ #if defined _NO_CRT_STDIO_INLINE
408
+ ;
409
+ #else
410
+ {
411
+ int _Result;
412
+ va_list _ArgList;
413
+ __crt_va_start(_ArgList, _Format);
414
+ _Result = _vcwscanf_s_l(_Format, NULL, _ArgList);
415
+ __crt_va_end(_ArgList);
416
+ return _Result;
417
+ }
418
+ #endif
419
+
420
+ #endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
421
+
422
+ _CRT_END_C_HEADER
423
+ _UCRT_RESTORE_CLANG_WARNINGS
424
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wctype.h ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_wctype.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // This file declares the wide character (wchar_t) classification functionality,
7
+ // shared by <ctype.h>, <wchar.h>, and <wctype.h>.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+
13
+ #pragma warning(push)
14
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
15
+ _UCRT_DISABLE_CLANG_WARNINGS
16
+
17
+ _CRT_BEGIN_C_HEADER
18
+
19
+
20
+
21
+ #define WEOF ((wint_t)(0xFFFF))
22
+
23
+
24
+
25
+ // This declaration allows the user access to the ctype look-up
26
+ // array _ctype defined in ctype.obj by simply including ctype.h
27
+ #ifndef _CTYPE_DISABLE_MACROS
28
+
29
+ #if defined _CRT_DISABLE_PERFCRIT_LOCKS && !defined _DLL
30
+ #define __PCTYPE_FUNC _pctype
31
+ #else
32
+ #define __PCTYPE_FUNC __pctype_func()
33
+ #endif
34
+
35
+ _ACRTIMP const unsigned short* __cdecl __pctype_func(void);
36
+ _ACRTIMP const wctype_t* __cdecl __pwctype_func(void);
37
+
38
+ #ifdef _CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY
39
+ extern const unsigned short* _pctype;
40
+ extern const wctype_t* _pwctype;
41
+ #else
42
+ #define _pctype (__pctype_func())
43
+ #define _pwctype (__pwctype_func())
44
+ #endif
45
+ #endif
46
+
47
+ // Bit masks for the possible character types
48
+ #define _UPPER 0x01 // uppercase letter
49
+ #define _LOWER 0x02 // lowercase letter
50
+ #define _DIGIT 0x04 // digit[0-9]
51
+ #define _SPACE 0x08 // tab, carriage return, newline, vertical tab, or form feed
52
+ #define _PUNCT 0x10 // punctuation character
53
+ #define _CONTROL 0x20 // control character
54
+ #define _BLANK 0x40 // space char (tab is handled separately)
55
+ #define _HEX 0x80 // hexadecimal digit
56
+
57
+ #define _LEADBYTE 0x8000 // multibyte leadbyte
58
+ #define _ALPHA (0x0100 | _UPPER | _LOWER) // alphabetic character
59
+
60
+
61
+
62
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63
+ //
64
+ // Wide Character Classification and Conversion Functions
65
+ //
66
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
67
+ _Check_return_ _ACRTIMP int __cdecl iswalnum (_In_ wint_t _C);
68
+ _Check_return_ _ACRTIMP int __cdecl iswalpha (_In_ wint_t _C);
69
+ _Check_return_ _ACRTIMP int __cdecl iswascii (_In_ wint_t _C);
70
+ _Check_return_ _ACRTIMP int __cdecl iswblank (_In_ wint_t _C);
71
+ _Check_return_ _ACRTIMP int __cdecl iswcntrl (_In_ wint_t _C);
72
+
73
+ _When_(_Param_(1) == 0, _Post_equal_to_(0))
74
+ _Check_return_ _ACRTIMP int __cdecl iswdigit (_In_ wint_t _C);
75
+
76
+ _Check_return_ _ACRTIMP int __cdecl iswgraph (_In_ wint_t _C);
77
+ _Check_return_ _ACRTIMP int __cdecl iswlower (_In_ wint_t _C);
78
+ _Check_return_ _ACRTIMP int __cdecl iswprint (_In_ wint_t _C);
79
+ _Check_return_ _ACRTIMP int __cdecl iswpunct (_In_ wint_t _C);
80
+ _Check_return_ _ACRTIMP int __cdecl iswspace (_In_ wint_t _C);
81
+ _Check_return_ _ACRTIMP int __cdecl iswupper (_In_ wint_t _C);
82
+ _Check_return_ _ACRTIMP int __cdecl iswxdigit (_In_ wint_t _C);
83
+ _Check_return_ _ACRTIMP int __cdecl __iswcsymf(_In_ wint_t _C);
84
+ _Check_return_ _ACRTIMP int __cdecl __iswcsym (_In_ wint_t _C);
85
+
86
+ _Check_return_ _ACRTIMP int __cdecl _iswalnum_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
87
+ _Check_return_ _ACRTIMP int __cdecl _iswalpha_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
88
+ _Check_return_ _ACRTIMP int __cdecl _iswblank_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
89
+ _Check_return_ _ACRTIMP int __cdecl _iswcntrl_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
90
+ _Check_return_ _ACRTIMP int __cdecl _iswdigit_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
91
+ _Check_return_ _ACRTIMP int __cdecl _iswgraph_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
92
+ _Check_return_ _ACRTIMP int __cdecl _iswlower_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
93
+ _Check_return_ _ACRTIMP int __cdecl _iswprint_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
94
+ _Check_return_ _ACRTIMP int __cdecl _iswpunct_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
95
+ _Check_return_ _ACRTIMP int __cdecl _iswspace_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
96
+ _Check_return_ _ACRTIMP int __cdecl _iswupper_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
97
+ _Check_return_ _ACRTIMP int __cdecl _iswxdigit_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
98
+ _Check_return_ _ACRTIMP int __cdecl _iswcsymf_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
99
+ _Check_return_ _ACRTIMP int __cdecl _iswcsym_l (_In_ wint_t _C, _In_opt_ _locale_t _Locale);
100
+
101
+
102
+ _Check_return_ _ACRTIMP wint_t __cdecl towupper(_In_ wint_t _C);
103
+ _Check_return_ _ACRTIMP wint_t __cdecl towlower(_In_ wint_t _C);
104
+ _Check_return_ _ACRTIMP int __cdecl iswctype(_In_ wint_t _C, _In_ wctype_t _Type);
105
+
106
+ _Check_return_ _ACRTIMP wint_t __cdecl _towupper_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
107
+ _Check_return_ _ACRTIMP wint_t __cdecl _towlower_l(_In_ wint_t _C, _In_opt_ _locale_t _Locale);
108
+ _Check_return_ _ACRTIMP int __cdecl _iswctype_l(_In_ wint_t _C, _In_ wctype_t _Type, _In_opt_ _locale_t _Locale);
109
+
110
+
111
+ #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
112
+ _Check_return_ _ACRTIMP int __cdecl isleadbyte(_In_ int _C);
113
+ _Check_return_ _ACRTIMP int __cdecl _isleadbyte_l(_In_ int _C, _In_opt_ _locale_t _Locale);
114
+
115
+ _CRT_OBSOLETE(iswctype) _DCRTIMP int __cdecl is_wctype(_In_ wint_t _C, _In_ wctype_t _Type);
116
+ #endif
117
+
118
+
119
+
120
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
121
+ //
122
+ // Macro and Inline Definitions
123
+ //
124
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
125
+ #if !defined __cplusplus || defined _M_CEE_PURE || defined MRTDLL || defined _CORECRT_BUILD
126
+ #ifndef _CTYPE_DISABLE_MACROS
127
+
128
+ #define iswalpha(_c) (iswctype(_c, _ALPHA))
129
+ #define iswupper(_c) (iswctype(_c, _UPPER))
130
+ #define iswlower(_c) (iswctype(_c, _LOWER))
131
+ #define iswdigit(_c) (iswctype(_c, _DIGIT))
132
+ #define iswxdigit(_c) (iswctype(_c, _HEX))
133
+ #define iswspace(_c) (iswctype(_c, _SPACE))
134
+ #define iswpunct(_c) (iswctype(_c, _PUNCT))
135
+ #define iswblank(_c) (((_c) == '\t') ? _BLANK : iswctype(_c,_BLANK) )
136
+ #define iswalnum(_c) (iswctype(_c, _ALPHA | _DIGIT))
137
+ #define iswprint(_c) (iswctype(_c, _BLANK | _PUNCT | _ALPHA | _DIGIT))
138
+ #define iswgraph(_c) (iswctype(_c, _PUNCT | _ALPHA | _DIGIT))
139
+ #define iswcntrl(_c) (iswctype(_c, _CONTROL))
140
+ #define iswascii(_c) ((unsigned)(_c) < 0x80)
141
+
142
+ #define _iswalpha_l(_c,_p) (iswctype(_c, _ALPHA))
143
+ #define _iswupper_l(_c,_p) (iswctype(_c, _UPPER))
144
+ #define _iswlower_l(_c,_p) (iswctype(_c, _LOWER))
145
+ #define _iswdigit_l(_c,_p) (iswctype(_c, _DIGIT))
146
+ #define _iswxdigit_l(_c,_p) (iswctype(_c, _HEX))
147
+ #define _iswspace_l(_c,_p) (iswctype(_c, _SPACE))
148
+ #define _iswpunct_l(_c,_p) (iswctype(_c, _PUNCT))
149
+ #define _iswblank_l(_c,_p) (iswctype(_c, _BLANK))
150
+ #define _iswalnum_l(_c,_p) (iswctype(_c, _ALPHA | _DIGIT))
151
+ #define _iswprint_l(_c,_p) (iswctype(_c, _BLANK | _PUNCT | _ALPHA | _DIGIT))
152
+ #define _iswgraph_l(_c,_p) (iswctype(_c, _PUNCT | _ALPHA | _DIGIT))
153
+ #define _iswcntrl_l(_c,_p) (iswctype(_c, _CONTROL))
154
+
155
+ #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
156
+ #define isleadbyte(_c) (__PCTYPE_FUNC[(unsigned char)(_c)] & _LEADBYTE)
157
+ #endif
158
+
159
+ #endif // _CTYPE_DISABLE_MACROS
160
+ // CRT_REFACTOR TODO I've had to remove the inline function definitions because
161
+ // they break the debugger build. These were moved here from <wctype.h> in
162
+ // C968560. We need to figure out what is wrong.
163
+ //#else
164
+ // #ifndef _CTYPE_DISABLE_MACROS
165
+ // inline int __cdecl iswalpha (_In_ wint_t _C) { return iswctype(_C, _ALPHA); }
166
+ // inline int __cdecl iswupper (_In_ wint_t _C) { return iswctype(_C, _UPPER); }
167
+ // inline int __cdecl iswlower (_In_ wint_t _C) { return iswctype(_C, _LOWER); }
168
+ // inline int __cdecl iswdigit (_In_ wint_t _C) { return iswctype(_C, _DIGIT); }
169
+ // inline int __cdecl iswxdigit(_In_ wint_t _C) { return iswctype(_C, _HEX); }
170
+ // inline int __cdecl iswspace (_In_ wint_t _C) { return iswctype(_C, _SPACE); }
171
+ // inline int __cdecl iswpunct (_In_ wint_t _C) { return iswctype(_C, _PUNCT); }
172
+ // inline int __cdecl iswblank (_In_ wint_t _C) { return (((_C) == '\t') ? _BLANK : iswctype(_C,_BLANK)); }
173
+ // inline int __cdecl iswalnum (_In_ wint_t _C) { return iswctype(_C, _ALPHA | _DIGIT); }
174
+ // inline int __cdecl iswprint (_In_ wint_t _C) { return iswctype(_C, _BLANK | _PUNCT | _ALPHA | _DIGIT); }
175
+ // inline int __cdecl iswgraph (_In_ wint_t _C) { return iswctype(_C, _PUNCT | _ALPHA | _DIGIT); }
176
+ // inline int __cdecl iswcntrl (_In_ wint_t _C) { return iswctype(_C, _CONTROL); }
177
+ // inline int __cdecl iswascii (_In_ wint_t _C) { return (unsigned)(_C) < 0x80; }
178
+ //
179
+ // inline int __cdecl _iswalpha_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _ALPHA); }
180
+ // inline int __cdecl _iswupper_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _UPPER); }
181
+ // inline int __cdecl _iswlower_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _LOWER); }
182
+ // inline int __cdecl _iswdigit_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _DIGIT); }
183
+ // inline int __cdecl _iswxdigit_l(_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _HEX); }
184
+ // inline int __cdecl _iswspace_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _SPACE); }
185
+ // inline int __cdecl _iswpunct_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _PUNCT); }
186
+ // inline int __cdecl _iswblank_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _BLANK); }
187
+ // inline int __cdecl _iswalnum_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _ALPHA | _DIGIT); }
188
+ // inline int __cdecl _iswprint_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _BLANK | _PUNCT | _ALPHA | _DIGIT); }
189
+ // inline int __cdecl _iswgraph_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _PUNCT | _ALPHA | _DIGIT); }
190
+ // inline int __cdecl _iswcntrl_l (_In_ wint_t _C, _In_opt_ _locale_t) { return iswctype(_C, _CONTROL); }
191
+ //
192
+ // #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
193
+ // inline int __cdecl isleadbyte(_In_ int _C)
194
+ // {
195
+ // return __pctype_func()[(unsigned char)(_C)] & _LEADBYTE;
196
+ // }
197
+ // #endif
198
+ // #endif
199
+ #endif
200
+
201
+
202
+
203
+ _CRT_END_C_HEADER
204
+ _UCRT_RESTORE_CLANG_WARNINGS
205
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wdirect.h ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_wdirect.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // This file declares the wide character (wchar_t) directory functionality, shared
7
+ // by <direct.h> and <wchar.h>.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+
13
+ #pragma warning(push)
14
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
15
+ _UCRT_DISABLE_CLANG_WARNINGS
16
+
17
+ _CRT_BEGIN_C_HEADER
18
+
19
+ #pragma push_macro("_wgetcwd")
20
+ #pragma push_macro("_wgetdcwd")
21
+ #undef _wgetcwd
22
+ #undef _wgetdcwd
23
+
24
+ _Success_(return != 0)
25
+ _Check_return_ _Ret_maybenull_z_
26
+ _ACRTIMP _CRTALLOCATOR wchar_t* __cdecl _wgetcwd(
27
+ _Out_writes_opt_z_(_SizeInWords) wchar_t* _DstBuf,
28
+ _In_ int _SizeInWords
29
+ );
30
+
31
+ _Success_(return != 0)
32
+ _Check_return_ _Ret_maybenull_z_
33
+ _ACRTIMP _CRTALLOCATOR wchar_t* __cdecl _wgetdcwd(
34
+ _In_ int _Drive,
35
+ _Out_writes_opt_z_(_SizeInWords) wchar_t* _DstBuf,
36
+ _In_ int _SizeInWords
37
+ );
38
+
39
+ #define _wgetdcwd_nolock _wgetdcwd
40
+
41
+ #pragma pop_macro("_wgetcwd")
42
+ #pragma pop_macro("_wgetdcwd")
43
+
44
+ _Check_return_
45
+ _ACRTIMP int __cdecl _wchdir(
46
+ _In_z_ wchar_t const* _Path
47
+ );
48
+
49
+ _Check_return_
50
+ _ACRTIMP int __cdecl _wmkdir(
51
+ _In_z_ wchar_t const* _Path
52
+ );
53
+
54
+ _Check_return_
55
+ _ACRTIMP int __cdecl _wrmdir(
56
+ _In_z_ wchar_t const* _Path
57
+ );
58
+
59
+
60
+
61
+ _CRT_END_C_HEADER
62
+ _UCRT_RESTORE_CLANG_WARNINGS
63
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wio.h ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_wio.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // This file declares the wide character (wchar_t) I/O functionality, shared by
7
+ // <io.h> and <wchar.h>.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+ #include <corecrt_share.h>
13
+
14
+ #pragma warning(push)
15
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
+ _UCRT_DISABLE_CLANG_WARNINGS
17
+
18
+ _CRT_BEGIN_C_HEADER
19
+
20
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
21
+ //
22
+ // Types
23
+ //
24
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
25
+ #ifdef _USE_32BIT_TIME_T
26
+ #define _wfinddata_t _wfinddata32_t
27
+ #define _wfinddatai64_t _wfinddata32i64_t
28
+ #else
29
+ #define _wfinddata_t _wfinddata64i32_t
30
+ #define _wfinddatai64_t _wfinddata64_t
31
+ #endif
32
+
33
+ typedef unsigned long _fsize_t;
34
+
35
+ struct _wfinddata32_t
36
+ {
37
+ unsigned attrib;
38
+ __time32_t time_create; // -1 for FAT file systems
39
+ __time32_t time_access; // -1 for FAT file systems
40
+ __time32_t time_write;
41
+ _fsize_t size;
42
+ wchar_t name[260];
43
+ };
44
+
45
+ struct _wfinddata32i64_t
46
+ {
47
+ unsigned attrib;
48
+ __time32_t time_create; // -1 for FAT file systems
49
+ __time32_t time_access; // -1 for FAT file systems
50
+ __time32_t time_write;
51
+ __int64 size;
52
+ wchar_t name[260];
53
+ };
54
+
55
+ struct _wfinddata64i32_t
56
+ {
57
+ unsigned attrib;
58
+ __time64_t time_create; // -1 for FAT file systems
59
+ __time64_t time_access; // -1 for FAT file systems
60
+ __time64_t time_write;
61
+ _fsize_t size;
62
+ wchar_t name[260];
63
+ };
64
+
65
+ struct _wfinddata64_t
66
+ {
67
+ unsigned attrib;
68
+ __time64_t time_create; // -1 for FAT file systems
69
+ __time64_t time_access; // -1 for FAT file systems
70
+ __time64_t time_write;
71
+ __int64 size;
72
+ wchar_t name[260];
73
+ };
74
+
75
+
76
+
77
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
78
+ //
79
+ // Functions
80
+ //
81
+ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
82
+ #ifdef _USE_32BIT_TIME_T
83
+ #define _wfindfirst _wfindfirst32
84
+ #define _wfindnext _wfindnext32
85
+ #define _wfindfirsti64 _wfindfirst32i64
86
+ #define _wfindnexti64 _wfindnext32i64
87
+ #else
88
+ #define _wfindfirst _wfindfirst64i32
89
+ #define _wfindnext _wfindnext64i32
90
+ #define _wfindfirsti64 _wfindfirst64
91
+ #define _wfindnexti64 _wfindnext64
92
+ #endif
93
+
94
+ _Check_return_
95
+ _ACRTIMP int __cdecl _waccess(
96
+ _In_z_ wchar_t const* _FileName,
97
+ _In_ int _AccessMode
98
+ );
99
+
100
+ _Check_return_wat_
101
+ _ACRTIMP errno_t __cdecl _waccess_s(
102
+ _In_z_ wchar_t const* _FileName,
103
+ _In_ int _AccessMode
104
+ );
105
+
106
+ _Check_return_
107
+ _ACRTIMP int __cdecl _wchmod(
108
+ _In_z_ wchar_t const* _FileName,
109
+ _In_ int _Mode
110
+ );
111
+
112
+ _Check_return_ _CRT_INSECURE_DEPRECATE(_wsopen_s)
113
+ _ACRTIMP int __cdecl _wcreat(
114
+ _In_z_ wchar_t const* _FileName,
115
+ _In_ int _PermissionMode
116
+ );
117
+
118
+ _Success_(return != -1)
119
+ _Check_return_
120
+ _ACRTIMP intptr_t __cdecl _wfindfirst32(
121
+ _In_z_ wchar_t const* _FileName,
122
+ _Out_ struct _wfinddata32_t* _FindData
123
+ );
124
+
125
+ _Success_(return != -1)
126
+ _Check_return_
127
+ _ACRTIMP int __cdecl _wfindnext32(
128
+ _In_ intptr_t _FindHandle,
129
+ _Out_ struct _wfinddata32_t* _FindData
130
+ );
131
+
132
+ _ACRTIMP int __cdecl _wunlink(
133
+ _In_z_ wchar_t const* _FileName
134
+ );
135
+
136
+ _Check_return_
137
+ _ACRTIMP int __cdecl _wrename(
138
+ _In_z_ wchar_t const* _OldFileName,
139
+ _In_z_ wchar_t const* _NewFileName
140
+ );
141
+
142
+ _ACRTIMP errno_t __cdecl _wmktemp_s(
143
+ _Inout_updates_z_(_SizeInWords) wchar_t* _TemplateName,
144
+ _In_ size_t _SizeInWords
145
+ );
146
+
147
+ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0(
148
+ errno_t, _wmktemp_s,
149
+ wchar_t, _TemplateName
150
+ )
151
+
152
+ _Success_(return != 0)
153
+ __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(
154
+ wchar_t*, __RETURN_POLICY_DST, _ACRTIMP, _wmktemp,
155
+ _Inout_z_, wchar_t, _TemplateName
156
+ )
157
+
158
+ _Success_(return != -1)
159
+ _Check_return_
160
+ _ACRTIMP intptr_t __cdecl _wfindfirst32i64(
161
+ _In_z_ wchar_t const* _FileName,
162
+ _Out_ struct _wfinddata32i64_t* _FindData
163
+ );
164
+
165
+ _Success_(return != -1)
166
+ _Check_return_
167
+ _ACRTIMP intptr_t __cdecl _wfindfirst64i32(
168
+ _In_z_ wchar_t const* _FileName,
169
+ _Out_ struct _wfinddata64i32_t* _FindData
170
+ );
171
+
172
+ _Success_(return != -1)
173
+ _Check_return_
174
+ _ACRTIMP intptr_t __cdecl _wfindfirst64(
175
+ _In_z_ wchar_t const* _FileName,
176
+ _Out_ struct _wfinddata64_t* _FindData
177
+ );
178
+
179
+ _Success_(return != -1)
180
+ _Check_return_
181
+ _ACRTIMP int __cdecl _wfindnext32i64(
182
+ _In_ intptr_t _FindHandle,
183
+ _Out_ struct _wfinddata32i64_t* _FindData
184
+ );
185
+
186
+ _Success_(return != -1)
187
+ _Check_return_
188
+ _ACRTIMP int __cdecl _wfindnext64i32(
189
+ _In_ intptr_t _FindHandle,
190
+ _Out_ struct _wfinddata64i32_t* _FindData
191
+ );
192
+
193
+ _Success_(return != -1)
194
+ _Check_return_
195
+ _ACRTIMP int __cdecl _wfindnext64(
196
+ _In_ intptr_t _FindHandle,
197
+ _Out_ struct _wfinddata64_t* _FindData
198
+ );
199
+
200
+ _Check_return_wat_
201
+ _ACRTIMP errno_t __cdecl _wsopen_s(
202
+ _Out_ int* _FileHandle,
203
+ _In_z_ wchar_t const* _FileName,
204
+ _In_ int _OpenFlag,
205
+ _In_ int _ShareFlag,
206
+ _In_ int _PermissionFlag
207
+ );
208
+
209
+ _ACRTIMP errno_t __cdecl _wsopen_dispatch(
210
+ _In_z_ wchar_t const* _FileName,
211
+ _In_ int _OFlag,
212
+ _In_ int _ShFlag,
213
+ _In_ int _PMode,
214
+ _Out_ int* _PFileHandle,
215
+ _In_ int _BSecure
216
+ );
217
+
218
+
219
+
220
+ #if defined __cplusplus
221
+
222
+ // These functions do not validate pmode; use _wsopen_s instead.
223
+ extern "C++" _Check_return_ _CRT_INSECURE_DEPRECATE(_wsopen_s)
224
+ inline int __CRTDECL _wopen(
225
+ _In_z_ wchar_t const* _FileName,
226
+ _In_ int _OFlag,
227
+ _In_ int _PMode = 0
228
+ )
229
+ {
230
+ int _FileHandle;
231
+ // Last parameter passed as 0 because we don't want to validate pmode from _open
232
+ errno_t const _Result = _wsopen_dispatch(_FileName, _OFlag, _SH_DENYNO, _PMode, &_FileHandle, 0);
233
+ return _Result ? -1 : _FileHandle;
234
+ }
235
+
236
+ extern "C++" _Check_return_ _CRT_INSECURE_DEPRECATE(_wsopen_s)
237
+ inline int __CRTDECL _wsopen(
238
+ _In_z_ wchar_t const* _FileName,
239
+ _In_ int _OFlag,
240
+ _In_ int _ShFlag,
241
+ _In_ int _PMode = 0
242
+ )
243
+ {
244
+ int _FileHandle;
245
+ // Last parameter passed as 0 because we don't want to validate pmode from _sopen
246
+ errno_t const _Result = _wsopen_dispatch(_FileName, _OFlag, _ShFlag, _PMode, &_FileHandle, 0);
247
+ return _Result ? -1 : _FileHandle;
248
+ }
249
+
250
+
251
+ #else
252
+
253
+ _Check_return_ _CRT_INSECURE_DEPRECATE(_wsopen_s)
254
+ _ACRTIMP int __cdecl _wopen(
255
+ _In_z_ wchar_t const* _FileName,
256
+ _In_ int _OpenFlag,
257
+ ...);
258
+
259
+ _Check_return_ _CRT_INSECURE_DEPRECATE(_wsopen_s)
260
+ _ACRTIMP int __cdecl _wsopen(
261
+ _In_z_ wchar_t const* _FileName,
262
+ _In_ int _OpenFlag,
263
+ _In_ int _ShareFlag,
264
+ ...);
265
+
266
+ #endif
267
+
268
+ _CRT_END_C_HEADER
269
+ _UCRT_RESTORE_CLANG_WARNINGS
270
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS
msvc/Windows Kits/10/Include/10.0.26100.0/ucrt/corecrt_wprocess.h ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // corecrt_wprocess.h
3
+ //
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // This file declares the wide character (wchar_t) process functionality, shared
7
+ // by <process.h> and <wchar.h>.
8
+ //
9
+ #pragma once
10
+
11
+ #include <corecrt.h>
12
+
13
+ #pragma warning(push)
14
+ #pragma warning(disable: _UCRT_DISABLED_WARNINGS)
15
+ _UCRT_DISABLE_CLANG_WARNINGS
16
+
17
+ _CRT_BEGIN_C_HEADER
18
+
19
+
20
+
21
+ #if _CRT_FUNCTIONS_REQUIRED
22
+ #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
23
+
24
+ _DCRTIMP intptr_t __cdecl _wexecl(
25
+ _In_z_ wchar_t const* _FileName,
26
+ _In_z_ wchar_t const* _ArgList,
27
+ ...);
28
+
29
+ _DCRTIMP intptr_t __cdecl _wexecle(
30
+ _In_z_ wchar_t const* _FileName,
31
+ _In_z_ wchar_t const* _ArgList,
32
+ ...);
33
+
34
+ _DCRTIMP intptr_t __cdecl _wexeclp(
35
+ _In_z_ wchar_t const* _FileName,
36
+ _In_z_ wchar_t const* _ArgList,
37
+ ...);
38
+
39
+ _DCRTIMP intptr_t __cdecl _wexeclpe(
40
+ _In_z_ wchar_t const* _FileName,
41
+ _In_z_ wchar_t const* _ArgList,
42
+ ...);
43
+
44
+ _DCRTIMP intptr_t __cdecl _wexecv(
45
+ _In_z_ wchar_t const* _FileName,
46
+ _In_z_ wchar_t const* const* _ArgList
47
+ );
48
+
49
+ _DCRTIMP intptr_t __cdecl _wexecve(
50
+ _In_z_ wchar_t const* _FileName,
51
+ _In_z_ wchar_t const* const* _ArgList,
52
+ _In_opt_z_ wchar_t const* const* _Env
53
+ );
54
+
55
+ _DCRTIMP intptr_t __cdecl _wexecvp(
56
+ _In_z_ wchar_t const* _FileName,
57
+ _In_z_ wchar_t const* const* _ArgList
58
+ );
59
+
60
+ _DCRTIMP intptr_t __cdecl _wexecvpe(
61
+ _In_z_ wchar_t const* _FileName,
62
+ _In_z_ wchar_t const* const* _ArgList,
63
+ _In_opt_z_ wchar_t const* const* _Env
64
+ );
65
+
66
+ _DCRTIMP intptr_t __cdecl _wspawnl(
67
+ _In_ int _Mode,
68
+ _In_z_ wchar_t const* _FileName,
69
+ _In_z_ wchar_t const* _ArgList,
70
+ ...);
71
+
72
+ _DCRTIMP intptr_t __cdecl _wspawnle(
73
+ _In_ int _Mode,
74
+ _In_z_ wchar_t const* _FileName,
75
+ _In_z_ wchar_t const* _ArgList,
76
+ ...);
77
+
78
+ _DCRTIMP intptr_t __cdecl _wspawnlp(
79
+ _In_ int _Mode,
80
+ _In_z_ wchar_t const* _FileName,
81
+ _In_z_ wchar_t const* _ArgList,
82
+ ...);
83
+
84
+ _DCRTIMP intptr_t __cdecl _wspawnlpe(
85
+ _In_ int _Mode,
86
+ _In_z_ wchar_t const* _FileName,
87
+ _In_z_ wchar_t const* _ArgList,
88
+ ...);
89
+
90
+ _DCRTIMP intptr_t __cdecl _wspawnv(
91
+ _In_ int _Mode,
92
+ _In_z_ wchar_t const* _FileName,
93
+ _In_z_ wchar_t const* const* _ArgList
94
+ );
95
+
96
+ _DCRTIMP intptr_t __cdecl _wspawnve(
97
+ _In_ int _Mode,
98
+ _In_z_ wchar_t const* _FileName,
99
+ _In_z_ wchar_t const* const* _ArgList,
100
+ _In_opt_z_ wchar_t const* const* _Env
101
+ );
102
+
103
+ _DCRTIMP intptr_t __cdecl _wspawnvp(
104
+ _In_ int _Mode,
105
+ _In_z_ wchar_t const* _FileName,
106
+ _In_z_ wchar_t const* const* _ArgList
107
+ );
108
+
109
+ _DCRTIMP intptr_t __cdecl _wspawnvpe(
110
+ _In_ int _Mode,
111
+ _In_z_ wchar_t const* _FileName,
112
+ _In_z_ wchar_t const* const* _ArgList,
113
+ _In_opt_z_ wchar_t const* const* _Env
114
+ );
115
+
116
+ _DCRTIMP int __cdecl _wsystem(
117
+ _In_opt_z_ wchar_t const* _Command
118
+ );
119
+
120
+ #endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
121
+ #endif // _CRT_FUNCTIONS_REQUIRED
122
+
123
+
124
+
125
+ _CRT_END_C_HEADER
126
+ _UCRT_RESTORE_CLANG_WARNINGS
127
+ #pragma warning(pop) // _UCRT_DISABLED_WARNINGS