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

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/cppwinrt/LICENSE.txt +24 -0
  2. msvc/Windows Kits/10/Include/10.0.26100.0/shared/GenericUsbFnIoctl.h +106 -0
  3. msvc/Windows Kits/10/Include/10.0.26100.0/shared/Iprtrmib.h +340 -0
  4. msvc/Windows Kits/10/Include/10.0.26100.0/shared/IssPer16.h +329 -0
  5. msvc/Windows Kits/10/Include/10.0.26100.0/shared/Math3DHelper.h +854 -0
  6. msvc/Windows Kits/10/Include/10.0.26100.0/shared/ShellHandwriting.h +762 -0
  7. msvc/Windows Kits/10/Include/10.0.26100.0/shared/ShellHandwriting.idl +152 -0
  8. msvc/Windows Kits/10/Include/10.0.26100.0/shared/TraceLoggingActivity.h +902 -0
  9. msvc/Windows Kits/10/Include/10.0.26100.0/shared/TraceLoggingProvider.h +0 -0
  10. msvc/Windows Kits/10/Include/10.0.26100.0/shared/afunix.h +33 -0
  11. msvc/Windows Kits/10/Include/10.0.26100.0/shared/apdevpkey.h +36 -0
  12. msvc/Windows Kits/10/Include/10.0.26100.0/shared/apiset.h +137 -0
  13. msvc/Windows Kits/10/Include/10.0.26100.0/shared/apisetcconv.h +102 -0
  14. msvc/Windows Kits/10/Include/10.0.26100.0/shared/atsmedia.h +43 -0
  15. msvc/Windows Kits/10/Include/10.0.26100.0/shared/basetsd.h +518 -0
  16. msvc/Windows Kits/10/Include/10.0.26100.0/shared/basetyps.h +226 -0
  17. msvc/Windows Kits/10/Include/10.0.26100.0/shared/batclass.h +660 -0
  18. msvc/Windows Kits/10/Include/10.0.26100.0/shared/bcrypt.h +2153 -0
  19. msvc/Windows Kits/10/Include/10.0.26100.0/shared/bdamedia.h +0 -0
  20. msvc/Windows Kits/10/Include/10.0.26100.0/shared/bdatypes.h +1135 -0
  21. msvc/Windows Kits/10/Include/10.0.26100.0/shared/bthdef.h +1339 -0
  22. msvc/Windows Kits/10/Include/10.0.26100.0/shared/bthioctl.h +421 -0
  23. msvc/Windows Kits/10/Include/10.0.26100.0/shared/bthsdpdef.h +121 -0
  24. msvc/Windows Kits/10/Include/10.0.26100.0/shared/bugcodes.h +4902 -0
  25. msvc/Windows Kits/10/Include/10.0.26100.0/shared/cderr.h +62 -0
  26. msvc/Windows Kits/10/Include/10.0.26100.0/shared/cfg.h +343 -0
  27. msvc/Windows Kits/10/Include/10.0.26100.0/shared/clfs.h +1311 -0
  28. msvc/Windows Kits/10/Include/10.0.26100.0/shared/clfslsn.h +94 -0
  29. msvc/Windows Kits/10/Include/10.0.26100.0/shared/common.ver +269 -0
  30. msvc/Windows Kits/10/Include/10.0.26100.0/shared/concurrencysal.h +394 -0
  31. msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3d9.h +0 -0
  32. msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3d9caps.h +576 -0
  33. msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3d9types.h +2455 -0
  34. msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3dkmdt.h +0 -0
  35. msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3dkmthk.h +0 -0
  36. msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3dukmdt.h +0 -0
  37. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dciddi.h +296 -0
  38. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dcomptypes.h +171 -0
  39. msvc/Windows Kits/10/Include/10.0.26100.0/shared/devguid.h +133 -0
  40. msvc/Windows Kits/10/Include/10.0.26100.0/shared/devioctl.h +189 -0
  41. msvc/Windows Kits/10/Include/10.0.26100.0/shared/devpkey.h +429 -0
  42. msvc/Windows Kits/10/Include/10.0.26100.0/shared/devpropdef.h +210 -0
  43. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dinputd.h +763 -0
  44. msvc/Windows Kits/10/Include/10.0.26100.0/shared/diskguid.h +98 -0
  45. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dls1.h +284 -0
  46. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dls2.h +155 -0
  47. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dmdls.h +214 -0
  48. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dmerror.h +864 -0
  49. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dmusbuff.h +50 -0
  50. msvc/Windows Kits/10/Include/10.0.26100.0/shared/dontuse.h +595 -0
msvc/Windows Kits/10/Include/10.0.26100.0/cppwinrt/LICENSE.txt ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ C++ for the Windows Runtime (cppwinrt)
2
+
3
+ Copyright (c) Microsoft Corporation
4
+ All rights reserved.
5
+
6
+ MIT License
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
msvc/Windows Kits/10/Include/10.0.26100.0/shared/GenericUsbFnIoctl.h ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (C) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ GenericUsbFnIoctl.h
8
+
9
+ Abstract:
10
+
11
+ This header defines the IOCTL codes for the generic USB function class driver
12
+
13
+ Environment:
14
+
15
+ Kernel and user mode
16
+
17
+ --*/
18
+
19
+ #pragma once
20
+
21
+ // TRANSFERS
22
+ #define IOCTL_GENERICUSBFN_TRANSFER_IN CTL_CODE(FILE_DEVICE_UNKNOWN, \
23
+ 0x03, \
24
+ METHOD_IN_DIRECT, \
25
+ FILE_READ_DATA | \
26
+ FILE_WRITE_DATA)
27
+
28
+ #define IOCTL_GENERICUSBFN_TRANSFER_IN_APPEND_ZERO_PKT CTL_CODE(FILE_DEVICE_UNKNOWN, \
29
+ 0x04, \
30
+ METHOD_IN_DIRECT, \
31
+ FILE_READ_DATA | \
32
+ FILE_WRITE_DATA)
33
+
34
+ #define IOCTL_GENERICUSBFN_TRANSFER_OUT CTL_CODE(FILE_DEVICE_UNKNOWN, \
35
+ 0x05, \
36
+ METHOD_OUT_DIRECT, \
37
+ FILE_READ_DATA | \
38
+ FILE_WRITE_DATA)
39
+
40
+ #define IOCTL_GENERICUSBFN_CONTROL_STATUS_HANDSHAKE_IN CTL_CODE(FILE_DEVICE_UNKNOWN, \
41
+ 0x06, \
42
+ METHOD_BUFFERED, \
43
+ FILE_READ_DATA | \
44
+ FILE_WRITE_DATA)
45
+
46
+ #define IOCTL_GENERICUSBFN_CONTROL_STATUS_HANDSHAKE_OUT CTL_CODE(FILE_DEVICE_UNKNOWN, \
47
+ 0x07, \
48
+ METHOD_BUFFERED, \
49
+ FILE_READ_DATA | \
50
+ FILE_WRITE_DATA)
51
+
52
+ //COMMANDS
53
+ #define IOCTL_GENERICUSBFN_GET_CLASS_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, \
54
+ 0x08, \
55
+ METHOD_OUT_DIRECT, \
56
+ FILE_READ_DATA | \
57
+ FILE_WRITE_DATA)
58
+
59
+ #define IOCTL_GENERICUSBFN_GET_PIPE_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
60
+ 0x09, \
61
+ METHOD_OUT_DIRECT, \
62
+ FILE_READ_DATA | \
63
+ FILE_WRITE_DATA)
64
+
65
+ #define IOCTL_GENERICUSBFN_SET_PIPE_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
66
+ 0x0A, \
67
+ METHOD_IN_DIRECT, \
68
+ FILE_READ_DATA | \
69
+ FILE_WRITE_DATA)
70
+
71
+
72
+ #define IOCTL_GENERICUSBFN_ACTIVATE_USB_BUS CTL_CODE(FILE_DEVICE_UNKNOWN, \
73
+ 0x0B, \
74
+ METHOD_BUFFERED, \
75
+ FILE_READ_DATA | \
76
+ FILE_WRITE_DATA)
77
+
78
+ #define IOCTL_GENERICUSBFN_DEACTIVATE_USB_BUS CTL_CODE(FILE_DEVICE_UNKNOWN, \
79
+ 0x0C, \
80
+ METHOD_BUFFERED, \
81
+ FILE_READ_DATA | \
82
+ FILE_WRITE_DATA)
83
+
84
+ #define IOCTL_GENERICUSBFN_BUS_EVENT_NOTIFICATION CTL_CODE(FILE_DEVICE_UNKNOWN, \
85
+ 0x0D, \
86
+ METHOD_OUT_DIRECT, \
87
+ FILE_READ_DATA | \
88
+ FILE_WRITE_DATA)
89
+
90
+ #define IOCTL_GENERICUSBFN_GET_CLASS_INFO_EX CTL_CODE(FILE_DEVICE_UNKNOWN, \
91
+ 0x0E, \
92
+ METHOD_OUT_DIRECT, \
93
+ FILE_READ_DATA | \
94
+ FILE_WRITE_DATA)
95
+
96
+ #define IOCTL_GENERICUSBFN_GET_INTERFACE_DESCRIPTOR_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
97
+ 0x0F, \
98
+ METHOD_OUT_DIRECT, \
99
+ FILE_READ_DATA | \
100
+ FILE_WRITE_DATA)
101
+
102
+ #define IOCTL_GENERICUSBFN_REGISTER_USB_STRING CTL_CODE(FILE_DEVICE_UNKNOWN, \
103
+ 0x10, \
104
+ METHOD_IN_DIRECT, \
105
+ FILE_READ_DATA | \
106
+ FILE_WRITE_DATA)
msvc/Windows Kits/10/Include/10.0.26100.0/shared/Iprtrmib.h ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ iprtrmib.h
8
+
9
+ Abstract:
10
+ This file contains:
11
+ o Definitions of the MIB_XX structures passed to and from the IP Router Manager
12
+ to query and set MIB variables handled by the IP Router Manager
13
+ o The #defines for the MIB variables IDs handled by the IP Router Manager
14
+ and made accessible by the MprAdminMIBXXX APIs
15
+ o The Routing PID of the IP Router Manager (as mentioned in ipinfoid.h)
16
+
17
+ --*/
18
+
19
+ #ifndef __ROUTING_IPRTRMIB_H__
20
+ #define __ROUTING_IPRTRMIB_H__
21
+
22
+ #if _MSC_VER > 1000
23
+ #pragma once
24
+ #endif
25
+ #include <winapifamily.h>
26
+
27
+ #pragma region Application Family or OneCore Family or Games Family
28
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
29
+
30
+
31
+ #if _MSC_VER >= 1200
32
+ #pragma warning(push)
33
+ #endif
34
+ #pragma warning(disable:4201)
35
+
36
+ //////////////////////////////////////////////////////////////////////////////
37
+ // //
38
+ // Included to get the value of MAX_INTERFACE_NAME_LEN //
39
+ // //
40
+ //////////////////////////////////////////////////////////////////////////////
41
+
42
+ #include <mprapidef.h>
43
+
44
+ //////////////////////////////////////////////////////////////////////////////
45
+ // //
46
+ // Included to get the necessary constants //
47
+ // //
48
+ //////////////////////////////////////////////////////////////////////////////
49
+
50
+ #include <ipifcons.h>
51
+
52
+ //////////////////////////////////////////////////////////////////////////////
53
+ // //
54
+ // This is the Id for IP Router Manager. The Router Manager handles //
55
+ // MIB-II, Forwarding MIB and some enterprise specific information. //
56
+ // Calls made with any other ID are passed on to the corresponding protocol //
57
+ // For example, an MprAdminMIBXXX call with a protocol ID of PID_IP and //
58
+ // a routing Id of 0xD will be sent to the IP Router Manager and then //
59
+ // forwarded to OSPF //
60
+ // This lives in the same number space as the protocol Ids of RIP, OSPF //
61
+ // etc, so any change made to it should be done keeping this in mind //
62
+ // //
63
+ //////////////////////////////////////////////////////////////////////////////
64
+
65
+
66
+ #define IPRTRMGR_PID 10000
67
+
68
+ #ifndef ANY_SIZE
69
+
70
+ #define ANY_SIZE 1
71
+
72
+ #endif
73
+
74
+ //////////////////////////////////////////////////////////////////////////////
75
+ // //
76
+ // The following #defines are the Ids of the MIB variables made accessible //
77
+ // to the user via MprAdminMIBXXX Apis. It will be noticed that these are //
78
+ // not the same as RFC 1213, since the MprAdminMIBXXX APIs work on rows and //
79
+ // groups instead of scalar variables //
80
+ // //
81
+ //////////////////////////////////////////////////////////////////////////////
82
+
83
+
84
+ #define IF_NUMBER 0
85
+ #define IF_TABLE (IF_NUMBER + 1)
86
+ #define IF_ROW (IF_TABLE + 1)
87
+ #define IP_STATS (IF_ROW + 1)
88
+ #define IP_ADDRTABLE (IP_STATS + 1)
89
+ #define IP_ADDRROW (IP_ADDRTABLE + 1)
90
+ #define IP_FORWARDNUMBER (IP_ADDRROW + 1)
91
+ #define IP_FORWARDTABLE (IP_FORWARDNUMBER + 1)
92
+ #define IP_FORWARDROW (IP_FORWARDTABLE + 1)
93
+ #define IP_NETTABLE (IP_FORWARDROW + 1)
94
+ #define IP_NETROW (IP_NETTABLE + 1)
95
+ #define ICMP_STATS (IP_NETROW + 1)
96
+ #define TCP_STATS (ICMP_STATS + 1)
97
+ #define TCP_TABLE (TCP_STATS + 1)
98
+ #define TCP_ROW (TCP_TABLE + 1)
99
+ #define UDP_STATS (TCP_ROW + 1)
100
+ #define UDP_TABLE (UDP_STATS + 1)
101
+ #define UDP_ROW (UDP_TABLE + 1)
102
+ #define MCAST_MFE (UDP_ROW + 1)
103
+ #define MCAST_MFE_STATS (MCAST_MFE + 1)
104
+ #define BEST_IF (MCAST_MFE_STATS + 1)
105
+ #define BEST_ROUTE (BEST_IF + 1)
106
+ #define PROXY_ARP (BEST_ROUTE + 1)
107
+ #define MCAST_IF_ENTRY (PROXY_ARP + 1)
108
+ #define MCAST_GLOBAL (MCAST_IF_ENTRY + 1)
109
+ #define IF_STATUS (MCAST_GLOBAL + 1)
110
+ #define MCAST_BOUNDARY (IF_STATUS + 1)
111
+ #define MCAST_SCOPE (MCAST_BOUNDARY + 1)
112
+ #define DEST_MATCHING (MCAST_SCOPE + 1)
113
+ #define DEST_LONGER (DEST_MATCHING + 1)
114
+ #define DEST_SHORTER (DEST_LONGER + 1)
115
+ #define ROUTE_MATCHING (DEST_SHORTER + 1)
116
+ #define ROUTE_LONGER (ROUTE_MATCHING + 1)
117
+ #define ROUTE_SHORTER (ROUTE_LONGER + 1)
118
+ #define ROUTE_STATE (ROUTE_SHORTER + 1)
119
+ #define MCAST_MFE_STATS_EX (ROUTE_STATE + 1)
120
+ #define IP6_STATS (MCAST_MFE_STATS_EX + 1)
121
+ #define UDP6_STATS (IP6_STATS + 1)
122
+ #define TCP6_STATS (UDP6_STATS + 1)
123
+
124
+ #if (NTDDI_VERSION >= NTDDI_VISTA)
125
+ #define NUMBER_OF_EXPORTED_VARIABLES (TCP6_STATS + 1)
126
+ #else
127
+ #define NUMBER_OF_EXPORTED_VARIABLES (ROUTE_STATE + 1)
128
+ #endif
129
+
130
+
131
+ //////////////////////////////////////////////////////////////////////////////
132
+ // //
133
+ // MIB_OPAQUE_QUERY is the structure filled in by the user to identify a //
134
+ // MIB variable //
135
+ // //
136
+ // dwVarId ID of MIB Variable (One of the Ids #defined above) //
137
+ // dwVarIndex Variable sized array containing the indices needed to //
138
+ // identify a variable. NOTE: Unlike SNMP we dont require that //
139
+ // a scalar variable be indexed by 0 //
140
+ // //
141
+ //////////////////////////////////////////////////////////////////////////////
142
+
143
+ typedef struct _MIB_OPAQUE_QUERY
144
+ {
145
+ DWORD dwVarId;
146
+ DWORD rgdwVarIndex[ANY_SIZE];
147
+ }MIB_OPAQUE_QUERY, *PMIB_OPAQUE_QUERY;
148
+
149
+ //////////////////////////////////////////////////////////////////////////////
150
+ // //
151
+ // The following are the structures which are filled in and returned to the //
152
+ // user when a query is made, OR are filled in BY THE USER when a set is //
153
+ // done //
154
+ // //
155
+ //////////////////////////////////////////////////////////////////////////////
156
+
157
+ #include <ipmib.h>
158
+ #include <tcpmib.h>
159
+ #include <udpmib.h>
160
+
161
+ typedef enum _TCP_TABLE_CLASS {
162
+ TCP_TABLE_BASIC_LISTENER,
163
+ TCP_TABLE_BASIC_CONNECTIONS,
164
+ TCP_TABLE_BASIC_ALL,
165
+ TCP_TABLE_OWNER_PID_LISTENER,
166
+ TCP_TABLE_OWNER_PID_CONNECTIONS,
167
+ TCP_TABLE_OWNER_PID_ALL,
168
+ TCP_TABLE_OWNER_MODULE_LISTENER,
169
+ TCP_TABLE_OWNER_MODULE_CONNECTIONS,
170
+ TCP_TABLE_OWNER_MODULE_ALL
171
+ } TCP_TABLE_CLASS, *PTCP_TABLE_CLASS;
172
+
173
+ typedef enum _UDP_TABLE_CLASS {
174
+ UDP_TABLE_BASIC,
175
+ UDP_TABLE_OWNER_PID,
176
+ UDP_TABLE_OWNER_MODULE
177
+ } UDP_TABLE_CLASS, *PUDP_TABLE_CLASS;
178
+
179
+ typedef enum _TCPIP_OWNER_MODULE_INFO_CLASS {
180
+ TCPIP_OWNER_MODULE_INFO_BASIC
181
+ } TCPIP_OWNER_MODULE_INFO_CLASS, *PTCPIP_OWNER_MODULE_INFO_CLASS;
182
+
183
+ typedef struct _TCPIP_OWNER_MODULE_BASIC_INFO {
184
+ PWCHAR pModuleName;
185
+ PWCHAR pModulePath;
186
+ } TCPIP_OWNER_MODULE_BASIC_INFO, *PTCPIP_OWNER_MODULE_BASIC_INFO;
187
+
188
+ typedef struct _MIB_IPMCAST_BOUNDARY
189
+ {
190
+ DWORD dwIfIndex;
191
+ DWORD dwGroupAddress;
192
+ DWORD dwGroupMask;
193
+ DWORD dwStatus;
194
+ }MIB_IPMCAST_BOUNDARY, *PMIB_IPMCAST_BOUNDARY;
195
+
196
+ typedef struct _MIB_IPMCAST_BOUNDARY_TABLE
197
+ {
198
+ DWORD dwNumEntries;
199
+ MIB_IPMCAST_BOUNDARY table[ANY_SIZE];
200
+ }MIB_IPMCAST_BOUNDARY_TABLE, *PMIB_IPMCAST_BOUNDARY_TABLE;
201
+
202
+ #define SIZEOF_BOUNDARY_TABLE(X) (FIELD_OFFSET(MIB_IPMCAST_BOUNDARY_TABLE,table[0]) + ((X) * sizeof(MIB_IPMCAST_BOUNDARY)) + ALIGN_SIZE)
203
+
204
+ typedef struct {
205
+ DWORD dwGroupAddress;
206
+ DWORD dwGroupMask;
207
+ } MIB_BOUNDARYROW, *PMIB_BOUNDARYROW;
208
+
209
+ // Structure matching what goes in the registry in a block of type
210
+ // IP_MCAST_LIMIT_INFO. This contains the fields of
211
+ // MIB_IPMCAST_IF_ENTRY which are configurable.
212
+
213
+ typedef struct {
214
+ DWORD dwTtl;
215
+ DWORD dwRateLimit;
216
+ } MIB_MCAST_LIMIT_ROW, *PMIB_MCAST_LIMIT_ROW;
217
+
218
+ #define MAX_SCOPE_NAME_LEN 255
219
+
220
+ //
221
+ // Scope names are unicode. SNMP and MZAP use UTF-8 encoding.
222
+ //
223
+
224
+ #define SN_UNICODE
225
+ typedef WCHAR SN_CHAR;
226
+ typedef SN_CHAR SCOPE_NAME_BUFFER[MAX_SCOPE_NAME_LEN+1], *SCOPE_NAME;
227
+
228
+ typedef struct _MIB_IPMCAST_SCOPE
229
+ {
230
+ DWORD dwGroupAddress;
231
+ DWORD dwGroupMask;
232
+ SCOPE_NAME_BUFFER snNameBuffer;
233
+ DWORD dwStatus;
234
+ }MIB_IPMCAST_SCOPE, *PMIB_IPMCAST_SCOPE;
235
+
236
+ typedef struct _MIB_IPDESTROW
237
+ {
238
+ #ifdef __cplusplus
239
+ MIB_IPFORWARDROW ForwardRow;
240
+ #else
241
+ MIB_IPFORWARDROW;
242
+ #endif
243
+
244
+ DWORD dwForwardPreference;
245
+ DWORD dwForwardViewSet;
246
+ }MIB_IPDESTROW, *PMIB_IPDESTROW;
247
+
248
+ typedef struct _MIB_IPDESTTABLE
249
+ {
250
+ DWORD dwNumEntries;
251
+ MIB_IPDESTROW table[ANY_SIZE];
252
+ }MIB_IPDESTTABLE, *PMIB_IPDESTTABLE;
253
+
254
+ typedef struct _MIB_BEST_IF
255
+ {
256
+ DWORD dwDestAddr;
257
+ DWORD dwIfIndex;
258
+ }MIB_BEST_IF, *PMIB_BEST_IF;
259
+
260
+ typedef struct _MIB_PROXYARP
261
+ {
262
+ DWORD dwAddress;
263
+ DWORD dwMask;
264
+ DWORD dwIfIndex;
265
+ }MIB_PROXYARP, *PMIB_PROXYARP;
266
+
267
+ typedef struct _MIB_IFSTATUS
268
+ {
269
+ DWORD dwIfIndex;
270
+ DWORD dwAdminStatus;
271
+ DWORD dwOperationalStatus;
272
+ BOOL bMHbeatActive;
273
+ BOOL bMHbeatAlive;
274
+ }MIB_IFSTATUS, *PMIB_IFSTATUS;
275
+
276
+ typedef struct _MIB_ROUTESTATE
277
+ {
278
+ BOOL bRoutesSetToStack;
279
+
280
+ }MIB_ROUTESTATE, *PMIB_ROUTESTATE;
281
+
282
+ //////////////////////////////////////////////////////////////////////////////
283
+ // //
284
+ // All the info passed to (SET/CREATE) and from (GET/GETNEXT/GETFIRST) //
285
+ // IP Router Manager is encapsulated in the following "discriminated" //
286
+ // union. To pass, say MIB_IFROW, use the following code //
287
+ // //
288
+ // PMIB_OPAQUE_INFO pInfo; //
289
+ // PMIB_IFROW pIfRow; //
290
+ // DWORD rgdwBuff[(MAX_MIB_OFFSET + sizeof(MIB_IFROW))/sizeof(DWORD) + 1]; //
291
+ // //
292
+ // pInfo = (PMIB_OPAQUE_INFO)rgdwBuffer; //
293
+ // pIfRow = (MIB_IFROW *)(pInfo->rgbyData); //
294
+ // //
295
+ // This can also be accomplished by using the following macro //
296
+ // //
297
+ // DEFINE_MIB_BUFFER(pInfo,MIB_IFROW, pIfRow); //
298
+ // //
299
+ //////////////////////////////////////////////////////////////////////////////
300
+
301
+
302
+ typedef struct _MIB_OPAQUE_INFO
303
+ {
304
+ DWORD dwId;
305
+
306
+ union
307
+ {
308
+ ULONGLONG ullAlign;
309
+ BYTE rgbyData[1];
310
+ };
311
+
312
+ }MIB_OPAQUE_INFO, *PMIB_OPAQUE_INFO;
313
+
314
+ #define MAX_MIB_OFFSET 8
315
+
316
+ #define MIB_INFO_SIZE(S) \
317
+ (MAX_MIB_OFFSET + sizeof(S))
318
+
319
+ #define MIB_INFO_SIZE_IN_DWORDS(S) \
320
+ ((MIB_INFO_SIZE(S))/sizeof(DWORD) + 1)
321
+
322
+ #define DEFINE_MIB_BUFFER(X,Y,Z) \
323
+ DWORD __rgdwBuff[MIB_INFO_SIZE_IN_DWORDS(Y)]; \
324
+ PMIB_OPAQUE_INFO X = (PMIB_OPAQUE_INFO)__rgdwBuff; \
325
+ Y * Z = (Y *)(X->rgbyData)
326
+
327
+
328
+ #define CAST_MIB_INFO(X,Y,Z) Z = (Y)(X->rgbyData)
329
+
330
+ #if _MSC_VER >= 1200
331
+ #pragma warning(pop)
332
+ #else
333
+ #pragma warning(default:4201)
334
+ #endif
335
+
336
+
337
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
338
+ #pragma endregion
339
+
340
+ #endif //__ROUTING_IPRTRMIB_H__
msvc/Windows Kits/10/Include/10.0.26100.0/shared/IssPer16.h ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //+-------------------------------------------------------------------------
2
+ //
3
+ // Microsoft Windows
4
+ // Copyright (C) Microsoft Corporation, 1992-1999.
5
+ //
6
+ // File: issperr.h
7
+ //
8
+ // Contents: Constant definitions for OLE HRESULT values.
9
+ //
10
+ // History: dd-mmm-yy Author Comment
11
+ //
12
+ // Notes:
13
+ // This is a generated file. Do not modify directly.
14
+ // The MC tool generates this file from dsyserr.mc
15
+ //
16
+ //--------------------------------------------------------------------------
17
+ #ifndef _ISSPERR_H_
18
+ #define _ISSPERR_H_
19
+ #if _MSC_VER > 1000
20
+ #pragma once
21
+ #endif
22
+ #include <winapifamily.h>
23
+
24
+ #pragma region Desktop Family
25
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
26
+
27
+
28
+ // Define the status type.
29
+
30
+ #ifdef FACILITY_SECURITY
31
+ #undef FACILITY_SECURITY
32
+ #endif
33
+
34
+ #ifdef STATUS_SEVERITY_SUCCESS
35
+ #undef STATUS_SEVERITY_SUCCESS
36
+ #endif
37
+ //#ifdef STATUS_SEVERITY_ERROR
38
+ //#undef STATUS_SEVERITY_ERROR
39
+ //#endif
40
+
41
+ // Define the severities
42
+ //
43
+ // Values are 32 bit values layed out as follows:
44
+ //
45
+ // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
46
+ // 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
47
+ // +---+-+-+-----------------------+-------------------------------+
48
+ // |Sev|C|R| Facility | Code |
49
+ // +---+-+-+-----------------------+-------------------------------+
50
+ //
51
+ // where
52
+ //
53
+ // Sev - is the severity code
54
+ //
55
+ // 00 - Success
56
+ // 01 - Informational
57
+ // 10 - Warning
58
+ // 11 - Error
59
+ //
60
+ // C - is the Customer code flag
61
+ //
62
+ // R - is a reserved bit
63
+ //
64
+ // Facility - is the facility code
65
+ //
66
+ // Code - is the facility's status code
67
+ //
68
+ //
69
+ // Define the facility codes
70
+ //
71
+ #define FACILITY_SECURITY 0x9
72
+ #define FACILITY_NULL 0
73
+
74
+
75
+ //
76
+ // Define the severity codes
77
+ //
78
+ #define STATUS_SEVERITY_SUCCESS 0x0
79
+ #define STATUS_SEVERITY_COERROR 0x2
80
+
81
+
82
+ //
83
+ // MessageId: SEC_E_INSUFFICIENT_MEMORY
84
+ //
85
+ // MessageText:
86
+ //
87
+ // Not enough memory is available to complete this request
88
+ //
89
+ #define SEC_E_INSUFFICIENT_MEMORY ((SECURITY_STATUS)0x1300)
90
+
91
+ //
92
+ // MessageId: SEC_E_INVALID_HANDLE
93
+ //
94
+ // MessageText:
95
+ //
96
+ // The handle specified is invalid
97
+ //
98
+ #define SEC_E_INVALID_HANDLE ((SECURITY_STATUS)0x1301)
99
+
100
+ //
101
+ // MessageId: SEC_E_UNSUPPORTED_FUNCTION
102
+ //
103
+ // MessageText:
104
+ //
105
+ // The function requested is not supported
106
+ //
107
+ #define SEC_E_UNSUPPORTED_FUNCTION ((SECURITY_STATUS)0x1302)
108
+
109
+
110
+ //
111
+ // MessageId: SEC_E_TARGET_UNKNOWN
112
+ //
113
+ // MessageText:
114
+ //
115
+ // The specified target is unknown or unreachable
116
+ //
117
+ #define SEC_E_TARGET_UNKNOWN ((SECURITY_STATUS)0x1303)
118
+
119
+ //
120
+ // MessageId: SEC_E_INTERNAL_ERROR
121
+ //
122
+ // MessageText:
123
+ //
124
+ // The Local Security Authority cannot be contacted
125
+ //
126
+ #define SEC_E_INTERNAL_ERROR ((SECURITY_STATUS)0x1304)
127
+
128
+ //
129
+ // MessageId: SEC_E_SECPKG_NOT_FOUND
130
+ //
131
+ // MessageText:
132
+ //
133
+ // The requested security package does not exist
134
+ //
135
+ #define SEC_E_SECPKG_NOT_FOUND ((SECURITY_STATUS)0x1305)
136
+
137
+
138
+ //
139
+ // MessageId: SEC_E_NOT_OWNER
140
+ //
141
+ // MessageText:
142
+ //
143
+ // The caller is not the owner of the desired credentials
144
+ //
145
+ #define SEC_E_NOT_OWNER ((SECURITY_STATUS)0x1306)
146
+
147
+ //
148
+ // MessageId: SEC_E_CANNOT_INSTALL
149
+ //
150
+ // MessageText:
151
+ //
152
+ // The security package failed to initialize, and cannot be installed
153
+ //
154
+ #define SEC_E_CANNOT_INSTALL ((SECURITY_STATUS)0x1307)
155
+
156
+ //
157
+ // MessageId: SEC_E_INVALID_TOKEN
158
+ //
159
+ // MessageText:
160
+ //
161
+ // The token supplied to the function is invalid
162
+ //
163
+ #define SEC_E_INVALID_TOKEN ((SECURITY_STATUS)0x1308)
164
+
165
+ //
166
+ // MessageId: SEC_E_CANNOT_PACK
167
+ //
168
+ // MessageText:
169
+ //
170
+ // The security package is not able to marshall the logon buffer,
171
+ // so the logon attempt has failed
172
+ //
173
+ #define SEC_E_CANNOT_PACK ((SECURITY_STATUS)0x1309)
174
+
175
+ //
176
+ // MessageId: SEC_E_QOP_NOT_SUPPORTED
177
+ //
178
+ // MessageText:
179
+ //
180
+ // The per-message Quality of Protection is not supported by the
181
+ // security package
182
+ //
183
+ #define SEC_E_QOP_NOT_SUPPORTED ((SECURITY_STATUS)0x130A)
184
+
185
+ //
186
+ // MessageId: SEC_E_NO_IMPERSONATION
187
+ //
188
+ // MessageText:
189
+ //
190
+ // The security context does not allow impersonation of the client
191
+ //
192
+ #define SEC_E_NO_IMPERSONATION ((SECURITY_STATUS)0x130B)
193
+
194
+ //
195
+ // MessageId: SEC_E_LOGON_DENIED
196
+ //
197
+ // MessageText:
198
+ //
199
+ // The logon attempt failed
200
+ //
201
+ #define SEC_E_LOGON_DENIED ((SECURITY_STATUS)0x130C)
202
+
203
+ //
204
+ // MessageId: SEC_E_UNKNOWN_CREDENTIALS
205
+ //
206
+ // MessageText:
207
+ //
208
+ // The credentials supplied to the package were not
209
+ // recognized
210
+ //
211
+ #define SEC_E_UNKNOWN_CREDENTIALS ((SECURITY_STATUS)0x130D)
212
+
213
+ //
214
+ // MessageId: SEC_E_NO_CREDENTIALS
215
+ //
216
+ // MessageText:
217
+ //
218
+ // No credentials are available in the security package
219
+ //
220
+ #define SEC_E_NO_CREDENTIALS ((SECURITY_STATUS)0x130E)
221
+
222
+ //
223
+ // MessageId: SEC_E_MESSAGE_ALTERED
224
+ //
225
+ // MessageText:
226
+ //
227
+ // The message supplied for verification has been altered
228
+ //
229
+ #define SEC_E_MESSAGE_ALTERED ((SECURITY_STATUS)0x130F)
230
+
231
+ //
232
+ // MessageId: SEC_E_OUT_OF_SEQUENCE
233
+ //
234
+ // MessageText:
235
+ //
236
+ // The message supplied for verification is out of sequence
237
+ //
238
+ #define SEC_E_OUT_OF_SEQUENCE ((SECURITY_STATUS)0x1310)
239
+
240
+ //
241
+ // MessageId: SEC_E_NO_AUTHENTICATING_AUTHORITY
242
+ //
243
+ // MessageText:
244
+ //
245
+ // No authority could be contacted for authentication.
246
+ //
247
+ #define SEC_E_NO_AUTHENTICATING_AUTHORITY ((SECURITY_STATUS)0x1311)
248
+
249
+ // MessageId: SEC_E_CONTEXT_EXPIRED
250
+ //
251
+ // MessageText:
252
+ //
253
+ // The context has expired and can no longer be used.
254
+ //
255
+ #define SEC_E_CONTEXT_EXPIRED ((SECURITY_STATUS)0x1312)
256
+
257
+ //
258
+ // MessageId: SEC_E_INCOMPLETE_MESSAGE
259
+ //
260
+ // MessageText:
261
+ //
262
+ // The supplied message is incomplete. The signature was not verified.
263
+ //
264
+ #define SEC_E_INCOMPLETE_MESSAGE ((SECURITY_STATUS)0x1313)
265
+
266
+ //
267
+ // MessageId: SEC_I_CONTINUE_NEEDED
268
+ //
269
+ // MessageText:
270
+ //
271
+ // The function completed successfully, but must be called
272
+ // again to complete the context
273
+ //
274
+ #define SEC_I_CONTINUE_NEEDED ((SECURITY_STATUS)0x1012)
275
+
276
+ //
277
+ // MessageId: SEC_I_COMPLETE_NEEDED
278
+ //
279
+ // MessageText:
280
+ //
281
+ // The function completed successfully, but CompleteToken
282
+ // must be called
283
+ //
284
+ #define SEC_I_COMPLETE_NEEDED ((SECURITY_STATUS)0x1013)
285
+
286
+ //
287
+ // MessageId: SEC_I_COMPLETE_AND_CONTINUE
288
+ //
289
+ // MessageText:
290
+ //
291
+ // The function completed successfully, but both CompleteToken
292
+ // and this function must be called to complete the context
293
+ //
294
+ #define SEC_I_COMPLETE_AND_CONTINUE ((SECURITY_STATUS)0x1014)
295
+
296
+ //
297
+ // MessageId: SEC_I_LOCAL_LOGON
298
+ //
299
+ // MessageText:
300
+ //
301
+ // The logon was completed, but no network authority was
302
+ // available. The logon was made using locally known information
303
+ //
304
+ #define SEC_I_LOCAL_LOGON ((SECURITY_STATUS)0x1015)
305
+
306
+ //
307
+ // MessageId: SEC_E_OK
308
+ //
309
+ // MessageText:
310
+ //
311
+ // Call completed successfully
312
+ //
313
+ #define SEC_E_OK ((SECURITY_STATUS)0x0000)
314
+
315
+ //
316
+ // Older error names for backwards compatibility
317
+ //
318
+
319
+
320
+ #define SEC_E_NOT_SUPPORTED SEC_E_UNSUPPORTED_FUNCTION
321
+ #define SEC_E_NO_SPM SEC_E_INTERNAL_ERROR
322
+ #define SEC_E_BAD_PKGID SEC_E_SECPKG_NOT_FOUND
323
+
324
+
325
+
326
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
327
+ #pragma endregion
328
+
329
+ #endif // _ISSPERR_H_
msvc/Windows Kits/10/Include/10.0.26100.0/shared/Math3DHelper.h ADDED
@@ -0,0 +1,854 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ Math3DHelperV2.h
8
+
9
+ Abstract:
10
+
11
+ Internal math library for vector, rotation matrix and quaternion calculation
12
+
13
+ --*/
14
+
15
+ #pragma once
16
+
17
+ #ifdef __cplusplus
18
+
19
+ #include <cmath>
20
+
21
+ // Pi
22
+ static const float PI = (3.14159265f);
23
+ static const float DegToRadRatio = (PI / 180.0f);
24
+ static const float RadToDegRatio = (180.0f / PI);
25
+ static const float FLOAT_TOLERANCE = (0.00001f);
26
+
27
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
28
+ static __inline float RealModulo (float x, float y)
29
+ {
30
+ if (0 == y) return x;
31
+ return x - y * (float)(floor(x/y));
32
+ }
33
+
34
+ static __inline bool FloatEq(float x, float y)
35
+ {
36
+ return (fabs(x - y) < FLOAT_TOLERANCE);
37
+ }
38
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
39
+
40
+
41
+
42
+ class CVEC3D : public VEC3D
43
+ {
44
+ public:
45
+ inline CVEC3D( void )
46
+ {
47
+ Clear();
48
+ };
49
+ inline ~CVEC3D( void ) {};
50
+ inline CVEC3D( const VEC3D& _V )
51
+ {
52
+ X = _V.X;
53
+ Y = _V.Y;
54
+ Z = _V.Z;
55
+ };
56
+ inline CVEC3D( float _X, float _Y, float _Z)
57
+ {
58
+ X = _X;
59
+ Y = _Y;
60
+ Z = _Z;
61
+ };
62
+
63
+ // assignment operators
64
+ inline CVEC3D& operator += ( const CVEC3D& _V)
65
+ {
66
+ *this = *this + _V;
67
+ return *this;
68
+ };
69
+
70
+ inline CVEC3D& operator -= ( const CVEC3D& _V)
71
+ {
72
+ *this = *this - _V;
73
+ return *this;
74
+ };
75
+
76
+ inline CVEC3D& operator *= (const float _F)
77
+ {
78
+ *this = *this * _F;
79
+ return *this;
80
+ };
81
+
82
+ inline CVEC3D& operator /= (const float _F)
83
+ {
84
+ *this = *this / _F;
85
+ return *this;
86
+ };
87
+
88
+
89
+ // unary
90
+ inline CVEC3D operator - () const
91
+ {
92
+ CVEC3D v3;
93
+ v3.X = -X;
94
+ v3.Y = -Y;
95
+ v3.Z = -Z;
96
+ return v3;
97
+ };
98
+
99
+ // binary operators
100
+ inline CVEC3D operator + ( const CVEC3D& _V) const
101
+ {
102
+ CVEC3D v3;
103
+ v3.X = X + _V.X;
104
+ v3.Y = Y + _V.Y;
105
+ v3.Z = Z + _V.Z;
106
+ return v3;
107
+ };
108
+
109
+ inline CVEC3D operator - ( const CVEC3D& _V) const
110
+ {
111
+ CVEC3D v3;
112
+ v3.X = X - _V.X;
113
+ v3.Y = Y - _V.Y;
114
+ v3.Z = Z - _V.Z;
115
+ return v3;
116
+ };
117
+
118
+ inline CVEC3D operator * ( float _F) const
119
+ {
120
+ CVEC3D v3;
121
+ v3.X = X * _F;
122
+ v3.Y = Y * _F;
123
+ v3.Z = Z * _F;
124
+ return v3;
125
+ };
126
+
127
+ inline CVEC3D operator / ( float _F) const
128
+ {
129
+ CVEC3D v3;
130
+ v3.X = X / _F;
131
+ v3.Y = Y / _F;
132
+ v3.Z = Z / _F;
133
+ return v3;
134
+ };
135
+
136
+ inline bool operator == ( const CVEC3D& _V) const
137
+ {
138
+ return ((X == _V.X) && (Y == _V.Y) && (Z == _V.Z));
139
+ };
140
+
141
+
142
+ inline bool operator != ( const CVEC3D& _V) const
143
+ {
144
+ return !(this == &_V);
145
+ };
146
+
147
+ inline CVEC3D& operator = ( const CVEC3D& _V)
148
+ {
149
+ X = _V.X;
150
+ Y = _V.Y;
151
+ Z = _V.Z;
152
+ return *this;
153
+ };
154
+
155
+ inline void Clear (void)
156
+ {
157
+ X = 0.0f;
158
+ Y = 0.0f;
159
+ Z = 0.0f;
160
+ };
161
+
162
+ inline CVEC3D CrossProduct ( const CVEC3D& _V) const
163
+ {
164
+ CVEC3D v3;
165
+ v3.X = Y * _V.Z - Z * _V.Y;
166
+ v3.Y = Z * _V.X - X * _V.Z;
167
+ v3.Z = X * _V.Y - Y * _V.X;
168
+ return v3;
169
+ };
170
+
171
+ inline float DotProduct ( const CVEC3D& _V) const
172
+ {
173
+ return X * _V.X + Y * _V.Y + Z * _V.Z;
174
+ };
175
+
176
+ inline float Magnitude (void)
177
+ {
178
+ float fMagnitude;
179
+ fMagnitude = DotProduct (*this);
180
+ fMagnitude = static_cast<float>(sqrt(fMagnitude));
181
+ return fMagnitude;
182
+ };
183
+
184
+ inline void Normalize (void)
185
+ {
186
+ float fMagnitude = this->Magnitude();
187
+ if (0.0 != fMagnitude)
188
+ {
189
+ *this /= fMagnitude;
190
+ }
191
+ };
192
+
193
+ inline CVEC3D AngularDiff ( const CVEC3D& _V) const
194
+ {
195
+ CVEC3D Out;
196
+ float fSine;
197
+
198
+ Out = (*this).CrossProduct(_V);
199
+ fSine = Out.Magnitude();
200
+ if (fSine >= 0.001f) // if Sine is very small, Angle=Sin(Angle) - so skip this
201
+ {
202
+ float fCosine = (*this).DotProduct(_V);
203
+ float fAngle = (float)(atan2(fSine, fCosine)); // Angle is in ]-PI..PI] range
204
+ Out = Out * (fAngle / fSine);
205
+ }
206
+
207
+ return Out;
208
+ };
209
+
210
+ inline CVEC3D RotateAngleByAxis ( const float AngleInRad, const VEC3D ReferenceAxis)
211
+ {
212
+ //
213
+ // Rotate 3D vector pvToRotate by angle AngleRad (in radian), along axis pvAxis,
214
+ // using right handed space (positive rotation is counter-clockwize)
215
+ // This is using Rodrigues' rotation formula which is more efficient than
216
+ // converting the axis and angle into a rotation matrix, and using the rotation
217
+ // matrix to compute the rotated vector.
218
+ //
219
+ // Rotate vector V by Angle about direction vector W:
220
+ // Vrot = V*Cos(Angle) + (WxV)*Sin(Angle) + w*(w.v)*(1-Cos(Angle))
221
+ //
222
+
223
+ CVEC3D Out, Axis;
224
+
225
+ Axis = ReferenceAxis;
226
+ Axis.Normalize();
227
+ Out = (*this) * ((float)(cos(AngleInRad))) +
228
+ Axis.CrossProduct(*this) * ((float)(sin(AngleInRad))) +
229
+ Axis * (Axis.DotProduct(*this)) * (1 - ((float)(cos(AngleInRad))));
230
+
231
+ return Out;
232
+ };
233
+
234
+ inline bool HasNAN (void)
235
+ {
236
+ return !(X == X && Y == Y && Z == Z);
237
+ };
238
+
239
+ inline void LowPassFilter ( const CVEC3D& _V, float Coefficient )
240
+ {
241
+ CVEC3D Temp;
242
+ Temp = _V - *this;
243
+ Temp = Temp * Coefficient;
244
+ Temp = Temp + *this;
245
+ X = Temp.X;
246
+ Y = Temp.Y;
247
+ Z = Temp.Z;
248
+ };
249
+
250
+ };
251
+
252
+
253
+ class CMATRIX3X3 : public MATRIX3X3
254
+ {
255
+ public:
256
+ inline CMATRIX3X3( void )
257
+ {
258
+ Clear();
259
+ };
260
+ inline ~CMATRIX3X3( void ) {};
261
+ inline CMATRIX3X3( const MATRIX3X3& _M )
262
+ {
263
+ A11 = _M.A11;
264
+ A12 = _M.A12;
265
+ A13 = _M.A13;
266
+ A21 = _M.A21;
267
+ A22 = _M.A22;
268
+ A23 = _M.A23;
269
+ A31 = _M.A31;
270
+ A32 = _M.A32;
271
+ A33 = _M.A33;
272
+ };
273
+ inline CMATRIX3X3( const VEC3D& _Vx, const VEC3D& _Vy, const VEC3D& _Vz )
274
+ {
275
+ V1 = _Vx;
276
+ V2 = _Vy;
277
+ V3 = _Vz;
278
+ };
279
+ inline CMATRIX3X3( float _A11, float _A12, float _A13,
280
+ float _A21, float _A22, float _A23,
281
+ float _A31, float _A32, float _A33)
282
+ {
283
+ A11 = _A11;
284
+ A12 = _A12;
285
+ A13 = _A13;
286
+ A21 = _A21;
287
+ A22 = _A22;
288
+ A23 = _A23;
289
+ A31 = _A31;
290
+ A32 = _A32;
291
+ A33 = _A33;
292
+ };
293
+
294
+ // assignment operators
295
+ inline CMATRIX3X3 operator *= ( const CMATRIX3X3& _M )
296
+ {
297
+ *this = *this * _M;
298
+ return *this;
299
+ };
300
+
301
+ inline CMATRIX3X3& operator += ( const CMATRIX3X3& _M)
302
+ {
303
+ *this = *this + _M;
304
+ return *this;
305
+ };
306
+
307
+ inline CMATRIX3X3& operator -= ( const CMATRIX3X3& _M)
308
+ {
309
+ *this = *this - _M;
310
+ return *this;
311
+ };
312
+
313
+ inline CMATRIX3X3& operator *= ( float _F)
314
+ {
315
+ *this = *this * _F;
316
+ return *this;
317
+ };
318
+
319
+ inline CMATRIX3X3& operator /= ( float _F)
320
+ {
321
+ *this = *this / _F;
322
+ return *this;
323
+ };
324
+
325
+ // unary
326
+ inline CMATRIX3X3 operator - () const
327
+ {
328
+ CMATRIX3X3 m33Ret;
329
+ for (int i = 0; i < 3; i++)
330
+ {
331
+ for (int j = 0; j < 3; j++)
332
+ {
333
+ m33Ret.M [i] [j] = -M [i] [j];
334
+ }
335
+ }
336
+ return m33Ret;
337
+ };
338
+
339
+ // binary operators
340
+ inline CMATRIX3X3 operator * ( const CMATRIX3X3& _M) const
341
+ {
342
+ CMATRIX3X3 m33Ret;
343
+ for (int i = 0; i < 3; i++)
344
+ {
345
+ for (int j = 0; j < 3; j++)
346
+ {
347
+ m33Ret.M [i] [j] = (M [i] [0] * _M.M [0] [j]) +
348
+ (M [i] [1] * _M.M [1] [j]) +
349
+ (M [i] [2] * _M.M [2] [j]);
350
+ }
351
+ }
352
+ return m33Ret;
353
+ };
354
+
355
+ inline CMATRIX3X3 operator + ( const CMATRIX3X3& _M) const
356
+ {
357
+ CMATRIX3X3 m33Ret;
358
+ for (int i = 0; i < 3; i++)
359
+ {
360
+ for (int j = 0; j < 3; j++)
361
+ {
362
+ m33Ret.M [i] [j] = M [i] [j] + _M.M [i] [j];
363
+ }
364
+ }
365
+ return m33Ret;
366
+ };
367
+
368
+ inline CMATRIX3X3 operator - ( const CMATRIX3X3& _M) const
369
+ {
370
+ CMATRIX3X3 m33Ret;
371
+ for (int i = 0; i < 3; i++)
372
+ {
373
+ for (int j = 0; j < 3; j++)
374
+ {
375
+ m33Ret.M [i] [j] = M [i] [j] - _M.M [i] [j];
376
+ }
377
+ }
378
+ return m33Ret;
379
+ };
380
+
381
+ inline CMATRIX3X3 operator * ( float _F) const
382
+ {
383
+ CMATRIX3X3 m33Ret;
384
+ for (int i = 0; i < 3; i++)
385
+ {
386
+ for (int j = 0; j < 3; j++)
387
+ {
388
+ m33Ret.M [i] [j] = M [i] [j] * _F;
389
+ }
390
+ }
391
+ return m33Ret;
392
+ };
393
+
394
+ inline CMATRIX3X3 operator / ( float _F) const
395
+ {
396
+ CMATRIX3X3 m33Ret;
397
+ for (int i = 0; i < 3; i++)
398
+ {
399
+ for (int j = 0; j < 3; j++)
400
+ {
401
+ m33Ret.M [i] [j] = M [i] [j] / _F;
402
+ }
403
+ }
404
+ return m33Ret;
405
+ };
406
+
407
+ inline bool operator == ( const CMATRIX3X3& _M) const
408
+ {
409
+ for (int i = 0; i < 3; i++)
410
+ {
411
+ for (int j = 0; j < 3; j++)
412
+ {
413
+ if (M [i] [j] != _M.M [i] [j])
414
+ {
415
+ return false;
416
+ }
417
+ }
418
+ }
419
+ return true;
420
+ };
421
+
422
+
423
+ inline bool operator != ( const CMATRIX3X3& _M) const
424
+ {
425
+ return !(this == &_M);
426
+ };
427
+
428
+ inline CMATRIX3X3& operator = ( const CMATRIX3X3& _M)
429
+ {
430
+ for (int i = 0; i < 3; i++)
431
+ {
432
+ for (int j = 0; j < 3; j++)
433
+ {
434
+ M [i] [j] = _M.M [i] [j];
435
+ }
436
+ }
437
+ return *this;
438
+ };
439
+
440
+ inline void InitialPosition (void)
441
+ {
442
+ Clear();
443
+ A11 = 1.0f;
444
+ A22 = 1.0f;
445
+ A33 = 1.0f;
446
+ };
447
+
448
+ inline void Clear (void)
449
+ {
450
+ for (int i = 0; i < 3; i++)
451
+ {
452
+ for (int j = 0; j < 3; j++)
453
+ {
454
+ M [i] [j] = 0.0f;
455
+ }
456
+ }
457
+ };
458
+
459
+ inline void SetToIdentity (void)
460
+ {
461
+ for (int i = 0; i < 3; i++)
462
+ {
463
+ for (int j = 0; j < 3; j++)
464
+ {
465
+ M [i] [j] = (i == j) ? 1.0f : 0.0f;
466
+ }
467
+ }
468
+ };
469
+
470
+ inline CMATRIX3X3 Transpose (void) const
471
+ {
472
+ CMATRIX3X3 m33Ret;
473
+ for (int i = 0; i < 3; i++)
474
+ {
475
+ for (int j = 0; j < 3; j++)
476
+ {
477
+ m33Ret.M [j] [i] = M [i] [j];
478
+ }
479
+ }
480
+ return m33Ret;
481
+ };
482
+
483
+ inline CVEC3D operator * ( const CVEC3D &_V ) const
484
+ {
485
+ CVEC3D v3Ret ( A11 * _V.X + A12 * _V.Y + A13 * _V.Z,
486
+ A21 * _V.X + A22 * _V.Y + A23 * _V.Z,
487
+ A31 * _V.X + A32 * _V.Y + A33 * _V.Z);
488
+ return v3Ret;
489
+ };
490
+
491
+ inline QUATERNION ToQuaternion (void)
492
+ {
493
+ QUATERNION quarternion = {0};
494
+
495
+ // This method is safer and removes the imprecisions around PI rotation than using the classical:
496
+ // W = Sqrt(1+M11+M22+M33); X = (M32-M23) /4W; Y = (M13-M31)/4W; Z = (M21-M12)/4W
497
+ quarternion.W = (float) sqrt (max (0.0f, 1.0f + A11 + A22 + A33)) / 2.0f;
498
+ //Get norms:
499
+ quarternion.X = (float) sqrt (max (0.0f, 1.0f + A11 - A22 - A33)) / 2.0f;
500
+ quarternion.Y = (float) sqrt (max (0.0f, 1.0f - A11 + A22 - A33)) / 2.0f;
501
+ quarternion.Z = (float) sqrt (max (0.0f, 1.0f - A11 - A22 + A33)) / 2.0f;
502
+ // Get signs
503
+ if ((A32 - A23) < 0.0f)
504
+ { // negate QX:
505
+ quarternion.X = - quarternion.X;
506
+ }
507
+ if ((A13 - A31) < 0.0f)
508
+ { // negate QY:
509
+ quarternion.Y = - quarternion.Y;
510
+ }
511
+ if ((A21 - A12) < 0.0f)
512
+ { // negate QZ:
513
+ quarternion.Z = - quarternion.Z;
514
+ }
515
+
516
+ return quarternion;
517
+ };
518
+
519
+ inline VEC3D ToEulerAngle (void)
520
+ {
521
+ VEC3D Euler = {0};
522
+ CVEC3D EulerAngle;
523
+
524
+ if (!FloatEq(A32, 1.0f) && !FloatEq(A32, -1.0f))
525
+ {
526
+ float cx = 1.0f;
527
+
528
+ if (FloatEq (A33, 0.0f))
529
+ {
530
+ EulerAngle.Y = -PI/2; // then A31 = cos X
531
+ EulerAngle.X = (float) (atan2 (A32, A31));
532
+ }
533
+ else
534
+ {
535
+ EulerAngle.Y = (float) (atan (-A31 / A33));
536
+ if (A33 >= 0.0f)
537
+ {
538
+ EulerAngle.X = (float) (asin (A32));
539
+ }
540
+ else
541
+ {
542
+ EulerAngle.X = (float) (-asin (A32)) + PI;
543
+ }
544
+ }
545
+
546
+ if (cos (EulerAngle.X) < 0.0f)
547
+ {
548
+ cx = -1.0f;
549
+ }
550
+
551
+ EulerAngle.Z = (float) (atan2 (-A12 * cx, A22 * cx));
552
+ }
553
+ else
554
+ {
555
+ EulerAngle.Y = 0.0f; // can be anything, make if 0
556
+
557
+ if (FloatEq (A32, -1.0f))
558
+ {
559
+ EulerAngle.X = -PI/2;
560
+ }
561
+ else
562
+ {
563
+ EulerAngle.X = PI/2;
564
+ }
565
+
566
+ EulerAngle.Z = (float) (atan2 (A21, A11));
567
+ }
568
+
569
+ // Yaw is in [0, +2PI[
570
+ EulerAngle.Z = RealModulo (EulerAngle.Z, 2*PI);
571
+
572
+ // Pitch is in [-PI, +PI[
573
+ EulerAngle.X = RealModulo (EulerAngle.X + PI, 2*PI) - PI;
574
+
575
+ // Roll is in [-PI/2, +PI/2[
576
+ EulerAngle.Y = RealModulo (EulerAngle.Y + PI/2, PI) - PI/2;
577
+
578
+ // Convert from rad to degree
579
+ Euler = EulerAngle * RadToDegRatio;
580
+
581
+ return Euler;
582
+ };
583
+
584
+ };
585
+
586
+
587
+ class CQUATERNION : public QUATERNION
588
+ {
589
+ public:
590
+ inline CQUATERNION( void )
591
+ {
592
+ Clear();
593
+ };
594
+ inline ~CQUATERNION( void ) {};
595
+ inline CQUATERNION( const QUATERNION& _Q )
596
+ {
597
+ W = _Q.W;
598
+ X = _Q.X;
599
+ Y = _Q.Y;
600
+ Z = _Q.Z;
601
+ };
602
+ inline CQUATERNION( float _W, float _X, float _Y, float _Z )
603
+ {
604
+ W = _W;
605
+ X = _X;
606
+ Y = _Y;
607
+ Z = _Z;
608
+ };
609
+ inline CQUATERNION( float AngleInRad, VEC3D Axis )
610
+ {
611
+ W = (float)(cos(AngleInRad/2));
612
+ X = Axis.X * (float)(sin(AngleInRad/2));
613
+ Y = Axis.Y * (float)(sin(AngleInRad/2));
614
+ Z = Axis.Z * (float)(sin(AngleInRad/2));
615
+ };
616
+
617
+ // assignment operators
618
+ inline CQUATERNION operator *= ( const CQUATERNION& _Q )
619
+ {
620
+ *this = *this * _Q;
621
+ return *this;
622
+ };
623
+
624
+ inline CQUATERNION& operator *= (const float _F)
625
+ {
626
+ *this = *this * _F;
627
+ return *this;
628
+ };
629
+
630
+ inline CQUATERNION& operator /= (const float _F)
631
+ {
632
+ *this = *this / _F;
633
+ return *this;
634
+ };
635
+
636
+ inline CQUATERNION& operator += ( const CQUATERNION& _Q)
637
+ {
638
+ *this = *this + _Q;
639
+ return *this;
640
+ };
641
+
642
+ inline CQUATERNION& operator -= ( const CQUATERNION& _Q)
643
+ {
644
+ *this = *this - _Q;
645
+ return *this;
646
+ };
647
+
648
+ // unary
649
+ inline CQUATERNION operator - () const
650
+ {
651
+ CQUATERNION QuatRet;
652
+
653
+ QuatRet.W = -W;
654
+ QuatRet.X = -X;
655
+ QuatRet.Y = -Y;
656
+ QuatRet.Z = -Z;
657
+
658
+ return QuatRet;
659
+ };
660
+
661
+ // binary operators
662
+ inline CQUATERNION operator * ( const CQUATERNION& _Q) const
663
+ {
664
+ CQUATERNION QuatRet;
665
+
666
+ QuatRet.W = W*_Q.W - X*_Q.X - Y*_Q.Y - Z*_Q.Z;
667
+ QuatRet.X = X*_Q.W + W*_Q.X + Y*_Q.Z - Z*_Q.Y;
668
+ QuatRet.Y = W*_Q.Y - X*_Q.Z + Y*_Q.W + Z*_Q.X;
669
+ QuatRet.Z = W*_Q.Z + X*_Q.Y - Y*_Q.X + Z*_Q.W;
670
+
671
+ return QuatRet;
672
+ };
673
+
674
+ inline CQUATERNION operator * ( float _F) const
675
+ {
676
+ CQUATERNION QuatRet;
677
+
678
+ QuatRet.W = W * _F;
679
+ QuatRet.X = X * _F;
680
+ QuatRet.Y = Y * _F;
681
+ QuatRet.Z = Z * _F;
682
+
683
+ return QuatRet;
684
+ };
685
+
686
+ inline CQUATERNION operator / ( float _F) const
687
+ {
688
+ CQUATERNION QuatRet;
689
+
690
+ QuatRet.W = W / _F;
691
+ QuatRet.X = X / _F;
692
+ QuatRet.Y = Y / _F;
693
+ QuatRet.Z = Z / _F;
694
+
695
+ return QuatRet;
696
+ };
697
+
698
+ inline CQUATERNION operator + ( const CQUATERNION& _Q) const
699
+ {
700
+ CQUATERNION QuatRet;
701
+
702
+ QuatRet.W = W + _Q.W;
703
+ QuatRet.X = X + _Q.X;
704
+ QuatRet.Y = Y + _Q.Y;
705
+ QuatRet.Z = Z + _Q.Z;
706
+
707
+ return QuatRet;
708
+ };
709
+
710
+ inline CQUATERNION operator - ( const CQUATERNION& _Q) const
711
+ {
712
+ CQUATERNION QuatRet;
713
+
714
+ QuatRet.W = W - _Q.W;
715
+ QuatRet.X = X - _Q.X;
716
+ QuatRet.Y = Y - _Q.Y;
717
+ QuatRet.Z = Z - _Q.Z;
718
+
719
+ return QuatRet;
720
+ };
721
+
722
+ inline bool operator == ( const CQUATERNION& _Q) const
723
+ {
724
+ return ((W == _Q.W) && (X == _Q.X) && (Y == _Q.Y) && (Z == _Q.Z));
725
+ };
726
+
727
+
728
+ inline bool operator != ( const CQUATERNION& _Q) const
729
+ {
730
+ return !(this == &_Q);
731
+ };
732
+
733
+ inline CQUATERNION& operator = ( const CQUATERNION& _Q)
734
+ {
735
+ W = _Q.W;
736
+ X = _Q.X;
737
+ Y = _Q.Y;
738
+ Z = _Q.Z;
739
+ return *this;
740
+ };
741
+
742
+ inline CQUATERNION Conjugate (void) const
743
+ {
744
+ CQUATERNION QuatRet;
745
+
746
+ QuatRet.W = W;
747
+ QuatRet.X = -X;
748
+ QuatRet.Y = -Y;
749
+ QuatRet.Z = -Z;
750
+
751
+ return QuatRet;
752
+ };
753
+
754
+ inline float Magnitude (void)
755
+ {
756
+ return (static_cast<float>(sqrt(W*W+X*X+Y*Y+Z*Z)));
757
+ };
758
+
759
+ inline void Normalize (void)
760
+ {
761
+ float fMagnitude = this->Magnitude();
762
+ if (0.0 != fMagnitude)
763
+ {
764
+ *this /= fMagnitude;
765
+ }
766
+ };
767
+
768
+ inline void InitialPosition (void)
769
+ {
770
+ W = 1.0f;
771
+ X = 0.0f;
772
+ Y = 0.0f;
773
+ Z = 0.0f;
774
+ };
775
+
776
+ inline void Clear (void)
777
+ {
778
+ W = 0.0f;
779
+ X = 0.0f;
780
+ Y = 0.0f;
781
+ Z = 0.0f;
782
+ };
783
+
784
+ inline float ToAngleAxis ( PVEC3D pAxis)
785
+ {
786
+ float Angle = 2 * acos(W);
787
+
788
+ if (pAxis != nullptr)
789
+ {
790
+ float Temp = sqrt(1 - W*W);
791
+ if (Temp != 0)
792
+ {
793
+ pAxis->X = X / Temp;
794
+ pAxis->Y = Y / Temp;
795
+ pAxis->Z = Z / Temp;
796
+ }
797
+ }
798
+
799
+ return Angle;
800
+ };
801
+
802
+ inline MATRIX3X3 ToMatrix (void)
803
+ {
804
+ MATRIX3X3 Matrix = {0};
805
+
806
+ Matrix.A11 = 1 - 2*Y*Y - 2*Z*Z;
807
+ Matrix.A12 = 2*X*Y - 2*Z*W;
808
+ Matrix.A13 = 2*X*Z + 2*Y*W;
809
+ Matrix.A21 = 2*X*Y + 2*Z*W;
810
+ Matrix.A22 = 1 - 2*X*X - 2*Z*Z;
811
+ Matrix.A23 = 2*Y*Z - 2*X*W;
812
+ Matrix.A31 = 2*X*Z - 2*Y*W;
813
+ Matrix.A32 = 2*Y*Z + 2*X*W;
814
+ Matrix.A33 = 1 - 2*X*X - 2*Y*Y;
815
+
816
+ return Matrix;
817
+ };
818
+
819
+ inline CQUATERNION RotateAngleByAxis ( const float AngleInRad, const VEC3D Axis)
820
+ {
821
+ CQUATERNION QuatRet = *this;
822
+
823
+ if (!FloatEq(AngleInRad, 0))
824
+ {
825
+ CQUATERNION Rotation(AngleInRad, Axis);
826
+
827
+ QuatRet = Rotation * *this;
828
+ }
829
+
830
+ return QuatRet;
831
+ };
832
+
833
+ inline CQUATERNION RotateAngleByGravity ( const float AngleInRad )
834
+ {
835
+ CQUATERNION QuatRet = *this;
836
+
837
+ if (!FloatEq(AngleInRad, 0))
838
+ {
839
+ VEC3D Axis = {0};
840
+ Axis.X = -1.0f * (2*X*Z - 2*Y*W);
841
+ Axis.Y = -1.0f * (2*Y*Z + 2*X*W);
842
+ Axis.Z = -1.0f * (1 - 2*X*X - 2*Y*Y);
843
+
844
+ CQUATERNION Rotation(AngleInRad, Axis);
845
+
846
+ QuatRet = Rotation * *this;
847
+ }
848
+
849
+ return QuatRet;
850
+ };
851
+
852
+ };
853
+
854
+ #endif
msvc/Windows Kits/10/Include/10.0.26100.0/shared/ShellHandwriting.h ADDED
@@ -0,0 +1,762 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ #ifndef COM_NO_WINDOWS_H
29
+ #include "windows.h"
30
+ #include "ole2.h"
31
+ #endif /*COM_NO_WINDOWS_H*/
32
+
33
+ #ifndef __shellhandwriting_h__
34
+ #define __shellhandwriting_h__
35
+
36
+ #if defined(_MSC_VER) && (_MSC_VER >= 1020)
37
+ #pragma once
38
+ #endif
39
+
40
+ #ifndef DECLSPEC_XFGVIRT
41
+ #if defined(_CONTROL_FLOW_GUARD_XFG)
42
+ #define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
43
+ #else
44
+ #define DECLSPEC_XFGVIRT(base, func)
45
+ #endif
46
+ #endif
47
+
48
+ /* Forward Declarations */
49
+
50
+ #ifndef __ITfDetermineProximateHandwritingTargetArgs_FWD_DEFINED__
51
+ #define __ITfDetermineProximateHandwritingTargetArgs_FWD_DEFINED__
52
+ typedef interface ITfDetermineProximateHandwritingTargetArgs ITfDetermineProximateHandwritingTargetArgs;
53
+
54
+ #endif /* __ITfDetermineProximateHandwritingTargetArgs_FWD_DEFINED__ */
55
+
56
+
57
+ #ifndef __ITfFocusHandwritingTargetArgs_FWD_DEFINED__
58
+ #define __ITfFocusHandwritingTargetArgs_FWD_DEFINED__
59
+ typedef interface ITfFocusHandwritingTargetArgs ITfFocusHandwritingTargetArgs;
60
+
61
+ #endif /* __ITfFocusHandwritingTargetArgs_FWD_DEFINED__ */
62
+
63
+
64
+ #ifndef __ITfHandwritingSink_FWD_DEFINED__
65
+ #define __ITfHandwritingSink_FWD_DEFINED__
66
+ typedef interface ITfHandwritingSink ITfHandwritingSink;
67
+
68
+ #endif /* __ITfHandwritingSink_FWD_DEFINED__ */
69
+
70
+
71
+ #ifndef __ITfHandwritingRequest_FWD_DEFINED__
72
+ #define __ITfHandwritingRequest_FWD_DEFINED__
73
+ typedef interface ITfHandwritingRequest ITfHandwritingRequest;
74
+
75
+ #endif /* __ITfHandwritingRequest_FWD_DEFINED__ */
76
+
77
+
78
+ #ifndef __ITfHandwriting_FWD_DEFINED__
79
+ #define __ITfHandwriting_FWD_DEFINED__
80
+ typedef interface ITfHandwriting ITfHandwriting;
81
+
82
+ #endif /* __ITfHandwriting_FWD_DEFINED__ */
83
+
84
+
85
+ #ifndef __IHandwritingInputRoutingCallback_FWD_DEFINED__
86
+ #define __IHandwritingInputRoutingCallback_FWD_DEFINED__
87
+ typedef interface IHandwritingInputRoutingCallback IHandwritingInputRoutingCallback;
88
+
89
+ #endif /* __IHandwritingInputRoutingCallback_FWD_DEFINED__ */
90
+
91
+
92
+ /* header files for imported files */
93
+ #include "oaidl.h"
94
+ #include "ocidl.h"
95
+
96
+ #ifdef __cplusplus
97
+ extern "C"{
98
+ #endif
99
+
100
+
101
+ /* interface __MIDL_itf_shellhandwriting_0000_0000 */
102
+ /* [local] */
103
+
104
+ #include <winapifamily.h>
105
+ #if (NTDDI_VERSION >= NTDDI_WIN10_NI)
106
+ #pragma region Desktop Family
107
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
108
+ #define TF_E_TOO_LATE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x050A)
109
+ typedef /* [v1_enum] */
110
+ enum TfHandwritingState
111
+ {
112
+ TF_HANDWRITING_AUTO = 0,
113
+ TF_HANDWRITING_DISABLED = 1,
114
+ TF_HANDWRITING_ENABLED = 2,
115
+ TF_HANDWRITING_POINTERDELIVERY = 3
116
+ } TfHandwritingState;
117
+
118
+ typedef /* [v1_enum] */
119
+ enum TfProximateHandwritingTargetResponse
120
+ {
121
+ TF_NO_HANDWRITING_TARGET_PROXIMATE = 0,
122
+ TF_HANDWRITING_TARGET_PROXIMATE = 1,
123
+ TF_USE_SYSTEM_TARGETING = 2,
124
+ TF_USE_POINTER_DELIVERY = 3
125
+ } TfProximateHandwritingTargetResponse;
126
+
127
+ typedef /* [v1_enum] */
128
+ enum TfHandwritingFocusTargetResponse
129
+ {
130
+ TF_NO_HANDWRITING_TARGET = 0,
131
+ TF_HANDWRITING_TARGET_FOCUSED = ( TF_NO_HANDWRITING_TARGET + 1 ) ,
132
+ TF_HANDWRITING_TARGET_FOCUSED_NO_CORRECTIONS = ( TF_HANDWRITING_TARGET_FOCUSED + 1 ) ,
133
+ TF_PERFORM_SYSTEM_TARGETING = ( TF_HANDWRITING_TARGET_FOCUSED_NO_CORRECTIONS + 1 )
134
+ } TfHandwritingFocusTargetResponse;
135
+
136
+ typedef /* [v1_enum] */
137
+ enum TfInputEvaluation
138
+ {
139
+ TF_IE_HANDWRITING = 0,
140
+ TF_IE_TAP = 1,
141
+ TF_IE_CANCEL_HANDWRITING = 2
142
+ } TfInputEvaluation;
143
+
144
+
145
+
146
+ extern RPC_IF_HANDLE __MIDL_itf_shellhandwriting_0000_0000_v0_0_c_ifspec;
147
+ extern RPC_IF_HANDLE __MIDL_itf_shellhandwriting_0000_0000_v0_0_s_ifspec;
148
+
149
+ #ifndef __ITfDetermineProximateHandwritingTargetArgs_INTERFACE_DEFINED__
150
+ #define __ITfDetermineProximateHandwritingTargetArgs_INTERFACE_DEFINED__
151
+
152
+ /* interface ITfDetermineProximateHandwritingTargetArgs */
153
+ /* [local][uuid][object] */
154
+
155
+
156
+ EXTERN_C const IID IID_ITfDetermineProximateHandwritingTargetArgs;
157
+
158
+ #if defined(__cplusplus) && !defined(CINTERFACE)
159
+
160
+ MIDL_INTERFACE("8E676F4B-1951-530C-74D2-0DFDB76F17EB")
161
+ ITfDetermineProximateHandwritingTargetArgs : public IUnknown
162
+ {
163
+ public:
164
+ virtual HRESULT STDMETHODCALLTYPE GetPointerTargetInfo(
165
+ /* [out] */ HWND *targetWindow,
166
+ /* [out] */ POINT *targetScreenPoint,
167
+ /* [out] */ SIZE *distanceThreshold) = 0;
168
+
169
+ virtual HRESULT STDMETHODCALLTYPE SetResponse(
170
+ TfProximateHandwritingTargetResponse response) = 0;
171
+
172
+ };
173
+
174
+
175
+ #else /* C style interface */
176
+
177
+ typedef struct ITfDetermineProximateHandwritingTargetArgsVtbl
178
+ {
179
+ BEGIN_INTERFACE
180
+
181
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
182
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
183
+ ITfDetermineProximateHandwritingTargetArgs * This,
184
+ /* [in] */ REFIID riid,
185
+ /* [annotation][iid_is][out] */
186
+ _COM_Outptr_ void **ppvObject);
187
+
188
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
189
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
190
+ ITfDetermineProximateHandwritingTargetArgs * This);
191
+
192
+ DECLSPEC_XFGVIRT(IUnknown, Release)
193
+ ULONG ( STDMETHODCALLTYPE *Release )(
194
+ ITfDetermineProximateHandwritingTargetArgs * This);
195
+
196
+ DECLSPEC_XFGVIRT(ITfDetermineProximateHandwritingTargetArgs, GetPointerTargetInfo)
197
+ HRESULT ( STDMETHODCALLTYPE *GetPointerTargetInfo )(
198
+ ITfDetermineProximateHandwritingTargetArgs * This,
199
+ /* [out] */ HWND *targetWindow,
200
+ /* [out] */ POINT *targetScreenPoint,
201
+ /* [out] */ SIZE *distanceThreshold);
202
+
203
+ DECLSPEC_XFGVIRT(ITfDetermineProximateHandwritingTargetArgs, SetResponse)
204
+ HRESULT ( STDMETHODCALLTYPE *SetResponse )(
205
+ ITfDetermineProximateHandwritingTargetArgs * This,
206
+ TfProximateHandwritingTargetResponse response);
207
+
208
+ END_INTERFACE
209
+ } ITfDetermineProximateHandwritingTargetArgsVtbl;
210
+
211
+ interface ITfDetermineProximateHandwritingTargetArgs
212
+ {
213
+ CONST_VTBL struct ITfDetermineProximateHandwritingTargetArgsVtbl *lpVtbl;
214
+ };
215
+
216
+
217
+
218
+ #ifdef COBJMACROS
219
+
220
+
221
+ #define ITfDetermineProximateHandwritingTargetArgs_QueryInterface(This,riid,ppvObject) \
222
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
223
+
224
+ #define ITfDetermineProximateHandwritingTargetArgs_AddRef(This) \
225
+ ( (This)->lpVtbl -> AddRef(This) )
226
+
227
+ #define ITfDetermineProximateHandwritingTargetArgs_Release(This) \
228
+ ( (This)->lpVtbl -> Release(This) )
229
+
230
+
231
+ #define ITfDetermineProximateHandwritingTargetArgs_GetPointerTargetInfo(This,targetWindow,targetScreenPoint,distanceThreshold) \
232
+ ( (This)->lpVtbl -> GetPointerTargetInfo(This,targetWindow,targetScreenPoint,distanceThreshold) )
233
+
234
+ #define ITfDetermineProximateHandwritingTargetArgs_SetResponse(This,response) \
235
+ ( (This)->lpVtbl -> SetResponse(This,response) )
236
+
237
+ #endif /* COBJMACROS */
238
+
239
+
240
+ #endif /* C style interface */
241
+
242
+
243
+
244
+
245
+ #endif /* __ITfDetermineProximateHandwritingTargetArgs_INTERFACE_DEFINED__ */
246
+
247
+
248
+ #ifndef __ITfFocusHandwritingTargetArgs_INTERFACE_DEFINED__
249
+ #define __ITfFocusHandwritingTargetArgs_INTERFACE_DEFINED__
250
+
251
+ /* interface ITfFocusHandwritingTargetArgs */
252
+ /* [local][uuid][object] */
253
+
254
+
255
+ EXTERN_C const IID IID_ITfFocusHandwritingTargetArgs;
256
+
257
+ #if defined(__cplusplus) && !defined(CINTERFACE)
258
+
259
+ MIDL_INTERFACE("5C4EC0E8-E7EE-51C7-6B7A-1CABBEE700E6")
260
+ ITfFocusHandwritingTargetArgs : public IUnknown
261
+ {
262
+ public:
263
+ virtual HRESULT STDMETHODCALLTYPE GetPointerTargetInfo(
264
+ /* [out] */ HWND *targetWindow,
265
+ /* [out] */ RECT *targetScreenArea,
266
+ /* [out] */ SIZE *distanceThreshold) = 0;
267
+
268
+ virtual HRESULT STDMETHODCALLTYPE SetResponse(
269
+ TfHandwritingFocusTargetResponse response) = 0;
270
+
271
+ };
272
+
273
+
274
+ #else /* C style interface */
275
+
276
+ typedef struct ITfFocusHandwritingTargetArgsVtbl
277
+ {
278
+ BEGIN_INTERFACE
279
+
280
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
281
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
282
+ ITfFocusHandwritingTargetArgs * This,
283
+ /* [in] */ REFIID riid,
284
+ /* [annotation][iid_is][out] */
285
+ _COM_Outptr_ void **ppvObject);
286
+
287
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
288
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
289
+ ITfFocusHandwritingTargetArgs * This);
290
+
291
+ DECLSPEC_XFGVIRT(IUnknown, Release)
292
+ ULONG ( STDMETHODCALLTYPE *Release )(
293
+ ITfFocusHandwritingTargetArgs * This);
294
+
295
+ DECLSPEC_XFGVIRT(ITfFocusHandwritingTargetArgs, GetPointerTargetInfo)
296
+ HRESULT ( STDMETHODCALLTYPE *GetPointerTargetInfo )(
297
+ ITfFocusHandwritingTargetArgs * This,
298
+ /* [out] */ HWND *targetWindow,
299
+ /* [out] */ RECT *targetScreenArea,
300
+ /* [out] */ SIZE *distanceThreshold);
301
+
302
+ DECLSPEC_XFGVIRT(ITfFocusHandwritingTargetArgs, SetResponse)
303
+ HRESULT ( STDMETHODCALLTYPE *SetResponse )(
304
+ ITfFocusHandwritingTargetArgs * This,
305
+ TfHandwritingFocusTargetResponse response);
306
+
307
+ END_INTERFACE
308
+ } ITfFocusHandwritingTargetArgsVtbl;
309
+
310
+ interface ITfFocusHandwritingTargetArgs
311
+ {
312
+ CONST_VTBL struct ITfFocusHandwritingTargetArgsVtbl *lpVtbl;
313
+ };
314
+
315
+
316
+
317
+ #ifdef COBJMACROS
318
+
319
+
320
+ #define ITfFocusHandwritingTargetArgs_QueryInterface(This,riid,ppvObject) \
321
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
322
+
323
+ #define ITfFocusHandwritingTargetArgs_AddRef(This) \
324
+ ( (This)->lpVtbl -> AddRef(This) )
325
+
326
+ #define ITfFocusHandwritingTargetArgs_Release(This) \
327
+ ( (This)->lpVtbl -> Release(This) )
328
+
329
+
330
+ #define ITfFocusHandwritingTargetArgs_GetPointerTargetInfo(This,targetWindow,targetScreenArea,distanceThreshold) \
331
+ ( (This)->lpVtbl -> GetPointerTargetInfo(This,targetWindow,targetScreenArea,distanceThreshold) )
332
+
333
+ #define ITfFocusHandwritingTargetArgs_SetResponse(This,response) \
334
+ ( (This)->lpVtbl -> SetResponse(This,response) )
335
+
336
+ #endif /* COBJMACROS */
337
+
338
+
339
+ #endif /* C style interface */
340
+
341
+
342
+
343
+
344
+ #endif /* __ITfFocusHandwritingTargetArgs_INTERFACE_DEFINED__ */
345
+
346
+
347
+ #ifndef __ITfHandwritingSink_INTERFACE_DEFINED__
348
+ #define __ITfHandwritingSink_INTERFACE_DEFINED__
349
+
350
+ /* interface ITfHandwritingSink */
351
+ /* [local][uuid][object] */
352
+
353
+
354
+ EXTERN_C const IID IID_ITfHandwritingSink;
355
+
356
+ #if defined(__cplusplus) && !defined(CINTERFACE)
357
+
358
+ MIDL_INTERFACE("3575A140-A10F-555F-35F9-45C865EB93BE")
359
+ ITfHandwritingSink : public IUnknown
360
+ {
361
+ public:
362
+ virtual HRESULT STDMETHODCALLTYPE DetermineProximateHandwritingTarget(
363
+ /* [in] */ ITfDetermineProximateHandwritingTargetArgs *determineProximateHandwritingTargetArgs) = 0;
364
+
365
+ virtual HRESULT STDMETHODCALLTYPE FocusHandwritingTarget(
366
+ /* [in] */ ITfFocusHandwritingTargetArgs *focusHandwritingTargetArgs) = 0;
367
+
368
+ };
369
+
370
+
371
+ #else /* C style interface */
372
+
373
+ typedef struct ITfHandwritingSinkVtbl
374
+ {
375
+ BEGIN_INTERFACE
376
+
377
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
378
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
379
+ ITfHandwritingSink * This,
380
+ /* [in] */ REFIID riid,
381
+ /* [annotation][iid_is][out] */
382
+ _COM_Outptr_ void **ppvObject);
383
+
384
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
385
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
386
+ ITfHandwritingSink * This);
387
+
388
+ DECLSPEC_XFGVIRT(IUnknown, Release)
389
+ ULONG ( STDMETHODCALLTYPE *Release )(
390
+ ITfHandwritingSink * This);
391
+
392
+ DECLSPEC_XFGVIRT(ITfHandwritingSink, DetermineProximateHandwritingTarget)
393
+ HRESULT ( STDMETHODCALLTYPE *DetermineProximateHandwritingTarget )(
394
+ ITfHandwritingSink * This,
395
+ /* [in] */ ITfDetermineProximateHandwritingTargetArgs *determineProximateHandwritingTargetArgs);
396
+
397
+ DECLSPEC_XFGVIRT(ITfHandwritingSink, FocusHandwritingTarget)
398
+ HRESULT ( STDMETHODCALLTYPE *FocusHandwritingTarget )(
399
+ ITfHandwritingSink * This,
400
+ /* [in] */ ITfFocusHandwritingTargetArgs *focusHandwritingTargetArgs);
401
+
402
+ END_INTERFACE
403
+ } ITfHandwritingSinkVtbl;
404
+
405
+ interface ITfHandwritingSink
406
+ {
407
+ CONST_VTBL struct ITfHandwritingSinkVtbl *lpVtbl;
408
+ };
409
+
410
+
411
+
412
+ #ifdef COBJMACROS
413
+
414
+
415
+ #define ITfHandwritingSink_QueryInterface(This,riid,ppvObject) \
416
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
417
+
418
+ #define ITfHandwritingSink_AddRef(This) \
419
+ ( (This)->lpVtbl -> AddRef(This) )
420
+
421
+ #define ITfHandwritingSink_Release(This) \
422
+ ( (This)->lpVtbl -> Release(This) )
423
+
424
+
425
+ #define ITfHandwritingSink_DetermineProximateHandwritingTarget(This,determineProximateHandwritingTargetArgs) \
426
+ ( (This)->lpVtbl -> DetermineProximateHandwritingTarget(This,determineProximateHandwritingTargetArgs) )
427
+
428
+ #define ITfHandwritingSink_FocusHandwritingTarget(This,focusHandwritingTargetArgs) \
429
+ ( (This)->lpVtbl -> FocusHandwritingTarget(This,focusHandwritingTargetArgs) )
430
+
431
+ #endif /* COBJMACROS */
432
+
433
+
434
+ #endif /* C style interface */
435
+
436
+
437
+
438
+
439
+ #endif /* __ITfHandwritingSink_INTERFACE_DEFINED__ */
440
+
441
+
442
+ #ifndef __ITfHandwritingRequest_INTERFACE_DEFINED__
443
+ #define __ITfHandwritingRequest_INTERFACE_DEFINED__
444
+
445
+ /* interface ITfHandwritingRequest */
446
+ /* [local][uuid][object] */
447
+
448
+
449
+ EXTERN_C const IID IID_ITfHandwritingRequest;
450
+
451
+ #if defined(__cplusplus) && !defined(CINTERFACE)
452
+
453
+ MIDL_INTERFACE("EE54892A-2FC4-52E7-8765-DE0E8E88081B")
454
+ ITfHandwritingRequest : public IUnknown
455
+ {
456
+ public:
457
+ virtual HRESULT STDMETHODCALLTYPE SetInputEvaluation(
458
+ TfInputEvaluation inputEvaluation) = 0;
459
+
460
+ };
461
+
462
+
463
+ #else /* C style interface */
464
+
465
+ typedef struct ITfHandwritingRequestVtbl
466
+ {
467
+ BEGIN_INTERFACE
468
+
469
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
470
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
471
+ ITfHandwritingRequest * This,
472
+ /* [in] */ REFIID riid,
473
+ /* [annotation][iid_is][out] */
474
+ _COM_Outptr_ void **ppvObject);
475
+
476
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
477
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
478
+ ITfHandwritingRequest * This);
479
+
480
+ DECLSPEC_XFGVIRT(IUnknown, Release)
481
+ ULONG ( STDMETHODCALLTYPE *Release )(
482
+ ITfHandwritingRequest * This);
483
+
484
+ DECLSPEC_XFGVIRT(ITfHandwritingRequest, SetInputEvaluation)
485
+ HRESULT ( STDMETHODCALLTYPE *SetInputEvaluation )(
486
+ ITfHandwritingRequest * This,
487
+ TfInputEvaluation inputEvaluation);
488
+
489
+ END_INTERFACE
490
+ } ITfHandwritingRequestVtbl;
491
+
492
+ interface ITfHandwritingRequest
493
+ {
494
+ CONST_VTBL struct ITfHandwritingRequestVtbl *lpVtbl;
495
+ };
496
+
497
+
498
+
499
+ #ifdef COBJMACROS
500
+
501
+
502
+ #define ITfHandwritingRequest_QueryInterface(This,riid,ppvObject) \
503
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
504
+
505
+ #define ITfHandwritingRequest_AddRef(This) \
506
+ ( (This)->lpVtbl -> AddRef(This) )
507
+
508
+ #define ITfHandwritingRequest_Release(This) \
509
+ ( (This)->lpVtbl -> Release(This) )
510
+
511
+
512
+ #define ITfHandwritingRequest_SetInputEvaluation(This,inputEvaluation) \
513
+ ( (This)->lpVtbl -> SetInputEvaluation(This,inputEvaluation) )
514
+
515
+ #endif /* COBJMACROS */
516
+
517
+
518
+ #endif /* C style interface */
519
+
520
+
521
+
522
+
523
+ #endif /* __ITfHandwritingRequest_INTERFACE_DEFINED__ */
524
+
525
+
526
+ #ifndef __ITfHandwriting_INTERFACE_DEFINED__
527
+ #define __ITfHandwriting_INTERFACE_DEFINED__
528
+
529
+ /* interface ITfHandwriting */
530
+ /* [local][uuid][object] */
531
+
532
+
533
+ EXTERN_C const IID IID_ITfHandwriting;
534
+
535
+ #if defined(__cplusplus) && !defined(CINTERFACE)
536
+
537
+ MIDL_INTERFACE("59714133-8E20-5101-B1AE-D2CD9BAD8CE5")
538
+ ITfHandwriting : public IUnknown
539
+ {
540
+ public:
541
+ virtual HRESULT STDMETHODCALLTYPE GetHandwritingState(
542
+ /* [out] */ TfHandwritingState *handwritingState) = 0;
543
+
544
+ virtual HRESULT STDMETHODCALLTYPE SetHandwritingState(
545
+ TfHandwritingState handwritingState) = 0;
546
+
547
+ virtual HRESULT STDMETHODCALLTYPE RequestHandwritingForPointer(
548
+ UINT32 pointerId,
549
+ UINT64 handwritingStrokeId,
550
+ /* [out] */ BOOL *requestAccepted,
551
+ /* [out] */ ITfHandwritingRequest **request) = 0;
552
+
553
+ virtual HRESULT STDMETHODCALLTYPE GetHandwritingDistanceThreshold(
554
+ /* [out] */ SIZE *distanceThresholdPixels) = 0;
555
+
556
+ };
557
+
558
+
559
+ #else /* C style interface */
560
+
561
+ typedef struct ITfHandwritingVtbl
562
+ {
563
+ BEGIN_INTERFACE
564
+
565
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
566
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
567
+ ITfHandwriting * This,
568
+ /* [in] */ REFIID riid,
569
+ /* [annotation][iid_is][out] */
570
+ _COM_Outptr_ void **ppvObject);
571
+
572
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
573
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
574
+ ITfHandwriting * This);
575
+
576
+ DECLSPEC_XFGVIRT(IUnknown, Release)
577
+ ULONG ( STDMETHODCALLTYPE *Release )(
578
+ ITfHandwriting * This);
579
+
580
+ DECLSPEC_XFGVIRT(ITfHandwriting, GetHandwritingState)
581
+ HRESULT ( STDMETHODCALLTYPE *GetHandwritingState )(
582
+ ITfHandwriting * This,
583
+ /* [out] */ TfHandwritingState *handwritingState);
584
+
585
+ DECLSPEC_XFGVIRT(ITfHandwriting, SetHandwritingState)
586
+ HRESULT ( STDMETHODCALLTYPE *SetHandwritingState )(
587
+ ITfHandwriting * This,
588
+ TfHandwritingState handwritingState);
589
+
590
+ DECLSPEC_XFGVIRT(ITfHandwriting, RequestHandwritingForPointer)
591
+ HRESULT ( STDMETHODCALLTYPE *RequestHandwritingForPointer )(
592
+ ITfHandwriting * This,
593
+ UINT32 pointerId,
594
+ UINT64 handwritingStrokeId,
595
+ /* [out] */ BOOL *requestAccepted,
596
+ /* [out] */ ITfHandwritingRequest **request);
597
+
598
+ DECLSPEC_XFGVIRT(ITfHandwriting, GetHandwritingDistanceThreshold)
599
+ HRESULT ( STDMETHODCALLTYPE *GetHandwritingDistanceThreshold )(
600
+ ITfHandwriting * This,
601
+ /* [out] */ SIZE *distanceThresholdPixels);
602
+
603
+ END_INTERFACE
604
+ } ITfHandwritingVtbl;
605
+
606
+ interface ITfHandwriting
607
+ {
608
+ CONST_VTBL struct ITfHandwritingVtbl *lpVtbl;
609
+ };
610
+
611
+
612
+
613
+ #ifdef COBJMACROS
614
+
615
+
616
+ #define ITfHandwriting_QueryInterface(This,riid,ppvObject) \
617
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
618
+
619
+ #define ITfHandwriting_AddRef(This) \
620
+ ( (This)->lpVtbl -> AddRef(This) )
621
+
622
+ #define ITfHandwriting_Release(This) \
623
+ ( (This)->lpVtbl -> Release(This) )
624
+
625
+
626
+ #define ITfHandwriting_GetHandwritingState(This,handwritingState) \
627
+ ( (This)->lpVtbl -> GetHandwritingState(This,handwritingState) )
628
+
629
+ #define ITfHandwriting_SetHandwritingState(This,handwritingState) \
630
+ ( (This)->lpVtbl -> SetHandwritingState(This,handwritingState) )
631
+
632
+ #define ITfHandwriting_RequestHandwritingForPointer(This,pointerId,handwritingStrokeId,requestAccepted,request) \
633
+ ( (This)->lpVtbl -> RequestHandwritingForPointer(This,pointerId,handwritingStrokeId,requestAccepted,request) )
634
+
635
+ #define ITfHandwriting_GetHandwritingDistanceThreshold(This,distanceThresholdPixels) \
636
+ ( (This)->lpVtbl -> GetHandwritingDistanceThreshold(This,distanceThresholdPixels) )
637
+
638
+ #endif /* COBJMACROS */
639
+
640
+
641
+ #endif /* C style interface */
642
+
643
+
644
+
645
+
646
+ #endif /* __ITfHandwriting_INTERFACE_DEFINED__ */
647
+
648
+
649
+ #ifndef __IHandwritingInputRoutingCallback_INTERFACE_DEFINED__
650
+ #define __IHandwritingInputRoutingCallback_INTERFACE_DEFINED__
651
+
652
+ /* interface IHandwritingInputRoutingCallback */
653
+ /* [local][uuid][object] */
654
+
655
+
656
+ EXTERN_C const IID IID_IHandwritingInputRoutingCallback;
657
+
658
+ #if defined(__cplusplus) && !defined(CINTERFACE)
659
+
660
+ MIDL_INTERFACE("E3E84B6E-E625-5F79-C39E-32F1FF2056F6")
661
+ IHandwritingInputRoutingCallback : public IUnknown
662
+ {
663
+ public:
664
+ virtual HRESULT STDMETHODCALLTYPE GetThreadIdForInput(
665
+ UINT32 pointerId,
666
+ POINT *targetScreenPoint,
667
+ HWND targetHWnd,
668
+ /* [out] */ UINT32 *uiThreadId) = 0;
669
+
670
+ };
671
+
672
+
673
+ #else /* C style interface */
674
+
675
+ typedef struct IHandwritingInputRoutingCallbackVtbl
676
+ {
677
+ BEGIN_INTERFACE
678
+
679
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
680
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
681
+ IHandwritingInputRoutingCallback * This,
682
+ /* [in] */ REFIID riid,
683
+ /* [annotation][iid_is][out] */
684
+ _COM_Outptr_ void **ppvObject);
685
+
686
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
687
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
688
+ IHandwritingInputRoutingCallback * This);
689
+
690
+ DECLSPEC_XFGVIRT(IUnknown, Release)
691
+ ULONG ( STDMETHODCALLTYPE *Release )(
692
+ IHandwritingInputRoutingCallback * This);
693
+
694
+ DECLSPEC_XFGVIRT(IHandwritingInputRoutingCallback, GetThreadIdForInput)
695
+ HRESULT ( STDMETHODCALLTYPE *GetThreadIdForInput )(
696
+ IHandwritingInputRoutingCallback * This,
697
+ UINT32 pointerId,
698
+ POINT *targetScreenPoint,
699
+ HWND targetHWnd,
700
+ /* [out] */ UINT32 *uiThreadId);
701
+
702
+ END_INTERFACE
703
+ } IHandwritingInputRoutingCallbackVtbl;
704
+
705
+ interface IHandwritingInputRoutingCallback
706
+ {
707
+ CONST_VTBL struct IHandwritingInputRoutingCallbackVtbl *lpVtbl;
708
+ };
709
+
710
+
711
+
712
+ #ifdef COBJMACROS
713
+
714
+
715
+ #define IHandwritingInputRoutingCallback_QueryInterface(This,riid,ppvObject) \
716
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
717
+
718
+ #define IHandwritingInputRoutingCallback_AddRef(This) \
719
+ ( (This)->lpVtbl -> AddRef(This) )
720
+
721
+ #define IHandwritingInputRoutingCallback_Release(This) \
722
+ ( (This)->lpVtbl -> Release(This) )
723
+
724
+
725
+ #define IHandwritingInputRoutingCallback_GetThreadIdForInput(This,pointerId,targetScreenPoint,targetHWnd,uiThreadId) \
726
+ ( (This)->lpVtbl -> GetThreadIdForInput(This,pointerId,targetScreenPoint,targetHWnd,uiThreadId) )
727
+
728
+ #endif /* COBJMACROS */
729
+
730
+
731
+ #endif /* C style interface */
732
+
733
+
734
+
735
+
736
+ #endif /* __IHandwritingInputRoutingCallback_INTERFACE_DEFINED__ */
737
+
738
+
739
+ /* interface __MIDL_itf_shellhandwriting_0000_0006 */
740
+ /* [local] */
741
+
742
+ HRESULT WINAPI RegisterHandwritingInputRoutingCallback(IHandwritingInputRoutingCallback * callback);
743
+ HRESULT WINAPI GetHandwritingStrokeIdForPointer(_In_ UINT32 pointerId, _Out_ UINT64* handwritingStrokeId);
744
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
745
+ #pragma endregion
746
+ #endif // NTDDI_WIN10_NI
747
+
748
+
749
+ extern RPC_IF_HANDLE __MIDL_itf_shellhandwriting_0000_0006_v0_0_c_ifspec;
750
+ extern RPC_IF_HANDLE __MIDL_itf_shellhandwriting_0000_0006_v0_0_s_ifspec;
751
+
752
+ /* Additional Prototypes for ALL interfaces */
753
+
754
+ /* end of Additional Prototypes */
755
+
756
+ #ifdef __cplusplus
757
+ }
758
+ #endif
759
+
760
+ #endif
761
+
762
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/ShellHandwriting.idl ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+
3
+ import "oaidl.idl";
4
+ import "ocidl.idl";
5
+
6
+ cpp_quote("#include <winapifamily.h>")
7
+
8
+ cpp_quote("#if (NTDDI_VERSION >= NTDDI_WIN10_NI)")
9
+
10
+ // Shell Handwriting APIs are Desktop only.
11
+ #pragma region Desktop Family
12
+ cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
13
+
14
+ cpp_quote("#define TF_E_TOO_LATE MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x050A)")
15
+
16
+ typedef [v1_enum] enum TfHandwritingState
17
+ {
18
+ // This value indicates the client will receive the default handwriting behavior
19
+ // based on the presence of pen hardware and the handwriting settings.
20
+ TF_HANDWRITING_AUTO = 0,
21
+
22
+ // This value indicates the client does not want any shell handwriting experience for the context.
23
+ TF_HANDWRITING_DISABLED = 1,
24
+
25
+ // This value indicates the client wants the shell handwriting experience for the context
26
+ // even if the system has quirked the context to not have handwriting by default.
27
+ TF_HANDWRITING_ENABLED = 2,
28
+
29
+ // By default, shell handwriting buffers all pen input from process delivery
30
+ // until the handwriting intent of the user has been determined.
31
+ // This value indicates that client wants the input delivered immediately
32
+ // and will handle the buffering and intent determination itself and notify
33
+ // the shell via the ITfHandwriting::RequestHandwritingForPointer.
34
+ TF_HANDWRITING_POINTERDELIVERY = 3,
35
+ } TfHandwritingState;
36
+
37
+ typedef [v1_enum] enum TfProximateHandwritingTargetResponse
38
+ {
39
+ // No valid handwriting target is proximate to the target point.
40
+ TF_NO_HANDWRITING_TARGET_PROXIMATE = 0,
41
+
42
+ // A valid handwriting target is proximate to the target point.
43
+ TF_HANDWRITING_TARGET_PROXIMATE = 1,
44
+
45
+ // The client wants the system to take its default action.
46
+ TF_USE_SYSTEM_TARGETING = 2,
47
+
48
+ // The client wants the system to convert the handwriting handling
49
+ // to Pointer Delivery for the remainder of the handwriting session.
50
+ TF_USE_POINTER_DELIVERY = 3,
51
+ } TfProximateHandwritingTargetResponse;
52
+
53
+ typedef [v1_enum] enum TfHandwritingFocusTargetResponse
54
+ {
55
+ // The app found no target for ink stroke and doesn't want the system
56
+ // to try and perform its default targeting.
57
+ TF_NO_HANDWRITING_TARGET,
58
+
59
+ // The app has successfully set focus to a handwriting target.
60
+ TF_HANDWRITING_TARGET_FOCUSED,
61
+
62
+ // Same as TF_HANDWRITING_TARGET_FOCUSED but with a request to disable
63
+ // system-provided corrections experience.
64
+ TF_HANDWRITING_TARGET_FOCUSED_NO_CORRECTIONS,
65
+
66
+ // The system should perform the default focus handwriting target
67
+ // behavior that would have occured if no callback was registered.
68
+ TF_PERFORM_SYSTEM_TARGETING,
69
+ } TfHandwritingFocusTargetResponse;
70
+
71
+ typedef [v1_enum] enum TfInputEvaluation
72
+ {
73
+ // The pen input was not recognized as a pen gesture and handwriting should commence.
74
+ TF_IE_HANDWRITING = 0,
75
+
76
+ // The pen input was recognized as a tap gesture. This will result in the handwriting request being cancelled.
77
+ TF_IE_TAP = 1,
78
+
79
+ // The pen input was recognized as a pen gesture the application wants to use and so the handwriting request should be cancelled.
80
+ TF_IE_CANCEL_HANDWRITING = 2,
81
+ } TfInputEvaluation;
82
+
83
+ // ITfDetermineProximateHandwritingTargetArgs
84
+ [object, uuid(8E676F4B-1951-530C-74D2-0DFDB76F17EB), local]
85
+ interface ITfDetermineProximateHandwritingTargetArgs : IUnknown
86
+ {
87
+ HRESULT GetPointerTargetInfo([out] HWND* targetWindow, [out] POINT* targetScreenPoint, [out] SIZE* distanceThreshold);
88
+ HRESULT SetResponse(TfProximateHandwritingTargetResponse response);
89
+ };
90
+
91
+ // ITfFocusHandwritingTargetArgs
92
+ [object, uuid(5C4EC0E8-E7EE-51C7-6B7A-1CABBEE700E6), local]
93
+ interface ITfFocusHandwritingTargetArgs : IUnknown
94
+ {
95
+ HRESULT GetPointerTargetInfo([out] HWND* targetWindow, [out] RECT* targetScreenArea, [out] SIZE* distanceThreshold);
96
+ HRESULT SetResponse(TfHandwritingFocusTargetResponse response);
97
+ };
98
+
99
+ // ITfHandwritingSink
100
+ // Clients provide this callback if they are interested in participating in
101
+ // determination and activation of edit contexts prior to focus being set.
102
+ [object, uuid(3575A140-A10F-555F-35F9-45C865EB93BE), local]
103
+ interface ITfHandwritingSink : IUnknown
104
+ {
105
+ // This callback requests that the client determine if there is a valid handwriting target within
106
+ // distanceThreshold number of pixels away from the target x,y. Valid handwriting targets are any edit
107
+ // context that can receive focus and participate in text services (TSF) input.
108
+ HRESULT DetermineProximateHandwritingTarget([in] ITfDetermineProximateHandwritingTargetArgs* determineProximateHandwritingTargetArgs);
109
+
110
+ // This callback requsts that the client set edit focus on the edit context that most overlaps with
111
+ // the targetArea bounds provided plus the the additional distanceThreshold provided.
112
+ // The buffer is separated from the targetArea to represent an area of preference.
113
+ // Edit contexts that overlap with the targetArea are preferred, buf if none do
114
+ // then the cloest edit context within the buffer should be focused.
115
+ // The client also can optionally choose the correction experience provided for recognized handwriting text.
116
+ // Applications should return S_OK if focus has been set and E_INVALIDARG if no edit context matches the parameters.
117
+ HRESULT FocusHandwritingTarget([in] ITfFocusHandwritingTargetArgs* focusHandwritingTargetArgs);
118
+ };
119
+
120
+ // ITfHandwritingRequest
121
+ [object, uuid(EE54892A-2FC4-52E7-8765-DE0E8E88081B), local]
122
+ interface ITfHandwritingRequest : IUnknown
123
+ {
124
+ HRESULT SetInputEvaluation(TfInputEvaluation inputEvaluation);
125
+ };
126
+
127
+ // ITfHandwriting
128
+ [object, uuid(59714133-8E20-5101-B1AE-D2CD9BAD8CE5), local]
129
+ interface ITfHandwriting : IUnknown
130
+ {
131
+ HRESULT GetHandwritingState([out] TfHandwritingState* handwritingState);
132
+ HRESULT SetHandwritingState(TfHandwritingState handwritingState);
133
+ HRESULT RequestHandwritingForPointer(UINT32 pointerId, UINT64 handwritingStrokeId, [out] BOOL* requestAccepted, [out] ITfHandwritingRequest** request);
134
+ HRESULT GetHandwritingDistanceThreshold([out] SIZE* distanceThresholdPixels);
135
+ };
136
+
137
+ // IHandwritingInputRoutingCallback
138
+ [object, uuid(E3E84B6E-E625-5F79-C39E-32F1FF2056F6), local]
139
+ interface IHandwritingInputRoutingCallback : IUnknown
140
+ {
141
+ // This callback requests that the client provide the thread Id of the UI thread that is responsible for
142
+ // the UI the pointer input is targetting
143
+ HRESULT GetThreadIdForInput(UINT32 pointerId, POINT* targetScreenPoint, HWND targetHWnd, [out] UINT32* uiThreadId);
144
+ };
145
+
146
+ cpp_quote("HRESULT WINAPI RegisterHandwritingInputRoutingCallback(IHandwritingInputRoutingCallback * callback);")
147
+ cpp_quote("HRESULT WINAPI GetHandwritingStrokeIdForPointer(_In_ UINT32 pointerId, _Out_ UINT64* handwritingStrokeId);")
148
+
149
+ cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */")
150
+ #pragma endregion
151
+
152
+ cpp_quote("#endif // NTDDI_WIN10_NI")
msvc/Windows Kits/10/Include/10.0.26100.0/shared/TraceLoggingActivity.h ADDED
@@ -0,0 +1,902 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ TraceLoggingActivity.h
8
+
9
+ Abstract:
10
+
11
+ TraceLogging activity logging helper classes and macros for C++ for
12
+ utilizing ETW activity ids.
13
+
14
+ Environment:
15
+
16
+ User mode.
17
+
18
+ --*/
19
+
20
+ #pragma once
21
+ #ifndef RC_INVOKED
22
+
23
+ #include "TraceLoggingProvider.h"
24
+
25
+ /*
26
+ Quick start:
27
+
28
+ #include <windows.h>
29
+ #include <TraceLoggingProvider.h>
30
+ #include <TraceLoggingActivity.h>
31
+ #include <winmeta.h> // optional, used here for WINEVENT_LEVEL_ERROR
32
+
33
+ TRACELOGGING_DEFINE_PROVIDER(
34
+ g_hProvider,
35
+ "MyProvider",
36
+ (0xb3864c38, 0x4273, 0x58c5, 0x54, 0x5b, 0x8b, 0x36, 0x08, 0x34, 0x34, 0x71));
37
+
38
+ int main(int argc, char* argv[])
39
+ {
40
+ const ULONGLONG MyKeywordValue = 0x10;
41
+
42
+ TraceLoggingRegister(g_hProvider);
43
+
44
+ // Declare a local activity variable.
45
+ // Use the default (0 = none) for the activity's keyword.
46
+ // Use the default (5 = verbose) for the activity's level.
47
+ TraceLoggingActivity<g_hProvider> parentActivity;
48
+
49
+ // Write the activity's START event. Note that you must not specify keyword
50
+ // or level for START and STOP events because they always use the activity's
51
+ // keyword and level.
52
+ TraceLoggingWriteStart(
53
+ parentActivity,
54
+ "ParentActivity", // The name of the start event is used as the activity name.
55
+ TraceLoggingValue(argc, "SampleField1"));
56
+
57
+ {
58
+ // Declare a local (nested) activity variable, with explicit keyword and level:
59
+ TraceLoggingActivity<g_hProvider, MyKeywordValue, WINEVENT_LEVEL_ERROR> nestedActivity;
60
+
61
+ // Connect the nested activity to the parent:
62
+ nestedActivity.SetRelatedActivity(parentActivity);
63
+
64
+ // Write the activity's START event.
65
+ TraceLoggingWriteStart(nestedActivity, "NestedActivity");
66
+
67
+ // TraceLoggingWriteTagged writes an event that is tagged with an activity
68
+ // ID. Note that TraceLoggingWriteTagged is just like TraceLoggingWrite
69
+ // except that the first parameter is an activity (not a provider) and the
70
+ // resulting event is explicitly tagged with the activity ID. In particular,
71
+ // TraceLoggingWriteTagged does NOT use the activity's level and keyword --
72
+ // they are specified just as they would be for a TraceLoggingWrite event.
73
+ TraceLoggingWriteTagged(
74
+ nestedActivity,
75
+ "NestedActivityIdTaggedEvent",
76
+ TraceLoggingValue(argc, "SampleField2"),
77
+ TraceLoggingKeyword(MyKeywordValue));
78
+
79
+ // Write the activity's STOP event.
80
+ TraceLoggingWriteStop(nestedActivity, "NestedActivity");
81
+
82
+ // Note that if the activity is destroyed without being stopped, a default
83
+ // "ActivityStoppedAutomatically" event will be written by the destructor.
84
+ }
85
+
86
+ TraceLoggingWriteStop(parentActivity, "ParentActivity");
87
+
88
+ TraceLoggingUnregister(g_hProvider);
89
+ return 0;
90
+ }
91
+ */
92
+
93
+ #pragma region Public Interface
94
+
95
+ /*
96
+ Classes:
97
+
98
+ - TraceLoggingActivity: General purpose activity class.
99
+ - TraceLoggingThreadActivity: Automatic activity class. (Desktop apps only.)
100
+ - TraceLoggingThreadActivityIdSetter: Helper for controlling the thread-local
101
+ activity ID. (Desktop apps only.)
102
+
103
+ Macros:
104
+
105
+ - TraceLoggingWriteStart: Writes an activity START event.
106
+ - TraceLoggingWriteStop: Writes an activity STOP event.
107
+ - TraceLoggingWriteTagged: Writes an event explicitly tagged with an activity ID.
108
+ - TraceLoggingWriteTaggedIfStarted: TraceLoggingWriteTagged if the activity was
109
+ started.
110
+ - TraceLoggingFunction: Creates a TraceLoggingThreadActivity and writes a START
111
+ event with the current function's name. (Desktop apps only.)
112
+
113
+ Basic usage:
114
+
115
+ 1. Create an instance of TraceLoggingActivity or TraceLoggingThreadActivity.
116
+ 2. Call TraceLoggingWriteStart to write the activity's START event.
117
+ 3. Call TraceLoggingWriteTagged to write events associated with the activity.
118
+ 4. Call TraceLoggingWriteStop to write the activity's STOP event.
119
+ */
120
+
121
+ /*
122
+ TraceLoggingActivity implements general-purpose activity support. It supports
123
+ nesting via an explicit childActivity.SetRelatedActivity(parentActivity) method.
124
+ Events associated with the activity can then be written using
125
+ TraceLoggingWriteTagged.
126
+
127
+ Activities can be nested by calling childActivity.SetRelatedActivity(parentActivity)
128
+ before calling TraceLoggingWriteStart(childActivity, ...).
129
+
130
+ Use TraceLoggingWriteStart to generate a unique activity ID and write the START
131
+ event for the activity.
132
+
133
+ Use TraceLoggingWriteTagged to write events that are associated with the activity.
134
+
135
+ Use TraceLoggingWriteStop to write the STOP event for the activity.
136
+
137
+ If the activity is destroyed without being stopped, it will log a default STOP
138
+ event.
139
+ */
140
+ template<
141
+ TraceLoggingHProvider const& provider,
142
+ UINT64 keyword = 0, // defaults to 0 = none
143
+ UINT8 level = 5, // defaults to 5 = WINEVENT_LEVEL_VERBOSE
144
+ typename TlgReflectorTag = _TlgReflectorTag_Param0IsHProvider> // helps TlgReflector understand that this is a wrapper type
145
+ class TraceLoggingActivity;
146
+
147
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
148
+
149
+ /*
150
+ TraceLoggingThreadActivity implements automatic activities using a thread-local
151
+ CurrentActivityId variable. Each new activity is automatically nested within the
152
+ activity that previously set the CurrentActivityId variable, and all events
153
+ written using TraceLoggingWrite are automatically associated with the
154
+ CurrentActivityId. This automatic behavior can be convenient in some cases, but it
155
+ only works correctly when the activities nest precisely and do not cross thread
156
+ boundaries. In addition, TraceLoggingThreadActivity is not available on the
157
+ Windows Runtime (i.e. this class cannot be used for Windows Store or Windows Phone
158
+ apps).
159
+
160
+ PLEASE NOTE: use TraceLoggingThreadActivity only when you can guarantee that
161
+ lifetimes of all activities of this type on the thread fully nest in all cases, i.e.
162
+ a parent activity will not end before a child activity, even in error or exceptional
163
+ cases. Activities defined in function-local scopes typically meet this criteria.
164
+
165
+ Use TraceLoggingWriteStart to generate a unique activity ID and write the START
166
+ event for the activity.
167
+
168
+ Use TraceLoggingWrite to write events that are automatically associated with the
169
+ activity.
170
+
171
+ Use TraceLoggingWriteTagged to write events that are explicitly associated with the
172
+ activity.
173
+
174
+ Use TraceLoggingWriteStop to write the STOP event for the activity.
175
+
176
+ If the activity is destroyed without being stopped, it will log a default STOP
177
+ event.
178
+ */
179
+ template<
180
+ TraceLoggingHProvider const& provider,
181
+ UINT64 keyword = 0, // defaults to 0 = none
182
+ UINT8 level = 5, // defaults to 5 = WINEVENT_LEVEL_VERBOSE
183
+ typename TlgReflectorTag = _TlgReflectorTag_Param0IsHProvider> // helps TlgReflector understand that this is a wrapper type
184
+ class TraceLoggingThreadActivity;
185
+
186
+ /*
187
+ TraceLoggingThreadActivityIdSetter is a helper class that sets the thread-local
188
+ CurrentActivity variable during construction and saves the original value. It then
189
+ restores the original value during destruction. This class is not available on the
190
+ Windows Runtime (i.e. it cannot be used for Windows Store or Windows Phone apps).
191
+
192
+ As with thread activities, lifetime of an instance of this class should
193
+ be carefully managed to avoid imperfect nesting.
194
+ */
195
+ class TraceLoggingThreadActivityIdSetter;
196
+
197
+ #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
198
+
199
+ /*
200
+ Macro TraceLoggingWriteStart(activity, "EventName", args...):
201
+ Invoke this macro to start an activity and log the start event.
202
+
203
+ The event name must be a string literal (not a variable) and must not contain
204
+ any '\0' characters.
205
+
206
+ Each arg must be a wrapper macro such as TraceLoggingValue, TraceLoggingInt32,
207
+ etc.
208
+
209
+ Do not specify TraceLoggingKeyword or TraceLoggingLevel as args for this macro.
210
+ The START and STOP events always use the activity's keyword and level.
211
+ */
212
+ #define TraceLoggingWriteStart(activity, name, ...) \
213
+ __pragma(warning(push)) __pragma(warning(disable:4127)) \
214
+ do { \
215
+ _tlgActivityDecl(activity) \
216
+ static const UINT64 _tlgActivity_Keyword = _tlgActivityRef(activity).Keyword;\
217
+ static const UINT8 _tlgActivity_Level = _tlgActivityRef(activity).Level;\
218
+ static_assert( \
219
+ _tlgActivity_Keyword == (_tlgActivity_Keyword _tlg_FOREACH(_tlgKeywordVal, __VA_ARGS__)), \
220
+ "Do not use TraceLoggingKeyword in TraceLoggingWriteStart. Keywords for START events are " \
221
+ "specified in the activity type, e.g. TraceLoggingActivity<Provider,Keyword,Level>."); \
222
+ static_assert( \
223
+ _tlgActivity_Level == (_tlgActivity_Level _tlg_FOREACH(_tlgLevelVal, __VA_ARGS__)), \
224
+ "Do not use TraceLoggingLevel in TraceLoggingWriteStart. The Level for START events is " \
225
+ "specified in the activity type, e.g. TraceLoggingActivity<Provider,Keyword,Level>."); \
226
+ _tlgActivityRef(activity).zInternalStart(); \
227
+ _tlgActivityWriteStartStop(_tlg_IS_EMPTY(__VA_ARGS__), ( \
228
+ activity, \
229
+ (name), \
230
+ _tlgActivityRef(activity).Id(), \
231
+ _tlgActivityRef(activity).zInternalRelatedId(), \
232
+ 1 /* WINEVENT_OPCODE_START */, \
233
+ _tlgActivity_Keyword, \
234
+ _tlgActivity_Level, \
235
+ __VA_ARGS__)); \
236
+ } while(0) \
237
+ __pragma(warning(pop)) \
238
+
239
+ /*
240
+ Macro TraceLoggingWriteStop(activity, "EventName", args...):
241
+ Invoke this macro to stop an activity and log the stop event.
242
+
243
+ The event name must be a string literal (not a variable) and must not contain
244
+ any '\0' characters.
245
+
246
+ Each arg must be a wrapper macro such as TraceLoggingValue, TraceLoggingInt32,
247
+ etc.
248
+
249
+ Do not specify TraceLoggingKeyword or TraceLoggingLevel as args for this macro.
250
+ The START and STOP events always use the activity's keyword and level.
251
+
252
+ If an activity is started and is destroyed before it is stopped, a default
253
+ event will be logged from the destructor.
254
+ */
255
+ #define TraceLoggingWriteStop(activity, name, ...) \
256
+ __pragma(warning(push)) __pragma(warning(disable:4127)) \
257
+ do { \
258
+ _tlgActivityDecl(activity) \
259
+ static const UINT64 _tlgActivity_Keyword = _tlgActivityRef(activity).Keyword;\
260
+ static const UINT8 _tlgActivity_Level = _tlgActivityRef(activity).Level;\
261
+ static_assert( \
262
+ _tlgActivity_Keyword == (_tlgActivity_Keyword _tlg_FOREACH(_tlgKeywordVal, __VA_ARGS__)), \
263
+ "Do not use TraceLoggingKeyword in TraceLoggingWriteStop. Keywords for STOP events are " \
264
+ "specified in the activity type, e.g. TraceLoggingActivity<Provider,Keyword,Level>."); \
265
+ static_assert( \
266
+ _tlgActivity_Level == (_tlgActivity_Level _tlg_FOREACH(_tlgLevelVal, __VA_ARGS__)), \
267
+ "Do not use TraceLoggingLevel in TraceLoggingWriteStop. The Level for STOP events is " \
268
+ "specified in the activity type, e.g. TraceLoggingActivity<Provider,Keyword,Level>."); \
269
+ _tlgActivityRef(activity).zInternalStop(); \
270
+ _tlgActivityWriteStartStop(_tlg_IS_EMPTY(__VA_ARGS__), ( \
271
+ activity, \
272
+ (name), \
273
+ _tlgActivityRef(activity).Id(), \
274
+ NULL, \
275
+ 2 /* WINEVENT_OPCODE_STOP */,\
276
+ _tlgActivity_Keyword,\
277
+ _tlgActivity_Level,\
278
+ __VA_ARGS__)); \
279
+ } while(0) \
280
+ __pragma(warning(pop)) \
281
+
282
+ /*
283
+ Macro TraceLoggingWriteTagged(activity, "EventName", args...):
284
+ Invoke this macro to log an event that is explicitly tagged with the activity id
285
+ of the specified activity.
286
+
287
+ The event name must be a string literal (not a variable) and must not contain
288
+ any '\0' characters.
289
+
290
+ Each arg must be a wrapper macro such as TraceLoggingValue, TraceLoggingInt32,
291
+ etc.
292
+
293
+ Note that events written with this macro do NOT use the activity's keyword and
294
+ level. If the level is not specified via TraceLoggingLevel, the level will default
295
+ to verbose (5). If the keyword is not specified via TraceLoggingKeyword, the keyword
296
+ will default to none (0).
297
+ */
298
+ #define TraceLoggingWriteTagged(activity, name, ...) \
299
+ __pragma(warning(push)) __pragma(warning(disable:4127)) \
300
+ do { \
301
+ _tlgActivityDecl(activity) \
302
+ TraceLoggingWriteActivity( \
303
+ _tlgActivityRef(activity).Provider(), \
304
+ (name), \
305
+ _tlgActivityRef(activity).Id(), \
306
+ NULL, \
307
+ __VA_ARGS__); \
308
+ } while(0) \
309
+ __pragma(warning(pop)) \
310
+
311
+ /*
312
+ Macro TraceLoggingWriteTaggedIfStarted(activity, "EventName", args...):
313
+ Invoke this macro to log an event that is explicitly tagged with the activity id
314
+ of the specified activity. This macro logs the event only if the activity is
315
+ started.
316
+
317
+ The event name must be a string literal (not a variable) and must not contain
318
+ any '\0' characters.
319
+
320
+ Each arg must be a wrapper macro such as TraceLoggingValue, TraceLoggingInt32,
321
+ etc.
322
+
323
+ Note that events written with this macro do NOT use the activity's keyword and
324
+ level. If the level is not specified via TraceLoggingLevel, the level will default
325
+ to verbose (5). If the keyword is not specified via TraceLoggingKeyword, the keyword
326
+ will default to none (0).
327
+ */
328
+ #define TraceLoggingWriteTaggedIfStarted(activity, name, ...) \
329
+ __pragma(warning(push)) __pragma(warning(disable:4127)) \
330
+ do { \
331
+ _tlgActivityDecl(activity) \
332
+ if (_tlgActivityRef(activity).IsStarted()) { \
333
+ TraceLoggingWriteActivity( \
334
+ _tlgActivityRef(activity).Provider(), \
335
+ (name), \
336
+ _tlgActivityRef(activity).Id(), \
337
+ NULL, \
338
+ __VA_ARGS__); \
339
+ } \
340
+ } while(0) \
341
+ __pragma(warning(pop)) \
342
+
343
+ /*
344
+ Macro TraceLoggingFunction(hProvider, args...):
345
+ Invoke this macro at the beginning of a function to define an activity and
346
+ start it. This will log a start event with the name of the function. When
347
+ the function exits, the activity class will log an automatically-generated
348
+ stop event.
349
+
350
+ Each arg must be a wrapper macro such as TraceLoggingValue, TraceLoggingInt32,
351
+ etc.
352
+
353
+ Since this macro uses a thread activity, please read the description for
354
+ TraceLoggingThreadActivity and ensure the function call or other thread
355
+ activities started within perfectly nest within each other even in cases of
356
+ errors and exceptions.
357
+ */
358
+ #define TraceLoggingFunction(providerHandle, ...)\
359
+ TraceLoggingThreadActivity< \
360
+ providerHandle, \
361
+ 0 _tlg_FOREACH(_tlgKeywordVal, __VA_ARGS__), \
362
+ 5 _tlg_FOREACH(_tlgLevelVal, __VA_ARGS__)> \
363
+ _tlgFnActivity; \
364
+ TraceLoggingWriteStart(_tlgFnActivity, _tlgThisFunctionName, __VA_ARGS__)
365
+
366
+ #pragma endregion
367
+
368
+ #pragma region Implementation
369
+
370
+ /*
371
+ Private implementation macros. For internal use only.
372
+ Avoid IntelliSense errors about __FUNCTION__ only being valid within a function.
373
+ */
374
+ #ifdef __INTELLISENSE__
375
+ #define _tlgThisFunctionName "ThisFunctionName"
376
+ #else
377
+ #define _tlgThisFunctionName __FUNCTION__
378
+ #endif
379
+
380
+ /*
381
+ Private implementation macros. For internal use only.
382
+ If the auto keyword is available, we can avoid referencing the activity
383
+ parameter more than once.
384
+ */
385
+ #if defined(_MSC_VER) && (_MSC_VER >= 1600)
386
+ #define _tlgActivityDecl(activity) auto& _tlgActivity(activity);
387
+ #define _tlgActivityRef(activity) _tlgActivity
388
+ #else
389
+ #define _tlgActivityDecl(activity)
390
+ #define _tlgActivityRef(activity) (activity)
391
+ #endif
392
+
393
+ /*
394
+ Private implementation macros. For internal use only.
395
+ Avoid extra comma when invoking TraceLoggingWriteActivity.
396
+ */
397
+ #define _tlgActivityWriteStartStop(is_empty, args) \
398
+ _tlg_PASTE2(_tlgActivityWriteStartStop_imp, is_empty) args
399
+ #define _tlgActivityWriteStartStop_imp0(activity, eventName, pActivityId, pRelatedId, opcode, keyword, level, ...) \
400
+ TraceLoggingWriteActivity( \
401
+ _tlgActivityRef(activity).Provider(), \
402
+ eventName, \
403
+ pActivityId, \
404
+ pRelatedId, \
405
+ TraceLoggingOpcode(opcode), \
406
+ TraceLoggingKeyword(keyword), \
407
+ TraceLoggingLevel(level), \
408
+ TraceLoggingDescription("~^" _tlg_LSTRINGIZE(activity) L"^~") \
409
+ , __VA_ARGS__ \
410
+ )
411
+ #define _tlgActivityWriteStartStop_imp1(activity, eventName, pActivityId, pRelatedId, opcode, keyword, level, ...) \
412
+ TraceLoggingWriteActivity( \
413
+ _tlgActivityRef(activity).Provider(), \
414
+ eventName, \
415
+ pActivityId, \
416
+ pRelatedId, \
417
+ TraceLoggingOpcode(opcode), \
418
+ TraceLoggingKeyword(keyword), \
419
+ TraceLoggingLevel(level), \
420
+ TraceLoggingDescription("~^" _tlg_LSTRINGIZE(activity) L"^~") \
421
+ )
422
+
423
+ /*
424
+ Private implementation function. For internal use only.
425
+ Separate function to minimize code bloat by consolidating the auto-stop events.
426
+ */
427
+ template<UINT64 keyword, UINT8 level>
428
+ void _tlgWriteActivityAutoStop(
429
+ TraceLoggingHProvider provider,
430
+ _In_ GUID const* pActivityId)
431
+ {
432
+ TraceLoggingWriteActivity(
433
+ provider,
434
+ "ActivityStoppedAutomatically",
435
+ pActivityId,
436
+ NULL,
437
+ TraceLoggingOpcode(2 /* WINEVENT_OPCODE_STOP */),
438
+ TraceLoggingKeyword(keyword),
439
+ TraceLoggingLevel(level));
440
+ }
441
+
442
+ /*
443
+ Private implementation function. For internal use only.
444
+ */
445
+ inline bool _tlgGuidIsZero(GUID const& g)
446
+ {
447
+ INT32 const* p = reinterpret_cast<INT32 const*>(&g);
448
+ return
449
+ p[0] == 0 &&
450
+ p[1] == 0 &&
451
+ p[2] == 0 &&
452
+ p[3] == 0;
453
+ }
454
+
455
+ /*
456
+ Private implementation function. For internal use only.
457
+ */
458
+ inline bool _tlgGuidEqual(GUID const& g1, GUID const& g2)
459
+ {
460
+ INT32 const* p1 = reinterpret_cast<INT32 const*>(&g1);
461
+ INT32 const* p2 = reinterpret_cast<INT32 const*>(&g2);
462
+ return
463
+ p1[0] == p2[0] &&
464
+ p1[1] == p2[1] &&
465
+ p1[2] == p2[2] &&
466
+ p1[3] == p2[3];
467
+ }
468
+
469
+ /*
470
+ Private implementation class. For internal use only.
471
+ */
472
+ template<
473
+ typename DerivedTy, // DerivedTy must define Provider(), OnStarted(), OnStopped().
474
+ UINT64 keyword,
475
+ UINT8 level>
476
+ class _TlgActivityBase
477
+ {
478
+ _TlgActivityBase(const _TlgActivityBase&); // = delete
479
+ _TlgActivityBase& operator=(const _TlgActivityBase&); // = delete
480
+
481
+ void Reset()
482
+ {
483
+ m_State = TlgStateCreated;
484
+ m_HasRelatedId = false;
485
+ }
486
+
487
+ enum TlgState
488
+ {
489
+ TlgStateCreated,
490
+ TlgStateStarted,
491
+ TlgStateStopped,
492
+ TlgStateDestroyed
493
+ };
494
+
495
+ TlgState m_State;
496
+ bool m_HasRelatedId;
497
+ GUID m_Id;
498
+ GUID m_CapturedRelatedId;
499
+
500
+ protected:
501
+
502
+ ~_TlgActivityBase()
503
+ {
504
+ if (m_State == TlgStateStarted)
505
+ {
506
+ zInternalStop();
507
+ _tlgWriteActivityAutoStop<keyword, level>(
508
+ static_cast<DerivedTy*>(this)->Provider(),
509
+ &m_Id);
510
+ }
511
+
512
+ m_State = TlgStateDestroyed;
513
+ }
514
+
515
+ _TlgActivityBase()
516
+ {
517
+ Reset();
518
+ }
519
+
520
+ #if defined(_MSC_VER) && (_MSC_VER >= 1600)
521
+
522
+ _TlgActivityBase(_TlgActivityBase&& rhs)
523
+ {
524
+ Reset();
525
+ *this = static_cast<_TlgActivityBase&&>(rhs);
526
+ }
527
+
528
+ _TlgActivityBase& operator=(_TlgActivityBase&& rhs)
529
+ {
530
+ _tlg_ASSERT(m_State == TlgStateCreated, "Move-assign to newly created activities only");
531
+ m_State = rhs.m_State;
532
+ m_HasRelatedId = rhs.m_HasRelatedId;
533
+ m_Id = rhs.m_Id;
534
+ m_CapturedRelatedId = rhs.m_CapturedRelatedId;
535
+ rhs.Reset();
536
+ return *this;
537
+ }
538
+
539
+ #endif // _MSC_VER >= 1600
540
+
541
+ /*
542
+ Should be called during activity setup (before activity starts).
543
+ If this is used, do NOT use PushThreadActivityId or PopThreadActivityId.
544
+ */
545
+ void SetRelatedId(const GUID& relatedActivityId)
546
+ {
547
+ _tlg_ASSERT(m_State == TlgStateCreated, "_TlgActivityBase::SetRelatedId called from invalid state.");
548
+ _tlg_ASSERT(!m_HasRelatedId, "_TlgActivityBase::RelatedActivity was already set.");
549
+ m_CapturedRelatedId = relatedActivityId;
550
+ m_HasRelatedId = true;
551
+ }
552
+
553
+ /*
554
+ Should be called at an appropriate point in activity setup, after SetRelatedId() is called.
555
+ Returns the related activity Id, if there is one.
556
+ Returns NULL if the related activity Id has not been set or if it is GUID_NULL.
557
+ */
558
+ _Ret_opt_ const GUID* GetRelatedId() const
559
+ {
560
+ return m_HasRelatedId && !_tlgGuidIsZero(m_CapturedRelatedId) ? &m_CapturedRelatedId : NULL;
561
+ }
562
+
563
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
564
+
565
+ /*
566
+ Should be called from OnStarted if applicable.
567
+ If this is used, do NOT use SetRelatedId.
568
+ */
569
+ void PushThreadActivityId()
570
+ {
571
+ _tlg_ASSERT(m_State == TlgStateCreated, "_TlgActivityBase::PushThreadActivityId called from invalid state.");
572
+ _tlg_ASSERT(!m_HasRelatedId, "_TlgActivityBase::RelatedActivity was already set.");
573
+ m_CapturedRelatedId = m_Id;
574
+ ::EventActivityIdControl(EVENT_ACTIVITY_CTRL_GET_SET_ID, &m_CapturedRelatedId);
575
+ m_HasRelatedId = true;
576
+ }
577
+
578
+ /*
579
+ Should be called from OnStopped if applicable.
580
+ If this is used, do NOT use SetRelatedId.
581
+ */
582
+ void PopThreadActivityId()
583
+ {
584
+ _tlg_ASSERT(m_State == TlgStateStarted, "_TlgActivityBase::PopThreadActivityId called from invalid state.");
585
+ if (m_HasRelatedId)
586
+ {
587
+ ::EventActivityIdControl(EVENT_ACTIVITY_CTRL_GET_SET_ID, &m_CapturedRelatedId);
588
+
589
+ /*
590
+ If this assertion fails, it means that your thread activity's ID was corrupted.
591
+ For example:
592
+
593
+ TraceLoggingWriteStart(activity1, ...); // Saves activity1.SavedId = thread.ActivityId, sets thread.ActivityId = activity1.Id().
594
+ DoWork();
595
+ TraceLoggingWrite(...); // Uses thread.ActivityId.
596
+ TraceLoggingWriteStop(activity1, ...); // Verifies that thread.ActivityId == activity1.Id(), restores thread.ActivityId = activity1.SavedId.
597
+
598
+ If DoWork() leaves thread.ActivityId unchanged, or if it properly restores
599
+ thread.ActivityId to its original value before returning, then everything
600
+ will work as expected. If DoWork changes thread.ActivityId to its own value
601
+ and does not restore it before returning, the TraceLoggingWrite call will
602
+ use the activity ID set by DoWork instead of using activity1.Id(). The
603
+ assertion fires to warn you about this situation.
604
+
605
+ The following are possible solutions for this issue:
606
+
607
+ 1. If you can change the DoWork() code: Fix the DoWork() code to correctly
608
+ restore the activity ID before returning. Note that the activity ID should
609
+ be restored even in cases where DoWork() exits via exception.
610
+ 2. If you cannot change the DoWork() code: Save the activity ID before
611
+ calling DoWork(), then restore the activity ID after DoWork() returns. You
612
+ can use the EventActivityIdControl function to save and restore the
613
+ activity ID.
614
+ 3. Use TraceLoggingActivity instead of TraceLoggingThreadActivity so that you
615
+ are not impacted by code that incorrectly manages thread.ActivityId. In
616
+ this case, you will also need to switch from TraceLoggingWrite to
617
+ TraceLoggingWriteTagged.
618
+
619
+ Example of solution 2:
620
+
621
+ GUID savedActivityId;
622
+ EventActivityIdControl(EVENT_ACTIVITY_CTRL_GET_ID, &savedActivityId);
623
+ CodeThatDoesNotRestoreActivityId();
624
+ EventActivityIdControl(EVENT_ACTIVITY_CTRL_SET_ID, &savedActivityId);
625
+
626
+ Note that this example solution is sufficient only in cases where
627
+ the code in question does not throw exceptions.
628
+ */
629
+ _tlg_ASSERT(_tlgGuidEqual(m_Id, m_CapturedRelatedId), "_TlgActivityBase: current id does not match set id!");
630
+ }
631
+ }
632
+
633
+ #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
634
+
635
+ public:
636
+
637
+ /*
638
+ The activity's Keyword, which is used as the keyword for the START and STOP events.
639
+ */
640
+ static const UINT64 Keyword = keyword;
641
+
642
+ /*
643
+ The activity's Level, which is used as the level for the START and STOP events.
644
+ */
645
+ static const UINT8 Level = level;
646
+
647
+ /*
648
+ Returns the activity Id.
649
+ */
650
+ _Ret_ const GUID* Id() const
651
+ {
652
+ _tlg_ASSERT(m_State >= TlgStateStarted, "TraceLoggingActivity::Id() called from invalid state");
653
+ _tlg_ASSERT(m_State != TlgStateDestroyed, "TraceLoggingActivity::Id() called after destruction");
654
+ return &m_Id;
655
+ }
656
+
657
+ /*
658
+ Returns true if the activity has been started and has not yet been stopped.
659
+ */
660
+ bool IsStarted() const
661
+ {
662
+ return m_State == TlgStateStarted;
663
+ }
664
+
665
+ /*
666
+ Private implementation method. For internal use only.
667
+ Called by TraceLoggingWriteStart. Do not call directly.
668
+ Returns the related activity Id, if there is one.
669
+ Returns NULL if the related activity Id has not been set or if it is GUID_NULL.
670
+ */
671
+ _Ret_opt_ const GUID* zInternalRelatedId() const
672
+ {
673
+ _tlg_ASSERT(m_State == TlgStateStarted, "TraceLoggingWriteStart race condition");
674
+ return GetRelatedId();
675
+ }
676
+
677
+ /*
678
+ Private implementation method. For internal use only.
679
+ Called by TraceLoggingWriteStart. Do not call directly.
680
+ */
681
+ void zInternalStart()
682
+ {
683
+ _tlg_ASSERT(m_State == TlgStateCreated, "TraceLoggingWriteStart called from invalid state.");
684
+
685
+ DerivedTy* pDerived = static_cast<DerivedTy*>(this);
686
+ if (TraceLoggingProviderEnabled(pDerived->Provider(), level, keyword))
687
+ {
688
+ CreateActivityId(0, pDerived, m_Id);
689
+ pDerived->OnStarted();
690
+ }
691
+ else
692
+ {
693
+ // Zero the activity id in case we end up logging the stop.
694
+ ZeroMemory(&m_Id, sizeof(m_Id));
695
+ }
696
+
697
+ m_State = TlgStateStarted;
698
+ }
699
+
700
+ /*
701
+ Private implementation method. For internal use only.
702
+ Called by TraceLoggingWriteStop. Do not call directly.
703
+ */
704
+ void zInternalStop()
705
+ {
706
+ _tlg_ASSERT(m_State == TlgStateStarted, "TraceLoggingWriteStop called from invalid state");
707
+
708
+ DerivedTy* pDerived = static_cast<DerivedTy*>(this);
709
+ pDerived->OnStopped();
710
+
711
+ m_State = TlgStateStopped;
712
+ }
713
+
714
+ private:
715
+ // SFINAE dispatching on presence of DerivedTy::CreateActivityId
716
+ template<typename _DerivedTy>
717
+ static auto CreateActivityId(int, _In_ _DerivedTy* Derived, _Out_ GUID& ChildActivityId) ->
718
+ decltype(Derived->CreateActivityId(ChildActivityId), void(0))
719
+ {
720
+ Derived->CreateActivityId(ChildActivityId);
721
+ }
722
+
723
+ template<typename _DerivedTy>
724
+ static auto CreateActivityId(long, _In_ _DerivedTy* Derived, _Out_ GUID& ChildActivityId) ->
725
+ void
726
+ {
727
+ (void)Derived;
728
+ ::EventActivityIdControl(EVENT_ACTIVITY_CTRL_CREATE_ID, &ChildActivityId);
729
+ }
730
+ };
731
+
732
+ template<
733
+ TraceLoggingHProvider const& provider,
734
+ UINT64 keyword,
735
+ UINT8 level,
736
+ typename TlgReflectorTag>
737
+ class TraceLoggingActivity
738
+ : public _TlgActivityBase<TraceLoggingActivity<provider, keyword, level, TlgReflectorTag>, keyword, level>
739
+ {
740
+ typedef
741
+ _TlgActivityBase<TraceLoggingActivity<provider, keyword, level, TlgReflectorTag>, keyword, level>
742
+ BaseTy;
743
+ friend BaseTy;
744
+
745
+ void OnStarted()
746
+ {
747
+ }
748
+
749
+ void OnStopped()
750
+ {
751
+ }
752
+
753
+ public:
754
+
755
+ TraceLoggingActivity()
756
+ {
757
+ }
758
+
759
+ #if defined(_MSC_VER) && (_MSC_VER >= 1600)
760
+
761
+ TraceLoggingActivity(TraceLoggingActivity&& rhs)
762
+ : BaseTy(static_cast<TraceLoggingActivity&&>(rhs))
763
+ {
764
+ }
765
+
766
+ TraceLoggingActivity& operator=(TraceLoggingActivity&& rhs)
767
+ {
768
+ BaseTy::operator=(static_cast<TraceLoggingActivity&&>(rhs));
769
+ return *this;
770
+ }
771
+
772
+ #endif // _MSC_VER >= 1600
773
+
774
+ /*
775
+ Returns a handle to the TraceLogging provider associated with this activity.
776
+ */
777
+ TraceLoggingHProvider Provider() const
778
+ {
779
+ return provider;
780
+ }
781
+
782
+ /*
783
+ Sets the related (parent) activity.
784
+ May only be called once. Must be called before starting the activity.
785
+ */
786
+ template<typename ActivityTy>
787
+ void SetRelatedActivity(_In_ const ActivityTy& relatedActivity)
788
+ {
789
+ BaseTy::SetRelatedId(*relatedActivity.Id());
790
+ }
791
+
792
+ /*
793
+ Sets the related (parent) activity.
794
+ May only be called once. Must be called before starting the activity.
795
+ */
796
+ void SetRelatedActivityId(_In_ const GUID& relatedActivityId)
797
+ {
798
+ BaseTy::SetRelatedId(relatedActivityId);
799
+ }
800
+
801
+ /*
802
+ Sets the related (parent) activity.
803
+ May only be called once. Must be called before starting the activity.
804
+ */
805
+ void SetRelatedActivityId(_In_ const GUID* relatedActivityId)
806
+ {
807
+ _tlg_ASSERT(relatedActivityId != NULL, "TraceLoggingActivity SetRelatedActivity called with NULL id.");
808
+ BaseTy::SetRelatedId(*relatedActivityId);
809
+ }
810
+ };
811
+
812
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
813
+
814
+ template<
815
+ TraceLoggingHProvider const& provider,
816
+ UINT64 keyword,
817
+ UINT8 level,
818
+ typename TlgReflectorTag>
819
+ class TraceLoggingThreadActivity
820
+ : public _TlgActivityBase<TraceLoggingThreadActivity<provider, keyword, level, TlgReflectorTag>, keyword, level>
821
+ {
822
+ typedef
823
+ _TlgActivityBase<TraceLoggingThreadActivity<provider, keyword, level, TlgReflectorTag>, keyword, level>
824
+ BaseTy;
825
+ friend BaseTy;
826
+
827
+ void OnStarted()
828
+ {
829
+ BaseTy::PushThreadActivityId();
830
+ }
831
+
832
+ void OnStopped()
833
+ {
834
+ BaseTy::PopThreadActivityId();
835
+ }
836
+
837
+ public:
838
+
839
+ TraceLoggingThreadActivity()
840
+ {
841
+ }
842
+
843
+ #if defined(_MSC_VER) && (_MSC_VER >= 1600)
844
+
845
+ TraceLoggingThreadActivity(TraceLoggingThreadActivity&& rhs)
846
+ : BaseTy(static_cast<TraceLoggingThreadActivity&&>(rhs))
847
+ {
848
+ }
849
+
850
+ TraceLoggingThreadActivity& operator=(TraceLoggingThreadActivity&& rhs)
851
+ {
852
+ BaseTy::operator=(static_cast<TraceLoggingThreadActivity&&>(rhs));
853
+ return *this;
854
+ }
855
+
856
+ #endif // _MSC_VER >= 1600
857
+
858
+ /*
859
+ Returns a handle to the TraceLogging provider associated with this activity.
860
+ */
861
+ TraceLoggingHProvider Provider() const
862
+ {
863
+ return provider;
864
+ }
865
+ };
866
+
867
+ class TraceLoggingThreadActivityIdSetter
868
+ {
869
+ GUID m_ActivityId;
870
+ GUID m_SavedActivityId;
871
+
872
+ TraceLoggingThreadActivityIdSetter(const TraceLoggingThreadActivityIdSetter&); // = delete
873
+ const TraceLoggingThreadActivityIdSetter& operator=(const TraceLoggingThreadActivityIdSetter&); // = delete
874
+
875
+ public:
876
+
877
+ explicit TraceLoggingThreadActivityIdSetter(_In_ const GUID& activityId)
878
+ : m_ActivityId(activityId)
879
+ , m_SavedActivityId(activityId)
880
+ {
881
+ ::EventActivityIdControl(EVENT_ACTIVITY_CTRL_GET_SET_ID, &m_SavedActivityId);
882
+ }
883
+
884
+ explicit TraceLoggingThreadActivityIdSetter(_In_ const GUID* activityId)
885
+ : m_ActivityId(*activityId)
886
+ , m_SavedActivityId(*activityId)
887
+ {
888
+ ::EventActivityIdControl(EVENT_ACTIVITY_CTRL_GET_SET_ID, &m_SavedActivityId);
889
+ }
890
+
891
+ ~TraceLoggingThreadActivityIdSetter()
892
+ {
893
+ ::EventActivityIdControl(EVENT_ACTIVITY_CTRL_GET_SET_ID, &m_SavedActivityId);
894
+ _tlg_ASSERT(_tlgGuidEqual(m_ActivityId, m_SavedActivityId), "TraceLoggingThreadActivityIdSetter current id does not match set id!");
895
+ }
896
+ };
897
+
898
+ #endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
899
+
900
+ #pragma endregion
901
+
902
+ #endif // RC_INVOKED
msvc/Windows Kits/10/Include/10.0.26100.0/shared/TraceLoggingProvider.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/afunix.h ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ afunix.h
8
+
9
+ Abstract:
10
+
11
+ This file contains the definitions for the AF_UNIX socket address family.
12
+
13
+ --*/
14
+
15
+ #ifndef _AFUNIX_
16
+ #define _AFUNIX_
17
+
18
+ #pragma once
19
+
20
+ #define UNIX_PATH_MAX 108
21
+
22
+ typedef struct sockaddr_un
23
+ {
24
+ ADDRESS_FAMILY sun_family; /* AF_UNIX */
25
+ char sun_path[UNIX_PATH_MAX]; /* pathname */
26
+ } SOCKADDR_UN, *PSOCKADDR_UN;
27
+
28
+ #define SIO_AF_UNIX_GETPEERPID _WSAIOR(IOC_VENDOR, 256) // Returns ULONG PID of the connected peer process
29
+ #define SIO_AF_UNIX_SETBINDPARENTPATH _WSAIOW(IOC_VENDOR, 257) // Set the parent path for bind calls
30
+ #define SIO_AF_UNIX_SETCONNPARENTPATH _WSAIOW(IOC_VENDOR, 258) // Set the parent path for connect calls
31
+ // NOTE: setting the parent path is not thread safe.
32
+
33
+ #endif /* _AFUNIX_ */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/apdevpkey.h ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*++
3
+
4
+ Copyright (c) Microsoft Corporation. All rights reserved.
5
+
6
+ Module Name:
7
+
8
+ apdevpkey.h
9
+
10
+ Abstract:
11
+
12
+ Defines Plug and Play Device property keys used for AutoPlay behavior.
13
+
14
+ Environment:
15
+
16
+ User and Kernel modes.
17
+
18
+
19
+ --*/
20
+
21
+ #include <winapifamily.h>
22
+
23
+ #pragma region Desktop Family
24
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
25
+
26
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
27
+ #include "devpropdef.h"
28
+
29
+ //
30
+ // Indicate that AutoPlay should not be displayed for this device interface.
31
+ //
32
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Autoplay_Silent, 0x434dd28f, 0x9e75, 0x450a, 0x9a, 0xb9, 0xff, 0x61, 0xe6, 0x18, 0xba, 0xd0, 2); // DEVPROP_TYPE_BOOLEAN
33
+ #endif
34
+
35
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
36
+ #pragma endregion
msvc/Windows Kits/10/Include/10.0.26100.0/shared/apiset.h ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) 2008 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ apiset.h
8
+
9
+ Abstract:
10
+
11
+ This module contains definitions related to the management of API namespaces.
12
+
13
+ Author:
14
+
15
+ Arun Kishan (arunki) 14-Sep-2008
16
+
17
+ --*/
18
+
19
+ #ifndef _API_SET_H_
20
+ #define _API_SET_H_
21
+
22
+ //
23
+ // API set interface definitions.
24
+ //
25
+
26
+ #define API_SET_OVERRIDE(X) X##Implementation
27
+ #define API_SET_LEGACY_OVERRIDE_DEF(X) X = API_SET_OVERRIDE(X)
28
+ #define API_SET_OVERRIDE_DEF(X) API_SET_LEGACY_OVERRIDE_DEF(X) PRIVATE
29
+
30
+ #ifdef _M_HYBRID_X86_ARM64
31
+
32
+ #define API_SET_CHPE_GUEST X86
33
+
34
+ #else
35
+
36
+ #define API_SET_CHPE_GUEST
37
+
38
+ #endif
39
+
40
+ #undef API_SET
41
+ #undef API_SET_DIR
42
+ #undef API_SET_BY_ORDINAL
43
+ #undef API_SET_BY_ORDINAL_DIR
44
+ #undef API_SET_WITH_OPTIONAL_ORDINAL
45
+ #undef API_SET_WITH_OPTIONAL_ORDINAL_DIR
46
+
47
+ #undef API_SET_LEGACY
48
+ #undef API_SET_LEGACY_DIR
49
+ #undef API_SET_LEGACY_BY_ORDINAL
50
+ #undef API_SET_LEGACY_BY_ORDINAL_DIR
51
+ #undef API_SET_LEGACY_WITH_OPTIONAL_ORDINAL
52
+ #undef API_SET_LEGACY_WITH_OPTIONAL_ORDINAL_DIR
53
+
54
+
55
+ #ifdef _API_SET_HOST
56
+ // This section is intended for hosting contracts. Any legacy host definitions are ignored.
57
+
58
+ #undef API_SET_LIBRARY
59
+
60
+ #define API_SET_LIBRARY(X)
61
+
62
+ #define API_SET(X) X PRIVATE
63
+ #define API_SET_DIR(X,DIR) X DIR PRIVATE
64
+ #define API_SET_BY_ORDINAL(X,O,PO) X @##O NONAME PRIVATE
65
+ #define API_SET_BY_ORDINAL_DIR(X,O,PO,DIR) X @##O NONAME DIR PRIVATE
66
+ #define API_SET_WITH_OPTIONAL_ORDINAL(X,O,PO) X @##O PRIVATE
67
+ #define API_SET_WITH_OPTIONAL_ORDINAL_DIR(X,O,PO,DIR) X @##O DIR PRIVATE
68
+
69
+ #define API_SET_LEGACY(X,L) X PRIVATE
70
+ #define API_SET_LEGACY_DIR(X,L,DIR) X DIR PRIVATE
71
+ #define API_SET_LEGACY_BY_ORDINAL(X,L,O,PO) X @##O NONAME PRIVATE
72
+ #define API_SET_LEGACY_BY_ORDINAL_DIR(X,L,O,PO,DIR) X @##O NONAME DIR PRIVATE
73
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL(X,L,O,PO) X @##O PRIVATE
74
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL_DIR(X,L,O,PO,DIR) X @##O DIR PRIVATE
75
+
76
+ #else
77
+
78
+ #if defined(_API_SET_LEGACY_TARGET)
79
+ // This section is intended for "classic apiset forwarders" that are forwarding back to a legacy host.
80
+ // In this section, the definition for _API_SET_LEGACY_TARGET is taken as the default legacy host for the
81
+ // entire contract. But any APIs which specify LegacyHost directly will override this definition.
82
+
83
+ #define API_SET(X) X = _API_SET_LEGACY_TARGET##.##X
84
+ #define API_SET_DIR(X,DIR) X = _API_SET_LEGACY_TARGET##.##X DIR
85
+ #define API_SET_BY_ORDINAL(X,O,PO) X = _API_SET_LEGACY_TARGET##.##PO @##O NONAME
86
+ #define API_SET_BY_ORDINAL_DIR(X,O,PO,DIR) X = _API_SET_LEGACY_TARGET##.##PO @##O NONAME DIR
87
+ #define API_SET_WITH_OPTIONAL_ORDINAL(X,O,PO) X = _API_SET_LEGACY_TARGET##.##PO @##O
88
+ #define API_SET_WITH_OPTIONAL_ORDINAL_DIR(X,O,PO,DIR) X = _API_SET_LEGACY_TARGET##.##PO @##O DIR
89
+
90
+ #define API_SET_LEGACY(X,L) X = L##.##X
91
+ #define API_SET_LEGACY_DIR(X,L,DIR) X = L##.##X DIR
92
+ #define API_SET_LEGACY_BY_ORDINAL(X,L,O,PO) X = L##.##PO @##O NONAME
93
+ #define API_SET_LEGACY_BY_ORDINAL_DIR(X,L,O,PO,DIR) X = L##.##PO @##O NONAME DIR
94
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL(X,L,O,PO) X = L##.##PO @##O
95
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL_DIR(X,L,O,PO,DIR) X = L##.##PO @##O DIR
96
+
97
+ #elif defined(_API_SET_FORWARDER_TARGET)
98
+ // This section is intended for "reverse forwarders" that are forwarding to an explicit apiset name.
99
+ // Any legacy targets are ignored.
100
+ #define API_SET(X) X = _API_SET_FORWARDER_TARGET##.##X
101
+ #define API_SET_DIR(X,DIR) X = _API_SET_FORWARDER_TARGET##.##X DIR
102
+ #define API_SET_BY_ORDINAL(X,O,PO) X = _API_SET_FORWARDER_TARGET##.##PO @##O NONAME
103
+ #define API_SET_BY_ORDINAL_DIR(X,O,PO,DIR) X = _API_SET_FORWARDER_TARGET##.##PO @##O NONAME DIR
104
+ #define API_SET_WITH_OPTIONAL_ORDINAL(X,O,PO) X = _API_SET_FORWARDER_TARGET##.##PO @##O
105
+ #define API_SET_WITH_OPTIONAL_ORDINAL_DIR(X,O,PO,DIR) X = _API_SET_FORWARDER_TARGET##.##PO @##O DIR
106
+
107
+ #define API_SET_LEGACY(X,L) X = _API_SET_FORWARDER_TARGET##.##X
108
+ #define API_SET_LEGACY_DIR(X,L,DIR) X = _API_SET_FORWARDER_TARGET##.##X DIR
109
+ #define API_SET_LEGACY_BY_ORDINAL(X,L,O,PO) X = _API_SET_FORWARDER_TARGET##.##PO @##O NONAME
110
+ #define API_SET_LEGACY_BY_ORDINAL_DIR(X,L,O,PO,DIR) X = _API_SET_FORWARDER_TARGET##.##PO @##O NONAME DIR
111
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL(X,L,O,PO) X = _API_SET_FORWARDER_TARGET##.##PO @##O
112
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL_DIR(X,L,O,PO,DIR) X = _API_SET_FORWARDER_TARGET##.##PO @##O DIR
113
+
114
+ #else
115
+ // This section is intended for internal contract generation to build artifacts that model the contract without forwarding.
116
+
117
+ #define API_SET(X) X
118
+ #define API_SET_DIR(X,DIR) X DIR
119
+ #define API_SET_BY_ORDINAL(X,O,PO) X @##O NONAME
120
+ #define API_SET_BY_ORDINAL_DIR(X,O,PO,DIR) X @##O NONAME DIR
121
+ #define API_SET_WITH_OPTIONAL_ORDINAL(X,O,PO) X @##O
122
+ #define API_SET_WITH_OPTIONAL_ORDINAL_DIR(X,O,PO,DIR) X @##O DIR
123
+
124
+ #define API_SET_LEGACY(X,L) X
125
+ #define API_SET_LEGACY_DIR(X,L,DIR) X DIR
126
+ #define API_SET_LEGACY_BY_ORDINAL(X,L,O,PO) X @##O NONAME
127
+ #define API_SET_LEGACY_BY_ORDINAL_DIR(X,L,O,PO,DIR) X @##O NONAME DIR
128
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL(X,L,O,PO) X @##O
129
+ #define API_SET_LEGACY_WITH_OPTIONAL_ORDINAL_DIR(X,L,O,PO,DIR) X @##O DIR
130
+
131
+ #endif // _API_SET_LEGACY_TARGET, _API_SET_FORWARDER_TARGET
132
+
133
+ #define API_SET_LIBRARY(X) LIBRARY X
134
+
135
+ #endif // _API_SET_HOST
136
+
137
+ #endif // _API_SET_H_
msvc/Windows Kits/10/Include/10.0.26100.0/shared/apisetcconv.h ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /************************************************************************
2
+ * *
3
+ * apisetcconv.h -- Contains Win32 Calling Conventions for APISETs *
4
+ * that were a part of the old legacy APIs *
5
+ * Copyright (c) Microsoft Corp. All rights reserved. *
6
+ * *
7
+ ************************************************************************/
8
+ #ifndef _APISETCCONV_
9
+ #define _APISETCCONV_
10
+
11
+
12
+ #if !defined(WINADVAPI)
13
+ #if !defined(_ADVAPI32_)
14
+ #define WINADVAPI DECLSPEC_IMPORT
15
+ #else
16
+ #define WINADVAPI
17
+ #endif
18
+ #endif
19
+
20
+ #if !defined(WINBASEAPI)
21
+ #if !defined(_KERNEL32_)
22
+ #define WINBASEAPI DECLSPEC_IMPORT
23
+ #else
24
+ #define WINBASEAPI
25
+ #endif
26
+ #endif
27
+
28
+ #if !defined(ZAWPROXYAPI)
29
+ #if !defined(_ZAWPROXY_)
30
+ #define ZAWPROXYAPI DECLSPEC_IMPORT
31
+ #else
32
+ #define ZAWPROXYAPI
33
+ #endif
34
+ #endif
35
+
36
+ #if !defined(WINUSERAPI)
37
+ #if !defined(_USER32_)
38
+ #define WINUSERAPI DECLSPEC_IMPORT
39
+ #define WINABLEAPI DECLSPEC_IMPORT
40
+ #else
41
+ #define WINUSERAPI
42
+ #define WINABLEAPI
43
+ #endif
44
+ #endif
45
+
46
+ #if !defined(WINABLEAPI)
47
+ #if !defined(_USER32_)
48
+ #define WINABLEAPI DECLSPEC_IMPORT
49
+ #else
50
+ #define WINABLEAPI
51
+ #endif
52
+ #endif
53
+
54
+ #if !defined(WINCFGMGR32API)
55
+ #if !defined(_SETUPAPI_)
56
+ #define WINCFGMGR32API DECLSPEC_IMPORT
57
+ #else
58
+ #define WINCFGMGR32API
59
+ #endif
60
+ #endif
61
+
62
+ #if !defined(WINDEVQUERYAPI)
63
+ #if !defined(_CFGMGR32_)
64
+ #define WINDEVQUERYAPI DECLSPEC_IMPORT
65
+ #else
66
+ #define WINDEVQUERYAPI
67
+ #endif
68
+ #endif
69
+
70
+ #if !defined(WINSWDEVICEAPI)
71
+ #if !defined(_CFGMGR32_)
72
+ #define WINSWDEVICEAPI DECLSPEC_IMPORT
73
+ #else
74
+ #define WINSWDEVICEAPI
75
+ #endif
76
+ #endif
77
+
78
+ #if !defined(CMAPI)
79
+ #if !defined(_CFGMGR32_)
80
+ #define CMAPI DECLSPEC_IMPORT
81
+ #else
82
+ #define CMAPI
83
+ #endif
84
+ #endif
85
+
86
+ #if !defined(WINPATHCCHAPI)
87
+ #if !defined(STATIC_PATHCCH)
88
+ #define WINPATHCCHAPI WINBASEAPI
89
+ #else
90
+ #define WINPATHCCHAPI
91
+ #endif
92
+ #endif
93
+
94
+ #if !defined(WINSTORAGEAPI)
95
+ #if !defined(_WINSTORAGEAPI_)
96
+ #define WINSTORAGEAPI DECLSPEC_IMPORT
97
+ #else
98
+ #define WINSTORAGEAPI
99
+ #endif
100
+ #endif
101
+
102
+ #endif // _APISETCCONV_
msvc/Windows Kits/10/Include/10.0.26100.0/shared/atsmedia.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //------------------------------------------------------------------------------
2
+ // File: ATSMedia.h
3
+ //
4
+ // Desc: Broadcast Driver Architecture Media Definitions for ATSC
5
+ //
6
+ // Copyright (c) 1996 - 2001, Microsoft Corporation. All rights reserved.
7
+ //------------------------------------------------------------------------------
8
+
9
+
10
+ #include <winapifamily.h>
11
+
12
+ #pragma region Desktop Family
13
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
14
+
15
+ #if !defined(_KSMEDIA_)
16
+ #error KSMEDIA.H must be included before BDAMEDIA.H
17
+ #endif // !defined(_KSMEDIA_)
18
+
19
+ #if !defined(_BDAMEDIA_)
20
+ #error BDAMEDIA.H must be included before ATSCMEDIA.H
21
+ #endif // !defined(_KSMEDIA_)
22
+
23
+ #if !defined(_ATSCMEDIA_)
24
+ #define _ATSCMEDIA_
25
+
26
+
27
+ //===========================================================================
28
+ //
29
+ // ATSC Network Type
30
+ //
31
+ //===========================================================================
32
+
33
+ #define STATIC_BDANETWORKTYPE_ATSC\
34
+ 0x71985f51, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0
35
+ DEFINE_GUIDSTRUCT("71985F51-1CA1-11d3-9CC8-00C04F7971E0", BDANETWORKTYPE_ATSC);
36
+ #define BDANETWORKTYPE_ATSC DEFINE_GUIDNAMED(BDANETWORKTYPE_ATSC)
37
+
38
+
39
+ #endif // _ATSCMEDIA_
40
+
41
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
42
+ #pragma endregion
43
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/basetsd.h ADDED
@@ -0,0 +1,518 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ basetsd.h
8
+
9
+ Abstract:
10
+
11
+ Type definitions for the basic sized types.
12
+
13
+ Author:
14
+
15
+ Revision History:
16
+
17
+ --*/
18
+
19
+ #ifndef _BASETSD_H_
20
+ #define _BASETSD_H_
21
+
22
+ #if _MSC_VER >= 1200
23
+ #pragma warning(push)
24
+ #pragma warning(disable:4668) // #if not_defined treated as #if 0
25
+ #endif
26
+
27
+ #if !defined(_MAC) && (defined(_M_MRX000) || defined(_WIN64)) && (_MSC_VER >= 1100) && !(defined(MIDL_PASS) || defined(RC_INVOKED))
28
+ #define POINTER_64 __ptr64
29
+ typedef unsigned __int64 POINTER_64_INT;
30
+ #if defined(_WIN64)
31
+ #define POINTER_32 __ptr32
32
+ #else
33
+ #define POINTER_32
34
+ #endif
35
+ #else
36
+ #if defined(_MAC) && defined(_MAC_INT_64)
37
+ #define POINTER_64 __ptr64
38
+ typedef unsigned __int64 POINTER_64_INT;
39
+ #else
40
+ #if (_MSC_VER >= 1300) && !(defined(MIDL_PASS) || defined(RC_INVOKED))
41
+ #define POINTER_64 __ptr64
42
+ #else
43
+ #define POINTER_64
44
+ #endif
45
+ typedef unsigned long POINTER_64_INT;
46
+ #endif
47
+ #define POINTER_32
48
+ #endif
49
+
50
+ #if defined(_WIN64)
51
+ #define FIRMWARE_PTR
52
+ #else
53
+ #define FIRMWARE_PTR POINTER_32
54
+ #endif
55
+
56
+ #if (_MSC_FULL_VER >= 140041204) && !defined(MIDL_PASS) && !defined(RC_INVOKED)
57
+ #define POINTER_SIGNED __sptr
58
+ #define POINTER_UNSIGNED __uptr
59
+ #else
60
+ #define POINTER_SIGNED
61
+ #define POINTER_UNSIGNED
62
+ #endif
63
+
64
+ #define SPOINTER_32 POINTER_SIGNED POINTER_32
65
+ #define UPOINTER_32 POINTER_UNSIGNED POINTER_32
66
+
67
+ #if _MSC_VER > 1000
68
+ #pragma once
69
+ #endif
70
+
71
+ #ifdef __cplusplus
72
+ extern "C" {
73
+ #endif
74
+
75
+ typedef signed char INT8, *PINT8;
76
+ typedef signed short INT16, *PINT16;
77
+ typedef signed int INT32, *PINT32;
78
+ typedef signed __int64 INT64, *PINT64;
79
+ typedef unsigned char UINT8, *PUINT8;
80
+ typedef unsigned short UINT16, *PUINT16;
81
+ typedef unsigned int UINT32, *PUINT32;
82
+ typedef unsigned __int64 UINT64, *PUINT64;
83
+
84
+ //
85
+ // The following types are guaranteed to be signed and 32 bits wide.
86
+ //
87
+
88
+ typedef signed int LONG32, *PLONG32;
89
+
90
+ //
91
+ // The following types are guaranteed to be unsigned and 32 bits wide.
92
+ //
93
+
94
+ typedef unsigned int ULONG32, *PULONG32;
95
+ typedef unsigned int DWORD32, *PDWORD32;
96
+
97
+ #if !defined(_W64)
98
+ #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86) || defined(_ARM_) || defined(_M_ARM)) && _MSC_VER >= 1300
99
+ #define _W64 __w64
100
+ #else
101
+ #define _W64
102
+ #endif
103
+ #endif
104
+
105
+ //
106
+ // The INT_PTR is guaranteed to be the same size as a pointer. Its
107
+ // size with change with pointer size (32/64). It should be used
108
+ // anywhere that a pointer is cast to an integer type. UINT_PTR is
109
+ // the unsigned variation.
110
+ //
111
+ // __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
112
+ //
113
+ #if ( defined(__midl) && (501 < __midl) )
114
+
115
+ typedef [public] __int3264 INT_PTR, *PINT_PTR;
116
+ typedef [public] unsigned __int3264 UINT_PTR, *PUINT_PTR;
117
+
118
+ typedef [public] __int3264 LONG_PTR, *PLONG_PTR;
119
+ typedef [public] unsigned __int3264 ULONG_PTR, *PULONG_PTR;
120
+
121
+ #else // midl64
122
+ // old midl and C++ compiler
123
+
124
+ #if defined(_WIN64)
125
+ typedef __int64 INT_PTR, *PINT_PTR;
126
+ typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
127
+
128
+ typedef __int64 LONG_PTR, *PLONG_PTR;
129
+ typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
130
+
131
+ #define __int3264 __int64
132
+
133
+ #else
134
+ typedef _W64 int INT_PTR, *PINT_PTR;
135
+ typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;
136
+
137
+ typedef _W64 long LONG_PTR, *PLONG_PTR;
138
+ typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;
139
+
140
+ #define __int3264 __int32
141
+
142
+ #endif
143
+ #endif // midl64
144
+
145
+ //
146
+ // HANDLE64 uses 64 bits in both WIN32 and WIN64 platforms. This along with
147
+ // HandleToHandle64 and Handle64ToHandle conversion macros, help simplify WOW
148
+ // support while user mode and kernel mode communicate with a shared memory or
149
+ // when we prefer to use fixed size types in both WIN32 and WIN64 for other
150
+ // reasons.
151
+ //
152
+
153
+ #ifndef __HANDLE64_DEFINED__
154
+ #define __HANDLE64_DEFINED__
155
+ typedef void* POINTER_64 HANDLE64;
156
+ typedef HANDLE64 *PHANDLE64;
157
+ #endif
158
+
159
+ //
160
+ // HALF_PTR is half the size of a pointer it intended for use with
161
+ // within structures which contain a pointer and two small fields.
162
+ // UHALF_PTR is the unsigned variation.
163
+ //
164
+
165
+ #ifdef _WIN64
166
+
167
+ #define ADDRESS_TAG_BIT 0x40000000000UI64
168
+
169
+ typedef __int64 SHANDLE_PTR;
170
+ typedef unsigned __int64 HANDLE_PTR;
171
+ typedef unsigned int UHALF_PTR, *PUHALF_PTR;
172
+ typedef int HALF_PTR, *PHALF_PTR;
173
+
174
+ #if !defined(__midl)
175
+ __inline
176
+ unsigned long
177
+ HandleToULong(
178
+ const void *h
179
+ )
180
+ {
181
+ return((unsigned long) (ULONG_PTR) h );
182
+ }
183
+
184
+ __inline
185
+ long
186
+ HandleToLong(
187
+ const void *h
188
+ )
189
+ {
190
+ return((long) (LONG_PTR) h );
191
+ }
192
+
193
+ __inline
194
+ void *
195
+ ULongToHandle(
196
+ const unsigned long h
197
+ )
198
+ {
199
+ return((void *) (UINT_PTR) h );
200
+ }
201
+
202
+
203
+ __inline
204
+ void *
205
+ LongToHandle(
206
+ const long h
207
+ )
208
+ {
209
+ return((void *) (INT_PTR) h );
210
+ }
211
+
212
+
213
+ __inline
214
+ unsigned long
215
+ PtrToUlong(
216
+ const void *p
217
+ )
218
+ {
219
+ return((unsigned long) (ULONG_PTR) p );
220
+ }
221
+
222
+ __inline
223
+ unsigned int
224
+ PtrToUint(
225
+ const void *p
226
+ )
227
+ {
228
+ return((unsigned int) (UINT_PTR) p );
229
+ }
230
+
231
+ __inline
232
+ unsigned short
233
+ PtrToUshort(
234
+ const void *p
235
+ )
236
+ {
237
+ return((unsigned short) (unsigned long) (ULONG_PTR) p );
238
+ }
239
+
240
+ __inline
241
+ long
242
+ PtrToLong(
243
+ const void *p
244
+ )
245
+ {
246
+ return((long) (LONG_PTR) p );
247
+ }
248
+
249
+ __inline
250
+ int
251
+ PtrToInt(
252
+ const void *p
253
+ )
254
+ {
255
+ return((int) (INT_PTR) p );
256
+ }
257
+
258
+ __inline
259
+ short
260
+ PtrToShort(
261
+ const void *p
262
+ )
263
+ {
264
+ return((short) (long) (LONG_PTR) p );
265
+ }
266
+
267
+ __inline
268
+ void *
269
+ IntToPtr(
270
+ const int i
271
+ )
272
+ // Caution: IntToPtr() sign-extends the int value.
273
+ {
274
+ return( (void *)(INT_PTR)i );
275
+ }
276
+
277
+ __inline
278
+ void *
279
+ UIntToPtr(
280
+ const unsigned int ui
281
+ )
282
+ // Caution: UIntToPtr() zero-extends the unsigned int value.
283
+ {
284
+ return( (void *)(UINT_PTR)ui );
285
+ }
286
+
287
+ __inline
288
+ void *
289
+ LongToPtr(
290
+ const long l
291
+ )
292
+ // Caution: LongToPtr() sign-extends the long value.
293
+ {
294
+ return( (void *)(LONG_PTR)l );
295
+ }
296
+
297
+ __inline
298
+ void *
299
+ ULongToPtr(
300
+ const unsigned long ul
301
+ )
302
+ // Caution: ULongToPtr() zero-extends the unsigned long value.
303
+ {
304
+ return( (void *)(ULONG_PTR)ul );
305
+ }
306
+
307
+ #define PtrToPtr64( p ) ((void * POINTER_64) p)
308
+ #define Ptr64ToPtr( p ) ((void *) p)
309
+ #define HandleToHandle64( h ) (PtrToPtr64( h ))
310
+ #define Handle64ToHandle( h ) (Ptr64ToPtr( h ))
311
+
312
+ __inline
313
+ void *
314
+ Ptr32ToPtr(
315
+ const void * POINTER_32 p
316
+ )
317
+ {
318
+ return((void *) (ULONG_PTR) (unsigned long) p);
319
+ }
320
+
321
+ __inline
322
+ void *
323
+ Handle32ToHandle(
324
+ const void * POINTER_32 h
325
+ )
326
+ {
327
+ return((void *) (LONG_PTR) (long) h);
328
+ }
329
+
330
+ __inline
331
+ void * POINTER_32
332
+ PtrToPtr32(
333
+ const void *p
334
+ )
335
+ {
336
+ return((void * POINTER_32) (unsigned long) (ULONG_PTR) p);
337
+ }
338
+
339
+ #define HandleToHandle32( h ) (PtrToPtr32( h ))
340
+
341
+ #endif // !_midl
342
+
343
+ #else // !_WIN64
344
+
345
+ #define ADDRESS_TAG_BIT 0x80000000UL
346
+
347
+ typedef unsigned short UHALF_PTR, *PUHALF_PTR;
348
+ typedef short HALF_PTR, *PHALF_PTR;
349
+ typedef _W64 long SHANDLE_PTR;
350
+ typedef _W64 unsigned long HANDLE_PTR;
351
+
352
+ #define HandleToULong( h ) ((ULONG)(ULONG_PTR)(h) )
353
+ #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
354
+ #define ULongToHandle( ul ) ((HANDLE)(ULONG_PTR) (ul) )
355
+ #define LongToHandle( h ) ((HANDLE)(LONG_PTR) (h) )
356
+ #define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
357
+ #define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
358
+ #define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
359
+ #define PtrToInt( p ) ((INT)(INT_PTR) (p) )
360
+ #define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
361
+ #define PtrToShort( p ) ((short)(LONG_PTR)(p) )
362
+ #define IntToPtr( i ) ((VOID *)(INT_PTR)((int)i))
363
+ #define UIntToPtr( ui ) ((VOID *)(UINT_PTR)((unsigned int)ui))
364
+ #define LongToPtr( l ) ((VOID *)(LONG_PTR)((long)l))
365
+ #define ULongToPtr( ul ) ((VOID *)(ULONG_PTR)((unsigned long)ul))
366
+
367
+ #if !defined(__midl)
368
+ __inline
369
+ void * POINTER_64
370
+ PtrToPtr64(
371
+ const void *p
372
+ )
373
+ {
374
+ return((void * POINTER_64) (unsigned __int64) (ULONG_PTR) p );
375
+ }
376
+
377
+ __inline
378
+ void *
379
+ Ptr64ToPtr(
380
+ const void * POINTER_64 p
381
+ )
382
+ {
383
+ return((void *) (ULONG_PTR) (unsigned __int64) p);
384
+ }
385
+
386
+ __inline
387
+ HANDLE64
388
+ HandleToHandle64(
389
+ const void * h
390
+ )
391
+ {
392
+ return((HANDLE64) (__int64) (LONG_PTR) h );
393
+ }
394
+
395
+ __inline
396
+ void *
397
+ Handle64ToHandle(
398
+ const HANDLE64 h
399
+ )
400
+ {
401
+ return((void *) (ULONG_PTR) (unsigned __int64) h );
402
+ }
403
+ #endif
404
+
405
+ #define Ptr32ToPtr( p ) ((void *) p)
406
+ #define Handle32ToHandle( h ) (Ptr32ToPtr( h ))
407
+ #define PtrToPtr32( p ) ((void * POINTER_32) p)
408
+ #define HandleToHandle32( h ) (PtrToPtr32( h ))
409
+
410
+ #endif // !_WIN64
411
+
412
+ #define HandleToUlong(h) HandleToULong(h)
413
+ #define UlongToHandle(ul) ULongToHandle(ul)
414
+ #define UlongToPtr(ul) ULongToPtr(ul)
415
+ #define UintToPtr(ui) UIntToPtr(ui)
416
+
417
+ #define MAXUINT_PTR (~((UINT_PTR)0))
418
+ #define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
419
+ #define MININT_PTR (~MAXINT_PTR)
420
+
421
+ #define MAXULONG_PTR (~((ULONG_PTR)0))
422
+ #define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
423
+ #define MINLONG_PTR (~MAXLONG_PTR)
424
+
425
+ #define MAXUHALF_PTR ((UHALF_PTR)~0)
426
+ #define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
427
+ #define MINHALF_PTR (~MAXHALF_PTR)
428
+
429
+ //
430
+ // SIZE_T used for counts or ranges which need to span the range of
431
+ // of a pointer. SSIZE_T is the signed variation.
432
+ //
433
+
434
+ typedef ULONG_PTR SIZE_T, *PSIZE_T;
435
+ typedef LONG_PTR SSIZE_T, *PSSIZE_T;
436
+
437
+ #if _WIN32_WINNT >= 0x0600 || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS))
438
+
439
+ #define MAXUINT8 ((UINT8)~((UINT8)0))
440
+ #define MAXINT8 ((INT8)(MAXUINT8 >> 1))
441
+ #define MININT8 ((INT8)~MAXINT8)
442
+
443
+ #define MAXUINT16 ((UINT16)~((UINT16)0))
444
+ #define MAXINT16 ((INT16)(MAXUINT16 >> 1))
445
+ #define MININT16 ((INT16)~MAXINT16)
446
+
447
+ #define MAXUINT32 ((UINT32)~((UINT32)0))
448
+ #define MAXINT32 ((INT32)(MAXUINT32 >> 1))
449
+ #define MININT32 ((INT32)~MAXINT32)
450
+
451
+ #define MAXUINT64 ((UINT64)~((UINT64)0))
452
+ #define MAXINT64 ((INT64)(MAXUINT64 >> 1))
453
+ #define MININT64 ((INT64)~MAXINT64)
454
+
455
+ #define MAXULONG32 ((ULONG32)~((ULONG32)0))
456
+ #define MAXLONG32 ((LONG32)(MAXULONG32 >> 1))
457
+ #define MINLONG32 ((LONG32)~MAXLONG32)
458
+
459
+ #define MAXULONG64 ((ULONG64)~((ULONG64)0))
460
+ #define MAXLONG64 ((LONG64)(MAXULONG64 >> 1))
461
+ #define MINLONG64 ((LONG64)~MAXLONG64)
462
+
463
+ #define MAXULONGLONG ((ULONGLONG)~((ULONGLONG)0))
464
+ #define MINLONGLONG ((LONGLONG)~MAXLONGLONG)
465
+
466
+ #define MAXSIZE_T ((SIZE_T)~((SIZE_T)0))
467
+ #define MAXSSIZE_T ((SSIZE_T)(MAXSIZE_T >> 1))
468
+ #define MINSSIZE_T ((SSIZE_T)~MAXSSIZE_T)
469
+
470
+ #define MAXUINT ((UINT)~((UINT)0))
471
+ #define MAXINT ((INT)(MAXUINT >> 1))
472
+ #define MININT ((INT)~MAXINT)
473
+
474
+ #define MAXDWORD32 ((DWORD32)~((DWORD32)0))
475
+ #define MAXDWORD64 ((DWORD64)~((DWORD64)0))
476
+
477
+ #endif // _WIN32_WINNT >= 0x0600
478
+
479
+ //
480
+ // Add Windows flavor DWORD_PTR types
481
+ //
482
+
483
+ typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
484
+
485
+ //
486
+ // The following types are guaranteed to be signed and 64 bits wide.
487
+ //
488
+
489
+ typedef __int64 LONG64, *PLONG64;
490
+
491
+
492
+ //
493
+ // The following types are guaranteed to be unsigned and 64 bits wide.
494
+ //
495
+
496
+ typedef unsigned __int64 ULONG64, *PULONG64;
497
+ typedef unsigned __int64 DWORD64, *PDWORD64;
498
+
499
+ // begin_wudfpwdm
500
+
501
+ //
502
+ // Legacy thread affinity.
503
+ //
504
+
505
+ typedef ULONG_PTR KAFFINITY;
506
+ typedef KAFFINITY *PKAFFINITY;
507
+
508
+ // end_wudfpwdm
509
+
510
+ #ifdef __cplusplus
511
+ }
512
+ #endif
513
+
514
+ #if _MSC_VER >= 1200
515
+ #pragma warning(pop)
516
+ #endif
517
+
518
+ #endif // _BASETSD_H_
msvc/Windows Kits/10/Include/10.0.26100.0/shared/basetyps.h ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //+---------------------------------------------------------------------------
2
+ //
3
+ // Microsoft Windows
4
+ // Copyright (c) Microsoft Corporation. All rights reserved.
5
+ //
6
+ // File: basetyps.h
7
+ //
8
+ //----------------------------------------------------------------------------
9
+ #if !defined( _BASETYPS_H_ )
10
+ #define _BASETYPS_H_
11
+
12
+ #if _MSC_VER > 1000
13
+ #pragma once
14
+ #endif
15
+
16
+ // Common macros gleamed from COMPOBJ.H
17
+
18
+ #ifdef __cplusplus
19
+ #define EXTERN_C extern "C"
20
+ #else
21
+ #define EXTERN_C extern
22
+ #endif
23
+
24
+ #ifdef _WIN32
25
+
26
+ // Win32 doesn't support __export
27
+
28
+ #define STDMETHODCALLTYPE __stdcall
29
+ #define STDMETHODVCALLTYPE __cdecl
30
+
31
+ #define STDAPICALLTYPE __stdcall
32
+ #define STDAPIVCALLTYPE __cdecl
33
+
34
+ #else
35
+
36
+ #define STDMETHODCALLTYPE __export __stdcall
37
+ #define STDMETHODVCALLTYPE __export __cdecl
38
+
39
+ #define STDAPICALLTYPE __export __stdcall
40
+ #define STDAPIVCALLTYPE __export __cdecl
41
+
42
+ #endif
43
+
44
+ #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
45
+ #define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
46
+
47
+ #define STDMETHODIMP HRESULT STDMETHODCALLTYPE
48
+ #define STDMETHODIMP_(type) type STDMETHODCALLTYPE
49
+
50
+ // The 'V' versions allow Variable Argument lists.
51
+
52
+ #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
53
+ #define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
54
+
55
+ #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
56
+ #define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
57
+
58
+
59
+
60
+
61
+ /****** Interface Declaration ***********************************************/
62
+
63
+ /*
64
+ * These are macros for declaring interfaces. They exist so that
65
+ * a single definition of the interface is simulataneously a proper
66
+ * declaration of the interface structures (C++ abstract classes)
67
+ * for both C and C++.
68
+ *
69
+ * DECLARE_INTERFACE(iface) is used to declare an interface that does
70
+ * not derive from a base interface.
71
+ * DECLARE_INTERFACE_(iface, baseiface) is used to declare an interface
72
+ * that does derive from a base interface.
73
+ *
74
+ * By default if the source file has a .c extension the C version of
75
+ * the interface declaratations will be expanded; if it has a .cpp
76
+ * extension the C++ version will be expanded. if you want to force
77
+ * the C version expansion even though the source file has a .cpp
78
+ * extension, then define the macro "CINTERFACE".
79
+ * eg. cl -DCINTERFACE file.cpp
80
+ *
81
+ * Example Interface declaration:
82
+ *
83
+ * #undef INTERFACE
84
+ * #define INTERFACE IClassFactory
85
+ *
86
+ * DECLARE_INTERFACE_(IClassFactory, IUnknown)
87
+ * {
88
+ * // *** IUnknown methods ***
89
+ * STDMETHOD(QueryInterface) (THIS_
90
+ * REFIID riid,
91
+ * LPVOID FAR* ppvObj) PURE;
92
+ * STDMETHOD_(ULONG,AddRef) (THIS) PURE;
93
+ * STDMETHOD_(ULONG,Release) (THIS) PURE;
94
+ *
95
+ * // *** IClassFactory methods ***
96
+ * STDMETHOD(CreateInstance) (THIS_
97
+ * LPUNKNOWN pUnkOuter,
98
+ * REFIID riid,
99
+ * LPVOID FAR* ppvObject) PURE;
100
+ * };
101
+ *
102
+ * Example C++ expansion:
103
+ *
104
+ * struct FAR IClassFactory : public IUnknown
105
+ * {
106
+ * virtual HRESULT STDMETHODCALLTYPE QueryInterface(
107
+ * IID FAR& riid,
108
+ * LPVOID FAR* ppvObj) = 0;
109
+ * virtual HRESULT STDMETHODCALLTYPE AddRef(void) = 0;
110
+ * virtual HRESULT STDMETHODCALLTYPE Release(void) = 0;
111
+ * virtual HRESULT STDMETHODCALLTYPE CreateInstance(
112
+ * LPUNKNOWN pUnkOuter,
113
+ * IID FAR& riid,
114
+ * LPVOID FAR* ppvObject) = 0;
115
+ * };
116
+ *
117
+ * NOTE: Our documentation says '#define interface class' but we use
118
+ * 'struct' instead of 'class' to keep a lot of 'public:' lines
119
+ * out of the interfaces. The 'FAR' forces the 'this' pointers to
120
+ * be far, which is what we need.
121
+ *
122
+ * Example C expansion:
123
+ *
124
+ * typedef struct IClassFactory
125
+ * {
126
+ * const struct IClassFactoryVtbl FAR* lpVtbl;
127
+ * } IClassFactory;
128
+ *
129
+ * typedef struct IClassFactoryVtbl IClassFactoryVtbl;
130
+ *
131
+ * struct IClassFactoryVtbl
132
+ * {
133
+ * HRESULT (STDMETHODCALLTYPE * QueryInterface) (
134
+ * IClassFactory FAR* This,
135
+ * IID FAR* riid,
136
+ * LPVOID FAR* ppvObj) ;
137
+ * HRESULT (STDMETHODCALLTYPE * AddRef) (IClassFactory FAR* This) ;
138
+ * HRESULT (STDMETHODCALLTYPE * Release) (IClassFactory FAR* This) ;
139
+ * HRESULT (STDMETHODCALLTYPE * CreateInstance) (
140
+ * IClassFactory FAR* This,
141
+ * LPUNKNOWN pUnkOuter,
142
+ * IID FAR* riid,
143
+ * LPVOID FAR* ppvObject);
144
+ * HRESULT (STDMETHODCALLTYPE * LockServer) (
145
+ * IClassFactory FAR* This,
146
+ * BOOL fLock);
147
+ * };
148
+ */
149
+
150
+
151
+ #if defined(__cplusplus) && !defined(CINTERFACE)
152
+ //#define interface struct FAR
153
+
154
+ #ifdef COM_STDMETHOD_CAN_THROW
155
+ #define COM_DECLSPEC_NOTHROW
156
+ #else
157
+ #define COM_DECLSPEC_NOTHROW DECLSPEC_NOTHROW
158
+ #endif
159
+
160
+ #define __STRUCT__ struct
161
+ #define interface __STRUCT__
162
+ #define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method
163
+ #define STDMETHOD_(type,method) virtual COM_DECLSPEC_NOTHROW type STDMETHODCALLTYPE method
164
+ #define STDMETHODV(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODVCALLTYPE method
165
+ #define STDMETHODV_(type,method) virtual COM_DECLSPEC_NOTHROW type STDMETHODVCALLTYPE method
166
+ #define PURE = 0
167
+ #define THIS_
168
+ #define THIS void
169
+ #define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
170
+ #define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface
171
+
172
+ #define IFACEMETHOD(method) __override STDMETHOD(method)
173
+ #define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
174
+ #define IFACEMETHODV(method) __override STDMETHODV(method)
175
+ #define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
176
+
177
+ #else
178
+
179
+ #define interface struct
180
+
181
+ #define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE * method)
182
+ #define STDMETHOD_(type,method) type (STDMETHODCALLTYPE * method)
183
+ #define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE * method)
184
+ #define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE * method)
185
+
186
+ #define IFACEMETHOD(method) __override STDMETHOD(method)
187
+ #define IFACEMETHOD_(type,method) __override STDMETHOD_(type,method)
188
+ #define IFACEMETHODV(method) __override STDMETHODV(method)
189
+ #define IFACEMETHODV_(type,method) __override STDMETHODV_(type,method)
190
+
191
+
192
+
193
+ #define PURE
194
+ #define THIS_ INTERFACE FAR* This,
195
+ #define THIS INTERFACE FAR* This
196
+ #ifdef CONST_VTABLE
197
+ #define DECLARE_INTERFACE(iface) typedef interface iface { \
198
+ const struct iface##Vtbl FAR* lpVtbl; \
199
+ } iface; \
200
+ typedef const struct iface##Vtbl iface##Vtbl; \
201
+ const struct iface##Vtbl
202
+ #else
203
+ #define DECLARE_INTERFACE(iface) typedef interface iface { \
204
+ struct iface##Vtbl FAR* lpVtbl; \
205
+ } iface; \
206
+ typedef struct iface##Vtbl iface##Vtbl; \
207
+ struct iface##Vtbl
208
+ #endif
209
+ #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE(iface)
210
+
211
+ #endif
212
+
213
+ #include <guiddef.h>
214
+
215
+ #ifndef _ERROR_STATUS_T_DEFINED
216
+ typedef unsigned long error_status_t;
217
+ #define _ERROR_STATUS_T_DEFINED
218
+ #endif
219
+
220
+ #ifndef _WCHAR_T_DEFINED
221
+ typedef unsigned short wchar_t;
222
+ #define _WCHAR_T_DEFINED
223
+ #endif
224
+
225
+ #endif
226
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/batclass.h ADDED
@@ -0,0 +1,660 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++ BUILD Version: 0001 // Increment this if a change has global effects
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ batclass.h
8
+
9
+ Abstract:
10
+
11
+ Defines battery class driver interfaces.
12
+
13
+ --*/
14
+
15
+ #include <poclass.h>
16
+
17
+ //
18
+ // Battery device GUID
19
+ //
20
+
21
+ DEFINE_GUID (BATTERY_STATUS_WMI_GUID,
22
+ 0xfc4670d1, 0xebbf, 0x416e, 0x87, 0xce, 0x37, 0x4a, 0x4e, 0xbc, 0x11, 0x1a);
23
+
24
+ DEFINE_GUID (BATTERY_RUNTIME_WMI_GUID,
25
+ 0x535a3767, 0x1ac2, 0x49bc, 0xa0, 0x77, 0x3f, 0x7a, 0x02, 0xe4, 0x0a, 0xec);
26
+
27
+ DEFINE_GUID (BATTERY_TEMPERATURE_WMI_GUID,
28
+ 0x1a52a14d, 0xadce, 0x4a44, 0x9a, 0x3e, 0xc8, 0xd8, 0xf1, 0x5f, 0xf2, 0xc2);
29
+
30
+ DEFINE_GUID (BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID,
31
+ 0x40b40565, 0x96f7, 0x4435, 0x86, 0x94, 0x97, 0xe0, 0xe4, 0x39, 0x59, 0x05);
32
+
33
+ DEFINE_GUID (BATTERY_CYCLE_COUNT_WMI_GUID,
34
+ 0xef98db24, 0x0014, 0x4c25, 0xa5, 0x0b, 0xc7, 0x24, 0xae, 0x5c, 0xd3, 0x71);
35
+
36
+ DEFINE_GUID (BATTERY_STATIC_DATA_WMI_GUID,
37
+ 0x05e1e463, 0xe4e2, 0x4ea9, 0x80, 0xcb, 0x9b, 0xd4, 0xb3, 0xca, 0x06, 0x55);
38
+
39
+ DEFINE_GUID (BATTERY_STATUS_CHANGE_WMI_GUID,
40
+ 0xcddfa0c3, 0x7c5b, 0x4e43, 0xa0, 0x34, 0x05, 0x9f, 0xa5, 0xb8, 0x43, 0x64);
41
+
42
+ DEFINE_GUID (BATTERY_TAG_CHANGE_WMI_GUID,
43
+ 0x5e1f6e19, 0x8786, 0x4d23, 0x94, 0xfc, 0x9e, 0x74, 0x6b, 0xd5, 0xd8, 0x88);
44
+
45
+ #ifndef _BATCLASS_
46
+ #define _BATCLASS_
47
+ #include <winapifamily.h>
48
+
49
+ #pragma region Desktop Family
50
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
51
+
52
+
53
+ #if (NTDDI_VERSION < NTDDI_WINXP)
54
+
55
+ //
56
+ // Format of data returned when
57
+ // BATTERY_INFORMATION_LEVEL = BatteryGranularityInformation
58
+ // is an array of BATTERY_REPORTING_SCALE
59
+ //
60
+
61
+ #ifndef _NTPOAPI_
62
+
63
+ typedef struct {
64
+ ULONG Granularity;
65
+ ULONG Capacity;
66
+ } BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
67
+
68
+ #endif // _NTPOAPI_
69
+
70
+ #endif // (NTDDI_VERSION < NTDDI_WINXP)
71
+
72
+ #ifndef _WINDOWS_
73
+
74
+ #pragma warning(push)
75
+ #pragma warning(disable:4214) /* nonstandard extension used : bit field types other then int */
76
+
77
+ //
78
+ // Battery Class-Miniport device driver interfaces
79
+ //
80
+
81
+ _Function_class_(BCLASS_QUERY_TAG_CALLBACK)
82
+ _IRQL_requires_same_
83
+ _IRQL_requires_max_(PASSIVE_LEVEL)
84
+ _Check_return_
85
+ typedef
86
+ NTSTATUS
87
+ (BCLASS_QUERY_TAG_CALLBACK)(
88
+ _In_ PVOID Context,
89
+ _Out_ PULONG BatteryTag
90
+ );
91
+
92
+ typedef BCLASS_QUERY_TAG_CALLBACK *PBCLASS_QUERY_TAG_CALLBACK;
93
+
94
+
95
+ _Function_class_(BCLASS_QUERY_INFORMATION_CALLBACK)
96
+ _IRQL_requires_same_
97
+ _IRQL_requires_max_(PASSIVE_LEVEL)
98
+ _Check_return_
99
+ typedef
100
+ NTSTATUS
101
+ (BCLASS_QUERY_INFORMATION_CALLBACK)(
102
+ _In_ PVOID Context,
103
+ _In_ ULONG BatteryTag,
104
+ _In_ BATTERY_QUERY_INFORMATION_LEVEL Level,
105
+ _In_ LONG AtRate,
106
+ _Out_writes_bytes_to_(BufferLength, *ReturnedLength) PVOID Buffer,
107
+ _In_ ULONG BufferLength,
108
+ _Out_ PULONG ReturnedLength
109
+ );
110
+
111
+ typedef BCLASS_QUERY_INFORMATION_CALLBACK *PBCLASS_QUERY_INFORMATION_CALLBACK;
112
+
113
+
114
+ _Function_class_(BCLASS_QUERY_STATUS_CALLBACK)
115
+ _IRQL_requires_same_
116
+ _IRQL_requires_max_(PASSIVE_LEVEL)
117
+ _Check_return_
118
+ typedef
119
+ NTSTATUS
120
+ (BCLASS_QUERY_STATUS_CALLBACK)(
121
+ _In_ PVOID Context,
122
+ _In_ ULONG BatteryTag,
123
+ _Out_ PBATTERY_STATUS BatteryStatus
124
+ );
125
+
126
+ typedef BCLASS_QUERY_STATUS_CALLBACK *PBCLASS_QUERY_STATUS_CALLBACK;
127
+
128
+ _Function_class_(ACLASS_QUERY_STATUS_CALLBACK)
129
+ _IRQL_requires_same_
130
+ _IRQL_requires_max_(PASSIVE_LEVEL)
131
+ _Check_return_
132
+ typedef
133
+ NTSTATUS
134
+ (ACLASS_QUERY_STATUS_CALLBACK)(
135
+ _In_ PVOID Context,
136
+ _Out_ PPOWER_ADAPTER_STATUS AdapterStatus
137
+ );
138
+
139
+ typedef ACLASS_QUERY_STATUS_CALLBACK *PACLASS_QUERY_STATUS_CALLBACK;
140
+ typedef PACLASS_QUERY_STATUS_CALLBACK ACLASS_QUERY_STATUS;
141
+
142
+ _Function_class_(ACLASS_SET_STATUS_CALLBACK)
143
+ _IRQL_requires_same_
144
+ _IRQL_requires_max_(PASSIVE_LEVEL)
145
+ _Check_return_
146
+ typedef
147
+ NTSTATUS
148
+ (ACLASS_SET_STATUS_CALLBACK)(
149
+ _In_ PVOID Context,
150
+ _In_ PPOWER_ADAPTER_SET_STATUS_BUFFER AdapterStatus
151
+ );
152
+
153
+ typedef ACLASS_SET_STATUS_CALLBACK *PACLASS_SET_STATUS_CALLBACK;
154
+ typedef PACLASS_SET_STATUS_CALLBACK ACLASS_SET_STATUS;
155
+
156
+ typedef struct _ADAPTER_NOTIFY {
157
+ UCHAR Version;
158
+ UCHAR Reserved[3];
159
+ ULONG PeakPowerThreshold;
160
+ } ADAPTER_NOTIFY, *PADAPTER_NOTIFY;
161
+
162
+ _Function_class_(ACLASS_SET_STATUS_NOTIFY_CALLBACK)
163
+ _IRQL_requires_same_
164
+ _IRQL_requires_max_(PASSIVE_LEVEL)
165
+ _Check_return_
166
+ typedef
167
+ NTSTATUS
168
+ (ACLASS_SET_STATUS_NOTIFY_CALLBACK)(
169
+ _In_ PVOID Context,
170
+ _In_ PADAPTER_NOTIFY AdapterNotify
171
+ );
172
+
173
+ typedef ACLASS_SET_STATUS_NOTIFY_CALLBACK *PACLASS_SET_STATUS_NOTIFY_CALLBACK;
174
+ typedef PACLASS_SET_STATUS_NOTIFY_CALLBACK ACLASS_SET_STATUS_NOTIFY;
175
+
176
+ _Function_class_(ACLASS_DISABLE_STATUS_NOTIFY_CALLBACK)
177
+ _IRQL_requires_same_
178
+ _IRQL_requires_max_(PASSIVE_LEVEL)
179
+ _Check_return_
180
+ typedef
181
+ NTSTATUS
182
+ (ACLASS_DISABLE_STATUS_NOTIFY_CALLBACK) (
183
+ _In_ PVOID Context
184
+ );
185
+
186
+ typedef ACLASS_DISABLE_STATUS_NOTIFY_CALLBACK *PACLASS_DISABLE_STATUS_NOTIFY_CALLBACK;
187
+ typedef PACLASS_DISABLE_STATUS_NOTIFY_CALLBACK ACLASS_DISABLE_STATUS_NOTIFY;
188
+
189
+ typedef struct {
190
+ ULONG PowerState;
191
+ ULONG LowCapacity;
192
+ ULONG HighCapacity;
193
+ } BATTERY_NOTIFY, *PBATTERY_NOTIFY;
194
+
195
+ typedef struct _BATTERY_NOTIFY_V2 {
196
+ ULONG PowerState;
197
+ ULONG LowCapacity;
198
+ ULONG HighCapacity;
199
+ UCHAR Version;
200
+ UCHAR Reserved[3];
201
+ ULONG BatteryPresentRateThreshold;
202
+ } BATTERY_NOTIFY_V2, *PBATTERY_NOTIFY_V2;
203
+
204
+ _Function_class_(BCLASS_SET_STATUS_NOTIFY_CALLBACK)
205
+ _IRQL_requires_same_
206
+ _IRQL_requires_max_(PASSIVE_LEVEL)
207
+ _Check_return_
208
+ typedef
209
+ NTSTATUS
210
+ (BCLASS_SET_STATUS_NOTIFY_CALLBACK)(
211
+ _In_ PVOID Context,
212
+ _In_ ULONG BatteryTag,
213
+ _In_ PBATTERY_NOTIFY BatteryNotify
214
+ );
215
+
216
+ typedef BCLASS_SET_STATUS_NOTIFY_CALLBACK *PBCLASS_SET_STATUS_NOTIFY_CALLBACK;
217
+
218
+ #define BATTERY_NOTIFY_VERSION_1 1
219
+ #define BATTERY_NOTIFY_VERSION_2 2
220
+
221
+ _Function_class_(BCLASS_SET_INFORMATION_CALLBACK)
222
+ _IRQL_requires_same_
223
+ _IRQL_requires_max_(PASSIVE_LEVEL)
224
+ _Check_return_
225
+ typedef
226
+ NTSTATUS
227
+ (BCLASS_SET_INFORMATION_CALLBACK)(
228
+ _In_ PVOID Context,
229
+ _In_ ULONG BatteryTag,
230
+ _In_ BATTERY_SET_INFORMATION_LEVEL Level,
231
+ _In_opt_ PVOID Buffer
232
+ );
233
+
234
+ typedef BCLASS_SET_INFORMATION_CALLBACK *PBCLASS_SET_INFORMATION_CALLBACK;
235
+
236
+
237
+ _Function_class_(BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)
238
+ _IRQL_requires_same_
239
+ _IRQL_requires_max_(PASSIVE_LEVEL)
240
+ _Check_return_
241
+ typedef
242
+ NTSTATUS
243
+ (BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)(
244
+ _In_ PVOID Context
245
+ );
246
+
247
+ typedef BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK
248
+ *PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK;
249
+
250
+ typedef struct _BATTERY_PEAK_POWER {
251
+ UCHAR Version;
252
+ UCHAR Reserved[3];
253
+ ULONG InstantaneousPeakPower;
254
+ ULONG InstantaneousPeakPeriod;
255
+ ULONG SustainablePeakPower;
256
+ ULONG SustainablePeakPeriod;
257
+ } BATTERY_PEAK_POWER, *PBATTERY_PEAK_POWER;
258
+
259
+ _Function_class_(BCLASS_QUERY_PEAK_POWER_CALLBACK)
260
+ _IRQL_requires_same_
261
+ _IRQL_requires_max_(PASSIVE_LEVEL)
262
+ _Check_return_
263
+ typedef
264
+ NTSTATUS
265
+ (BCLASS_QUERY_PEAK_POWER_CALLBACK) (
266
+ _In_ PVOID Context,
267
+ _In_ ULONG BatteryTag,
268
+ _Inout_ PBATTERY_PEAK_POWER PeakPower
269
+ );
270
+
271
+ typedef BCLASS_QUERY_PEAK_POWER_CALLBACK *PBCLASS_QUERY_PEAK_POWER_CALLBACK;
272
+
273
+ typedef struct _BATTERY_PEAK_POWER_THRESHOLDS {
274
+ UCHAR Version;
275
+ UCHAR Reserved[3];
276
+ ULONG InstantaneousPeakPowerThreshold;
277
+ ULONG SustainablePeakPowerThreshold;
278
+ } BATTERY_PEAK_POWER_THRESHOLDS, *PBATTERY_PEAK_POWER_THRESHOLDS;
279
+
280
+ _Function_class_(BCLASS_SET_PEAK_POWER_NOTIFY_CALLBACK)
281
+ _IRQL_requires_same_
282
+ _IRQL_requires_max_(PASSIVE_LEVEL)
283
+ _Check_return_
284
+ typedef
285
+ NTSTATUS
286
+ (BCLASS_SET_PEAK_POWER_NOTIFY_CALLBACK) (
287
+ _In_ PVOID Context,
288
+ _In_ ULONG BatteryTag,
289
+ _In_ PBATTERY_PEAK_POWER_THRESHOLDS PeakPowerThresholds
290
+ );
291
+
292
+ typedef BCLASS_SET_PEAK_POWER_NOTIFY_CALLBACK
293
+ *PBCLASS_SET_PEAK_POWER_NOTIFY_CALLBACK;
294
+
295
+ _Function_class_(BCLASS_DISABLE_PEAK_POWER_NOTIFY_CALLBACK)
296
+ _IRQL_requires_same_
297
+ _IRQL_requires_max_(PASSIVE_LEVEL)
298
+ _Check_return_
299
+ typedef
300
+ NTSTATUS
301
+ (BCLASS_DISABLE_PEAK_POWER_NOTIFY_CALLBACK) (
302
+ _In_ PVOID Context
303
+ );
304
+
305
+ typedef BCLASS_DISABLE_PEAK_POWER_NOTIFY_CALLBACK
306
+ *PBCLASS_DISABLE_PEAK_POWER_NOTIFY_CALLBACK;
307
+
308
+ typedef PBCLASS_QUERY_TAG_CALLBACK BCLASS_QUERY_TAG;
309
+ typedef PBCLASS_QUERY_INFORMATION_CALLBACK BCLASS_QUERY_INFORMATION;
310
+ typedef PBCLASS_QUERY_STATUS_CALLBACK BCLASS_QUERY_STATUS;
311
+ typedef PBCLASS_SET_STATUS_NOTIFY_CALLBACK BCLASS_SET_STATUS_NOTIFY;
312
+ typedef PBCLASS_SET_INFORMATION_CALLBACK BCLASS_SET_INFORMATION;
313
+ typedef PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK BCLASS_DISABLE_STATUS_NOTIFY;
314
+ typedef PBCLASS_QUERY_PEAK_POWER_CALLBACK BCLASS_QUERY_PEAK_POWER;
315
+ typedef PBCLASS_SET_PEAK_POWER_NOTIFY_CALLBACK BCLASS_SET_PEAK_POWER_NOTIFY;
316
+ typedef PBCLASS_DISABLE_PEAK_POWER_NOTIFY_CALLBACK BCLASS_DISABLE_PEAK_POWER_NOTIFY;
317
+
318
+ typedef struct {
319
+ USHORT MajorVersion;
320
+ USHORT MinorVersion;
321
+
322
+ PVOID Context; // Miniport context
323
+
324
+ BCLASS_QUERY_TAG QueryTag;
325
+ BCLASS_QUERY_INFORMATION QueryInformation;
326
+ BCLASS_SET_INFORMATION SetInformation;
327
+ BCLASS_QUERY_STATUS QueryStatus;
328
+ BCLASS_SET_STATUS_NOTIFY SetStatusNotify;
329
+ BCLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
330
+ PDEVICE_OBJECT Pdo;
331
+ PUNICODE_STRING DeviceName;
332
+ } BATTERY_MINIPORT_INFO, *PBATTERY_MINIPORT_INFO;
333
+
334
+ typedef struct {
335
+ USHORT MajorVersion;
336
+ USHORT MinorVersion;
337
+
338
+ PVOID Context; // Miniport context
339
+
340
+ BCLASS_QUERY_TAG QueryTag;
341
+ BCLASS_QUERY_INFORMATION QueryInformation;
342
+ BCLASS_SET_INFORMATION SetInformation;
343
+ BCLASS_QUERY_STATUS QueryStatus;
344
+ BCLASS_SET_STATUS_NOTIFY SetStatusNotify;
345
+ BCLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
346
+ PDEVICE_OBJECT Pdo;
347
+ PUNICODE_STRING DeviceName;
348
+ PDEVICE_OBJECT Fdo;
349
+ } BATTERY_MINIPORT_INFO_V1_1, *PBATTERY_MINIPORT_INFO_V1_1;
350
+
351
+ typedef union _BATTERY_CLASS_DRIVER_CAPABILITIES {
352
+ struct {
353
+ ULONG PeakPower : 1;
354
+ ULONG BatteryPresentRateThreshold : 1;
355
+ ULONG Reserved : 30;
356
+ } Bits;
357
+
358
+ ULONG AsUlong;
359
+ } BATTERY_CLASS_DRIVER_CAPABILITIES, *PBATTERY_CLASS_DRIVER_CAPABILITIES;
360
+
361
+ typedef struct {
362
+ USHORT MajorVersion;
363
+ USHORT MinorVersion;
364
+
365
+ PVOID Context; // Miniport context
366
+
367
+ BCLASS_QUERY_TAG QueryTag;
368
+ BCLASS_QUERY_INFORMATION QueryInformation;
369
+ BCLASS_SET_INFORMATION SetInformation;
370
+ BCLASS_QUERY_STATUS QueryStatus;
371
+ BCLASS_SET_STATUS_NOTIFY SetStatusNotify;
372
+ BCLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
373
+ PDEVICE_OBJECT Pdo;
374
+ PUNICODE_STRING DeviceName;
375
+ PDEVICE_OBJECT Fdo;
376
+
377
+ //
378
+ // This field is set by the class driver to expose its capabilities, this helps
379
+ // newer miniport driver to be compatiable with older class drivers. For V1.0
380
+ // and V1.1 class driver, this field won't be updated.
381
+ //
382
+
383
+ BATTERY_CLASS_DRIVER_CAPABILITIES ClassDriverCapabilities;
384
+
385
+ //
386
+ // Callbacks for peak power related status.
387
+ //
388
+
389
+ BCLASS_QUERY_PEAK_POWER QueryPeakPower;
390
+ BCLASS_SET_PEAK_POWER_NOTIFY SetPeakPowerNotify;
391
+ BCLASS_DISABLE_PEAK_POWER_NOTIFY DisablePeakPowerNotify;
392
+ } BATTERY_MINIPORT_INFO_V1_2, *PBATTERY_MINIPORT_INFO_V1_2;
393
+
394
+ #define CHARGE_REQUIREMENT_MAX_POWER_SOURCE_TYPES 2
395
+
396
+ typedef struct _ADAPTER_INFORMATION {
397
+ ULONG AcAdapterCount;
398
+ BOOLEAN RecSupported;
399
+ POWER_ADAPTER_CHARGE_REQUIREMENT ChargeRequirement[CHARGE_REQUIREMENT_MAX_POWER_SOURCE_TYPES];
400
+ } ADAPTER_INFORMATION, *PADAPTER_INFORMATION;
401
+
402
+ typedef struct _ADAPTER_MINIPORT_INFO {
403
+ USHORT MajorVersion;
404
+ USHORT MinorVersion;
405
+ PVOID Context;
406
+ PDEVICE_OBJECT Pdo;
407
+ PDEVICE_OBJECT Fdo;
408
+ PUNICODE_STRING Description;
409
+ ADAPTER_INFORMATION AdapterInformation;
410
+ ACLASS_QUERY_STATUS QueryStatus;
411
+ ACLASS_SET_STATUS SetStatus;
412
+ ACLASS_SET_STATUS_NOTIFY SetStatusNotify;
413
+ ACLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
414
+ } ADAPTER_MINIPORT_INFO, *PADAPTER_MINIPORT_INFO;
415
+
416
+ typedef enum BATTERY_CHARGING_STATE {
417
+ BatteryNoPowerSupply = 0,
418
+ BatteryInadequatePowerSupply = 1,
419
+ BatteryAdequatePowerSupply = 2
420
+ } BATTERY_CHARGING_STATE;
421
+
422
+ //
423
+ // Battery data.
424
+ //
425
+
426
+ typedef struct _BATTERY_NON_CATASTROPHIC_EVENT {
427
+ ULONG BatteryChargeLimitState : 1;
428
+ ULONG BatteryChargingState : 2;
429
+ ULONG Reserved : 29;
430
+ } BATTERY_NON_CATASTROPHIC_EVENT, *PBATTERY_NON_CATASTROPHIC_EVENT;
431
+
432
+ typedef struct _BATTERY_MINIPORT_UPDATE_DATA {
433
+ ULONG Version;
434
+ BATTERY_NON_CATASTROPHIC_EVENT NotifyEvent;
435
+ } BATTERY_MINIPORT_UPDATE_DATA, *PBATTERY_MINIPORT_UPDATE_DATA;
436
+
437
+ typedef BATTERY_MINIPORT_UPDATE_DATA BATTERY_MINIPORT_UPDATE_DATA_V2;
438
+ typedef PBATTERY_MINIPORT_UPDATE_DATA PBATTERY_MINIPORT_UPDATE_DATA_V2;
439
+
440
+ #define BATTERY_MINIPORT_UPDATE_DATA_VER_1 0x00000001
441
+ #define BATTERY_MINIPORT_UPDATE_DATA_VER_2 0x00000002
442
+
443
+ #define BATTERY_MINIPORT_UPDATE_DATA_VER_1_SIZE sizeof(BATTERY_MINIPORT_UPDATE_DATA)
444
+ #define BATTERY_MINIPORT_UPDATE_DATA_VER_2_SIZE sizeof(BATTERY_MINIPORT_UPDATE_DATA_V2)
445
+
446
+ #pragma warning(pop)
447
+
448
+ //
449
+ // Miniport info struct version info.
450
+ //
451
+
452
+ #define BATTERY_CLASS_MAJOR_VERSION 0x0001
453
+ #define BATTERY_CLASS_MINOR_VERSION 0x0000
454
+ #define BATTERY_CLASS_MINOR_VERSION_1 0x0001
455
+ #define BATTERY_CLASS_MINOR_VERSION_2 0x0002
456
+
457
+ #define ADAPTER_CLASS_MAJOR_VERSION 0x0001
458
+ #define ADAPTER_CLASS_MINOR_VERSION 0x0000
459
+
460
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
461
+
462
+ //
463
+ // WMI data block structures
464
+ //
465
+
466
+ typedef struct _BATTERY_WMI_STATUS {
467
+ ULONG Tag;
468
+ ULONG RemainingCapacity;
469
+ LONG ChargeRate;
470
+ LONG DischargeRate;
471
+ ULONG Voltage;
472
+ BOOLEAN PowerOnline;
473
+ BOOLEAN Charging;
474
+ BOOLEAN Discharging;
475
+ BOOLEAN Critical;
476
+ } BATTERY_WMI_STATUS, *PBATTERY_WMI_STATUS;
477
+
478
+ typedef struct _BATTERY_WMI_RUNTIME
479
+ {
480
+ ULONG Tag;
481
+ ULONG EstimatedRuntime;
482
+ } BATTERY_WMI_RUNTIME, *PBATTERY_WMI_RUNTIME;
483
+
484
+ typedef struct _BATTERY_WMI_TEMPERATURE
485
+ {
486
+ ULONG Tag;
487
+ ULONG Temperature;
488
+ } BATTERY_WMI_TEMPERATURE, *PBATTERY_WMI_TEMPERATURE;
489
+
490
+ typedef struct _BATTERY_WMI_FULL_CHARGED_CAPACITY
491
+ {
492
+ ULONG Tag;
493
+ ULONG FullChargedCapacity;
494
+ } BATTERY_WMI_FULL_CHARGED_CAPACITY, *PBATTERY_WMI_FULL_CHARGED_CAPACITY;
495
+
496
+ typedef struct _BATTERY_WMI_CYCLE_COUNT
497
+ {
498
+ ULONG Tag;
499
+ ULONG CycleCount;
500
+ } BATTERY_WMI_CYCLE_COUNT, *PBATTERY_WMI_CYCLE_COUNT;
501
+
502
+ typedef struct _BATTERY_WMI_STATIC_DATA
503
+ {
504
+ ULONG Tag;
505
+ WCHAR ManufactureDate[25];
506
+ BATTERY_REPORTING_SCALE Granularity [4];
507
+ ULONG Capabilities;
508
+ UCHAR Technology;
509
+ ULONG Chemistry;
510
+ ULONG DesignedCapacity;
511
+ ULONG DefaultAlert1;
512
+ ULONG DefaultAlert2;
513
+ ULONG CriticalBias;
514
+ WCHAR Strings[1];
515
+ // Four variable length string values are stored with the first USHORT
516
+ // value containing the length of the string in bytes.
517
+ //
518
+ // Device Name
519
+ // Manufacture Name
520
+ // Serial Number
521
+ // UniqueID
522
+ //
523
+ } BATTERY_WMI_STATIC_DATA, *PBATTERY_WMI_STATIC_DATA;
524
+
525
+ typedef struct _BATTERY_WMI_STATUS_CHANGE
526
+ {
527
+ ULONG Tag;
528
+ BOOLEAN PowerOnline;
529
+ BOOLEAN Charging;
530
+ BOOLEAN Discharging;
531
+ BOOLEAN Critical;
532
+ } BATTERY_WMI_STATUS_CHANGE, *PBATTERY_WMI_STATUS_CHANGE;
533
+
534
+ typedef struct _BATTERY_TAG_CHANGE
535
+ {
536
+ ULONG Tag;
537
+ } BATTERY_TAG_CHANGE, *PBATTERY_TAG_CHANGE;
538
+
539
+ #endif // (NTDDI_VERSION >= NTDDI_WINXP)
540
+
541
+ //
542
+ // Battery class driver functions
543
+ //
544
+
545
+ #if !defined(BATTERYCLASS)
546
+ #define BATTERYCLASSAPI DECLSPEC_IMPORT
547
+ #else
548
+ #define BATTERYCLASSAPI
549
+ #endif
550
+
551
+
552
+ _IRQL_requires_max_(PASSIVE_LEVEL)
553
+ _Check_return_
554
+ NTSTATUS
555
+ BATTERYCLASSAPI
556
+ BatteryClassInitializeDevice (
557
+ _In_ PBATTERY_MINIPORT_INFO MiniportInfo,
558
+ _Out_ PVOID *ClassData
559
+ );
560
+
561
+ _IRQL_requires_max_(PASSIVE_LEVEL)
562
+ NTSTATUS
563
+ BATTERYCLASSAPI
564
+ BatteryClassUnload (
565
+ _In_ PVOID ClassData
566
+ );
567
+
568
+ _IRQL_requires_max_(PASSIVE_LEVEL)
569
+ _Check_return_
570
+ NTSTATUS
571
+ BATTERYCLASSAPI
572
+ BatteryClassIoctl (
573
+ _In_ PVOID ClassData,
574
+ _Inout_ PIRP Irp
575
+ );
576
+
577
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
578
+
579
+ _IRQL_requires_max_(PASSIVE_LEVEL)
580
+ _Check_return_
581
+ NTSTATUS
582
+ BATTERYCLASSAPI
583
+ BatteryClassSystemControl (
584
+ _In_ PVOID ClassData,
585
+ _In_ PVOID WmiLibContext, //PWMILIB_CONTEXT
586
+ _In_ PDEVICE_OBJECT DeviceObject,
587
+ _Inout_ PIRP Irp,
588
+ _Out_ PVOID Disposition //PSYSCTL_IRP_DISPOSITION
589
+ );
590
+
591
+ _IRQL_requires_max_(PASSIVE_LEVEL)
592
+ _Check_return_
593
+ NTSTATUS
594
+ BATTERYCLASSAPI
595
+ BatteryClassQueryWmiDataBlock(
596
+ _In_ PVOID ClassData,
597
+ _Inout_ PDEVICE_OBJECT DeviceObject,
598
+ _Inout_ PIRP Irp,
599
+ _In_ ULONG GuidIndex,
600
+ _Out_writes_(1) PULONG InstanceLengthArray,
601
+ _In_ ULONG OutBufferSize,
602
+ _Out_writes_bytes_opt_(OutBufferSize) PUCHAR Buffer
603
+ );
604
+
605
+ #endif // (NTDDI_VERSION >= NTDDI_WINXP)
606
+
607
+ _IRQL_requires_max_(DISPATCH_LEVEL)
608
+ NTSTATUS
609
+ BATTERYCLASSAPI
610
+ BatteryClassStatusNotify (
611
+ _In_ PVOID ClassData
612
+ );
613
+
614
+ _IRQL_requires_max_(DISPATCH_LEVEL)
615
+ NTSTATUS
616
+ BATTERYCLASSAPI
617
+ BatteryClassPeakPowerNotify (
618
+ _In_ PVOID ClassData
619
+ );
620
+
621
+ _IRQL_requires_max_(PASSIVE_LEVEL)
622
+ _Check_return_
623
+ NTSTATUS
624
+ BATTERYCLASSAPI
625
+ BatteryClassUpdateData (
626
+ _In_ PVOID ClassData,
627
+ _In_ PBATTERY_MINIPORT_UPDATE_DATA UpdateData
628
+ );
629
+
630
+ _IRQL_requires_max_(PASSIVE_LEVEL)
631
+ _Check_return_
632
+ NTSTATUS
633
+ BATTERYCLASSAPI
634
+ AdapterClassInitializeDevice (
635
+ _In_ PADAPTER_MINIPORT_INFO MiniportInfo,
636
+ _Out_ PVOID *ClassData
637
+ );
638
+
639
+ _IRQL_requires_max_(DISPATCH_LEVEL)
640
+ NTSTATUS
641
+ BATTERYCLASSAPI
642
+ AdapterClassStatusNotify (
643
+ _In_ PVOID ClassData
644
+ );
645
+
646
+ _IRQL_requires_max_(PASSIVE_LEVEL)
647
+ NTSTATUS
648
+ BATTERYCLASSAPI
649
+ AdapterClassUnload (
650
+ _In_ PVOID ClassData
651
+ );
652
+
653
+ #endif // _WINDOWS_
654
+
655
+
656
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
657
+ #pragma endregion
658
+
659
+ #endif // _BATCLASS_
660
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/bcrypt.h ADDED
@@ -0,0 +1,2153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //+---------------------------------------------------------------------------
2
+ //
3
+ // Microsoft Windows
4
+ // Copyright (C) Microsoft Corporation, 2004.
5
+ //
6
+ // File: bcrypt.h
7
+ //
8
+ // Contents: Cryptographic Primitive API Prototypes and Definitions
9
+ //
10
+ //----------------------------------------------------------------------------
11
+
12
+ #pragma once
13
+
14
+ //
15
+ // The __BCRYPT_H__ is used by other header files to conditionally define
16
+ // BCrypt-dependent extensions when bcrypt.h has been included.
17
+ //
18
+ #define __BCRYPT_H__
19
+
20
+ #include <winapifamily.h>
21
+
22
+ #if _MSC_VER >= 1200
23
+ #pragma warning(push)
24
+ #pragma warning(disable:4820) // padding added after data member
25
+ #endif
26
+
27
+ #ifdef __cplusplus
28
+ extern "C" {
29
+ #endif
30
+
31
+ #pragma region Desktop Family or OneCore or Games Family
32
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
33
+
34
+ #ifndef WINAPI
35
+ #define WINAPI __stdcall
36
+ #endif
37
+
38
+ #ifndef _NTDEF_
39
+ typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
40
+ typedef NTSTATUS *PNTSTATUS;
41
+ #endif
42
+
43
+ #ifndef BCRYPT_SUCCESS
44
+ #define BCRYPT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
45
+ #endif
46
+
47
+ #ifndef CONST
48
+ #define CONST const
49
+ #endif
50
+
51
+ #ifndef IN
52
+ #define IN
53
+ #endif
54
+
55
+ #ifndef OUT
56
+ #define OUT
57
+ #endif
58
+
59
+ #ifndef OPTIONAL
60
+ #define OPTIONAL
61
+ #endif
62
+
63
+ //
64
+ // Alignment macros
65
+ //
66
+
67
+ //
68
+ // BCRYPT_OBJECT_ALIGNMENT must be a power of 2
69
+ // We align all our internal data structures to 16 to
70
+ // allow fast XMM memory accesses.
71
+ // BCrypt callers do not need to take any alignment precautions.
72
+ //
73
+ #define BCRYPT_OBJECT_ALIGNMENT 16
74
+
75
+ //
76
+ // BCRYPT_STRUCT_ALIGNMENT is an alignment macro that we no longer use.
77
+ // It used to align declspec(align(4)) on x86 and declspec(align(8)) on x64/ia64 but
78
+ // all structures that used it contained a pointer so they were already 4/8 aligned.
79
+ //
80
+ #define BCRYPT_STRUCT_ALIGNMENT
81
+
82
+ //
83
+ // DeriveKey KDF Types
84
+ //
85
+ #define BCRYPT_KDF_HASH L"HASH"
86
+ #define BCRYPT_KDF_HMAC L"HMAC"
87
+ #define BCRYPT_KDF_TLS_PRF L"TLS_PRF"
88
+
89
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
90
+ #define BCRYPT_KDF_SP80056A_CONCAT L"SP800_56A_CONCAT"
91
+ #endif
92
+
93
+ #if (NTDDI_VERSION >= NTDDI_WINBLUE)
94
+ #define BCRYPT_KDF_RAW_SECRET L"TRUNCATE"
95
+ #endif
96
+
97
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
98
+ #define BCRYPT_KDF_HKDF L"HKDF"
99
+ #endif
100
+
101
+ //
102
+ // DeriveKey KDF BufferTypes
103
+ //
104
+ // For BCRYPT_KDF_HASH and BCRYPT_KDF_HMAC operations, there may be an arbitrary
105
+ // number of KDF_SECRET_PREPEND and KDF_SECRET_APPEND buffertypes in the
106
+ // parameter list. The BufferTypes are processed in order of appearence
107
+ // within the parameter list.
108
+ //
109
+ #define KDF_HASH_ALGORITHM 0x0
110
+ #define KDF_SECRET_PREPEND 0x1
111
+ #define KDF_SECRET_APPEND 0x2
112
+ #define KDF_HMAC_KEY 0x3
113
+ #define KDF_TLS_PRF_LABEL 0x4
114
+ #define KDF_TLS_PRF_SEED 0x5
115
+ #define KDF_SECRET_HANDLE 0x6
116
+
117
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
118
+ #define KDF_TLS_PRF_PROTOCOL 0x7
119
+ #define KDF_ALGORITHMID 0x8
120
+ #define KDF_PARTYUINFO 0x9
121
+ #define KDF_PARTYVINFO 0xA
122
+ #define KDF_SUPPPUBINFO 0xB
123
+ #define KDF_SUPPPRIVINFO 0xC
124
+ #endif
125
+
126
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
127
+ #define KDF_LABEL 0xD
128
+ #define KDF_CONTEXT 0xE
129
+ #define KDF_SALT 0xF
130
+ #define KDF_ITERATION_COUNT 0x10
131
+ //
132
+ //
133
+ // Parameters for BCrypt(/NCrypt)KeyDerivation:
134
+ // Generic parameters:
135
+ // KDF_GENERIC_PARAMETER and KDF_HASH_ALGORITHM are the generic parameters that can be passed for the following KDF algorithms:
136
+ // BCRYPT/NCRYPT_SP800108_CTR_HMAC_ALGORITHM
137
+ // KDF_GENERIC_PARAMETER = KDF_LABEL||0x00||KDF_CONTEXT
138
+ // BCRYPT/NCRYPT_SP80056A_CONCAT_ALGORITHM
139
+ // KDF_GENERIC_PARAMETER = KDF_ALGORITHMID || KDF_PARTYUINFO || KDF_PARTYVINFO {|| KDF_SUPPPUBINFO } {|| KDF_SUPPPRIVINFO }
140
+ // BCRYPT/NCRYPT_PBKDF2_ALGORITHM
141
+ // KDF_GENERIC_PARAMETER = KDF_SALT
142
+ // BCRYPT/NCRYPT_CAPI_KDF_ALGORITHM
143
+ // KDF_GENERIC_PARAMETER = Not used
144
+ // BCRYPT/NCRYPT_TLS1_1_KDF_ALGORITHM
145
+ // KDF_GENERIC_PARAMETER = Not used
146
+ // BCRYPT/NCRYPT_TLS1_2_KDF_ALGORITHM
147
+ // KDF_GENERIC_PARAMETER = Not used
148
+ // BCRYPT/NCRYPT_HKDF_ALGORITHM
149
+ // KDF_GENERIC_PARAMETER = Not used
150
+ //
151
+ // KDF specific parameters:
152
+ // For BCRYPT/NCRYPT_SP800108_CTR_HMAC_ALGORITHM:
153
+ // KDF_HASH_ALGORITHM, KDF_LABEL and KDF_CONTEXT are required
154
+ // For BCRYPT/NCRYPT_SP80056A_CONCAT_ALGORITHM:
155
+ // KDF_HASH_ALGORITHM, KDF_ALGORITHMID, KDF_PARTYUINFO, KDF_PARTYVINFO are required
156
+ // KDF_SUPPPUBINFO, KDF_SUPPPRIVINFO are optional
157
+ // For BCRYPT/NCRYPT_PBKDF2_ALGORITHM
158
+ // KDF_HASH_ALGORITHM is required
159
+ // KDF_ITERATION_COUNT, KDF_SALT are optional
160
+ // Iteration count, (if not specified) will default to 10,000
161
+ // For BCRYPT/NCRYPT_CAPI_KDF_ALGORITHM
162
+ // KDF_HASH_ALGORITHM is required
163
+ // For BCRYPT/NCRYPT_TLS1_1_KDF_ALGORITHM
164
+ // KDF_TLS_PRF_LABEL is required
165
+ // KDF_TLS_PRF_SEED is required
166
+ // For BCRYPT/NCRYPT_TLS1_2_KDF_ALGORITHM
167
+ // KDF_HASH_ALGORITHM is required
168
+ // KDF_TLS_PRF_LABEL is required
169
+ // KDF_TLS_PRF_SEED is required
170
+ // For BCRYPT/NCRYPT_HKDF_ALGORITHM
171
+ // KDF_HKDF_INFO is optional
172
+ //
173
+ #define KDF_GENERIC_PARAMETER 0x11
174
+ #define KDF_KEYBITLENGTH 0x12
175
+ #endif
176
+
177
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
178
+ #define KDF_HKDF_SALT 0x13 // This is used only for testing purposes
179
+ #define KDF_HKDF_INFO 0x14
180
+ #endif
181
+
182
+
183
+ //
184
+ // DeriveKey Flags:
185
+ //
186
+ // KDF_USE_SECRET_AS_HMAC_KEY_FLAG causes the secret agreement to serve also
187
+ // as the HMAC key. If this flag is used, the KDF_HMAC_KEY parameter should
188
+ // NOT be specified.
189
+ //
190
+ #define KDF_USE_SECRET_AS_HMAC_KEY_FLAG 0x1
191
+
192
+ //
193
+ // BCrypt structs
194
+ //
195
+
196
+ typedef struct __BCRYPT_KEY_LENGTHS_STRUCT
197
+ {
198
+ ULONG dwMinLength;
199
+ ULONG dwMaxLength;
200
+ ULONG dwIncrement;
201
+ } BCRYPT_KEY_LENGTHS_STRUCT;
202
+
203
+ typedef BCRYPT_KEY_LENGTHS_STRUCT BCRYPT_AUTH_TAG_LENGTHS_STRUCT;
204
+
205
+ typedef struct _BCRYPT_OID
206
+ {
207
+ ULONG cbOID;
208
+ PUCHAR pbOID;
209
+ } BCRYPT_OID;
210
+
211
+ typedef struct _BCRYPT_OID_LIST
212
+ {
213
+ ULONG dwOIDCount;
214
+ BCRYPT_OID *pOIDs;
215
+ } BCRYPT_OID_LIST;
216
+
217
+ typedef struct _BCRYPT_PKCS1_PADDING_INFO
218
+ {
219
+ LPCWSTR pszAlgId;
220
+ } BCRYPT_PKCS1_PADDING_INFO;
221
+
222
+ typedef struct _BCRYPT_PSS_PADDING_INFO
223
+ {
224
+ LPCWSTR pszAlgId;
225
+ ULONG cbSalt;
226
+ } BCRYPT_PSS_PADDING_INFO;
227
+
228
+ typedef struct _BCRYPT_OAEP_PADDING_INFO
229
+ {
230
+ LPCWSTR pszAlgId;
231
+ PUCHAR pbLabel;
232
+ ULONG cbLabel;
233
+ } BCRYPT_OAEP_PADDING_INFO;
234
+
235
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
236
+ typedef struct _BCRYPT_PQDSA_PADDING_INFO {
237
+ PUCHAR pbCtx;
238
+ ULONG cbCtx;
239
+ LPCWSTR pszPrehashAlgId;
240
+ } BCRYPT_PQDSA_PADDING_INFO;
241
+ #endif
242
+
243
+ #define BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION 1
244
+
245
+ #define BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG 0x00000001
246
+ #define BCRYPT_AUTH_MODE_IN_PROGRESS_FLAG 0x00000002
247
+
248
+ typedef struct _BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO
249
+ {
250
+ ULONG cbSize;
251
+ ULONG dwInfoVersion;
252
+ PUCHAR pbNonce;
253
+ ULONG cbNonce;
254
+ PUCHAR pbAuthData;
255
+ ULONG cbAuthData;
256
+ PUCHAR pbTag;
257
+ ULONG cbTag;
258
+ PUCHAR pbMacContext;
259
+ ULONG cbMacContext;
260
+ ULONG cbAAD;
261
+ ULONGLONG cbData;
262
+ ULONG dwFlags;
263
+ } BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO, *PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO;
264
+
265
+ #define BCRYPT_INIT_AUTH_MODE_INFO(_AUTH_INFO_STRUCT_) \
266
+ RtlZeroMemory((&_AUTH_INFO_STRUCT_), sizeof(BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO)); \
267
+ (_AUTH_INFO_STRUCT_).cbSize = sizeof(BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO); \
268
+ (_AUTH_INFO_STRUCT_).dwInfoVersion = BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION;
269
+
270
+ //
271
+ // BCrypt String Properties
272
+ //
273
+
274
+ // BCrypt(Import/Export)Key BLOB types
275
+ #define BCRYPT_OPAQUE_KEY_BLOB L"OpaqueKeyBlob"
276
+ #define BCRYPT_KEY_DATA_BLOB L"KeyDataBlob"
277
+
278
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
279
+ #define BCRYPT_AES_WRAP_KEY_BLOB L"Rfc3565KeyWrapBlob"
280
+ #endif
281
+
282
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GA)
283
+
284
+ #define BCRYPT_PKCS11_RSA_AES_WRAP_KEY_BLOB L"PKCS11RsaAesWrapBlob"
285
+
286
+ #define BCRYPT_PKCS11_RSA_AES_WRAP_BLOB_MAGIC 0x57504152 // 'RAPW' for RSA-AES-PAD-WRAP (PKCS11-RSA-AES-WRAP)
287
+ typedef struct _BCRYPT_PKCS11_RSA_AES_WRAP_BLOB {
288
+ ULONG dwMagic; // BCRYPT_PKCS11_RSA_AES_WRAP_BLOB_MAGIC
289
+ ULONG cbKey; // Number of bytes in the binary PKCS#11 wrapped key blob
290
+ ULONG cbPaddingAlgId; // Number of bytes in OAEP Padding algorithm per OAEPParams in PKCS#11 specification
291
+ ULONG cbPaddingLabel; // Number of bytes in OAEP Padding label per OAEPParams in PKCS#11 specification
292
+ // UCHAR Key[cbKey]; -- PKCS#11 binary blob
293
+ // UCHAR PaddingAlgId[cbPaddingAlgId]; -- OAEP Padding information for PKCS#11 unwrapping
294
+ // UCHAR PaddingLabel[cbPaddingLabel]; -- OAEP Padding information for PKCS#11 unwrapping
295
+ } BCRYPT_PKCS11_RSA_AES_WRAP_BLOB, *PBCRYPT_PKCS11_RSA_AES_WRAP_BLOB;
296
+
297
+ #endif // #if (NTDDI_VERSION >= NTDDI_WIN11_GA)
298
+ // BCryptGetProperty strings
299
+ #define BCRYPT_OBJECT_LENGTH L"ObjectLength"
300
+ #define BCRYPT_ALGORITHM_NAME L"AlgorithmName"
301
+ #define BCRYPT_PROVIDER_HANDLE L"ProviderHandle"
302
+ #define BCRYPT_CHAINING_MODE L"ChainingMode"
303
+ #define BCRYPT_BLOCK_LENGTH L"BlockLength"
304
+ #define BCRYPT_KEY_LENGTH L"KeyLength"
305
+ #define BCRYPT_KEY_OBJECT_LENGTH L"KeyObjectLength"
306
+ #define BCRYPT_KEY_STRENGTH L"KeyStrength"
307
+ #define BCRYPT_KEY_LENGTHS L"KeyLengths"
308
+ #define BCRYPT_BLOCK_SIZE_LIST L"BlockSizeList"
309
+ #define BCRYPT_EFFECTIVE_KEY_LENGTH L"EffectiveKeyLength"
310
+ #define BCRYPT_HASH_LENGTH L"HashDigestLength"
311
+ #define BCRYPT_HASH_OID_LIST L"HashOIDList"
312
+ #define BCRYPT_PADDING_SCHEMES L"PaddingSchemes"
313
+ #define BCRYPT_SIGNATURE_LENGTH L"SignatureLength"
314
+ #define BCRYPT_HASH_BLOCK_LENGTH L"HashBlockLength"
315
+ #define BCRYPT_AUTH_TAG_LENGTH L"AuthTagLength"
316
+
317
+ #if (NTDDI_VERSION >= NTDDI_WIN11_ZN)
318
+ #define BCRYPT_FUNCTION_NAME_STRING L"FunctionNameString"
319
+ #define BCRYPT_CUSTOMIZATION_STRING L"CustomizationString"
320
+ #endif
321
+
322
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
323
+ #define BCRYPT_PRIMITIVE_TYPE L"PrimitiveType"
324
+ #define BCRYPT_IS_KEYED_HASH L"IsKeyedHash"
325
+ #endif
326
+
327
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
328
+ #define BCRYPT_IS_REUSABLE_HASH L"IsReusableHash"
329
+ #define BCRYPT_MESSAGE_BLOCK_LENGTH L"MessageBlockLength"
330
+ #endif
331
+
332
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
333
+ #define BCRYPT_PUBLIC_KEY_LENGTH L"PublicKeyLength"
334
+ #endif
335
+
336
+ // Additional BCryptGetProperty strings for the RNG Platform Crypto Provider
337
+ #define BCRYPT_PCP_PLATFORM_TYPE_PROPERTY L"PCP_PLATFORM_TYPE"
338
+ #define BCRYPT_PCP_PROVIDER_VERSION_PROPERTY L"PCP_PROVIDER_VERSION"
339
+
340
+ #if (NTDDI_VERSION > NTDDI_WINBLUE || (NTDDI_VERSION == NTDDI_WINBLUE && defined(WINBLUE_KBSPRING14)))
341
+ #define BCRYPT_MULTI_OBJECT_LENGTH L"MultiObjectLength"
342
+ #endif
343
+
344
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
345
+ #define BCRYPT_IS_IFX_TPM_WEAK_KEY L"IsIfxTpmWeakKey"
346
+
347
+ //
348
+ // Additional properties for the HKDF on BCRYPT_KEY_HANDLE (and
349
+ // BCRYPT_SECRET_HANDLE). Both the hash algorithm property and
350
+ // one of the "Finalize" properties are required for the key
351
+ // (or secret) to be usable.
352
+ //
353
+ // When the available inputs are the input keying material (IKM)
354
+ // and the salt then the "SALT_AND_FINALIZE" path should be used:
355
+ // - First the function which creates the key (or secret) takes
356
+ // as input the IKM.
357
+ // - Then the hash algorithm should be set via the BCRYPT_HKDF_HASH_ALGORITHM
358
+ // property on BCryptSetProperty.
359
+ // - Finally the salt is input via the BCRYPT_HKDF_SALT_AND_FINALIZE
360
+ // property. The salt parameter is optional; thus the property input
361
+ // is allowed to be NULL.
362
+ //
363
+ // When the available input is the pseudorandom key (PRK) then
364
+ // the "PRK_AND_FINALIZE" path should be used:
365
+ // - First the function which creates the key (or secret) takes
366
+ // as input the PRK.
367
+ // - Then the hash algorithm should be set via the BCRYPT_HKDF_HASH_ALGORITHM
368
+ // property on BCryptSetProperty.
369
+ // - Finally the key (or secret) is finalized via the
370
+ // BCRYPT_HKDF_PRK_AND_FINALIZE property. In this case the input property
371
+ // must be NULL since the PRK was already passed in.
372
+ //
373
+ // After setting one of the two "Finalize" properties the key
374
+ // (or the secret) is finalized and can be used to derive the
375
+ // HKDF output.
376
+ //
377
+ #define BCRYPT_HKDF_HASH_ALGORITHM L"HkdfHashAlgorithm"
378
+ #define BCRYPT_HKDF_SALT_AND_FINALIZE L"HkdfSaltAndFinalize"
379
+ #define BCRYPT_HKDF_PRK_AND_FINALIZE L"HkdfPrkAndFinalize"
380
+
381
+ #endif
382
+
383
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
384
+ #define BCRYPT_KEM_SHARED_SECRET_LENGTH L"KEMSharedSecretLength"
385
+ #define BCRYPT_KEM_CIPHERTEXT_LENGTH L"KEMCiphertextLength"
386
+ #define BCRYPT_PARAMETER_SET_NAME L"ParameterSetName"
387
+ #endif
388
+
389
+ // BCryptSetProperty strings
390
+ #define BCRYPT_INITIALIZATION_VECTOR L"IV"
391
+
392
+ // Property Strings
393
+ #define BCRYPT_CHAIN_MODE_NA L"ChainingModeN/A"
394
+ #define BCRYPT_CHAIN_MODE_CBC L"ChainingModeCBC"
395
+ #define BCRYPT_CHAIN_MODE_ECB L"ChainingModeECB"
396
+ #define BCRYPT_CHAIN_MODE_CFB L"ChainingModeCFB"
397
+ #define BCRYPT_CHAIN_MODE_CCM L"ChainingModeCCM"
398
+ #define BCRYPT_CHAIN_MODE_GCM L"ChainingModeGCM"
399
+
400
+ // Supported RSA Padding Types
401
+ #define BCRYPT_SUPPORTED_PAD_ROUTER 0x00000001
402
+ #define BCRYPT_SUPPORTED_PAD_PKCS1_ENC 0x00000002
403
+ #define BCRYPT_SUPPORTED_PAD_PKCS1_SIG 0x00000004
404
+ #define BCRYPT_SUPPORTED_PAD_OAEP 0x00000008
405
+ #define BCRYPT_SUPPORTED_PAD_PSS 0x00000010
406
+
407
+ //
408
+ // BCrypt Flags
409
+ //
410
+
411
+ #define BCRYPT_PROV_DISPATCH 0x00000001 // BCryptOpenAlgorithmProvider
412
+
413
+ #define BCRYPT_BLOCK_PADDING 0x00000001 // BCryptEncrypt/Decrypt
414
+
415
+ #if (NTDDI_VERSION >= NTDDI_WIN10_CO)
416
+ #define BCRYPT_GENERATE_IV 0x00000020 // BCryptGenerateSymmetricKey BCryptEncrypt
417
+ #endif
418
+
419
+ // RSA padding schemes
420
+ #define BCRYPT_PAD_NONE 0x00000001
421
+ #define BCRYPT_PAD_PKCS1 0x00000002 // BCryptEncrypt/Decrypt BCryptSignHash/VerifySignature
422
+ #define BCRYPT_PAD_OAEP 0x00000004 // BCryptEncrypt/Decrypt
423
+ #define BCRYPT_PAD_PSS 0x00000008 // BCryptSignHash/VerifySignature
424
+ #if (NTDDI_VERSION >= NTDDI_WINBLUE)
425
+ #define BCRYPT_PAD_PKCS1_OPTIONAL_HASH_OID 0x00000010 //BCryptVerifySignature
426
+ #endif
427
+
428
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
429
+ #define BCRYPT_PAD_PQDSA 0x00000020 // BCryptSignHash/VerifySignature
430
+ #define BCRYPT_MLDSA_EXTERNAL_MU 0x00000040 // BCryptSignHash/VerifySignature
431
+ #endif
432
+
433
+ #define BCRYPTBUFFER_VERSION 0
434
+
435
+ typedef struct _BCryptBuffer {
436
+ ULONG cbBuffer; // Length of buffer, in bytes
437
+ ULONG BufferType; // Buffer type
438
+ PVOID pvBuffer; // Pointer to buffer
439
+ } BCryptBuffer, * PBCryptBuffer;
440
+
441
+ typedef struct _BCryptBufferDesc {
442
+ ULONG ulVersion; // Version number
443
+ ULONG cBuffers; // Number of buffers
444
+ PBCryptBuffer pBuffers; // Pointer to array of buffers
445
+ } BCryptBufferDesc, * PBCryptBufferDesc;
446
+
447
+ //
448
+ // Primitive handles
449
+ //
450
+
451
+ typedef PVOID BCRYPT_HANDLE;
452
+ typedef PVOID BCRYPT_ALG_HANDLE;
453
+ typedef PVOID BCRYPT_KEY_HANDLE;
454
+ typedef PVOID BCRYPT_HASH_HANDLE;
455
+ typedef PVOID BCRYPT_SECRET_HANDLE;
456
+
457
+ //
458
+ // Structures used to represent key blobs.
459
+ //
460
+
461
+ #define BCRYPT_PUBLIC_KEY_BLOB L"PUBLICBLOB"
462
+ #define BCRYPT_PRIVATE_KEY_BLOB L"PRIVATEBLOB"
463
+
464
+ typedef struct _BCRYPT_KEY_BLOB
465
+ {
466
+ ULONG Magic;
467
+ } BCRYPT_KEY_BLOB;
468
+
469
+ // The BCRYPT_RSAPUBLIC_BLOB and BCRYPT_RSAPRIVATE_BLOB blob types are used
470
+ // to transport plaintext RSA keys. These blob types will be supported by
471
+ // all RSA primitive providers.
472
+ // The BCRYPT_RSAPRIVATE_BLOB includes the following values:
473
+ // Public Exponent
474
+ // Modulus
475
+ // Prime1
476
+ // Prime2
477
+
478
+ #define BCRYPT_RSAPUBLIC_BLOB L"RSAPUBLICBLOB"
479
+ #define BCRYPT_RSAPRIVATE_BLOB L"RSAPRIVATEBLOB"
480
+ #define LEGACY_RSAPUBLIC_BLOB L"CAPIPUBLICBLOB"
481
+ #define LEGACY_RSAPRIVATE_BLOB L"CAPIPRIVATEBLOB"
482
+
483
+ #define BCRYPT_RSAPUBLIC_MAGIC 0x31415352 // RSA1
484
+ #define BCRYPT_RSAPRIVATE_MAGIC 0x32415352 // RSA2
485
+
486
+ typedef struct _BCRYPT_RSAKEY_BLOB
487
+ {
488
+ ULONG Magic;
489
+ ULONG BitLength;
490
+ ULONG cbPublicExp;
491
+ ULONG cbModulus;
492
+ ULONG cbPrime1;
493
+ ULONG cbPrime2;
494
+ } BCRYPT_RSAKEY_BLOB;
495
+
496
+ // The BCRYPT_RSAFULLPRIVATE_BLOB blob type is used to transport
497
+ // plaintext private RSA keys. It includes the following values:
498
+ // Public Exponent
499
+ // Modulus
500
+ // Prime1
501
+ // Prime2
502
+ // Private Exponent mod (Prime1 - 1)
503
+ // Private Exponent mod (Prime2 - 1)
504
+ // Inverse of Prime2 mod Prime1
505
+ // PrivateExponent
506
+ #define BCRYPT_RSAFULLPRIVATE_BLOB L"RSAFULLPRIVATEBLOB"
507
+
508
+ #define BCRYPT_RSAFULLPRIVATE_MAGIC 0x33415352 // RSA3
509
+
510
+ //Properties of secret agreement algorithms
511
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
512
+ #define BCRYPT_GLOBAL_PARAMETERS L"SecretAgreementParam"
513
+ #define BCRYPT_PRIVATE_KEY L"PrivKeyVal"
514
+ #endif
515
+
516
+ // The BCRYPT_ECCPUBLIC_BLOB and BCRYPT_ECCPRIVATE_BLOB blob types are used
517
+ // to transport plaintext ECC keys. These blob types will be supported by
518
+ // all ECC primitive providers.
519
+ #define BCRYPT_ECCPUBLIC_BLOB L"ECCPUBLICBLOB"
520
+ #define BCRYPT_ECCPRIVATE_BLOB L"ECCPRIVATEBLOB"
521
+
522
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
523
+ #define BCRYPT_ECCFULLPUBLIC_BLOB L"ECCFULLPUBLICBLOB"
524
+ #define BCRYPT_ECCFULLPRIVATE_BLOB L"ECCFULLPRIVATEBLOB"
525
+ #define SSL_ECCPUBLIC_BLOB L"SSLECCPUBLICBLOB"
526
+ #endif
527
+ #define TLS_13_PRE_SHARED_KEY L"TLS13PRESHAREDKEY"
528
+
529
+ #define BCRYPT_ECDH_PUBLIC_P256_MAGIC 0x314B4345 // ECK1
530
+ #define BCRYPT_ECDH_PRIVATE_P256_MAGIC 0x324B4345 // ECK2
531
+ #define BCRYPT_ECDH_PUBLIC_P384_MAGIC 0x334B4345 // ECK3
532
+ #define BCRYPT_ECDH_PRIVATE_P384_MAGIC 0x344B4345 // ECK4
533
+ #define BCRYPT_ECDH_PUBLIC_P521_MAGIC 0x354B4345 // ECK5
534
+ #define BCRYPT_ECDH_PRIVATE_P521_MAGIC 0x364B4345 // ECK6
535
+
536
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
537
+ #define BCRYPT_ECDH_PUBLIC_GENERIC_MAGIC 0x504B4345 // ECKP
538
+ #define BCRYPT_ECDH_PRIVATE_GENERIC_MAGIC 0x564B4345 // ECKV
539
+ #endif
540
+
541
+ #define BCRYPT_ECDSA_PUBLIC_P256_MAGIC 0x31534345 // ECS1
542
+ #define BCRYPT_ECDSA_PRIVATE_P256_MAGIC 0x32534345 // ECS2
543
+ #define BCRYPT_ECDSA_PUBLIC_P384_MAGIC 0x33534345 // ECS3
544
+ #define BCRYPT_ECDSA_PRIVATE_P384_MAGIC 0x34534345 // ECS4
545
+ #define BCRYPT_ECDSA_PUBLIC_P521_MAGIC 0x35534345 // ECS5
546
+ #define BCRYPT_ECDSA_PRIVATE_P521_MAGIC 0x36534345 // ECS6
547
+
548
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
549
+ #define BCRYPT_ECDSA_PUBLIC_GENERIC_MAGIC 0x50444345 // ECDP
550
+ #define BCRYPT_ECDSA_PRIVATE_GENERIC_MAGIC 0x56444345 // ECDV
551
+ #endif
552
+
553
+ typedef struct _BCRYPT_ECCKEY_BLOB
554
+ {
555
+ ULONG dwMagic;
556
+ ULONG cbKey;
557
+ } BCRYPT_ECCKEY_BLOB, *PBCRYPT_ECCKEY_BLOB;
558
+
559
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
560
+ //SSL ECC Public Blob Version
561
+ typedef struct _SSL_ECCKEY_BLOB
562
+ {
563
+ ULONG dwCurveType;
564
+ ULONG cbKey;
565
+ } SSL_ECCKEY_BLOB, *PSSL_ECCKEY_BLOB;
566
+
567
+ //ECC Full versions
568
+ #define BCRYPT_ECC_FULLKEY_BLOB_V1 0x1
569
+
570
+ typedef enum
571
+ {
572
+ BCRYPT_ECC_PRIME_SHORT_WEIERSTRASS_CURVE = 0x1,
573
+ BCRYPT_ECC_PRIME_TWISTED_EDWARDS_CURVE = 0x2,
574
+ BCRYPT_ECC_PRIME_MONTGOMERY_CURVE = 0x3
575
+ } ECC_CURVE_TYPE_ENUM;
576
+
577
+ typedef enum
578
+ {
579
+ BCRYPT_NO_CURVE_GENERATION_ALG_ID = 0x0
580
+ } ECC_CURVE_ALG_ID_ENUM;
581
+
582
+ //The full version contains the curve parameters as well
583
+ //as the public and potentially private exponent.
584
+ typedef struct _BCRYPT_ECCFULLKEY_BLOB
585
+ {
586
+ ULONG dwMagic;
587
+ ULONG dwVersion; //Version of the structure
588
+ ECC_CURVE_TYPE_ENUM dwCurveType; //Supported curve types.
589
+ ECC_CURVE_ALG_ID_ENUM dwCurveGenerationAlgId; //For X.592 verification purposes, if we include Seed we will need to include the algorithm ID.
590
+ ULONG cbFieldLength; //Byte length of the fields P, A, B, X, Y.
591
+ ULONG cbSubgroupOrder; //Byte length of the subgroup.
592
+ ULONG cbCofactor; //Byte length of cofactor of G in E.
593
+ ULONG cbSeed; //Byte length of the seed used to generate the curve.
594
+ //P[cbFieldLength] Prime specifying the base field.
595
+ //A[cbFieldLength] Coefficient A of the equation y^2 = x^3 + A*x + B mod p
596
+ //B[cbFieldLength] Coefficient B of the equation y^2 = x^3 + A*x + B mod p
597
+ //Gx[cbFieldLength] X-coordinate of the base point.
598
+ //Gy[cbFieldLength] Y-coordinate of the base point.
599
+ //n[cbSubgroupOrder] Order of the group generated by G = (x,y)
600
+ //h[cbCofactor] Cofactor of G in E.
601
+ //S[cbSeed] Seed of the curve.
602
+ //Qx[cbFieldLength] X-coordinate of the public point.
603
+ //Qy[cbFieldLength] Y-coordinate of the public point.
604
+ //d[cbSubgroupOrder] Private key. Not always present.
605
+ } BCRYPT_ECCFULLKEY_BLOB, *PBCRYPT_ECCFULLKEY_BLOB;
606
+ #endif
607
+
608
+ // The BCRYPT_DH_PUBLIC_BLOB and BCRYPT_DH_PRIVATE_BLOB blob types are used
609
+ // to transport plaintext DH keys. These blob types will be supported by
610
+ // all DH primitive providers.
611
+ #define BCRYPT_DH_PUBLIC_BLOB L"DHPUBLICBLOB"
612
+ #define BCRYPT_DH_PRIVATE_BLOB L"DHPRIVATEBLOB"
613
+ #define LEGACY_DH_PUBLIC_BLOB L"CAPIDHPUBLICBLOB"
614
+ #define LEGACY_DH_PRIVATE_BLOB L"CAPIDHPRIVATEBLOB"
615
+
616
+ #define BCRYPT_DH_PUBLIC_MAGIC 0x42504844 // DHPB
617
+ #define BCRYPT_DH_PRIVATE_MAGIC 0x56504844 // DHPV
618
+
619
+ typedef struct _BCRYPT_DH_KEY_BLOB
620
+ {
621
+ ULONG dwMagic;
622
+ ULONG cbKey;
623
+ } BCRYPT_DH_KEY_BLOB, *PBCRYPT_DH_KEY_BLOB;
624
+
625
+ // Property Strings for DH
626
+ #define BCRYPT_DH_PARAMETERS L"DHParameters"
627
+
628
+ #define BCRYPT_DH_PARAMETERS_MAGIC 0x4d504844 // DHPM
629
+
630
+ typedef _Struct_size_bytes_(cbLength) struct _BCRYPT_DH_PARAMETER_HEADER
631
+ {
632
+ ULONG cbLength;
633
+ ULONG dwMagic;
634
+ ULONG cbKeyLength;
635
+ } BCRYPT_DH_PARAMETER_HEADER;
636
+
637
+
638
+ // The BCRYPT_DSA_PUBLIC_BLOB and BCRYPT_DSA_PRIVATE_BLOB blob types are used
639
+ // to transport plaintext DSA keys. These blob types will be supported by
640
+ // all DSA primitive providers.
641
+ #define BCRYPT_DSA_PUBLIC_BLOB L"DSAPUBLICBLOB"
642
+ #define BCRYPT_DSA_PRIVATE_BLOB L"DSAPRIVATEBLOB"
643
+ #define LEGACY_DSA_PUBLIC_BLOB L"CAPIDSAPUBLICBLOB"
644
+ #define LEGACY_DSA_PRIVATE_BLOB L"CAPIDSAPRIVATEBLOB"
645
+ #define LEGACY_DSA_V2_PUBLIC_BLOB L"V2CAPIDSAPUBLICBLOB"
646
+ #define LEGACY_DSA_V2_PRIVATE_BLOB L"V2CAPIDSAPRIVATEBLOB"
647
+
648
+ #define BCRYPT_DSA_PUBLIC_MAGIC 0x42505344 // DSPB
649
+ #define BCRYPT_DSA_PRIVATE_MAGIC 0x56505344 // DSPV
650
+
651
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
652
+ #define BCRYPT_DSA_PUBLIC_MAGIC_V2 0x32425044 // DPB2
653
+ #define BCRYPT_DSA_PRIVATE_MAGIC_V2 0x32565044 // DPV2
654
+ #endif
655
+
656
+ typedef struct _BCRYPT_DSA_KEY_BLOB
657
+ {
658
+ ULONG dwMagic;
659
+ ULONG cbKey;
660
+ UCHAR Count[4];
661
+ UCHAR Seed[20];
662
+ UCHAR q[20];
663
+ } BCRYPT_DSA_KEY_BLOB, *PBCRYPT_DSA_KEY_BLOB;
664
+
665
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
666
+ typedef enum
667
+ {
668
+ DSA_HASH_ALGORITHM_SHA1,
669
+ DSA_HASH_ALGORITHM_SHA256,
670
+ DSA_HASH_ALGORITHM_SHA512
671
+ } HASHALGORITHM_ENUM;
672
+
673
+ typedef enum
674
+ {
675
+ DSA_FIPS186_2,
676
+ DSA_FIPS186_3
677
+ } DSAFIPSVERSION_ENUM;
678
+
679
+ typedef struct _BCRYPT_DSA_KEY_BLOB_V2
680
+ {
681
+ ULONG dwMagic;
682
+ ULONG cbKey;
683
+ HASHALGORITHM_ENUM hashAlgorithm;
684
+ DSAFIPSVERSION_ENUM standardVersion;
685
+ ULONG cbSeedLength;
686
+ ULONG cbGroupSize;
687
+ UCHAR Count[4];
688
+ } BCRYPT_DSA_KEY_BLOB_V2, *PBCRYPT_DSA_KEY_BLOB_V2;
689
+ #endif
690
+
691
+ typedef struct _BCRYPT_KEY_DATA_BLOB_HEADER
692
+ {
693
+ ULONG dwMagic;
694
+ ULONG dwVersion;
695
+ ULONG cbKeyData;
696
+ } BCRYPT_KEY_DATA_BLOB_HEADER, *PBCRYPT_KEY_DATA_BLOB_HEADER;
697
+
698
+ #define BCRYPT_KEY_DATA_BLOB_MAGIC 0x4d42444b //Key Data Blob Magic (KDBM)
699
+
700
+ #define BCRYPT_KEY_DATA_BLOB_VERSION1 0x1
701
+
702
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
703
+ #define BCRYPT_MLDSA_PUBLIC_MAGIC 0x4B505344 // DSPK
704
+ #define BCRYPT_MLDSA_PRIVATE_MAGIC 0x4B535344 // DSSK
705
+ #define BCRYPT_MLDSA_PRIVATE_SEED_MAGIC 0x53535344 // DSSS
706
+
707
+ #define BCRYPT_SLHDSA_PUBLIC_MAGIC 0x4B504853 // SHPK
708
+ #define BCRYPT_SLHDSA_PRIVATE_MAGIC 0x4B534853 // SHSK
709
+
710
+ #define BCRYPT_LMS_PUBLIC_MAGIC 0x4B504D4C // LMPK
711
+ #define BCRYPT_XMSS_PUBLIC_MAGIC 0x4B504D58 // XMPK
712
+
713
+ #define BCRYPT_PQDSA_PUBLIC_BLOB L"PQDSAPUBLICBLOB"
714
+ #define BCRYPT_PQDSA_PRIVATE_BLOB L"PQDSAPRIVATEBLOB"
715
+ #define BCRYPT_PQDSA_PRIVATE_SEED_BLOB L"PQDSAPRIVATESEEDBLOB"
716
+
717
+ typedef struct BCRYPT_PQDSA_KEY_BLOB {
718
+ ULONG dwMagic;
719
+ ULONG cbParameterSet; // Byte size of parameterSet[]
720
+ ULONG cbKey; // Byte size of key[]
721
+ // WCHAR parameterSet[cbParameterSet / sizeof(WCHAR)]; // For ML-DSA and SLH-DSA, \0-terminated
722
+ // BYTE key[cbKey]; // Key material
723
+ } BCRYPT_PQDSA_KEY_BLOB, *PBCRYPT_PQDSA_KEY_BLOB;
724
+
725
+ #define BCRYPT_MLKEM_PUBLIC_MAGIC 0x504B4C4D // MLKP
726
+ #define BCRYPT_MLKEM_PRIVATE_MAGIC 0x524B4C4D // MLKR
727
+ #define BCRYPT_MLKEM_PRIVATE_SEED_MAGIC 0x534B4C4D // MLKS
728
+
729
+ #define BCRYPT_MLKEM_PUBLIC_BLOB L"MLKEMPUBLICBLOB"
730
+ #define BCRYPT_MLKEM_PRIVATE_BLOB L"MLKEMPRIVATEBLOB"
731
+ #define BCRYPT_MLKEM_PRIVATE_SEED_BLOB L"MLKEMPRIVATESEEDBLOB"
732
+ #define BCRYPT_MLKEM_ENCAPSULATION_BLOB BCRYPT_MLKEM_PUBLIC_BLOB
733
+ #define BCRYPT_MLKEM_DECAPSULATION_BLOB BCRYPT_MLKEM_PRIVATE_BLOB
734
+
735
+ typedef struct BCRYPT_MLKEM_KEY_BLOB
736
+ {
737
+ ULONG dwMagic;
738
+ ULONG cbParameterSet; // Byte size of parameterSet[]
739
+ ULONG cbKey; // Byte size of key[]
740
+ // WCHAR parameterSet[cbParameterSet / sizeof(WCHAR)]; // For ML-KEM, \0-terminated
741
+ // BYTE key[cbKey]; // Key material
742
+ } BCRYPT_MLKEM_KEY_BLOB, *PBCRYPT_MLKEM_KEY_BLOB;
743
+ #endif
744
+
745
+ // Property Strings for DSA
746
+ #define BCRYPT_DSA_PARAMETERS L"DSAParameters"
747
+
748
+ #define BCRYPT_DSA_PARAMETERS_MAGIC 0x4d505344 // DSPM
749
+
750
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
751
+ #define BCRYPT_DSA_PARAMETERS_MAGIC_V2 0x324d5044 // DPM2
752
+ #endif
753
+
754
+ typedef struct _BCRYPT_DSA_PARAMETER_HEADER
755
+ {
756
+ ULONG cbLength;
757
+ ULONG dwMagic;
758
+ ULONG cbKeyLength;
759
+ UCHAR Count[4];
760
+ UCHAR Seed[20];
761
+ UCHAR q[20];
762
+ } BCRYPT_DSA_PARAMETER_HEADER;
763
+
764
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
765
+ typedef struct _BCRYPT_DSA_PARAMETER_HEADER_V2
766
+ {
767
+ ULONG cbLength;
768
+ ULONG dwMagic;
769
+ ULONG cbKeyLength;
770
+ HASHALGORITHM_ENUM hashAlgorithm;
771
+ DSAFIPSVERSION_ENUM standardVersion;
772
+ ULONG cbSeedLength;
773
+ ULONG cbGroupSize;
774
+ UCHAR Count[4];
775
+ } BCRYPT_DSA_PARAMETER_HEADER_V2;
776
+ #endif
777
+
778
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
779
+ //Property Strings for ECC
780
+ #define BCRYPT_ECC_PARAMETERS L"ECCParameters"
781
+ #define BCRYPT_ECC_CURVE_NAME L"ECCCurveName"
782
+ #define BCRYPT_ECC_CURVE_NAME_LIST L"ECCCurveNameList"
783
+
784
+ #define BCRYPT_ECC_PARAMETERS_MAGIC 0x50434345 // ECCP
785
+
786
+ typedef struct _BCRYPT_ECC_CURVE_NAMES
787
+ {
788
+ ULONG dwEccCurveNames;
789
+ LPWSTR *pEccCurveNames;
790
+ } BCRYPT_ECC_CURVE_NAMES;
791
+
792
+ //
793
+ // ECC Curve Names
794
+ //
795
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP160R1 L"brainpoolP160r1"
796
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP160T1 L"brainpoolP160t1"
797
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP192R1 L"brainpoolP192r1"
798
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP192T1 L"brainpoolP192t1"
799
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP224R1 L"brainpoolP224r1"
800
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP224T1 L"brainpoolP224t1"
801
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP256R1 L"brainpoolP256r1"
802
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP256T1 L"brainpoolP256t1"
803
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP320R1 L"brainpoolP320r1"
804
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP320T1 L"brainpoolP320t1"
805
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP384R1 L"brainpoolP384r1"
806
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP384T1 L"brainpoolP384t1"
807
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP512R1 L"brainpoolP512r1"
808
+ #define BCRYPT_ECC_CURVE_BRAINPOOLP512T1 L"brainpoolP512t1"
809
+
810
+ #define BCRYPT_ECC_CURVE_25519 L"curve25519"
811
+
812
+ #define BCRYPT_ECC_CURVE_EC192WAPI L"ec192wapi"
813
+
814
+ #define BCRYPT_ECC_CURVE_NISTP192 L"nistP192"
815
+ #define BCRYPT_ECC_CURVE_NISTP224 L"nistP224"
816
+ #define BCRYPT_ECC_CURVE_NISTP256 L"nistP256"
817
+ #define BCRYPT_ECC_CURVE_NISTP384 L"nistP384"
818
+ #define BCRYPT_ECC_CURVE_NISTP521 L"nistP521"
819
+
820
+ #define BCRYPT_ECC_CURVE_NUMSP256T1 L"numsP256t1"
821
+ #define BCRYPT_ECC_CURVE_NUMSP384T1 L"numsP384t1"
822
+ #define BCRYPT_ECC_CURVE_NUMSP512T1 L"numsP512t1"
823
+
824
+ #define BCRYPT_ECC_CURVE_SECP160K1 L"secP160k1"
825
+ #define BCRYPT_ECC_CURVE_SECP160R1 L"secP160r1"
826
+ #define BCRYPT_ECC_CURVE_SECP160R2 L"secP160r2"
827
+ #define BCRYPT_ECC_CURVE_SECP192K1 L"secP192k1"
828
+ #define BCRYPT_ECC_CURVE_SECP192R1 L"secP192r1"
829
+ #define BCRYPT_ECC_CURVE_SECP224K1 L"secP224k1"
830
+ #define BCRYPT_ECC_CURVE_SECP224R1 L"secP224r1"
831
+ #define BCRYPT_ECC_CURVE_SECP256K1 L"secP256k1"
832
+ #define BCRYPT_ECC_CURVE_SECP256R1 L"secP256r1"
833
+ #define BCRYPT_ECC_CURVE_SECP384R1 L"secP384r1"
834
+ #define BCRYPT_ECC_CURVE_SECP521R1 L"secP521r1"
835
+
836
+ #define BCRYPT_ECC_CURVE_WTLS7 L"wtls7"
837
+ #define BCRYPT_ECC_CURVE_WTLS9 L"wtls9"
838
+ #define BCRYPT_ECC_CURVE_WTLS12 L"wtls12"
839
+
840
+ #define BCRYPT_ECC_CURVE_X962P192V1 L"x962P192v1"
841
+ #define BCRYPT_ECC_CURVE_X962P192V2 L"x962P192v2"
842
+ #define BCRYPT_ECC_CURVE_X962P192V3 L"x962P192v3"
843
+ #define BCRYPT_ECC_CURVE_X962P239V1 L"x962P239v1"
844
+ #define BCRYPT_ECC_CURVE_X962P239V2 L"x962P239v2"
845
+ #define BCRYPT_ECC_CURVE_X962P239V3 L"x962P239v3"
846
+ #define BCRYPT_ECC_CURVE_X962P256V1 L"x962P256v1"
847
+
848
+ #endif
849
+
850
+
851
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
852
+ //
853
+ // PQDSA property values for BCRYPT_PARAMETER_SET_NAME
854
+ //
855
+ #define BCRYPT_MLDSA_PARAMETER_SET_44 L"44"
856
+ #define BCRYPT_MLDSA_PARAMETER_SET_65 L"65"
857
+ #define BCRYPT_MLDSA_PARAMETER_SET_87 L"87"
858
+
859
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHA2_128S L"SHA2-128s"
860
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHAKE_128S L"SHAKE-128s"
861
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHA2_128F L"SHA2-128f"
862
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHAKE_128F L"SHAKE-128f"
863
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHA2_192S L"SHA2-192s"
864
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHAKE_192S L"SHAKE-192s"
865
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHA2_192F L"SHA2-192f"
866
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHAKE_192F L"SHAKE-192f"
867
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHA2_256S L"SHA2-256s"
868
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHAKE_256S L"SHAKE-256s"
869
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHA2_256F L"SHA2-256f"
870
+ #define BCRYPT_SLHDSA_PARAMETER_SET_SHAKE_256F L"SHAKE-256f"
871
+
872
+ //
873
+ // MLKEM property values for BCRYPT_PARAMETER_SET_NAME
874
+ //
875
+ #define BCRYPT_MLKEM_PARAMETER_SET_512 L"512"
876
+ #define BCRYPT_MLKEM_PARAMETER_SET_768 L"768"
877
+ #define BCRYPT_MLKEM_PARAMETER_SET_1024 L"1024"
878
+
879
+ #endif
880
+
881
+
882
+ // Operation types used in BCRYPT_MULTI_HASH_OPERATION structures
883
+ typedef enum {
884
+ BCRYPT_HASH_OPERATION_HASH_DATA = 1,
885
+ BCRYPT_HASH_OPERATION_FINISH_HASH = 2,
886
+ } BCRYPT_HASH_OPERATION_TYPE;
887
+
888
+ typedef struct _BCRYPT_MULTI_HASH_OPERATION {
889
+ ULONG iHash; // index of hash object
890
+ BCRYPT_HASH_OPERATION_TYPE hashOperation; // operation to be performed
891
+ _Field_size_(cbBuffer) PUCHAR pbBuffer; // data to be hashed, or result buffer
892
+ ULONG cbBuffer;
893
+ } BCRYPT_MULTI_HASH_OPERATION;
894
+
895
+ // Enum to specify type of multi-operation is passed to BCryptProcesMultiOperations
896
+ typedef enum{
897
+ BCRYPT_OPERATION_TYPE_HASH = 1, // structure type is BCRYPT_MULTI_HASH_OPERATION
898
+ } BCRYPT_MULTI_OPERATION_TYPE;
899
+
900
+ typedef struct _BCRYPT_MULTI_OBJECT_LENGTH_STRUCT
901
+ {
902
+ ULONG cbPerObject;
903
+ ULONG cbPerElement; // required size for N elements is (cbPerObject + N * cbPerElement)
904
+ } BCRYPT_MULTI_OBJECT_LENGTH_STRUCT;
905
+
906
+ //
907
+ // Microsoft built-in providers.
908
+ //
909
+
910
+ #define MS_PRIMITIVE_PROVIDER L"Microsoft Primitive Provider"
911
+ #define MS_PLATFORM_CRYPTO_PROVIDER L"Microsoft Platform Crypto Provider"
912
+
913
+ //
914
+ // Common algorithm identifiers.
915
+ //
916
+
917
+ #define BCRYPT_RSA_ALGORITHM L"RSA"
918
+ #define BCRYPT_RSA_SIGN_ALGORITHM L"RSA_SIGN"
919
+ #define BCRYPT_DH_ALGORITHM L"DH"
920
+ #define BCRYPT_DSA_ALGORITHM L"DSA"
921
+ #define BCRYPT_RC2_ALGORITHM L"RC2"
922
+ #define BCRYPT_RC4_ALGORITHM L"RC4"
923
+ #define BCRYPT_AES_ALGORITHM L"AES"
924
+ #define BCRYPT_DES_ALGORITHM L"DES"
925
+ #define BCRYPT_DESX_ALGORITHM L"DESX"
926
+ #define BCRYPT_3DES_ALGORITHM L"3DES"
927
+ #define BCRYPT_3DES_112_ALGORITHM L"3DES_112"
928
+ #define BCRYPT_MD2_ALGORITHM L"MD2"
929
+ #define BCRYPT_MD4_ALGORITHM L"MD4"
930
+ #define BCRYPT_MD5_ALGORITHM L"MD5"
931
+ #define BCRYPT_SHA1_ALGORITHM L"SHA1"
932
+ #define BCRYPT_SHA256_ALGORITHM L"SHA256"
933
+ #define BCRYPT_SHA384_ALGORITHM L"SHA384"
934
+ #define BCRYPT_SHA512_ALGORITHM L"SHA512"
935
+ #define BCRYPT_AES_GMAC_ALGORITHM L"AES-GMAC"
936
+ #define BCRYPT_AES_CMAC_ALGORITHM L"AES-CMAC"
937
+ #define BCRYPT_ECDSA_P256_ALGORITHM L"ECDSA_P256"
938
+ #define BCRYPT_ECDSA_P384_ALGORITHM L"ECDSA_P384"
939
+ #define BCRYPT_ECDSA_P521_ALGORITHM L"ECDSA_P521"
940
+ #define BCRYPT_ECDH_P256_ALGORITHM L"ECDH_P256"
941
+ #define BCRYPT_ECDH_P384_ALGORITHM L"ECDH_P384"
942
+ #define BCRYPT_ECDH_P521_ALGORITHM L"ECDH_P521"
943
+ #define BCRYPT_RNG_ALGORITHM L"RNG"
944
+ #define BCRYPT_RNG_FIPS186_DSA_ALGORITHM L"FIPS186DSARNG"
945
+ #define BCRYPT_RNG_DUAL_EC_ALGORITHM L"DUALECRNG"
946
+
947
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
948
+ #define BCRYPT_SP800108_CTR_HMAC_ALGORITHM L"SP800_108_CTR_HMAC"
949
+ #define BCRYPT_SP80056A_CONCAT_ALGORITHM L"SP800_56A_CONCAT"
950
+ #define BCRYPT_PBKDF2_ALGORITHM L"PBKDF2"
951
+ #define BCRYPT_CAPI_KDF_ALGORITHM L"CAPI_KDF"
952
+ #define BCRYPT_TLS1_1_KDF_ALGORITHM L"TLS1_1_KDF"
953
+ #define BCRYPT_TLS1_2_KDF_ALGORITHM L"TLS1_2_KDF"
954
+ #endif
955
+
956
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
957
+ #define BCRYPT_ECDSA_ALGORITHM L"ECDSA"
958
+ #define BCRYPT_ECDH_ALGORITHM L"ECDH"
959
+ #define BCRYPT_XTS_AES_ALGORITHM L"XTS-AES"
960
+ #endif
961
+
962
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS4)
963
+ #define BCRYPT_HKDF_ALGORITHM L"HKDF"
964
+ #endif
965
+
966
+ #if (NTDDI_VERSION >= NTDDI_WIN10_FE)
967
+ #define BCRYPT_CHACHA20_POLY1305_ALGORITHM L"CHACHA20_POLY1305"
968
+ #endif
969
+
970
+ #if (NTDDI_VERSION >= NTDDI_WIN11_ZN)
971
+ #define BCRYPT_SHA3_256_ALGORITHM L"SHA3-256"
972
+ #define BCRYPT_SHA3_384_ALGORITHM L"SHA3-384"
973
+ #define BCRYPT_SHA3_512_ALGORITHM L"SHA3-512"
974
+ #define BCRYPT_CSHAKE128_ALGORITHM L"CSHAKE128"
975
+ #define BCRYPT_CSHAKE256_ALGORITHM L"CSHAKE256"
976
+ #define BCRYPT_KMAC128_ALGORITHM L"KMAC128"
977
+ #define BCRYPT_KMAC256_ALGORITHM L"KMAC256"
978
+ #endif
979
+
980
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
981
+ #define BCRYPT_SHAKE128_ALGORITHM L"SHAKE128"
982
+ #define BCRYPT_SHAKE256_ALGORITHM L"SHAKE256"
983
+
984
+ #define BCRYPT_MLDSA_ALGORITHM L"ML-DSA"
985
+ #define BCRYPT_SLHDSA_ALGORITHM L"SLH-DSA"
986
+
987
+ #define BCRYPT_LMS_ALGORITHM L"LMS"
988
+ #define BCRYPT_XMSS_ALGORITHM L"XMSS"
989
+
990
+ #define BCRYPT_MLKEM_ALGORITHM L"ML-KEM"
991
+ #endif
992
+
993
+ //
994
+ // Interfaces
995
+ //
996
+
997
+ #define BCRYPT_CIPHER_INTERFACE 0x00000001
998
+ #define BCRYPT_HASH_INTERFACE 0x00000002
999
+ #define BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE 0x00000003
1000
+ #define BCRYPT_SECRET_AGREEMENT_INTERFACE 0x00000004
1001
+ #define BCRYPT_SIGNATURE_INTERFACE 0x00000005
1002
+ #define BCRYPT_RNG_INTERFACE 0x00000006
1003
+
1004
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
1005
+ #define BCRYPT_KEY_DERIVATION_INTERFACE 0x00000007
1006
+ #endif
1007
+
1008
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
1009
+ #define BCRYPT_KEY_ENCAPSULATION_INTERFACE 0x00000008
1010
+ #endif
1011
+
1012
+
1013
+ //
1014
+ // Algorithm pseudo-handles
1015
+ // Pseudo-handles are distinguished from normal handles by being 1 mod 16
1016
+ //
1017
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1018
+ #define BCRYPT_MD2_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000001)
1019
+ #define BCRYPT_MD4_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000011)
1020
+ #define BCRYPT_MD5_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000021)
1021
+ #define BCRYPT_SHA1_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000031)
1022
+ #define BCRYPT_SHA256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000041)
1023
+ #define BCRYPT_SHA384_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000051)
1024
+ #define BCRYPT_SHA512_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000061)
1025
+ #define BCRYPT_RC4_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000071)
1026
+ #define BCRYPT_RNG_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000081)
1027
+ #define BCRYPT_HMAC_MD5_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000091)
1028
+ #define BCRYPT_HMAC_SHA1_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000000a1)
1029
+ #define BCRYPT_HMAC_SHA256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000000b1)
1030
+ #define BCRYPT_HMAC_SHA384_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000000c1)
1031
+ #define BCRYPT_HMAC_SHA512_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000000d1)
1032
+ #define BCRYPT_RSA_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000000e1)
1033
+ #define BCRYPT_ECDSA_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000000f1)
1034
+
1035
+ #define BCRYPT_AES_CMAC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000101)
1036
+ #define BCRYPT_AES_GMAC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000111)
1037
+ #define BCRYPT_HMAC_MD2_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000121)
1038
+ #define BCRYPT_HMAC_MD4_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000131)
1039
+
1040
+ #define BCRYPT_3DES_CBC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000141)
1041
+ #define BCRYPT_3DES_ECB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000151)
1042
+ #define BCRYPT_3DES_CFB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000161)
1043
+ #define BCRYPT_3DES_112_CBC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000171)
1044
+ #define BCRYPT_3DES_112_ECB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000181)
1045
+ #define BCRYPT_3DES_112_CFB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000191)
1046
+ #define BCRYPT_AES_CBC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000001a1)
1047
+ #define BCRYPT_AES_ECB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000001b1)
1048
+ #define BCRYPT_AES_CFB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000001c1)
1049
+ #define BCRYPT_AES_CCM_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000001d1)
1050
+ #define BCRYPT_AES_GCM_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000001e1)
1051
+ #define BCRYPT_DES_CBC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000001f1)
1052
+ #define BCRYPT_DES_ECB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000201)
1053
+ #define BCRYPT_DES_CFB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000211)
1054
+ #define BCRYPT_DESX_CBC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000221)
1055
+ #define BCRYPT_DESX_ECB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000231)
1056
+ #define BCRYPT_DESX_CFB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000241)
1057
+ #define BCRYPT_RC2_CBC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000251)
1058
+ #define BCRYPT_RC2_ECB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000261)
1059
+ #define BCRYPT_RC2_CFB_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000271)
1060
+
1061
+ #define BCRYPT_DH_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000281)
1062
+ #define BCRYPT_ECDH_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000291)
1063
+ #define BCRYPT_ECDH_P256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000002a1)
1064
+ #define BCRYPT_ECDH_P384_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000002b1)
1065
+ #define BCRYPT_ECDH_P521_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000002c1)
1066
+ #define BCRYPT_DSA_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000002d1)
1067
+ #define BCRYPT_ECDSA_P256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000002e1)
1068
+ #define BCRYPT_ECDSA_P384_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000002f1)
1069
+ #define BCRYPT_ECDSA_P521_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000301)
1070
+ #define BCRYPT_RSA_SIGN_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000311)
1071
+
1072
+ #define BCRYPT_CAPI_KDF_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000321)
1073
+ #define BCRYPT_PBKDF2_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000331)
1074
+
1075
+ #define BCRYPT_SP800108_CTR_HMAC_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000341)
1076
+ #define BCRYPT_SP80056A_CONCAT_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000351)
1077
+
1078
+ #define BCRYPT_TLS1_1_KDF_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000361)
1079
+ #define BCRYPT_TLS1_2_KDF_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000371)
1080
+
1081
+ #define BCRYPT_XTS_AES_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000381)
1082
+
1083
+ #define BCRYPT_HKDF_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000391)
1084
+
1085
+ #endif
1086
+
1087
+ #if (NTDDI_VERSION >= NTDDI_WIN10_FE)
1088
+ #define BCRYPT_CHACHA20_POLY1305_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000003A1)
1089
+ #endif
1090
+
1091
+ #if (NTDDI_VERSION >= NTDDI_WIN11_ZN)
1092
+ #define BCRYPT_SHA3_256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000003B1)
1093
+ #define BCRYPT_SHA3_384_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000003C1)
1094
+ #define BCRYPT_SHA3_512_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000003D1)
1095
+ #define BCRYPT_HMAC_SHA3_256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000003E1)
1096
+ #define BCRYPT_HMAC_SHA3_384_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x000003F1)
1097
+ #define BCRYPT_HMAC_SHA3_512_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000401)
1098
+ #define BCRYPT_CSHAKE128_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000411)
1099
+ #define BCRYPT_CSHAKE256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000421)
1100
+ #define BCRYPT_KMAC128_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000431)
1101
+ #define BCRYPT_KMAC256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000441)
1102
+ #endif
1103
+
1104
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
1105
+ #define BCRYPT_SHAKE128_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000451)
1106
+ #define BCRYPT_SHAKE256_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000461)
1107
+
1108
+ #define BCRYPT_MLDSA_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000471)
1109
+
1110
+ #define BCRYPT_MLKEM_ALG_HANDLE ((BCRYPT_ALG_HANDLE) 0x00000481)
1111
+
1112
+ #endif
1113
+
1114
+ //
1115
+ // Primitive algorithm provider functions.
1116
+ //
1117
+
1118
+ #define BCRYPT_ALG_HANDLE_HMAC_FLAG 0x00000008
1119
+ #define BCRYPT_HASH_REUSABLE_FLAG 0x00000020
1120
+
1121
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
1122
+ #define BCRYPT_CAPI_AES_FLAG 0x00000010
1123
+ #endif
1124
+
1125
+ #if (NTDDI_VERSION > NTDDI_WINBLUE || (NTDDI_VERSION == NTDDI_WINBLUE && defined(WINBLUE_KBSPRING14)))
1126
+ #define BCRYPT_MULTI_FLAG 0x00000040
1127
+ #endif
1128
+
1129
+ //
1130
+ // Extendable-output functions (XOFs) allow generating output multiple times from their
1131
+ // state. BCRYPT_HASH_DONT_RESET_FLAG allows to override the default behavior of BCryptFinishHash,
1132
+ // which is to reset the hash state. If this flag is set, the hash state is not reset and
1133
+ // users may invoke BCryptFinishHash to generate more data out of the hash/XOF state, until
1134
+ // after a BCryptFinishHash call where this flag is unset.
1135
+ //
1136
+ #if (NTDDI_VERSION >= NTDDI_WIN11_ZN)
1137
+ #define BCRYPT_HASH_DONT_RESET_FLAG 0x00000001
1138
+ #endif
1139
+
1140
+ //
1141
+ // The TLS_CBC_HMAC_VERIFY flag provides a side-channel safe way of verifying TLS data records
1142
+ // from the CBC-HMAC cipher suites. See RFC 5246 section 6.2.3.2.
1143
+ // This flag is used in BCryptOpenAlgorithmProvider and in BCryptHashData.
1144
+ // For BCryptOpenAlgorithmProvider it ensures that you get a provider that supports this feature.
1145
+ // For BCryptHashData is changes the functionality.
1146
+ // The Input buffer now contains the whole TLS data record, consisting of the plaintext,
1147
+ // followed by the MAC value, followed by the padding, followed by the padding_length.
1148
+ // The function will compute the HMAC over the data already hashed plus the plaintext,
1149
+ // compare it to the MAC value, and verify that the padding is correct.
1150
+ // If all works out, it returns a success value; if anything fails it returns an error.
1151
+ // What makes this special is that the code path or the memory access pattern used to
1152
+ // do this verification does not depend on padding_length to stop attacks on the CBC encryption
1153
+ // that was used to decrypt this data.
1154
+ // This flag is only useful for TLS implementations, other callers should not use it.
1155
+ // This flag is only valid for HMAC-SHA1, HMAC-SHA256, and HMAC-SHA384.
1156
+ // This flag implies the BCRYPT_HASH_REUSABLE_FLAG.
1157
+ //
1158
+ // This flag is available staring in Windows 10 19H1, but we define it for all
1159
+ // NTDDI values to allow applications to dynamically test wethere the OS supports the
1160
+ // feature, and adjust accordingly.
1161
+ //
1162
+ #define BCRYPT_TLS_CBC_HMAC_VERIFY_FLAG 0x00000004
1163
+
1164
+ //
1165
+ // The BUFFERS_LOCKED flag used in BCryptEncrypt/BCryptDecrypt signals that
1166
+ // the pbInput and pbOutput buffers have been locked (see MmProbeAndLockPages)
1167
+ // and CNG may not lock the buffers again.
1168
+ // This flag applies only to kernel mode, it is ignored in user mode.
1169
+ //
1170
+ #define BCRYPT_BUFFERS_LOCKED_FLAG 0x00000040
1171
+
1172
+ //
1173
+ // The EXTENDED_KEYSIZE flag extends the supported set of key sizes.
1174
+ //
1175
+ // The original design has a per-algorithm maximum key size, and
1176
+ // BCryptGenerateSymmetricKey truncates any longer input to the maximum key size for that
1177
+ // algorithm. Some callers depend on this feature and pass in large buffers.
1178
+ // This makes it impossible to silently extend the supported key size without breaking
1179
+ // backward compatibility.
1180
+ // This flag indicates that the extended key size support is requested.
1181
+ // It has the following consequences:
1182
+ // - BCryptGetProperty will report a new maximum key size for BCRYPT_KEY_LENGTHS.
1183
+ // - BCryptGenerateSymmetricKey will support the longer key sizes.
1184
+ // - BCryptGenerateSymmetricKey will no longer truncate keys that are too long, but return an error instead.
1185
+ //
1186
+ #if (NTDDI_VERSION >= NTDDI_WINBLUE)
1187
+ #define BCRYPT_EXTENDED_KEYSIZE 0x00000080
1188
+ #endif
1189
+
1190
+ //
1191
+ // ENABLE_INCOMPATIBLE_FIPS_CHECKS flag enables some FIPS 140-2-mandated checks that are incompatible
1192
+ // with the original algorithm.
1193
+ //
1194
+ // Starting in Redstone 1 (summer 2016 release of Win10) this flag has the following effect on the
1195
+ // Microsoft default algorithm provider.
1196
+ // - BCryptGenerateSymmetricKey when generating an XTS-AES key with this flag specified and FIPS mode enabled
1197
+ // will verify that the two halves of the key are not identical. If they are, an error is returned.
1198
+ // This is actually incompatible with the NIST SP 800-38E and IEEE Std 1619-2007 definitions
1199
+ // of XTS-AES. Rather than change the standard, NIST added this requirement in the FIPS 140-2
1200
+ // implementation guidance.
1201
+ // This check breaks existing usage of the algorithm, which is why we only perform the check when the
1202
+ // caller explicitly asks for it.
1203
+ // Use of this flag for any algorithm other than XTS-AES generates an error.
1204
+ // Note that this flag is not supported for BCryptImportKey.
1205
+ //
1206
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1207
+ #define BCRYPT_ENABLE_INCOMPATIBLE_FIPS_CHECKS 0x00000100
1208
+ #endif
1209
+
1210
+ _Must_inspect_result_
1211
+ NTSTATUS
1212
+ WINAPI
1213
+ BCryptOpenAlgorithmProvider(
1214
+ _Out_ BCRYPT_ALG_HANDLE *phAlgorithm,
1215
+ _In_z_ LPCWSTR pszAlgId,
1216
+ _In_opt_z_ LPCWSTR pszImplementation,
1217
+ _In_ ULONG dwFlags);
1218
+
1219
+
1220
+
1221
+ // AlgOperations flags for use with BCryptEnumAlgorithms()
1222
+ #define BCRYPT_CIPHER_OPERATION 0x00000001
1223
+ #define BCRYPT_HASH_OPERATION 0x00000002
1224
+ #define BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION 0x00000004
1225
+ #define BCRYPT_SECRET_AGREEMENT_OPERATION 0x00000008
1226
+ #define BCRYPT_SIGNATURE_OPERATION 0x00000010
1227
+ #define BCRYPT_RNG_OPERATION 0x00000020
1228
+
1229
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
1230
+ #define BCRYPT_KEY_DERIVATION_OPERATION 0x00000040
1231
+ #endif
1232
+
1233
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
1234
+ #define BCRYPT_KEY_ENCAPSULATION_OPERATION 0x00000080
1235
+ #endif
1236
+
1237
+ // USE EXTREME CAUTION: editing comments that contain "certenrolls_*" tokens
1238
+ // could break building CertEnroll idl files:
1239
+ // certenrolls_begin -- BCRYPT_ALGORITHM_IDENTIFIER
1240
+ typedef struct _BCRYPT_ALGORITHM_IDENTIFIER
1241
+ {
1242
+ LPWSTR pszName;
1243
+ ULONG dwClass;
1244
+ ULONG dwFlags;
1245
+
1246
+ } BCRYPT_ALGORITHM_IDENTIFIER;
1247
+ // certenrolls_end
1248
+
1249
+ _Must_inspect_result_
1250
+ NTSTATUS
1251
+ WINAPI
1252
+ BCryptEnumAlgorithms(
1253
+ _In_ ULONG dwAlgOperations,
1254
+ _Out_ ULONG *pAlgCount,
1255
+ _Out_ BCRYPT_ALGORITHM_IDENTIFIER **ppAlgList,
1256
+ _In_ ULONG dwFlags);
1257
+
1258
+ typedef struct _BCRYPT_PROVIDER_NAME
1259
+ {
1260
+ LPWSTR pszProviderName;
1261
+ } BCRYPT_PROVIDER_NAME;
1262
+
1263
+ _Must_inspect_result_
1264
+ NTSTATUS
1265
+ WINAPI
1266
+ BCryptEnumProviders(
1267
+ _In_z_ LPCWSTR pszAlgId,
1268
+ _Out_ ULONG *pImplCount,
1269
+ _Out_ BCRYPT_PROVIDER_NAME **ppImplList,
1270
+ _In_ ULONG dwFlags);
1271
+
1272
+
1273
+ // Unused flags. Kept for backward compatibility.
1274
+ // "Flags for use with BCryptGetProperty and BCryptSetProperty"
1275
+ #define BCRYPT_PUBLIC_KEY_FLAG 0x00000001
1276
+ #define BCRYPT_PRIVATE_KEY_FLAG 0x00000002
1277
+
1278
+ _Must_inspect_result_
1279
+ NTSTATUS
1280
+ WINAPI
1281
+ BCryptGetProperty(
1282
+ _In_ BCRYPT_HANDLE hObject,
1283
+ _In_z_ LPCWSTR pszProperty,
1284
+ _Out_writes_bytes_to_opt_(cbOutput, *pcbResult) PUCHAR pbOutput,
1285
+ _In_ ULONG cbOutput,
1286
+ _Out_ ULONG *pcbResult,
1287
+ _In_ ULONG dwFlags);
1288
+
1289
+
1290
+ _Must_inspect_result_
1291
+ NTSTATUS
1292
+ WINAPI
1293
+ BCryptSetProperty(
1294
+ _Inout_ BCRYPT_HANDLE hObject,
1295
+ _In_z_ LPCWSTR pszProperty,
1296
+ _In_reads_bytes_(cbInput) PUCHAR pbInput,
1297
+ _In_ ULONG cbInput,
1298
+ _In_ ULONG dwFlags);
1299
+
1300
+
1301
+ NTSTATUS
1302
+ WINAPI
1303
+ BCryptCloseAlgorithmProvider(
1304
+ _Inout_ BCRYPT_ALG_HANDLE hAlgorithm,
1305
+ _In_ ULONG dwFlags);
1306
+
1307
+
1308
+ VOID
1309
+ WINAPI
1310
+ BCryptFreeBuffer(
1311
+ _In_ PVOID pvBuffer);
1312
+
1313
+
1314
+ //
1315
+ // Primitive encryption functions.
1316
+ //
1317
+ _Must_inspect_result_
1318
+ NTSTATUS
1319
+ WINAPI
1320
+ BCryptGenerateSymmetricKey(
1321
+ _Inout_ BCRYPT_ALG_HANDLE hAlgorithm,
1322
+ _Out_ BCRYPT_KEY_HANDLE *phKey,
1323
+ _Out_writes_bytes_all_opt_(cbKeyObject) PUCHAR pbKeyObject,
1324
+ _In_ ULONG cbKeyObject,
1325
+ _In_reads_bytes_(cbSecret) PUCHAR pbSecret,
1326
+ _In_ ULONG cbSecret,
1327
+ _In_ ULONG dwFlags);
1328
+
1329
+
1330
+ _Must_inspect_result_
1331
+ NTSTATUS
1332
+ WINAPI
1333
+ BCryptGenerateKeyPair(
1334
+ _Inout_ BCRYPT_ALG_HANDLE hAlgorithm,
1335
+ _Out_ BCRYPT_KEY_HANDLE *phKey,
1336
+ _In_ ULONG dwLength,
1337
+ _In_ ULONG dwFlags);
1338
+
1339
+
1340
+ _Must_inspect_result_
1341
+ NTSTATUS
1342
+ WINAPI
1343
+ BCryptEncrypt(
1344
+ _Inout_ BCRYPT_KEY_HANDLE hKey,
1345
+ _In_reads_bytes_opt_(cbInput) PUCHAR pbInput,
1346
+ _In_ ULONG cbInput,
1347
+ _In_opt_ VOID *pPaddingInfo,
1348
+ _Inout_updates_bytes_opt_(cbIV) PUCHAR pbIV,
1349
+ _In_ ULONG cbIV,
1350
+ _Out_writes_bytes_to_opt_(cbOutput, *pcbResult) PUCHAR pbOutput,
1351
+ _In_ ULONG cbOutput,
1352
+ _Out_ ULONG *pcbResult,
1353
+ _In_ ULONG dwFlags);
1354
+
1355
+
1356
+ _Must_inspect_result_
1357
+ NTSTATUS
1358
+ WINAPI
1359
+ BCryptDecrypt(
1360
+ _Inout_ BCRYPT_KEY_HANDLE hKey,
1361
+ _In_reads_bytes_opt_(cbInput) PUCHAR pbInput,
1362
+ _In_ ULONG cbInput,
1363
+ _In_opt_ VOID *pPaddingInfo,
1364
+ _Inout_updates_bytes_opt_(cbIV) PUCHAR pbIV,
1365
+ _In_ ULONG cbIV,
1366
+ _Out_writes_bytes_to_opt_(cbOutput, *pcbResult) PUCHAR pbOutput,
1367
+ _In_ ULONG cbOutput,
1368
+ _Out_ ULONG *pcbResult,
1369
+ _In_ ULONG dwFlags);
1370
+
1371
+
1372
+ _Must_inspect_result_
1373
+ NTSTATUS
1374
+ WINAPI
1375
+ BCryptExportKey(
1376
+ _In_ BCRYPT_KEY_HANDLE hKey,
1377
+ _In_opt_ BCRYPT_KEY_HANDLE hExportKey,
1378
+ _In_z_ LPCWSTR pszBlobType,
1379
+ _Out_writes_bytes_to_opt_(cbOutput, *pcbResult) PUCHAR pbOutput,
1380
+ _In_ ULONG cbOutput,
1381
+ _Out_ ULONG *pcbResult,
1382
+ _In_ ULONG dwFlags);
1383
+
1384
+
1385
+ _Must_inspect_result_
1386
+ NTSTATUS
1387
+ WINAPI
1388
+ BCryptImportKey(
1389
+ _In_ BCRYPT_ALG_HANDLE hAlgorithm,
1390
+ _In_opt_ BCRYPT_KEY_HANDLE hImportKey,
1391
+ _In_z_ LPCWSTR pszBlobType,
1392
+ _Out_ BCRYPT_KEY_HANDLE *phKey,
1393
+ _Out_writes_bytes_all_opt_(cbKeyObject) PUCHAR pbKeyObject,
1394
+ _In_ ULONG cbKeyObject,
1395
+ _In_reads_bytes_(cbInput) PUCHAR pbInput,
1396
+ _In_ ULONG cbInput,
1397
+ _In_ ULONG dwFlags);
1398
+
1399
+
1400
+ #define BCRYPT_NO_KEY_VALIDATION 0x00000008
1401
+
1402
+ #if (NTDDI_VERSION >= NTDDI_WIN10_CO)
1403
+ #define BCRYPT_KEY_VALIDATION_RANGE 0x00000010 // BCryptImportKeyPair
1404
+ #define BCRYPT_KEY_VALIDATION_RANGE_AND_ORDER 0x00000018 // BCryptImportKeyPair & BCryptFinalizeKeyPair
1405
+ #define BCRYPT_KEY_VALIDATION_REGENERATE 0x00000020 // BCryptImportKeyPair
1406
+ #endif
1407
+
1408
+ _Must_inspect_result_
1409
+ NTSTATUS
1410
+ WINAPI
1411
+ BCryptImportKeyPair(
1412
+ _In_ BCRYPT_ALG_HANDLE hAlgorithm,
1413
+ _In_opt_ BCRYPT_KEY_HANDLE hImportKey,
1414
+ _In_z_ LPCWSTR pszBlobType,
1415
+ _Out_ BCRYPT_KEY_HANDLE *phKey,
1416
+ _In_reads_bytes_(cbInput) PUCHAR pbInput,
1417
+ _In_ ULONG cbInput,
1418
+ _In_ ULONG dwFlags);
1419
+
1420
+
1421
+ _Must_inspect_result_
1422
+ NTSTATUS
1423
+ WINAPI
1424
+ BCryptDuplicateKey(
1425
+ _In_ BCRYPT_KEY_HANDLE hKey,
1426
+ _Out_ BCRYPT_KEY_HANDLE *phNewKey,
1427
+ _Out_writes_bytes_all_opt_(cbKeyObject) PUCHAR pbKeyObject,
1428
+ _In_ ULONG cbKeyObject,
1429
+ _In_ ULONG dwFlags);
1430
+
1431
+
1432
+ _Must_inspect_result_
1433
+ NTSTATUS
1434
+ WINAPI
1435
+ BCryptFinalizeKeyPair(
1436
+ _Inout_ BCRYPT_KEY_HANDLE hKey,
1437
+ _In_ ULONG dwFlags);
1438
+
1439
+
1440
+ NTSTATUS
1441
+ WINAPI
1442
+ BCryptDestroyKey(
1443
+ _Inout_ BCRYPT_KEY_HANDLE hKey);
1444
+
1445
+
1446
+ NTSTATUS
1447
+ WINAPI
1448
+ BCryptDestroySecret(
1449
+ _Inout_ BCRYPT_SECRET_HANDLE hSecret);
1450
+
1451
+
1452
+ _Must_inspect_result_
1453
+ NTSTATUS
1454
+ WINAPI
1455
+ BCryptSignHash(
1456
+ _In_ BCRYPT_KEY_HANDLE hKey,
1457
+ _In_opt_ VOID *pPaddingInfo,
1458
+ _In_reads_bytes_(cbInput) PUCHAR pbInput,
1459
+ _In_ ULONG cbInput,
1460
+ _Out_writes_bytes_to_opt_(cbOutput, *pcbResult) PUCHAR pbOutput,
1461
+ _In_ ULONG cbOutput,
1462
+ _Out_ ULONG *pcbResult,
1463
+ _In_ ULONG dwFlags);
1464
+
1465
+
1466
+ _Must_inspect_result_
1467
+ NTSTATUS
1468
+ WINAPI
1469
+ BCryptVerifySignature(
1470
+ _In_ BCRYPT_KEY_HANDLE hKey,
1471
+ _In_opt_ VOID *pPaddingInfo,
1472
+ _In_reads_bytes_(cbHash) PUCHAR pbHash,
1473
+ _In_ ULONG cbHash,
1474
+ _In_reads_bytes_(cbSignature) PUCHAR pbSignature,
1475
+ _In_ ULONG cbSignature,
1476
+ _In_ ULONG dwFlags);
1477
+
1478
+
1479
+ _Must_inspect_result_
1480
+ NTSTATUS
1481
+ WINAPI
1482
+ BCryptSecretAgreement(
1483
+ _In_ BCRYPT_KEY_HANDLE hPrivKey,
1484
+ _In_ BCRYPT_KEY_HANDLE hPubKey,
1485
+ _Out_ BCRYPT_SECRET_HANDLE *phAgreedSecret,
1486
+ _In_ ULONG dwFlags);
1487
+
1488
+
1489
+ _Must_inspect_result_
1490
+ NTSTATUS
1491
+ WINAPI
1492
+ BCryptDeriveKey(
1493
+ _In_ BCRYPT_SECRET_HANDLE hSharedSecret,
1494
+ _In_z_ LPCWSTR pwszKDF,
1495
+ _In_opt_ BCryptBufferDesc *pParameterList,
1496
+ _Out_writes_bytes_to_opt_(cbDerivedKey, *pcbResult) PUCHAR pbDerivedKey,
1497
+ _In_ ULONG cbDerivedKey,
1498
+ _Out_ ULONG *pcbResult,
1499
+ _In_ ULONG dwFlags);
1500
+
1501
+
1502
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
1503
+ _Must_inspect_result_
1504
+ NTSTATUS
1505
+ WINAPI
1506
+ BCryptKeyDerivation(
1507
+ _In_ BCRYPT_KEY_HANDLE hKey,
1508
+ _In_opt_ BCryptBufferDesc *pParameterList,
1509
+ _Out_writes_bytes_to_(cbDerivedKey, *pcbResult) PUCHAR pbDerivedKey,
1510
+ _In_ ULONG cbDerivedKey,
1511
+ _Out_ ULONG *pcbResult,
1512
+ _In_ ULONG dwFlags);
1513
+ #endif
1514
+
1515
+
1516
+ //
1517
+ // Primitive hashing functions.
1518
+ //
1519
+ _Must_inspect_result_
1520
+ NTSTATUS
1521
+ WINAPI
1522
+ BCryptCreateHash(
1523
+ _Inout_ BCRYPT_ALG_HANDLE hAlgorithm,
1524
+ _Out_ BCRYPT_HASH_HANDLE *phHash,
1525
+ _Out_writes_bytes_all_opt_(cbHashObject) PUCHAR pbHashObject,
1526
+ _In_ ULONG cbHashObject,
1527
+ _In_reads_bytes_opt_(cbSecret) PUCHAR pbSecret, // optional
1528
+ _In_ ULONG cbSecret, // optional
1529
+ _In_ ULONG dwFlags);
1530
+
1531
+
1532
+ _Must_inspect_result_
1533
+ NTSTATUS
1534
+ WINAPI
1535
+ BCryptHashData(
1536
+ _Inout_ BCRYPT_HASH_HANDLE hHash,
1537
+ _In_reads_bytes_(cbInput) PUCHAR pbInput,
1538
+ _In_ ULONG cbInput,
1539
+ _In_ ULONG dwFlags);
1540
+
1541
+
1542
+ _Must_inspect_result_
1543
+ NTSTATUS
1544
+ WINAPI
1545
+ BCryptFinishHash(
1546
+ _Inout_ BCRYPT_HASH_HANDLE hHash,
1547
+ _Out_writes_bytes_all_(cbOutput) PUCHAR pbOutput,
1548
+ _In_ ULONG cbOutput,
1549
+ _In_ ULONG dwFlags);
1550
+
1551
+
1552
+ #if (NTDDI_VERSION > NTDDI_WINBLUE || (NTDDI_VERSION == NTDDI_WINBLUE && defined(WINBLUE_KBSPRING14)))
1553
+ _Must_inspect_result_
1554
+ NTSTATUS
1555
+ WINAPI
1556
+ BCryptCreateMultiHash(
1557
+ _Inout_ BCRYPT_ALG_HANDLE hAlgorithm,
1558
+ _Out_ BCRYPT_HASH_HANDLE *phHash,
1559
+ _In_ ULONG nHashes,
1560
+ _Out_writes_bytes_all_opt_(cbHashObject) PUCHAR pbHashObject,
1561
+ _In_ ULONG cbHashObject,
1562
+ _In_reads_bytes_opt_(cbSecret) PUCHAR pbSecret, // optional
1563
+ _In_ ULONG cbSecret, // optional
1564
+ _In_ ULONG dwFlags);
1565
+
1566
+ _Must_inspect_result_
1567
+ NTSTATUS
1568
+ WINAPI
1569
+ BCryptProcessMultiOperations(
1570
+ _Inout_ BCRYPT_HANDLE hObject,
1571
+ _In_ BCRYPT_MULTI_OPERATION_TYPE operationType,
1572
+ _In_reads_bytes_(cbOperations) PVOID pOperations,
1573
+ _In_ ULONG cbOperations,
1574
+ _In_ ULONG dwFlags );
1575
+ #endif
1576
+
1577
+
1578
+ _Must_inspect_result_
1579
+ NTSTATUS
1580
+ WINAPI
1581
+ BCryptDuplicateHash(
1582
+ _In_ BCRYPT_HASH_HANDLE hHash,
1583
+ _Out_ BCRYPT_HASH_HANDLE *phNewHash,
1584
+ _Out_writes_bytes_all_opt_(cbHashObject) PUCHAR pbHashObject,
1585
+ _In_ ULONG cbHashObject,
1586
+ _In_ ULONG dwFlags);
1587
+
1588
+
1589
+ NTSTATUS
1590
+ WINAPI
1591
+ BCryptDestroyHash(
1592
+ _Inout_ BCRYPT_HASH_HANDLE hHash);
1593
+
1594
+
1595
+ #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1596
+ NTSTATUS
1597
+ WINAPI
1598
+ BCryptHash(
1599
+ _Inout_ BCRYPT_ALG_HANDLE hAlgorithm,
1600
+ _In_reads_bytes_opt_(cbSecret) PUCHAR pbSecret, // for keyed algs
1601
+ _In_ ULONG cbSecret, // for keyed algs
1602
+ _In_reads_bytes_(cbInput) PUCHAR pbInput,
1603
+ _In_ ULONG cbInput,
1604
+ _Out_writes_bytes_all_(cbOutput) PUCHAR pbOutput,
1605
+ _In_ ULONG cbOutput );
1606
+ #endif
1607
+
1608
+
1609
+ //
1610
+ // Primitive random number generation.
1611
+ //
1612
+
1613
+ // Flags to BCryptGenRandom
1614
+ // BCRYPT_RNG_USE_ENTROPY_IN_BUFFER is ignored in Win7 & later
1615
+ #define BCRYPT_RNG_USE_ENTROPY_IN_BUFFER 0x00000001
1616
+ #define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
1617
+
1618
+ _Must_inspect_result_
1619
+ NTSTATUS
1620
+ WINAPI
1621
+ BCryptGenRandom(
1622
+ _In_opt_ BCRYPT_ALG_HANDLE hAlgorithm,
1623
+ _Out_writes_bytes_(cbBuffer) PUCHAR pbBuffer,
1624
+ _In_ ULONG cbBuffer,
1625
+ _In_ ULONG dwFlags);
1626
+
1627
+
1628
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
1629
+ //
1630
+ // Primitive key derivation functions.
1631
+ //
1632
+ _Must_inspect_result_
1633
+ NTSTATUS
1634
+ WINAPI
1635
+ BCryptDeriveKeyCapi(
1636
+ _In_ BCRYPT_HASH_HANDLE hHash,
1637
+ _In_opt_ BCRYPT_ALG_HANDLE hTargetAlg,
1638
+ _Out_writes_bytes_( cbDerivedKey ) PUCHAR pbDerivedKey,
1639
+ _In_ ULONG cbDerivedKey,
1640
+ _In_ ULONG dwFlags);
1641
+ #endif
1642
+
1643
+
1644
+ #if (NTDDI_VERSION >= NTDDI_WIN7)
1645
+ _Must_inspect_result_
1646
+ NTSTATUS
1647
+ WINAPI
1648
+ BCryptDeriveKeyPBKDF2(
1649
+ _In_ BCRYPT_ALG_HANDLE hPrf,
1650
+ _In_reads_bytes_opt_( cbPassword ) PUCHAR pbPassword,
1651
+ _In_ ULONG cbPassword,
1652
+ _In_reads_bytes_opt_( cbSalt ) PUCHAR pbSalt,
1653
+ _In_ ULONG cbSalt,
1654
+ _In_ ULONGLONG cIterations,
1655
+ _Out_writes_bytes_( cbDerivedKey ) PUCHAR pbDerivedKey,
1656
+ _In_ ULONG cbDerivedKey,
1657
+ _In_ ULONG dwFlags);
1658
+ #endif
1659
+
1660
+
1661
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
1662
+ _Must_inspect_result_
1663
+ NTSTATUS
1664
+ WINAPI
1665
+ BCryptEncapsulate(
1666
+ _In_ BCRYPT_KEY_HANDLE hKey,
1667
+ _Out_writes_bytes_to_opt_(cbSecretKey, *pcbSecretKey)
1668
+ PUCHAR pbSecretKey,
1669
+ _In_ ULONG cbSecretKey,
1670
+ _Out_ ULONG *pcbSecretKey,
1671
+ _Out_writes_bytes_to_opt_(cbCipherText, *pcbCipherText)
1672
+ PUCHAR pbCipherText,
1673
+ _In_ ULONG cbCipherText,
1674
+ _Out_ ULONG *pcbCipherText,
1675
+ _In_ ULONG dwFlags);
1676
+ #endif
1677
+
1678
+
1679
+ #if (NTDDI_VERSION >= NTDDI_WIN11_GE)
1680
+ _Must_inspect_result_
1681
+ NTSTATUS
1682
+ WINAPI
1683
+ BCryptDecapsulate(
1684
+ _In_ BCRYPT_KEY_HANDLE hKey,
1685
+ _In_reads_bytes_(cbCipherText)
1686
+ PUCHAR pbCipherText,
1687
+ _In_ ULONG cbCipherText,
1688
+ _Out_writes_bytes_to_opt_(cbSecretKey, *pcbSecretKey)
1689
+ PUCHAR pbSecretKey,
1690
+ _In_ ULONG cbSecretKey,
1691
+ _Out_ ULONG *pcbSecretKey,
1692
+ _In_ ULONG dwFlags);
1693
+ #endif
1694
+
1695
+
1696
+ //
1697
+ // Interface version control...
1698
+ //
1699
+ typedef struct _BCRYPT_INTERFACE_VERSION
1700
+ {
1701
+ USHORT MajorVersion;
1702
+ USHORT MinorVersion;
1703
+
1704
+ } BCRYPT_INTERFACE_VERSION, *PBCRYPT_INTERFACE_VERSION;
1705
+
1706
+ #define BCRYPT_MAKE_INTERFACE_VERSION(major,minor) {(USHORT)major, (USHORT)minor}
1707
+
1708
+ #define BCRYPT_IS_INTERFACE_VERSION_COMPATIBLE(loader, provider) \
1709
+ ((loader).MajorVersion <= (provider).MajorVersion)
1710
+
1711
+ //
1712
+ // Primitive provider interfaces.
1713
+ //
1714
+
1715
+ #define BCRYPT_CIPHER_INTERFACE_VERSION_1 BCRYPT_MAKE_INTERFACE_VERSION(1,0)
1716
+
1717
+
1718
+ #define BCRYPT_HASH_INTERFACE_VERSION_1 BCRYPT_MAKE_INTERFACE_VERSION(1,0)
1719
+
1720
+ #if (NTDDI_VERSION > NTDDI_WINBLUE || (NTDDI_VERSION == NTDDI_WINBLUE && defined(WINBLUE_KBSPRING14)))
1721
+ #define BCRYPT_HASH_INTERFACE_MAJORVERSION_2 2
1722
+ #define BCRYPT_HASH_INTERFACE_VERSION_2 BCRYPT_MAKE_INTERFACE_VERSION(BCRYPT_HASH_INTERFACE_MAJORVERSION_2,0)
1723
+ #endif
1724
+
1725
+
1726
+ #define BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE_VERSION_1 BCRYPT_MAKE_INTERFACE_VERSION(1,0)
1727
+
1728
+
1729
+ #define BCRYPT_SECRET_AGREEMENT_INTERFACE_VERSION_1 BCRYPT_MAKE_INTERFACE_VERSION(1,0)
1730
+
1731
+
1732
+ #define BCRYPT_SIGNATURE_INTERFACE_VERSION_1 BCRYPT_MAKE_INTERFACE_VERSION(1,0)
1733
+
1734
+
1735
+ #define BCRYPT_RNG_INTERFACE_VERSION_1 BCRYPT_MAKE_INTERFACE_VERSION(1,0)
1736
+
1737
+
1738
+ #define BCRYPT_KEY_ENCAPSULATION_INTERFACE_VERSION_1 BCRYPT_MAKE_INTERFACE_VERSION(1,0)
1739
+
1740
+
1741
+ //////////////////////////////////////////////////////////////////////////////
1742
+ // CryptoConfig Definitions //////////////////////////////////////////////////
1743
+ //////////////////////////////////////////////////////////////////////////////
1744
+
1745
+ // Interface registration flags
1746
+ #define CRYPT_MIN_DEPENDENCIES (0x00000001)
1747
+ #define CRYPT_PROCESS_ISOLATE (0x00010000) // User-mode only
1748
+
1749
+ // Processor modes supported by a provider
1750
+ //
1751
+ // (Valid for BCryptQueryProviderRegistration and BCryptResolveProviders):
1752
+ //
1753
+ #define CRYPT_UM (0x00000001) // User mode only
1754
+ #define CRYPT_KM (0x00000002) // Kernel mode only
1755
+ #define CRYPT_MM (0x00000003) // Multi-mode: Must support BOTH UM and KM
1756
+ //
1757
+ // (Valid only for BCryptQueryProviderRegistration):
1758
+ //
1759
+ #define CRYPT_ANY (0x00000004) // Wildcard: Either UM, or KM, or both
1760
+
1761
+
1762
+ // Write behavior flags
1763
+ #define CRYPT_OVERWRITE (0x00000001)
1764
+
1765
+ // Configuration tables
1766
+ #define CRYPT_LOCAL (0x00000001)
1767
+ #define CRYPT_DOMAIN (0x00000002)
1768
+
1769
+ // Context configuration flags
1770
+ #define CRYPT_EXCLUSIVE (0x00000001)
1771
+ #define CRYPT_OVERRIDE (0x00010000) // Enterprise table only
1772
+
1773
+ // Resolution and enumeration flags
1774
+ #define CRYPT_ALL_FUNCTIONS (0x00000001)
1775
+ #define CRYPT_ALL_PROVIDERS (0x00000002)
1776
+
1777
+ // Priority list positions
1778
+ #define CRYPT_PRIORITY_TOP (0x00000000)
1779
+ #define CRYPT_PRIORITY_BOTTOM (0xFFFFFFFF)
1780
+
1781
+ // Default system-wide context
1782
+ #define CRYPT_DEFAULT_CONTEXT L"Default"
1783
+
1784
+ //////////////////////////////////////////////////////////////////////////////
1785
+ // CryptoConfig Structures ///////////////////////////////////////////////////
1786
+ //////////////////////////////////////////////////////////////////////////////
1787
+
1788
+ //
1789
+ // Provider Registration Structures
1790
+ //
1791
+
1792
+ typedef struct _CRYPT_INTERFACE_REG
1793
+ {
1794
+ ULONG dwInterface;
1795
+ ULONG dwFlags;
1796
+
1797
+ ULONG cFunctions;
1798
+ PWSTR *rgpszFunctions;
1799
+ }
1800
+ CRYPT_INTERFACE_REG, *PCRYPT_INTERFACE_REG;
1801
+
1802
+ typedef struct _CRYPT_IMAGE_REG
1803
+ {
1804
+ PWSTR pszImage;
1805
+
1806
+ ULONG cInterfaces;
1807
+ PCRYPT_INTERFACE_REG *rgpInterfaces;
1808
+ }
1809
+ CRYPT_IMAGE_REG, *PCRYPT_IMAGE_REG;
1810
+
1811
+ typedef struct _CRYPT_PROVIDER_REG
1812
+ {
1813
+ ULONG cAliases;
1814
+ PWSTR *rgpszAliases;
1815
+
1816
+ PCRYPT_IMAGE_REG pUM;
1817
+ PCRYPT_IMAGE_REG pKM;
1818
+ }
1819
+ CRYPT_PROVIDER_REG, *PCRYPT_PROVIDER_REG;
1820
+
1821
+ typedef struct _CRYPT_PROVIDERS
1822
+ {
1823
+ ULONG cProviders;
1824
+ PWSTR *rgpszProviders;
1825
+ }
1826
+ CRYPT_PROVIDERS, *PCRYPT_PROVIDERS;
1827
+
1828
+ //
1829
+ // Context Configuration Structures
1830
+ //
1831
+
1832
+ typedef struct _CRYPT_CONTEXT_CONFIG
1833
+ {
1834
+ ULONG dwFlags;
1835
+ ULONG dwReserved;
1836
+ }
1837
+ CRYPT_CONTEXT_CONFIG, *PCRYPT_CONTEXT_CONFIG;
1838
+
1839
+ typedef struct _CRYPT_CONTEXT_FUNCTION_CONFIG
1840
+ {
1841
+ ULONG dwFlags;
1842
+ ULONG dwReserved;
1843
+ }
1844
+ CRYPT_CONTEXT_FUNCTION_CONFIG, *PCRYPT_CONTEXT_FUNCTION_CONFIG;
1845
+
1846
+ typedef struct _CRYPT_CONTEXTS
1847
+ {
1848
+ ULONG cContexts;
1849
+ PWSTR *rgpszContexts;
1850
+ }
1851
+ CRYPT_CONTEXTS, *PCRYPT_CONTEXTS;
1852
+
1853
+ typedef struct _CRYPT_CONTEXT_FUNCTIONS
1854
+ {
1855
+ ULONG cFunctions;
1856
+ PWSTR *rgpszFunctions;
1857
+ }
1858
+ CRYPT_CONTEXT_FUNCTIONS, *PCRYPT_CONTEXT_FUNCTIONS;
1859
+
1860
+ typedef struct _CRYPT_CONTEXT_FUNCTION_PROVIDERS
1861
+ {
1862
+ ULONG cProviders;
1863
+ PWSTR *rgpszProviders;
1864
+ }
1865
+ CRYPT_CONTEXT_FUNCTION_PROVIDERS, *PCRYPT_CONTEXT_FUNCTION_PROVIDERS;
1866
+
1867
+ //
1868
+ // Provider Resolution Structures
1869
+ //
1870
+
1871
+ typedef struct _CRYPT_PROPERTY_REF
1872
+ {
1873
+ PWSTR pszProperty;
1874
+
1875
+ ULONG cbValue;
1876
+ PUCHAR pbValue;
1877
+ }
1878
+ CRYPT_PROPERTY_REF, *PCRYPT_PROPERTY_REF;
1879
+
1880
+ typedef struct _CRYPT_IMAGE_REF
1881
+ {
1882
+ PWSTR pszImage;
1883
+ ULONG dwFlags;
1884
+ }
1885
+ CRYPT_IMAGE_REF, *PCRYPT_IMAGE_REF;
1886
+
1887
+ typedef struct _CRYPT_PROVIDER_REF
1888
+ {
1889
+ ULONG dwInterface;
1890
+ PWSTR pszFunction;
1891
+ PWSTR pszProvider;
1892
+
1893
+ ULONG cProperties;
1894
+ PCRYPT_PROPERTY_REF *rgpProperties;
1895
+
1896
+ PCRYPT_IMAGE_REF pUM;
1897
+ PCRYPT_IMAGE_REF pKM;
1898
+ }
1899
+ CRYPT_PROVIDER_REF, *PCRYPT_PROVIDER_REF;
1900
+
1901
+ typedef struct _CRYPT_PROVIDER_REFS
1902
+ {
1903
+ ULONG cProviders;
1904
+ PCRYPT_PROVIDER_REF *rgpProviders;
1905
+ }
1906
+ CRYPT_PROVIDER_REFS, *PCRYPT_PROVIDER_REFS;
1907
+
1908
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
1909
+ #pragma endregion
1910
+
1911
+ #pragma region Desktop Family or OneCore or Games Family
1912
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
1913
+
1914
+ //////////////////////////////////////////////////////////////////////////////
1915
+ // CryptoConfig Functions ////////////////////////////////////////////////////
1916
+ //////////////////////////////////////////////////////////////////////////////
1917
+
1918
+ #ifndef KERNEL_MODE_CNG
1919
+
1920
+
1921
+ _Must_inspect_result_
1922
+ NTSTATUS
1923
+ WINAPI
1924
+ BCryptQueryProviderRegistration(
1925
+ _In_z_ LPCWSTR pszProvider,
1926
+ _In_ ULONG dwMode,
1927
+ _In_ ULONG dwInterface,
1928
+ _Inout_ ULONG* pcbBuffer,
1929
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_PROVIDER_REG *ppBuffer);
1930
+
1931
+ _Must_inspect_result_
1932
+ NTSTATUS
1933
+ WINAPI
1934
+ BCryptEnumRegisteredProviders(
1935
+ _Inout_ ULONG* pcbBuffer,
1936
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_PROVIDERS *ppBuffer);
1937
+
1938
+ //
1939
+ // Context Configuration Functions
1940
+ //
1941
+ _Must_inspect_result_
1942
+ NTSTATUS
1943
+ WINAPI
1944
+ BCryptCreateContext(
1945
+ _In_ ULONG dwTable,
1946
+ _In_z_ LPCWSTR pszContext,
1947
+ _In_opt_ PCRYPT_CONTEXT_CONFIG pConfig); // Optional
1948
+
1949
+ _Must_inspect_result_
1950
+ NTSTATUS
1951
+ WINAPI
1952
+ BCryptDeleteContext(
1953
+ _In_ ULONG dwTable,
1954
+ _In_z_ LPCWSTR pszContext);
1955
+
1956
+ _Must_inspect_result_
1957
+ NTSTATUS
1958
+ WINAPI
1959
+ BCryptEnumContexts(
1960
+ _In_ ULONG dwTable,
1961
+ _Inout_ ULONG* pcbBuffer,
1962
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_CONTEXTS *ppBuffer);
1963
+
1964
+ _Must_inspect_result_
1965
+ NTSTATUS
1966
+ WINAPI
1967
+ BCryptConfigureContext(
1968
+ _In_ ULONG dwTable,
1969
+ _In_z_ LPCWSTR pszContext,
1970
+ _In_ PCRYPT_CONTEXT_CONFIG pConfig);
1971
+
1972
+ _Must_inspect_result_
1973
+ NTSTATUS
1974
+ WINAPI
1975
+ BCryptQueryContextConfiguration(
1976
+ _In_ ULONG dwTable,
1977
+ _In_z_ LPCWSTR pszContext,
1978
+ _Inout_ ULONG* pcbBuffer,
1979
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_CONTEXT_CONFIG *ppBuffer);
1980
+
1981
+ _Must_inspect_result_
1982
+ NTSTATUS
1983
+ WINAPI
1984
+ BCryptAddContextFunction(
1985
+ _In_ ULONG dwTable,
1986
+ _In_z_ LPCWSTR pszContext,
1987
+ _In_ ULONG dwInterface,
1988
+ _In_z_ LPCWSTR pszFunction,
1989
+ _In_ ULONG dwPosition);
1990
+
1991
+ _Must_inspect_result_
1992
+ NTSTATUS
1993
+ WINAPI
1994
+ BCryptRemoveContextFunction(
1995
+ _In_ ULONG dwTable,
1996
+ _In_z_ LPCWSTR pszContext,
1997
+ _In_ ULONG dwInterface,
1998
+ _In_z_ LPCWSTR pszFunction);
1999
+
2000
+ _Must_inspect_result_
2001
+ NTSTATUS
2002
+ WINAPI
2003
+ BCryptEnumContextFunctions(
2004
+ _In_ ULONG dwTable,
2005
+ _In_z_ LPCWSTR pszContext,
2006
+ _In_ ULONG dwInterface,
2007
+ _Inout_ ULONG* pcbBuffer,
2008
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_CONTEXT_FUNCTIONS *ppBuffer);
2009
+
2010
+ _Must_inspect_result_
2011
+ NTSTATUS
2012
+ WINAPI
2013
+ BCryptConfigureContextFunction(
2014
+ _In_ ULONG dwTable,
2015
+ _In_z_ LPCWSTR pszContext,
2016
+ _In_ ULONG dwInterface,
2017
+ _In_z_ LPCWSTR pszFunction,
2018
+ _In_ PCRYPT_CONTEXT_FUNCTION_CONFIG pConfig);
2019
+
2020
+ _Must_inspect_result_
2021
+ NTSTATUS
2022
+ WINAPI
2023
+ BCryptQueryContextFunctionConfiguration(
2024
+ _In_ ULONG dwTable,
2025
+ _In_z_ LPCWSTR pszContext,
2026
+ _In_ ULONG dwInterface,
2027
+ _In_z_ LPCWSTR pszFunction,
2028
+ _Inout_ ULONG* pcbBuffer,
2029
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_CONTEXT_FUNCTION_CONFIG *ppBuffer);
2030
+
2031
+
2032
+ _Must_inspect_result_
2033
+ NTSTATUS
2034
+ WINAPI
2035
+ BCryptEnumContextFunctionProviders(
2036
+ _In_ ULONG dwTable,
2037
+ _In_z_ LPCWSTR pszContext,
2038
+ _In_ ULONG dwInterface,
2039
+ _In_z_ LPCWSTR pszFunction,
2040
+ _Inout_ ULONG* pcbBuffer,
2041
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_CONTEXT_FUNCTION_PROVIDERS *ppBuffer);
2042
+
2043
+ _Must_inspect_result_
2044
+ NTSTATUS
2045
+ WINAPI
2046
+ BCryptSetContextFunctionProperty(
2047
+ _In_ ULONG dwTable,
2048
+ _In_z_ LPCWSTR pszContext,
2049
+ _In_ ULONG dwInterface,
2050
+ _In_z_ LPCWSTR pszFunction,
2051
+ _In_z_ LPCWSTR pszProperty,
2052
+ _In_ ULONG cbValue,
2053
+ _In_reads_bytes_opt_(cbValue) PUCHAR pbValue);
2054
+
2055
+ _Must_inspect_result_
2056
+ NTSTATUS
2057
+ WINAPI
2058
+ BCryptQueryContextFunctionProperty(
2059
+ _In_ ULONG dwTable,
2060
+ _In_z_ LPCWSTR pszContext,
2061
+ _In_ ULONG dwInterface,
2062
+ _In_z_ LPCWSTR pszFunction,
2063
+ _In_z_ LPCWSTR pszProperty,
2064
+ _Inout_ ULONG* pcbValue,
2065
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PUCHAR *ppbValue);
2066
+
2067
+ #endif //#ifndef KERNEL_MODE_CNG
2068
+
2069
+ //
2070
+ // Configuration Change Notification Functions
2071
+ //
2072
+
2073
+ #ifdef KERNEL_MODE_CNG
2074
+ _Must_inspect_result_
2075
+ NTSTATUS
2076
+ WINAPI
2077
+ BCryptRegisterConfigChangeNotify(
2078
+ _In_ PRKEVENT pEvent);
2079
+
2080
+ #else
2081
+ _Must_inspect_result_
2082
+ NTSTATUS
2083
+ WINAPI
2084
+ BCryptRegisterConfigChangeNotify(
2085
+ _Out_ HANDLE *phEvent);
2086
+ #endif
2087
+
2088
+ #ifdef KERNEL_MODE_CNG
2089
+ NTSTATUS
2090
+ WINAPI
2091
+ BCryptUnregisterConfigChangeNotify(
2092
+ _In_ PRKEVENT pEvent);
2093
+
2094
+ #else
2095
+ NTSTATUS
2096
+ WINAPI
2097
+ BCryptUnregisterConfigChangeNotify(
2098
+ _In_ HANDLE hEvent);
2099
+ #endif
2100
+
2101
+ //
2102
+ // Provider Resolution Functions
2103
+ //
2104
+ _Must_inspect_result_
2105
+ NTSTATUS WINAPI
2106
+ BCryptResolveProviders(
2107
+ _In_opt_z_ LPCWSTR pszContext,
2108
+ _In_opt_ ULONG dwInterface,
2109
+ _In_opt_z_ LPCWSTR pszFunction,
2110
+ _In_opt_z_ LPCWSTR pszProvider,
2111
+ _In_ ULONG dwMode,
2112
+ _In_ ULONG dwFlags,
2113
+ _Inout_ ULONG* pcbBuffer,
2114
+ _Outptr_opt_result_bytebuffer_all_maybenull_(*pcbBuffer) PCRYPT_PROVIDER_REFS *ppBuffer);
2115
+
2116
+ #endif /* WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM */
2117
+ #pragma endregion
2118
+
2119
+ #pragma region Application Family or OneCore Family
2120
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
2121
+
2122
+ //
2123
+ // Miscellaneous queries about the crypto environment
2124
+ //
2125
+ NTSTATUS
2126
+ WINAPI
2127
+ BCryptGetFipsAlgorithmMode(
2128
+ _Out_ BOOLEAN *pfEnabled
2129
+ );
2130
+
2131
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)*/
2132
+ #pragma endregion
2133
+
2134
+ #pragma region Desktop Family
2135
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
2136
+
2137
+ BOOLEAN
2138
+ CngGetFipsAlgorithmMode(
2139
+ VOID
2140
+ );
2141
+
2142
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
2143
+ #pragma endregion
2144
+
2145
+
2146
+ #ifdef __cplusplus
2147
+ }
2148
+ #endif
2149
+
2150
+ #if _MSC_VER >= 1200
2151
+ #pragma warning(pop)
2152
+ #endif
2153
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/bdamedia.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/bdatypes.h ADDED
@@ -0,0 +1,1135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //------------------------------------------------------------------------------
2
+ // File: BDATypes.h
3
+ //
4
+ // Desc: Typedefs and enums needed by both the WDM drivers and the user mode
5
+ // COM interfaces.
6
+ //
7
+ // Copyright (c) 1999 - 2004, Microsoft Corporation. All rights reserved.
8
+ //------------------------------------------------------------------------------
9
+
10
+
11
+ #ifndef _BDATYPES_
12
+
13
+ #define _BDATYPES_ 1
14
+
15
+ // !!!! do not #pragma once, we use this file twice(once for native and once for mgd) in managed interop
16
+ #include <winapifamily.h>
17
+
18
+ #pragma region Desktop Family
19
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
20
+
21
+ #include <exposeenums2managed.h>
22
+
23
+ /* Utility Macros */
24
+
25
+ #define MIN_DIMENSION 1
26
+
27
+
28
+ //===========================================================================
29
+ //
30
+ // BDA Topology Structures
31
+ //
32
+ //===========================================================================
33
+
34
+ #ifndef MANAGED_ENUMS
35
+
36
+ typedef struct _BDA_TEMPLATE_CONNECTION
37
+ {
38
+ ULONG FromNodeType;
39
+ ULONG FromNodePinType;
40
+ ULONG ToNodeType;
41
+ ULONG ToNodePinType;
42
+ }BDA_TEMPLATE_CONNECTION, *PBDA_TEMPLATE_CONNECTION;
43
+
44
+
45
+ typedef struct _BDA_TEMPLATE_PIN_JOINT
46
+ {
47
+ ULONG uliTemplateConnection;
48
+ ULONG ulcInstancesMax;
49
+ }BDA_TEMPLATE_PIN_JOINT, *PBDA_TEMPLATE_PIN_JOINT;
50
+ #endif
51
+
52
+
53
+ //===========================================================================
54
+ //
55
+ // BDA Events
56
+ //
57
+ //===========================================================================
58
+
59
+ // In-band Event IDs
60
+ //
61
+ ENUM BDA_EVENT_ID {
62
+ BDA_EVENT_SIGNAL_LOSS = 0,
63
+ BDA_EVENT_SIGNAL_LOCK,
64
+ BDA_EVENT_DATA_START,
65
+ BDA_EVENT_DATA_STOP,
66
+ BDA_EVENT_CHANNEL_ACQUIRED,
67
+ BDA_EVENT_CHANNEL_LOST,
68
+ BDA_EVENT_CHANNEL_SOURCE_CHANGED,
69
+ BDA_EVENT_CHANNEL_ACTIVATED,
70
+ BDA_EVENT_CHANNEL_DEACTIVATED,
71
+ BDA_EVENT_SUBCHANNEL_ACQUIRED,
72
+ BDA_EVENT_SUBCHANNEL_LOST,
73
+ BDA_EVENT_SUBCHANNEL_SOURCE_CHANGED,
74
+ BDA_EVENT_SUBCHANNEL_ACTIVATED,
75
+ BDA_EVENT_SUBCHANNEL_DEACTIVATED,
76
+ BDA_EVENT_ACCESS_GRANTED,
77
+ BDA_EVENT_ACCESS_DENIED,
78
+ BDA_EVENT_OFFER_EXTENDED,
79
+ BDA_EVENT_PURCHASE_COMPLETED,
80
+ BDA_EVENT_SMART_CARD_INSERTED,
81
+ BDA_EVENT_SMART_CARD_REMOVED
82
+ } BDA_EVENT_ID, *PBDA_EVENT_ID;
83
+
84
+
85
+
86
+ //===========================================================================
87
+ //
88
+ // KSSTREAM_HEADER extensions for BDA
89
+ //
90
+ //===========================================================================
91
+
92
+ #ifndef MANAGED_ENUMS
93
+ typedef struct tagKS_BDA_FRAME_INFO {
94
+ ULONG ExtendedHeaderSize; // Size of this extended header
95
+ DWORD dwFrameFlags; //
96
+ ULONG ulEvent; //
97
+ ULONG ulChannelNumber; //
98
+ ULONG ulSubchannelNumber; //
99
+ ULONG ulReason; //
100
+ } KS_BDA_FRAME_INFO, *PKS_BDA_FRAME_INFO;
101
+
102
+
103
+ //------------------------------------------------------------
104
+ //
105
+ // BDA Network Ethernet Filter Property Set
106
+ //
107
+ // {71985F43-1CA1-11d3-9CC8-00C04F7971E0}
108
+ //
109
+ typedef struct _BDA_ETHERNET_ADDRESS {
110
+ BYTE rgbAddress[6];
111
+ } BDA_ETHERNET_ADDRESS, *PBDA_ETHERNET_ADDRESS;
112
+
113
+ typedef struct _BDA_ETHERNET_ADDRESS_LIST {
114
+ ULONG ulcAddresses;
115
+ BDA_ETHERNET_ADDRESS rgAddressl[MIN_DIMENSION];
116
+ } BDA_ETHERNET_ADDRESS_LIST, * PBDA_ETHERNET_ADDRESS_LIST;
117
+
118
+ #endif
119
+
120
+ ENUM BDA_MULTICAST_MODE {
121
+ BDA_PROMISCUOUS_MULTICAST = 0,
122
+ BDA_FILTERED_MULTICAST,
123
+ BDA_NO_MULTICAST
124
+ } BDA_MULTICAST_MODE, *PBDA_MULTICAST_MODE;
125
+
126
+
127
+ //------------------------------------------------------------
128
+ //
129
+ // BDA Network IPv4 Filter Property Set
130
+ //
131
+ // {71985F44-1CA1-11d3-9CC8-00C04F7971E0}
132
+ //
133
+ #ifndef MANAGED_ENUMS
134
+ typedef struct _BDA_IPv4_ADDRESS {
135
+ BYTE rgbAddress[4];
136
+ } BDA_IPv4_ADDRESS, *PBDA_IPv4_ADDRESS;
137
+
138
+ typedef struct _BDA_IPv4_ADDRESS_LIST {
139
+ ULONG ulcAddresses;
140
+ BDA_IPv4_ADDRESS rgAddressl[MIN_DIMENSION];
141
+ } BDA_IPv4_ADDRESS_LIST, * PBDA_IPv4_ADDRESS_LIST;
142
+
143
+ //------------------------------------------------------------
144
+ //
145
+ // BDA Network IPv4 Filter Property Set
146
+ //
147
+ // {E1785A74-2A23-4fb3-9245-A8F88017EF33}
148
+ //
149
+ typedef struct _BDA_IPv6_ADDRESS {
150
+ BYTE rgbAddress[6];
151
+ } BDA_IPv6_ADDRESS, *PBDA_IPv6_ADDRESS;
152
+
153
+ typedef struct _BDA_IPv6_ADDRESS_LIST {
154
+ ULONG ulcAddresses;
155
+ BDA_IPv6_ADDRESS rgAddressl[MIN_DIMENSION];
156
+ } BDA_IPv6_ADDRESS_LIST, * PBDA_IPv6_ADDRESS_LIST;
157
+
158
+ #endif
159
+
160
+
161
+ //------------------------------------------------------------
162
+ //
163
+ //
164
+ // BDA Signal Property Set
165
+ //
166
+ // {D2F1644B-B409-11d2-BC69-00A0C9EE9E16}
167
+ //
168
+ ENUM BDA_SIGNAL_STATE {
169
+ BDA_SIGNAL_UNAVAILABLE = 0,
170
+ BDA_SIGNAL_INACTIVE,
171
+ BDA_SIGNAL_ACTIVE
172
+ } BDA_SIGNAL_STATE, * PBDA_SIGNAL_STATE;
173
+
174
+
175
+ //------------------------------------------------------------
176
+ //
177
+ //
178
+ // BDA Change Sync Method Set
179
+ //
180
+ // {FD0A5AF3-B41D-11d2-9C95-00C04F7971E0}
181
+ //
182
+ ENUM BDA_CHANGE_STATE {
183
+ BDA_CHANGES_COMPLETE = 0,
184
+ BDA_CHANGES_PENDING
185
+ } BDA_CHANGE_STATE, * PBDA_CHANGE_STATE;
186
+
187
+
188
+ //------------------------------------------------------------
189
+ //
190
+ //
191
+ // BDA Device Configuration Method Set
192
+ //
193
+ // {71985F45-1CA1-11d3-9CC8-00C04F7971E0}
194
+ //
195
+
196
+
197
+ //------------------------------------------------------------
198
+ //
199
+ //
200
+ // BDA Topology Property Set
201
+ //
202
+ // {A14EE835-0A23-11d3-9CC7-00C04F7971E0}
203
+ //
204
+
205
+ #ifndef MANAGED_ENUMS
206
+ typedef struct _BDANODE_DESCRIPTOR
207
+ {
208
+ ULONG ulBdaNodeType; // The node type as it is used
209
+ // in the BDA template topology
210
+
211
+ GUID guidFunction; // GUID from BdaMedia.h describing
212
+ // the node's function (e.g.
213
+ // KSNODE_BDA_RF_TUNER)
214
+
215
+ GUID guidName; // GUID that can be use to look up
216
+ // a displayable name for the node.
217
+ } BDANODE_DESCRIPTOR, *PBDANODE_DESCRIPTOR;
218
+
219
+
220
+ //------------------------------------------------------------
221
+ //
222
+ //
223
+ // BDA Void Transform Property Set
224
+ //
225
+ // {71985F46-1CA1-11d3-9CC8-00C04F7971E0}
226
+ //
227
+
228
+
229
+ //------------------------------------------------------------
230
+ //
231
+ //
232
+ // BDA Null Transform Property Set
233
+ //
234
+ // {DDF15B0D-BD25-11d2-9CA0-00C04F7971E0}
235
+ //
236
+
237
+
238
+ //------------------------------------------------------------
239
+ //
240
+ //
241
+ // BDA Frequency Filter Property Set
242
+ //
243
+ // {71985F47-1CA1-11d3-9CC8-00C04F7971E0}
244
+ //
245
+
246
+
247
+ //------------------------------------------------------------
248
+ //
249
+ //
250
+ // BDA Autodemodulate Property Set
251
+ //
252
+ // {DDF15B12-BD25-11d2-9CA0-00C04F7971E0}
253
+ //
254
+
255
+
256
+ //------------------------------------------------------------
257
+ //
258
+ //
259
+ // BDA Table Section Property Set
260
+ //
261
+ // {516B99C5-971C-4aaf-B3F3-D9FDA8A15E16}
262
+ //
263
+
264
+ typedef struct _BDA_TABLE_SECTION
265
+ {
266
+ ULONG ulPrimarySectionId;
267
+ ULONG ulSecondarySectionId;
268
+ ULONG ulcbSectionLength;
269
+ ULONG argbSectionData[MIN_DIMENSION];
270
+ } BDA_TABLE_SECTION, *PBDA_TABLE_SECTION;
271
+
272
+ #endif
273
+
274
+ #ifndef MANAGED_ENUMS
275
+
276
+ //------------------------------------------------------------
277
+ //
278
+ //
279
+ // BDA Diseq Command Property Set
280
+ //
281
+ // {F84E2AB0-3C6B-45e3-A0FC-8669D4B81F11}
282
+ //
283
+
284
+ typedef struct _BDA_DISEQC_SEND
285
+ {
286
+ ULONG ulRequestId;
287
+ ULONG ulPacketLength;
288
+ BYTE argbPacketData[8];
289
+ } BDA_DISEQC_SEND, *PBDA_DISEQC_SEND;
290
+
291
+ typedef struct _BDA_DISEQC_RESPONSE
292
+ {
293
+ ULONG ulRequestId;
294
+ ULONG ulPacketLength;
295
+ BYTE argbPacketData[8];
296
+ } BDA_DISEQC_RESPONSE, *PBDA_DISEQC_RESPONSE;
297
+
298
+
299
+ #endif
300
+ //------------------------------------------------------------
301
+ //
302
+ //
303
+ // BDA PID Filter Property Set
304
+ //
305
+ // {D0A67D65-08DF-4fec-8533-E5B550410B85}
306
+ //
307
+
308
+ //---------------------------------------------------------------------
309
+ // From IEnumPIDMap interface
310
+ //---------------------------------------------------------------------
311
+
312
+ ENUM MEDIA_SAMPLE_CONTENT {
313
+ MEDIA_TRANSPORT_PACKET, // complete TS packet e.g. pass-through mode
314
+ MEDIA_ELEMENTARY_STREAM, // PES payloads; audio/video only
315
+ MEDIA_MPEG2_PSI, // PAT, PMT, CAT, Private
316
+ MEDIA_TRANSPORT_PAYLOAD // gathered TS packet payloads (PES packets, etc...)
317
+ } MEDIA_SAMPLE_CONTENT ;
318
+
319
+ #ifndef MANAGED_ENUMS
320
+ typedef struct {
321
+ ULONG ulPID ;
322
+ MEDIA_SAMPLE_CONTENT MediaSampleContent ;
323
+ } PID_MAP ;
324
+
325
+ typedef struct _BDA_PID_MAP
326
+ {
327
+ MEDIA_SAMPLE_CONTENT MediaSampleContent;
328
+ ULONG ulcPIDs;
329
+ ULONG aulPIDs[MIN_DIMENSION];
330
+ } BDA_PID_MAP, *PBDA_PID_MAP;
331
+
332
+ typedef struct _BDA_PID_UNMAP
333
+ {
334
+ ULONG ulcPIDs;
335
+ ULONG aulPIDs[MIN_DIMENSION];
336
+ } BDA_PID_UNMAP, *PBDA_PID_UNMAP;
337
+
338
+
339
+ //------------------------------------------------------------
340
+ //
341
+ //
342
+ // BDA CA Property Set
343
+ //
344
+ // {B0693766-5278-4ec6-B9E1-3CE40560EF5A}
345
+ //
346
+ typedef struct _BDA_CA_MODULE_UI
347
+ {
348
+ ULONG ulFormat;
349
+ ULONG ulbcDesc;
350
+ ULONG ulDesc[MIN_DIMENSION];
351
+ } BDA_CA_MODULE_UI, *PBDA_CA_MODULE_UI;
352
+
353
+ typedef struct _BDA_PROGRAM_PID_LIST
354
+ {
355
+ ULONG ulProgramNumber;
356
+ ULONG ulcPIDs;
357
+ ULONG ulPID[MIN_DIMENSION];
358
+ } BDA_PROGRAM_PID_LIST, *PBDA_PROGRAM_PID_LIST;
359
+
360
+ #endif
361
+
362
+ //------------------------------------------------------------
363
+ //
364
+ //
365
+ // BDA CA Event Set
366
+ //
367
+ // {488C4CCC-B768-4129-8EB1-B00A071F9068}
368
+ //
369
+
370
+ #ifndef MANAGED_ENUMS
371
+
372
+ //=============================================================
373
+ // PBDA RESULT parameter definition
374
+ //=============================================================
375
+ typedef LONG PBDARESULT;
376
+
377
+ //=============================================================
378
+ // BDA_DRM_STATUS used by the DRMService
379
+ //=============================================================
380
+
381
+ typedef struct _BDA_DRM_DRMSTATUS
382
+ {
383
+ PBDARESULT lResult;
384
+ GUID DRMuuid;
385
+ ULONG ulDrmUuidListStringSize;
386
+ GUID argbDrmUuidListString[MIN_DIMENSION];
387
+ } BDA_DRM_DRMSTATUS, *PBDA_DRM_DRMSTATUS;
388
+
389
+
390
+ //=============================================================
391
+ // PBDA_WMDRM and PBDA_WMDRMTuner structures
392
+ //=============================================================
393
+
394
+ typedef struct _BDA_WMDRM_STATUS
395
+ {
396
+ PBDARESULT lResult;
397
+ ULONG ulMaxCaptureTokenSize;
398
+ ULONG uMaxStreamingPid;
399
+ ULONG ulMaxLicense;
400
+ ULONG ulMinSecurityLevel;
401
+ ULONG ulRevInfoSequenceNumber;
402
+ ULONGLONG ulRevInfoIssuedTime;
403
+ ULONG ulRevListVersion;
404
+ ULONG ulRevInfoTTL;
405
+ ULONG ulState;
406
+ } BDA_WMDRM_STATUS, *PBDA_WMDRM_STATUS;
407
+
408
+ typedef struct _BDA_WMDRM_KEYINFOLIST
409
+ {
410
+ PBDARESULT lResult;
411
+ ULONG ulKeyuuidBufferLen;
412
+ GUID argKeyuuidBuffer[MIN_DIMENSION];
413
+ } BDA_WMDRM_KEYINFOLIST, *PBDA_WMDRM_KEYINFOLIST;
414
+
415
+ typedef struct _BDA_BUFFER
416
+ {
417
+ PBDARESULT lResult;
418
+ ULONG ulBufferSize;
419
+ BYTE argbBuffer[MIN_DIMENSION];
420
+ } BDA_BUFFER, *PBDA_BUFFER;
421
+
422
+ //=============================================================
423
+ // PBDA - DRM structures used in methods
424
+ //=============================================================
425
+
426
+ typedef struct _BDA_WMDRM_RENEWLICENSE
427
+ {
428
+ PBDARESULT lResult;
429
+ ULONG ulDescrambleStatus;
430
+ ULONG ulXmrLicenseOutputLength;
431
+ BYTE argbXmrLicenceOutputBuffer[MIN_DIMENSION]; //License and Entitlement Token Buffer
432
+ } BDA_WMDRM_RENEWLICENSE, *PBDA_WMDRM_RENEWLICENSE;
433
+
434
+ typedef struct _BDA_WMDRMTUNER_PIDPROTECTION
435
+ {
436
+ PBDARESULT lResult;
437
+ GUID uuidKeyID;
438
+ } BDA_WMDRMTUNER_PIDPROTECTION, *PBDA_WMDRMTUNER_PIDPROTECTION;
439
+
440
+ typedef struct _BDA_WMDRMTUNER_PURCHASEENTITLEMENT
441
+ {
442
+ PBDARESULT lResult;
443
+ ULONG ulDescrambleStatus;
444
+ ULONG ulCaptureTokenLength;
445
+ BYTE argbCaptureTokenBuffer[MIN_DIMENSION];
446
+ } BDA_WMDRMTUNER_PURCHASEENTITLEMENT, *PBDA_WMDRMTUNER_PURCHASEENTITLEMENT;
447
+
448
+ //=============================================================
449
+ // PBDA - TUNER structures used in methods
450
+ //=============================================================
451
+
452
+ typedef struct _BDA_TUNER_TUNERSTATE {
453
+ PBDARESULT lResult;
454
+ ULONG ulTuneLength;
455
+ BYTE argbTuneData [MIN_DIMENSION];
456
+ } BDA_TUNER_TUNERSTATE, *PBDA_TUNER_TUNERSTATE;
457
+
458
+ typedef struct _BDA_TUNER_DIAGNOSTICS {
459
+ PBDARESULT lResult;
460
+ ULONG ulSignalLevel;
461
+ ULONG ulSignalLevelQuality;
462
+ ULONG ulSignalNoiseRatio;
463
+ } BDA_TUNER_DIAGNOSTICS, *PBDA_TUNER_DIAGNOSTICS;
464
+
465
+ //=============================================================
466
+ // PBDA - STRING structure used in methods
467
+ //=============================================================
468
+
469
+ typedef struct _BDA_STRING
470
+ {
471
+ PBDARESULT lResult;
472
+ ULONG ulStringSize;
473
+ BYTE argbString[MIN_DIMENSION];
474
+ } BDA_STRING, *PBDA_STRING;
475
+
476
+
477
+ //=============================================================
478
+ // PBDA - SCANNING structures used in methods
479
+ //=============================================================
480
+
481
+ typedef struct _BDA_SCAN_CAPABILTIES
482
+ {
483
+ PBDARESULT lResult;
484
+ UINT64 ul64AnalogStandardsSupported;
485
+ } BDA_SCAN_CAPABILTIES, *PBDA_SCAN_CAPABILTIES;
486
+
487
+ typedef struct _BDA_SCAN_STATE
488
+ {
489
+ PBDARESULT lResult;
490
+ ULONG ulSignalLock;
491
+ ULONG ulSecondsLeft;
492
+ ULONG ulCurrentFrequency;
493
+ } BDA_SCAN_STATE, *PBDA_SCAN_STATE;
494
+
495
+ typedef struct _BDA_SCAN_START
496
+ {
497
+ PBDARESULT lResult;
498
+ ULONG LowerFrequency;
499
+ ULONG HigerFrequency;
500
+ } BDA_SCAN_START, *PBDA_SCAN_START;
501
+
502
+
503
+ //=============================================================
504
+ // PBDA - GUIDE DATA structures used in methods
505
+ //=============================================================
506
+
507
+ typedef struct _BDA_GDDS_DATATYPE
508
+ {
509
+ PBDARESULT lResult;
510
+ GUID uuidDataType;
511
+ } BDA_GDDS_DATATYPE, *P_BDA_GDDS_DATATYPE;
512
+
513
+ typedef struct _BDA_GDDS_DATA
514
+ {
515
+ PBDARESULT lResult;
516
+ ULONG ulDataLength;
517
+ ULONG ulPercentageProgress;
518
+ BYTE argbData [MIN_DIMENSION];
519
+ } BDA_GDDS_DATA, *P_BDA_GDDS_DATA;
520
+
521
+
522
+ //=============================================================
523
+ // PBDA - USER ACTIVITY structures used in methods
524
+ //=============================================================
525
+
526
+ typedef struct _BDA_USERACTIVITY_INTERVAL
527
+ {
528
+ PBDARESULT lResult;
529
+ ULONG ulActivityInterval;
530
+ } BDA_USERACTIVITY_INTERVAL, *P_BDA_USERACTIVITY_INTERVAL;
531
+
532
+
533
+ //=============================================================
534
+ // PBDA - CAS structures used in methods
535
+ //=============================================================
536
+
537
+ typedef struct _BDA_CAS_CHECK_ENTITLEMENTTOKEN
538
+ {
539
+ PBDARESULT lResult;
540
+ ULONG ulDescrambleStatus;
541
+ } BDA_CAS_CHECK_ENTITLEMENTTOKEN, *PBDA_CAS_CHECK_ENTITLEMENTTOKEN;
542
+
543
+ typedef struct _BDA_CAS_CLOSE_MMIDIALOG
544
+ {
545
+ PBDARESULT lResult;
546
+ ULONG SessionResult;
547
+ } BDA_CAS_CLOSE_MMIDIALOG, *PBDA_CAS_CLOSE_MMIDIALOG;
548
+
549
+ typedef struct _BDA_CAS_REQUESTTUNERDATA
550
+ {
551
+ UCHAR ucRequestPriority;
552
+ UCHAR ucRequestReason;
553
+ UCHAR ucRequestConsequences;
554
+ ULONG ulEstimatedTime;
555
+ } BDA_CAS_REQUESTTUNERDATA, *PBDA_CAS_REQUESTTUNERDATA;
556
+
557
+ typedef struct _BDA_CAS_OPENMMIDATA
558
+ {
559
+ ULONG ulDialogNumber;
560
+ ULONG ulDialogRequest;
561
+ GUID uuidDialogType;
562
+ USHORT usDialogDataLength;
563
+ BYTE argbDialogData[MIN_DIMENSION];
564
+ } BDA_CAS_OPENMMIDATA, *PBDA_CAS_OPENMMIDATA;
565
+
566
+ typedef struct _BDA_CAS_CLOSEMMIDATA
567
+ {
568
+ ULONG ulDialogNumber;
569
+ } BDA_CAS_CLOSEMMIDATA, *PBDA_CAS_CLOSEMMIDATA;
570
+
571
+ //=============================================================
572
+ // PBDA - ISDB CAS structures used in methods
573
+ //=============================================================
574
+
575
+ #pragma pack(push, 1)
576
+
577
+ ENUM ISDBCAS_REQUEST_ID {
578
+ ISDBCAS_REQUEST_ID_EMG = 0x38,
579
+ ISDBCAS_REQUEST_ID_EMD = 0x3A,
580
+ } ISDBCAS_REQUEST_ID ;
581
+
582
+ typedef struct _BDA_ISDBCAS_REQUESTHEADER
583
+ {
584
+ BYTE bInstruction; // EMD/EMG
585
+ BYTE bReserved[3]; // future use
586
+ ULONG ulDataLength; // byte size of argbIsdbCommand
587
+ BYTE argbIsdbCommand[MIN_DIMENSION];
588
+ } BDA_ISDBCAS_REQUESTHEADER, *PBDA_ISDBCAS_REQUESTHEADER;
589
+
590
+ typedef struct _BDA_ISDBCAS_RESPONSEDATA
591
+ {
592
+ PBDARESULT lResult;
593
+ ULONG ulRequestID;
594
+ ULONG ulIsdbStatus;
595
+ ULONG ulIsdbDataSize;
596
+ BYTE argbIsdbCommandData[MIN_DIMENSION];
597
+ } BDA_ISDBCAS_RESPONSEDATA, *PBDA_ISDBCAS_RESPONSEDATA;
598
+
599
+ typedef struct _BDA_ISDBCAS_EMG_REQ
600
+ {
601
+ BYTE bCLA; // 0x90
602
+ BYTE bINS; // 0x38
603
+ BYTE bP1; // 0x00
604
+ BYTE bP2; // 0x00
605
+ BYTE bLC; // Following bytes - 1(LE)
606
+ BYTE bCardId[6]; // from EMM message packet
607
+ BYTE bProtocol; // from EMM message packet
608
+ BYTE bCABroadcasterGroupId; // from EMM message packet
609
+ BYTE bMessageControl; // from EMM message packet
610
+ BYTE bMessageCode[MIN_DIMENSION]; // Last byte is reserved as 'LE'
611
+ } BDA_ISDBCAS_EMG_REQ, *PBDA_ISDBCAS_EMG_REQ;
612
+
613
+ #pragma pack(pop)
614
+
615
+ //=============================================================
616
+ // PBDA - MUX structures used in methods
617
+ //=============================================================
618
+ ENUM MUX_PID_TYPE {
619
+ PID_OTHER = -1,
620
+ PID_ELEMENTARY_STREAM, // PES payloads
621
+ PID_MPEG2_SECTION_PSI_SI, // ISO 13818_1 Sections PAT, PMT, CAT, Private. Service Information Sections e.g SDT, NIT, EIT, BAT
622
+ } MUX_PID_TYPE ;
623
+
624
+ #pragma pack(push, 2)
625
+ typedef struct _BDA_MUX_PIDLISTITEM
626
+ {
627
+ USHORT usPIDNumber; //PID number of the stream
628
+ USHORT usProgramNumber; //associated Service Id, if applicable
629
+ MUX_PID_TYPE ePIDType; //PID Type of the stream if applicable
630
+ } BDA_MUX_PIDLISTITEM, *PBDA_MUX_PIDLISTITEM;
631
+ #pragma pack(pop)
632
+
633
+ #endif
634
+
635
+ //=============================================================
636
+ // BDA - TS Selector structures used in methods
637
+ //=============================================================
638
+
639
+ // |<-------------- bTSInfolength ---------------------->|
640
+ // | |
641
+ // | | |
642
+ // | BDA_TS_SELECTORINFO | BDA_TS_SELECTORINFO_ISDBS_EXT |
643
+ // | | (for ISDB-S extension) |
644
+ // | | |
645
+
646
+ #pragma pack(push, 1)
647
+ typedef struct _BDA_TS_SELECTORINFO
648
+ {
649
+ BYTE bTSInfolength; // buffer length including extension
650
+ BYTE bReserved[2];
651
+ GUID guidNetworkType; // current type of tuning
652
+ BYTE bTSIDCount; // number of usTSID
653
+ USHORT usTSID[MIN_DIMENSION];
654
+ } BDA_TS_SELECTORINFO, *PBDA_TS_SELECTORINFO;
655
+
656
+ typedef struct _BDA_TS_SELECTORINFO_ISDBS_EXT
657
+ {
658
+ BYTE bTMCC[48];
659
+ } BDA_TS_SELECTORINFO_ISDBS_EXT, *PBDA_TS_SELECTORINFO_ISDBS_EXT;
660
+ #pragma pack(pop)
661
+
662
+ //DVB-T2 related L1 signalling information returned in _GETTSINFORMATION
663
+
664
+ typedef struct _BDA_DVBT2_L1_SIGNALLING_DATA
665
+ {
666
+ BYTE L1Pre_TYPE;
667
+ BYTE L1Pre_BWT_S1_S2;
668
+ BYTE L1Pre_REPETITION_GUARD_PAPR;
669
+ BYTE L1Pre_MOD_COD_FEC;
670
+ BYTE L1Pre_POSTSIZE_INFO_PILOT[5];
671
+ BYTE L1Pre_TX_ID_AVAIL;
672
+ BYTE L1Pre_CELL_ID[2];
673
+ BYTE L1Pre_NETWORK_ID[2];
674
+ BYTE L1Pre_T2SYSTEM_ID[2];
675
+ BYTE L1Pre_NUM_T2_FRAMES;
676
+ BYTE L1Pre_NUM_DATA_REGENFLAG_L1POSTEXT[2];
677
+ BYTE L1Pre_NUMRF_CURRENTRF_RESERVED[2];
678
+ BYTE L1Pre_CRC32[4];
679
+ BYTE L1PostData[MIN_DIMENSION];
680
+ } BDA_DVBT2_L1_SIGNALLING_DATA, *PBDA_DVBT2_L1_SIGNALLING_DATA;
681
+
682
+
683
+ //=============================================================
684
+ // PBDA - RATING structures used in methods
685
+ //=============================================================
686
+ typedef struct _BDA_RATING_PINRESET
687
+ {
688
+ BYTE bPinLength; //Buffer size including a null termination
689
+ BYTE argbNewPin[MIN_DIMENSION]; //Null terminated UTF8. Use empty string if disable pin
690
+ } BDA_RATING_PINRESET, *PBDA_RATING_PINRESET;
691
+
692
+ //=============================================================
693
+ //
694
+ //
695
+ // BDA Tuning Model enumerations
696
+ //
697
+ //
698
+ //=============================================================
699
+
700
+ // system type for particular DVB Tuning Space instance
701
+ ENUM DVBSystemType {
702
+ DVB_Cable,
703
+ DVB_Terrestrial,
704
+ DVB_Satellite,
705
+ ISDB_Terrestrial,
706
+ ISDB_Satellite,
707
+ } DVBSystemType;
708
+
709
+ //------------------------------------------------------------
710
+ //
711
+ // BDA Channel Tune Request
712
+
713
+ ENUM BDA_Channel {
714
+ BDA_UNDEFINED_CHANNEL = -1,
715
+ } BDA_Channel ;
716
+
717
+
718
+ //------------------------------------------------------------
719
+ //
720
+ // BDA Component(substream)
721
+ //
722
+ // Note: Persistent TS remember preferred component categories by their number.
723
+ // Please update the rgs files at multimedia\dshow\vidctl\msvidctl\res
724
+ // and multimedia\dshow\vidctl\manifests\Video-TVVideoControl.man accordingly
725
+ // if the order/value changes.
726
+ // Also make sure ehiProxy.asmmeta, ehiVidCtl.asmmeta and bdatunepia.asmmeta
727
+ // are properly updated.
728
+ //
729
+ ENUM ComponentCategory {
730
+ CategoryNotSet = -1,
731
+ CategoryOther = 0,
732
+ CategoryVideo,
733
+ CategoryAudio,
734
+ CategoryText,
735
+ CategorySubtitles,
736
+ CategoryCaptions,
737
+ CategorySuperimpose,
738
+ CategoryData,
739
+ CATEGORY_COUNT,
740
+ } ComponentCategory;
741
+
742
+ // Component Status
743
+ ENUM ComponentStatus {
744
+ StatusActive,
745
+ StatusInactive,
746
+ StatusUnavailable,
747
+ } ComponentStatus;
748
+
749
+
750
+ //------------------------------------------------------------
751
+ //
752
+ // BDA MPEG2 Component Type
753
+ //
754
+ // from the MPEG2 specification
755
+ ENUM MPEG2StreamType {
756
+ BDA_UNITIALIZED_MPEG2STREAMTYPE = -1,
757
+ Reserved1 = 0x00,
758
+ ISO_IEC_11172_2_VIDEO = 0x01,
759
+ ISO_IEC_13818_2_VIDEO = 0x02,
760
+ ISO_IEC_11172_3_AUDIO = 0x03,
761
+ ISO_IEC_13818_3_AUDIO = 0x04,
762
+ ISO_IEC_13818_1_PRIVATE_SECTION = 0x05,
763
+ ISO_IEC_13818_1_PES = 0x06,
764
+ ISO_IEC_13522_MHEG = 0x07,
765
+ ANNEX_A_DSM_CC = 0x08,
766
+ ITU_T_REC_H_222_1 = 0x09,
767
+ ISO_IEC_13818_6_TYPE_A = 0x0A,
768
+ ISO_IEC_13818_6_TYPE_B = 0x0B,
769
+ ISO_IEC_13818_6_TYPE_C = 0x0C,
770
+ ISO_IEC_13818_6_TYPE_D = 0x0D,
771
+ ISO_IEC_13818_1_AUXILIARY = 0x0E,
772
+ ISO_IEC_13818_7_AUDIO = 0x0F,
773
+ ISO_IEC_14496_2_VISUAL = 0x10,
774
+ ISO_IEC_14496_3_AUDIO = 0x11,
775
+ ISO_IEC_14496_1_IN_PES = 0x12,
776
+ ISO_IEC_14496_1_IN_SECTION = 0x13,
777
+ ISO_IEC_13818_6_DOWNLOAD = 0x14,
778
+ METADATA_IN_PES = 0x15,
779
+ METADATA_IN_SECTION = 0x16,
780
+ METADATA_IN_DATA_CAROUSEL = 0x17,
781
+ METADATA_IN_OBJECT_CAROUSEL = 0x18,
782
+ METADATA_IN_DOWNLOAD_PROTOCOL = 0x19,
783
+ IRPM_STREAMM = 0x1A,
784
+ ITU_T_H264 = 0x1B,
785
+ ISO_IEC_13818_1_RESERVED = 0x1C, // continues until 0x7F
786
+ USER_PRIVATE = 0x10, // standard says 0x80, retaining for backwards compatibility
787
+ HEVC_VIDEO_OR_TEMPORAL_VIDEO = 0x24,
788
+ HEVC_TEMPORAL_VIDEO_SUBSET = 0x25,
789
+ MPEG_H_AUDIO = 0x2D, // used for single-stream delivery or for the main stream in case of multi-stream delivery.
790
+ MPEG_H_AUDIO_MS = 0x2E, // used for additional (auxiliary) stream in case of MPEG-H multi-stream delivery.
791
+ ISO_IEC_USER_PRIVATE = 0x80,
792
+ DOLBY_AC3_AUDIO = 0x81,
793
+ DOLBY_DIGITAL_PLUS_AUDIO_ATSC = 0X87
794
+ } MPEG2StreamType;
795
+
796
+
797
+
798
+ //------------------------------------------------------------
799
+ //
800
+ // mpeg-2 transport stride format block; associated with media
801
+ // types MEDIATYPE_Stream/MEDIASUBTYPE_MPEG2_TRANSPORT_STRIDE;
802
+ // *all* format blocks associated with above media type *must*
803
+ // start with the MPEG2_TRANSPORT_STRIDE structure
804
+ //
805
+
806
+ #ifndef MANAGED_ENUMS
807
+ typedef struct _MPEG2_TRANSPORT_STRIDE {
808
+ DWORD dwOffset ;
809
+ DWORD dwPacketLength ;
810
+ DWORD dwStride ;
811
+ } MPEG2_TRANSPORT_STRIDE, *PMPEG2_TRANSPORT_STRIDE ;
812
+ #endif
813
+
814
+ //------------------------------------------------------------
815
+ //
816
+ // BDA ATSC Component Type
817
+ //
818
+ //
819
+ // ATSC made AC3 Audio a descriptor instead of
820
+ // defining a user private stream type.
821
+
822
+ FLAGS ATSCComponentTypeFlags {
823
+ // bit flags for various component type properties
824
+ ATSCCT_AC3 = 0x00000001,
825
+ } ATSCComponentTypeFlags;
826
+
827
+
828
+ //------------------------------------------------------------
829
+ //
830
+ // BDA Locators
831
+ //
832
+
833
+
834
+ ENUM BinaryConvolutionCodeRate {
835
+ BDA_BCC_RATE_NOT_SET = -1,
836
+ BDA_BCC_RATE_NOT_DEFINED = 0,
837
+ BDA_BCC_RATE_1_2 = 1, // 1/2
838
+ BDA_BCC_RATE_2_3, // 2/3
839
+ BDA_BCC_RATE_3_4, // 3/4
840
+ BDA_BCC_RATE_3_5, // 3/5
841
+ BDA_BCC_RATE_4_5, // 4/5
842
+ BDA_BCC_RATE_5_6, // 5/6
843
+ BDA_BCC_RATE_5_11, // 5/11
844
+ BDA_BCC_RATE_7_8, // 7/8
845
+ BDA_BCC_RATE_1_4, // 1/4
846
+ BDA_BCC_RATE_1_3, // 1/3
847
+ BDA_BCC_RATE_2_5, // 2/5
848
+ BDA_BCC_RATE_6_7, // 6/7
849
+ BDA_BCC_RATE_8_9, // 8/9
850
+ BDA_BCC_RATE_9_10, // 9/10
851
+ BDA_BCC_RATE_MAX,
852
+ } BinaryConvolutionCodeRate;
853
+
854
+ ENUM FECMethod {
855
+ BDA_FEC_METHOD_NOT_SET = -1,
856
+ BDA_FEC_METHOD_NOT_DEFINED = 0,
857
+ BDA_FEC_VITERBI = 1, // FEC is a Viterbi Binary Convolution.
858
+ BDA_FEC_RS_204_188, // The FEC is Reed-Solomon 204/188 (outer FEC)
859
+ BDA_FEC_LDPC, // Low Density Parity Check error correction code
860
+ BDA_FEC_BCH, // Bose-Chaudhuri-Hocquenghem multiple error correction binary block code
861
+ BDA_FEC_RS_147_130, // The FEC is Reed-Solomon 147/130 (outer FEC) DirecTV-DSS
862
+ BDA_FEC_MAX,
863
+ } FECMethod;
864
+
865
+ ENUM ModulationType {
866
+ BDA_MOD_NOT_SET = -1,
867
+ BDA_MOD_NOT_DEFINED = 0,
868
+ BDA_MOD_16QAM = 1,
869
+ BDA_MOD_32QAM,
870
+ BDA_MOD_64QAM,
871
+ BDA_MOD_80QAM,
872
+ BDA_MOD_96QAM,
873
+ BDA_MOD_112QAM,
874
+ BDA_MOD_128QAM,
875
+ BDA_MOD_160QAM,
876
+ BDA_MOD_192QAM,
877
+ BDA_MOD_224QAM,
878
+ BDA_MOD_256QAM,
879
+ BDA_MOD_320QAM,
880
+ BDA_MOD_384QAM,
881
+ BDA_MOD_448QAM,
882
+ BDA_MOD_512QAM,
883
+ BDA_MOD_640QAM,
884
+ BDA_MOD_768QAM,
885
+ BDA_MOD_896QAM,
886
+ BDA_MOD_1024QAM,
887
+ BDA_MOD_QPSK, // Quadrature Phase Shift Keying (including backwards compatible mode)
888
+ BDA_MOD_BPSK, // Binary Phase Shift Keying
889
+ BDA_MOD_OQPSK, // Offset QPSK
890
+ BDA_MOD_8VSB, // 8-Level Vestigial Sideband
891
+ BDA_MOD_16VSB, // 16-Level Vestigial Sideband
892
+ BDA_MOD_ANALOG_AMPLITUDE, // std am
893
+ BDA_MOD_ANALOG_FREQUENCY, // std fm
894
+ BDA_MOD_8PSK, // 8 Phase Shift Keying (including backwards compatible mode)
895
+ BDA_MOD_RF, // analog TV (Video standards such as NTSC/PAL/SECAM specified in IAnalogLocator VideoStandard property)
896
+ BDA_MOD_16APSK, // DVB-S2 modulation 16-Level APSK
897
+ BDA_MOD_32APSK, // DVB-S2 modulation 32-Level APSK
898
+ BDA_MOD_NBC_QPSK, // Non-Backwards Compatible Quadrature Phase Shift Keying
899
+ BDA_MOD_NBC_8PSK, // Non-Backwards Compatible 8 Phase Shift Keying
900
+ BDA_MOD_DIRECTV, // DIRECTV DSS
901
+ BDA_MOD_ISDB_T_TMCC, // Automatic demodulation by Transmission and Multiplexing Configuration Control signal for ISDB-T
902
+ BDA_MOD_ISDB_S_TMCC, // Automatic demodulation by Transmission and Multiplexing Configuration Control signal for ISDB-S
903
+ BDA_MOD_MAX,
904
+ } ModulationType;
905
+
906
+ #ifdef _MANAGED
907
+ FLAGS TAG(ScanModulationTypes) : unsigned int
908
+ #else
909
+ // this is to silence enum warning C4369
910
+ FLAGS TAG(ScanModulationTypes)
911
+ #endif
912
+ {
913
+ BDA_SCAN_MOD_16QAM = 0x00000001,
914
+ BDA_SCAN_MOD_32QAM = 0x00000002,
915
+ BDA_SCAN_MOD_64QAM = 0x00000004,
916
+ BDA_SCAN_MOD_80QAM = 0x00000008,
917
+ BDA_SCAN_MOD_96QAM = 0x00000010,
918
+ BDA_SCAN_MOD_112QAM = 0x00000020,
919
+ BDA_SCAN_MOD_128QAM = 0x00000040,
920
+ BDA_SCAN_MOD_160QAM = 0x00000080,
921
+ BDA_SCAN_MOD_192QAM = 0x00000100,
922
+ BDA_SCAN_MOD_224QAM = 0x00000200,
923
+ BDA_SCAN_MOD_256QAM = 0x00000400,
924
+ BDA_SCAN_MOD_320QAM = 0x00000800,
925
+ BDA_SCAN_MOD_384QAM = 0x00001000,
926
+ BDA_SCAN_MOD_448QAM = 0x00002000,
927
+ BDA_SCAN_MOD_512QAM = 0x00004000,
928
+ BDA_SCAN_MOD_640QAM = 0x00008000,
929
+ BDA_SCAN_MOD_768QAM = 0x00010000,
930
+ BDA_SCAN_MOD_896QAM = 0x00020000,
931
+ BDA_SCAN_MOD_1024QAM = 0x00040000,
932
+ BDA_SCAN_MOD_QPSK = 0x00080000,
933
+ BDA_SCAN_MOD_BPSK = 0x00100000,
934
+ BDA_SCAN_MOD_OQPSK = 0x00200000,
935
+ BDA_SCAN_MOD_8VSB = 0x00400000,
936
+ BDA_SCAN_MOD_16VSB = 0x00800000,
937
+ BDA_SCAN_MOD_AM_RADIO = 0x01000000,
938
+ BDA_SCAN_MOD_FM_RADIO = 0x02000000,
939
+ BDA_SCAN_MOD_8PSK = 0x04000000,
940
+ BDA_SCAN_MOD_RF = 0x08000000, // analog TV
941
+ ScanModulationTypesMask_MCE_DigitalCable = BDA_MOD_64QAM |
942
+ BDA_MOD_256QAM,
943
+ ScanModulationTypesMask_MCE_TerrestrialATSC = BDA_MOD_8VSB,
944
+ ScanModulationTypesMask_MCE_AnalogTv = BDA_MOD_RF,
945
+ ScanModulationTypesMask_MCE_All_TV = 0xffffffff,
946
+ ScanModulationTypesMask_DVBC = BDA_MOD_64QAM | BDA_SCAN_MOD_128QAM |
947
+ BDA_MOD_256QAM,
948
+ BDA_SCAN_MOD_16APSK = 0x10000000,
949
+ BDA_SCAN_MOD_32APSK = 0x20000000,
950
+ } ScanModulationTypes;
951
+
952
+ ENUM SpectralInversion {
953
+ BDA_SPECTRAL_INVERSION_NOT_SET = -1,
954
+ BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0,
955
+ BDA_SPECTRAL_INVERSION_AUTOMATIC = 1,
956
+ BDA_SPECTRAL_INVERSION_NORMAL,
957
+ BDA_SPECTRAL_INVERSION_INVERTED,
958
+ BDA_SPECTRAL_INVERSION_MAX
959
+ } SpectralInversion;
960
+
961
+ ENUM Polarisation {
962
+ BDA_POLARISATION_NOT_SET = -1,
963
+ BDA_POLARISATION_NOT_DEFINED = 0,
964
+ BDA_POLARISATION_LINEAR_H = 1, // Linear horizontal polarisation
965
+ BDA_POLARISATION_LINEAR_V, // Linear vertical polarisation
966
+ BDA_POLARISATION_CIRCULAR_L, // Circular left polarisation
967
+ BDA_POLARISATION_CIRCULAR_R, // Circular right polarisation
968
+ BDA_POLARISATION_MAX,
969
+ } Polarisation;
970
+
971
+ ENUM LNB_Source {
972
+ BDA_LNB_SOURCE_NOT_SET = -1,
973
+ BDA_LNB_SOURCE_NOT_DEFINED = 0,
974
+ BDA_LNB_SOURCE_A = 1, //
975
+ BDA_LNB_SOURCE_B = 2, //
976
+ BDA_LNB_SOURCE_C = 3, //
977
+ BDA_LNB_SOURCE_D = 4, //
978
+ BDA_LNB_SOURCE_MAX,
979
+ } LNB_Source;
980
+
981
+
982
+ ENUM GuardInterval {
983
+ BDA_GUARD_NOT_SET = -1,
984
+ BDA_GUARD_NOT_DEFINED = 0,
985
+ BDA_GUARD_1_32 = 1, // Guard interval is 1/32
986
+ BDA_GUARD_1_16, // Guard interval is 1/16
987
+ BDA_GUARD_1_8, // Guard interval is 1/8
988
+ BDA_GUARD_1_4, // Guard interval is 1/4
989
+ BDA_GUARD_1_128, // Guard interval is 1/128 (DVB-T2)
990
+ BDA_GUARD_19_128, // Guard interval is 19/128 (DVB-T2)
991
+ BDA_GUARD_19_256, // Guard interval is 19/256 (DVB-T2)
992
+ BDA_GUARD_MAX,
993
+ } GuardInterval;
994
+
995
+ ENUM HierarchyAlpha {
996
+ BDA_HALPHA_NOT_SET = -1,
997
+ BDA_HALPHA_NOT_DEFINED = 0,
998
+ BDA_HALPHA_1 = 1, // Hierarchy alpha is 1.
999
+ BDA_HALPHA_2, // Hierarchy alpha is 2.
1000
+ BDA_HALPHA_4, // Hierarchy alpha is 4.
1001
+ BDA_HALPHA_MAX,
1002
+ } HierarchyAlpha;
1003
+
1004
+ ENUM TransmissionMode {
1005
+ BDA_XMIT_MODE_NOT_SET = -1,
1006
+ BDA_XMIT_MODE_NOT_DEFINED = 0,
1007
+ BDA_XMIT_MODE_2K = 1, // Transmission uses 1705 carriers (use a 2K FFT)
1008
+ BDA_XMIT_MODE_8K, // Transmission uses 6817 carriers (use an 8K FFT)
1009
+ BDA_XMIT_MODE_4K,
1010
+ BDA_XMIT_MODE_2K_INTERLEAVED,
1011
+ BDA_XMIT_MODE_4K_INTERLEAVED,
1012
+ BDA_XMIT_MODE_1K, //DVB-T2 (use 1K FFT)
1013
+ BDA_XMIT_MODE_16K, //DVB-T2 (use 16K FFT)
1014
+ BDA_XMIT_MODE_32K, //DVB-T2 (use 32K FFT)
1015
+ BDA_XMIT_MODE_MAX,
1016
+ } TransmissionMode;
1017
+
1018
+ ENUM RollOff {
1019
+ BDA_ROLL_OFF_NOT_SET = -1,
1020
+ BDA_ROLL_OFF_NOT_DEFINED = 0,
1021
+ BDA_ROLL_OFF_20 = 1, // .20 Roll Off (DVB-S2 Only)
1022
+ BDA_ROLL_OFF_25, // .25 Roll Off (DVB-S2 Only)
1023
+ BDA_ROLL_OFF_35, // .35 Roll Off (DVB-S2 Only)
1024
+ BDA_ROLL_OFF_MAX,
1025
+ } RollOff;
1026
+
1027
+ ENUM Pilot {
1028
+ BDA_PILOT_NOT_SET = -1,
1029
+ BDA_PILOT_NOT_DEFINED = 0,
1030
+ BDA_PILOT_OFF = 1, // Pilot Off (DVB-S2 Only)
1031
+ BDA_PILOT_ON, // Pilot On (DVB-S2 Only)
1032
+ BDA_PILOT_MAX,
1033
+ } Pilot;
1034
+
1035
+ typedef struct _BDA_SIGNAL_TIMEOUTS
1036
+ {
1037
+ ULONG ulCarrierTimeoutMs;
1038
+ ULONG ulScanningTimeoutMs;
1039
+ ULONG ulTuningTimeoutMs;
1040
+ } BDA_SIGNAL_TIMEOUTS, *PBDA_SIGNAL_TIMEOUTS;
1041
+
1042
+ // Settings for Tuner Frequency
1043
+ //
1044
+ ENUM BDA_Frequency {
1045
+ BDA_FREQUENCY_NOT_SET = -1,
1046
+ BDA_FREQUENCY_NOT_DEFINED = 0
1047
+ } BDA_Frequency;
1048
+
1049
+ // Settings for Tuner Range
1050
+ //
1051
+ // Tuner range refers to the setting of LNB High/Low as well as the
1052
+ // selection of a satellite on a multiple satellite switch.
1053
+ //
1054
+ ENUM BDA_Range {
1055
+ BDA_RANGE_NOT_SET = -1,
1056
+ BDA_RANGE_NOT_DEFINED = 0
1057
+ } BDA_Range;
1058
+
1059
+ // Settings for Tuner Channel Bandwidth
1060
+ //
1061
+ ENUM BDA_Channel_Bandwidth {
1062
+ BDA_CHAN_BANDWITH_NOT_SET = -1,
1063
+ BDA_CHAN_BANDWITH_NOT_DEFINED = 0
1064
+ } BDA_Channel_Bandwidth;
1065
+
1066
+ // Settings for Tuner Frequency Multiplier
1067
+ //
1068
+ ENUM BDA_Frequency_Multiplier {
1069
+ BDA_FREQUENCY_MULTIPLIER_NOT_SET = -1,
1070
+ BDA_FREQUENCY_MULTIPLIER_NOT_DEFINED = 0
1071
+ } BDA_Frequency_Multiplier;
1072
+
1073
+ FLAGS BDA_Comp_Flags {
1074
+ // equiv comparison rule overrides, default behavior is type specific
1075
+ BDACOMP_NOT_DEFINED = 0x00000000,
1076
+ BDACOMP_EXCLUDE_TS_FROM_TR = 0x00000001, // never put TS in TR equiv comparison
1077
+ BDACOMP_INCLUDE_LOCATOR_IN_TR = 0x00000002, // always include loc in TR equiv comparison
1078
+ BDACOMP_INCLUDE_COMPONENTS_IN_TR = 0x00000004, // always include components in TR equiv comparison
1079
+ } BDA_Comp_Flags;
1080
+
1081
+ ENUM ApplicationTypeType
1082
+ {
1083
+ SCTE28_ConditionalAccess = 0,
1084
+ SCTE28_POD_Host_Binding_Information,
1085
+ SCTE28_IPService,
1086
+ SCTE28_NetworkInterface_SCTE55_2,
1087
+ SCTE28_NetworkInterface_SCTE55_1,
1088
+ SCTE28_CopyProtection,
1089
+ SCTE28_Diagnostic,
1090
+ SCTE28_Undesignated,
1091
+ SCTE28_Reserved,
1092
+ }ApplicationTypeType;
1093
+
1094
+
1095
+ ENUM BDA_CONDITIONALACCESS_REQUESTTYPE {
1096
+ CONDITIONALACCESS_ACCESS_UNSPECIFIED = 0,
1097
+ CONDITIONALACCESS_ACCESS_NOT_POSSIBLE,
1098
+ CONDITIONALACCESS_ACCESS_POSSIBLE,
1099
+ CONDITIONALACCESS_ACCESS_POSSIBLE_NO_STREAMING_DISRUPTION
1100
+ } BDA_CONDITIONALACCESS_REQUESTTYPE;
1101
+
1102
+ ENUM BDA_CONDITIONALACCESS_MMICLOSEREASON {
1103
+ CONDITIONALACCESS_UNSPECIFIED = 0,
1104
+ CONDITIONALACCESS_CLOSED_ITSELF,
1105
+ CONDITIONALACCESS_TUNER_REQUESTED_CLOSE,
1106
+ CONDITIONALACCESS_DIALOG_TIMEOUT,
1107
+ CONDITIONALACCESS_DIALOG_FOCUS_CHANGE,
1108
+ CONDITIONALACCESS_DIALOG_USER_DISMISSED,
1109
+ CONDITIONALACCESS_DIALOG_USER_NOT_AVAILABLE
1110
+ } BDA_CONDITIONALACCESS_MMICLOSEREASON;
1111
+
1112
+ ENUM BDA_CONDITIONALACCESS_SESSION_RESULT {
1113
+ CONDITIONALACCESS_SUCCESSFULL = 0,
1114
+ CONDITIONALACCESS_ENDED_NOCHANGE,
1115
+ CONDITIONALACCESS_ABORTED
1116
+ } BDA_CONDITIONALACCESS_SESSION_RESULT;
1117
+
1118
+ ENUM BDA_DISCOVERY_STATE {
1119
+ BDA_DISCOVERY_UNSPECIFIED = 0,
1120
+ BDA_DISCOVERY_REQUIRED,
1121
+ BDA_DISCOVERY_COMPLETE
1122
+ } BDA_DISCOVERY_STATE;
1123
+
1124
+ // Digital Demodulator for DVBT2 Physical Layer Pipe
1125
+ #define BDA_PLP_ID_NOT_SET -1
1126
+
1127
+ #include <unexposeenums2managed.h>
1128
+
1129
+
1130
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
1131
+ #pragma endregion
1132
+
1133
+ #endif // not defined _BDATYPES_
1134
+
1135
+ // end of file -- bdatypes.h
msvc/Windows Kits/10/Include/10.0.26100.0/shared/bthdef.h ADDED
@@ -0,0 +1,1339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) 2000 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ bthdef.h
8
+
9
+ Abstract:
10
+
11
+ This module contains the Bluetooth common structures and definitions
12
+
13
+ Author:
14
+
15
+ Notes:
16
+
17
+ Environment:
18
+
19
+ Kernel mode only
20
+
21
+ Revision History:
22
+
23
+ --*/
24
+
25
+ #ifndef __BTHDEF_H__
26
+ #define __BTHDEF_H__
27
+ #include <winapifamily.h>
28
+
29
+ #pragma region Desktop Family
30
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
31
+
32
+ //
33
+ // Bluetooth 2.1 support added in KB942567
34
+ //
35
+ #if (NTDDI_VERSION > NTDDI_VISTASP1 || \
36
+ (NTDDI_VERSION == NTDDI_VISTASP1 && defined(VISTA_KB942567)))
37
+
38
+ #define BTH_MAJORVERSION 2
39
+ #define BTH_MINORVERSION 1
40
+
41
+ #elif(NTDDI_VERSION >= NTDDI_WINXPSP2)
42
+
43
+ #define BTH_MAJORVERSION 2
44
+ #define BTH_MINORVERSION 0
45
+
46
+ #endif // >= SP1+KB942567
47
+
48
+ #if _MSC_VER >= 1200
49
+ #pragma warning(push)
50
+ #endif
51
+ #pragma warning(disable:4201) // nameless struct/union
52
+
53
+ #if (NTDDI_VERSION >= NTDDI_WINXPSP2)
54
+
55
+ #ifndef GUID_DEFS_ONLY
56
+ #ifndef NO_BTHSDPDEF_INC
57
+ #include "bthsdpdef.h"
58
+ #endif // NO_BTHSDPDEF_INC
59
+ #endif // GUID_DEFS_ONLY
60
+
61
+ #ifndef NO_GUID_DEFS
62
+
63
+ // {0850302A-B344-4fda-9BE9-90576B8D46F0}
64
+ DEFINE_GUID(GUID_BTHPORT_DEVICE_INTERFACE, 0x850302a, 0xb344, 0x4fda, 0x9b, 0xe9, 0x90, 0x57, 0x6b, 0x8d, 0x46, 0xf0);
65
+
66
+ // RFCOMM device interface GUID for RFCOMM services
67
+ // {b142fc3e-fa4e-460b-8abc-072b628b3c70}
68
+ DEFINE_GUID(GUID_BTH_RFCOMM_SERVICE_DEVICE_INTERFACE, 0xb142fc3e, 0xfa4e, 0x460b, 0x8a, 0xbc, 0x07, 0x2b, 0x62, 0x8b, 0x3c, 0x70);
69
+
70
+ // {EA3B5B82-26EE-450E-B0D8-D26FE30A3869}
71
+ DEFINE_GUID(GUID_BLUETOOTH_RADIO_IN_RANGE, 0xea3b5b82, 0x26ee, 0x450e, 0xb0, 0xd8, 0xd2, 0x6f, 0xe3, 0x0a, 0x38, 0x69);
72
+
73
+ // {E28867C9-C2AA-4CED-B969-4570866037C4}
74
+ DEFINE_GUID(GUID_BLUETOOTH_RADIO_OUT_OF_RANGE, 0xe28867c9, 0xc2aa, 0x4ced, 0xb9, 0x69, 0x45, 0x70, 0x86, 0x60, 0x37, 0xc4);
75
+
76
+ // {7EAE4030-B709-4AA8-AC55-E953829C9DAA}
77
+ DEFINE_GUID(GUID_BLUETOOTH_L2CAP_EVENT, 0x7eae4030, 0xb709, 0x4aa8, 0xac, 0x55, 0xe9, 0x53, 0x82, 0x9c, 0x9d, 0xaa);
78
+
79
+ // {FC240062-1541-49BE-B463-84C4DCD7BF7F}
80
+ DEFINE_GUID(GUID_BLUETOOTH_HCI_EVENT, 0xfc240062, 0x1541, 0x49be, 0xb4, 0x63, 0x84, 0xc4, 0xdc, 0xd7, 0xbf, 0x7f);
81
+
82
+ //
83
+ // Support added in KB942567
84
+ //
85
+ #if (NTDDI_VERSION > NTDDI_VISTASP1 || \
86
+ (NTDDI_VERSION == NTDDI_VISTASP1 && defined(VISTA_KB942567)))
87
+
88
+ // {5DC9136D-996C-46DB-84F5-32C0A3F47352}
89
+ DEFINE_GUID(GUID_BLUETOOTH_AUTHENTICATION_REQUEST, 0x5DC9136D, 0x996C, 0x46DB, 0x84, 0xF5, 0x32, 0xC0, 0xA3, 0xF4, 0x73, 0x52);
90
+
91
+ // {D668DFCD-0F4E-4EFC-BFE0-392EEEC5109C}
92
+ DEFINE_GUID(GUID_BLUETOOTH_KEYPRESS_EVENT, 0xD668DFCD, 0x0F4E, 0x4EFC, 0xBF, 0xE0, 0x39, 0x2E, 0xEE, 0xC5, 0x10, 0x9C);
93
+
94
+ // {547247e6-45bb-4c33-af8c-c00efe15a71d}
95
+ DEFINE_GUID(GUID_BLUETOOTH_HCI_VENDOR_EVENT, 0x547247e6, 0x45bb, 0x4c33, 0xaf, 0x8c, 0xc0, 0x0e, 0xfe, 0x15, 0xa7, 0x1d);
96
+
97
+ #endif // >= SP1+KB942567
98
+
99
+ //
100
+ // Bluetooth base UUID for service discovery
101
+ //
102
+ DEFINE_GUID(Bluetooth_Base_UUID, 0x00000000, 0x0000, 0x1000, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB);
103
+
104
+ //
105
+ // Creates the 128-bit UUID from a short id by using the Bluetooth base UUID
106
+ // {<short id>-0000-1000-8000-00805F9B34FB}
107
+ //
108
+ #define DEFINE_BLUETOOTH_UUID128(name,shortId) \
109
+ DEFINE_GUID(name,shortId,0x0000,0x1000,0x80,0x00,0x00,0x80,0x5F,0x9B,0x34,0xFB)
110
+
111
+
112
+ //
113
+ // UUIDs for the Protocol Identifiers, Service Discovery Assigned Numbers
114
+ //
115
+ #define SDP_PROTOCOL_UUID16 (0x0001)
116
+ #define UDP_PROTOCOL_UUID16 (0x0002)
117
+ #define RFCOMM_PROTOCOL_UUID16 (0x0003)
118
+ #define TCP_PROTOCOL_UUID16 (0x0004)
119
+ #define TCSBIN_PROTOCOL_UUID16 (0x0005)
120
+ #define TCSAT_PROTOCOL_UUID16 (0x0006)
121
+ #define ATT_PROTOCOL_UUID16 (0x0007)
122
+ #define OBEX_PROTOCOL_UUID16 (0x0008)
123
+ #define IP_PROTOCOL_UUID16 (0x0009)
124
+ #define FTP_PROTOCOL_UUID16 (0x000A)
125
+ #define HTTP_PROTOCOL_UUID16 (0x000C)
126
+ #define WSP_PROTOCOL_UUID16 (0x000E)
127
+ #define BNEP_PROTOCOL_UUID16 (0x000F)
128
+ #define UPNP_PROTOCOL_UUID16 (0x0010)
129
+ #define HID_PROTOCOL_UUID16 (0x0011)
130
+ #define HCCC_PROTOCOL_UUID16 (0x0012)
131
+ #define HCDC_PROTOCOL_UUID16 (0x0014)
132
+ #define HCN_PROTOCOL_UUID16 (0x0016)
133
+ #define AVCTP_PROTOCOL_UUID16 (0x0017)
134
+ #define AVDTP_PROTOCOL_UUID16 (0x0019)
135
+ #define CMPT_PROTOCOL_UUID16 (0x001B)
136
+ #define UDI_C_PLANE_PROTOCOL_UUID16 (0x001D)
137
+ #define L2CAP_PROTOCOL_UUID16 (0x0100)
138
+
139
+ DEFINE_BLUETOOTH_UUID128(SDP_PROTOCOL_UUID, SDP_PROTOCOL_UUID16);
140
+ DEFINE_BLUETOOTH_UUID128(UDP_PROTOCOL_UUID, UDP_PROTOCOL_UUID16);
141
+ DEFINE_BLUETOOTH_UUID128(RFCOMM_PROTOCOL_UUID, RFCOMM_PROTOCOL_UUID16);
142
+ DEFINE_BLUETOOTH_UUID128(TCP_PROTOCOL_UUID, TCP_PROTOCOL_UUID16);
143
+ DEFINE_BLUETOOTH_UUID128(TCSBIN_PROTOCOL_UUID, TCSBIN_PROTOCOL_UUID16);
144
+ DEFINE_BLUETOOTH_UUID128(TCSAT_PROTOCOL_UUID, TCSAT_PROTOCOL_UUID16);
145
+ DEFINE_BLUETOOTH_UUID128(ATT_PROTOCOL_UUID, ATT_PROTOCOL_UUID16);
146
+ DEFINE_BLUETOOTH_UUID128(OBEX_PROTOCOL_UUID, OBEX_PROTOCOL_UUID16);
147
+ DEFINE_BLUETOOTH_UUID128(IP_PROTOCOL_UUID, IP_PROTOCOL_UUID16);
148
+ DEFINE_BLUETOOTH_UUID128(FTP_PROTOCOL_UUID, FTP_PROTOCOL_UUID16);
149
+ DEFINE_BLUETOOTH_UUID128(HTTP_PROTOCOL_UUID, HTTP_PROTOCOL_UUID16);
150
+ DEFINE_BLUETOOTH_UUID128(WSP_PROTOCOL_UUID, WSP_PROTOCOL_UUID16);
151
+ DEFINE_BLUETOOTH_UUID128(BNEP_PROTOCOL_UUID, BNEP_PROTOCOL_UUID16);
152
+ DEFINE_BLUETOOTH_UUID128(UPNP_PROTOCOL_UUID, UPNP_PROTOCOL_UUID16);
153
+ DEFINE_BLUETOOTH_UUID128(HID_PROTOCOL_UUID, HID_PROTOCOL_UUID16);
154
+ DEFINE_BLUETOOTH_UUID128(HCCC_PROTOCOL_UUID, HCCC_PROTOCOL_UUID16);
155
+ DEFINE_BLUETOOTH_UUID128(HCDC_PROTOCOL_UUID, HCDC_PROTOCOL_UUID16);
156
+ DEFINE_BLUETOOTH_UUID128(HCN_PROTOCOL_UUID, HCN_PROTOCOL_UUID16);
157
+ DEFINE_BLUETOOTH_UUID128(AVCTP_PROTOCOL_UUID, AVCTP_PROTOCOL_UUID16);
158
+ DEFINE_BLUETOOTH_UUID128(AVDTP_PROTOCOL_UUID, AVDTP_PROTOCOL_UUID16);
159
+ DEFINE_BLUETOOTH_UUID128(CMPT_PROTOCOL_UUID, CMPT_PROTOCOL_UUID16);
160
+ DEFINE_BLUETOOTH_UUID128(UDI_C_PLANE_PROTOCOL_UUID, UDI_C_PLANE_PROTOCOL_UUID16);
161
+ DEFINE_BLUETOOTH_UUID128(L2CAP_PROTOCOL_UUID, L2CAP_PROTOCOL_UUID16);
162
+
163
+ //
164
+ // UUIDs for Service Class IDs, Service Discovery Assigned Numbers
165
+ //
166
+ #define ServiceDiscoveryServerServiceClassID_UUID16 (0x1000)
167
+ #define BrowseGroupDescriptorServiceClassID_UUID16 (0x1001)
168
+ #define PublicBrowseGroupServiceClassID_UUID16 (0x1002)
169
+
170
+ #define SerialPortServiceClassID_UUID16 (0x1101)
171
+ #define LANAccessUsingPPPServiceClassID_UUID16 (0x1102)
172
+ #define DialupNetworkingServiceClassID_UUID16 (0x1103)
173
+ #define IrMCSyncServiceClassID_UUID16 (0x1104)
174
+ #define OBEXObjectPushServiceClassID_UUID16 (0x1105)
175
+ #define OBEXFileTransferServiceClassID_UUID16 (0x1106)
176
+ #define IrMcSyncCommandServiceClassID_UUID16 (0x1107)
177
+ #define HeadsetServiceClassID_UUID16 (0x1108)
178
+ #define CordlessTelephonyServiceClassID_UUID16 (0x1109)
179
+ #define AudioSourceServiceClassID_UUID16 (0x110A)
180
+ #define AudioSinkServiceClassID_UUID16 (0x110B)
181
+ #define AVRemoteControlTargetServiceClassID_UUID16 (0x110C)
182
+ #define AVRemoteControlServiceClassID_UUID16 (0x110E)
183
+ #define AVRemoteControlControllerServiceClass_UUID16 (0x110F)
184
+ #define IntercomServiceClassID_UUID16 (0x1110)
185
+ #define FaxServiceClassID_UUID16 (0x1111)
186
+ #define HeadsetAudioGatewayServiceClassID_UUID16 (0x1112)
187
+ #define WAPServiceClassID_UUID16 (0x1113)
188
+ #define WAPClientServiceClassID_UUID16 (0x1114)
189
+ #define PANUServiceClassID_UUID16 (0x1115)
190
+ #define NAPServiceClassID_UUID16 (0x1116)
191
+ #define GNServiceClassID_UUID16 (0x1117)
192
+ #define DirectPrintingServiceClassID_UUID16 (0x1118)
193
+ #define ReferencePrintingServiceClassID_UUID16 (0x1119)
194
+ #define ImagingResponderServiceClassID_UUID16 (0x111B)
195
+ #define ImagingAutomaticArchiveServiceClassID_UUID16 (0x111C)
196
+ #define ImagingReferenceObjectsServiceClassID_UUID16 (0x111D)
197
+ #define HandsfreeServiceClassID_UUID16 (0x111E)
198
+ #define HandsfreeAudioGatewayServiceClassID_UUID16 (0x111F)
199
+ #define DirectPrintingReferenceObjectsServiceClassID_UUID16 \
200
+ (0x1120)
201
+ #define ReflectsUIServiceClassID_UUID16 (0x1121)
202
+ #define PrintingStatusServiceClassID_UUID16 (0x1123)
203
+ #define HumanInterfaceDeviceServiceClassID_UUID16 (0x1124)
204
+ #define HCRPrintServiceClassID_UUID16 (0x1126)
205
+ #define HCRScanServiceClassID_UUID16 (0x1127)
206
+ #define CommonISDNAccessServiceClassID_UUID16 (0x1128)
207
+ #define VideoConferencingGWServiceClassID_UUID16 (0x1129)
208
+ #define UDIMTServiceClassID_UUID16 (0x112A)
209
+ #define UDITAServiceClassID_UUID16 (0x112B)
210
+ #define AudioVideoServiceClassID_UUID16 (0x112C)
211
+ #define SimAccessServiceClassID_UUID16 (0x112D)
212
+ #define PhonebookAccessPceServiceClassID_UUID16 (0x112E)
213
+ #define PhonebookAccessPseServiceClassID_UUID16 (0x112F)
214
+
215
+ #define HeadsetHSServiceClassID_UUID16 (0x1131)
216
+ #define MessageAccessServerServiceClassID_UUID16 (0x1132)
217
+ #define MessageNotificationServerServiceClassID_UUID16 (0x1133)
218
+
219
+ #define GNSSServerServiceClassID_UUID16 (0x1136)
220
+ #define ThreeDimensionalDisplayServiceClassID_UUID16 (0x1137)
221
+ #define ThreeDimensionalGlassesServiceClassID_UUID16 (0x1138)
222
+
223
+ #define MPSServiceClassID_UUID16 (0x113B)
224
+ #define CTNAccessServiceClassID_UUID16 (0x113C)
225
+ #define CTNNotificationServiceClassID_UUID16 (0x113D)
226
+
227
+ #define PnPInformationServiceClassID_UUID16 (0x1200)
228
+ #define GenericNetworkingServiceClassID_UUID16 (0x1201)
229
+ #define GenericFileTransferServiceClassID_UUID16 (0x1202)
230
+ #define GenericAudioServiceClassID_UUID16 (0x1203)
231
+ #define GenericTelephonyServiceClassID_UUID16 (0x1204)
232
+ #define UPnpServiceClassID_UUID16 (0x1205)
233
+ #define UPnpIpServiceClassID_UUID16 (0x1206)
234
+
235
+ #define ESdpUpnpIpPanServiceClassID_UUID16 (0x1300)
236
+ #define ESdpUpnpIpLapServiceClassID_UUID16 (0x1301)
237
+ #define ESdpUpnpL2capServiceClassID_UUID16 (0x1302)
238
+ #define VideoSourceServiceClassID_UUID16 (0x1303)
239
+ #define VideoSinkServiceClassID_UUID16 (0x1304)
240
+
241
+ #define HealthDeviceProfileSourceServiceClassID_UUID16 (0x1401)
242
+ #define HealthDeviceProfileSinkServiceClassID_UUID16 (0x1402)
243
+
244
+ DEFINE_BLUETOOTH_UUID128(ServiceDiscoveryServerServiceClassID_UUID, ServiceDiscoveryServerServiceClassID_UUID16);
245
+ DEFINE_BLUETOOTH_UUID128(BrowseGroupDescriptorServiceClassID_UUID, BrowseGroupDescriptorServiceClassID_UUID16);
246
+ DEFINE_BLUETOOTH_UUID128(PublicBrowseGroupServiceClass_UUID, PublicBrowseGroupServiceClassID_UUID16);
247
+
248
+ DEFINE_BLUETOOTH_UUID128(SerialPortServiceClass_UUID, SerialPortServiceClassID_UUID16);
249
+ DEFINE_BLUETOOTH_UUID128(LANAccessUsingPPPServiceClass_UUID, LANAccessUsingPPPServiceClassID_UUID16);
250
+ DEFINE_BLUETOOTH_UUID128(DialupNetworkingServiceClass_UUID, DialupNetworkingServiceClassID_UUID16);
251
+ DEFINE_BLUETOOTH_UUID128(IrMCSyncServiceClass_UUID, IrMCSyncServiceClassID_UUID16);
252
+ DEFINE_BLUETOOTH_UUID128(OBEXObjectPushServiceClass_UUID, OBEXObjectPushServiceClassID_UUID16);
253
+ DEFINE_BLUETOOTH_UUID128(OBEXFileTransferServiceClass_UUID, OBEXFileTransferServiceClassID_UUID16);
254
+ DEFINE_BLUETOOTH_UUID128(IrMCSyncCommandServiceClass_UUID, IrMcSyncCommandServiceClassID_UUID16);
255
+ DEFINE_BLUETOOTH_UUID128(HeadsetServiceClass_UUID, HeadsetServiceClassID_UUID16);
256
+ DEFINE_BLUETOOTH_UUID128(CordlessTelephonyServiceClass_UUID, CordlessTelephonyServiceClassID_UUID16);
257
+ DEFINE_BLUETOOTH_UUID128(AudioSourceServiceClass_UUID, AudioSourceServiceClassID_UUID16);
258
+ DEFINE_BLUETOOTH_UUID128(AudioSinkServiceClass_UUID, AudioSinkServiceClassID_UUID16);
259
+ DEFINE_BLUETOOTH_UUID128(AVRemoteControlTargetServiceClass_UUID, AVRemoteControlTargetServiceClassID_UUID16);
260
+ DEFINE_BLUETOOTH_UUID128(AVRemoteControlServiceClass_UUID, AVRemoteControlServiceClassID_UUID16);
261
+ DEFINE_BLUETOOTH_UUID128(AVRemoteControlControllerServiceClass_UUID, AVRemoteControlControllerServiceClass_UUID16);
262
+ DEFINE_BLUETOOTH_UUID128(IntercomServiceClass_UUID, IntercomServiceClassID_UUID16);
263
+ DEFINE_BLUETOOTH_UUID128(FaxServiceClass_UUID, FaxServiceClassID_UUID16);
264
+ DEFINE_BLUETOOTH_UUID128(HeadsetAudioGatewayServiceClass_UUID, HeadsetAudioGatewayServiceClassID_UUID16);
265
+ DEFINE_BLUETOOTH_UUID128(WAPServiceClass_UUID, WAPServiceClassID_UUID16);
266
+ DEFINE_BLUETOOTH_UUID128(WAPClientServiceClass_UUID, WAPClientServiceClassID_UUID16);
267
+ DEFINE_BLUETOOTH_UUID128(PANUServiceClass_UUID, PANUServiceClassID_UUID16);
268
+ DEFINE_BLUETOOTH_UUID128(NAPServiceClass_UUID, NAPServiceClassID_UUID16);
269
+ DEFINE_BLUETOOTH_UUID128(GNServiceClass_UUID, GNServiceClassID_UUID16);
270
+ DEFINE_BLUETOOTH_UUID128(DirectPrintingServiceClass_UUID, DirectPrintingServiceClassID_UUID16);
271
+ DEFINE_BLUETOOTH_UUID128(ReferencePrintingServiceClass_UUID, ReferencePrintingServiceClassID_UUID16);
272
+ DEFINE_BLUETOOTH_UUID128(ImagingResponderServiceClass_UUID, ImagingResponderServiceClassID_UUID16);
273
+ DEFINE_BLUETOOTH_UUID128(ImagingAutomaticArchiveServiceClass_UUID, ImagingAutomaticArchiveServiceClassID_UUID16);
274
+ DEFINE_BLUETOOTH_UUID128(ImagingReferenceObjectsServiceClass_UUID, ImagingReferenceObjectsServiceClassID_UUID16);
275
+ DEFINE_BLUETOOTH_UUID128(HandsfreeServiceClass_UUID, HandsfreeServiceClassID_UUID16);
276
+ DEFINE_BLUETOOTH_UUID128(HandsfreeAudioGatewayServiceClass_UUID, HandsfreeAudioGatewayServiceClassID_UUID16);
277
+ DEFINE_BLUETOOTH_UUID128(DirectPrintingReferenceObjectsServiceClass_UUID, DirectPrintingReferenceObjectsServiceClassID_UUID16);
278
+ DEFINE_BLUETOOTH_UUID128(ReflectedUIServiceClass_UUID, ReflectsUIServiceClassID_UUID16);
279
+ DEFINE_BLUETOOTH_UUID128(PrintingStatusServiceClass_UUID, PrintingStatusServiceClassID_UUID16);
280
+ DEFINE_BLUETOOTH_UUID128(HumanInterfaceDeviceServiceClass_UUID, HumanInterfaceDeviceServiceClassID_UUID16);
281
+ DEFINE_BLUETOOTH_UUID128(HCRPrintServiceClass_UUID, HCRPrintServiceClassID_UUID16);
282
+ DEFINE_BLUETOOTH_UUID128(HCRScanServiceClass_UUID, HCRScanServiceClassID_UUID16);
283
+ DEFINE_BLUETOOTH_UUID128(CommonISDNAccessServiceClass_UUID, CommonISDNAccessServiceClassID_UUID16);
284
+ DEFINE_BLUETOOTH_UUID128(VideoConferencingGWServiceClass_UUID, VideoConferencingGWServiceClassID_UUID16);
285
+ DEFINE_BLUETOOTH_UUID128(UDIMTServiceClass_UUID, UDIMTServiceClassID_UUID16);
286
+ DEFINE_BLUETOOTH_UUID128(UDITAServiceClass_UUID, UDITAServiceClassID_UUID16);
287
+ DEFINE_BLUETOOTH_UUID128(AudioVideoServiceClass_UUID, AudioVideoServiceClassID_UUID16);
288
+ DEFINE_BLUETOOTH_UUID128(SimAccessServiceClass_UUID, SimAccessServiceClassID_UUID16);
289
+ DEFINE_BLUETOOTH_UUID128(PhonebookAccessPceServiceClass_UUID, PhonebookAccessPceServiceClassID_UUID16);
290
+ DEFINE_BLUETOOTH_UUID128(PhonebookAccessPseServiceClass_UUID, PhonebookAccessPseServiceClassID_UUID16);
291
+
292
+ DEFINE_BLUETOOTH_UUID128(HeadsetHSServiceClass_UUID, HeadsetHSServiceClassID_UUID16);
293
+ DEFINE_BLUETOOTH_UUID128(MessageAccessServerServiceClass_UUID, MessageAccessServerServiceClassID_UUID16);
294
+ DEFINE_BLUETOOTH_UUID128(MessageNotificationServerServiceClass_UUID, MessageNotificationServerServiceClassID_UUID16);
295
+
296
+ DEFINE_BLUETOOTH_UUID128(GNSSServerServiceClass_UUID, GNSSServerServiceClassID_UUID16);
297
+ DEFINE_BLUETOOTH_UUID128(ThreeDimensionalDisplayServiceClass_UUID, ThreeDimensionalDisplayServiceClassID_UUID16);
298
+ DEFINE_BLUETOOTH_UUID128(ThreeDimensionalGlassesServiceClass_UUID, ThreeDimensionalGlassesServiceClassID_UUID16);
299
+
300
+ DEFINE_BLUETOOTH_UUID128(MPSServiceClass_UUID, MPSServiceClassID_UUID16);
301
+ DEFINE_BLUETOOTH_UUID128(CTNAccessServiceClass_UUID, CTNAccessServiceClassID_UUID16);
302
+ DEFINE_BLUETOOTH_UUID128(CTNNotificationServiceClass_UUID, CTNNotificationServiceClassID_UUID16);
303
+
304
+ DEFINE_BLUETOOTH_UUID128(PnPInformationServiceClass_UUID, PnPInformationServiceClassID_UUID16);
305
+ DEFINE_BLUETOOTH_UUID128(GenericNetworkingServiceClass_UUID, GenericNetworkingServiceClassID_UUID16);
306
+ DEFINE_BLUETOOTH_UUID128(GenericFileTransferServiceClass_UUID, GenericFileTransferServiceClassID_UUID16);
307
+ DEFINE_BLUETOOTH_UUID128(GenericAudioServiceClass_UUID, GenericAudioServiceClassID_UUID16);
308
+ DEFINE_BLUETOOTH_UUID128(GenericTelephonyServiceClass_UUID, GenericTelephonyServiceClassID_UUID16);
309
+ DEFINE_BLUETOOTH_UUID128(UPnpServiceClass_UUID, UPnpServiceClassID_UUID16);
310
+ DEFINE_BLUETOOTH_UUID128(UPnpIpServiceClass_UUID, UPnpIpServiceClassID_UUID16);
311
+
312
+ DEFINE_BLUETOOTH_UUID128(ESdpUpnpIpPanServiceClass_UUID, ESdpUpnpIpPanServiceClassID_UUID16);
313
+ DEFINE_BLUETOOTH_UUID128(ESdpUpnpIpLapServiceClass_UUID, ESdpUpnpIpLapServiceClassID_UUID16);
314
+ DEFINE_BLUETOOTH_UUID128(ESdpUpnpL2capServiceClass_UUID, ESdpUpnpL2capServiceClassID_UUID16);
315
+ DEFINE_BLUETOOTH_UUID128(VideoSourceServiceClass_UUID, VideoSourceServiceClassID_UUID16);
316
+ DEFINE_BLUETOOTH_UUID128(VideoSinkServiceClass_UUID, VideoSinkServiceClassID_UUID16);
317
+
318
+ DEFINE_BLUETOOTH_UUID128(HealthDeviceProfileSourceServiceClass_UUID, HealthDeviceProfileSourceServiceClassID_UUID16);
319
+ DEFINE_BLUETOOTH_UUID128(HealthDeviceProfileSinkServiceClass_UUID, HealthDeviceProfileSinkServiceClassID_UUID16);
320
+
321
+ //
322
+ // UUIDs for SIG defined profiles, Service Discovery Assigned Numbers
323
+ //
324
+ #define AdvancedAudioDistributionProfileID_UUID16 (0x110D)
325
+ #define ImagingServiceProfileID_UUID16 (0x111A)
326
+ #define BasicPrintingProfileID_UUID16 (0x1122)
327
+ #define HardcopyCableReplacementProfileID_UUID16 (0x1125)
328
+ #define PhonebookAccessProfileID_UUID16 (0x1130)
329
+ #define MessageAccessProfileID_UUID16 (0x1134)
330
+ #define GNSSProfileID_UUID16 (0x1135)
331
+ #define ThreeDimensionalSynchronizationProfileID_UUID16 (0x1139)
332
+ #define MPSProfileID_UUID16 (0x113A)
333
+ #define CTNProfileID_UUID16 (0x113E)
334
+ #define VideoDistributionProfileID_UUID16 (0x1305)
335
+ #define HealthDeviceProfileID_UUID16 (0x1400)
336
+
337
+ DEFINE_BLUETOOTH_UUID128(AdvancedAudioDistributionProfile_UUID, AdvancedAudioDistributionProfileID_UUID16);
338
+ DEFINE_BLUETOOTH_UUID128(ImagingServiceProfile_UUID, ImagingServiceProfileID_UUID16);
339
+ DEFINE_BLUETOOTH_UUID128(BasicPrintingProfile_UUID, BasicPrintingProfileID_UUID16);
340
+ DEFINE_BLUETOOTH_UUID128(HardcopyCableReplacementProfile_UUID, HardcopyCableReplacementProfileID_UUID16);
341
+ DEFINE_BLUETOOTH_UUID128(PhonebookAccessProfile_UUID, PhonebookAccessProfileID_UUID16);
342
+ DEFINE_BLUETOOTH_UUID128(MessageAccessProfile_UUID, MessageAccessProfileID_UUID16);
343
+ DEFINE_BLUETOOTH_UUID128(GNSSProfile_UUID, GNSSProfileID_UUID16);
344
+ DEFINE_BLUETOOTH_UUID128(ThreeDimensionalSynchronizationProfile_UUID, ThreeDimensionalSynchronizationProfileID_UUID16);
345
+ DEFINE_BLUETOOTH_UUID128(MPSProfile_UUID, MPSProfileID_UUID16);
346
+ DEFINE_BLUETOOTH_UUID128(CTNProfile_UUID, CTNProfileID_UUID16);
347
+ DEFINE_BLUETOOTH_UUID128(VideoDistributionProfile_UUID, VideoDistributionProfileID_UUID16);
348
+ DEFINE_BLUETOOTH_UUID128(HealthDeviceProfile_UUID, HealthDeviceProfileID_UUID16);
349
+
350
+ //
351
+ // The SIG renamed the uuid for VideoConferencingServiceClass
352
+ //
353
+ #define VideoConferencingServiceClass_UUID AVRemoteControlControllerServiceClass_UUID
354
+ #define VideoConferencingServiceClassID_UUID16 AVRemoteControlControllerServiceClass_UUID16
355
+
356
+ //
357
+ // Fixing typos introduced in previous releases
358
+ //
359
+ #define HN_PROTOCOL_UUID HCN_PROTOCOL_UUID
360
+ #define BasicPringingServiceClass_UUID BasicPrintingProfile_UUID
361
+
362
+ //
363
+ // Fixing naming inconsistencies in UUID16 list
364
+ //
365
+ #define CommonISDNAccessServiceClass_UUID16 CommonISDNAccessServiceClassID_UUID16
366
+ #define VideoConferencingGWServiceClass_UUID16 VideoConferencingGWServiceClassID_UUID16
367
+ #define UDIMTServiceClass_UUID16 UDIMTServiceClassID_UUID16
368
+ #define UDITAServiceClass_UUID16 UDITAServiceClassID_UUID16
369
+ #define AudioVideoServiceClass_UUID16 AudioVideoServiceClassID_UUID16
370
+
371
+ //
372
+ // Fixing naming inconsistencies in profile list
373
+ //
374
+ #define CordlessServiceClassID_UUID16 CordlessTelephonyServiceClassID_UUID16
375
+ #define AudioSinkSourceServiceClassID_UUID16 AudioSinkServiceClassID_UUID16
376
+ #define AdvancedAudioDistributionServiceClassID_UUID16 AdvancedAudioDistributionProfileID_UUID16
377
+ #define ImagingServiceClassID_UUID16 ImagingServiceProfileID_UUID16
378
+ #define BasicPrintingServiceClassID_UUID16 BasicPrintingProfileID_UUID16
379
+ #define HardcopyCableReplacementServiceClassID_UUID16 HardcopyCableReplacementProfileID_UUID16
380
+
381
+ #define AdvancedAudioDistributionServiceClass_UUID AdvancedAudioDistributionProfile_UUID
382
+ #define ImagingServiceClass_UUID ImagingServiceProfile_UUID
383
+ #define BasicPrintingServiceClass_UUID BasicPrintingProfile_UUID
384
+ #define HardcopyCableReplacementServiceClass_UUID HardcopyCableReplacementProfile_UUID
385
+ #define VideoDistributionServiceClass_UUID VideoDistributionProfile_UUID
386
+
387
+ #endif // NO_GUID_DEFS
388
+
389
+ #ifndef GUID_DEFS_ONLY
390
+
391
+ //
392
+ // max length of device friendly name.
393
+ //
394
+ #define BTH_MAX_NAME_SIZE (248)
395
+
396
+ #define BTH_MAX_PIN_SIZE (16)
397
+ #define BTH_LINK_KEY_LENGTH (16)
398
+
399
+ #define BTH_MFG_ERICSSON (0)
400
+ #define BTH_MFG_NOKIA (1)
401
+ #define BTH_MFG_INTEL (2)
402
+ #define BTH_MFG_IBM (3)
403
+ #define BTH_MFG_TOSHIBA (4)
404
+ #define BTH_MFG_3COM (5)
405
+ #define BTH_MFG_MICROSOFT (6)
406
+ #define BTH_MFG_LUCENT (7)
407
+ #define BTH_MFG_MOTOROLA (8)
408
+ #define BTH_MFG_INFINEON (9)
409
+ #define BTH_MFG_CSR (10)
410
+ #define BTH_MFG_SILICONWAVE (11)
411
+ #define BTH_MFG_DIGIANSWER (12)
412
+ #define BTH_MFG_TI (13)
413
+ #define BTH_MFG_PARTHUS (14)
414
+ #define BTH_MFG_BROADCOM (15)
415
+ #define BTH_MFG_MITEL (16)
416
+ #define BTH_MFG_WIDCOMM (17)
417
+ #define BTH_MFG_ZEEVO (18)
418
+ #define BTH_MFG_ATMEL (19)
419
+ #define BTH_MFG_MITSIBUSHI (20)
420
+ #define BTH_MFG_RTX_TELECOM (21)
421
+ #define BTH_MFG_KC_TECHNOLOGY (22)
422
+ #define BTH_MFG_NEWLOGIC (23)
423
+ #define BTH_MFG_TRANSILICA (24)
424
+ #define BTH_MFG_ROHDE_SCHWARZ (25)
425
+ #define BTH_MFG_TTPCOM (26)
426
+ #define BTH_MFG_SIGNIA (27)
427
+ #define BTH_MFG_CONEXANT (28)
428
+ #define BTH_MFG_QUALCOMM (29)
429
+ #define BTH_MFG_INVENTEL (30)
430
+ #define BTH_MFG_AVM_BERLIN (31)
431
+ #define BTH_MFG_BANDSPEED (32)
432
+ #define BTH_MFG_MANSELLA (33)
433
+ #define BTH_MFG_NEC (34)
434
+ #define BTH_MFG_WAVEPLUS_TECHNOLOGY_CO (35)
435
+ #define BTH_MFG_ALCATEL (36)
436
+ #define BTH_MFG_PHILIPS_SEMICONDUCTOR (37)
437
+ #define BTH_MFG_C_TECHNOLOGIES (38)
438
+ #define BTH_MFG_OPEN_INTERFACE (39)
439
+ #define BTH_MFG_RF_MICRO_DEVICES (40)
440
+ #define BTH_MFG_HITACHI (41)
441
+ #define BTH_MFG_SYMBOL_TECHNOLOGIES (42)
442
+ #define BTH_MFG_TENOVIS (43)
443
+ #define BTH_MFG_MACRONIX_INTERNATIONAL (44)
444
+ #define BTH_MFG_MARVELL (72)
445
+ #define BTH_MFG_APPLE (76)
446
+ #define BTH_MFG_NORDIC_SEMICONDUCTORS_ASA (89)
447
+ #define BTH_MFG_ARUBA_NETWORKS (283)
448
+ #define BTH_MFG_INTERNAL_USE (65535)
449
+
450
+ typedef ULONGLONG BTH_ADDR, *PBTH_ADDR;
451
+ typedef ULONG BTH_COD, *PBTH_COD;
452
+ typedef ULONG BTH_LAP, *PBTH_LAP;
453
+
454
+ #define BTH_ADDR_NULL ((ULONGLONG) 0x0000000000000000)
455
+
456
+ #define NAP_MASK ((ULONGLONG) 0xFFFF00000000)
457
+ #define SAP_MASK ((ULONGLONG) 0x0000FFFFFFFF)
458
+
459
+ #define NAP_BIT_OFFSET (8 * 4)
460
+ #define SAP_BIT_OFFSET (0)
461
+
462
+ #define GET_NAP(_bth_addr) ((USHORT) (((_bth_addr) & NAP_MASK) >> NAP_BIT_OFFSET))
463
+ #define GET_SAP(_bth_addr) ((ULONG) (((_bth_addr) & SAP_MASK) >> SAP_BIT_OFFSET))
464
+
465
+ #define SET_NAP(_nap) (((ULONGLONG) ((USHORT) (_nap))) << NAP_BIT_OFFSET)
466
+ #define SET_SAP(_sap) (((ULONGLONG) ((ULONG) (_sap))) << SAP_BIT_OFFSET)
467
+
468
+ #define SET_NAP_SAP(_nap, _sap) (SET_NAP(_nap) | SET_SAP(_sap))
469
+
470
+ #define COD_FORMAT_BIT_OFFSET (0)
471
+ #define COD_MINOR_BIT_OFFSET (2)
472
+ #define COD_MAJOR_BIT_OFFSET (8 * 1)
473
+ #define COD_SERVICE_BIT_OFFSET (8 * 1 + 5)
474
+
475
+ #define COD_FORMAT_MASK (0x000003)
476
+ #define COD_MINOR_MASK (0x0000FC)
477
+ #define COD_MAJOR_MASK (0x001F00)
478
+ #define COD_SERVICE_MASK (0xFFE000)
479
+
480
+ #define GET_COD_FORMAT(_cod) ( (_cod) & COD_FORMAT_MASK >> COD_FORMAT_BIT_OFFSET)
481
+ #define GET_COD_MINOR(_cod) (((_cod) & COD_MINOR_MASK) >> COD_MINOR_BIT_OFFSET)
482
+ #define GET_COD_MAJOR(_cod) (((_cod) & COD_MAJOR_MASK) >> COD_MAJOR_BIT_OFFSET)
483
+ #define GET_COD_SERVICE(_cod) (((_cod) & COD_SERVICE_MASK) >> COD_SERVICE_BIT_OFFSET)
484
+
485
+ #define SET_COD_MINOR(_cod, _minor) (_cod) = ((_cod) & ~COD_MINOR_MASK) | ((_minor) << COD_MINOR_BIT_OFFSET)
486
+ #define SET_COD_MAJOR(_cod, _major) (_cod) = ((_cod) & ~COD_MAJOR_MASK) | ((_major) << COD_MAJOR_BIT_OFFSET)
487
+ #define SET_COD_SERVICE(_cod, _service) (_cod) = ((_cod) & ~COD_SERVICE_MASK) | ((_service) << COD_SERVICE_BIT_OFFSET)
488
+
489
+ #define COD_VERSION (0x0)
490
+
491
+ #define COD_SERVICE_LIMITED (0x0001)
492
+ #define COD_SERVICE_LE_AUDIO (0x0002)
493
+ #define COD_SERVICE_POSITIONING (0x0008)
494
+ #define COD_SERVICE_NETWORKING (0x0010)
495
+ #define COD_SERVICE_RENDERING (0x0020)
496
+ #define COD_SERVICE_CAPTURING (0x0040)
497
+ #define COD_SERVICE_OBJECT_XFER (0x0080)
498
+ #define COD_SERVICE_AUDIO (0x0100)
499
+ #define COD_SERVICE_TELEPHONY (0x0200)
500
+ #define COD_SERVICE_INFORMATION (0x0400)
501
+
502
+ #define COD_SERVICE_VALID_MASK (COD_SERVICE_LIMITED | \
503
+ COD_SERVICE_LE_AUDIO | \
504
+ COD_SERVICE_POSITIONING | \
505
+ COD_SERVICE_NETWORKING | \
506
+ COD_SERVICE_RENDERING | \
507
+ COD_SERVICE_CAPTURING | \
508
+ COD_SERVICE_OBJECT_XFER |\
509
+ COD_SERVICE_AUDIO |\
510
+ COD_SERVICE_TELEPHONY |\
511
+ COD_SERVICE_INFORMATION)
512
+
513
+ #define COD_SERVICE_MAX_COUNT (10)
514
+
515
+ //
516
+ // Major class codes
517
+ //
518
+ #define COD_MAJOR_MISCELLANEOUS (0x00)
519
+ #define COD_MAJOR_COMPUTER (0x01)
520
+ #define COD_MAJOR_PHONE (0x02)
521
+ #define COD_MAJOR_LAN_ACCESS (0x03)
522
+ #define COD_MAJOR_AUDIO (0x04)
523
+ #define COD_MAJOR_PERIPHERAL (0x05)
524
+ #define COD_MAJOR_IMAGING (0x06)
525
+ #define COD_MAJOR_WEARABLE (0x07)
526
+ #define COD_MAJOR_TOY (0x08)
527
+ #define COD_MAJOR_HEALTH (0x09)
528
+ #define COD_MAJOR_UNCLASSIFIED (0x1F)
529
+
530
+ //
531
+ // Minor class codes specific to each major class
532
+ //
533
+ #define COD_COMPUTER_MINOR_UNCLASSIFIED (0x00)
534
+ #define COD_COMPUTER_MINOR_DESKTOP (0x01)
535
+ #define COD_COMPUTER_MINOR_SERVER (0x02)
536
+ #define COD_COMPUTER_MINOR_LAPTOP (0x03)
537
+ #define COD_COMPUTER_MINOR_HANDHELD (0x04)
538
+ #define COD_COMPUTER_MINOR_PALM (0x05)
539
+ #define COD_COMPUTER_MINOR_WEARABLE (0x06)
540
+
541
+ #define COD_PHONE_MINOR_UNCLASSIFIED (0x00)
542
+ #define COD_PHONE_MINOR_CELLULAR (0x01)
543
+ #define COD_PHONE_MINOR_CORDLESS (0x02)
544
+ #define COD_PHONE_MINOR_SMART (0x03)
545
+ #define COD_PHONE_MINOR_WIRED_MODEM (0x04)
546
+
547
+ #define COD_AUDIO_MINOR_UNCLASSIFIED (0x00)
548
+ #define COD_AUDIO_MINOR_HEADSET (0x01)
549
+ #define COD_AUDIO_MINOR_HANDS_FREE (0x02)
550
+ #define COD_AUDIO_MINOR_HEADSET_HANDS_FREE (0x03)
551
+ #define COD_AUDIO_MINOR_MICROPHONE (0x04)
552
+ #define COD_AUDIO_MINOR_LOUDSPEAKER (0x05)
553
+ #define COD_AUDIO_MINOR_HEADPHONES (0x06)
554
+ #define COD_AUDIO_MINOR_PORTABLE_AUDIO (0x07)
555
+ #define COD_AUDIO_MINOR_CAR_AUDIO (0x08)
556
+ #define COD_AUDIO_MINOR_SET_TOP_BOX (0x09)
557
+ #define COD_AUDIO_MINOR_HIFI_AUDIO (0x0A)
558
+ #define COD_AUDIO_MINOR_VCR (0x0B)
559
+ #define COD_AUDIO_MINOR_VIDEO_CAMERA (0x0C)
560
+ #define COD_AUDIO_MINOR_CAMCORDER (0x0D)
561
+ #define COD_AUDIO_MINOR_VIDEO_MONITOR (0x0E)
562
+ #define COD_AUDIO_MINOR_VIDEO_DISPLAY_LOUDSPEAKER \
563
+ (0x0F)
564
+ #define COD_AUDIO_MINOR_VIDEO_DISPLAY_CONFERENCING \
565
+ (0x10)
566
+ // #define COD_AUDIO_MINOR_RESERVED (0x11)
567
+ #define COD_AUDIO_MINOR_GAMING_TOY (0x12)
568
+
569
+ #define COD_PERIPHERAL_MINOR_KEYBOARD_MASK (0x10)
570
+ #define COD_PERIPHERAL_MINOR_POINTER_MASK (0x20)
571
+
572
+ #define COD_PERIPHERAL_MINOR_NO_CATEGORY (0x00)
573
+ #define COD_PERIPHERAL_MINOR_JOYSTICK (0x01)
574
+ #define COD_PERIPHERAL_MINOR_GAMEPAD (0x02)
575
+ #define COD_PERIPHERAL_MINOR_REMOTE_CONTROL (0x03)
576
+ #define COD_PERIPHERAL_MINOR_SENSING (0x04)
577
+
578
+ #define COD_IMAGING_MINOR_DISPLAY_MASK (0x04)
579
+ #define COD_IMAGING_MINOR_CAMERA_MASK (0x08)
580
+ #define COD_IMAGING_MINOR_SCANNER_MASK (0x10)
581
+ #define COD_IMAGING_MINOR_PRINTER_MASK (0x20)
582
+
583
+ #define COD_WEARABLE_MINOR_WRIST_WATCH (0x01)
584
+ #define COD_WEARABLE_MINOR_PAGER (0x02)
585
+ #define COD_WEARABLE_MINOR_JACKET (0x03)
586
+ #define COD_WEARABLE_MINOR_HELMET (0x04)
587
+ #define COD_WEARABLE_MINOR_GLASSES (0x05)
588
+
589
+ #define COD_TOY_MINOR_ROBOT (0x01)
590
+ #define COD_TOY_MINOR_VEHICLE (0x02)
591
+ #define COD_TOY_MINOR_DOLL_ACTION_FIGURE (0x03)
592
+ #define COD_TOY_MINOR_CONTROLLER (0x04)
593
+ #define COD_TOY_MINOR_GAME (0x05)
594
+
595
+ #define COD_HEALTH_MINOR_BLOOD_PRESSURE_MONITOR \
596
+ (0x01)
597
+ #define COD_HEALTH_MINOR_THERMOMETER (0x02)
598
+ #define COD_HEALTH_MINOR_WEIGHING_SCALE (0x03)
599
+ #define COD_HEALTH_MINOR_GLUCOSE_METER (0x04)
600
+ #define COD_HEALTH_MINOR_PULSE_OXIMETER (0x05)
601
+ #define COD_HEALTH_MINOR_HEART_PULSE_MONITOR \
602
+ (0x06)
603
+ #define COD_HEALTH_MINOR_HEALTH_DATA_DISPLAY \
604
+ (0x07)
605
+ #define COD_HEALTH_MINOR_STEP_COUNTER (0x08)
606
+
607
+ //
608
+ // Cannot use GET_COD_MINOR for this b/c it is embedded in a different manner
609
+ // than the rest of the major classes
610
+ //
611
+
612
+ #define COD_LAN_ACCESS_BIT_OFFSET (5)
613
+
614
+ #define COD_LAN_MINOR_MASK (0x00001C)
615
+ #define COD_LAN_ACCESS_MASK (0x0000E0)
616
+
617
+ #define GET_COD_LAN_MINOR(_cod) (((_cod) & COD_LAN_MINOR_MASK) >> COD_MINOR_BIT_OFFSET)
618
+ #define GET_COD_LAN_ACCESS(_cod) (((_cod) & COD_LAN_ACCESS_MASK) >> COD_LAN_ACCESS_BIT_OFFSET)
619
+
620
+ //
621
+ // LAN access percent usage subcodes
622
+ //
623
+ #define COD_LAN_MINOR_UNCLASSIFIED (0x00)
624
+
625
+ #define COD_LAN_ACCESS_0_USED (0x00)
626
+ #define COD_LAN_ACCESS_17_USED (0x01)
627
+ #define COD_LAN_ACCESS_33_USED (0x02)
628
+ #define COD_LAN_ACCESS_50_USED (0x03)
629
+ #define COD_LAN_ACCESS_67_USED (0x04)
630
+ #define COD_LAN_ACCESS_83_USED (0x05)
631
+ #define COD_LAN_ACCESS_99_USED (0x06)
632
+ #define COD_LAN_ACCESS_FULL (0x07)
633
+
634
+ //
635
+ // Extended Inquiry Response (EIR) defines.
636
+ //
637
+ #define BTH_EIR_FLAGS_ID (0x01)
638
+ #define BTH_EIR_16_UUIDS_PARTIAL_ID (0x02)
639
+ #define BTH_EIR_16_UUIDS_COMPLETE_ID (0x03)
640
+ #define BTH_EIR_32_UUIDS_PARTIAL_ID (0x04)
641
+ #define BTH_EIR_32_UUIDS_COMPLETE_ID (0x05)
642
+ #define BTH_EIR_128_UUIDS_PARTIAL_ID (0x06)
643
+ #define BTH_EIR_128_UUIDS_COMPLETE_ID (0x07)
644
+ #define BTH_EIR_LOCAL_NAME_PARTIAL_ID (0x08)
645
+ #define BTH_EIR_LOCAL_NAME_COMPLETE_ID (0x09)
646
+ #define BTH_EIR_TX_POWER_LEVEL_ID (0x0A)
647
+ #define BTH_EIR_OOB_OPT_DATA_LEN_ID (0x0B) // OOB only.
648
+ #define BTH_EIR_OOB_BD_ADDR_ID (0x0C) // OOB only.
649
+ #define BTH_EIR_OOB_COD_ID (0x0D) // OOB only.
650
+ #define BTH_EIR_OOB_SP_HASH_ID (0x0E) // OOB only.
651
+ #define BTH_EIR_OOB_SP_RANDOMIZER_ID (0x0F) // OOB only.
652
+ #define BTH_EIR_MANUFACTURER_ID (0xFF)
653
+
654
+ //
655
+ // Extended Inquiry Response (EIR) size.
656
+ //
657
+ #define BTH_EIR_SIZE (240)
658
+
659
+ //
660
+ // Used as an initializer of LAP_DATA
661
+ //
662
+ #define LAP_GIAC_INIT { 0x33, 0x8B, 0x9E }
663
+ #define LAP_LIAC_INIT { 0x00, 0x8B, 0x9E }
664
+
665
+ //
666
+ // General Inquiry Access Code.
667
+ //
668
+ #define LAP_GIAC_VALUE (0x009E8B33)
669
+
670
+ //
671
+ // Limited Inquiry Access Code.
672
+ //
673
+ #define LAP_LIAC_VALUE (0x009E8B00)
674
+
675
+ #define BTH_ADDR_IAC_FIRST (0x9E8B00)
676
+ #define BTH_ADDR_IAC_LAST (0x9E8B3f)
677
+ #define BTH_ADDR_LIAC (0x9E8B00)
678
+ #define BTH_ADDR_GIAC (0x9E8B33)
679
+
680
+ typedef UCHAR BTHSTATUS, *PBTHSTATUS;
681
+
682
+ #define BTH_ERROR(_btStatus) ((_btStatus) != BTH_ERROR_SUCCESS)
683
+ #define BTH_SUCCESS(_btStatus) ((_btStatus) == BTH_ERROR_SUCCESS)
684
+
685
+ #define BTH_ERROR_SUCCESS (0x00)
686
+ #define BTH_ERROR_UNKNOWN_HCI_COMMAND (0x01)
687
+ #define BTH_ERROR_NO_CONNECTION (0x02)
688
+ #define BTH_ERROR_HARDWARE_FAILURE (0x03)
689
+ #define BTH_ERROR_PAGE_TIMEOUT (0x04)
690
+ #define BTH_ERROR_AUTHENTICATION_FAILURE (0x05)
691
+ #define BTH_ERROR_KEY_MISSING (0x06)
692
+ #define BTH_ERROR_MEMORY_FULL (0x07)
693
+ #define BTH_ERROR_CONNECTION_TIMEOUT (0x08)
694
+ #define BTH_ERROR_MAX_NUMBER_OF_CONNECTIONS (0x09)
695
+ #define BTH_ERROR_MAX_NUMBER_OF_SCO_CONNECTIONS (0x0a)
696
+ #define BTH_ERROR_ACL_CONNECTION_ALREADY_EXISTS (0x0b)
697
+ #define BTH_ERROR_COMMAND_DISALLOWED (0x0c)
698
+ #define BTH_ERROR_HOST_REJECTED_LIMITED_RESOURCES (0x0d)
699
+ #define BTH_ERROR_HOST_REJECTED_SECURITY_REASONS (0x0e)
700
+ #define BTH_ERROR_HOST_REJECTED_PERSONAL_DEVICE (0x0f)
701
+ #define BTH_ERROR_HOST_TIMEOUT (0x10)
702
+ #define BTH_ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER (0x11)
703
+ #define BTH_ERROR_INVALID_HCI_PARAMETER (0x12)
704
+ #define BTH_ERROR_REMOTE_USER_ENDED_CONNECTION (0x13)
705
+ #define BTH_ERROR_REMOTE_LOW_RESOURCES (0x14)
706
+ #define BTH_ERROR_REMOTE_POWERING_OFF (0x15)
707
+ #define BTH_ERROR_LOCAL_HOST_TERMINATED_CONNECTION (0x16)
708
+ #define BTH_ERROR_REPEATED_ATTEMPTS (0x17)
709
+ #define BTH_ERROR_PAIRING_NOT_ALLOWED (0x18)
710
+ #define BTH_ERROR_UKNOWN_LMP_PDU (0x19)
711
+ #define BTH_ERROR_UNSUPPORTED_REMOTE_FEATURE (0x1a)
712
+ #define BTH_ERROR_SCO_OFFSET_REJECTED (0x1b)
713
+ #define BTH_ERROR_SCO_INTERVAL_REJECTED (0x1c)
714
+ #define BTH_ERROR_SCO_AIRMODE_REJECTED (0x1d)
715
+ #define BTH_ERROR_INVALID_LMP_PARAMETERS (0x1e)
716
+ #define BTH_ERROR_UNSPECIFIED_ERROR (0x1f)
717
+ #define BTH_ERROR_UNSUPPORTED_LMP_PARM_VALUE (0x20)
718
+ #define BTH_ERROR_ROLE_CHANGE_NOT_ALLOWED (0x21)
719
+ #define BTH_ERROR_LMP_RESPONSE_TIMEOUT (0x22)
720
+ #define BTH_ERROR_LMP_TRANSACTION_COLLISION (0x23)
721
+ #define BTH_ERROR_LMP_PDU_NOT_ALLOWED (0x24)
722
+ #define BTH_ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE (0x25)
723
+ #define BTH_ERROR_UNIT_KEY_NOT_USED (0x26)
724
+ #define BTH_ERROR_QOS_IS_NOT_SUPPORTED (0x27)
725
+ #define BTH_ERROR_INSTANT_PASSED (0x28)
726
+ #define BTH_ERROR_PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED (0x29)
727
+ #define BTH_ERROR_DIFFERENT_TRANSACTION_COLLISION (0x2a)
728
+ #define BTH_ERROR_QOS_UNACCEPTABLE_PARAMETER (0x2c)
729
+ #define BTH_ERROR_QOS_REJECTED (0x2d)
730
+ #define BTH_ERROR_CHANNEL_CLASSIFICATION_NOT_SUPPORTED (0x2e)
731
+ #define BTH_ERROR_INSUFFICIENT_SECURITY (0x2f)
732
+ #define BTH_ERROR_PARAMETER_OUT_OF_MANDATORY_RANGE (0x30)
733
+ #define BTH_ERROR_ROLE_SWITCH_PENDING (0x32)
734
+ #define BTH_ERROR_RESERVED_SLOT_VIOLATION (0x34)
735
+ #define BTH_ERROR_ROLE_SWITCH_FAILED (0x35)
736
+ #define BTH_ERROR_EXTENDED_INQUIRY_RESPONSE_TOO_LARGE (0x36)
737
+ #define BTH_ERROR_SECURE_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST (0x37)
738
+ #define BTH_ERROR_HOST_BUSY_PAIRING (0x38)
739
+ #define BTH_ERROR_CONNECTION_REJECTED_DUE_TO_NO_SUITABLE_CHANNEL_FOUND \
740
+ (0x39)
741
+ #define BTH_ERROR_CONTROLLER_BUSY (0x3a)
742
+ #define BTH_ERROR_UNACCEPTABLE_CONNECTION_INTERVAL (0x3b)
743
+ #define BTH_ERROR_DIRECTED_ADVERTISING_TIMEOUT (0x3c)
744
+ #define BTH_ERROR_CONNECTION_TERMINATED_DUE_TO_MIC_FAILURE \
745
+ (0x3d)
746
+ #define BTH_ERROR_CONNECTION_FAILED_TO_BE_ESTABLISHED (0x3e)
747
+ #define BTH_ERROR_MAC_CONNECTION_FAILED (0x3f)
748
+ #define BTH_ERROR_COARSE_CLOCK_ADJUSTMENT_REJECTED (0x40)
749
+ #define BTH_ERROR_TYPE_0_SUBMAP_NOT_DEFINED (0x41)
750
+ #define BTH_ERROR_UNKNOWN_ADVERTISING_IDENTIFIER (0x42)
751
+ #define BTH_ERROR_LIMIT_REACHED (0x43)
752
+ #define BTH_ERROR_OPERATION_CANCELLED_BY_HOST (0X44)
753
+ #define BTH_ERROR_PACKET_TOO_LONG (0x45)
754
+
755
+ #define BTH_ERROR_UNSPECIFIED (0xFF)
756
+
757
+ //
758
+ // Min, max, and default L2cap MTU.
759
+ //
760
+ #define L2CAP_MIN_MTU (48)
761
+ #define L2CAP_MAX_MTU (0xFFFF)
762
+ #define L2CAP_DEFAULT_MTU (672)
763
+
764
+ //
765
+ // Max l2cap signal size (48) - size of signal header (4)
766
+ //
767
+ #define MAX_L2CAP_PING_DATA_LENGTH (44)
768
+ #define MAX_L2CAP_INFO_DATA_LENGTH (44)
769
+
770
+ //
771
+ // the following structures provide information about
772
+ // disocvered remote radios.
773
+ //
774
+
775
+ #define BDIF_ADDRESS (0x00000001)
776
+ #define BDIF_COD (0x00000002)
777
+ #define BDIF_NAME (0x00000004)
778
+ #define BDIF_PAIRED (0x00000008)
779
+ #define BDIF_PERSONAL (0x00000010)
780
+ #define BDIF_CONNECTED (0x00000020)
781
+
782
+ //
783
+ // Support added in KB942567
784
+ //
785
+ #if (NTDDI_VERSION > NTDDI_VISTASP1 || \
786
+ (NTDDI_VERSION == NTDDI_VISTASP1 && defined(VISTA_KB942567)))
787
+
788
+ #define BDIF_SHORT_NAME (0x00000040)
789
+ #define BDIF_VISIBLE (0x00000080)
790
+ #define BDIF_SSP_SUPPORTED (0x00000100)
791
+ #define BDIF_SSP_PAIRED (0x00000200)
792
+ #define BDIF_SSP_MITM_PROTECTED (0x00000400)
793
+ #define BDIF_RSSI (0x00001000)
794
+ #define BDIF_EIR (0x00002000)
795
+
796
+ #if (NTDDI_VERSION >= NTDDI_WIN8) // >= WIN8
797
+
798
+ #define BDIF_BR (0x00004000)
799
+ #define BDIF_LE (0x00008000)
800
+ #define BDIF_LE_PAIRED (0x00010000)
801
+ #define BDIF_LE_PERSONAL (0x00020000)
802
+ #define BDIF_LE_MITM_PROTECTED (0x00040000)
803
+ #define BDIF_LE_PRIVACY_ENABLED (0x00080000)
804
+ #define BDIF_LE_RANDOM_ADDRESS_TYPE \
805
+ (0x00100000)
806
+
807
+ #if (NTDDI_VERSION >= NTDDI_WIN10) // >= WIN10
808
+
809
+ #define BDIF_LE_DISCOVERABLE (0x00200000)
810
+ #define BDIF_LE_NAME (0x00400000)
811
+ #define BDIF_LE_VISIBLE (0x00800000)
812
+
813
+ #if (NTDDI_VERSION >= NTDDI_WIN10_RS2) // >= WIN10_RS2
814
+
815
+ #define BDIF_LE_CONNECTED (0x01000000)
816
+ #define BDIF_LE_CONNECTABLE (0x02000000)
817
+ #define BDIF_BR_SECURE_CONNECTION_PAIRED \
818
+ (0x08000000)
819
+ #define BDIF_LE_SECURE_CONNECTION_PAIRED \
820
+ (0x10000000)
821
+
822
+ #define BDIF_DEBUGKEY (0x20000000)
823
+ #define BDIF_LE_DEBUGKEY (0x40000000)
824
+
825
+ #if (NTDDI_VERSION >= NTDDI_WIN10_19H1) // >= NTDDI_WIN10_19H1
826
+
827
+ #define BDIF_TX_POWER (0x80000000)
828
+
829
+
830
+ #define BDIF_VALID_FLAGS \
831
+ (BDIF_ADDRESS | BDIF_COD | BDIF_NAME | BDIF_PAIRED | BDIF_PERSONAL | \
832
+ BDIF_CONNECTED | BDIF_SHORT_NAME | BDIF_VISIBLE | BDIF_RSSI | BDIF_EIR | BDIF_SSP_PAIRED | BDIF_SSP_MITM_PROTECTED | \
833
+ BDIF_BR | BDIF_LE | BDIF_LE_PAIRED | BDIF_LE_PERSONAL | BDIF_LE_MITM_PROTECTED | BDIF_LE_PRIVACY_ENABLED | BDIF_LE_RANDOM_ADDRESS_TYPE | \
834
+ BDIF_LE_DISCOVERABLE | BDIF_LE_NAME | BDIF_LE_VISIBLE | BDIF_LE_CONNECTED | BDIF_LE_CONNECTABLE | \
835
+ BDIF_BR_SECURE_CONNECTION_PAIRED | BDIF_LE_SECURE_CONNECTION_PAIRED | BDIF_DEBUGKEY | BDIF_LE_DEBUGKEY | BDIF_TX_POWER)
836
+
837
+ #else
838
+
839
+ #define BDIF_VALID_FLAGS \
840
+ (BDIF_ADDRESS | BDIF_COD | BDIF_NAME | BDIF_PAIRED | BDIF_PERSONAL | \
841
+ BDIF_CONNECTED | BDIF_SHORT_NAME | BDIF_VISIBLE | BDIF_RSSI | BDIF_EIR | BDIF_SSP_PAIRED | BDIF_SSP_MITM_PROTECTED | \
842
+ BDIF_BR | BDIF_LE | BDIF_LE_PAIRED | BDIF_LE_PERSONAL | BDIF_LE_MITM_PROTECTED | BDIF_LE_PRIVACY_ENABLED | BDIF_LE_RANDOM_ADDRESS_TYPE | \
843
+ BDIF_LE_DISCOVERABLE | BDIF_LE_NAME | BDIF_LE_VISIBLE | BDIF_LE_CONNECTED | BDIF_LE_CONNECTABLE | \
844
+ BDIF_BR_SECURE_CONNECTION_PAIRED | BDIF_LE_SECURE_CONNECTION_PAIRED | BDIF_DEBUGKEY | BDIF_LE_DEBUGKEY)
845
+
846
+ #endif // >= NTDDI_WIN10_19H1
847
+
848
+ #else
849
+
850
+ #define BDIF_VALID_FLAGS \
851
+ (BDIF_ADDRESS | BDIF_COD | BDIF_NAME | BDIF_PAIRED | BDIF_PERSONAL | \
852
+ BDIF_CONNECTED | BDIF_SHORT_NAME | BDIF_VISIBLE | BDIF_RSSI | BDIF_EIR | BDIF_SSP_PAIRED | BDIF_SSP_MITM_PROTECTED | \
853
+ BDIF_BR | BDIF_LE | BDIF_LE_PAIRED | BDIF_LE_PERSONAL | BDIF_LE_MITM_PROTECTED | BDIF_LE_PRIVACY_ENABLED | BDIF_LE_RANDOM_ADDRESS_TYPE | \
854
+ BDIF_LE_DISCOVERABLE | BDIF_LE_NAME | BDIF_LE_VISIBLE)
855
+
856
+ #endif // >= WIN10_RS2
857
+
858
+ #else
859
+
860
+ #define BDIF_VALID_FLAGS \
861
+ (BDIF_ADDRESS | BDIF_COD | BDIF_NAME | BDIF_PAIRED | BDIF_PERSONAL | \
862
+ BDIF_CONNECTED | BDIF_SHORT_NAME | BDIF_VISIBLE | BDIF_RSSI | BDIF_EIR | BDIF_SSP_PAIRED | BDIF_SSP_MITM_PROTECTED | \
863
+ BDIF_BR | BDIF_LE | BDIF_LE_PAIRED | BDIF_LE_PERSONAL | BDIF_LE_MITM_PROTECTED | BDIF_LE_PRIVACY_ENABLED | BDIF_LE_RANDOM_ADDRESS_TYPE)
864
+
865
+ #endif // >= WIN10
866
+
867
+ #else
868
+
869
+ #define BDIF_VALID_FLAGS \
870
+ (BDIF_ADDRESS | BDIF_COD | BDIF_NAME | BDIF_PAIRED | BDIF_PERSONAL | \
871
+ BDIF_CONNECTED | BDIF_SHORT_NAME | BDIF_VISIBLE | BDIF_RSSI | BDIF_EIR | BDIF_SSP_PAIRED | BDIF_SSP_MITM_PROTECTED)
872
+
873
+ #endif // >= WIN8
874
+
875
+ #else // <= SP1
876
+
877
+ #define BDIF_VALID_FLAGS \
878
+ (BDIF_ADDRESS | BDIF_COD | BDIF_NAME | BDIF_PAIRED | BDIF_PERSONAL | \
879
+ BDIF_CONNECTED)
880
+
881
+ #endif // >= SP1+KB942567
882
+
883
+ typedef struct _BTH_DEVICE_INFO {
884
+ //
885
+ // Combination BDIF_Xxx flags
886
+ //
887
+ ULONG flags;
888
+
889
+ //
890
+ // Address of remote device.
891
+ //
892
+ BTH_ADDR address;
893
+
894
+ //
895
+ // Class Of Device.
896
+ //
897
+ BTH_COD classOfDevice;
898
+
899
+ //
900
+ // name of the device
901
+ //
902
+ CHAR name[BTH_MAX_NAME_SIZE];
903
+
904
+ } BTH_DEVICE_INFO, *PBTH_DEVICE_INFO;
905
+
906
+ //
907
+ // Buffer associated with GUID_BLUETOOTH_RADIO_IN_RANGE
908
+ //
909
+
910
+ typedef struct _BTH_RADIO_IN_RANGE {
911
+ //
912
+ // Information about the remote radio
913
+ //
914
+ BTH_DEVICE_INFO deviceInfo;
915
+
916
+ //
917
+ // The previous flags value for the BTH_DEVICE_INFO. The receiver of this
918
+ // notification can compare the deviceInfo.flags and previousDeviceFlags
919
+ // to determine what has changed about this remote radio.
920
+ //
921
+ // For instance, if BDIF_NAME is set in deviceInfo.flags and not in
922
+ // previousDeviceFlags, the remote radio's has just been retrieved.
923
+ //
924
+ ULONG previousDeviceFlags;
925
+
926
+ } BTH_RADIO_IN_RANGE, *PBTH_RADIO_IN_RANGE;
927
+
928
+ //
929
+ // Buffer associated with GUID_BLUETOOTH_L2CAP_EVENT
930
+ //
931
+ typedef struct _BTH_L2CAP_EVENT_INFO {
932
+ //
933
+ // Remote radio address which the L2CAP event is associated with
934
+ //
935
+ BTH_ADDR bthAddress;
936
+
937
+ //
938
+ // The PSM that is either being connected to or disconnected from
939
+ //
940
+ USHORT psm;
941
+
942
+ //
943
+ // If != 0, then the channel has just been established. If == 0, then the
944
+ // channel has been destroyed. Notifications for a destroyed channel will
945
+ // only be sent for channels successfully established.
946
+ //
947
+ UCHAR connected;
948
+
949
+ //
950
+ // If != 0, then the local host iniated the l2cap connection. If == 0, then
951
+ // the remote host initated the connection. This field is only valid if
952
+ // connect is != 0.
953
+ //
954
+ UCHAR initiated;
955
+
956
+ } BTH_L2CAP_EVENT_INFO, *PBTH_L2CAP_EVENT_INFO;
957
+
958
+ #define HCI_CONNECTION_TYPE_ACL (1)
959
+ #define HCI_CONNECTION_TYPE_SCO (2)
960
+ #define HCI_CONNECTION_TYPE_LE (3)
961
+
962
+ //
963
+ // Fix typos
964
+ //
965
+ #define HCI_CONNNECTION_TYPE_ACL HCI_CONNECTION_TYPE_ACL
966
+ #define HCI_CONNNECTION_TYPE_SCO HCI_CONNECTION_TYPE_SCO
967
+
968
+ //
969
+ // Buffer associated with GUID_BLUETOOTH_HCI_EVENT
970
+ //
971
+ typedef struct _BTH_HCI_EVENT_INFO {
972
+ //
973
+ // Remote radio address which the HCI event is associated with
974
+ //
975
+ BTH_ADDR bthAddress;
976
+
977
+ //
978
+ // HCI_CONNNECTION_TYPE_XXX value
979
+ //
980
+ UCHAR connectionType;
981
+
982
+ //
983
+ // If != 0, then the underlying connection to the remote radio has just
984
+ // been estrablished. If == 0, then the underlying conneciton has just been
985
+ // destroyed.
986
+ //
987
+ UCHAR connected;
988
+
989
+ } BTH_HCI_EVENT_INFO, *PBTH_HCI_EVENT_INFO;
990
+
991
+ //
992
+ // Support added in KB942567
993
+ //
994
+ #if (NTDDI_VERSION > NTDDI_VISTASP1 || \
995
+ (NTDDI_VERSION == NTDDI_VISTASP1 && defined(VISTA_KB942567)))
996
+
997
+ typedef enum _IO_CAPABILITY {
998
+ IoCaps_DisplayOnly = 0x00,
999
+ IoCaps_DisplayYesNo = 0x01,
1000
+ IoCaps_KeyboardOnly = 0x02,
1001
+ IoCaps_NoInputNoOutput = 0x03,
1002
+ IoCaps_Undefined = 0xff
1003
+ }IO_CAPABILITY;
1004
+
1005
+ typedef enum _AUTHENTICATION_REQUIREMENTS {
1006
+ MITMProtectionNotRequired = 0x00,
1007
+ MITMProtectionRequired = 0x01,
1008
+ MITMProtectionNotRequiredBonding = 0x02,
1009
+ MITMProtectionRequiredBonding = 0x03,
1010
+ MITMProtectionNotRequiredGeneralBonding = 0x04,
1011
+ MITMProtectionRequiredGeneralBonding = 0x05,
1012
+ MITMProtectionNotDefined = 0xff
1013
+ } AUTHENTICATION_REQUIREMENTS;
1014
+
1015
+ #define IsMITMProtectionRequired(requirements) \
1016
+ ((MITMProtectionRequired == requirements) || (MITMProtectionRequiredBonding == requirements) || (MITMProtectionRequiredGeneralBonding == requirements))
1017
+
1018
+ #endif // >= SP1+KB942567
1019
+
1020
+ //
1021
+ // Max length we allow for ServiceName in the remote SDP records
1022
+ //
1023
+ #define BTH_MAX_SERVICE_NAME_SIZE (256)
1024
+
1025
+ #define MAX_UUIDS_IN_QUERY (12)
1026
+
1027
+ #define BTH_VID_DEFAULT_VALUE (0xFFFF)
1028
+
1029
+ #define SDP_ERROR_INVALID_SDP_VERSION (0x0001)
1030
+ #define SDP_ERROR_INVALID_RECORD_HANDLE (0x0002)
1031
+ #define SDP_ERROR_INVALID_REQUEST_SYNTAX (0x0003)
1032
+ #define SDP_ERROR_INVALID_PDU_SIZE (0x0004)
1033
+ #define SDP_ERROR_INVALID_CONTINUATION_STATE (0x0005)
1034
+ #define SDP_ERROR_INSUFFICIENT_RESOURCES (0x0006)
1035
+
1036
+ //
1037
+ // Defined by windows to handle server errors that are not described by the
1038
+ // above errors. Start at 0x0100 so we don't go anywhere near the spec
1039
+ // defined values.
1040
+ //
1041
+
1042
+ //
1043
+ // Success, nothing went wrong
1044
+ //
1045
+ #define SDP_ERROR_SUCCESS ((SDP_ERROR) 0x0000)
1046
+
1047
+ //
1048
+ // The SDP PDU or parameters other than the SDP stream response was not correct
1049
+ //
1050
+ #define SDP_ERROR_SERVER_INVALID_RESPONSE ((SDP_ERROR) 0x0100)
1051
+
1052
+ //
1053
+ // The SDP response stream did not parse correctly.
1054
+ //
1055
+ #define SDP_ERROR_SERVER_RESPONSE_DID_NOT_PARSE ((SDP_ERROR) 0x0200)
1056
+
1057
+ //
1058
+ // The SDP response stream was successfully parsed, but did not match the
1059
+ // required format for the query.
1060
+ //
1061
+ #define SDP_ERROR_SERVER_BAD_FORMAT ((SDP_ERROR) 0x0300)
1062
+
1063
+ //
1064
+ // SDP was unable to send a continued query back to the server
1065
+ //
1066
+ #define SDP_ERROR_COULD_NOT_SEND_CONTINUE ((SDP_ERROR) 0x0400)
1067
+
1068
+ //
1069
+ // Server sent a response that was too large to fit in the caller's buffer.
1070
+ //
1071
+ #define SDP_ERROR_RESPONSE_TOO_LARGE ((SDP_ERROR) 0x0500)
1072
+
1073
+ #define SDP_ATTRIB_RECORD_HANDLE (0x0000)
1074
+ #define SDP_ATTRIB_CLASS_ID_LIST (0x0001)
1075
+ #define SDP_ATTRIB_RECORD_STATE (0x0002)
1076
+ #define SDP_ATTRIB_SERVICE_ID (0x0003)
1077
+ #define SDP_ATTRIB_PROTOCOL_DESCRIPTOR_LIST (0x0004)
1078
+ #define SDP_ATTRIB_BROWSE_GROUP_LIST (0x0005)
1079
+ #define SDP_ATTRIB_LANG_BASE_ATTRIB_ID_LIST (0x0006)
1080
+ #define SDP_ATTRIB_INFO_TIME_TO_LIVE (0x0007)
1081
+ #define SDP_ATTRIB_AVAILABILITY (0x0008)
1082
+ #define SDP_ATTRIB_PROFILE_DESCRIPTOR_LIST (0x0009)
1083
+ #define SDP_ATTRIB_DOCUMENTATION_URL (0x000A)
1084
+ #define SDP_ATTRIB_CLIENT_EXECUTABLE_URL (0x000B)
1085
+ #define SDP_ATTRIB_ICON_URL (0x000C)
1086
+ #define SDP_ATTRIB_ADDITIONAL_PROTOCOL_DESCRIPTOR_LIST \
1087
+ (0x000D)
1088
+
1089
+ //
1090
+ // Attribute IDs in the range of 0x000D - 0x01FF are reserved for future use
1091
+ //
1092
+ #define SDP_ATTRIB_PROFILE_SPECIFIC (0x0200)
1093
+
1094
+ #define LANG_BASE_LANGUAGE_INDEX (0x0000)
1095
+ #define LANG_BASE_ENCODING_INDEX (0x0001)
1096
+ #define LANG_BASE_OFFSET_INDEX (0x0002)
1097
+ #define LANG_DEFAULT_ID (0x0100)
1098
+
1099
+ #define LANGUAGE_EN_US (0x656E)
1100
+ #define ENCODING_UTF_8 (0x006A)
1101
+
1102
+ #define STRING_NAME_OFFSET (0x0000)
1103
+ #define STRING_DESCRIPTION_OFFSET (0x0001)
1104
+ #define STRING_PROVIDER_NAME_OFFSET (0x0002)
1105
+
1106
+ #define SDP_ATTRIB_SDP_VERSION_NUMBER_LIST (0x0200)
1107
+ #define SDP_ATTRIB_SDP_DATABASE_STATE (0x0201)
1108
+
1109
+ #define SDP_ATTRIB_BROWSE_GROUP_ID (0x0200)
1110
+
1111
+ #define SDP_ATTRIB_CORDLESS_EXTERNAL_NETWORK (0x0301)
1112
+
1113
+ #define SDP_ATTRIB_FAX_CLASS_1_SUPPORT (0x0302)
1114
+ #define SDP_ATTRIB_FAX_CLASS_2_0_SUPPORT (0x0303)
1115
+ #define SDP_ATTRIB_FAX_CLASS_2_SUPPORT (0x0304)
1116
+ #define SDP_ATTRIB_FAX_AUDIO_FEEDBACK_SUPPORT (0x0305)
1117
+
1118
+ #define SDP_ATTRIB_HEADSET_REMOTE_AUDIO_VOLUME_CONTROL (0x0302)
1119
+
1120
+ #define SDP_ATTRIB_LAN_LPSUBNET (0x0200)
1121
+
1122
+ #define SDP_ATTRIB_OBJECT_PUSH_SUPPORTED_FORMATS_LIST (0x0303)
1123
+
1124
+ #define SDP_ATTRIB_SYNCH_SUPPORTED_DATA_STORES_LIST (0x0301)
1125
+
1126
+ // this is in the assigned numbers doc, but it does not show up in any profile
1127
+ #define SDP_ATTRIB_SERVICE_VERSION (0x0300)
1128
+
1129
+ #define SDP_ATTRIB_PAN_NETWORK_ADDRESS (0x0306)
1130
+ #define SDP_ATTRIB_PAN_WAP_GATEWAY (0x0307)
1131
+ #define SDP_ATTRIB_PAN_HOME_PAGE_URL (0x0308)
1132
+ #define SDP_ATTRIB_PAN_WAP_STACK_TYPE (0x0309)
1133
+ #define SDP_ATTRIB_PAN_SECURITY_DESCRIPTION (0x030A)
1134
+ #define SDP_ATTRIB_PAN_NET_ACCESS_TYPE (0x030B)
1135
+ #define SDP_ATTRIB_PAN_MAX_NET_ACCESS_RATE (0x030C)
1136
+
1137
+ #define SDP_ATTRIB_IMAGING_SUPPORTED_CAPABILITIES (0x0310)
1138
+ #define SDP_ATTRIB_IMAGING_SUPPORTED_FEATURES (0x0311)
1139
+ #define SDP_ATTRIB_IMAGING_SUPPORTED_FUNCTIONS (0x0312)
1140
+ #define SDP_ATTRIB_IMAGING_TOTAL_DATA_CAPACITY (0x0313)
1141
+
1142
+ #define SDP_ATTRIB_DI_SPECIFICATION_ID (0x0200)
1143
+ #define SDP_ATTRIB_DI_VENDOR_ID (0x0201)
1144
+ #define SDP_ATTRIB_DI_PRODUCT_ID (0x0202)
1145
+ #define SDP_ATTRIB_DI_VERSION (0x0203)
1146
+ #define SDP_ATTRIB_DI_PRIMARY_RECORD (0x0204)
1147
+ #define SDP_ATTRIB_DI_VENDOR_ID_SOURCE (0x0205)
1148
+
1149
+ #define SDP_ATTRIB_HID_DEVICE_RELEASE_NUMBER (0x0200)
1150
+ #define SDP_ATTRIB_HID_PARSER_VERSION (0x0201)
1151
+ #define SDP_ATTRIB_HID_DEVICE_SUBCLASS (0x0202)
1152
+ #define SDP_ATTRIB_HID_COUNTRY_CODE (0x0203)
1153
+ #define SDP_ATTRIB_HID_VIRTUAL_CABLE (0x0204)
1154
+ #define SDP_ATTRIB_HID_RECONNECT_INITIATE (0x0205)
1155
+ #define SDP_ATTRIB_HID_DESCRIPTOR_LIST (0x0206)
1156
+ #define SDP_ATTRIB_HID_LANG_ID_BASE_LIST (0x0207)
1157
+ #define SDP_ATTRIB_HID_SDP_DISABLE (0x0208)
1158
+ #define SDP_ATTRIB_HID_BATTERY_POWER (0x0209)
1159
+ #define SDP_ATTRIB_HID_REMOTE_WAKE (0x020A)
1160
+ #define SDP_ATTRIB_HID_PROFILE_VERSION (0x020B)
1161
+ #define SDP_ATTRIB_HID_SUPERVISION_TIMEOUT (0x020C)
1162
+ #define SDP_ATTRIB_HID_NORMALLY_CONNECTABLE (0x020D)
1163
+ #define SDP_ATTRIB_HID_BOOT_DEVICE (0x020E)
1164
+ #define SDP_ATTRIB_HID_SSR_HOST_MAX_LATENCY (0x020F)
1165
+ #define SDP_ATTRIB_HID_SSR_HOST_MIN_TIMEOUT (0x0210)
1166
+
1167
+ #define SDP_ATTRIB_A2DP_SUPPORTED_FEATURES (0x0311)
1168
+
1169
+ #define SDP_ATTRIB_AVRCP_SUPPORTED_FEATURES (0x0311)
1170
+
1171
+ #define SDP_ATTRIB_HFP_SUPPORTED_FEATURES (0x0311)
1172
+
1173
+ //
1174
+ // Profile specific values
1175
+ //
1176
+ #define AVRCP_SUPPORTED_FEATURES_CATEGORY_1 (0x0001)
1177
+ #define AVRCP_SUPPORTED_FEATURES_CATEGORY_2 (0x0002)
1178
+ #define AVRCP_SUPPORTED_FEATURES_CATEGORY_3 (0x0004)
1179
+ #define AVRCP_SUPPORTED_FEATURES_CATEGORY_4 (0x0008)
1180
+ #define AVRCP_SUPPORTED_FEATURES_CT_BROWSING (0x0040)
1181
+ #define AVRCP_SUPPORTED_FEATURES_CT_COVER_ART_IMAGE_PROPERTIES (0X0080)
1182
+ #define AVRCP_SUPPORTED_FEATURES_CT_COVER_ART_IMAGE (0X0100)
1183
+ #define AVRCP_SUPPORTED_FEATURES_CT_COVER_ART_LINKED_THUMBNAIL (0x0200)
1184
+ #define AVRCP_SUPPORTED_FEATURES_TG_PLAYER_APPLICATION_SETTINGS (0x0010)
1185
+ #define AVRCP_SUPPORTED_FEATURES_TG_GROUP_NAVIGATION (0x0020)
1186
+ #define AVRCP_SUPPORTED_FEATURES_TG_BROWSING (0x0040)
1187
+ #define AVRCP_SUPPORTED_FEATURES_TG_MULTIPLE_PLAYER_APPLICATIONS (0x0080)
1188
+ #define AVRCP_SUPPORTED_FEATURES_TG_COVER_ART (0x0100)
1189
+
1190
+ #define A2DP_SINK_SUPPORTED_FEATURES_HEADPHONE (0x0001)
1191
+ #define A2DP_SINK_SUPPORTED_FEATURES_SPEAKER (0x0002)
1192
+ #define A2DP_SINK_SUPPORTED_FEATURES_RECORDER (0x0004)
1193
+ #define A2DP_SINK_SUPPORTED_FEATURES_AMPLIFIER (0x0008)
1194
+
1195
+ #define A2DP_SOURCE_SUPPORTED_FEATURES_PLAYER (0x0001)
1196
+ #define A2DP_SOURCE_SUPPORTED_FEATURES_MICROPHONE (0x0002)
1197
+ #define A2DP_SOURCE_SUPPORTED_FEATURES_TUNER (0x0004)
1198
+ #define A2DP_SOURCE_SUPPORTED_FEATURES_MIXER (0x0008)
1199
+
1200
+ #define CORDLESS_EXTERNAL_NETWORK_PSTN (0x01)
1201
+ #define CORDLESS_EXTERNAL_NETWORK_ISDN (0x02)
1202
+ #define CORDLESS_EXTERNAL_NETWORK_GSM (0x03)
1203
+ #define CORDLESS_EXTERNAL_NETWORK_CDMA (0x04)
1204
+ #define CORDLESS_EXTERNAL_NETWORK_ANALOG_CELLULAR (0x05)
1205
+ #define CORDLESS_EXTERNAL_NETWORK_PACKET_SWITCHED (0x06)
1206
+ #define CORDLESS_EXTERNAL_NETWORK_OTHER (0x07)
1207
+
1208
+ #define OBJECT_PUSH_FORMAT_VCARD_2_1 (0x01)
1209
+ #define OBJECT_PUSH_FORMAT_VCARD_3_0 (0x02)
1210
+ #define OBJECT_PUSH_FORMAT_VCAL_1_0 (0x03)
1211
+ #define OBJECT_PUSH_FORMAT_ICAL_2_0 (0x04)
1212
+ #define OBJECT_PUSH_FORMAT_VNOTE (0x05)
1213
+ #define OBJECT_PUSH_FORMAT_VMESSAGE (0x06)
1214
+ #define OBJECT_PUSH_FORMAT_ANY (0xFF)
1215
+
1216
+ #define SYNCH_DATA_STORE_PHONEBOOK (0x01)
1217
+ #define SYNCH_DATA_STORE_CALENDAR (0x03)
1218
+ #define SYNCH_DATA_STORE_NOTES (0x05)
1219
+ #define SYNCH_DATA_STORE_MESSAGES (0x06)
1220
+
1221
+ #define DI_VENDOR_ID_SOURCE_BLUETOOTH_SIG (0x0001)
1222
+ #define DI_VENDOR_ID_SOURCE_USB_IF (0x0002)
1223
+
1224
+ #define PSM_SDP (0x0001)
1225
+ #define PSM_RFCOMM (0x0003)
1226
+ #define PSM_TCS_BIN (0x0005)
1227
+ #define PSM_TCS_BIN_CORDLESS (0x0007)
1228
+ #define PSM_BNEP (0x000F)
1229
+ #define PSM_HID_CONTROL (0x0011)
1230
+ #define PSM_HID_INTERRUPT (0x0013)
1231
+ #define PSM_UPNP (0x0015)
1232
+ #define PSM_AVCTP (0x0017)
1233
+ #define PSM_AVDTP (0x0019)
1234
+ #define PSM_AVCTP_BROWSE (0x001B)
1235
+ #define PSM_UDI_C_PLANE (0x001D)
1236
+ #define PSM_ATT (0x001F)
1237
+ #define PSM_3DSP (0x0021)
1238
+ #define PSM_LE_IPSP (0x0023)
1239
+
1240
+ //
1241
+ // Strings
1242
+ //
1243
+ #define STR_ADDR_FMTA "(%02x:%02x:%02x:%02x:%02x:%02x)"
1244
+ #define STR_ADDR_FMTW L"(%02x:%02x:%02x:%02x:%02x:%02x)"
1245
+
1246
+ #define STR_ADDR_SHORT_FMTA "%04x%08x"
1247
+ #define STR_ADDR_SHORT_FMTW L"%04x%08x"
1248
+
1249
+ #define STR_USBHCI_CLASS_HARDWAREIDA "USB\\Class_E0&SubClass_01&Prot_01"
1250
+ #define STR_USBHCI_CLASS_HARDWAREIDW L"USB\\Class_E0&SubClass_01&Prot_01"
1251
+
1252
+ #if defined(UNICODE) || defined(BTH_KERN)
1253
+
1254
+ #define STR_ADDR_FMT STR_ADDR_FMTW
1255
+ #define STR_ADDR_SHORT_FMT STR_ADDR_SHORT_FMTW
1256
+
1257
+ #define STR_USBHCI_CLASS_HARDWAREID STR_USBHCI_CLASS_HARDWAREIDW
1258
+
1259
+ #else // UNICODE
1260
+
1261
+ #define STR_ADDR_FMT STR_ADDR_FMTA
1262
+ #define STR_ADDR_SHORT_FMT STR_ADDR_SHORT_FMTA
1263
+
1264
+ #define STR_USBHCI_CLASS_HARDWAREID STR_USBHCI_CLASS_HARDWAREIDA
1265
+
1266
+ #endif // UNICODE
1267
+
1268
+ #define GET_BITS(field,offset,mask) ( ( (field) >> (offset) ) & (mask) )
1269
+ #define GET_BIT(field,offset) ( GET_BITS(field,offset,0x1) )
1270
+
1271
+ #define LMP_3_SLOT_PACKETS(x) (GET_BIT(x, 0))
1272
+ #define LMP_5_SLOT_PACKETS(x) (GET_BIT(x, 1))
1273
+ #define LMP_ENCRYPTION(x) (GET_BIT(x, 2))
1274
+ #define LMP_SLOT_OFFSET(x) (GET_BIT(x, 3))
1275
+ #define LMP_TIMING_ACCURACY(x) (GET_BIT(x, 4))
1276
+ #define LMP_SWITCH(x) (GET_BIT(x, 5))
1277
+ #define LMP_HOLD_MODE(x) (GET_BIT(x, 6))
1278
+ #define LMP_SNIFF_MODE(x) (GET_BIT(x, 7))
1279
+ #define LMP_PARK_MODE(x) (GET_BIT(x, 8))
1280
+ #define LMP_RSSI(x) (GET_BIT(x, 9))
1281
+ #define LMP_CHANNEL_QUALITY_DRIVEN_MODE(x) (GET_BIT(x,10))
1282
+ #define LMP_SCO_LINK(x) (GET_BIT(x,11))
1283
+ #define LMP_HV2_PACKETS(x) (GET_BIT(x,12))
1284
+ #define LMP_HV3_PACKETS(x) (GET_BIT(x,13))
1285
+ #define LMP_MU_LAW_LOG(x) (GET_BIT(x,14))
1286
+ #define LMP_A_LAW_LOG(x) (GET_BIT(x,15))
1287
+ #define LMP_CVSD(x) (GET_BIT(x,16))
1288
+ #define LMP_PAGING_SCHEME(x) (GET_BIT(x,17))
1289
+ #define LMP_POWER_CONTROL(x) (GET_BIT(x,18))
1290
+ #define LMP_TRANSPARENT_SCO_DATA(x) (GET_BIT(x,19))
1291
+ #define LMP_FLOW_CONTROL_LAG(x) (GET_BITS(x,20,0x3))
1292
+ #define LMP_BROADCAST_ENCRYPTION(x) (GET_BIT(x,23))
1293
+ #define LMP_ENHANCED_DATA_RATE_ACL_2MBPS_MODE(x) (GET_BIT(x,25))
1294
+ #define LMP_ENHANCED_DATA_RATE_ACL_3MBPS_MODE(x) (GET_BIT(x,26))
1295
+ #define LMP_ENHANCED_INQUIRY_SCAN(x) (GET_BIT(x,27))
1296
+ #define LMP_INTERLACED_INQUIRY_SCAN(x) (GET_BIT(x,28))
1297
+ #define LMP_INTERLACED_PAGE_SCAN(x) (GET_BIT(x,29))
1298
+ #define LMP_RSSI_WITH_INQUIRY_RESULTS(x) (GET_BIT(x,30))
1299
+ #define LMP_ESCO_LINK(x) (GET_BIT(x,31))
1300
+ #define LMP_EV4_PACKETS(x) (GET_BIT(x,32))
1301
+ #define LMP_EV5_PACKETS(x) (GET_BIT(x,33))
1302
+ #define LMP_AFH_CAPABLE_SLAVE(x) (GET_BIT(x,35))
1303
+ #define LMP_AFH_CLASSIFICATION_SLAVE(x) (GET_BIT(x,36))
1304
+ #define LMP_BR_EDR_NOT_SUPPORTED(x) (GET_BIT(x,37))
1305
+ #define LMP_LE_SUPPORTED(x) (GET_BIT(x,38))
1306
+ #define LMP_3SLOT_EDR_ACL_PACKETS(x) (GET_BIT(x,39))
1307
+ #define LMP_5SLOT_EDR_ACL_PACKETS(x) (GET_BIT(x,40))
1308
+ #define LMP_SNIFF_SUBRATING(x) (GET_BIT(x,41))
1309
+ #define LMP_PAUSE_ENCRYPTION(x) (GET_BIT(x,42))
1310
+ #define LMP_AFH_CAPABLE_MASTER(x) (GET_BIT(x,43))
1311
+ #define LMP_AFH_CLASSIFICATION_MASTER(x) (GET_BIT(x,44))
1312
+ #define LMP_EDR_ESCO_2MBPS_MODE(x) (GET_BIT(x,45))
1313
+ #define LMP_EDR_ESCO_3MBPS_MODE(x) (GET_BIT(x,46))
1314
+ #define LMP_3SLOT_EDR_ESCO_PACKETS(x) (GET_BIT(x,47))
1315
+ #define LMP_EXTENDED_INQUIRY_RESPONSE(x) (GET_BIT(x,48))
1316
+ #define LMP_SIMULT_LE_BR_TO_SAME_DEV(x) (GET_BIT(x,49))
1317
+ #define LMP_SECURE_SIMPLE_PAIRING(x) (GET_BIT(x,51))
1318
+ #define LMP_ENCAPSULATED_PDU(x) (GET_BIT(x,52))
1319
+ #define LMP_ERRONEOUS_DATA_REPORTING(x) (GET_BIT(x,53))
1320
+ #define LMP_NON_FLUSHABLE_PACKET_BOUNDARY_FLAG(x) (GET_BIT(x,54))
1321
+ #define LMP_LINK_SUPERVISION_TIMEOUT_CHANGED_EVENT(x) (GET_BIT(x,56))
1322
+ #define LMP_INQUIRY_RESPONSE_TX_POWER_LEVEL(x)(GET_BIT(x,57))
1323
+ #define LMP_EXTENDED_FEATURES(x) (GET_BIT(x,63))
1324
+
1325
+ #endif // GUID_DEFS_ONLY
1326
+
1327
+ #endif // (NTDDI_VERSION >= NTDDI_WINXPSP2)
1328
+
1329
+ #if _MSC_VER >= 1200
1330
+ #pragma warning(pop)
1331
+ #else
1332
+ #pragma warning(default:4201)
1333
+ #endif
1334
+
1335
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
1336
+ #pragma endregion
1337
+
1338
+ #endif // __BTHDEF_H__
1339
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/bthioctl.h ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) Microsoft Corporation. All rights reserved.
2
+
3
+ #pragma detect_mismatch("ODR_violation_bthioctl_mismatch", "1")
4
+ #ifndef __BTHIOCTL_H__
5
+ #define __BTHIOCTL_H__
6
+
7
+ #include <winapifamily.h>
8
+
9
+ #pragma region Desktop Family
10
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
11
+
12
+ #if _MSC_VER >= 1200
13
+ #pragma warning(push)
14
+ #endif
15
+ #pragma warning(disable:4201) // nameless struct/union
16
+
17
+ #if (NTDDI_VERSION >= NTDDI_VISTA)
18
+
19
+ #ifndef CTL_CODE
20
+ #pragma message("CTL_CODE undefined. Include winioctl.h or wdm.h")
21
+ #endif
22
+
23
+ // IOCTL defines.
24
+ #define BTH_IOCTL_BASE 0
25
+
26
+ #define BTH_CTL(id) CTL_CODE(FILE_DEVICE_BLUETOOTH, \
27
+ (id), \
28
+ METHOD_BUFFERED, \
29
+ FILE_ANY_ACCESS)
30
+
31
+ #define BTH_KERNEL_CTL(id) CTL_CODE(FILE_DEVICE_BLUETOOTH, \
32
+ (id), \
33
+ METHOD_NEITHER, \
34
+ FILE_ANY_ACCESS)
35
+
36
+ // kernel-level (internal) IOCTLs
37
+ #define IOCTL_INTERNAL_BTH_SUBMIT_BRB BTH_KERNEL_CTL(BTH_IOCTL_BASE+0x00)
38
+
39
+ // Input: none
40
+ // Output: BTH_ENUMERATOR_INFO
41
+ #define IOCTL_INTERNAL_BTHENUM_GET_ENUMINFO BTH_KERNEL_CTL(BTH_IOCTL_BASE+0x01)
42
+
43
+ // Input: none
44
+ // Output: BTH_DEVICE_INFO
45
+ #define IOCTL_INTERNAL_BTHENUM_GET_DEVINFO BTH_KERNEL_CTL(BTH_IOCTL_BASE+0x02)
46
+
47
+ // IOCTLs
48
+ // Input: none
49
+ // Output: BTH_LOCAL_RADIO_INFO
50
+ #define IOCTL_BTH_GET_LOCAL_INFO BTH_CTL(BTH_IOCTL_BASE+0x00)
51
+
52
+ // Input: BTH_ADDR
53
+ // Output: BTH_RADIO_INFO
54
+ #define IOCTL_BTH_GET_RADIO_INFO BTH_CTL(BTH_IOCTL_BASE+0x01)
55
+
56
+ // use this ioctl to get a list of cached discovered devices in the port driver.
57
+ // Input: None
58
+ // Output: BTH_DEVICE_INFO_LIST
59
+ #define IOCTL_BTH_GET_DEVICE_INFO BTH_CTL(BTH_IOCTL_BASE+0x02)
60
+
61
+ // Input: BTH_ADDR
62
+ // Output: none
63
+ #define IOCTL_BTH_DISCONNECT_DEVICE BTH_CTL(BTH_IOCTL_BASE+0x03)
64
+
65
+ #if (NTDDI_VERSION > NTDDI_VISTASP1 || \
66
+ (NTDDI_VERSION == NTDDI_VISTASP1 && defined(VISTA_KB942567)))
67
+
68
+ // Input: BTH_VENDOR_SPECIFIC_COMMAND
69
+ // Output: PVOID
70
+ #define IOCTL_BTH_HCI_VENDOR_COMMAND BTH_CTL(BTH_IOCTL_BASE+0x14)
71
+
72
+ #endif // >= SP1+KB942567
73
+
74
+ // Input: BTH_SDP_CONNECT
75
+ // Output: BTH_SDP_CONNECT
76
+ #define IOCTL_BTH_SDP_CONNECT BTH_CTL(BTH_IOCTL_BASE+0x80)
77
+
78
+ // Input: HANDLE_SDP
79
+ // Output: none
80
+ #define IOCTL_BTH_SDP_DISCONNECT BTH_CTL(BTH_IOCTL_BASE+0x81)
81
+
82
+ // Input: BTH_SDP_SERVICE_SEARCH_REQUEST
83
+ // Output: ULONG * number of handles wanted
84
+ #define IOCTL_BTH_SDP_SERVICE_SEARCH BTH_CTL(BTH_IOCTL_BASE+0x82)
85
+
86
+ // Input: BTH_SDP_ATTRIBUTE_SEARCH_REQUEST
87
+ // Output: BTH_SDP_STREAM_RESPONSE or bigger
88
+ #define IOCTL_BTH_SDP_ATTRIBUTE_SEARCH BTH_CTL(BTH_IOCTL_BASE+0x83)
89
+
90
+ // Input: BTH_SDP_SERVICE_ATTRIBUTE_SEARCH_REQUEST
91
+ // Output: BTH_SDP_STREAM_RESPONSE or bigger
92
+ #define IOCTL_BTH_SDP_SERVICE_ATTRIBUTE_SEARCH \
93
+ BTH_CTL(BTH_IOCTL_BASE+0x84)
94
+
95
+ // Input: raw SDP stream (at least 2 bytes)
96
+ // Ouptut: HANDLE_SDP
97
+ #define IOCTL_BTH_SDP_SUBMIT_RECORD BTH_CTL(BTH_IOCTL_BASE+0x85)
98
+
99
+ // Input: HANDLE_SDP
100
+ // Output: none
101
+ #define IOCTL_BTH_SDP_REMOVE_RECORD BTH_CTL(BTH_IOCTL_BASE+0x86)
102
+
103
+ // Input: BTH_SDP_RECORD + raw SDP record
104
+ // Output: HANDLE_SDP
105
+ #define IOCTL_BTH_SDP_SUBMIT_RECORD_WITH_INFO BTH_CTL(BTH_IOCTL_BASE+0x87)
106
+
107
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
108
+
109
+ // Input: NONE
110
+ // Output: BTH_HOST_FEATURE_MASK
111
+ #define IOCTL_BTH_GET_HOST_SUPPORTED_FEATURES BTH_CTL(BTH_IOCTL_BASE+0x88)
112
+ #endif // >= NTDDI_WIN8
113
+
114
+
115
+ #include <PSHPACK1.H>
116
+
117
+ typedef struct _BTH_DEVICE_INFO_LIST
118
+ {
119
+ // [IN/OUT] minimum of 1 device required
120
+ ULONG numOfDevices;
121
+
122
+ // Open ended array of devices;
123
+ BTH_DEVICE_INFO deviceList[1];
124
+
125
+ } BTH_DEVICE_INFO_LIST, *PBTH_DEVICE_INFO_LIST;
126
+
127
+ typedef struct _BTH_RADIO_INFO
128
+ {
129
+ // Supported LMP features of the radio. Use LMP_XXX() to extract
130
+ // the desired bits.
131
+ ULONGLONG lmpSupportedFeatures;
132
+
133
+ // Manufacturer ID (possibly BTH_MFG_XXX)
134
+ USHORT mfg;
135
+
136
+ // LMP subversion
137
+ USHORT lmpSubversion;
138
+
139
+ // LMP version
140
+ UCHAR lmpVersion;
141
+
142
+ } BTH_RADIO_INFO, *PBTH_RADIO_INFO;
143
+
144
+ typedef struct _BTH_LOCAL_RADIO_INFO
145
+ {
146
+ // Local BTH_ADDR, class of defice, and radio name
147
+ BTH_DEVICE_INFO localInfo;
148
+
149
+ // Combo of LOCAL_RADIO_XXX values
150
+ ULONG flags;
151
+
152
+ // HCI revision, see core spec
153
+ USHORT hciRevision;
154
+
155
+ // HCI version, see core spec
156
+ UCHAR hciVersion;
157
+
158
+ // More information about the local radio (LMP, MFG)
159
+ BTH_RADIO_INFO radioInfo;
160
+
161
+ } BTH_LOCAL_RADIO_INFO, *PBTH_LOCAL_RADIO_INFO;
162
+
163
+ #define SDP_CONNECT_CACHE (0x00000001)
164
+ #define SDP_CONNECT_ALLOW_PIN (0x00000002)
165
+
166
+
167
+ #define SDP_REQUEST_TO_DEFAULT (0)
168
+ #define SDP_REQUEST_TO_MIN (10)
169
+ #define SDP_REQUEST_TO_MAX (45)
170
+
171
+ #define SERVICE_OPTION_DO_NOT_PUBLISH (0x00000002)
172
+ #define SERVICE_OPTION_NO_PUBLIC_BROWSE (0x00000004)
173
+ #define SERVICE_OPTION_DO_NOT_PUBLISH_EIR (0x00000008)
174
+
175
+ #define SERVICE_SECURITY_USE_DEFAULTS (0x00000000)
176
+ #define SERVICE_SECURITY_NONE (0x00000001)
177
+ #define SERVICE_SECURITY_AUTHORIZE (0x00000002)
178
+ #define SERVICE_SECURITY_AUTHENTICATE (0x00000004)
179
+ #define SERVICE_SECURITY_ENCRYPT_REQUIRED (0x00000010)
180
+ #define SERVICE_SECURITY_ENCRYPT_OPTIONAL (0x00000020)
181
+ #define SERVICE_SECURITY_DISABLED (0x10000000)
182
+ #define SERVICE_SECURITY_NO_ASK (0x20000000)
183
+
184
+ // Do not attempt to validate that the stream can be parsed
185
+ #define SDP_SEARCH_NO_PARSE_CHECK (0x00000001)
186
+
187
+ // Do not check the format of the results. This includes suppression of both
188
+ // the check for a record patten (SEQ of UINT16 + value) and the validation
189
+ // of each universal attribute's accordance to the spec.
190
+ #define SDP_SEARCH_NO_FORMAT_CHECK (0x00000002)
191
+
192
+ #ifndef HANDLE_SDP_TYPE
193
+ typedef ULONGLONG HANDLE_SDP, *PHANDLE_SDP;
194
+ #define HANDLE_SDP_TYPE HANDLE_SDP
195
+ #define HANDLE_SDP_FIELD_NAME hConnection
196
+ #define HANDLE_SDP_NULL ((HANDLE_SDP)0x0)
197
+ #endif
198
+
199
+ #define HANDLE_SDP_LOCAL ((HANDLE_SDP) -2)
200
+
201
+ typedef struct _BTH_SDP_CONNECT
202
+ {
203
+ // Address of the remote SDP server. Cannot be the local radio.
204
+ BTH_ADDR bthAddress;
205
+
206
+ // Combination of SDP_CONNECT_XXX flags
207
+ ULONG fSdpConnect;
208
+
209
+ // When the connect request returns, this will specify the handle to the
210
+ // SDP connection to the remote server
211
+ HANDLE_SDP_TYPE HANDLE_SDP_FIELD_NAME;
212
+
213
+ // Timeout, in seconds, for the requests on ths SDP channel. If the request
214
+ // times out, the SDP connection represented by the HANDLE_SDP must be
215
+ // closed. The values for this field are bound by SDP_REQUEST_TO_MIN and
216
+ // SDP_REQUEST_MAX. If SDP_REQUEST_TO_DEFAULT is specified, the timeout is
217
+ // 30 seconds.
218
+ UCHAR requestTimeout;
219
+
220
+ } BTH_SDP_CONNECT, *PBTH_SDP_CONNECT;
221
+
222
+ typedef struct _BTH_SDP_DISCONNECT
223
+ {
224
+ // hConnection returned by BTH_SDP_CONNECT
225
+ HANDLE_SDP_TYPE HANDLE_SDP_FIELD_NAME;
226
+
227
+ } BTH_SDP_DISCONNECT, *PBTH_SDP_DISCONNECT;
228
+
229
+
230
+ typedef struct _BTH_SDP_RECORD
231
+ {
232
+ // Combination of SERVICE_SECURITY_XXX flags
233
+ ULONG fSecurity;
234
+
235
+ // Combination of SERVICE_OPTION_XXX flags
236
+ ULONG fOptions;
237
+
238
+ // combo of COD_SERVICE_XXX flags
239
+ ULONG fCodService;
240
+
241
+ // The length of the record array, in bytes.
242
+ ULONG recordLength;
243
+
244
+ // The SDP record in its raw format
245
+ UCHAR record[1];
246
+
247
+ } BTH_SDP_RECORD, *PBTH_SDP_RECORD;
248
+
249
+ typedef struct _BTH_SDP_SERVICE_SEARCH_REQUEST
250
+ {
251
+ // Handle returned by the connect request or HANDLE_SDP_LOCAL
252
+ HANDLE_SDP_TYPE HANDLE_SDP_FIELD_NAME;
253
+
254
+ // Array of UUIDs. Each entry can be either a 2 byte, 4 byte or 16 byte
255
+ // UUID. SDP spec mandates that a request can have a maximum of 12 UUIDs.
256
+ SdpQueryUuid uuids[MAX_UUIDS_IN_QUERY];
257
+
258
+ } BTH_SDP_SERVICE_SEARCH_REQUEST, *PBTH_SDP_SERVICE_SEARCH_REQUEST;
259
+
260
+ typedef struct _BTH_SDP_ATTRIBUTE_SEARCH_REQUEST
261
+ {
262
+ // Handle returned by the connect request or HANDLE_SDP_LOCAL
263
+ HANDLE_SDP_TYPE HANDLE_SDP_FIELD_NAME;
264
+
265
+ // Combo of SDP_SEARCH_Xxx flags
266
+ ULONG searchFlags;
267
+
268
+ // Record handle returned by the remote SDP server, most likely from a
269
+ // previous BTH_SDP_SERVICE_SEARCH_RESPONSE.
270
+ ULONG recordHandle;
271
+
272
+ // Array of attributes to query for. Each SdpAttributeRange entry can
273
+ // specify either a single attribute or a range. To specify a single
274
+ // attribute, minAttribute should be equal to maxAttribute. The array must
275
+ // be in sorted order, starting with the smallest attribute. Furthermore,
276
+ // if a range is specified, the minAttribute must be <= maxAttribute.
277
+ SdpAttributeRange range[1];
278
+
279
+ } BTH_SDP_ATTRIBUTE_SEARCH_REQUEST, *PBTH_SDP_ATTRIBUTE_SEARCH_REQUEST;
280
+
281
+ typedef struct _BTH_SDP_SERVICE_ATTRIBUTE_SEARCH_REQUEST
282
+ {
283
+ // Handle returned by the connect request or HANDLE_SDP_LOCAL
284
+ HANDLE_SDP_TYPE HANDLE_SDP_FIELD_NAME;
285
+
286
+ // Combo of SDP_SEARCH_Xxx flags
287
+ ULONG searchFlags;
288
+
289
+ // See comments in BTH_SDP_SERVICE_SEARCH_REQUEST
290
+ SdpQueryUuid uuids[MAX_UUIDS_IN_QUERY];
291
+
292
+ // See comments in BTH_SDP_ATTRIBUTE_SEARCH_REQUEST
293
+ SdpAttributeRange range[1];
294
+
295
+ } BTH_SDP_SERVICE_ATTRIBUTE_SEARCH_REQUEST,
296
+ *PBTH_SDP_SERVICE_ATTRIBUTE_SEARCH_REQUEST;
297
+
298
+ typedef struct _BTH_SDP_STREAM_RESPONSE
299
+ {
300
+ // The required buffer size (not including the first 2 ULONG_PTRs of this
301
+ // data structure) needed to contain the response.
302
+ // If the buffer passed was large enough to contain the entire response,
303
+ // requiredSize will be equal to responseSize. Otherwise, the caller should
304
+ // resubmit the request with a buffer size equal to
305
+ // sizeof(BTH_SDP_STREAM_RESPONSE) + requiredSize - 1. (The -1 is because
306
+ // the size of this data structure already includes one byte of the
307
+ // response.)
308
+ // A response cannot exceed 4GB in size.
309
+ ULONG requiredSize;
310
+
311
+ // The number of bytes copied into the response array of this data
312
+ // structure. If there is not enough room for the entire response, the
313
+ // response will be partially copied into the response array.
314
+ ULONG responseSize;
315
+
316
+ // The raw SDP response from the search.
317
+ UCHAR response[1];
318
+
319
+ } BTH_SDP_STREAM_RESPONSE, *PBTH_SDP_STREAM_RESPONSE;
320
+
321
+ #if (NTDDI_VERSION > NTDDI_VISTASP1 || \
322
+ (NTDDI_VERSION == NTDDI_VISTASP1 && defined(VISTA_KB942567)))
323
+
324
+ // Vendor specific HCI command header
325
+ typedef struct _BTH_COMMAND_HEADER
326
+ {
327
+ // Opcode for the command
328
+ USHORT OpCode;
329
+
330
+ // Payload of the command excluding the header.
331
+ // TotalParameterLength = TotalCommandLength - sizeof(BTH_COMMAND_HEADER)
332
+ UCHAR TotalParameterLength;
333
+
334
+ } BTH_COMMAND_HEADER, * PBTH_COMMAND_HEADER;
335
+
336
+ // Vendor Specific Command structure
337
+ typedef struct _BTH_VENDOR_SPECIFIC_COMMAND
338
+ {
339
+ // Manufacturer ID
340
+ ULONG ManufacturerId;
341
+
342
+ // LMP version. Command is send to radio only if the radios
343
+ // LMP version is greater than this value.
344
+ UCHAR LmpVersion;
345
+
346
+ // Should all the patterns match or just one. If MatchAnySinglePattern == TRUE
347
+ // then if a single pattern matches the command, we decide that we have a match.
348
+ BOOLEAN MatchAnySinglePattern;
349
+
350
+ // HCI Command Header
351
+ BTH_COMMAND_HEADER HciHeader;
352
+
353
+ // Data for the above command including patterns
354
+ UCHAR Data[1];
355
+ } BTH_VENDOR_SPECIFIC_COMMAND, * PBTH_VENDOR_SPECIFIC_COMMAND;
356
+
357
+ // Structure of patterns
358
+ typedef struct _BTH_VENDOR_PATTERN
359
+ {
360
+ // Pattern Offset in the event structure excluding EVENT header
361
+ UCHAR Offset;
362
+
363
+ // Size of the Pattern
364
+ UCHAR Size;
365
+
366
+ // Pattern
367
+ UCHAR Pattern[1];
368
+ } BTH_VENDOR_PATTERN, * PBTH_VENDOR_PATTERN;
369
+
370
+
371
+ //The buffer associated with GUID_BLUETOOTH_HCI_VENDOR_EVENT
372
+ typedef struct _BTH_VENDOR_EVENT_INFO
373
+ {
374
+ //Local radio address with which the event is associated.
375
+ BTH_ADDR BthAddress;
376
+
377
+ //Size of the event buffer including Event header
378
+ ULONG EventSize;
379
+
380
+ //Information associated with the event
381
+ UCHAR EventInfo[1];
382
+ } BTH_VENDOR_EVENT_INFO, * PBTH_VENDOR_EVENT_INFO;
383
+
384
+ #endif // >= SP1+KB942567
385
+
386
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
387
+
388
+ // Host supported features
389
+ #define BTH_HOST_FEATURE_ENHANCED_RETRANSMISSION_MODE (0x0000000000000001)
390
+ #define BTH_HOST_FEATURE_STREAMING_MODE (0x0000000000000002)
391
+ #define BTH_HOST_FEATURE_LOW_ENERGY (0x0000000000000004)
392
+ #define BTH_HOST_FEATURE_SCO_HCI (0x0000000000000008)
393
+ #define BTH_HOST_FEATURE_SCO_HCIBYPASS (0x0000000000000010)
394
+
395
+ typedef struct _BTH_HOST_FEATURE_MASK
396
+ {
397
+ // Mask of supported features.
398
+ ULONGLONG Mask;
399
+
400
+ // Reserved for future use.
401
+ ULONGLONG Reserved1;
402
+ ULONGLONG Reserved2;
403
+ } BTH_HOST_FEATURE_MASK, *PBTH_HOST_FEATURE_MASK;
404
+
405
+ #endif //NTDDI_WIN8
406
+
407
+ #include <POPPACK.H>
408
+
409
+ #endif // (NTDDI_VERSION >= NTDDI_VISTA)
410
+
411
+ #if _MSC_VER >= 1200
412
+ #pragma warning(pop)
413
+ #else
414
+ #pragma warning(default:4201)
415
+ #endif
416
+
417
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
418
+ #pragma endregion
419
+
420
+ #endif // __BTHIOCTL_H__
421
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/bthsdpdef.h ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) Microsoft Corporation. All rights reserved.
2
+
3
+ #ifndef __BTHSDPDEF_H__
4
+ #define __BTHSDPDEF_H__
5
+ #include <winapifamily.h>
6
+
7
+ #pragma region Desktop Family
8
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
9
+
10
+ #if (NTDDI_VERSION >= NTDDI_WINXPSP2)
11
+
12
+ #ifdef __cplusplus
13
+ extern "C" {
14
+ #endif
15
+
16
+ typedef struct SDP_LARGE_INTEGER_16
17
+ {
18
+ ULONGLONG LowPart;
19
+ LONGLONG HighPart;
20
+ } SDP_LARGE_INTEGER_16, *PSDP_LARGE_INTEGER_16, *LPSDP_LARGE_INTEGER_16;
21
+
22
+ typedef struct SDP_ULARGE_INTEGER_16
23
+ {
24
+ ULONGLONG LowPart;
25
+ ULONGLONG HighPart;
26
+ } SDP_ULARGE_INTEGER_16, *PSDP_ULARGE_INTEGER_16, *LPSDP_ULARGE_INTEGER_16;
27
+
28
+ typedef enum NodeContainerType
29
+ {
30
+ NodeContainerTypeSequence,
31
+ NodeContainerTypeAlternative
32
+ } NodeContainerType;
33
+
34
+ typedef USHORT SDP_ERROR, *PSDP_ERROR;
35
+
36
+ // 9 - 31 are reserved
37
+ typedef enum SDP_TYPE
38
+ {
39
+ SDP_TYPE_NIL = 0x00,
40
+ SDP_TYPE_UINT = 0x01,
41
+ SDP_TYPE_INT = 0x02,
42
+ SDP_TYPE_UUID = 0x03,
43
+ SDP_TYPE_STRING = 0x04,
44
+ SDP_TYPE_BOOLEAN = 0x05,
45
+ SDP_TYPE_SEQUENCE = 0x06,
46
+ SDP_TYPE_ALTERNATIVE = 0x07,
47
+ SDP_TYPE_URL = 0x08,
48
+ SDP_TYPE_CONTAINER = 0x20
49
+ } SDP_TYPE;
50
+
51
+ // allow for a little easier type checking / sizing for integers and UUIDs
52
+ // ((SDP_ST_XXX & 0xF0) >> 4) == SDP_TYPE_XXX
53
+ // size of the data (in bytes) is encoded as ((SDP_ST_XXX & 0xF0) >> 8)
54
+ typedef enum SDP_SPECIFICTYPE
55
+ {
56
+ SDP_ST_NONE = 0x0000,
57
+
58
+ SDP_ST_UINT8 = 0x0010,
59
+ SDP_ST_UINT16 = 0x0110,
60
+ SDP_ST_UINT32 = 0x0210,
61
+ SDP_ST_UINT64 = 0x0310,
62
+ SDP_ST_UINT128 = 0x0410,
63
+
64
+ SDP_ST_INT8 = 0x0020,
65
+ SDP_ST_INT16 = 0x0120,
66
+ SDP_ST_INT32 = 0x0220,
67
+ SDP_ST_INT64 = 0x0320,
68
+ SDP_ST_INT128 = 0x0420,
69
+
70
+ SDP_ST_UUID16 = 0x0130,
71
+ SDP_ST_UUID32 = 0x0220,
72
+ SDP_ST_UUID128 = 0x0430
73
+ } SDP_SPECIFICTYPE;
74
+
75
+ typedef struct SdpAttributeRange
76
+ {
77
+ USHORT minAttribute;
78
+ USHORT maxAttribute;
79
+ } SdpAttributeRange;
80
+
81
+ typedef
82
+ #ifdef MIDL_PASS
83
+ [switch_type(unsigned short)]
84
+ #endif
85
+ union SdpQueryUuidUnion {
86
+ #ifdef MIDL_PASS
87
+ [case(SDP_ST_UUID128)]
88
+ #endif
89
+ GUID uuid128;
90
+
91
+ #ifdef MIDL_PASS
92
+ [case(SDP_ST_UUID32)]
93
+ #endif // _NTDDK_
94
+ ULONG uuid32;
95
+
96
+ #ifdef MIDL_PASS
97
+ [case(SDP_ST_UUID16)]
98
+ #endif // _NTDDK_
99
+ USHORT uuid16;
100
+ } SdpQueryUuidUnion;
101
+
102
+ typedef struct _SdpQueryUuid {
103
+ #ifdef MIDL_PASS
104
+ [switch_is(uuidType)]
105
+ #endif
106
+ SdpQueryUuidUnion u;
107
+
108
+ USHORT uuidType;
109
+ } SdpQueryUuid;
110
+
111
+
112
+ #ifdef __cplusplus
113
+ };
114
+ #endif
115
+
116
+ #endif // (NTDDI_VERSION >= NTDDI_WINXPSP2)
117
+
118
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
119
+ #pragma endregion
120
+
121
+ #endif // __BTHSDPDEF_H__
msvc/Windows Kits/10/Include/10.0.26100.0/shared/bugcodes.h ADDED
@@ -0,0 +1,4902 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++ BUILD Version: 0001 // Increment this if a change has global effects
2
+
3
+ Copyright (c) 1991 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ bugcodes.mc
8
+
9
+ Abstract:
10
+
11
+ This module contains the definition of the system bug check codes.
12
+
13
+ Notes:
14
+
15
+ No message strings should be added to the bugcodes' entries. Their
16
+ symbolic names take the place of message strings.
17
+
18
+ --*/
19
+
20
+ #ifndef _BUGCODES_
21
+ #define _BUGCODES_
22
+
23
+
24
+ //
25
+ // Values are 32 bit values laid out as follows:
26
+ //
27
+ // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
28
+ // 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
29
+ // +---+-+-+-----------------------+-------------------------------+
30
+ // |Sev|C|R| Facility | Code |
31
+ // +---+-+-+-----------------------+-------------------------------+
32
+ //
33
+ // where
34
+ //
35
+ // Sev - is the severity code
36
+ //
37
+ // 00 - Success
38
+ // 01 - Informational
39
+ // 10 - Warning
40
+ // 11 - Error
41
+ //
42
+ // C - is the Customer code flag
43
+ //
44
+ // R - is a reserved bit
45
+ //
46
+ // Facility - is the facility code
47
+ //
48
+ // Code - is the facility's status code
49
+ //
50
+ //
51
+ // Define the facility codes
52
+ //
53
+
54
+
55
+ //
56
+ // Define the severity codes
57
+ //
58
+
59
+
60
+ //
61
+ // MessageId: HARDWARE_PROFILE_UNDOCKED_STRING
62
+ //
63
+ // MessageText:
64
+ //
65
+ // Undocked Profile
66
+ //
67
+ #define HARDWARE_PROFILE_UNDOCKED_STRING ((ULONG)0x40010001L)
68
+
69
+ //
70
+ // MessageId: HARDWARE_PROFILE_DOCKED_STRING
71
+ //
72
+ // MessageText:
73
+ //
74
+ // Docked Profile
75
+ //
76
+ #define HARDWARE_PROFILE_DOCKED_STRING ((ULONG)0x40010002L)
77
+
78
+ //
79
+ // MessageId: HARDWARE_PROFILE_UNKNOWN_STRING
80
+ //
81
+ // MessageText:
82
+ //
83
+ // Profile
84
+ //
85
+ #define HARDWARE_PROFILE_UNKNOWN_STRING ((ULONG)0x40010003L)
86
+
87
+ //
88
+ // MessageId: WINDOWS_NT_BANNER
89
+ //
90
+ // MessageText:
91
+ //
92
+ // Microsoft (R) Windows (R) Version %hs (Build %u%hs)
93
+ //
94
+ #define WINDOWS_NT_BANNER ((ULONG)0x4000007EL)
95
+
96
+ //
97
+ // MessageId: WINDOWS_NT_CSD_STRING
98
+ //
99
+ // MessageText:
100
+ //
101
+ // Service Pack
102
+ //
103
+ #define WINDOWS_NT_CSD_STRING ((ULONG)0x40000087L)
104
+
105
+ //
106
+ // MessageId: WINDOWS_NT_INFO_STRING
107
+ //
108
+ // MessageText:
109
+ //
110
+ // %u System Processor [%u MB Memory] %Z
111
+ //
112
+ #define WINDOWS_NT_INFO_STRING ((ULONG)0x40000088L)
113
+
114
+ //
115
+ // MessageId: WINDOWS_NT_MP_STRING
116
+ //
117
+ // MessageText:
118
+ //
119
+ // MultiProcessor Kernel
120
+ //
121
+ #define WINDOWS_NT_MP_STRING ((ULONG)0x40000089L)
122
+
123
+ //
124
+ // MessageId: THREAD_TERMINATE_HELD_MUTEX
125
+ //
126
+ // MessageText:
127
+ //
128
+ // A kernel thread terminated while holding a mutex
129
+ //
130
+ #define THREAD_TERMINATE_HELD_MUTEX ((ULONG)0x4000008AL)
131
+
132
+ //
133
+ // MessageId: WINDOWS_NT_INFO_STRING_PLURAL
134
+ //
135
+ // MessageText:
136
+ //
137
+ // %u System Processors [%u MB Memory] %Z
138
+ //
139
+ #define WINDOWS_NT_INFO_STRING_PLURAL ((ULONG)0x4000009DL)
140
+
141
+ //
142
+ // MessageId: WINDOWS_NT_RC_STRING
143
+ //
144
+ // MessageText:
145
+ //
146
+ // RC
147
+ //
148
+ #define WINDOWS_NT_RC_STRING ((ULONG)0x4000009EL)
149
+
150
+ //
151
+ // MessageId: APC_INDEX_MISMATCH
152
+ //
153
+ // MessageText:
154
+ //
155
+ // APC_INDEX_MISMATCH
156
+ //
157
+ #define APC_INDEX_MISMATCH ((ULONG)0x00000001L)
158
+
159
+ //
160
+ // MessageId: DEVICE_QUEUE_NOT_BUSY
161
+ //
162
+ // MessageText:
163
+ //
164
+ // DEVICE_QUEUE_NOT_BUSY
165
+ //
166
+ #define DEVICE_QUEUE_NOT_BUSY ((ULONG)0x00000002L)
167
+
168
+ //
169
+ // MessageId: INVALID_AFFINITY_SET
170
+ //
171
+ // MessageText:
172
+ //
173
+ // INVALID_AFFINITY_SET
174
+ //
175
+ #define INVALID_AFFINITY_SET ((ULONG)0x00000003L)
176
+
177
+ //
178
+ // MessageId: INVALID_DATA_ACCESS_TRAP
179
+ //
180
+ // MessageText:
181
+ //
182
+ // INVALID_DATA_ACCESS_TRAP
183
+ //
184
+ #define INVALID_DATA_ACCESS_TRAP ((ULONG)0x00000004L)
185
+
186
+ //
187
+ // MessageId: INVALID_PROCESS_ATTACH_ATTEMPT
188
+ //
189
+ // MessageText:
190
+ //
191
+ // INVALID_PROCESS_ATTACH_ATTEMPT
192
+ //
193
+ #define INVALID_PROCESS_ATTACH_ATTEMPT ((ULONG)0x00000005L)
194
+
195
+ //
196
+ // MessageId: INVALID_PROCESS_DETACH_ATTEMPT
197
+ //
198
+ // MessageText:
199
+ //
200
+ // INVALID_PROCESS_DETACH_ATTEMPT
201
+ //
202
+ #define INVALID_PROCESS_DETACH_ATTEMPT ((ULONG)0x00000006L)
203
+
204
+ //
205
+ // MessageId: INVALID_SOFTWARE_INTERRUPT
206
+ //
207
+ // MessageText:
208
+ //
209
+ // INVALID_SOFTWARE_INTERRUPT
210
+ //
211
+ #define INVALID_SOFTWARE_INTERRUPT ((ULONG)0x00000007L)
212
+
213
+ //
214
+ // MessageId: IRQL_NOT_DISPATCH_LEVEL
215
+ //
216
+ // MessageText:
217
+ //
218
+ // IRQL_NOT_DISPATCH_LEVEL
219
+ //
220
+ #define IRQL_NOT_DISPATCH_LEVEL ((ULONG)0x00000008L)
221
+
222
+ //
223
+ // MessageId: IRQL_NOT_GREATER_OR_EQUAL
224
+ //
225
+ // MessageText:
226
+ //
227
+ // IRQL_NOT_GREATER_OR_EQUAL
228
+ //
229
+ #define IRQL_NOT_GREATER_OR_EQUAL ((ULONG)0x00000009L)
230
+
231
+ //
232
+ // MessageId: IRQL_NOT_LESS_OR_EQUAL
233
+ //
234
+ // MessageText:
235
+ //
236
+ // IRQL_NOT_LESS_OR_EQUAL
237
+ //
238
+ #define IRQL_NOT_LESS_OR_EQUAL ((ULONG)0x0000000AL)
239
+
240
+ //
241
+ // MessageId: NO_EXCEPTION_HANDLING_SUPPORT
242
+ //
243
+ // MessageText:
244
+ //
245
+ // NO_EXCEPTION_HANDLING_SUPPORT
246
+ //
247
+ #define NO_EXCEPTION_HANDLING_SUPPORT ((ULONG)0x0000000BL)
248
+
249
+ //
250
+ // MessageId: MAXIMUM_WAIT_OBJECTS_EXCEEDED
251
+ //
252
+ // MessageText:
253
+ //
254
+ // MAXIMUM_WAIT_OBJECTS_EXCEEDED
255
+ //
256
+ #define MAXIMUM_WAIT_OBJECTS_EXCEEDED ((ULONG)0x0000000CL)
257
+
258
+ //
259
+ // MessageId: MUTEX_LEVEL_NUMBER_VIOLATION
260
+ //
261
+ // MessageText:
262
+ //
263
+ // MUTEX_LEVEL_NUMBER_VIOLATION
264
+ //
265
+ #define MUTEX_LEVEL_NUMBER_VIOLATION ((ULONG)0x0000000DL)
266
+
267
+ //
268
+ // MessageId: NO_USER_MODE_CONTEXT
269
+ //
270
+ // MessageText:
271
+ //
272
+ // NO_USER_MODE_CONTEXT
273
+ //
274
+ #define NO_USER_MODE_CONTEXT ((ULONG)0x0000000EL)
275
+
276
+ //
277
+ // MessageId: SPIN_LOCK_ALREADY_OWNED
278
+ //
279
+ // MessageText:
280
+ //
281
+ // SPIN_LOCK_ALREADY_OWNED
282
+ //
283
+ #define SPIN_LOCK_ALREADY_OWNED ((ULONG)0x0000000FL)
284
+
285
+ //
286
+ // MessageId: SPIN_LOCK_NOT_OWNED
287
+ //
288
+ // MessageText:
289
+ //
290
+ // SPIN_LOCK_NOT_OWNED
291
+ //
292
+ #define SPIN_LOCK_NOT_OWNED ((ULONG)0x00000010L)
293
+
294
+ //
295
+ // MessageId: THREAD_NOT_MUTEX_OWNER
296
+ //
297
+ // MessageText:
298
+ //
299
+ // THREAD_NOT_MUTEX_OWNER
300
+ //
301
+ #define THREAD_NOT_MUTEX_OWNER ((ULONG)0x00000011L)
302
+
303
+ //
304
+ // MessageId: TRAP_CAUSE_UNKNOWN
305
+ //
306
+ // MessageText:
307
+ //
308
+ // TRAP_CAUSE_UNKNOWN
309
+ //
310
+ #define TRAP_CAUSE_UNKNOWN ((ULONG)0x00000012L)
311
+
312
+ //
313
+ // MessageId: EMPTY_THREAD_REAPER_LIST
314
+ //
315
+ // MessageText:
316
+ //
317
+ // EMPTY_THREAD_REAPER_LIST
318
+ //
319
+ #define EMPTY_THREAD_REAPER_LIST ((ULONG)0x00000013L)
320
+
321
+ //
322
+ // MessageId: CREATE_DELETE_LOCK_NOT_LOCKED
323
+ //
324
+ // MessageText:
325
+ //
326
+ // CREATE_DELETE_LOCK_NOT_LOCKED
327
+ //
328
+ #define CREATE_DELETE_LOCK_NOT_LOCKED ((ULONG)0x00000014L)
329
+
330
+ //
331
+ // MessageId: LAST_CHANCE_CALLED_FROM_KMODE
332
+ //
333
+ // MessageText:
334
+ //
335
+ // LAST_CHANCE_CALLED_FROM_KMODE
336
+ //
337
+ #define LAST_CHANCE_CALLED_FROM_KMODE ((ULONG)0x00000015L)
338
+
339
+ //
340
+ // MessageId: CID_HANDLE_CREATION
341
+ //
342
+ // MessageText:
343
+ //
344
+ // CID_HANDLE_CREATION
345
+ //
346
+ #define CID_HANDLE_CREATION ((ULONG)0x00000016L)
347
+
348
+ //
349
+ // MessageId: CID_HANDLE_DELETION
350
+ //
351
+ // MessageText:
352
+ //
353
+ // CID_HANDLE_DELETION
354
+ //
355
+ #define CID_HANDLE_DELETION ((ULONG)0x00000017L)
356
+
357
+ //
358
+ // MessageId: REFERENCE_BY_POINTER
359
+ //
360
+ // MessageText:
361
+ //
362
+ // REFERENCE_BY_POINTER
363
+ //
364
+ #define REFERENCE_BY_POINTER ((ULONG)0x00000018L)
365
+
366
+ //
367
+ // MessageId: BAD_POOL_HEADER
368
+ //
369
+ // MessageText:
370
+ //
371
+ // BAD_POOL_HEADER
372
+ //
373
+ #define BAD_POOL_HEADER ((ULONG)0x00000019L)
374
+
375
+ //
376
+ // MessageId: MEMORY_MANAGEMENT
377
+ //
378
+ // MessageText:
379
+ //
380
+ // MEMORY_MANAGEMENT
381
+ //
382
+ #define MEMORY_MANAGEMENT ((ULONG)0x0000001AL)
383
+
384
+ //
385
+ // MessageId: PFN_SHARE_COUNT
386
+ //
387
+ // MessageText:
388
+ //
389
+ // PFN_SHARE_COUNT
390
+ //
391
+ #define PFN_SHARE_COUNT ((ULONG)0x0000001BL)
392
+
393
+ //
394
+ // MessageId: PFN_REFERENCE_COUNT
395
+ //
396
+ // MessageText:
397
+ //
398
+ // PFN_REFERENCE_COUNT
399
+ //
400
+ #define PFN_REFERENCE_COUNT ((ULONG)0x0000001CL)
401
+
402
+ //
403
+ // MessageId: NO_SPIN_LOCK_AVAILABLE
404
+ //
405
+ // MessageText:
406
+ //
407
+ // NO_SPIN_LOCK_AVAILABLE
408
+ //
409
+ #define NO_SPIN_LOCK_AVAILABLE ((ULONG)0x0000001DL)
410
+
411
+ //
412
+ // MessageId: KMODE_EXCEPTION_NOT_HANDLED
413
+ //
414
+ // MessageText:
415
+ //
416
+ // KMODE_EXCEPTION_NOT_HANDLED
417
+ //
418
+ #define KMODE_EXCEPTION_NOT_HANDLED ((ULONG)0x0000001EL)
419
+
420
+ //
421
+ // MessageId: SHARED_RESOURCE_CONV_ERROR
422
+ //
423
+ // MessageText:
424
+ //
425
+ // SHARED_RESOURCE_CONV_ERROR
426
+ //
427
+ #define SHARED_RESOURCE_CONV_ERROR ((ULONG)0x0000001FL)
428
+
429
+ //
430
+ // MessageId: KERNEL_APC_PENDING_DURING_EXIT
431
+ //
432
+ // MessageText:
433
+ //
434
+ // KERNEL_APC_PENDING_DURING_EXIT
435
+ //
436
+ #define KERNEL_APC_PENDING_DURING_EXIT ((ULONG)0x00000020L)
437
+
438
+ //
439
+ // MessageId: QUOTA_UNDERFLOW
440
+ //
441
+ // MessageText:
442
+ //
443
+ // QUOTA_UNDERFLOW
444
+ //
445
+ #define QUOTA_UNDERFLOW ((ULONG)0x00000021L)
446
+
447
+ //
448
+ // MessageId: FILE_SYSTEM
449
+ //
450
+ // MessageText:
451
+ //
452
+ // FILE_SYSTEM
453
+ //
454
+ #define FILE_SYSTEM ((ULONG)0x00000022L)
455
+
456
+ //
457
+ // MessageId: FAT_FILE_SYSTEM
458
+ //
459
+ // MessageText:
460
+ //
461
+ // FAT_FILE_SYSTEM
462
+ //
463
+ #define FAT_FILE_SYSTEM ((ULONG)0x00000023L)
464
+
465
+ //
466
+ // MessageId: NTFS_FILE_SYSTEM
467
+ //
468
+ // MessageText:
469
+ //
470
+ // NTFS_FILE_SYSTEM
471
+ //
472
+ #define NTFS_FILE_SYSTEM ((ULONG)0x00000024L)
473
+
474
+ //
475
+ // MessageId: NPFS_FILE_SYSTEM
476
+ //
477
+ // MessageText:
478
+ //
479
+ // NPFS_FILE_SYSTEM
480
+ //
481
+ #define NPFS_FILE_SYSTEM ((ULONG)0x00000025L)
482
+
483
+ //
484
+ // MessageId: CDFS_FILE_SYSTEM
485
+ //
486
+ // MessageText:
487
+ //
488
+ // CDFS_FILE_SYSTEM
489
+ //
490
+ #define CDFS_FILE_SYSTEM ((ULONG)0x00000026L)
491
+
492
+ //
493
+ // MessageId: RDR_FILE_SYSTEM
494
+ //
495
+ // MessageText:
496
+ //
497
+ // RDR_FILE_SYSTEM
498
+ //
499
+ #define RDR_FILE_SYSTEM ((ULONG)0x00000027L)
500
+
501
+ //
502
+ // MessageId: CORRUPT_ACCESS_TOKEN
503
+ //
504
+ // MessageText:
505
+ //
506
+ // CORRUPT_ACCESS_TOKEN
507
+ //
508
+ #define CORRUPT_ACCESS_TOKEN ((ULONG)0x00000028L)
509
+
510
+ //
511
+ // MessageId: SECURITY_SYSTEM
512
+ //
513
+ // MessageText:
514
+ //
515
+ // SECURITY_SYSTEM
516
+ //
517
+ #define SECURITY_SYSTEM ((ULONG)0x00000029L)
518
+
519
+ //
520
+ // MessageId: INCONSISTENT_IRP
521
+ //
522
+ // MessageText:
523
+ //
524
+ // INCONSISTENT_IRP
525
+ //
526
+ #define INCONSISTENT_IRP ((ULONG)0x0000002AL)
527
+
528
+ //
529
+ // MessageId: PANIC_STACK_SWITCH
530
+ //
531
+ // MessageText:
532
+ //
533
+ // PANIC_STACK_SWITCH
534
+ //
535
+ #define PANIC_STACK_SWITCH ((ULONG)0x0000002BL)
536
+
537
+ //
538
+ // MessageId: PORT_DRIVER_INTERNAL
539
+ //
540
+ // MessageText:
541
+ //
542
+ // PORT_DRIVER_INTERNAL
543
+ //
544
+ #define PORT_DRIVER_INTERNAL ((ULONG)0x0000002CL)
545
+
546
+ //
547
+ // MessageId: SCSI_DISK_DRIVER_INTERNAL
548
+ //
549
+ // MessageText:
550
+ //
551
+ // SCSI_DISK_DRIVER_INTERNAL
552
+ //
553
+ #define SCSI_DISK_DRIVER_INTERNAL ((ULONG)0x0000002DL)
554
+
555
+ //
556
+ // MessageId: DATA_BUS_ERROR
557
+ //
558
+ // MessageText:
559
+ //
560
+ // DATA_BUS_ERROR
561
+ //
562
+ #define DATA_BUS_ERROR ((ULONG)0x0000002EL)
563
+
564
+ //
565
+ // MessageId: INSTRUCTION_BUS_ERROR
566
+ //
567
+ // MessageText:
568
+ //
569
+ // INSTRUCTION_BUS_ERROR
570
+ //
571
+ #define INSTRUCTION_BUS_ERROR ((ULONG)0x0000002FL)
572
+
573
+ //
574
+ // MessageId: SET_OF_INVALID_CONTEXT
575
+ //
576
+ // MessageText:
577
+ //
578
+ // SET_OF_INVALID_CONTEXT
579
+ //
580
+ #define SET_OF_INVALID_CONTEXT ((ULONG)0x00000030L)
581
+
582
+ //
583
+ // MessageId: PHASE0_INITIALIZATION_FAILED
584
+ //
585
+ // MessageText:
586
+ //
587
+ // PHASE0_INITIALIZATION_FAILED
588
+ //
589
+ #define PHASE0_INITIALIZATION_FAILED ((ULONG)0x00000031L)
590
+
591
+ //
592
+ // MessageId: PHASE1_INITIALIZATION_FAILED
593
+ //
594
+ // MessageText:
595
+ //
596
+ // PHASE1_INITIALIZATION_FAILED
597
+ //
598
+ #define PHASE1_INITIALIZATION_FAILED ((ULONG)0x00000032L)
599
+
600
+ //
601
+ // MessageId: UNEXPECTED_INITIALIZATION_CALL
602
+ //
603
+ // MessageText:
604
+ //
605
+ // UNEXPECTED_INITIALIZATION_CALL
606
+ //
607
+ #define UNEXPECTED_INITIALIZATION_CALL ((ULONG)0x00000033L)
608
+
609
+ //
610
+ // MessageId: CACHE_MANAGER
611
+ //
612
+ // MessageText:
613
+ //
614
+ // CACHE_MANAGER
615
+ //
616
+ #define CACHE_MANAGER ((ULONG)0x00000034L)
617
+
618
+ //
619
+ // MessageId: NO_MORE_IRP_STACK_LOCATIONS
620
+ //
621
+ // MessageText:
622
+ //
623
+ // NO_MORE_IRP_STACK_LOCATIONS
624
+ //
625
+ #define NO_MORE_IRP_STACK_LOCATIONS ((ULONG)0x00000035L)
626
+
627
+ //
628
+ // MessageId: DEVICE_REFERENCE_COUNT_NOT_ZERO
629
+ //
630
+ // MessageText:
631
+ //
632
+ // DEVICE_REFERENCE_COUNT_NOT_ZERO
633
+ //
634
+ #define DEVICE_REFERENCE_COUNT_NOT_ZERO ((ULONG)0x00000036L)
635
+
636
+ //
637
+ // MessageId: FLOPPY_INTERNAL_ERROR
638
+ //
639
+ // MessageText:
640
+ //
641
+ // FLOPPY_INTERNAL_ERROR
642
+ //
643
+ #define FLOPPY_INTERNAL_ERROR ((ULONG)0x00000037L)
644
+
645
+ //
646
+ // MessageId: SERIAL_DRIVER_INTERNAL
647
+ //
648
+ // MessageText:
649
+ //
650
+ // SERIAL_DRIVER_INTERNAL
651
+ //
652
+ #define SERIAL_DRIVER_INTERNAL ((ULONG)0x00000038L)
653
+
654
+ //
655
+ // MessageId: SYSTEM_EXIT_OWNED_MUTEX
656
+ //
657
+ // MessageText:
658
+ //
659
+ // SYSTEM_EXIT_OWNED_MUTEX
660
+ //
661
+ #define SYSTEM_EXIT_OWNED_MUTEX ((ULONG)0x00000039L)
662
+
663
+ //
664
+ // MessageId: SYSTEM_UNWIND_PREVIOUS_USER
665
+ //
666
+ // MessageText:
667
+ //
668
+ // SYSTEM_UNWIND_PREVIOUS_USER
669
+ //
670
+ #define SYSTEM_UNWIND_PREVIOUS_USER ((ULONG)0x0000003AL)
671
+
672
+ //
673
+ // MessageId: SYSTEM_SERVICE_EXCEPTION
674
+ //
675
+ // MessageText:
676
+ //
677
+ // SYSTEM_SERVICE_EXCEPTION
678
+ //
679
+ #define SYSTEM_SERVICE_EXCEPTION ((ULONG)0x0000003BL)
680
+
681
+ //
682
+ // MessageId: INTERRUPT_UNWIND_ATTEMPTED
683
+ //
684
+ // MessageText:
685
+ //
686
+ // INTERRUPT_UNWIND_ATTEMPTED
687
+ //
688
+ #define INTERRUPT_UNWIND_ATTEMPTED ((ULONG)0x0000003CL)
689
+
690
+ //
691
+ // MessageId: INTERRUPT_EXCEPTION_NOT_HANDLED
692
+ //
693
+ // MessageText:
694
+ //
695
+ // INTERRUPT_EXCEPTION_NOT_HANDLED
696
+ //
697
+ #define INTERRUPT_EXCEPTION_NOT_HANDLED ((ULONG)0x0000003DL)
698
+
699
+ //
700
+ // MessageId: MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED
701
+ //
702
+ // MessageText:
703
+ //
704
+ // MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED
705
+ //
706
+ #define MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED ((ULONG)0x0000003EL)
707
+
708
+ //
709
+ // MessageId: NO_MORE_SYSTEM_PTES
710
+ //
711
+ // MessageText:
712
+ //
713
+ // NO_MORE_SYSTEM_PTES
714
+ //
715
+ #define NO_MORE_SYSTEM_PTES ((ULONG)0x0000003FL)
716
+
717
+ //
718
+ // MessageId: TARGET_MDL_TOO_SMALL
719
+ //
720
+ // MessageText:
721
+ //
722
+ // TARGET_MDL_TOO_SMALL
723
+ //
724
+ #define TARGET_MDL_TOO_SMALL ((ULONG)0x00000040L)
725
+
726
+ //
727
+ // MessageId: MUST_SUCCEED_POOL_EMPTY
728
+ //
729
+ // MessageText:
730
+ //
731
+ // MUST_SUCCEED_POOL_EMPTY
732
+ //
733
+ #define MUST_SUCCEED_POOL_EMPTY ((ULONG)0x00000041L)
734
+
735
+ //
736
+ // MessageId: ATDISK_DRIVER_INTERNAL
737
+ //
738
+ // MessageText:
739
+ //
740
+ // ATDISK_DRIVER_INTERNAL
741
+ //
742
+ #define ATDISK_DRIVER_INTERNAL ((ULONG)0x00000042L)
743
+
744
+ //
745
+ // MessageId: NO_SUCH_PARTITION
746
+ //
747
+ // MessageText:
748
+ //
749
+ // NO_SUCH_PARTITION
750
+ //
751
+ #define NO_SUCH_PARTITION ((ULONG)0x00000043L)
752
+
753
+ //
754
+ // MessageId: MULTIPLE_IRP_COMPLETE_REQUESTS
755
+ //
756
+ // MessageText:
757
+ //
758
+ // MULTIPLE_IRP_COMPLETE_REQUESTS
759
+ //
760
+ #define MULTIPLE_IRP_COMPLETE_REQUESTS ((ULONG)0x00000044L)
761
+
762
+ //
763
+ // MessageId: INSUFFICIENT_SYSTEM_MAP_REGS
764
+ //
765
+ // MessageText:
766
+ //
767
+ // INSUFFICIENT_SYSTEM_MAP_REGS
768
+ //
769
+ #define INSUFFICIENT_SYSTEM_MAP_REGS ((ULONG)0x00000045L)
770
+
771
+ //
772
+ // MessageId: DEREF_UNKNOWN_LOGON_SESSION
773
+ //
774
+ // MessageText:
775
+ //
776
+ // DEREF_UNKNOWN_LOGON_SESSION
777
+ //
778
+ #define DEREF_UNKNOWN_LOGON_SESSION ((ULONG)0x00000046L)
779
+
780
+ //
781
+ // MessageId: REF_UNKNOWN_LOGON_SESSION
782
+ //
783
+ // MessageText:
784
+ //
785
+ // REF_UNKNOWN_LOGON_SESSION
786
+ //
787
+ #define REF_UNKNOWN_LOGON_SESSION ((ULONG)0x00000047L)
788
+
789
+ //
790
+ // MessageId: CANCEL_STATE_IN_COMPLETED_IRP
791
+ //
792
+ // MessageText:
793
+ //
794
+ // CANCEL_STATE_IN_COMPLETED_IRP
795
+ //
796
+ #define CANCEL_STATE_IN_COMPLETED_IRP ((ULONG)0x00000048L)
797
+
798
+ //
799
+ // MessageId: PAGE_FAULT_WITH_INTERRUPTS_OFF
800
+ //
801
+ // MessageText:
802
+ //
803
+ // PAGE_FAULT_WITH_INTERRUPTS_OFF
804
+ //
805
+ #define PAGE_FAULT_WITH_INTERRUPTS_OFF ((ULONG)0x00000049L)
806
+
807
+ //
808
+ // MessageId: IRQL_GT_ZERO_AT_SYSTEM_SERVICE
809
+ //
810
+ // MessageText:
811
+ //
812
+ // IRQL_GT_ZERO_AT_SYSTEM_SERVICE
813
+ //
814
+ #define IRQL_GT_ZERO_AT_SYSTEM_SERVICE ((ULONG)0x0000004AL)
815
+
816
+ //
817
+ // MessageId: STREAMS_INTERNAL_ERROR
818
+ //
819
+ // MessageText:
820
+ //
821
+ // STREAMS_INTERNAL_ERROR
822
+ //
823
+ #define STREAMS_INTERNAL_ERROR ((ULONG)0x0000004BL)
824
+
825
+ //
826
+ // MessageId: FATAL_UNHANDLED_HARD_ERROR
827
+ //
828
+ // MessageText:
829
+ //
830
+ // FATAL_UNHANDLED_HARD_ERROR
831
+ //
832
+ #define FATAL_UNHANDLED_HARD_ERROR ((ULONG)0x0000004CL)
833
+
834
+ //
835
+ // MessageId: NO_PAGES_AVAILABLE
836
+ //
837
+ // MessageText:
838
+ //
839
+ // NO_PAGES_AVAILABLE
840
+ //
841
+ #define NO_PAGES_AVAILABLE ((ULONG)0x0000004DL)
842
+
843
+ //
844
+ // MessageId: PFN_LIST_CORRUPT
845
+ //
846
+ // MessageText:
847
+ //
848
+ // PFN_LIST_CORRUPT
849
+ //
850
+ #define PFN_LIST_CORRUPT ((ULONG)0x0000004EL)
851
+
852
+ //
853
+ // MessageId: NDIS_INTERNAL_ERROR
854
+ //
855
+ // MessageText:
856
+ //
857
+ // NDIS_INTERNAL_ERROR
858
+ //
859
+ #define NDIS_INTERNAL_ERROR ((ULONG)0x0000004FL)
860
+
861
+ //
862
+ // MessageId: PAGE_FAULT_IN_NONPAGED_AREA
863
+ //
864
+ // MessageText:
865
+ //
866
+ // PAGE_FAULT_IN_NONPAGED_AREA
867
+ //
868
+ #define PAGE_FAULT_IN_NONPAGED_AREA ((ULONG)0x00000050L)
869
+
870
+ #define PAGE_FAULT_IN_NONPAGED_AREA_M ((ULONG)0x10000050L)
871
+ //
872
+ // MessageId: REGISTRY_ERROR
873
+ //
874
+ // MessageText:
875
+ //
876
+ // REGISTRY_ERROR
877
+ //
878
+ #define REGISTRY_ERROR ((ULONG)0x00000051L)
879
+
880
+ //
881
+ // MessageId: MAILSLOT_FILE_SYSTEM
882
+ //
883
+ // MessageText:
884
+ //
885
+ // MAILSLOT_FILE_SYSTEM
886
+ //
887
+ #define MAILSLOT_FILE_SYSTEM ((ULONG)0x00000052L)
888
+
889
+ //
890
+ // MessageId: NO_BOOT_DEVICE
891
+ //
892
+ // MessageText:
893
+ //
894
+ // NO_BOOT_DEVICE
895
+ //
896
+ #define NO_BOOT_DEVICE ((ULONG)0x00000053L)
897
+
898
+ //
899
+ // MessageId: LM_SERVER_INTERNAL_ERROR
900
+ //
901
+ // MessageText:
902
+ //
903
+ // LM_SERVER_INTERNAL_ERROR
904
+ //
905
+ #define LM_SERVER_INTERNAL_ERROR ((ULONG)0x00000054L)
906
+
907
+ //
908
+ // MessageId: DATA_COHERENCY_EXCEPTION
909
+ //
910
+ // MessageText:
911
+ //
912
+ // DATA_COHERENCY_EXCEPTION
913
+ //
914
+ #define DATA_COHERENCY_EXCEPTION ((ULONG)0x00000055L)
915
+
916
+ //
917
+ // MessageId: INSTRUCTION_COHERENCY_EXCEPTION
918
+ //
919
+ // MessageText:
920
+ //
921
+ // INSTRUCTION_COHERENCY_EXCEPTION
922
+ //
923
+ #define INSTRUCTION_COHERENCY_EXCEPTION ((ULONG)0x00000056L)
924
+
925
+ //
926
+ // MessageId: XNS_INTERNAL_ERROR
927
+ //
928
+ // MessageText:
929
+ //
930
+ // XNS_INTERNAL_ERROR
931
+ //
932
+ #define XNS_INTERNAL_ERROR ((ULONG)0x00000057L)
933
+
934
+ //
935
+ // MessageId: VOLMGRX_INTERNAL_ERROR
936
+ //
937
+ // MessageText:
938
+ //
939
+ // VOLMGRX_INTERNAL_ERROR
940
+ //
941
+ #define VOLMGRX_INTERNAL_ERROR ((ULONG)0x00000058L)
942
+
943
+ //
944
+ // MessageId: PINBALL_FILE_SYSTEM
945
+ //
946
+ // MessageText:
947
+ //
948
+ // PINBALL_FILE_SYSTEM
949
+ //
950
+ #define PINBALL_FILE_SYSTEM ((ULONG)0x00000059L)
951
+
952
+ //
953
+ // MessageId: CRITICAL_SERVICE_FAILED
954
+ //
955
+ // MessageText:
956
+ //
957
+ // CRITICAL_SERVICE_FAILED
958
+ //
959
+ #define CRITICAL_SERVICE_FAILED ((ULONG)0x0000005AL)
960
+
961
+ //
962
+ // MessageId: SET_ENV_VAR_FAILED
963
+ //
964
+ // MessageText:
965
+ //
966
+ // SET_ENV_VAR_FAILED
967
+ //
968
+ #define SET_ENV_VAR_FAILED ((ULONG)0x0000005BL)
969
+
970
+ //
971
+ // MessageId: HAL_INITIALIZATION_FAILED
972
+ //
973
+ // MessageText:
974
+ //
975
+ // HAL_INITIALIZATION_FAILED
976
+ //
977
+ #define HAL_INITIALIZATION_FAILED ((ULONG)0x0000005CL)
978
+
979
+ //
980
+ // MessageId: UNSUPPORTED_PROCESSOR
981
+ //
982
+ // MessageText:
983
+ //
984
+ // UNSUPPORTED_PROCESSOR
985
+ //
986
+ #define UNSUPPORTED_PROCESSOR ((ULONG)0x0000005DL)
987
+
988
+ //
989
+ // MessageId: OBJECT_INITIALIZATION_FAILED
990
+ //
991
+ // MessageText:
992
+ //
993
+ // OBJECT_INITIALIZATION_FAILED
994
+ //
995
+ #define OBJECT_INITIALIZATION_FAILED ((ULONG)0x0000005EL)
996
+
997
+ //
998
+ // MessageId: SECURITY_INITIALIZATION_FAILED
999
+ //
1000
+ // MessageText:
1001
+ //
1002
+ // SECURITY_INITIALIZATION_FAILED
1003
+ //
1004
+ #define SECURITY_INITIALIZATION_FAILED ((ULONG)0x0000005FL)
1005
+
1006
+ //
1007
+ // MessageId: PROCESS_INITIALIZATION_FAILED
1008
+ //
1009
+ // MessageText:
1010
+ //
1011
+ // PROCESS_INITIALIZATION_FAILED
1012
+ //
1013
+ #define PROCESS_INITIALIZATION_FAILED ((ULONG)0x00000060L)
1014
+
1015
+ //
1016
+ // MessageId: HAL1_INITIALIZATION_FAILED
1017
+ //
1018
+ // MessageText:
1019
+ //
1020
+ // HAL1_INITIALIZATION_FAILED
1021
+ //
1022
+ #define HAL1_INITIALIZATION_FAILED ((ULONG)0x00000061L)
1023
+
1024
+ //
1025
+ // MessageId: OBJECT1_INITIALIZATION_FAILED
1026
+ //
1027
+ // MessageText:
1028
+ //
1029
+ // OBJECT1_INITIALIZATION_FAILED
1030
+ //
1031
+ #define OBJECT1_INITIALIZATION_FAILED ((ULONG)0x00000062L)
1032
+
1033
+ //
1034
+ // MessageId: SECURITY1_INITIALIZATION_FAILED
1035
+ //
1036
+ // MessageText:
1037
+ //
1038
+ // SECURITY1_INITIALIZATION_FAILED
1039
+ //
1040
+ #define SECURITY1_INITIALIZATION_FAILED ((ULONG)0x00000063L)
1041
+
1042
+ //
1043
+ // MessageId: SYMBOLIC_INITIALIZATION_FAILED
1044
+ //
1045
+ // MessageText:
1046
+ //
1047
+ // SYMBOLIC_INITIALIZATION_FAILED
1048
+ //
1049
+ #define SYMBOLIC_INITIALIZATION_FAILED ((ULONG)0x00000064L)
1050
+
1051
+ //
1052
+ // MessageId: MEMORY1_INITIALIZATION_FAILED
1053
+ //
1054
+ // MessageText:
1055
+ //
1056
+ // MEMORY1_INITIALIZATION_FAILED
1057
+ //
1058
+ #define MEMORY1_INITIALIZATION_FAILED ((ULONG)0x00000065L)
1059
+
1060
+ //
1061
+ // MessageId: CACHE_INITIALIZATION_FAILED
1062
+ //
1063
+ // MessageText:
1064
+ //
1065
+ // CACHE_INITIALIZATION_FAILED
1066
+ //
1067
+ #define CACHE_INITIALIZATION_FAILED ((ULONG)0x00000066L)
1068
+
1069
+ //
1070
+ // MessageId: CONFIG_INITIALIZATION_FAILED
1071
+ //
1072
+ // MessageText:
1073
+ //
1074
+ // CONFIG_INITIALIZATION_FAILED
1075
+ //
1076
+ #define CONFIG_INITIALIZATION_FAILED ((ULONG)0x00000067L)
1077
+
1078
+ //
1079
+ // MessageId: FILE_INITIALIZATION_FAILED
1080
+ //
1081
+ // MessageText:
1082
+ //
1083
+ // FILE_INITIALIZATION_FAILED
1084
+ //
1085
+ #define FILE_INITIALIZATION_FAILED ((ULONG)0x00000068L)
1086
+
1087
+ //
1088
+ // MessageId: IO1_INITIALIZATION_FAILED
1089
+ //
1090
+ // MessageText:
1091
+ //
1092
+ // IO1_INITIALIZATION_FAILED
1093
+ //
1094
+ #define IO1_INITIALIZATION_FAILED ((ULONG)0x00000069L)
1095
+
1096
+ //
1097
+ // MessageId: LPC_INITIALIZATION_FAILED
1098
+ //
1099
+ // MessageText:
1100
+ //
1101
+ // LPC_INITIALIZATION_FAILED
1102
+ //
1103
+ #define LPC_INITIALIZATION_FAILED ((ULONG)0x0000006AL)
1104
+
1105
+ //
1106
+ // MessageId: PROCESS1_INITIALIZATION_FAILED
1107
+ //
1108
+ // MessageText:
1109
+ //
1110
+ // PROCESS1_INITIALIZATION_FAILED
1111
+ //
1112
+ #define PROCESS1_INITIALIZATION_FAILED ((ULONG)0x0000006BL)
1113
+
1114
+ //
1115
+ // MessageId: REFMON_INITIALIZATION_FAILED
1116
+ //
1117
+ // MessageText:
1118
+ //
1119
+ // REFMON_INITIALIZATION_FAILED
1120
+ //
1121
+ #define REFMON_INITIALIZATION_FAILED ((ULONG)0x0000006CL)
1122
+
1123
+ //
1124
+ // MessageId: SESSION1_INITIALIZATION_FAILED
1125
+ //
1126
+ // MessageText:
1127
+ //
1128
+ // SESSION1_INITIALIZATION_FAILED
1129
+ //
1130
+ #define SESSION1_INITIALIZATION_FAILED ((ULONG)0x0000006DL)
1131
+
1132
+ //
1133
+ // MessageId: BOOTPROC_INITIALIZATION_FAILED
1134
+ //
1135
+ // MessageText:
1136
+ //
1137
+ // BOOTPROC_INITIALIZATION_FAILED
1138
+ //
1139
+ #define BOOTPROC_INITIALIZATION_FAILED ((ULONG)0x0000006EL)
1140
+
1141
+ //
1142
+ // MessageId: VSL_INITIALIZATION_FAILED
1143
+ //
1144
+ // MessageText:
1145
+ //
1146
+ // VSL_INITIALIZATION_FAILED
1147
+ //
1148
+ #define VSL_INITIALIZATION_FAILED ((ULONG)0x0000006FL)
1149
+
1150
+ //
1151
+ // MessageId: SOFT_RESTART_FATAL_ERROR
1152
+ //
1153
+ // MessageText:
1154
+ //
1155
+ // SOFT_RESTART_FATAL_ERROR
1156
+ //
1157
+ #define SOFT_RESTART_FATAL_ERROR ((ULONG)0x00000070L)
1158
+
1159
+ //
1160
+ // MessageId: ASSIGN_DRIVE_LETTERS_FAILED
1161
+ //
1162
+ // MessageText:
1163
+ //
1164
+ // ASSIGN_DRIVE_LETTERS_FAILED
1165
+ //
1166
+ #define ASSIGN_DRIVE_LETTERS_FAILED ((ULONG)0x00000072L)
1167
+
1168
+ //
1169
+ // MessageId: CONFIG_LIST_FAILED
1170
+ //
1171
+ // MessageText:
1172
+ //
1173
+ // CONFIG_LIST_FAILED
1174
+ //
1175
+ #define CONFIG_LIST_FAILED ((ULONG)0x00000073L)
1176
+
1177
+ //
1178
+ // MessageId: BAD_SYSTEM_CONFIG_INFO
1179
+ //
1180
+ // MessageText:
1181
+ //
1182
+ // BAD_SYSTEM_CONFIG_INFO
1183
+ //
1184
+ #define BAD_SYSTEM_CONFIG_INFO ((ULONG)0x00000074L)
1185
+
1186
+ //
1187
+ // MessageId: CANNOT_WRITE_CONFIGURATION
1188
+ //
1189
+ // MessageText:
1190
+ //
1191
+ // CANNOT_WRITE_CONFIGURATION
1192
+ //
1193
+ #define CANNOT_WRITE_CONFIGURATION ((ULONG)0x00000075L)
1194
+
1195
+ //
1196
+ // MessageId: PROCESS_HAS_LOCKED_PAGES
1197
+ //
1198
+ // MessageText:
1199
+ //
1200
+ // PROCESS_HAS_LOCKED_PAGES
1201
+ //
1202
+ #define PROCESS_HAS_LOCKED_PAGES ((ULONG)0x00000076L)
1203
+
1204
+ //
1205
+ // MessageId: KERNEL_STACK_INPAGE_ERROR
1206
+ //
1207
+ // MessageText:
1208
+ //
1209
+ // KERNEL_STACK_INPAGE_ERROR
1210
+ //
1211
+ #define KERNEL_STACK_INPAGE_ERROR ((ULONG)0x00000077L)
1212
+
1213
+ //
1214
+ // MessageId: PHASE0_EXCEPTION
1215
+ //
1216
+ // MessageText:
1217
+ //
1218
+ // PHASE0_EXCEPTION
1219
+ //
1220
+ #define PHASE0_EXCEPTION ((ULONG)0x00000078L)
1221
+
1222
+ //
1223
+ // MessageId: MISMATCHED_HAL
1224
+ //
1225
+ // MessageText:
1226
+ //
1227
+ // MISMATCHED_HAL
1228
+ //
1229
+ #define MISMATCHED_HAL ((ULONG)0x00000079L)
1230
+
1231
+ //
1232
+ // MessageId: KERNEL_DATA_INPAGE_ERROR
1233
+ //
1234
+ // MessageText:
1235
+ //
1236
+ // KERNEL_DATA_INPAGE_ERROR
1237
+ //
1238
+ #define KERNEL_DATA_INPAGE_ERROR ((ULONG)0x0000007AL)
1239
+
1240
+ //
1241
+ // MessageId: INACCESSIBLE_BOOT_DEVICE
1242
+ //
1243
+ // MessageText:
1244
+ //
1245
+ // INACCESSIBLE_BOOT_DEVICE
1246
+ //
1247
+ #define INACCESSIBLE_BOOT_DEVICE ((ULONG)0x0000007BL)
1248
+
1249
+ //
1250
+ // MessageId: BUGCODE_NDIS_DRIVER
1251
+ //
1252
+ // MessageText:
1253
+ //
1254
+ // BUGCODE_NDIS_DRIVER
1255
+ //
1256
+ #define BUGCODE_NDIS_DRIVER ((ULONG)0x0000007CL)
1257
+
1258
+ //
1259
+ // MessageId: INSTALL_MORE_MEMORY
1260
+ //
1261
+ // MessageText:
1262
+ //
1263
+ // INSTALL_MORE_MEMORY
1264
+ //
1265
+ #define INSTALL_MORE_MEMORY ((ULONG)0x0000007DL)
1266
+
1267
+ //
1268
+ // MessageId: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED
1269
+ //
1270
+ // MessageText:
1271
+ //
1272
+ // SYSTEM_THREAD_EXCEPTION_NOT_HANDLED
1273
+ //
1274
+ #define SYSTEM_THREAD_EXCEPTION_NOT_HANDLED ((ULONG)0x0000007EL)
1275
+
1276
+ #define SYSTEM_THREAD_EXCEPTION_NOT_HANDLED_M ((ULONG)0x1000007EL)
1277
+ //
1278
+ // MessageId: UNEXPECTED_KERNEL_MODE_TRAP
1279
+ //
1280
+ // MessageText:
1281
+ //
1282
+ // UNEXPECTED_KERNEL_MODE_TRAP
1283
+ //
1284
+ #define UNEXPECTED_KERNEL_MODE_TRAP ((ULONG)0x0000007FL)
1285
+
1286
+ #define UNEXPECTED_KERNEL_MODE_TRAP_M ((ULONG)0x1000007FL)
1287
+ //
1288
+ // MessageId: NMI_HARDWARE_FAILURE
1289
+ //
1290
+ // MessageText:
1291
+ //
1292
+ // NMI_HARDWARE_FAILURE
1293
+ //
1294
+ #define NMI_HARDWARE_FAILURE ((ULONG)0x00000080L)
1295
+
1296
+ //
1297
+ // MessageId: SPIN_LOCK_INIT_FAILURE
1298
+ //
1299
+ // MessageText:
1300
+ //
1301
+ // SPIN_LOCK_INIT_FAILURE
1302
+ //
1303
+ #define SPIN_LOCK_INIT_FAILURE ((ULONG)0x00000081L)
1304
+
1305
+ //
1306
+ // MessageId: DFS_FILE_SYSTEM
1307
+ //
1308
+ // MessageText:
1309
+ //
1310
+ // DFS_FILE_SYSTEM
1311
+ //
1312
+ #define DFS_FILE_SYSTEM ((ULONG)0x00000082L)
1313
+
1314
+ //
1315
+ // MessageId: OFS_FILE_SYSTEM
1316
+ //
1317
+ // MessageText:
1318
+ //
1319
+ // OFS_FILE_SYSTEM
1320
+ //
1321
+ #define OFS_FILE_SYSTEM ((ULONG)0x00000083L)
1322
+
1323
+ //
1324
+ // MessageId: RECOM_DRIVER
1325
+ //
1326
+ // MessageText:
1327
+ //
1328
+ // RECOM_DRIVER
1329
+ //
1330
+ #define RECOM_DRIVER ((ULONG)0x00000084L)
1331
+
1332
+ //
1333
+ // MessageId: SETUP_FAILURE
1334
+ //
1335
+ // MessageText:
1336
+ //
1337
+ // SETUP_FAILURE
1338
+ //
1339
+ #define SETUP_FAILURE ((ULONG)0x00000085L)
1340
+
1341
+ //
1342
+ // MessageId: AUDIT_FAILURE
1343
+ //
1344
+ // MessageText:
1345
+ //
1346
+ // AUDIT_FAILURE
1347
+ //
1348
+ #define AUDIT_FAILURE ((ULONG)0x00000086L)
1349
+
1350
+ //
1351
+ // MessageId: MBR_CHECKSUM_MISMATCH
1352
+ //
1353
+ // MessageText:
1354
+ //
1355
+ // MBR_CHECKSUM_MISMATCH
1356
+ //
1357
+ #define MBR_CHECKSUM_MISMATCH ((ULONG)0x0000008BL)
1358
+
1359
+ //
1360
+ // MessageId: KERNEL_MODE_EXCEPTION_NOT_HANDLED
1361
+ //
1362
+ // MessageText:
1363
+ //
1364
+ // KERNEL_MODE_EXCEPTION_NOT_HANDLED
1365
+ //
1366
+ #define KERNEL_MODE_EXCEPTION_NOT_HANDLED ((ULONG)0x0000008EL)
1367
+
1368
+ #define KERNEL_MODE_EXCEPTION_NOT_HANDLED_M ((ULONG)0x1000008EL)
1369
+ //
1370
+ // MessageId: PP0_INITIALIZATION_FAILED
1371
+ //
1372
+ // MessageText:
1373
+ //
1374
+ // PP0_INITIALIZATION_FAILED
1375
+ //
1376
+ #define PP0_INITIALIZATION_FAILED ((ULONG)0x0000008FL)
1377
+
1378
+ //
1379
+ // MessageId: PP1_INITIALIZATION_FAILED
1380
+ //
1381
+ // MessageText:
1382
+ //
1383
+ // PP1_INITIALIZATION_FAILED
1384
+ //
1385
+ #define PP1_INITIALIZATION_FAILED ((ULONG)0x00000090L)
1386
+
1387
+ //
1388
+ // MessageId: WIN32K_INIT_OR_RIT_FAILURE
1389
+ //
1390
+ // MessageText:
1391
+ //
1392
+ // WIN32K_INIT_OR_RIT_FAILURE
1393
+ //
1394
+ #define WIN32K_INIT_OR_RIT_FAILURE ((ULONG)0x00000091L)
1395
+
1396
+ //
1397
+ // MessageId: UP_DRIVER_ON_MP_SYSTEM
1398
+ //
1399
+ // MessageText:
1400
+ //
1401
+ // UP_DRIVER_ON_MP_SYSTEM
1402
+ //
1403
+ #define UP_DRIVER_ON_MP_SYSTEM ((ULONG)0x00000092L)
1404
+
1405
+ //
1406
+ // MessageId: INVALID_KERNEL_HANDLE
1407
+ //
1408
+ // MessageText:
1409
+ //
1410
+ // INVALID_KERNEL_HANDLE
1411
+ //
1412
+ #define INVALID_KERNEL_HANDLE ((ULONG)0x00000093L)
1413
+
1414
+ //
1415
+ // MessageId: KERNEL_STACK_LOCKED_AT_EXIT
1416
+ //
1417
+ // MessageText:
1418
+ //
1419
+ // KERNEL_STACK_LOCKED_AT_EXIT
1420
+ //
1421
+ #define KERNEL_STACK_LOCKED_AT_EXIT ((ULONG)0x00000094L)
1422
+
1423
+ //
1424
+ // MessageId: PNP_INTERNAL_ERROR
1425
+ //
1426
+ // MessageText:
1427
+ //
1428
+ // PNP_INTERNAL_ERROR
1429
+ //
1430
+ #define PNP_INTERNAL_ERROR ((ULONG)0x00000095L)
1431
+
1432
+ //
1433
+ // MessageId: INVALID_WORK_QUEUE_ITEM
1434
+ //
1435
+ // MessageText:
1436
+ //
1437
+ // INVALID_WORK_QUEUE_ITEM
1438
+ //
1439
+ #define INVALID_WORK_QUEUE_ITEM ((ULONG)0x00000096L)
1440
+
1441
+ //
1442
+ // MessageId: BOUND_IMAGE_UNSUPPORTED
1443
+ //
1444
+ // MessageText:
1445
+ //
1446
+ // BOUND_IMAGE_UNSUPPORTED
1447
+ //
1448
+ #define BOUND_IMAGE_UNSUPPORTED ((ULONG)0x00000097L)
1449
+
1450
+ //
1451
+ // MessageId: END_OF_NT_EVALUATION_PERIOD
1452
+ //
1453
+ // MessageText:
1454
+ //
1455
+ // END_OF_NT_EVALUATION_PERIOD
1456
+ //
1457
+ #define END_OF_NT_EVALUATION_PERIOD ((ULONG)0x00000098L)
1458
+
1459
+ //
1460
+ // MessageId: INVALID_REGION_OR_SEGMENT
1461
+ //
1462
+ // MessageText:
1463
+ //
1464
+ // INVALID_REGION_OR_SEGMENT
1465
+ //
1466
+ #define INVALID_REGION_OR_SEGMENT ((ULONG)0x00000099L)
1467
+
1468
+ //
1469
+ // MessageId: SYSTEM_LICENSE_VIOLATION
1470
+ //
1471
+ // MessageText:
1472
+ //
1473
+ // SYSTEM_LICENSE_VIOLATION
1474
+ //
1475
+ #define SYSTEM_LICENSE_VIOLATION ((ULONG)0x0000009AL)
1476
+
1477
+ //
1478
+ // MessageId: UDFS_FILE_SYSTEM
1479
+ //
1480
+ // MessageText:
1481
+ //
1482
+ // UDFS_FILE_SYSTEM
1483
+ //
1484
+ #define UDFS_FILE_SYSTEM ((ULONG)0x0000009BL)
1485
+
1486
+ //
1487
+ // MessageId: MACHINE_CHECK_EXCEPTION
1488
+ //
1489
+ // MessageText:
1490
+ //
1491
+ // MACHINE_CHECK_EXCEPTION
1492
+ //
1493
+ #define MACHINE_CHECK_EXCEPTION ((ULONG)0x0000009CL)
1494
+
1495
+ //
1496
+ // MessageId: USER_MODE_HEALTH_MONITOR
1497
+ //
1498
+ // MessageText:
1499
+ //
1500
+ // USER_MODE_HEALTH_MONITOR
1501
+ //
1502
+ #define USER_MODE_HEALTH_MONITOR ((ULONG)0x0000009EL)
1503
+
1504
+ //
1505
+ // MessageId: DRIVER_POWER_STATE_FAILURE
1506
+ //
1507
+ // MessageText:
1508
+ //
1509
+ // DRIVER_POWER_STATE_FAILURE
1510
+ //
1511
+ #define DRIVER_POWER_STATE_FAILURE ((ULONG)0x0000009FL)
1512
+
1513
+ //
1514
+ // MessageId: INTERNAL_POWER_ERROR
1515
+ //
1516
+ // MessageText:
1517
+ //
1518
+ // INTERNAL_POWER_ERROR
1519
+ //
1520
+ #define INTERNAL_POWER_ERROR ((ULONG)0x000000A0L)
1521
+
1522
+ //
1523
+ // MessageId: PCI_BUS_DRIVER_INTERNAL
1524
+ //
1525
+ // MessageText:
1526
+ //
1527
+ // PCI_BUS_DRIVER_INTERNAL
1528
+ //
1529
+ #define PCI_BUS_DRIVER_INTERNAL ((ULONG)0x000000A1L)
1530
+
1531
+ //
1532
+ // MessageId: MEMORY_IMAGE_CORRUPT
1533
+ //
1534
+ // MessageText:
1535
+ //
1536
+ // MEMORY_IMAGE_CORRUPT
1537
+ //
1538
+ #define MEMORY_IMAGE_CORRUPT ((ULONG)0x000000A2L)
1539
+
1540
+ //
1541
+ // MessageId: ACPI_DRIVER_INTERNAL
1542
+ //
1543
+ // MessageText:
1544
+ //
1545
+ // ACPI_DRIVER_INTERNAL
1546
+ //
1547
+ #define ACPI_DRIVER_INTERNAL ((ULONG)0x000000A3L)
1548
+
1549
+ //
1550
+ // MessageId: CNSS_FILE_SYSTEM_FILTER
1551
+ //
1552
+ // MessageText:
1553
+ //
1554
+ // CNSS_FILE_SYSTEM_FILTER
1555
+ //
1556
+ #define CNSS_FILE_SYSTEM_FILTER ((ULONG)0x000000A4L)
1557
+
1558
+ //
1559
+ // MessageId: ACPI_BIOS_ERROR
1560
+ //
1561
+ // MessageText:
1562
+ //
1563
+ // ACPI_BIOS_ERROR
1564
+ //
1565
+ #define ACPI_BIOS_ERROR ((ULONG)0x000000A5L)
1566
+
1567
+ //
1568
+ // MessageId: FP_EMULATION_ERROR
1569
+ //
1570
+ // MessageText:
1571
+ //
1572
+ // FP_EMULATION_ERROR
1573
+ //
1574
+ #define FP_EMULATION_ERROR ((ULONG)0x000000A6L)
1575
+
1576
+ //
1577
+ // MessageId: BAD_EXHANDLE
1578
+ //
1579
+ // MessageText:
1580
+ //
1581
+ // BAD_EXHANDLE
1582
+ //
1583
+ #define BAD_EXHANDLE ((ULONG)0x000000A7L)
1584
+
1585
+ //
1586
+ // MessageId: BOOTING_IN_SAFEMODE_MINIMAL
1587
+ //
1588
+ // MessageText:
1589
+ //
1590
+ // BOOTING_IN_SAFEMODE_MINIMAL
1591
+ //
1592
+ #define BOOTING_IN_SAFEMODE_MINIMAL ((ULONG)0x000000A8L)
1593
+
1594
+ //
1595
+ // MessageId: BOOTING_IN_SAFEMODE_NETWORK
1596
+ //
1597
+ // MessageText:
1598
+ //
1599
+ // BOOTING_IN_SAFEMODE_NETWORK
1600
+ //
1601
+ #define BOOTING_IN_SAFEMODE_NETWORK ((ULONG)0x000000A9L)
1602
+
1603
+ //
1604
+ // MessageId: BOOTING_IN_SAFEMODE_DSREPAIR
1605
+ //
1606
+ // MessageText:
1607
+ //
1608
+ // BOOTING_IN_SAFEMODE_DSREPAIR
1609
+ //
1610
+ #define BOOTING_IN_SAFEMODE_DSREPAIR ((ULONG)0x000000AAL)
1611
+
1612
+ //
1613
+ // MessageId: SESSION_HAS_VALID_POOL_ON_EXIT
1614
+ //
1615
+ // MessageText:
1616
+ //
1617
+ // SESSION_HAS_VALID_POOL_ON_EXIT
1618
+ //
1619
+ #define SESSION_HAS_VALID_POOL_ON_EXIT ((ULONG)0x000000ABL)
1620
+
1621
+ //
1622
+ // MessageId: HAL_MEMORY_ALLOCATION
1623
+ //
1624
+ // MessageText:
1625
+ //
1626
+ // HAL_MEMORY_ALLOCATION
1627
+ //
1628
+ #define HAL_MEMORY_ALLOCATION ((ULONG)0x000000ACL)
1629
+
1630
+ //
1631
+ // MessageId: VIDEO_DRIVER_DEBUG_REPORT_REQUEST
1632
+ //
1633
+ // MessageText:
1634
+ //
1635
+ // VIDEO_DRIVER_DEBUG_REPORT_REQUEST
1636
+ //
1637
+ #define VIDEO_DRIVER_DEBUG_REPORT_REQUEST ((ULONG)0x400000ADL)
1638
+
1639
+ //
1640
+ // MessageId: BGI_DETECTED_VIOLATION
1641
+ //
1642
+ // MessageText:
1643
+ //
1644
+ // BGI_DETECTED_VIOLATION
1645
+ //
1646
+ #define BGI_DETECTED_VIOLATION ((ULONG)0x000000B1L)
1647
+
1648
+ //
1649
+ // MessageId: VIDEO_DRIVER_INIT_FAILURE
1650
+ //
1651
+ // MessageText:
1652
+ //
1653
+ // VIDEO_DRIVER_INIT_FAILURE
1654
+ //
1655
+ #define VIDEO_DRIVER_INIT_FAILURE ((ULONG)0x000000B4L)
1656
+
1657
+ //
1658
+ // MessageId: BOOTLOG_LOADED
1659
+ //
1660
+ // MessageText:
1661
+ //
1662
+ // BOOTLOG_LOADED
1663
+ //
1664
+ #define BOOTLOG_LOADED ((ULONG)0x000000B5L)
1665
+
1666
+ //
1667
+ // MessageId: BOOTLOG_NOT_LOADED
1668
+ //
1669
+ // MessageText:
1670
+ //
1671
+ // BOOTLOG_NOT_LOADED
1672
+ //
1673
+ #define BOOTLOG_NOT_LOADED ((ULONG)0x000000B6L)
1674
+
1675
+ //
1676
+ // MessageId: BOOTLOG_ENABLED
1677
+ //
1678
+ // MessageText:
1679
+ //
1680
+ // BOOTLOG_ENABLED
1681
+ //
1682
+ #define BOOTLOG_ENABLED ((ULONG)0x000000B7L)
1683
+
1684
+ //
1685
+ // MessageId: ATTEMPTED_SWITCH_FROM_DPC
1686
+ //
1687
+ // MessageText:
1688
+ //
1689
+ // ATTEMPTED_SWITCH_FROM_DPC
1690
+ //
1691
+ #define ATTEMPTED_SWITCH_FROM_DPC ((ULONG)0x000000B8L)
1692
+
1693
+ //
1694
+ // MessageId: CHIPSET_DETECTED_ERROR
1695
+ //
1696
+ // MessageText:
1697
+ //
1698
+ // CHIPSET_DETECTED_ERROR
1699
+ //
1700
+ #define CHIPSET_DETECTED_ERROR ((ULONG)0x000000B9L)
1701
+
1702
+ //
1703
+ // MessageId: SESSION_HAS_VALID_VIEWS_ON_EXIT
1704
+ //
1705
+ // MessageText:
1706
+ //
1707
+ // SESSION_HAS_VALID_VIEWS_ON_EXIT
1708
+ //
1709
+ #define SESSION_HAS_VALID_VIEWS_ON_EXIT ((ULONG)0x000000BAL)
1710
+
1711
+ //
1712
+ // MessageId: NETWORK_BOOT_INITIALIZATION_FAILED
1713
+ //
1714
+ // MessageText:
1715
+ //
1716
+ // NETWORK_BOOT_INITIALIZATION_FAILED
1717
+ //
1718
+ #define NETWORK_BOOT_INITIALIZATION_FAILED ((ULONG)0x000000BBL)
1719
+
1720
+ //
1721
+ // MessageId: NETWORK_BOOT_DUPLICATE_ADDRESS
1722
+ //
1723
+ // MessageText:
1724
+ //
1725
+ // NETWORK_BOOT_DUPLICATE_ADDRESS
1726
+ //
1727
+ #define NETWORK_BOOT_DUPLICATE_ADDRESS ((ULONG)0x000000BCL)
1728
+
1729
+ //
1730
+ // MessageId: INVALID_HIBERNATED_STATE
1731
+ //
1732
+ // MessageText:
1733
+ //
1734
+ // INVALID_HIBERNATED_STATE
1735
+ //
1736
+ #define INVALID_HIBERNATED_STATE ((ULONG)0x000000BDL)
1737
+
1738
+ //
1739
+ // MessageId: ATTEMPTED_WRITE_TO_READONLY_MEMORY
1740
+ //
1741
+ // MessageText:
1742
+ //
1743
+ // ATTEMPTED_WRITE_TO_READONLY_MEMORY
1744
+ //
1745
+ #define ATTEMPTED_WRITE_TO_READONLY_MEMORY ((ULONG)0x000000BEL)
1746
+
1747
+ //
1748
+ // MessageId: MUTEX_ALREADY_OWNED
1749
+ //
1750
+ // MessageText:
1751
+ //
1752
+ // MUTEX_ALREADY_OWNED
1753
+ //
1754
+ #define MUTEX_ALREADY_OWNED ((ULONG)0x000000BFL)
1755
+
1756
+ //
1757
+ // MessageId: PCI_CONFIG_SPACE_ACCESS_FAILURE
1758
+ //
1759
+ // MessageText:
1760
+ //
1761
+ // PCI_CONFIG_SPACE_ACCESS_FAILURE
1762
+ //
1763
+ #define PCI_CONFIG_SPACE_ACCESS_FAILURE ((ULONG)0x000000C0L)
1764
+
1765
+ //
1766
+ // MessageId: SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION
1767
+ //
1768
+ // MessageText:
1769
+ //
1770
+ // SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION
1771
+ //
1772
+ #define SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION ((ULONG)0x000000C1L)
1773
+
1774
+ //
1775
+ // MessageId: BAD_POOL_CALLER
1776
+ //
1777
+ // MessageText:
1778
+ //
1779
+ // BAD_POOL_CALLER
1780
+ //
1781
+ #define BAD_POOL_CALLER ((ULONG)0x000000C2L)
1782
+
1783
+ //
1784
+ // MessageId: SYSTEM_IMAGE_BAD_SIGNATURE
1785
+ //
1786
+ // MessageText:
1787
+ //
1788
+ // SYSTEM_IMAGE_BAD_SIGNATURE
1789
+ //
1790
+ #define SYSTEM_IMAGE_BAD_SIGNATURE ((ULONG)0x000000C3L)
1791
+
1792
+ //
1793
+ // MessageId: DRIVER_VERIFIER_DETECTED_VIOLATION
1794
+ //
1795
+ // MessageText:
1796
+ //
1797
+ // DRIVER_VERIFIER_DETECTED_VIOLATION
1798
+ //
1799
+ #define DRIVER_VERIFIER_DETECTED_VIOLATION ((ULONG)0x000000C4L)
1800
+
1801
+ //
1802
+ // MessageId: DRIVER_CORRUPTED_EXPOOL
1803
+ //
1804
+ // MessageText:
1805
+ //
1806
+ // DRIVER_CORRUPTED_EXPOOL
1807
+ //
1808
+ #define DRIVER_CORRUPTED_EXPOOL ((ULONG)0x000000C5L)
1809
+
1810
+ //
1811
+ // MessageId: DRIVER_CAUGHT_MODIFYING_FREED_POOL
1812
+ //
1813
+ // MessageText:
1814
+ //
1815
+ // DRIVER_CAUGHT_MODIFYING_FREED_POOL
1816
+ //
1817
+ #define DRIVER_CAUGHT_MODIFYING_FREED_POOL ((ULONG)0x000000C6L)
1818
+
1819
+ //
1820
+ // MessageId: TIMER_OR_DPC_INVALID
1821
+ //
1822
+ // MessageText:
1823
+ //
1824
+ // TIMER_OR_DPC_INVALID
1825
+ //
1826
+ #define TIMER_OR_DPC_INVALID ((ULONG)0x000000C7L)
1827
+
1828
+ //
1829
+ // MessageId: IRQL_UNEXPECTED_VALUE
1830
+ //
1831
+ // MessageText:
1832
+ //
1833
+ // IRQL_UNEXPECTED_VALUE
1834
+ //
1835
+ #define IRQL_UNEXPECTED_VALUE ((ULONG)0x000000C8L)
1836
+
1837
+ //
1838
+ // MessageId: DRIVER_VERIFIER_IOMANAGER_VIOLATION
1839
+ //
1840
+ // MessageText:
1841
+ //
1842
+ // DRIVER_VERIFIER_IOMANAGER_VIOLATION
1843
+ //
1844
+ #define DRIVER_VERIFIER_IOMANAGER_VIOLATION ((ULONG)0x000000C9L)
1845
+
1846
+ //
1847
+ // MessageId: PNP_DETECTED_FATAL_ERROR
1848
+ //
1849
+ // MessageText:
1850
+ //
1851
+ // PNP_DETECTED_FATAL_ERROR
1852
+ //
1853
+ #define PNP_DETECTED_FATAL_ERROR ((ULONG)0x000000CAL)
1854
+
1855
+ //
1856
+ // MessageId: DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS
1857
+ //
1858
+ // MessageText:
1859
+ //
1860
+ // DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS
1861
+ //
1862
+ #define DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS ((ULONG)0x000000CBL)
1863
+
1864
+ //
1865
+ // MessageId: PAGE_FAULT_IN_FREED_SPECIAL_POOL
1866
+ //
1867
+ // MessageText:
1868
+ //
1869
+ // PAGE_FAULT_IN_FREED_SPECIAL_POOL
1870
+ //
1871
+ #define PAGE_FAULT_IN_FREED_SPECIAL_POOL ((ULONG)0x000000CCL)
1872
+
1873
+ //
1874
+ // MessageId: PAGE_FAULT_BEYOND_END_OF_ALLOCATION
1875
+ //
1876
+ // MessageText:
1877
+ //
1878
+ // PAGE_FAULT_BEYOND_END_OF_ALLOCATION
1879
+ //
1880
+ #define PAGE_FAULT_BEYOND_END_OF_ALLOCATION ((ULONG)0x000000CDL)
1881
+
1882
+ //
1883
+ // MessageId: DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
1884
+ //
1885
+ // MessageText:
1886
+ //
1887
+ // DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
1888
+ //
1889
+ #define DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS ((ULONG)0x000000CEL)
1890
+
1891
+ //
1892
+ // MessageId: TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE
1893
+ //
1894
+ // MessageText:
1895
+ //
1896
+ // TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE
1897
+ //
1898
+ #define TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE ((ULONG)0x000000CFL)
1899
+
1900
+ //
1901
+ // MessageId: DRIVER_CORRUPTED_MMPOOL
1902
+ //
1903
+ // MessageText:
1904
+ //
1905
+ // DRIVER_CORRUPTED_MMPOOL
1906
+ //
1907
+ #define DRIVER_CORRUPTED_MMPOOL ((ULONG)0x000000D0L)
1908
+
1909
+ //
1910
+ // MessageId: DRIVER_IRQL_NOT_LESS_OR_EQUAL
1911
+ //
1912
+ // MessageText:
1913
+ //
1914
+ // DRIVER_IRQL_NOT_LESS_OR_EQUAL
1915
+ //
1916
+ #define DRIVER_IRQL_NOT_LESS_OR_EQUAL ((ULONG)0x000000D1L)
1917
+
1918
+ //
1919
+ // MessageId: BUGCODE_ID_DRIVER
1920
+ //
1921
+ // MessageText:
1922
+ //
1923
+ // BUGCODE_ID_DRIVER
1924
+ //
1925
+ #define BUGCODE_ID_DRIVER ((ULONG)0x000000D2L)
1926
+
1927
+ //
1928
+ // MessageId: DRIVER_PORTION_MUST_BE_NONPAGED
1929
+ //
1930
+ // MessageText:
1931
+ //
1932
+ // DRIVER_PORTION_MUST_BE_NONPAGED
1933
+ //
1934
+ #define DRIVER_PORTION_MUST_BE_NONPAGED ((ULONG)0x000000D3L)
1935
+
1936
+ //
1937
+ // MessageId: SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD
1938
+ //
1939
+ // MessageText:
1940
+ //
1941
+ // SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD
1942
+ //
1943
+ #define SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD ((ULONG)0x000000D4L)
1944
+
1945
+ //
1946
+ // MessageId: DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL
1947
+ //
1948
+ // MessageText:
1949
+ //
1950
+ // DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL
1951
+ //
1952
+ #define DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL ((ULONG)0x000000D5L)
1953
+
1954
+ //
1955
+ // MessageId: DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION
1956
+ //
1957
+ // MessageText:
1958
+ //
1959
+ // DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION
1960
+ //
1961
+ #define DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION ((ULONG)0x000000D6L)
1962
+
1963
+ #define DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION_M ((ULONG)0x100000D6L)
1964
+ //
1965
+ // MessageId: DRIVER_UNMAPPING_INVALID_VIEW
1966
+ //
1967
+ // MessageText:
1968
+ //
1969
+ // DRIVER_UNMAPPING_INVALID_VIEW
1970
+ //
1971
+ #define DRIVER_UNMAPPING_INVALID_VIEW ((ULONG)0x000000D7L)
1972
+
1973
+ //
1974
+ // MessageId: DRIVER_USED_EXCESSIVE_PTES
1975
+ //
1976
+ // MessageText:
1977
+ //
1978
+ // DRIVER_USED_EXCESSIVE_PTES
1979
+ //
1980
+ #define DRIVER_USED_EXCESSIVE_PTES ((ULONG)0x000000D8L)
1981
+
1982
+ //
1983
+ // MessageId: LOCKED_PAGES_TRACKER_CORRUPTION
1984
+ //
1985
+ // MessageText:
1986
+ //
1987
+ // LOCKED_PAGES_TRACKER_CORRUPTION
1988
+ //
1989
+ #define LOCKED_PAGES_TRACKER_CORRUPTION ((ULONG)0x000000D9L)
1990
+
1991
+ //
1992
+ // MessageId: SYSTEM_PTE_MISUSE
1993
+ //
1994
+ // MessageText:
1995
+ //
1996
+ // SYSTEM_PTE_MISUSE
1997
+ //
1998
+ #define SYSTEM_PTE_MISUSE ((ULONG)0x000000DAL)
1999
+
2000
+ //
2001
+ // MessageId: DRIVER_CORRUPTED_SYSPTES
2002
+ //
2003
+ // MessageText:
2004
+ //
2005
+ // DRIVER_CORRUPTED_SYSPTES
2006
+ //
2007
+ #define DRIVER_CORRUPTED_SYSPTES ((ULONG)0x000000DBL)
2008
+
2009
+ //
2010
+ // MessageId: DRIVER_INVALID_STACK_ACCESS
2011
+ //
2012
+ // MessageText:
2013
+ //
2014
+ // DRIVER_INVALID_STACK_ACCESS
2015
+ //
2016
+ #define DRIVER_INVALID_STACK_ACCESS ((ULONG)0x000000DCL)
2017
+
2018
+ //
2019
+ // MessageId: POOL_CORRUPTION_IN_FILE_AREA
2020
+ //
2021
+ // MessageText:
2022
+ //
2023
+ // POOL_CORRUPTION_IN_FILE_AREA
2024
+ //
2025
+ #define POOL_CORRUPTION_IN_FILE_AREA ((ULONG)0x000000DEL)
2026
+
2027
+ //
2028
+ // MessageId: IMPERSONATING_WORKER_THREAD
2029
+ //
2030
+ // MessageText:
2031
+ //
2032
+ // IMPERSONATING_WORKER_THREAD
2033
+ //
2034
+ #define IMPERSONATING_WORKER_THREAD ((ULONG)0x000000DFL)
2035
+
2036
+ //
2037
+ // MessageId: ACPI_BIOS_FATAL_ERROR
2038
+ //
2039
+ // MessageText:
2040
+ //
2041
+ // ACPI_BIOS_FATAL_ERROR
2042
+ //
2043
+ #define ACPI_BIOS_FATAL_ERROR ((ULONG)0x000000E0L)
2044
+
2045
+ //
2046
+ // MessageId: WORKER_THREAD_RETURNED_AT_BAD_IRQL
2047
+ //
2048
+ // MessageText:
2049
+ //
2050
+ // WORKER_THREAD_RETURNED_AT_BAD_IRQL
2051
+ //
2052
+ #define WORKER_THREAD_RETURNED_AT_BAD_IRQL ((ULONG)0x000000E1L)
2053
+
2054
+ //
2055
+ // MessageId: MANUALLY_INITIATED_CRASH
2056
+ //
2057
+ // MessageText:
2058
+ //
2059
+ // MANUALLY_INITIATED_CRASH
2060
+ //
2061
+ #define MANUALLY_INITIATED_CRASH ((ULONG)0x000000E2L)
2062
+
2063
+ //
2064
+ // MessageId: RESOURCE_NOT_OWNED
2065
+ //
2066
+ // MessageText:
2067
+ //
2068
+ // RESOURCE_NOT_OWNED
2069
+ //
2070
+ #define RESOURCE_NOT_OWNED ((ULONG)0x000000E3L)
2071
+
2072
+ //
2073
+ // MessageId: WORKER_INVALID
2074
+ //
2075
+ // MessageText:
2076
+ //
2077
+ // WORKER_INVALID
2078
+ //
2079
+ #define WORKER_INVALID ((ULONG)0x000000E4L)
2080
+
2081
+ //
2082
+ // MessageId: POWER_FAILURE_SIMULATE
2083
+ //
2084
+ // MessageText:
2085
+ //
2086
+ // POWER_FAILURE_SIMULATE
2087
+ //
2088
+ #define POWER_FAILURE_SIMULATE ((ULONG)0x000000E5L)
2089
+
2090
+ //
2091
+ // MessageId: DRIVER_VERIFIER_DMA_VIOLATION
2092
+ //
2093
+ // MessageText:
2094
+ //
2095
+ // DRIVER_VERIFIER_DMA_VIOLATION
2096
+ //
2097
+ #define DRIVER_VERIFIER_DMA_VIOLATION ((ULONG)0x000000E6L)
2098
+
2099
+ //
2100
+ // MessageId: INVALID_FLOATING_POINT_STATE
2101
+ //
2102
+ // MessageText:
2103
+ //
2104
+ // INVALID_FLOATING_POINT_STATE
2105
+ //
2106
+ #define INVALID_FLOATING_POINT_STATE ((ULONG)0x000000E7L)
2107
+
2108
+ //
2109
+ // MessageId: INVALID_CANCEL_OF_FILE_OPEN
2110
+ //
2111
+ // MessageText:
2112
+ //
2113
+ // INVALID_CANCEL_OF_FILE_OPEN
2114
+ //
2115
+ #define INVALID_CANCEL_OF_FILE_OPEN ((ULONG)0x000000E8L)
2116
+
2117
+ //
2118
+ // MessageId: ACTIVE_EX_WORKER_THREAD_TERMINATION
2119
+ //
2120
+ // MessageText:
2121
+ //
2122
+ // ACTIVE_EX_WORKER_THREAD_TERMINATION
2123
+ //
2124
+ #define ACTIVE_EX_WORKER_THREAD_TERMINATION ((ULONG)0x000000E9L)
2125
+
2126
+ //
2127
+ // MessageId: SAVER_UNSPECIFIED
2128
+ //
2129
+ // MessageText:
2130
+ //
2131
+ // SAVER_UNSPECIFIED
2132
+ //
2133
+ #define SAVER_UNSPECIFIED ((ULONG)0x0000F000L)
2134
+
2135
+ //
2136
+ // MessageId: SAVER_BLANKSCREEN
2137
+ //
2138
+ // MessageText:
2139
+ //
2140
+ // SAVER_BLANKSCREEN
2141
+ //
2142
+ #define SAVER_BLANKSCREEN ((ULONG)0x0000F002L)
2143
+
2144
+ //
2145
+ // MessageId: SAVER_INPUT
2146
+ //
2147
+ // MessageText:
2148
+ //
2149
+ // SAVER_INPUT
2150
+ //
2151
+ #define SAVER_INPUT ((ULONG)0x0000F003L)
2152
+
2153
+ //
2154
+ // MessageId: SAVER_WATCHDOG
2155
+ //
2156
+ // MessageText:
2157
+ //
2158
+ // SAVER_WATCHDOG
2159
+ //
2160
+ #define SAVER_WATCHDOG ((ULONG)0x0000F004L)
2161
+
2162
+ //
2163
+ // MessageId: SAVER_STARTNOTVISIBLE
2164
+ //
2165
+ // MessageText:
2166
+ //
2167
+ // SAVER_STARTNOTVISIBLE
2168
+ //
2169
+ #define SAVER_STARTNOTVISIBLE ((ULONG)0x0000F005L)
2170
+
2171
+ //
2172
+ // MessageId: SAVER_NAVIGATIONMODEL
2173
+ //
2174
+ // MessageText:
2175
+ //
2176
+ // SAVER_NAVIGATIONMODEL
2177
+ //
2178
+ #define SAVER_NAVIGATIONMODEL ((ULONG)0x0000F006L)
2179
+
2180
+ //
2181
+ // MessageId: SAVER_OUTOFMEMORY
2182
+ //
2183
+ // MessageText:
2184
+ //
2185
+ // SAVER_OUTOFMEMORY
2186
+ //
2187
+ #define SAVER_OUTOFMEMORY ((ULONG)0x0000F007L)
2188
+
2189
+ //
2190
+ // MessageId: SAVER_GRAPHICS
2191
+ //
2192
+ // MessageText:
2193
+ //
2194
+ // SAVER_GRAPHICS
2195
+ //
2196
+ #define SAVER_GRAPHICS ((ULONG)0x0000F008L)
2197
+
2198
+ //
2199
+ // MessageId: SAVER_NAVSERVERTIMEOUT
2200
+ //
2201
+ // MessageText:
2202
+ //
2203
+ // SAVER_NAVSERVERTIMEOUT
2204
+ //
2205
+ #define SAVER_NAVSERVERTIMEOUT ((ULONG)0x0000F009L)
2206
+
2207
+ //
2208
+ // MessageId: SAVER_CHROMEPROCESSCRASH
2209
+ //
2210
+ // MessageText:
2211
+ //
2212
+ // SAVER_CHROMEPROCESSCRASH
2213
+ //
2214
+ #define SAVER_CHROMEPROCESSCRASH ((ULONG)0x0000F00AL)
2215
+
2216
+ //
2217
+ // MessageId: SAVER_NOTIFICATIONDISMISSAL
2218
+ //
2219
+ // MessageText:
2220
+ //
2221
+ // SAVER_NOTIFICATIONDISMISSAL
2222
+ //
2223
+ #define SAVER_NOTIFICATIONDISMISSAL ((ULONG)0x0000F00BL)
2224
+
2225
+ //
2226
+ // MessageId: SAVER_SPEECHDISMISSAL
2227
+ //
2228
+ // MessageText:
2229
+ //
2230
+ // SAVER_SPEECHDISMISSAL
2231
+ //
2232
+ #define SAVER_SPEECHDISMISSAL ((ULONG)0x0000F00CL)
2233
+
2234
+ //
2235
+ // MessageId: SAVER_CALLDISMISSAL
2236
+ //
2237
+ // MessageText:
2238
+ //
2239
+ // SAVER_CALLDISMISSAL
2240
+ //
2241
+ #define SAVER_CALLDISMISSAL ((ULONG)0x0000F00DL)
2242
+
2243
+ //
2244
+ // MessageId: SAVER_APPBARDISMISSAL
2245
+ //
2246
+ // MessageText:
2247
+ //
2248
+ // SAVER_APPBARDISMISSAL
2249
+ //
2250
+ #define SAVER_APPBARDISMISSAL ((ULONG)0x0000F00EL)
2251
+
2252
+ //
2253
+ // MessageId: SAVER_RILADAPTATIONCRASH
2254
+ //
2255
+ // MessageText:
2256
+ //
2257
+ // SAVER_RILADAPTATIONCRASH
2258
+ //
2259
+ #define SAVER_RILADAPTATIONCRASH ((ULONG)0x0000F00FL)
2260
+
2261
+ //
2262
+ // MessageId: SAVER_APPLISTUNREACHABLE
2263
+ //
2264
+ // MessageText:
2265
+ //
2266
+ // SAVER_APPLISTUNREACHABLE
2267
+ //
2268
+ #define SAVER_APPLISTUNREACHABLE ((ULONG)0x0000F010L)
2269
+
2270
+ //
2271
+ // MessageId: SAVER_REPORTNOTIFICATIONFAILURE
2272
+ //
2273
+ // MessageText:
2274
+ //
2275
+ // SAVER_REPORTNOTIFICATIONFAILURE
2276
+ //
2277
+ #define SAVER_REPORTNOTIFICATIONFAILURE ((ULONG)0x0000F011L)
2278
+
2279
+ //
2280
+ // MessageId: SAVER_UNEXPECTEDSHUTDOWN
2281
+ //
2282
+ // MessageText:
2283
+ //
2284
+ // SAVER_UNEXPECTEDSHUTDOWN
2285
+ //
2286
+ #define SAVER_UNEXPECTEDSHUTDOWN ((ULONG)0x0000F012L)
2287
+
2288
+ //
2289
+ // MessageId: SAVER_RPCFAILURE
2290
+ //
2291
+ // MessageText:
2292
+ //
2293
+ // SAVER_RPCFAILURE
2294
+ //
2295
+ #define SAVER_RPCFAILURE ((ULONG)0x0000F013L)
2296
+
2297
+ //
2298
+ // MessageId: SAVER_AUXILIARYFULLDUMP
2299
+ //
2300
+ // MessageText:
2301
+ //
2302
+ // SAVER_AUXILIARYFULLDUMP
2303
+ //
2304
+ #define SAVER_AUXILIARYFULLDUMP ((ULONG)0x0000F014L)
2305
+
2306
+ //
2307
+ // MessageId: SAVER_ACCOUNTPROVSVCINITFAILURE
2308
+ //
2309
+ // MessageText:
2310
+ //
2311
+ // SAVER_ACCOUNTPROVSVCINITFAILURE
2312
+ //
2313
+ #define SAVER_ACCOUNTPROVSVCINITFAILURE ((ULONG)0x0000F015L)
2314
+
2315
+ //
2316
+ // MessageId: SAVER_MTBFCOMMANDTIMEOUT
2317
+ //
2318
+ // MessageText:
2319
+ //
2320
+ // SAVER_MTBFCOMMANDTIMEOUT
2321
+ //
2322
+ #define SAVER_MTBFCOMMANDTIMEOUT ((ULONG)0x00000315L)
2323
+
2324
+ //
2325
+ // MessageId: SAVER_MTBFCOMMANDHANG
2326
+ //
2327
+ // MessageText:
2328
+ //
2329
+ // SAVER_MTBFCOMMANDHANG
2330
+ //
2331
+ #define SAVER_MTBFCOMMANDHANG ((ULONG)0x0000F101L)
2332
+
2333
+ //
2334
+ // MessageId: SAVER_MTBFPASSBUGCHECK
2335
+ //
2336
+ // MessageText:
2337
+ //
2338
+ // SAVER_MTBFPASSBUGCHECK
2339
+ //
2340
+ #define SAVER_MTBFPASSBUGCHECK ((ULONG)0x0000F102L)
2341
+
2342
+ //
2343
+ // MessageId: SAVER_MTBFIOERROR
2344
+ //
2345
+ // MessageText:
2346
+ //
2347
+ // SAVER_MTBFIOERROR
2348
+ //
2349
+ #define SAVER_MTBFIOERROR ((ULONG)0x0000F103L)
2350
+
2351
+ //
2352
+ // MessageId: SAVER_RENDERTHREADHANG
2353
+ //
2354
+ // MessageText:
2355
+ //
2356
+ // SAVER_RENDERTHREADHANG
2357
+ //
2358
+ #define SAVER_RENDERTHREADHANG ((ULONG)0x0000F200L)
2359
+
2360
+ //
2361
+ // MessageId: SAVER_RENDERMOBILEUIOOM
2362
+ //
2363
+ // MessageText:
2364
+ //
2365
+ // SAVER_RENDERMOBILEUIOOM
2366
+ //
2367
+ #define SAVER_RENDERMOBILEUIOOM ((ULONG)0x0000F201L)
2368
+
2369
+ //
2370
+ // MessageId: SAVER_DEVICEUPDATEUNSPECIFIED
2371
+ //
2372
+ // MessageText:
2373
+ //
2374
+ // SAVER_DEVICEUPDATEUNSPECIFIED
2375
+ //
2376
+ #define SAVER_DEVICEUPDATEUNSPECIFIED ((ULONG)0x0000F300L)
2377
+
2378
+ //
2379
+ // MessageId: SAVER_AUDIODRIVERHANG
2380
+ //
2381
+ // MessageText:
2382
+ //
2383
+ // SAVER_AUDIODRIVERHANG
2384
+ //
2385
+ #define SAVER_AUDIODRIVERHANG ((ULONG)0x0000F400L)
2386
+
2387
+ //
2388
+ // MessageId: SAVER_BATTERYPULLOUT
2389
+ //
2390
+ // MessageText:
2391
+ //
2392
+ // SAVER_BATTERYPULLOUT
2393
+ //
2394
+ #define SAVER_BATTERYPULLOUT ((ULONG)0x0000F500L)
2395
+
2396
+ //
2397
+ // MessageId: SAVER_MEDIACORETESTHANG
2398
+ //
2399
+ // MessageText:
2400
+ //
2401
+ // SAVER_MEDIACORETESTHANG
2402
+ //
2403
+ #define SAVER_MEDIACORETESTHANG ((ULONG)0x0000F600L)
2404
+
2405
+ //
2406
+ // MessageId: SAVER_RESOURCEMANAGEMENT
2407
+ //
2408
+ // MessageText:
2409
+ //
2410
+ // SAVER_RESOURCEMANAGEMENT
2411
+ //
2412
+ #define SAVER_RESOURCEMANAGEMENT ((ULONG)0x0000F700L)
2413
+
2414
+ //
2415
+ // MessageId: SAVER_CAPTURESERVICE
2416
+ //
2417
+ // MessageText:
2418
+ //
2419
+ // SAVER_CAPTURESERVICE
2420
+ //
2421
+ #define SAVER_CAPTURESERVICE ((ULONG)0x0000F800L)
2422
+
2423
+ //
2424
+ // MessageId: SAVER_WAITFORSHELLREADY
2425
+ //
2426
+ // MessageText:
2427
+ //
2428
+ // SAVER_WAITFORSHELLREADY
2429
+ //
2430
+ #define SAVER_WAITFORSHELLREADY ((ULONG)0x0000F900L)
2431
+
2432
+ //
2433
+ // MessageId: SAVER_NONRESPONSIVEPROCESS
2434
+ //
2435
+ // MessageText:
2436
+ //
2437
+ // SAVER_NONRESPONSIVEPROCESS
2438
+ //
2439
+ #define SAVER_NONRESPONSIVEPROCESS ((ULONG)0x00000194L)
2440
+
2441
+ //
2442
+ // MessageId: SAVER_SICKAPPLICATION
2443
+ //
2444
+ // MessageText:
2445
+ //
2446
+ // SAVER_SICKAPPLICATION
2447
+ //
2448
+ #define SAVER_SICKAPPLICATION ((ULONG)0x00008866L)
2449
+
2450
+ //
2451
+ // MessageId: THREAD_STUCK_IN_DEVICE_DRIVER
2452
+ //
2453
+ // MessageText:
2454
+ //
2455
+ // THREAD_STUCK_IN_DEVICE_DRIVER
2456
+ //
2457
+ #define THREAD_STUCK_IN_DEVICE_DRIVER ((ULONG)0x000000EAL)
2458
+
2459
+ #define THREAD_STUCK_IN_DEVICE_DRIVER_M ((ULONG)0x100000EAL)
2460
+ //
2461
+ // MessageId: DIRTY_MAPPED_PAGES_CONGESTION
2462
+ //
2463
+ // MessageText:
2464
+ //
2465
+ // DIRTY_MAPPED_PAGES_CONGESTION
2466
+ //
2467
+ #define DIRTY_MAPPED_PAGES_CONGESTION ((ULONG)0x000000EBL)
2468
+
2469
+ //
2470
+ // MessageId: SESSION_HAS_VALID_SPECIAL_POOL_ON_EXIT
2471
+ //
2472
+ // MessageText:
2473
+ //
2474
+ // SESSION_HAS_VALID_SPECIAL_POOL_ON_EXIT
2475
+ //
2476
+ #define SESSION_HAS_VALID_SPECIAL_POOL_ON_EXIT ((ULONG)0x000000ECL)
2477
+
2478
+ //
2479
+ // MessageId: UNMOUNTABLE_BOOT_VOLUME
2480
+ //
2481
+ // MessageText:
2482
+ //
2483
+ // UNMOUNTABLE_BOOT_VOLUME
2484
+ //
2485
+ #define UNMOUNTABLE_BOOT_VOLUME ((ULONG)0x000000EDL)
2486
+
2487
+ //
2488
+ // MessageId: CRITICAL_PROCESS_DIED
2489
+ //
2490
+ // MessageText:
2491
+ //
2492
+ // CRITICAL_PROCESS_DIED
2493
+ //
2494
+ #define CRITICAL_PROCESS_DIED ((ULONG)0x000000EFL)
2495
+
2496
+ //
2497
+ // MessageId: STORAGE_MINIPORT_ERROR
2498
+ //
2499
+ // MessageText:
2500
+ //
2501
+ // STORAGE_MINIPORT_ERROR
2502
+ //
2503
+ #define STORAGE_MINIPORT_ERROR ((ULONG)0x000000F0L)
2504
+
2505
+ //
2506
+ // MessageId: SCSI_VERIFIER_DETECTED_VIOLATION
2507
+ //
2508
+ // MessageText:
2509
+ //
2510
+ // SCSI_VERIFIER_DETECTED_VIOLATION
2511
+ //
2512
+ #define SCSI_VERIFIER_DETECTED_VIOLATION ((ULONG)0x000000F1L)
2513
+
2514
+ //
2515
+ // MessageId: HARDWARE_INTERRUPT_STORM
2516
+ //
2517
+ // MessageText:
2518
+ //
2519
+ // HARDWARE_INTERRUPT_STORM
2520
+ //
2521
+ #define HARDWARE_INTERRUPT_STORM ((ULONG)0x000000F2L)
2522
+
2523
+ //
2524
+ // MessageId: DISORDERLY_SHUTDOWN
2525
+ //
2526
+ // MessageText:
2527
+ //
2528
+ // DISORDERLY_SHUTDOWN
2529
+ //
2530
+ #define DISORDERLY_SHUTDOWN ((ULONG)0x000000F3L)
2531
+
2532
+ //
2533
+ // MessageId: CRITICAL_OBJECT_TERMINATION
2534
+ //
2535
+ // MessageText:
2536
+ //
2537
+ // CRITICAL_OBJECT_TERMINATION
2538
+ //
2539
+ #define CRITICAL_OBJECT_TERMINATION ((ULONG)0x000000F4L)
2540
+
2541
+ //
2542
+ // MessageId: FLTMGR_FILE_SYSTEM
2543
+ //
2544
+ // MessageText:
2545
+ //
2546
+ // FLTMGR_FILE_SYSTEM
2547
+ //
2548
+ #define FLTMGR_FILE_SYSTEM ((ULONG)0x000000F5L)
2549
+
2550
+ //
2551
+ // MessageId: PCI_VERIFIER_DETECTED_VIOLATION
2552
+ //
2553
+ // MessageText:
2554
+ //
2555
+ // PCI_VERIFIER_DETECTED_VIOLATION
2556
+ //
2557
+ #define PCI_VERIFIER_DETECTED_VIOLATION ((ULONG)0x000000F6L)
2558
+
2559
+ //
2560
+ // MessageId: DRIVER_OVERRAN_STACK_BUFFER
2561
+ //
2562
+ // MessageText:
2563
+ //
2564
+ // DRIVER_OVERRAN_STACK_BUFFER
2565
+ //
2566
+ #define DRIVER_OVERRAN_STACK_BUFFER ((ULONG)0x000000F7L)
2567
+
2568
+ //
2569
+ // MessageId: RAMDISK_BOOT_INITIALIZATION_FAILED
2570
+ //
2571
+ // MessageText:
2572
+ //
2573
+ // RAMDISK_BOOT_INITIALIZATION_FAILED
2574
+ //
2575
+ #define RAMDISK_BOOT_INITIALIZATION_FAILED ((ULONG)0x000000F8L)
2576
+
2577
+ //
2578
+ // MessageId: DRIVER_RETURNED_STATUS_REPARSE_FOR_VOLUME_OPEN
2579
+ //
2580
+ // MessageText:
2581
+ //
2582
+ // DRIVER_RETURNED_STATUS_REPARSE_FOR_VOLUME_OPEN
2583
+ //
2584
+ #define DRIVER_RETURNED_STATUS_REPARSE_FOR_VOLUME_OPEN ((ULONG)0x000000F9L)
2585
+
2586
+ //
2587
+ // MessageId: HTTP_DRIVER_CORRUPTED
2588
+ //
2589
+ // MessageText:
2590
+ //
2591
+ // HTTP_DRIVER_CORRUPTED
2592
+ //
2593
+ #define HTTP_DRIVER_CORRUPTED ((ULONG)0x000000FAL)
2594
+
2595
+ //
2596
+ // MessageId: RECURSIVE_MACHINE_CHECK
2597
+ //
2598
+ // MessageText:
2599
+ //
2600
+ // RECURSIVE_MACHINE_CHECK
2601
+ //
2602
+ #define RECURSIVE_MACHINE_CHECK ((ULONG)0x000000FBL)
2603
+
2604
+ //
2605
+ // MessageId: ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY
2606
+ //
2607
+ // MessageText:
2608
+ //
2609
+ // ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY
2610
+ //
2611
+ #define ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY ((ULONG)0x000000FCL)
2612
+
2613
+ //
2614
+ // MessageId: DIRTY_NOWRITE_PAGES_CONGESTION
2615
+ //
2616
+ // MessageText:
2617
+ //
2618
+ // DIRTY_NOWRITE_PAGES_CONGESTION
2619
+ //
2620
+ #define DIRTY_NOWRITE_PAGES_CONGESTION ((ULONG)0x000000FDL)
2621
+
2622
+ //
2623
+ // MessageId: BUGCODE_USB_DRIVER
2624
+ //
2625
+ // MessageText:
2626
+ //
2627
+ // BUGCODE_USB_DRIVER
2628
+ //
2629
+ #define BUGCODE_USB_DRIVER ((ULONG)0x000000FEL)
2630
+
2631
+ //
2632
+ // MessageId: BC_BLUETOOTH_VERIFIER_FAULT
2633
+ //
2634
+ // MessageText:
2635
+ //
2636
+ // BC_BLUETOOTH_VERIFIER_FAULT
2637
+ //
2638
+ #define BC_BLUETOOTH_VERIFIER_FAULT ((ULONG)0x00000BFEL)
2639
+
2640
+ //
2641
+ // MessageId: BC_BTHMINI_VERIFIER_FAULT
2642
+ //
2643
+ // MessageText:
2644
+ //
2645
+ // BC_BTHMINI_VERIFIER_FAULT
2646
+ //
2647
+ #define BC_BTHMINI_VERIFIER_FAULT ((ULONG)0x00000BFFL)
2648
+
2649
+ //
2650
+ // MessageId: RESERVE_QUEUE_OVERFLOW
2651
+ //
2652
+ // MessageText:
2653
+ //
2654
+ // RESERVE_QUEUE_OVERFLOW
2655
+ //
2656
+ #define RESERVE_QUEUE_OVERFLOW ((ULONG)0x000000FFL)
2657
+
2658
+ //
2659
+ // MessageId: LOADER_BLOCK_MISMATCH
2660
+ //
2661
+ // MessageText:
2662
+ //
2663
+ // LOADER_BLOCK_MISMATCH
2664
+ //
2665
+ #define LOADER_BLOCK_MISMATCH ((ULONG)0x00000100L)
2666
+
2667
+ //
2668
+ // MessageId: CLOCK_WATCHDOG_TIMEOUT
2669
+ //
2670
+ // MessageText:
2671
+ //
2672
+ // CLOCK_WATCHDOG_TIMEOUT
2673
+ //
2674
+ #define CLOCK_WATCHDOG_TIMEOUT ((ULONG)0x00000101L)
2675
+
2676
+ //
2677
+ // MessageId: DPC_WATCHDOG_TIMEOUT
2678
+ //
2679
+ // MessageText:
2680
+ //
2681
+ // DPC_WATCHDOG_TIMEOUT
2682
+ //
2683
+ #define DPC_WATCHDOG_TIMEOUT ((ULONG)0x00000102L)
2684
+
2685
+ //
2686
+ // MessageId: MUP_FILE_SYSTEM
2687
+ //
2688
+ // MessageText:
2689
+ //
2690
+ // MUP_FILE_SYSTEM
2691
+ //
2692
+ #define MUP_FILE_SYSTEM ((ULONG)0x00000103L)
2693
+
2694
+ //
2695
+ // MessageId: AGP_INVALID_ACCESS
2696
+ //
2697
+ // MessageText:
2698
+ //
2699
+ // AGP_INVALID_ACCESS
2700
+ //
2701
+ #define AGP_INVALID_ACCESS ((ULONG)0x00000104L)
2702
+
2703
+ //
2704
+ // MessageId: AGP_GART_CORRUPTION
2705
+ //
2706
+ // MessageText:
2707
+ //
2708
+ // AGP_GART_CORRUPTION
2709
+ //
2710
+ #define AGP_GART_CORRUPTION ((ULONG)0x00000105L)
2711
+
2712
+ //
2713
+ // MessageId: AGP_ILLEGALLY_REPROGRAMMED
2714
+ //
2715
+ // MessageText:
2716
+ //
2717
+ // AGP_ILLEGALLY_REPROGRAMMED
2718
+ //
2719
+ #define AGP_ILLEGALLY_REPROGRAMMED ((ULONG)0x00000106L)
2720
+
2721
+ //
2722
+ // MessageId: KERNEL_EXPAND_STACK_ACTIVE
2723
+ //
2724
+ // MessageText:
2725
+ //
2726
+ // KERNEL_EXPAND_STACK_ACTIVE
2727
+ //
2728
+ #define KERNEL_EXPAND_STACK_ACTIVE ((ULONG)0x00000107L)
2729
+
2730
+ //
2731
+ // MessageId: THIRD_PARTY_FILE_SYSTEM_FAILURE
2732
+ //
2733
+ // MessageText:
2734
+ //
2735
+ // THIRD_PARTY_FILE_SYSTEM_FAILURE
2736
+ //
2737
+ #define THIRD_PARTY_FILE_SYSTEM_FAILURE ((ULONG)0x00000108L)
2738
+
2739
+ //
2740
+ // MessageId: CRITICAL_STRUCTURE_CORRUPTION
2741
+ //
2742
+ // MessageText:
2743
+ //
2744
+ // CRITICAL_STRUCTURE_CORRUPTION
2745
+ //
2746
+ #define CRITICAL_STRUCTURE_CORRUPTION ((ULONG)0x00000109L)
2747
+
2748
+ //
2749
+ // MessageId: APP_TAGGING_INITIALIZATION_FAILED
2750
+ //
2751
+ // MessageText:
2752
+ //
2753
+ // APP_TAGGING_INITIALIZATION_FAILED
2754
+ //
2755
+ #define APP_TAGGING_INITIALIZATION_FAILED ((ULONG)0x0000010AL)
2756
+
2757
+ //
2758
+ // MessageId: DFSC_FILE_SYSTEM
2759
+ //
2760
+ // MessageText:
2761
+ //
2762
+ // DFSC_FILE_SYSTEM
2763
+ //
2764
+ #define DFSC_FILE_SYSTEM ((ULONG)0x0000010BL)
2765
+
2766
+ //
2767
+ // MessageId: FSRTL_EXTRA_CREATE_PARAMETER_VIOLATION
2768
+ //
2769
+ // MessageText:
2770
+ //
2771
+ // FSRTL_EXTRA_CREATE_PARAMETER_VIOLATION
2772
+ //
2773
+ #define FSRTL_EXTRA_CREATE_PARAMETER_VIOLATION ((ULONG)0x0000010CL)
2774
+
2775
+ //
2776
+ // MessageId: WDF_VIOLATION
2777
+ //
2778
+ // MessageText:
2779
+ //
2780
+ // WDF_VIOLATION
2781
+ //
2782
+ #define WDF_VIOLATION ((ULONG)0x0000010DL)
2783
+
2784
+ //
2785
+ // MessageId: VIDEO_MEMORY_MANAGEMENT_INTERNAL
2786
+ //
2787
+ // MessageText:
2788
+ //
2789
+ // VIDEO_MEMORY_MANAGEMENT_INTERNAL
2790
+ //
2791
+ #define VIDEO_MEMORY_MANAGEMENT_INTERNAL ((ULONG)0x0000010EL)
2792
+
2793
+ //
2794
+ // MessageId: DRIVER_INVALID_CRUNTIME_PARAMETER
2795
+ //
2796
+ // MessageText:
2797
+ //
2798
+ // DRIVER_INVALID_CRUNTIME_PARAMETER
2799
+ //
2800
+ #define DRIVER_INVALID_CRUNTIME_PARAMETER ((ULONG)0x00000110L)
2801
+
2802
+ //
2803
+ // MessageId: RECURSIVE_NMI
2804
+ //
2805
+ // MessageText:
2806
+ //
2807
+ // RECURSIVE_NMI
2808
+ //
2809
+ #define RECURSIVE_NMI ((ULONG)0x00000111L)
2810
+
2811
+ //
2812
+ // MessageId: MSRPC_STATE_VIOLATION
2813
+ //
2814
+ // MessageText:
2815
+ //
2816
+ // MSRPC_STATE_VIOLATION
2817
+ //
2818
+ #define MSRPC_STATE_VIOLATION ((ULONG)0x00000112L)
2819
+
2820
+ //
2821
+ // MessageId: VIDEO_DXGKRNL_FATAL_ERROR
2822
+ //
2823
+ // MessageText:
2824
+ //
2825
+ // VIDEO_DXGKRNL_FATAL_ERROR
2826
+ //
2827
+ #define VIDEO_DXGKRNL_FATAL_ERROR ((ULONG)0x00000113L)
2828
+
2829
+ //
2830
+ // MessageId: VIDEO_SHADOW_DRIVER_FATAL_ERROR
2831
+ //
2832
+ // MessageText:
2833
+ //
2834
+ // VIDEO_SHADOW_DRIVER_FATAL_ERROR
2835
+ //
2836
+ #define VIDEO_SHADOW_DRIVER_FATAL_ERROR ((ULONG)0x00000114L)
2837
+
2838
+ //
2839
+ // MessageId: AGP_INTERNAL
2840
+ //
2841
+ // MessageText:
2842
+ //
2843
+ // AGP_INTERNAL
2844
+ //
2845
+ #define AGP_INTERNAL ((ULONG)0x00000115L)
2846
+
2847
+ //
2848
+ // MessageId: VIDEO_TDR_FAILURE
2849
+ //
2850
+ // MessageText:
2851
+ //
2852
+ // VIDEO_TDR_FAILURE
2853
+ //
2854
+ #define VIDEO_TDR_FAILURE ((ULONG)0x00000116L)
2855
+
2856
+ //
2857
+ // MessageId: VIDEO_TDR_TIMEOUT_DETECTED
2858
+ //
2859
+ // MessageText:
2860
+ //
2861
+ // VIDEO_TDR_TIMEOUT_DETECTED
2862
+ //
2863
+ #define VIDEO_TDR_TIMEOUT_DETECTED ((ULONG)0x00000117L)
2864
+
2865
+ //
2866
+ // MessageId: NTHV_GUEST_ERROR
2867
+ //
2868
+ // MessageText:
2869
+ //
2870
+ // NTHV_GUEST_ERROR
2871
+ //
2872
+ #define NTHV_GUEST_ERROR ((ULONG)0x00000118L)
2873
+
2874
+ //
2875
+ // MessageId: VIDEO_SCHEDULER_INTERNAL_ERROR
2876
+ //
2877
+ // MessageText:
2878
+ //
2879
+ // VIDEO_SCHEDULER_INTERNAL_ERROR
2880
+ //
2881
+ #define VIDEO_SCHEDULER_INTERNAL_ERROR ((ULONG)0x00000119L)
2882
+
2883
+ //
2884
+ // MessageId: EM_INITIALIZATION_ERROR
2885
+ //
2886
+ // MessageText:
2887
+ //
2888
+ // EM_INITIALIZATION_ERROR
2889
+ //
2890
+ #define EM_INITIALIZATION_ERROR ((ULONG)0x0000011AL)
2891
+
2892
+ //
2893
+ // MessageId: DRIVER_RETURNED_HOLDING_CANCEL_LOCK
2894
+ //
2895
+ // MessageText:
2896
+ //
2897
+ // DRIVER_RETURNED_HOLDING_CANCEL_LOCK
2898
+ //
2899
+ #define DRIVER_RETURNED_HOLDING_CANCEL_LOCK ((ULONG)0x0000011BL)
2900
+
2901
+ //
2902
+ // MessageId: ATTEMPTED_WRITE_TO_CM_PROTECTED_STORAGE
2903
+ //
2904
+ // MessageText:
2905
+ //
2906
+ // ATTEMPTED_WRITE_TO_CM_PROTECTED_STORAGE
2907
+ //
2908
+ #define ATTEMPTED_WRITE_TO_CM_PROTECTED_STORAGE ((ULONG)0x0000011CL)
2909
+
2910
+ //
2911
+ // MessageId: EVENT_TRACING_FATAL_ERROR
2912
+ //
2913
+ // MessageText:
2914
+ //
2915
+ // EVENT_TRACING_FATAL_ERROR
2916
+ //
2917
+ #define EVENT_TRACING_FATAL_ERROR ((ULONG)0x0000011DL)
2918
+
2919
+ //
2920
+ // MessageId: TOO_MANY_RECURSIVE_FAULTS
2921
+ //
2922
+ // MessageText:
2923
+ //
2924
+ // TOO_MANY_RECURSIVE_FAULTS
2925
+ //
2926
+ #define TOO_MANY_RECURSIVE_FAULTS ((ULONG)0x0000011EL)
2927
+
2928
+ //
2929
+ // MessageId: INVALID_DRIVER_HANDLE
2930
+ //
2931
+ // MessageText:
2932
+ //
2933
+ // INVALID_DRIVER_HANDLE
2934
+ //
2935
+ #define INVALID_DRIVER_HANDLE ((ULONG)0x0000011FL)
2936
+
2937
+ //
2938
+ // MessageId: BITLOCKER_FATAL_ERROR
2939
+ //
2940
+ // MessageText:
2941
+ //
2942
+ // BITLOCKER_FATAL_ERROR
2943
+ //
2944
+ #define BITLOCKER_FATAL_ERROR ((ULONG)0x00000120L)
2945
+
2946
+ //
2947
+ // MessageId: DRIVER_VIOLATION
2948
+ //
2949
+ // MessageText:
2950
+ //
2951
+ // DRIVER_VIOLATION
2952
+ //
2953
+ #define DRIVER_VIOLATION ((ULONG)0x00000121L)
2954
+
2955
+ //
2956
+ // MessageId: WHEA_INTERNAL_ERROR
2957
+ //
2958
+ // MessageText:
2959
+ //
2960
+ // WHEA_INTERNAL_ERROR
2961
+ //
2962
+ #define WHEA_INTERNAL_ERROR ((ULONG)0x00000122L)
2963
+
2964
+ //
2965
+ // MessageId: CRYPTO_SELF_TEST_FAILURE
2966
+ //
2967
+ // MessageText:
2968
+ //
2969
+ // CRYPTO_SELF_TEST_FAILURE
2970
+ //
2971
+ #define CRYPTO_SELF_TEST_FAILURE ((ULONG)0x00000123L)
2972
+
2973
+ //
2974
+ // MessageId: WHEA_UNCORRECTABLE_ERROR
2975
+ //
2976
+ // MessageText:
2977
+ //
2978
+ // WHEA_UNCORRECTABLE_ERROR
2979
+ //
2980
+ #define WHEA_UNCORRECTABLE_ERROR ((ULONG)0x00000124L)
2981
+
2982
+ //
2983
+ // MessageId: NMR_INVALID_STATE
2984
+ //
2985
+ // MessageText:
2986
+ //
2987
+ // NMR_INVALID_STATE
2988
+ //
2989
+ #define NMR_INVALID_STATE ((ULONG)0x00000125L)
2990
+
2991
+ //
2992
+ // MessageId: NETIO_INVALID_POOL_CALLER
2993
+ //
2994
+ // MessageText:
2995
+ //
2996
+ // NETIO_INVALID_POOL_CALLER
2997
+ //
2998
+ #define NETIO_INVALID_POOL_CALLER ((ULONG)0x00000126L)
2999
+
3000
+ //
3001
+ // MessageId: PAGE_NOT_ZERO
3002
+ //
3003
+ // MessageText:
3004
+ //
3005
+ // PAGE_NOT_ZERO
3006
+ //
3007
+ #define PAGE_NOT_ZERO ((ULONG)0x00000127L)
3008
+
3009
+ //
3010
+ // MessageId: WORKER_THREAD_RETURNED_WITH_BAD_IO_PRIORITY
3011
+ //
3012
+ // MessageText:
3013
+ //
3014
+ // WORKER_THREAD_RETURNED_WITH_BAD_IO_PRIORITY
3015
+ //
3016
+ #define WORKER_THREAD_RETURNED_WITH_BAD_IO_PRIORITY ((ULONG)0x00000128L)
3017
+
3018
+ //
3019
+ // MessageId: WORKER_THREAD_RETURNED_WITH_BAD_PAGING_IO_PRIORITY
3020
+ //
3021
+ // MessageText:
3022
+ //
3023
+ // WORKER_THREAD_RETURNED_WITH_BAD_PAGING_IO_PRIORITY
3024
+ //
3025
+ #define WORKER_THREAD_RETURNED_WITH_BAD_PAGING_IO_PRIORITY ((ULONG)0x00000129L)
3026
+
3027
+ //
3028
+ // MessageId: MUI_NO_VALID_SYSTEM_LANGUAGE
3029
+ //
3030
+ // MessageText:
3031
+ //
3032
+ // MUI_NO_VALID_SYSTEM_LANGUAGE
3033
+ //
3034
+ #define MUI_NO_VALID_SYSTEM_LANGUAGE ((ULONG)0x0000012AL)
3035
+
3036
+ //
3037
+ // MessageId: FAULTY_HARDWARE_CORRUPTED_PAGE
3038
+ //
3039
+ // MessageText:
3040
+ //
3041
+ // FAULTY_HARDWARE_CORRUPTED_PAGE
3042
+ //
3043
+ #define FAULTY_HARDWARE_CORRUPTED_PAGE ((ULONG)0x0000012BL)
3044
+
3045
+ //
3046
+ // MessageId: EXFAT_FILE_SYSTEM
3047
+ //
3048
+ // MessageText:
3049
+ //
3050
+ // EXFAT_FILE_SYSTEM
3051
+ //
3052
+ #define EXFAT_FILE_SYSTEM ((ULONG)0x0000012CL)
3053
+
3054
+ //
3055
+ // MessageId: VOLSNAP_OVERLAPPED_TABLE_ACCESS
3056
+ //
3057
+ // MessageText:
3058
+ //
3059
+ // VOLSNAP_OVERLAPPED_TABLE_ACCESS
3060
+ //
3061
+ #define VOLSNAP_OVERLAPPED_TABLE_ACCESS ((ULONG)0x0000012DL)
3062
+
3063
+ //
3064
+ // MessageId: INVALID_MDL_RANGE
3065
+ //
3066
+ // MessageText:
3067
+ //
3068
+ // INVALID_MDL_RANGE
3069
+ //
3070
+ #define INVALID_MDL_RANGE ((ULONG)0x0000012EL)
3071
+
3072
+ //
3073
+ // MessageId: VHD_BOOT_INITIALIZATION_FAILED
3074
+ //
3075
+ // MessageText:
3076
+ //
3077
+ // VHD_BOOT_INITIALIZATION_FAILED
3078
+ //
3079
+ #define VHD_BOOT_INITIALIZATION_FAILED ((ULONG)0x0000012FL)
3080
+
3081
+ //
3082
+ // MessageId: DYNAMIC_ADD_PROCESSOR_MISMATCH
3083
+ //
3084
+ // MessageText:
3085
+ //
3086
+ // DYNAMIC_ADD_PROCESSOR_MISMATCH
3087
+ //
3088
+ #define DYNAMIC_ADD_PROCESSOR_MISMATCH ((ULONG)0x00000130L)
3089
+
3090
+ //
3091
+ // MessageId: INVALID_EXTENDED_PROCESSOR_STATE
3092
+ //
3093
+ // MessageText:
3094
+ //
3095
+ // INVALID_EXTENDED_PROCESSOR_STATE
3096
+ //
3097
+ #define INVALID_EXTENDED_PROCESSOR_STATE ((ULONG)0x00000131L)
3098
+
3099
+ //
3100
+ // MessageId: RESOURCE_OWNER_POINTER_INVALID
3101
+ //
3102
+ // MessageText:
3103
+ //
3104
+ // RESOURCE_OWNER_POINTER_INVALID
3105
+ //
3106
+ #define RESOURCE_OWNER_POINTER_INVALID ((ULONG)0x00000132L)
3107
+
3108
+ //
3109
+ // MessageId: DPC_WATCHDOG_VIOLATION
3110
+ //
3111
+ // MessageText:
3112
+ //
3113
+ // DPC_WATCHDOG_VIOLATION
3114
+ //
3115
+ #define DPC_WATCHDOG_VIOLATION ((ULONG)0x00000133L)
3116
+
3117
+ //
3118
+ // MessageId: DRIVE_EXTENDER
3119
+ //
3120
+ // MessageText:
3121
+ //
3122
+ // DRIVE_EXTENDER
3123
+ //
3124
+ #define DRIVE_EXTENDER ((ULONG)0x00000134L)
3125
+
3126
+ //
3127
+ // MessageId: REGISTRY_FILTER_DRIVER_EXCEPTION
3128
+ //
3129
+ // MessageText:
3130
+ //
3131
+ // REGISTRY_FILTER_DRIVER_EXCEPTION
3132
+ //
3133
+ #define REGISTRY_FILTER_DRIVER_EXCEPTION ((ULONG)0x00000135L)
3134
+
3135
+ //
3136
+ // MessageId: VHD_BOOT_HOST_VOLUME_NOT_ENOUGH_SPACE
3137
+ //
3138
+ // MessageText:
3139
+ //
3140
+ // VHD_BOOT_HOST_VOLUME_NOT_ENOUGH_SPACE
3141
+ //
3142
+ #define VHD_BOOT_HOST_VOLUME_NOT_ENOUGH_SPACE ((ULONG)0x00000136L)
3143
+
3144
+ //
3145
+ // MessageId: WIN32K_HANDLE_MANAGER
3146
+ //
3147
+ // MessageText:
3148
+ //
3149
+ // WIN32K_HANDLE_MANAGER
3150
+ //
3151
+ #define WIN32K_HANDLE_MANAGER ((ULONG)0x00000137L)
3152
+
3153
+ //
3154
+ // MessageId: GPIO_CONTROLLER_DRIVER_ERROR
3155
+ //
3156
+ // MessageText:
3157
+ //
3158
+ // GPIO_CONTROLLER_DRIVER_ERROR
3159
+ //
3160
+ #define GPIO_CONTROLLER_DRIVER_ERROR ((ULONG)0x00000138L)
3161
+
3162
+ //
3163
+ // MessageId: KERNEL_SECURITY_CHECK_FAILURE
3164
+ //
3165
+ // MessageText:
3166
+ //
3167
+ // KERNEL_SECURITY_CHECK_FAILURE
3168
+ //
3169
+ #define KERNEL_SECURITY_CHECK_FAILURE ((ULONG)0x00000139L)
3170
+
3171
+ //
3172
+ // MessageId: KERNEL_MODE_HEAP_CORRUPTION
3173
+ //
3174
+ // MessageText:
3175
+ //
3176
+ // KERNEL_MODE_HEAP_CORRUPTION
3177
+ //
3178
+ #define KERNEL_MODE_HEAP_CORRUPTION ((ULONG)0x0000013AL)
3179
+
3180
+ //
3181
+ // MessageId: PASSIVE_INTERRUPT_ERROR
3182
+ //
3183
+ // MessageText:
3184
+ //
3185
+ // PASSIVE_INTERRUPT_ERROR
3186
+ //
3187
+ #define PASSIVE_INTERRUPT_ERROR ((ULONG)0x0000013BL)
3188
+
3189
+ //
3190
+ // MessageId: INVALID_IO_BOOST_STATE
3191
+ //
3192
+ // MessageText:
3193
+ //
3194
+ // INVALID_IO_BOOST_STATE
3195
+ //
3196
+ #define INVALID_IO_BOOST_STATE ((ULONG)0x0000013CL)
3197
+
3198
+ //
3199
+ // MessageId: CRITICAL_INITIALIZATION_FAILURE
3200
+ //
3201
+ // MessageText:
3202
+ //
3203
+ // CRITICAL_INITIALIZATION_FAILURE
3204
+ //
3205
+ #define CRITICAL_INITIALIZATION_FAILURE ((ULONG)0x0000013DL)
3206
+
3207
+ //
3208
+ // MessageId: ERRATA_WORKAROUND_UNSUCCESSFUL
3209
+ //
3210
+ // MessageText:
3211
+ //
3212
+ // ERRATA_WORKAROUND_UNSUCCESSFUL
3213
+ //
3214
+ #define ERRATA_WORKAROUND_UNSUCCESSFUL ((ULONG)0x0000013EL)
3215
+
3216
+ //
3217
+ // MessageId: REGISTRY_CALLBACK_DRIVER_EXCEPTION
3218
+ //
3219
+ // MessageText:
3220
+ //
3221
+ // REGISTRY_CALLBACK_DRIVER_EXCEPTION
3222
+ //
3223
+ #define REGISTRY_CALLBACK_DRIVER_EXCEPTION ((ULONG)0x0000013FL)
3224
+
3225
+ //
3226
+ // MessageId: STORAGE_DEVICE_ABNORMALITY_DETECTED
3227
+ //
3228
+ // MessageText:
3229
+ //
3230
+ // STORAGE_DEVICE_ABNORMALITY_DETECTED
3231
+ //
3232
+ #define STORAGE_DEVICE_ABNORMALITY_DETECTED ((ULONG)0x00000140L)
3233
+
3234
+ //
3235
+ // MessageId: VIDEO_ENGINE_TIMEOUT_DETECTED
3236
+ //
3237
+ // MessageText:
3238
+ //
3239
+ // VIDEO_ENGINE_TIMEOUT_DETECTED
3240
+ //
3241
+ #define VIDEO_ENGINE_TIMEOUT_DETECTED ((ULONG)0x00000141L)
3242
+
3243
+ //
3244
+ // MessageId: VIDEO_TDR_APPLICATION_BLOCKED
3245
+ //
3246
+ // MessageText:
3247
+ //
3248
+ // VIDEO_TDR_APPLICATION_BLOCKED
3249
+ //
3250
+ #define VIDEO_TDR_APPLICATION_BLOCKED ((ULONG)0x00000142L)
3251
+
3252
+ //
3253
+ // MessageId: PROCESSOR_DRIVER_INTERNAL
3254
+ //
3255
+ // MessageText:
3256
+ //
3257
+ // PROCESSOR_DRIVER_INTERNAL
3258
+ //
3259
+ #define PROCESSOR_DRIVER_INTERNAL ((ULONG)0x00000143L)
3260
+
3261
+ //
3262
+ // MessageId: BUGCODE_USB3_DRIVER
3263
+ //
3264
+ // MessageText:
3265
+ //
3266
+ // BUGCODE_USB3_DRIVER
3267
+ //
3268
+ #define BUGCODE_USB3_DRIVER ((ULONG)0x00000144L)
3269
+
3270
+ //
3271
+ // MessageId: SECURE_BOOT_VIOLATION
3272
+ //
3273
+ // MessageText:
3274
+ //
3275
+ // SECURE_BOOT_VIOLATION
3276
+ //
3277
+ #define SECURE_BOOT_VIOLATION ((ULONG)0x00000145L)
3278
+
3279
+ //
3280
+ // MessageId: NDIS_NET_BUFFER_LIST_INFO_ILLEGALLY_TRANSFERRED
3281
+ //
3282
+ // MessageText:
3283
+ //
3284
+ // NDIS_NET_BUFFER_LIST_INFO_ILLEGALLY_TRANSFERRED
3285
+ //
3286
+ #define NDIS_NET_BUFFER_LIST_INFO_ILLEGALLY_TRANSFERRED ((ULONG)0x00000146L)
3287
+
3288
+ //
3289
+ // MessageId: ABNORMAL_RESET_DETECTED
3290
+ //
3291
+ // MessageText:
3292
+ //
3293
+ // ABNORMAL_RESET_DETECTED
3294
+ //
3295
+ #define ABNORMAL_RESET_DETECTED ((ULONG)0x00000147L)
3296
+
3297
+ //
3298
+ // MessageId: IO_OBJECT_INVALID
3299
+ //
3300
+ // MessageText:
3301
+ //
3302
+ // IO_OBJECT_INVALID
3303
+ //
3304
+ #define IO_OBJECT_INVALID ((ULONG)0x00000148L)
3305
+
3306
+ //
3307
+ // MessageId: REFS_FILE_SYSTEM
3308
+ //
3309
+ // MessageText:
3310
+ //
3311
+ // REFS_FILE_SYSTEM
3312
+ //
3313
+ #define REFS_FILE_SYSTEM ((ULONG)0x00000149L)
3314
+
3315
+ //
3316
+ // MessageId: KERNEL_WMI_INTERNAL
3317
+ //
3318
+ // MessageText:
3319
+ //
3320
+ // KERNEL_WMI_INTERNAL
3321
+ //
3322
+ #define KERNEL_WMI_INTERNAL ((ULONG)0x0000014AL)
3323
+
3324
+ //
3325
+ // MessageId: SOC_SUBSYSTEM_FAILURE
3326
+ //
3327
+ // MessageText:
3328
+ //
3329
+ // SOC_SUBSYSTEM_FAILURE
3330
+ //
3331
+ #define SOC_SUBSYSTEM_FAILURE ((ULONG)0x0000014BL)
3332
+
3333
+ //
3334
+ // MessageId: FATAL_ABNORMAL_RESET_ERROR
3335
+ //
3336
+ // MessageText:
3337
+ //
3338
+ // FATAL_ABNORMAL_RESET_ERROR
3339
+ //
3340
+ #define FATAL_ABNORMAL_RESET_ERROR ((ULONG)0x0000014CL)
3341
+
3342
+ //
3343
+ // MessageId: EXCEPTION_SCOPE_INVALID
3344
+ //
3345
+ // MessageText:
3346
+ //
3347
+ // EXCEPTION_SCOPE_INVALID
3348
+ //
3349
+ #define EXCEPTION_SCOPE_INVALID ((ULONG)0x0000014DL)
3350
+
3351
+ //
3352
+ // MessageId: SOC_CRITICAL_DEVICE_REMOVED
3353
+ //
3354
+ // MessageText:
3355
+ //
3356
+ // SOC_CRITICAL_DEVICE_REMOVED
3357
+ //
3358
+ #define SOC_CRITICAL_DEVICE_REMOVED ((ULONG)0x0000014EL)
3359
+
3360
+ //
3361
+ // MessageId: PDC_WATCHDOG_TIMEOUT
3362
+ //
3363
+ // MessageText:
3364
+ //
3365
+ // PDC_WATCHDOG_TIMEOUT
3366
+ //
3367
+ #define PDC_WATCHDOG_TIMEOUT ((ULONG)0x0000014FL)
3368
+
3369
+ //
3370
+ // MessageId: TCPIP_AOAC_NIC_ACTIVE_REFERENCE_LEAK
3371
+ //
3372
+ // MessageText:
3373
+ //
3374
+ // TCPIP_AOAC_NIC_ACTIVE_REFERENCE_LEAK
3375
+ //
3376
+ #define TCPIP_AOAC_NIC_ACTIVE_REFERENCE_LEAK ((ULONG)0x00000150L)
3377
+
3378
+ //
3379
+ // MessageId: UNSUPPORTED_INSTRUCTION_MODE
3380
+ //
3381
+ // MessageText:
3382
+ //
3383
+ // UNSUPPORTED_INSTRUCTION_MODE
3384
+ //
3385
+ #define UNSUPPORTED_INSTRUCTION_MODE ((ULONG)0x00000151L)
3386
+
3387
+ //
3388
+ // MessageId: INVALID_PUSH_LOCK_FLAGS
3389
+ //
3390
+ // MessageText:
3391
+ //
3392
+ // INVALID_PUSH_LOCK_FLAGS
3393
+ //
3394
+ #define INVALID_PUSH_LOCK_FLAGS ((ULONG)0x00000152L)
3395
+
3396
+ //
3397
+ // MessageId: KERNEL_LOCK_ENTRY_LEAKED_ON_THREAD_TERMINATION
3398
+ //
3399
+ // MessageText:
3400
+ //
3401
+ // KERNEL_LOCK_ENTRY_LEAKED_ON_THREAD_TERMINATION
3402
+ //
3403
+ #define KERNEL_LOCK_ENTRY_LEAKED_ON_THREAD_TERMINATION ((ULONG)0x00000153L)
3404
+
3405
+ //
3406
+ // MessageId: UNEXPECTED_STORE_EXCEPTION
3407
+ //
3408
+ // MessageText:
3409
+ //
3410
+ // UNEXPECTED_STORE_EXCEPTION
3411
+ //
3412
+ #define UNEXPECTED_STORE_EXCEPTION ((ULONG)0x00000154L)
3413
+
3414
+ //
3415
+ // MessageId: OS_DATA_TAMPERING
3416
+ //
3417
+ // MessageText:
3418
+ //
3419
+ // OS_DATA_TAMPERING
3420
+ //
3421
+ #define OS_DATA_TAMPERING ((ULONG)0x00000155L)
3422
+
3423
+ //
3424
+ // MessageId: WINSOCK_DETECTED_HUNG_CLOSESOCKET_LIVEDUMP
3425
+ //
3426
+ // MessageText:
3427
+ //
3428
+ // WINSOCK_DETECTED_HUNG_CLOSESOCKET_LIVEDUMP
3429
+ //
3430
+ #define WINSOCK_DETECTED_HUNG_CLOSESOCKET_LIVEDUMP ((ULONG)0x00000156L)
3431
+
3432
+ //
3433
+ // MessageId: KERNEL_THREAD_PRIORITY_FLOOR_VIOLATION
3434
+ //
3435
+ // MessageText:
3436
+ //
3437
+ // KERNEL_THREAD_PRIORITY_FLOOR_VIOLATION
3438
+ //
3439
+ #define KERNEL_THREAD_PRIORITY_FLOOR_VIOLATION ((ULONG)0x00000157L)
3440
+
3441
+ //
3442
+ // MessageId: ILLEGAL_IOMMU_PAGE_FAULT
3443
+ //
3444
+ // MessageText:
3445
+ //
3446
+ // ILLEGAL_IOMMU_PAGE_FAULT
3447
+ //
3448
+ #define ILLEGAL_IOMMU_PAGE_FAULT ((ULONG)0x00000158L)
3449
+
3450
+ //
3451
+ // MessageId: HAL_ILLEGAL_IOMMU_PAGE_FAULT
3452
+ //
3453
+ // MessageText:
3454
+ //
3455
+ // HAL_ILLEGAL_IOMMU_PAGE_FAULT
3456
+ //
3457
+ #define HAL_ILLEGAL_IOMMU_PAGE_FAULT ((ULONG)0x00000159L)
3458
+
3459
+ //
3460
+ // MessageId: SDBUS_INTERNAL_ERROR
3461
+ //
3462
+ // MessageText:
3463
+ //
3464
+ // SDBUS_INTERNAL_ERROR
3465
+ //
3466
+ #define SDBUS_INTERNAL_ERROR ((ULONG)0x0000015AL)
3467
+
3468
+ //
3469
+ // MessageId: WORKER_THREAD_RETURNED_WITH_SYSTEM_PAGE_PRIORITY_ACTIVE
3470
+ //
3471
+ // MessageText:
3472
+ //
3473
+ // WORKER_THREAD_RETURNED_WITH_SYSTEM_PAGE_PRIORITY_ACTIVE
3474
+ //
3475
+ #define WORKER_THREAD_RETURNED_WITH_SYSTEM_PAGE_PRIORITY_ACTIVE ((ULONG)0x0000015BL)
3476
+
3477
+ //
3478
+ // MessageId: PDC_WATCHDOG_TIMEOUT_LIVEDUMP
3479
+ //
3480
+ // MessageText:
3481
+ //
3482
+ // PDC_WATCHDOG_TIMEOUT_LIVEDUMP
3483
+ //
3484
+ #define PDC_WATCHDOG_TIMEOUT_LIVEDUMP ((ULONG)0x0000015CL)
3485
+
3486
+ //
3487
+ // MessageId: SOC_SUBSYSTEM_FAILURE_LIVEDUMP
3488
+ //
3489
+ // MessageText:
3490
+ //
3491
+ // SOC_SUBSYSTEM_FAILURE_LIVEDUMP
3492
+ //
3493
+ #define SOC_SUBSYSTEM_FAILURE_LIVEDUMP ((ULONG)0x0000015DL)
3494
+
3495
+ //
3496
+ // MessageId: BUGCODE_NDIS_DRIVER_LIVE_DUMP
3497
+ //
3498
+ // MessageText:
3499
+ //
3500
+ // BUGCODE_NDIS_DRIVER_LIVE_DUMP
3501
+ //
3502
+ #define BUGCODE_NDIS_DRIVER_LIVE_DUMP ((ULONG)0x0000015EL)
3503
+
3504
+ //
3505
+ // MessageId: CONNECTED_STANDBY_WATCHDOG_TIMEOUT_LIVEDUMP
3506
+ //
3507
+ // MessageText:
3508
+ //
3509
+ // CONNECTED_STANDBY_WATCHDOG_TIMEOUT_LIVEDUMP
3510
+ //
3511
+ #define CONNECTED_STANDBY_WATCHDOG_TIMEOUT_LIVEDUMP ((ULONG)0x0000015FL)
3512
+
3513
+ //
3514
+ // MessageId: WIN32K_ATOMIC_CHECK_FAILURE
3515
+ //
3516
+ // MessageText:
3517
+ //
3518
+ // WIN32K_ATOMIC_CHECK_FAILURE
3519
+ //
3520
+ #define WIN32K_ATOMIC_CHECK_FAILURE ((ULONG)0x00000160L)
3521
+
3522
+ //
3523
+ // MessageId: LIVE_SYSTEM_DUMP
3524
+ //
3525
+ // MessageText:
3526
+ //
3527
+ // LIVE_SYSTEM_DUMP
3528
+ //
3529
+ #define LIVE_SYSTEM_DUMP ((ULONG)0x00000161L)
3530
+
3531
+ //
3532
+ // MessageId: KERNEL_AUTO_BOOST_INVALID_LOCK_RELEASE
3533
+ //
3534
+ // MessageText:
3535
+ //
3536
+ // KERNEL_AUTO_BOOST_INVALID_LOCK_RELEASE
3537
+ //
3538
+ #define KERNEL_AUTO_BOOST_INVALID_LOCK_RELEASE ((ULONG)0x00000162L)
3539
+
3540
+ //
3541
+ // MessageId: WORKER_THREAD_TEST_CONDITION
3542
+ //
3543
+ // MessageText:
3544
+ //
3545
+ // WORKER_THREAD_TEST_CONDITION
3546
+ //
3547
+ #define WORKER_THREAD_TEST_CONDITION ((ULONG)0x00000163L)
3548
+
3549
+ //
3550
+ // MessageId: WIN32K_CRITICAL_FAILURE
3551
+ //
3552
+ // MessageText:
3553
+ //
3554
+ // WIN32K_CRITICAL_FAILURE
3555
+ //
3556
+ #define WIN32K_CRITICAL_FAILURE ((ULONG)0x00000164L)
3557
+
3558
+ //
3559
+ // MessageId: CLUSTER_CSV_STATUS_IO_TIMEOUT_LIVEDUMP
3560
+ //
3561
+ // MessageText:
3562
+ //
3563
+ // CLUSTER_CSV_STATUS_IO_TIMEOUT_LIVEDUMP
3564
+ //
3565
+ #define CLUSTER_CSV_STATUS_IO_TIMEOUT_LIVEDUMP ((ULONG)0x00000165L)
3566
+
3567
+ //
3568
+ // MessageId: CLUSTER_RESOURCE_CALL_TIMEOUT_LIVEDUMP
3569
+ //
3570
+ // MessageText:
3571
+ //
3572
+ // CLUSTER_RESOURCE_CALL_TIMEOUT_LIVEDUMP
3573
+ //
3574
+ #define CLUSTER_RESOURCE_CALL_TIMEOUT_LIVEDUMP ((ULONG)0x00000166L)
3575
+
3576
+ //
3577
+ // MessageId: CLUSTER_CSV_SNAPSHOT_DEVICE_INFO_TIMEOUT_LIVEDUMP
3578
+ //
3579
+ // MessageText:
3580
+ //
3581
+ // CLUSTER_CSV_SNAPSHOT_DEVICE_INFO_TIMEOUT_LIVEDUMP
3582
+ //
3583
+ #define CLUSTER_CSV_SNAPSHOT_DEVICE_INFO_TIMEOUT_LIVEDUMP ((ULONG)0x00000167L)
3584
+
3585
+ //
3586
+ // MessageId: CLUSTER_CSV_STATE_TRANSITION_TIMEOUT_LIVEDUMP
3587
+ //
3588
+ // MessageText:
3589
+ //
3590
+ // CLUSTER_CSV_STATE_TRANSITION_TIMEOUT_LIVEDUMP
3591
+ //
3592
+ #define CLUSTER_CSV_STATE_TRANSITION_TIMEOUT_LIVEDUMP ((ULONG)0x00000168L)
3593
+
3594
+ //
3595
+ // MessageId: CLUSTER_CSV_VOLUME_ARRIVAL_LIVEDUMP
3596
+ //
3597
+ // MessageText:
3598
+ //
3599
+ // CLUSTER_CSV_VOLUME_ARRIVAL_LIVEDUMP
3600
+ //
3601
+ #define CLUSTER_CSV_VOLUME_ARRIVAL_LIVEDUMP ((ULONG)0x00000169L)
3602
+
3603
+ //
3604
+ // MessageId: CLUSTER_CSV_VOLUME_REMOVAL_LIVEDUMP
3605
+ //
3606
+ // MessageText:
3607
+ //
3608
+ // CLUSTER_CSV_VOLUME_REMOVAL_LIVEDUMP
3609
+ //
3610
+ #define CLUSTER_CSV_VOLUME_REMOVAL_LIVEDUMP ((ULONG)0x0000016AL)
3611
+
3612
+ //
3613
+ // MessageId: CLUSTER_CSV_CLUSTER_WATCHDOG_LIVEDUMP
3614
+ //
3615
+ // MessageText:
3616
+ //
3617
+ // CLUSTER_CSV_CLUSTER_WATCHDOG_LIVEDUMP
3618
+ //
3619
+ #define CLUSTER_CSV_CLUSTER_WATCHDOG_LIVEDUMP ((ULONG)0x0000016BL)
3620
+
3621
+ //
3622
+ // MessageId: INVALID_RUNDOWN_PROTECTION_FLAGS
3623
+ //
3624
+ // MessageText:
3625
+ //
3626
+ // INVALID_RUNDOWN_PROTECTION_FLAGS
3627
+ //
3628
+ #define INVALID_RUNDOWN_PROTECTION_FLAGS ((ULONG)0x0000016CL)
3629
+
3630
+ //
3631
+ // MessageId: INVALID_SLOT_ALLOCATOR_FLAGS
3632
+ //
3633
+ // MessageText:
3634
+ //
3635
+ // INVALID_SLOT_ALLOCATOR_FLAGS
3636
+ //
3637
+ #define INVALID_SLOT_ALLOCATOR_FLAGS ((ULONG)0x0000016DL)
3638
+
3639
+ //
3640
+ // MessageId: ERESOURCE_INVALID_RELEASE
3641
+ //
3642
+ // MessageText:
3643
+ //
3644
+ // ERESOURCE_INVALID_RELEASE
3645
+ //
3646
+ #define ERESOURCE_INVALID_RELEASE ((ULONG)0x0000016EL)
3647
+
3648
+ //
3649
+ // MessageId: CLUSTER_CSV_STATE_TRANSITION_INTERVAL_TIMEOUT_LIVEDUMP
3650
+ //
3651
+ // MessageText:
3652
+ //
3653
+ // CLUSTER_CSV_STATE_TRANSITION_INTERVAL_TIMEOUT_LIVEDUMP
3654
+ //
3655
+ #define CLUSTER_CSV_STATE_TRANSITION_INTERVAL_TIMEOUT_LIVEDUMP ((ULONG)0x0000016FL)
3656
+
3657
+ //
3658
+ // MessageId: CLUSTER_CSV_CLUSSVC_DISCONNECT_WATCHDOG
3659
+ //
3660
+ // MessageText:
3661
+ //
3662
+ // CLUSTER_CSV_CLUSSVC_DISCONNECT_WATCHDOG
3663
+ //
3664
+ #define CLUSTER_CSV_CLUSSVC_DISCONNECT_WATCHDOG ((ULONG)0x00000170L)
3665
+
3666
+ //
3667
+ // MessageId: CRYPTO_LIBRARY_INTERNAL_ERROR
3668
+ //
3669
+ // MessageText:
3670
+ //
3671
+ // CRYPTO_LIBRARY_INTERNAL_ERROR
3672
+ //
3673
+ #define CRYPTO_LIBRARY_INTERNAL_ERROR ((ULONG)0x00000171L)
3674
+
3675
+ //
3676
+ // MessageId: SECURE_KERNEL_HIBERNATE_ERROR
3677
+ //
3678
+ // MessageText:
3679
+ //
3680
+ // SECURE_KERNEL_HIBERNATE_ERROR
3681
+ //
3682
+ #define SECURE_KERNEL_HIBERNATE_ERROR ((ULONG)0x00000172L)
3683
+
3684
+ //
3685
+ // MessageId: COREMSGCALL_INTERNAL_ERROR
3686
+ //
3687
+ // MessageText:
3688
+ //
3689
+ // COREMSGCALL_INTERNAL_ERROR
3690
+ //
3691
+ #define COREMSGCALL_INTERNAL_ERROR ((ULONG)0x00000173L)
3692
+
3693
+ //
3694
+ // MessageId: COREMSG_INTERNAL_ERROR
3695
+ //
3696
+ // MessageText:
3697
+ //
3698
+ // COREMSG_INTERNAL_ERROR
3699
+ //
3700
+ #define COREMSG_INTERNAL_ERROR ((ULONG)0x00000174L)
3701
+
3702
+ //
3703
+ // MessageId: PREVIOUS_FATAL_ABNORMAL_RESET_ERROR
3704
+ //
3705
+ // MessageText:
3706
+ //
3707
+ // PREVIOUS_FATAL_ABNORMAL_RESET_ERROR
3708
+ //
3709
+ #define PREVIOUS_FATAL_ABNORMAL_RESET_ERROR ((ULONG)0x00000175L)
3710
+
3711
+ //
3712
+ // MessageId: STORAGE_STACK_FATAL_ERROR
3713
+ //
3714
+ // MessageText:
3715
+ //
3716
+ // STORAGE_STACK_FATAL_ERROR
3717
+ //
3718
+ #define STORAGE_STACK_FATAL_ERROR ((ULONG)0x00000176L)
3719
+
3720
+ //
3721
+ // MessageId: ELAM_DRIVER_DETECTED_FATAL_ERROR
3722
+ //
3723
+ // MessageText:
3724
+ //
3725
+ // ELAM_DRIVER_DETECTED_FATAL_ERROR
3726
+ //
3727
+ #define ELAM_DRIVER_DETECTED_FATAL_ERROR ((ULONG)0x00000178L)
3728
+
3729
+ //
3730
+ // MessageId: CLUSTER_CLUSPORT_STATUS_IO_TIMEOUT_LIVEDUMP
3731
+ //
3732
+ // MessageText:
3733
+ //
3734
+ // CLUSTER_CLUSPORT_STATUS_IO_TIMEOUT_LIVEDUMP
3735
+ //
3736
+ #define CLUSTER_CLUSPORT_STATUS_IO_TIMEOUT_LIVEDUMP ((ULONG)0x00000179L)
3737
+
3738
+ //
3739
+ // MessageId: PROFILER_CONFIGURATION_ILLEGAL
3740
+ //
3741
+ // MessageText:
3742
+ //
3743
+ // PROFILER_CONFIGURATION_ILLEGAL
3744
+ //
3745
+ #define PROFILER_CONFIGURATION_ILLEGAL ((ULONG)0x0000017BL)
3746
+
3747
+ //
3748
+ // MessageId: PDC_LOCK_WATCHDOG_LIVEDUMP
3749
+ //
3750
+ // MessageText:
3751
+ //
3752
+ // PDC_LOCK_WATCHDOG_LIVEDUMP
3753
+ //
3754
+ #define PDC_LOCK_WATCHDOG_LIVEDUMP ((ULONG)0x0000017CL)
3755
+
3756
+ //
3757
+ // MessageId: PDC_UNEXPECTED_REVOCATION_LIVEDUMP
3758
+ //
3759
+ // MessageText:
3760
+ //
3761
+ // PDC_UNEXPECTED_REVOCATION_LIVEDUMP
3762
+ //
3763
+ #define PDC_UNEXPECTED_REVOCATION_LIVEDUMP ((ULONG)0x0000017DL)
3764
+
3765
+ //
3766
+ // MessageId: MICROCODE_REVISION_MISMATCH
3767
+ //
3768
+ // MessageText:
3769
+ //
3770
+ // MICROCODE_REVISION_MISMATCH
3771
+ //
3772
+ #define MICROCODE_REVISION_MISMATCH ((ULONG)0x0000017EL)
3773
+
3774
+ //
3775
+ // MessageId: HYPERGUARD_INITIALIZATION_FAILURE
3776
+ //
3777
+ // MessageText:
3778
+ //
3779
+ // HYPERGUARD_INITIALIZATION_FAILURE
3780
+ //
3781
+ #define HYPERGUARD_INITIALIZATION_FAILURE ((ULONG)0x0000017FL)
3782
+
3783
+ //
3784
+ // MessageId: WVR_LIVEDUMP_REPLICATION_IOCONTEXT_TIMEOUT
3785
+ //
3786
+ // MessageText:
3787
+ //
3788
+ // WVR_LIVEDUMP_REPLICATION_IOCONTEXT_TIMEOUT
3789
+ //
3790
+ #define WVR_LIVEDUMP_REPLICATION_IOCONTEXT_TIMEOUT ((ULONG)0x00000180L)
3791
+
3792
+ //
3793
+ // MessageId: WVR_LIVEDUMP_STATE_TRANSITION_TIMEOUT
3794
+ //
3795
+ // MessageText:
3796
+ //
3797
+ // WVR_LIVEDUMP_STATE_TRANSITION_TIMEOUT
3798
+ //
3799
+ #define WVR_LIVEDUMP_STATE_TRANSITION_TIMEOUT ((ULONG)0x00000181L)
3800
+
3801
+ //
3802
+ // MessageId: WVR_LIVEDUMP_RECOVERY_IOCONTEXT_TIMEOUT
3803
+ //
3804
+ // MessageText:
3805
+ //
3806
+ // WVR_LIVEDUMP_RECOVERY_IOCONTEXT_TIMEOUT
3807
+ //
3808
+ #define WVR_LIVEDUMP_RECOVERY_IOCONTEXT_TIMEOUT ((ULONG)0x00000182L)
3809
+
3810
+ //
3811
+ // MessageId: WVR_LIVEDUMP_APP_IO_TIMEOUT
3812
+ //
3813
+ // MessageText:
3814
+ //
3815
+ // WVR_LIVEDUMP_APP_IO_TIMEOUT
3816
+ //
3817
+ #define WVR_LIVEDUMP_APP_IO_TIMEOUT ((ULONG)0x00000183L)
3818
+
3819
+ //
3820
+ // MessageId: WVR_LIVEDUMP_MANUALLY_INITIATED
3821
+ //
3822
+ // MessageText:
3823
+ //
3824
+ // WVR_LIVEDUMP_MANUALLY_INITIATED
3825
+ //
3826
+ #define WVR_LIVEDUMP_MANUALLY_INITIATED ((ULONG)0x00000184L)
3827
+
3828
+ //
3829
+ // MessageId: WVR_LIVEDUMP_STATE_FAILURE
3830
+ //
3831
+ // MessageText:
3832
+ //
3833
+ // WVR_LIVEDUMP_STATE_FAILURE
3834
+ //
3835
+ #define WVR_LIVEDUMP_STATE_FAILURE ((ULONG)0x00000185L)
3836
+
3837
+ //
3838
+ // MessageId: WVR_LIVEDUMP_CRITICAL_ERROR
3839
+ //
3840
+ // MessageText:
3841
+ //
3842
+ // WVR_LIVEDUMP_CRITICAL_ERROR
3843
+ //
3844
+ #define WVR_LIVEDUMP_CRITICAL_ERROR ((ULONG)0x00000186L)
3845
+
3846
+ //
3847
+ // MessageId: VIDEO_DWMINIT_TIMEOUT_FALLBACK_BDD
3848
+ //
3849
+ // MessageText:
3850
+ //
3851
+ // VIDEO_DWMINIT_TIMEOUT_FALLBACK_BDD
3852
+ //
3853
+ #define VIDEO_DWMINIT_TIMEOUT_FALLBACK_BDD ((ULONG)0x00000187L)
3854
+
3855
+ //
3856
+ // MessageId: CLUSTER_CSVFS_LIVEDUMP
3857
+ //
3858
+ // MessageText:
3859
+ //
3860
+ // CLUSTER_CSVFS_LIVEDUMP
3861
+ //
3862
+ #define CLUSTER_CSVFS_LIVEDUMP ((ULONG)0x00000188L)
3863
+
3864
+ //
3865
+ // MessageId: BAD_OBJECT_HEADER
3866
+ //
3867
+ // MessageText:
3868
+ //
3869
+ // BAD_OBJECT_HEADER
3870
+ //
3871
+ #define BAD_OBJECT_HEADER ((ULONG)0x00000189L)
3872
+
3873
+ //
3874
+ // MessageId: SILO_CORRUPT
3875
+ //
3876
+ // MessageText:
3877
+ //
3878
+ // SILO_CORRUPT
3879
+ //
3880
+ #define SILO_CORRUPT ((ULONG)0x0000018AL)
3881
+
3882
+ //
3883
+ // MessageId: SECURE_KERNEL_ERROR
3884
+ //
3885
+ // MessageText:
3886
+ //
3887
+ // SECURE_KERNEL_ERROR
3888
+ //
3889
+ #define SECURE_KERNEL_ERROR ((ULONG)0x0000018BL)
3890
+
3891
+ //
3892
+ // MessageId: HYPERGUARD_VIOLATION
3893
+ //
3894
+ // MessageText:
3895
+ //
3896
+ // HYPERGUARD_VIOLATION
3897
+ //
3898
+ #define HYPERGUARD_VIOLATION ((ULONG)0x0000018CL)
3899
+
3900
+ //
3901
+ // MessageId: SECURE_FAULT_UNHANDLED
3902
+ //
3903
+ // MessageText:
3904
+ //
3905
+ // SECURE_FAULT_UNHANDLED
3906
+ //
3907
+ #define SECURE_FAULT_UNHANDLED ((ULONG)0x0000018DL)
3908
+
3909
+ //
3910
+ // MessageId: KERNEL_PARTITION_REFERENCE_VIOLATION
3911
+ //
3912
+ // MessageText:
3913
+ //
3914
+ // KERNEL_PARTITION_REFERENCE_VIOLATION
3915
+ //
3916
+ #define KERNEL_PARTITION_REFERENCE_VIOLATION ((ULONG)0x0000018EL)
3917
+
3918
+ //
3919
+ // MessageId: SYNTHETIC_EXCEPTION_UNHANDLED
3920
+ //
3921
+ // MessageText:
3922
+ //
3923
+ // SYNTHETIC_EXCEPTION_UNHANDLED
3924
+ //
3925
+ #define SYNTHETIC_EXCEPTION_UNHANDLED ((ULONG)0x0000018FL)
3926
+
3927
+ //
3928
+ // MessageId: WIN32K_CRITICAL_FAILURE_LIVEDUMP
3929
+ //
3930
+ // MessageText:
3931
+ //
3932
+ // WIN32K_CRITICAL_FAILURE_LIVEDUMP
3933
+ //
3934
+ #define WIN32K_CRITICAL_FAILURE_LIVEDUMP ((ULONG)0x00000190L)
3935
+
3936
+ //
3937
+ // MessageId: PF_DETECTED_CORRUPTION
3938
+ //
3939
+ // MessageText:
3940
+ //
3941
+ // PF_DETECTED_CORRUPTION
3942
+ //
3943
+ #define PF_DETECTED_CORRUPTION ((ULONG)0x00000191L)
3944
+
3945
+ //
3946
+ // MessageId: KERNEL_AUTO_BOOST_LOCK_ACQUISITION_WITH_RAISED_IRQL
3947
+ //
3948
+ // MessageText:
3949
+ //
3950
+ // KERNEL_AUTO_BOOST_LOCK_ACQUISITION_WITH_RAISED_IRQL
3951
+ //
3952
+ #define KERNEL_AUTO_BOOST_LOCK_ACQUISITION_WITH_RAISED_IRQL ((ULONG)0x00000192L)
3953
+
3954
+ //
3955
+ // MessageId: VIDEO_DXGKRNL_LIVEDUMP
3956
+ //
3957
+ // MessageText:
3958
+ //
3959
+ // VIDEO_DXGKRNL_LIVEDUMP
3960
+ //
3961
+ #define VIDEO_DXGKRNL_LIVEDUMP ((ULONG)0x00000193L)
3962
+
3963
+ //
3964
+ // MessageId: KERNEL_STORAGE_SLOT_IN_USE
3965
+ //
3966
+ // MessageText:
3967
+ //
3968
+ // KERNEL_STORAGE_SLOT_IN_USE
3969
+ //
3970
+ #define KERNEL_STORAGE_SLOT_IN_USE ((ULONG)0x00000199L)
3971
+
3972
+ //
3973
+ // MessageId: SMB_SERVER_LIVEDUMP
3974
+ //
3975
+ // MessageText:
3976
+ //
3977
+ // SMB_SERVER_LIVEDUMP
3978
+ //
3979
+ #define SMB_SERVER_LIVEDUMP ((ULONG)0x00000195L)
3980
+
3981
+ //
3982
+ // MessageId: LOADER_ROLLBACK_DETECTED
3983
+ //
3984
+ // MessageText:
3985
+ //
3986
+ // LOADER_ROLLBACK_DETECTED
3987
+ //
3988
+ #define LOADER_ROLLBACK_DETECTED ((ULONG)0x00000196L)
3989
+
3990
+ //
3991
+ // MessageId: WIN32K_SECURITY_FAILURE
3992
+ //
3993
+ // MessageText:
3994
+ //
3995
+ // WIN32K_SECURITY_FAILURE
3996
+ //
3997
+ #define WIN32K_SECURITY_FAILURE ((ULONG)0x00000197L)
3998
+
3999
+ //
4000
+ // MessageId: UFX_LIVEDUMP
4001
+ //
4002
+ // MessageText:
4003
+ //
4004
+ // UFX_LIVEDUMP
4005
+ //
4006
+ #define UFX_LIVEDUMP ((ULONG)0x00000198L)
4007
+
4008
+ //
4009
+ // MessageId: WORKER_THREAD_RETURNED_WHILE_ATTACHED_TO_SILO
4010
+ //
4011
+ // MessageText:
4012
+ //
4013
+ // WORKER_THREAD_RETURNED_WHILE_ATTACHED_TO_SILO
4014
+ //
4015
+ #define WORKER_THREAD_RETURNED_WHILE_ATTACHED_TO_SILO ((ULONG)0x0000019AL)
4016
+
4017
+ //
4018
+ // MessageId: TTM_FATAL_ERROR
4019
+ //
4020
+ // MessageText:
4021
+ //
4022
+ // TTM_FATAL_ERROR
4023
+ //
4024
+ #define TTM_FATAL_ERROR ((ULONG)0x0000019BL)
4025
+
4026
+ //
4027
+ // MessageId: WIN32K_POWER_WATCHDOG_TIMEOUT
4028
+ //
4029
+ // MessageText:
4030
+ //
4031
+ // WIN32K_POWER_WATCHDOG_TIMEOUT
4032
+ //
4033
+ #define WIN32K_POWER_WATCHDOG_TIMEOUT ((ULONG)0x0000019CL)
4034
+
4035
+ //
4036
+ // MessageId: CLUSTER_SVHDX_LIVEDUMP
4037
+ //
4038
+ // MessageText:
4039
+ //
4040
+ // CLUSTER_SVHDX_LIVEDUMP
4041
+ //
4042
+ #define CLUSTER_SVHDX_LIVEDUMP ((ULONG)0x0000019DL)
4043
+
4044
+ //
4045
+ // MessageId: BUGCODE_NETADAPTER_DRIVER
4046
+ //
4047
+ // MessageText:
4048
+ //
4049
+ // BUGCODE_NETADAPTER_DRIVER
4050
+ //
4051
+ #define BUGCODE_NETADAPTER_DRIVER ((ULONG)0x0000019EL)
4052
+
4053
+ //
4054
+ // MessageId: PDC_PRIVILEGE_CHECK_LIVEDUMP
4055
+ //
4056
+ // MessageText:
4057
+ //
4058
+ // PDC_PRIVILEGE_CHECK_LIVEDUMP
4059
+ //
4060
+ #define PDC_PRIVILEGE_CHECK_LIVEDUMP ((ULONG)0x0000019FL)
4061
+
4062
+ //
4063
+ // MessageId: TTM_WATCHDOG_TIMEOUT
4064
+ //
4065
+ // MessageText:
4066
+ //
4067
+ // TTM_WATCHDOG_TIMEOUT
4068
+ //
4069
+ #define TTM_WATCHDOG_TIMEOUT ((ULONG)0x000001A0L)
4070
+
4071
+ //
4072
+ // MessageId: WIN32K_CALLOUT_WATCHDOG_LIVEDUMP
4073
+ //
4074
+ // MessageText:
4075
+ //
4076
+ // WIN32K_CALLOUT_WATCHDOG_LIVEDUMP
4077
+ //
4078
+ #define WIN32K_CALLOUT_WATCHDOG_LIVEDUMP ((ULONG)0x000001A1L)
4079
+
4080
+ //
4081
+ // MessageId: WIN32K_CALLOUT_WATCHDOG_BUGCHECK
4082
+ //
4083
+ // MessageText:
4084
+ //
4085
+ // WIN32K_CALLOUT_WATCHDOG_BUGCHECK
4086
+ //
4087
+ #define WIN32K_CALLOUT_WATCHDOG_BUGCHECK ((ULONG)0x000001A2L)
4088
+
4089
+ //
4090
+ // MessageId: CALL_HAS_NOT_RETURNED_WATCHDOG_TIMEOUT_LIVEDUMP
4091
+ //
4092
+ // MessageText:
4093
+ //
4094
+ // CALL_HAS_NOT_RETURNED_WATCHDOG_TIMEOUT_LIVEDUMP
4095
+ //
4096
+ #define CALL_HAS_NOT_RETURNED_WATCHDOG_TIMEOUT_LIVEDUMP ((ULONG)0x000001A3L)
4097
+
4098
+ //
4099
+ // MessageId: DRIPS_SW_HW_DIVERGENCE_LIVEDUMP
4100
+ //
4101
+ // MessageText:
4102
+ //
4103
+ // DRIPS_SW_HW_DIVERGENCE_LIVEDUMP
4104
+ //
4105
+ #define DRIPS_SW_HW_DIVERGENCE_LIVEDUMP ((ULONG)0x000001A4L)
4106
+
4107
+ //
4108
+ // MessageId: USB_DRIPS_BLOCKER_SURPRISE_REMOVAL_LIVEDUMP
4109
+ //
4110
+ // MessageText:
4111
+ //
4112
+ // USB_DRIPS_BLOCKER_SURPRISE_REMOVAL_LIVEDUMP
4113
+ //
4114
+ #define USB_DRIPS_BLOCKER_SURPRISE_REMOVAL_LIVEDUMP ((ULONG)0x000001A5L)
4115
+
4116
+ //
4117
+ // MessageId: BLUETOOTH_ERROR_RECOVERY_LIVEDUMP
4118
+ //
4119
+ // MessageText:
4120
+ //
4121
+ // BLUETOOTH_ERROR_RECOVERY_LIVEDUMP
4122
+ //
4123
+ #define BLUETOOTH_ERROR_RECOVERY_LIVEDUMP ((ULONG)0x000001A6L)
4124
+
4125
+ //
4126
+ // MessageId: SMB_REDIRECTOR_LIVEDUMP
4127
+ //
4128
+ // MessageText:
4129
+ //
4130
+ // SMB_REDIRECTOR_LIVEDUMP
4131
+ //
4132
+ #define SMB_REDIRECTOR_LIVEDUMP ((ULONG)0x000001A7L)
4133
+
4134
+ //
4135
+ // MessageId: VIDEO_DXGKRNL_BLACK_SCREEN_LIVEDUMP
4136
+ //
4137
+ // MessageText:
4138
+ //
4139
+ // VIDEO_DXGKRNL_BLACK_SCREEN_LIVEDUMP
4140
+ //
4141
+ #define VIDEO_DXGKRNL_BLACK_SCREEN_LIVEDUMP ((ULONG)0x000001A8L)
4142
+
4143
+ //
4144
+ // MessageId: DIRECTED_FX_TRANSITION_LIVEDUMP
4145
+ //
4146
+ // MessageText:
4147
+ //
4148
+ // DIRECTED_FX_TRANSITION_LIVEDUMP
4149
+ //
4150
+ #define DIRECTED_FX_TRANSITION_LIVEDUMP ((ULONG)0x000001A9L)
4151
+
4152
+ //
4153
+ // MessageId: EXCEPTION_ON_INVALID_STACK
4154
+ //
4155
+ // MessageText:
4156
+ //
4157
+ // EXCEPTION_ON_INVALID_STACK
4158
+ //
4159
+ #define EXCEPTION_ON_INVALID_STACK ((ULONG)0x000001AAL)
4160
+
4161
+ //
4162
+ // MessageId: UNWIND_ON_INVALID_STACK
4163
+ //
4164
+ // MessageText:
4165
+ //
4166
+ // UNWIND_ON_INVALID_STACK
4167
+ //
4168
+ #define UNWIND_ON_INVALID_STACK ((ULONG)0x000001ABL)
4169
+
4170
+ //
4171
+ // MessageId: VIDEO_MINIPORT_FAILED_LIVEDUMP
4172
+ //
4173
+ // MessageText:
4174
+ //
4175
+ // VIDEO_MINIPORT_FAILED_LIVEDUMP
4176
+ //
4177
+ #define VIDEO_MINIPORT_FAILED_LIVEDUMP ((ULONG)0x000001B0L)
4178
+
4179
+ //
4180
+ // MessageId: VIDEO_MINIPORT_BLACK_SCREEN_LIVEDUMP
4181
+ //
4182
+ // MessageText:
4183
+ //
4184
+ // VIDEO_MINIPORT_BLACK_SCREEN_LIVEDUMP
4185
+ //
4186
+ #define VIDEO_MINIPORT_BLACK_SCREEN_LIVEDUMP ((ULONG)0x000001B8L)
4187
+
4188
+ //
4189
+ // MessageId: DRIVER_VERIFIER_DETECTED_VIOLATION_LIVEDUMP
4190
+ //
4191
+ // MessageText:
4192
+ //
4193
+ // DRIVER_VERIFIER_DETECTED_VIOLATION_LIVEDUMP
4194
+ //
4195
+ #define DRIVER_VERIFIER_DETECTED_VIOLATION_LIVEDUMP ((ULONG)0x000001C4L)
4196
+
4197
+ //
4198
+ // MessageId: IO_THREADPOOL_DEADLOCK_LIVEDUMP
4199
+ //
4200
+ // MessageText:
4201
+ //
4202
+ // IO_THREADPOOL_DEADLOCK_LIVEDUMP
4203
+ //
4204
+ #define IO_THREADPOOL_DEADLOCK_LIVEDUMP ((ULONG)0x000001C5L)
4205
+
4206
+ //
4207
+ // MessageId: FAST_ERESOURCE_PRECONDITION_VIOLATION
4208
+ //
4209
+ // MessageText:
4210
+ //
4211
+ // FAST_ERESOURCE_PRECONDITION_VIOLATION
4212
+ //
4213
+ #define FAST_ERESOURCE_PRECONDITION_VIOLATION ((ULONG)0x000001C6L)
4214
+
4215
+ //
4216
+ // MessageId: STORE_DATA_STRUCTURE_CORRUPTION
4217
+ //
4218
+ // MessageText:
4219
+ //
4220
+ // STORE_DATA_STRUCTURE_CORRUPTION
4221
+ //
4222
+ #define STORE_DATA_STRUCTURE_CORRUPTION ((ULONG)0x000001C7L)
4223
+
4224
+ //
4225
+ // MessageId: MANUALLY_INITIATED_POWER_BUTTON_HOLD
4226
+ //
4227
+ // MessageText:
4228
+ //
4229
+ // MANUALLY_INITIATED_POWER_BUTTON_HOLD
4230
+ //
4231
+ #define MANUALLY_INITIATED_POWER_BUTTON_HOLD ((ULONG)0x000001C8L)
4232
+
4233
+ //
4234
+ // MessageId: USER_MODE_HEALTH_MONITOR_LIVEDUMP
4235
+ //
4236
+ // MessageText:
4237
+ //
4238
+ // USER_MODE_HEALTH_MONITOR_LIVEDUMP
4239
+ //
4240
+ #define USER_MODE_HEALTH_MONITOR_LIVEDUMP ((ULONG)0x000001C9L)
4241
+
4242
+ //
4243
+ // MessageId: SYNTHETIC_WATCHDOG_TIMEOUT
4244
+ //
4245
+ // MessageText:
4246
+ //
4247
+ // SYNTHETIC_WATCHDOG_TIMEOUT
4248
+ //
4249
+ #define SYNTHETIC_WATCHDOG_TIMEOUT ((ULONG)0x000001CAL)
4250
+
4251
+ //
4252
+ // MessageId: INVALID_SILO_DETACH
4253
+ //
4254
+ // MessageText:
4255
+ //
4256
+ // INVALID_SILO_DETACH
4257
+ //
4258
+ #define INVALID_SILO_DETACH ((ULONG)0x000001CBL)
4259
+
4260
+ //
4261
+ // MessageId: EXRESOURCE_TIMEOUT_LIVEDUMP
4262
+ //
4263
+ // MessageText:
4264
+ //
4265
+ // EXRESOURCE_TIMEOUT_LIVEDUMP
4266
+ //
4267
+ #define EXRESOURCE_TIMEOUT_LIVEDUMP ((ULONG)0x000001CCL)
4268
+
4269
+ //
4270
+ // MessageId: INVALID_CALLBACK_STACK_ADDRESS
4271
+ //
4272
+ // MessageText:
4273
+ //
4274
+ // INVALID_CALLBACK_STACK_ADDRESS
4275
+ //
4276
+ #define INVALID_CALLBACK_STACK_ADDRESS ((ULONG)0x000001CDL)
4277
+
4278
+ //
4279
+ // MessageId: INVALID_KERNEL_STACK_ADDRESS
4280
+ //
4281
+ // MessageText:
4282
+ //
4283
+ // INVALID_KERNEL_STACK_ADDRESS
4284
+ //
4285
+ #define INVALID_KERNEL_STACK_ADDRESS ((ULONG)0x000001CEL)
4286
+
4287
+ //
4288
+ // MessageId: HARDWARE_WATCHDOG_TIMEOUT
4289
+ //
4290
+ // MessageText:
4291
+ //
4292
+ // HARDWARE_WATCHDOG_TIMEOUT
4293
+ //
4294
+ #define HARDWARE_WATCHDOG_TIMEOUT ((ULONG)0x000001CFL)
4295
+
4296
+ //
4297
+ // MessageId: ACPI_FIRMWARE_WATCHDOG_TIMEOUT
4298
+ //
4299
+ // MessageText:
4300
+ //
4301
+ // ACPI_FIRMWARE_WATCHDOG_TIMEOUT
4302
+ //
4303
+ #define ACPI_FIRMWARE_WATCHDOG_TIMEOUT ((ULONG)0x000001D0L)
4304
+
4305
+ //
4306
+ // MessageId: TELEMETRY_ASSERTS_LIVEDUMP
4307
+ //
4308
+ // MessageText:
4309
+ //
4310
+ // TELEMETRY_ASSERTS_LIVEDUMP
4311
+ //
4312
+ #define TELEMETRY_ASSERTS_LIVEDUMP ((ULONG)0x000001D1L)
4313
+
4314
+ //
4315
+ // MessageId: WORKER_THREAD_INVALID_STATE
4316
+ //
4317
+ // MessageText:
4318
+ //
4319
+ // WORKER_THREAD_INVALID_STATE
4320
+ //
4321
+ #define WORKER_THREAD_INVALID_STATE ((ULONG)0x000001D2L)
4322
+
4323
+ //
4324
+ // MessageId: WFP_INVALID_OPERATION
4325
+ //
4326
+ // MessageText:
4327
+ //
4328
+ // WFP_INVALID_OPERATION
4329
+ //
4330
+ #define WFP_INVALID_OPERATION ((ULONG)0x000001D3L)
4331
+
4332
+ //
4333
+ // MessageId: UCMUCSI_LIVEDUMP
4334
+ //
4335
+ // MessageText:
4336
+ //
4337
+ // UCMUCSI_LIVEDUMP
4338
+ //
4339
+ #define UCMUCSI_LIVEDUMP ((ULONG)0x000001D4L)
4340
+
4341
+ //
4342
+ // MessageId: DRIVER_PNP_WATCHDOG
4343
+ //
4344
+ // MessageText:
4345
+ //
4346
+ // DRIVER_PNP_WATCHDOG
4347
+ //
4348
+ #define DRIVER_PNP_WATCHDOG ((ULONG)0x000001D5L)
4349
+
4350
+ //
4351
+ // MessageId: WORKER_THREAD_RETURNED_WITH_NON_DEFAULT_WORKLOAD_CLASS
4352
+ //
4353
+ // MessageText:
4354
+ //
4355
+ // WORKER_THREAD_RETURNED_WITH_NON_DEFAULT_WORKLOAD_CLASS
4356
+ //
4357
+ #define WORKER_THREAD_RETURNED_WITH_NON_DEFAULT_WORKLOAD_CLASS ((ULONG)0x000001D6L)
4358
+
4359
+ //
4360
+ // MessageId: EFS_FATAL_ERROR
4361
+ //
4362
+ // MessageText:
4363
+ //
4364
+ // EFS_FATAL_ERROR
4365
+ //
4366
+ #define EFS_FATAL_ERROR ((ULONG)0x000001D7L)
4367
+
4368
+ //
4369
+ // MessageId: UCMUCSI_FAILURE
4370
+ //
4371
+ // MessageText:
4372
+ //
4373
+ // UCMUCSI_FAILURE
4374
+ //
4375
+ #define UCMUCSI_FAILURE ((ULONG)0x000001D8L)
4376
+
4377
+ //
4378
+ // MessageId: HAL_IOMMU_INTERNAL_ERROR
4379
+ //
4380
+ // MessageText:
4381
+ //
4382
+ // HAL_IOMMU_INTERNAL_ERROR
4383
+ //
4384
+ #define HAL_IOMMU_INTERNAL_ERROR ((ULONG)0x000001D9L)
4385
+
4386
+ //
4387
+ // MessageId: HAL_BLOCKED_PROCESSOR_INTERNAL_ERROR
4388
+ //
4389
+ // MessageText:
4390
+ //
4391
+ // HAL_BLOCKED_PROCESSOR_INTERNAL_ERROR
4392
+ //
4393
+ #define HAL_BLOCKED_PROCESSOR_INTERNAL_ERROR ((ULONG)0x000001DAL)
4394
+
4395
+ //
4396
+ // MessageId: IPI_WATCHDOG_TIMEOUT
4397
+ //
4398
+ // MessageText:
4399
+ //
4400
+ // IPI_WATCHDOG_TIMEOUT
4401
+ //
4402
+ #define IPI_WATCHDOG_TIMEOUT ((ULONG)0x000001DBL)
4403
+
4404
+ //
4405
+ // MessageId: DMA_COMMON_BUFFER_VECTOR_ERROR
4406
+ //
4407
+ // MessageText:
4408
+ //
4409
+ // DMA_COMMON_BUFFER_VECTOR_ERROR
4410
+ //
4411
+ #define DMA_COMMON_BUFFER_VECTOR_ERROR ((ULONG)0x000001DCL)
4412
+
4413
+ //
4414
+ // MessageId: BUGCODE_MBBADAPTER_DRIVER
4415
+ //
4416
+ // MessageText:
4417
+ //
4418
+ // BUGCODE_MBBADAPTER_DRIVER
4419
+ //
4420
+ #define BUGCODE_MBBADAPTER_DRIVER ((ULONG)0x000001DDL)
4421
+
4422
+ //
4423
+ // MessageId: BUGCODE_WIFIADAPTER_DRIVER
4424
+ //
4425
+ // MessageText:
4426
+ //
4427
+ // BUGCODE_WIFIADAPTER_DRIVER
4428
+ //
4429
+ #define BUGCODE_WIFIADAPTER_DRIVER ((ULONG)0x000001DEL)
4430
+
4431
+ //
4432
+ // MessageId: PROCESSOR_START_TIMEOUT
4433
+ //
4434
+ // MessageText:
4435
+ //
4436
+ // PROCESSOR_START_TIMEOUT
4437
+ //
4438
+ #define PROCESSOR_START_TIMEOUT ((ULONG)0x000001DFL)
4439
+
4440
+ //
4441
+ // MessageId: INVALID_ALTERNATE_SYSTEM_CALL_HANDLER_REGISTRATION
4442
+ //
4443
+ // MessageText:
4444
+ //
4445
+ // INVALID_ALTERNATE_SYSTEM_CALL_HANDLER_REGISTRATION
4446
+ //
4447
+ #define INVALID_ALTERNATE_SYSTEM_CALL_HANDLER_REGISTRATION ((ULONG)0x000001E0L)
4448
+
4449
+ //
4450
+ // MessageId: DEVICE_DIAGNOSTIC_LOG_LIVEDUMP
4451
+ //
4452
+ // MessageText:
4453
+ //
4454
+ // DEVICE_DIAGNOSTIC_LOG_LIVEDUMP
4455
+ //
4456
+ #define DEVICE_DIAGNOSTIC_LOG_LIVEDUMP ((ULONG)0x000001E1L)
4457
+
4458
+ //
4459
+ // MessageId: AZURE_DEVICE_FW_DUMP
4460
+ //
4461
+ // MessageText:
4462
+ //
4463
+ // AZURE_DEVICE_FW_DUMP
4464
+ //
4465
+ #define AZURE_DEVICE_FW_DUMP ((ULONG)0x000001E2L)
4466
+
4467
+ //
4468
+ // MessageId: BREAKAWAY_CABLE_TRANSITION
4469
+ //
4470
+ // MessageText:
4471
+ //
4472
+ // BREAKAWAY_CABLE_TRANSITION
4473
+ //
4474
+ #define BREAKAWAY_CABLE_TRANSITION ((ULONG)0x000001E3L)
4475
+
4476
+ //
4477
+ // MessageId: VIDEO_DXGKRNL_SYSMM_FATAL_ERROR
4478
+ //
4479
+ // MessageText:
4480
+ //
4481
+ // VIDEO_DXGKRNL_SYSMM_FATAL_ERROR
4482
+ //
4483
+ #define VIDEO_DXGKRNL_SYSMM_FATAL_ERROR ((ULONG)0x000001E4L)
4484
+
4485
+ //
4486
+ // MessageId: DRIVER_VERIFIER_TRACKING_LIVE_DUMP
4487
+ //
4488
+ // MessageText:
4489
+ //
4490
+ // DRIVER_VERIFIER_TRACKING_LIVE_DUMP
4491
+ //
4492
+ #define DRIVER_VERIFIER_TRACKING_LIVE_DUMP ((ULONG)0x000001E5L)
4493
+
4494
+ //
4495
+ // MessageId: CRASHDUMP_WATCHDOG_TIMEOUT
4496
+ //
4497
+ // MessageText:
4498
+ //
4499
+ // CRASHDUMP_WATCHDOG_TIMEOUT
4500
+ //
4501
+ #define CRASHDUMP_WATCHDOG_TIMEOUT ((ULONG)0x000001E6L)
4502
+
4503
+ //
4504
+ // MessageId: REGISTRY_LIVE_DUMP
4505
+ //
4506
+ // MessageText:
4507
+ //
4508
+ // REGISTRY_LIVE_DUMP
4509
+ //
4510
+ #define REGISTRY_LIVE_DUMP ((ULONG)0x000001E7L)
4511
+
4512
+ //
4513
+ // MessageId: INVALID_THREAD_AFFINITY_STATE
4514
+ //
4515
+ // MessageText:
4516
+ //
4517
+ // INVALID_THREAD_AFFINITY_STATE
4518
+ //
4519
+ #define INVALID_THREAD_AFFINITY_STATE ((ULONG)0x000001E8L)
4520
+
4521
+ //
4522
+ // MessageId: ILLEGAL_ATS_INITIALIZATION
4523
+ //
4524
+ // MessageText:
4525
+ //
4526
+ // ILLEGAL_ATS_INITIALIZATION
4527
+ //
4528
+ #define ILLEGAL_ATS_INITIALIZATION ((ULONG)0x000001E9L)
4529
+
4530
+ //
4531
+ // MessageId: SECURE_PCI_CONFIG_SPACE_ACCESS_VIOLATION
4532
+ //
4533
+ // MessageText:
4534
+ //
4535
+ // SECURE_PCI_CONFIG_SPACE_ACCESS_VIOLATION
4536
+ //
4537
+ #define SECURE_PCI_CONFIG_SPACE_ACCESS_VIOLATION ((ULONG)0x000001EAL)
4538
+
4539
+ //
4540
+ // MessageId: DAM_WATCHDOG_TIMEOUT
4541
+ //
4542
+ // MessageText:
4543
+ //
4544
+ // DAM_WATCHDOG_TIMEOUT
4545
+ //
4546
+ #define DAM_WATCHDOG_TIMEOUT ((ULONG)0x000001EBL)
4547
+
4548
+ //
4549
+ // MessageId: HANDLE_LIVE_DUMP
4550
+ //
4551
+ // MessageText:
4552
+ //
4553
+ // HANDLE_LIVE_DUMP
4554
+ //
4555
+ #define HANDLE_LIVE_DUMP ((ULONG)0x000001ECL)
4556
+
4557
+ //
4558
+ // MessageId: HANDLE_ERROR_ON_CRITICAL_THREAD
4559
+ //
4560
+ // MessageText:
4561
+ //
4562
+ // HANDLE_ERROR_ON_CRITICAL_THREAD
4563
+ //
4564
+ #define HANDLE_ERROR_ON_CRITICAL_THREAD ((ULONG)0x000001EDL)
4565
+
4566
+ //
4567
+ // MessageId: MPSDRV_QUERY_USER
4568
+ //
4569
+ // MessageText:
4570
+ //
4571
+ // MPSDRV_QUERY_USER
4572
+ //
4573
+ #define MPSDRV_QUERY_USER ((ULONG)0x400001EEL)
4574
+
4575
+ //
4576
+ // MessageId: VMBUS_LIVEDUMP
4577
+ //
4578
+ // MessageText:
4579
+ //
4580
+ // VMBUS_LIVEDUMP
4581
+ //
4582
+ #define VMBUS_LIVEDUMP ((ULONG)0x400001EFL)
4583
+
4584
+ //
4585
+ // MessageId: USB4_HARDWARE_VIOLATION
4586
+ //
4587
+ // MessageText:
4588
+ //
4589
+ // USB4_HARDWARE_VIOLATION
4590
+ //
4591
+ #define USB4_HARDWARE_VIOLATION ((ULONG)0x000001F0L)
4592
+
4593
+ //
4594
+ // MessageId: KASAN_ENLIGHTENMENT_VIOLATION
4595
+ //
4596
+ // MessageText:
4597
+ //
4598
+ // KASAN_ENLIGHTENMENT_VIOLATION
4599
+ //
4600
+ #define KASAN_ENLIGHTENMENT_VIOLATION ((ULONG)0x000001F1L)
4601
+
4602
+ //
4603
+ // MessageId: KASAN_ILLEGAL_ACCESS
4604
+ //
4605
+ // MessageText:
4606
+ //
4607
+ // KASAN_ILLEGAL_ACCESS
4608
+ //
4609
+ #define KASAN_ILLEGAL_ACCESS ((ULONG)0x000001F2L)
4610
+
4611
+ //
4612
+ // MessageId: IORING
4613
+ //
4614
+ // MessageText:
4615
+ //
4616
+ // IORING
4617
+ //
4618
+ #define IORING ((ULONG)0x000001F3L)
4619
+
4620
+ //
4621
+ // MessageId: MDL_CACHE
4622
+ //
4623
+ // MessageText:
4624
+ //
4625
+ // MDL_CACHE
4626
+ //
4627
+ #define MDL_CACHE ((ULONG)0x000001F4L)
4628
+
4629
+ //
4630
+ // MessageId: APPLICATION_HANG_KERNEL_LIVEDUMP
4631
+ //
4632
+ // MessageText:
4633
+ //
4634
+ // APPLICATION_HANG_KERNEL_LIVEDUMP
4635
+ //
4636
+ #define APPLICATION_HANG_KERNEL_LIVEDUMP ((ULONG)0x000001F5L)
4637
+
4638
+ //
4639
+ // MessageId: MISALIGNED_POINTER_PARAMETER
4640
+ //
4641
+ // MessageText:
4642
+ //
4643
+ // MISALIGNED_POINTER_PARAMETER
4644
+ //
4645
+ #define MISALIGNED_POINTER_PARAMETER ((ULONG)0x000001F6L)
4646
+
4647
+ //
4648
+ // MessageId: MSSECCORE_ASSERTION_FAILURE
4649
+ //
4650
+ // MessageText:
4651
+ //
4652
+ // MSSECCORE_ASSERTION_FAILURE
4653
+ //
4654
+ #define MSSECCORE_ASSERTION_FAILURE ((ULONG)0x000001F7L)
4655
+
4656
+ //
4657
+ // MessageId: INVALID_MINIMAL_PROCESS_STATE
4658
+ //
4659
+ // MessageText:
4660
+ //
4661
+ // INVALID_MINIMAL_PROCESS_STATE
4662
+ //
4663
+ #define INVALID_MINIMAL_PROCESS_STATE ((ULONG)0x000001F8L)
4664
+
4665
+ //
4666
+ // MessageId: PREVIOUS_MODE_MISMATCH
4667
+ //
4668
+ // MessageText:
4669
+ //
4670
+ // PREVIOUS_MODE_MISMATCH
4671
+ //
4672
+ #define PREVIOUS_MODE_MISMATCH ((ULONG)0x000001F9L)
4673
+
4674
+ //
4675
+ // MessageId: SMB_SRV_REQUEST_VALIDATION_FAILURE
4676
+ //
4677
+ // MessageText:
4678
+ //
4679
+ // SMB_SRV_REQUEST_VALIDATION_FAILURE
4680
+ //
4681
+ #define SMB_SRV_REQUEST_VALIDATION_FAILURE ((ULONG)0x000001FAL)
4682
+
4683
+ //
4684
+ // MessageId: IOMMU_INTERRUPT_REMAPPING_FAULT
4685
+ //
4686
+ // MessageText:
4687
+ //
4688
+ // IOMMU_INTERRUPT_REMAPPING_FAULT
4689
+ //
4690
+ #define IOMMU_INTERRUPT_REMAPPING_FAULT ((ULONG)0x000001FBL)
4691
+
4692
+ //
4693
+ // MessageId: WIN32K_CALLOUT_UNREGISTER_FAILED
4694
+ //
4695
+ // MessageText:
4696
+ //
4697
+ // WIN32K_CALLOUT_UNREGISTER_FAILED
4698
+ //
4699
+ #define WIN32K_CALLOUT_UNREGISTER_FAILED ((ULONG)0x000001FCL)
4700
+
4701
+ //
4702
+ // MessageId: HAL_SPE_INTERNAL_ERROR
4703
+ //
4704
+ // MessageText:
4705
+ //
4706
+ // HAL_SPE_INTERNAL_ERROR
4707
+ //
4708
+ #define HAL_SPE_INTERNAL_ERROR ((ULONG)0x000001FDL)
4709
+
4710
+ //
4711
+ // MessageId: SMB_CLIENT_REQUEST_VALIDATION_FAILURE
4712
+ //
4713
+ // MessageText:
4714
+ //
4715
+ // SMB_CLIENT_REQUEST_VALIDATION_FAILURE
4716
+ //
4717
+ #define SMB_CLIENT_REQUEST_VALIDATION_FAILURE ((ULONG)0x000001FEL)
4718
+
4719
+ //
4720
+ // MessageId: CPU_SCHEDULER_INTERNAL_ERROR
4721
+ //
4722
+ // MessageText:
4723
+ //
4724
+ // CPU_SCHEDULER_INTERNAL_ERROR
4725
+ //
4726
+ #define CPU_SCHEDULER_INTERNAL_ERROR ((ULONG)0x00000200L)
4727
+
4728
+ //
4729
+ // MessageId: PROCESS_TERMINATE_LIKELY_DEADLOCK
4730
+ //
4731
+ // MessageText:
4732
+ //
4733
+ // PROCESS_TERMINATE_LIKELY_DEADLOCK
4734
+ //
4735
+ #define PROCESS_TERMINATE_LIKELY_DEADLOCK ((ULONG)0x00000201L)
4736
+
4737
+ //
4738
+ // MessageId: UNEXPECTED_CODEPATH
4739
+ //
4740
+ // MessageText:
4741
+ //
4742
+ // UNEXPECTED_CODEPATH
4743
+ //
4744
+ #define UNEXPECTED_CODEPATH ((ULONG)0x00000202L)
4745
+
4746
+ //
4747
+ // MessageId: INVALID_EXTENSION_STATE
4748
+ //
4749
+ // MessageText:
4750
+ //
4751
+ // INVALID_EXTENSION_STATE
4752
+ //
4753
+ #define INVALID_EXTENSION_STATE ((ULONG)0x00000203L)
4754
+
4755
+ //
4756
+ // MessageId: STORAGE_DRIVER_LIVEDUMP
4757
+ //
4758
+ // MessageText:
4759
+ //
4760
+ // STORAGE_DRIVER_LIVEDUMP
4761
+ //
4762
+ #define STORAGE_DRIVER_LIVEDUMP ((ULONG)0x00000207L)
4763
+
4764
+ //
4765
+ // MessageId: XBOX_VMCTRL_CS_TIMEOUT
4766
+ //
4767
+ // MessageText:
4768
+ //
4769
+ // XBOX_VMCTRL_CS_TIMEOUT
4770
+ //
4771
+ #define XBOX_VMCTRL_CS_TIMEOUT ((ULONG)0x00000356L)
4772
+
4773
+ //
4774
+ // MessageId: XBOX_CORRUPTED_IMAGE
4775
+ //
4776
+ // MessageText:
4777
+ //
4778
+ // XBOX_CORRUPTED_IMAGE
4779
+ //
4780
+ #define XBOX_CORRUPTED_IMAGE ((ULONG)0x00000357L)
4781
+
4782
+ //
4783
+ // MessageId: XBOX_INVERTED_FUNCTION_TABLE_OVERFLOW
4784
+ //
4785
+ // MessageText:
4786
+ //
4787
+ // XBOX_INVERTED_FUNCTION_TABLE_OVERFLOW
4788
+ //
4789
+ #define XBOX_INVERTED_FUNCTION_TABLE_OVERFLOW ((ULONG)0x00000358L)
4790
+
4791
+ //
4792
+ // MessageId: XBOX_CORRUPTED_IMAGE_BASE
4793
+ //
4794
+ // MessageText:
4795
+ //
4796
+ // XBOX_CORRUPTED_IMAGE_BASE
4797
+ //
4798
+ #define XBOX_CORRUPTED_IMAGE_BASE ((ULONG)0x00000359L)
4799
+
4800
+ //
4801
+ // MessageId: XBOX_XDS_WATCHDOG_TIMEOUT
4802
+ //
4803
+ // MessageText:
4804
+ //
4805
+ // XBOX_XDS_WATCHDOG_TIMEOUT
4806
+ //
4807
+ #define XBOX_XDS_WATCHDOG_TIMEOUT ((ULONG)0x0000035AL)
4808
+
4809
+ //
4810
+ // MessageId: XBOX_SHUTDOWN_WATCHDOG_TIMEOUT
4811
+ //
4812
+ // MessageText:
4813
+ //
4814
+ // XBOX_SHUTDOWN_WATCHDOG_TIMEOUT
4815
+ //
4816
+ #define XBOX_SHUTDOWN_WATCHDOG_TIMEOUT ((ULONG)0x0000035BL)
4817
+
4818
+ //
4819
+ // MessageId: XBOX_CANNOT_MANAGE_PARTITION_MEMORY
4820
+ //
4821
+ // MessageText:
4822
+ //
4823
+ // XBOX_CANNOT_MANAGE_PARTITION_MEMORY
4824
+ //
4825
+ #define XBOX_CANNOT_MANAGE_PARTITION_MEMORY ((ULONG)0x0000035DL)
4826
+
4827
+ //
4828
+ // MessageId: XBOX_360_SYSTEM_CRASH
4829
+ //
4830
+ // MessageText:
4831
+ //
4832
+ // XBOX_360_SYSTEM_CRASH
4833
+ //
4834
+ #define XBOX_360_SYSTEM_CRASH ((ULONG)0x00000360L)
4835
+
4836
+ //
4837
+ // MessageId: XBOX_360_SYSTEM_CRASH_RESERVED
4838
+ //
4839
+ // MessageText:
4840
+ //
4841
+ // XBOX_360_SYSTEM_CRASH_RESERVED
4842
+ //
4843
+ #define XBOX_360_SYSTEM_CRASH_RESERVED ((ULONG)0x00000420L)
4844
+
4845
+ //
4846
+ // MessageId: XBOX_SECURITY_FAILUE
4847
+ //
4848
+ // MessageText:
4849
+ //
4850
+ // XBOX_SECURITY_FAILUE
4851
+ //
4852
+ #define XBOX_SECURITY_FAILUE ((ULONG)0x00000421L)
4853
+
4854
+ //
4855
+ // MessageId: KERNEL_CFG_INIT_FAILURE
4856
+ //
4857
+ // MessageText:
4858
+ //
4859
+ // KERNEL_CFG_INIT_FAILURE
4860
+ //
4861
+ #define KERNEL_CFG_INIT_FAILURE ((ULONG)0x00000422L)
4862
+
4863
+ //
4864
+ // MessageId: MANUALLY_INITIATED_POWER_BUTTON_HOLD_LIVE_DUMP
4865
+ //
4866
+ // MessageText:
4867
+ //
4868
+ // MANUALLY_INITIATED_POWER_BUTTON_HOLD_LIVE_DUMP
4869
+ //
4870
+ #define MANUALLY_INITIATED_POWER_BUTTON_HOLD_LIVE_DUMP ((ULONG)0x000011C8L)
4871
+
4872
+ //
4873
+ // MessageId: HYPERVISOR_ERROR
4874
+ //
4875
+ // MessageText:
4876
+ //
4877
+ // HYPERVISOR_ERROR
4878
+ //
4879
+ #define HYPERVISOR_ERROR ((ULONG)0x00020001L)
4880
+
4881
+ //
4882
+ // MessageId: XBOX_MANUALLY_INITIATED_CRASH
4883
+ //
4884
+ // MessageText:
4885
+ //
4886
+ // XBOX_MANUALLY_INITIATED_CRASH
4887
+ //
4888
+ #define XBOX_MANUALLY_INITIATED_CRASH ((ULONG)0x00030006L)
4889
+
4890
+ //
4891
+ // MessageId: MANUALLY_INITIATED_BLACKSCREEN_HOTKEY_LIVE_DUMP
4892
+ //
4893
+ // MessageText:
4894
+ //
4895
+ // MANUALLY_INITIATED_BLACKSCREEN_HOTKEY_LIVE_DUMP
4896
+ //
4897
+ #define MANUALLY_INITIATED_BLACKSCREEN_HOTKEY_LIVE_DUMP ((ULONG)0x000021C8L)
4898
+
4899
+ #define WINLOGON_FATAL_ERROR ((ULONG)0xC000021AL)
4900
+ #define MANUALLY_INITIATED_CRASH1 ((ULONG)0xDEADDEAD)
4901
+ #define BUGCHECK_CONTEXT_MODIFIER 0x80000000
4902
+ #endif // _BUGCODES_
msvc/Windows Kits/10/Include/10.0.26100.0/shared/cderr.h ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*****************************************************************************\
2
+ * *
3
+ * cderr.h - Common dialog error return codes *
4
+ * *
5
+ * Version 1.0 *
6
+ * *
7
+ * Copyright (c) 1992-1999, Microsoft Corp. All rights reserved. *
8
+ * *
9
+ \*****************************************************************************/
10
+
11
+ #ifndef _INC_CDERR
12
+ #define _INC_CDERR
13
+
14
+ #if _MSC_VER > 1000
15
+ #pragma once
16
+ #endif
17
+
18
+ #define CDERR_DIALOGFAILURE 0xFFFF
19
+
20
+ #define CDERR_GENERALCODES 0x0000
21
+ #define CDERR_STRUCTSIZE 0x0001
22
+ #define CDERR_INITIALIZATION 0x0002
23
+ #define CDERR_NOTEMPLATE 0x0003
24
+ #define CDERR_NOHINSTANCE 0x0004
25
+ #define CDERR_LOADSTRFAILURE 0x0005
26
+ #define CDERR_FINDRESFAILURE 0x0006
27
+ #define CDERR_LOADRESFAILURE 0x0007
28
+ #define CDERR_LOCKRESFAILURE 0x0008
29
+ #define CDERR_MEMALLOCFAILURE 0x0009
30
+ #define CDERR_MEMLOCKFAILURE 0x000A
31
+ #define CDERR_NOHOOK 0x000B
32
+ #define CDERR_REGISTERMSGFAIL 0x000C
33
+
34
+ #define PDERR_PRINTERCODES 0x1000
35
+ #define PDERR_SETUPFAILURE 0x1001
36
+ #define PDERR_PARSEFAILURE 0x1002
37
+ #define PDERR_RETDEFFAILURE 0x1003
38
+ #define PDERR_LOADDRVFAILURE 0x1004
39
+ #define PDERR_GETDEVMODEFAIL 0x1005
40
+ #define PDERR_INITFAILURE 0x1006
41
+ #define PDERR_NODEVICES 0x1007
42
+ #define PDERR_NODEFAULTPRN 0x1008
43
+ #define PDERR_DNDMMISMATCH 0x1009
44
+ #define PDERR_CREATEICFAILURE 0x100A
45
+ #define PDERR_PRINTERNOTFOUND 0x100B
46
+ #define PDERR_DEFAULTDIFFERENT 0x100C
47
+
48
+ #define CFERR_CHOOSEFONTCODES 0x2000
49
+ #define CFERR_NOFONTS 0x2001
50
+ #define CFERR_MAXLESSTHANMIN 0x2002
51
+
52
+ #define FNERR_FILENAMECODES 0x3000
53
+ #define FNERR_SUBCLASSFAILURE 0x3001
54
+ #define FNERR_INVALIDFILENAME 0x3002
55
+ #define FNERR_BUFFERTOOSMALL 0x3003
56
+
57
+ #define FRERR_FINDREPLACECODES 0x4000
58
+ #define FRERR_BUFFERLENGTHZERO 0x4001
59
+
60
+ #define CCERR_CHOOSECOLORCODES 0x5000
61
+
62
+ #endif /* !_INC_CDERR */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/cfg.h ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ cfg.h
8
+
9
+ Abstract:
10
+
11
+ This module contains the common Configuration Manager definitions for
12
+ both user mode and kernel mode code.
13
+
14
+ Revision History:
15
+
16
+ --*/
17
+
18
+ #ifndef _CFG_INCLUDED_
19
+ #define _CFG_INCLUDED_
20
+
21
+ #if _MSC_VER > 1000
22
+ #pragma once
23
+ #endif
24
+ #include <winapifamily.h>
25
+
26
+ #ifdef _MSC_VER
27
+ #if _MSC_VER >= 1200
28
+ #pragma warning(push)
29
+ #pragma warning(disable:4668) /* #if not_defined treated as #if 0 */
30
+ #endif
31
+ #endif
32
+
33
+ #pragma region Desktop Family or OneCore Family
34
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
35
+
36
+
37
+ //
38
+ // The following definitions are also used by kernel mode code to
39
+ // set up the registry.
40
+ //
41
+ //
42
+ // VetoType used in
43
+ // CM_Disable_DevNode
44
+ // CM_Uninstall_DevNode
45
+ // CM_Query_And_Remove_SubTree
46
+ //
47
+ typedef enum _PNP_VETO_TYPE {
48
+ PNP_VetoTypeUnknown, // Name is unspecified
49
+ PNP_VetoLegacyDevice, // Name is an Instance Path
50
+ PNP_VetoPendingClose, // Name is an Instance Path
51
+ PNP_VetoWindowsApp, // Name is a Module
52
+ PNP_VetoWindowsService, // Name is a Service
53
+ PNP_VetoOutstandingOpen, // Name is an Instance Path
54
+ PNP_VetoDevice, // Name is an Instance Path
55
+ PNP_VetoDriver, // Name is a Driver Service Name
56
+ PNP_VetoIllegalDeviceRequest, // Name is an Instance Path
57
+ PNP_VetoInsufficientPower, // Name is unspecified
58
+ PNP_VetoNonDisableable, // Name is an Instance Path
59
+ PNP_VetoLegacyDriver, // Name is a Service
60
+ PNP_VetoInsufficientRights, // Name is unspecified
61
+ PNP_VetoAlreadyRemoved, // Name is unspecified
62
+ } PNP_VETO_TYPE, *PPNP_VETO_TYPE;
63
+
64
+
65
+ //
66
+ // DevInst problem values, returned by call to CM_Get_DevInst_Status
67
+ //
68
+ #define CM_PROB_NOT_CONFIGURED (0x00000001) // no config for device
69
+ #define CM_PROB_DEVLOADER_FAILED (0x00000002) // service load failed
70
+ #define CM_PROB_OUT_OF_MEMORY (0x00000003) // out of memory
71
+ #define CM_PROB_ENTRY_IS_WRONG_TYPE (0x00000004) //
72
+ #define CM_PROB_LACKED_ARBITRATOR (0x00000005) //
73
+ #define CM_PROB_BOOT_CONFIG_CONFLICT (0x00000006) // boot config conflict
74
+ #define CM_PROB_FAILED_FILTER (0x00000007) //
75
+ #define CM_PROB_DEVLOADER_NOT_FOUND (0x00000008) // Devloader not found
76
+ #define CM_PROB_INVALID_DATA (0x00000009) // Invalid ID
77
+ #define CM_PROB_FAILED_START (0x0000000A) //
78
+ #define CM_PROB_LIAR (0x0000000B) //
79
+ #define CM_PROB_NORMAL_CONFLICT (0x0000000C) // config conflict
80
+ #define CM_PROB_NOT_VERIFIED (0x0000000D) //
81
+ #define CM_PROB_NEED_RESTART (0x0000000E) // requires restart
82
+ #define CM_PROB_REENUMERATION (0x0000000F) //
83
+ #define CM_PROB_PARTIAL_LOG_CONF (0x00000010) //
84
+ #define CM_PROB_UNKNOWN_RESOURCE (0x00000011) // unknown res type
85
+ #define CM_PROB_REINSTALL (0x00000012) //
86
+ #define CM_PROB_REGISTRY (0x00000013) //
87
+ #define CM_PROB_VXDLDR (0x00000014) // WINDOWS 95 ONLY
88
+ #define CM_PROB_WILL_BE_REMOVED (0x00000015) // devinst will remove
89
+ #define CM_PROB_DISABLED (0x00000016) // devinst is disabled
90
+ #define CM_PROB_DEVLOADER_NOT_READY (0x00000017) // Devloader not ready
91
+ #define CM_PROB_DEVICE_NOT_THERE (0x00000018) // device doesn't exist
92
+ #define CM_PROB_MOVED (0x00000019) //
93
+ #define CM_PROB_TOO_EARLY (0x0000001A) //
94
+ #define CM_PROB_NO_VALID_LOG_CONF (0x0000001B) // no valid log config
95
+ #define CM_PROB_FAILED_INSTALL (0x0000001C) // install failed
96
+ #define CM_PROB_HARDWARE_DISABLED (0x0000001D) // device disabled
97
+ #define CM_PROB_CANT_SHARE_IRQ (0x0000001E) // can't share IRQ
98
+ #define CM_PROB_FAILED_ADD (0x0000001F) // driver failed add
99
+ #define CM_PROB_DISABLED_SERVICE (0x00000020) // service's Start = 4
100
+ #define CM_PROB_TRANSLATION_FAILED (0x00000021) // resource translation failed
101
+ #define CM_PROB_NO_SOFTCONFIG (0x00000022) // no soft config
102
+ #define CM_PROB_BIOS_TABLE (0x00000023) // device missing in BIOS table
103
+ #define CM_PROB_IRQ_TRANSLATION_FAILED (0x00000024) // IRQ translator failed
104
+ #define CM_PROB_FAILED_DRIVER_ENTRY (0x00000025) // DriverEntry() failed.
105
+ #define CM_PROB_DRIVER_FAILED_PRIOR_UNLOAD (0x00000026) // Driver should have unloaded.
106
+ #define CM_PROB_DRIVER_FAILED_LOAD (0x00000027) // Driver load unsuccessful.
107
+ #define CM_PROB_DRIVER_SERVICE_KEY_INVALID (0x00000028) // Error accessing driver's service key
108
+ #define CM_PROB_LEGACY_SERVICE_NO_DEVICES (0x00000029) // Loaded legacy service created no devices
109
+ #define CM_PROB_DUPLICATE_DEVICE (0x0000002A) // Two devices were discovered with the same name
110
+ #define CM_PROB_FAILED_POST_START (0x0000002B) // The drivers set the device state to failed
111
+ #define CM_PROB_HALTED (0x0000002C) // This device was failed post start via usermode
112
+ #define CM_PROB_PHANTOM (0x0000002D) // The devinst currently exists only in the registry
113
+ #define CM_PROB_SYSTEM_SHUTDOWN (0x0000002E) // The system is shutting down
114
+ #define CM_PROB_HELD_FOR_EJECT (0x0000002F) // The device is offline awaiting removal
115
+ #define CM_PROB_DRIVER_BLOCKED (0x00000030) // One or more drivers is blocked from loading
116
+ #define CM_PROB_REGISTRY_TOO_LARGE (0x00000031) // System hive has grown too large
117
+ #define CM_PROB_SETPROPERTIES_FAILED (0x00000032) // Failed to apply one or more registry properties
118
+ #define CM_PROB_WAITING_ON_DEPENDENCY (0x00000033) // Device is stalled waiting on a dependency to start
119
+ #define CM_PROB_UNSIGNED_DRIVER (0x00000034) // Failed load driver due to unsigned image.
120
+ #define CM_PROB_USED_BY_DEBUGGER (0x00000035) // Device is being used by kernel debugger
121
+ #define CM_PROB_DEVICE_RESET (0x00000036) // Device is being reset
122
+ #define CM_PROB_CONSOLE_LOCKED (0x00000037) // Device is blocked while console is locked
123
+ #define CM_PROB_NEED_CLASS_CONFIG (0x00000038) // Device needs extended class configuration to start
124
+ #define CM_PROB_GUEST_ASSIGNMENT_FAILED (0x00000039) // Assignment to guest partition failed
125
+
126
+ #define NUM_CM_PROB_V1 (0x00000025)
127
+ #define NUM_CM_PROB_V2 (0x00000032)
128
+ #define NUM_CM_PROB_V3 (0x00000033)
129
+ #define NUM_CM_PROB_V4 (0x00000034)
130
+ #define NUM_CM_PROB_V5 (0x00000035)
131
+ #define NUM_CM_PROB_V6 (0x00000036)
132
+ #define NUM_CM_PROB_V7 (0x00000037)
133
+ #define NUM_CM_PROB_V8 (0x00000039)
134
+ #define NUM_CM_PROB_V9 (0x0000003A)
135
+
136
+ #if (NTDDI_VERSION >= NTDDI_WIN10_VB)
137
+
138
+ #define NUM_CM_PROB NUM_CM_PROB_V9
139
+
140
+ #elif (NTDDI_VERSION >= NTDDI_WIN10_RS3)
141
+
142
+ #define NUM_CM_PROB NUM_CM_PROB_V8
143
+
144
+ #elif (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
145
+
146
+ #define NUM_CM_PROB NUM_CM_PROB_V7
147
+
148
+ #elif (NTDDI_VERSION >= NTDDI_WINBLUE)
149
+
150
+ #define NUM_CM_PROB NUM_CM_PROB_V6
151
+
152
+ #elif (NTDDI_VERSION >= NTDDI_WIN7)
153
+
154
+ #define NUM_CM_PROB NUM_CM_PROB_V5
155
+
156
+ #elif (NTDDI_VERSION >= NTDDI_WS08)
157
+
158
+ #define NUM_CM_PROB NUM_CM_PROB_V4
159
+
160
+ #elif (NTDDI_VERSION >= NTDDI_WS03)
161
+
162
+ #define NUM_CM_PROB NUM_CM_PROB_V3
163
+
164
+ #elif (NTDDI_VERSION >= NTDDI_WINXP)
165
+
166
+ #define NUM_CM_PROB NUM_CM_PROB_V2
167
+
168
+ #elif (NTDDI_VERSION >= WIN2K)
169
+
170
+ #define NUM_CM_PROB NUM_CM_PROB_V1
171
+
172
+ #endif
173
+
174
+ //
175
+ // Device Instance status flags, returned by call to CM_Get_DevInst_Status
176
+ //
177
+ #define DN_ROOT_ENUMERATED (0x00000001) // Was enumerated by ROOT
178
+ #define DN_DRIVER_LOADED (0x00000002) // Has Register_Device_Driver
179
+ #define DN_ENUM_LOADED (0x00000004) // Has Register_Enumerator
180
+ #define DN_STARTED (0x00000008) // Is currently configured
181
+ #define DN_MANUAL (0x00000010) // Manually installed
182
+ #define DN_NEED_TO_ENUM (0x00000020) // May need reenumeration
183
+ #define DN_NOT_FIRST_TIME (0x00000040) // Has received a config
184
+ #define DN_HARDWARE_ENUM (0x00000080) // Enum generates hardware ID
185
+ #define DN_LIAR (0x00000100) // Lied about can reconfig once
186
+ #define DN_HAS_MARK (0x00000200) // Not CM_Create_DevInst lately
187
+ #define DN_HAS_PROBLEM (0x00000400) // Need device installer
188
+ #define DN_FILTERED (0x00000800) // Is filtered
189
+ #define DN_MOVED (0x00001000) // Has been moved
190
+ #define DN_DISABLEABLE (0x00002000) // Can be disabled
191
+ #define DN_REMOVABLE (0x00004000) // Can be removed
192
+ #define DN_PRIVATE_PROBLEM (0x00008000) // Has a private problem
193
+ #define DN_MF_PARENT (0x00010000) // Multi function parent
194
+ #define DN_MF_CHILD (0x00020000) // Multi function child
195
+ #define DN_WILL_BE_REMOVED (0x00040000) // DevInst is being removed
196
+
197
+ //
198
+ // Windows 4 OPK2 Flags
199
+ //
200
+ #define DN_NOT_FIRST_TIMEE 0x00080000 // S: Has received a config enumerate
201
+ #define DN_STOP_FREE_RES 0x00100000 // S: When child is stopped, free resources
202
+ #define DN_REBAL_CANDIDATE 0x00200000 // S: Don't skip during rebalance
203
+ #define DN_BAD_PARTIAL 0x00400000 // S: This devnode's log_confs do not have same resources
204
+ #define DN_NT_ENUMERATOR 0x00800000 // S: This devnode's is an NT enumerator
205
+ #define DN_NT_DRIVER 0x01000000 // S: This devnode's is an NT driver
206
+ //
207
+ // Windows 4.1 Flags
208
+ //
209
+ #define DN_NEEDS_LOCKING 0x02000000 // S: Devnode need lock resume processing
210
+ #define DN_ARM_WAKEUP 0x04000000 // S: Devnode can be the wakeup device
211
+ #define DN_APM_ENUMERATOR 0x08000000 // S: APM aware enumerator
212
+ #define DN_APM_DRIVER 0x10000000 // S: APM aware driver
213
+ #define DN_SILENT_INSTALL 0x20000000 // S: Silent install
214
+ #define DN_NO_SHOW_IN_DM 0x40000000 // S: No show in device manager
215
+ #define DN_BOOT_LOG_PROB 0x80000000 // S: Had a problem during preassignment of boot log conf
216
+
217
+ //
218
+ // Windows NT Flags
219
+ //
220
+ // These are overloaded on top of unused Win 9X flags
221
+ //
222
+
223
+ #if (NTDDI_VERSION >= NTDDI_WIN2K)
224
+
225
+ #define DN_NEED_RESTART DN_LIAR // System needs to be restarted for this Devnode to work properly
226
+
227
+ #endif
228
+
229
+ #if (NTDDI_VERSION >= NTDDI_WINXP)
230
+
231
+ #define DN_DRIVER_BLOCKED DN_NOT_FIRST_TIME // One or more drivers are blocked from loading for this Devnode
232
+ #define DN_LEGACY_DRIVER DN_MOVED // This device is using a legacy driver
233
+ #define DN_CHILD_WITH_INVALID_ID DN_HAS_MARK // One or more children have invalid ID(s)
234
+
235
+ #endif
236
+
237
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
238
+
239
+ #define DN_DEVICE_DISCONNECTED DN_NEEDS_LOCKING // The function driver for a device reported that the device is not connected. Typically this means a wireless device is out of range.
240
+
241
+ #endif
242
+
243
+ #if (NTDDI_VERSION >= NTDDI_WIN10)
244
+
245
+ #define DN_QUERY_REMOVE_PENDING DN_MF_PARENT // Device is part of a set of related devices collectively pending query-removal
246
+ #define DN_QUERY_REMOVE_ACTIVE DN_MF_CHILD // Device is actively engaged in a query-remove IRP
247
+
248
+ #endif
249
+
250
+ #define DN_CHANGEABLE_FLAGS (DN_NOT_FIRST_TIME+\
251
+ DN_HARDWARE_ENUM+\
252
+ DN_HAS_MARK+\
253
+ DN_DISABLEABLE+\
254
+ DN_REMOVABLE+\
255
+ DN_MF_CHILD+\
256
+ DN_MF_PARENT+\
257
+ DN_NOT_FIRST_TIMEE+\
258
+ DN_STOP_FREE_RES+\
259
+ DN_REBAL_CANDIDATE+\
260
+ DN_NT_ENUMERATOR+\
261
+ DN_NT_DRIVER+\
262
+ DN_SILENT_INSTALL+\
263
+ DN_NO_SHOW_IN_DM)
264
+
265
+ //
266
+ // Logical configuration Priority values
267
+ //
268
+ // These priority values are used in user-mode calls to CM_Add_Empty_Log_Conf.
269
+ // Drivers may also specify priority values for a given IO_RESOURCE_LIST
270
+ // structure by including a ConfigData member union as the first
271
+ // IO_RESOURCE_DESCRIPTOR in the IO_RESOURCE_LIST. In this case, the descriptor
272
+ // type would be CmResourceTypeConfigData.
273
+ //
274
+ #define LCPRI_FORCECONFIG (0x00000000) // Coming from a forced config
275
+ #define LCPRI_BOOTCONFIG (0x00000001) // Coming from a boot config
276
+ #define LCPRI_DESIRED (0x00002000) // Preferable (better performance)
277
+ #define LCPRI_NORMAL (0x00003000) // Workable (acceptable performance)
278
+ #define LCPRI_LASTBESTCONFIG (0x00003FFF) // CM only--do not use
279
+ #define LCPRI_SUBOPTIMAL (0x00005000) // Not desired, but will work
280
+ #define LCPRI_LASTSOFTCONFIG (0x00007FFF) // CM only--do not use
281
+ #define LCPRI_RESTART (0x00008000) // Need to restart
282
+ #define LCPRI_REBOOT (0x00009000) // Need to reboot
283
+ #define LCPRI_POWEROFF (0x0000A000) // Need to shutdown/power-off
284
+ #define LCPRI_HARDRECONFIG (0x0000C000) // Need to change a jumper
285
+ #define LCPRI_HARDWIRED (0x0000E000) // Cannot be changed
286
+ #define LCPRI_IMPOSSIBLE (0x0000F000) // Impossible configuration
287
+ #define LCPRI_DISABLED (0x0000FFFF) // Disabled configuration
288
+ #define MAX_LCPRI (0x0000FFFF) // Maximum known LC Priority
289
+
290
+ //
291
+ // Device panel sides
292
+ //
293
+ #define CM_DEVICE_PANEL_SIDE_UNKNOWN (0x00000000)
294
+ #define CM_DEVICE_PANEL_SIDE_TOP (0x00000001)
295
+ #define CM_DEVICE_PANEL_SIDE_BOTTOM (0x00000002)
296
+ #define CM_DEVICE_PANEL_SIDE_LEFT (0x00000003)
297
+ #define CM_DEVICE_PANEL_SIDE_RIGHT (0x00000004)
298
+ #define CM_DEVICE_PANEL_SIDE_FRONT (0x00000005)
299
+ #define CM_DEVICE_PANEL_SIDE_BACK (0x00000006)
300
+
301
+ //
302
+ // Device panel edges
303
+ //
304
+ #define CM_DEVICE_PANEL_EDGE_UNKNOWN (0x00000000)
305
+ #define CM_DEVICE_PANEL_EDGE_TOP (0x00000001)
306
+ #define CM_DEVICE_PANEL_EDGE_BOTTOM (0x00000002)
307
+ #define CM_DEVICE_PANEL_EDGE_LEFT (0x00000003)
308
+ #define CM_DEVICE_PANEL_EDGE_RIGHT (0x00000004)
309
+
310
+ //
311
+ // Device panel shapes
312
+ //
313
+ #define CM_DEVICE_PANEL_SHAPE_UNKNOWN (0x00000000)
314
+ #define CM_DEVICE_PANEL_SHAPE_RECTANGLE (0x00000001)
315
+ #define CM_DEVICE_PANEL_SHAPE_OVAL (0x00000002)
316
+
317
+ //
318
+ // Device panel orientations
319
+ //
320
+ #define CM_DEVICE_PANEL_ORIENTATION_HORIZONTAL (0x00000000)
321
+ #define CM_DEVICE_PANEL_ORIENTATION_VERTICAL (0x00000001)
322
+
323
+ //
324
+ // Device panel joint types
325
+ //
326
+ #define CM_DEVICE_PANEL_JOINT_TYPE_UNKNOWN (0x00000000)
327
+ #define CM_DEVICE_PANEL_JOINT_TYPE_PLANAR (0x00000001)
328
+ #define CM_DEVICE_PANEL_JOINT_TYPE_HINGE (0x00000002)
329
+ #define CM_DEVICE_PANEL_JOINT_TYPE_PIVOT (0x00000003)
330
+ #define CM_DEVICE_PANEL_JOINT_TYPE_SWIVEL (0x00000004)
331
+
332
+
333
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
334
+ #pragma endregion
335
+
336
+ #ifdef _MSC_VER
337
+ #if _MSC_VER >= 1200
338
+ #pragma warning(pop)
339
+ #endif
340
+ #endif
341
+
342
+ #endif // _CFG_INCLUDED_
343
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/clfs.h ADDED
@@ -0,0 +1,1311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*=============================================================================
2
+
3
+ Copyright (c) 1998 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ clfs.h
8
+
9
+ Abstract:
10
+
11
+ Header file containing all publicly defined data structures for the
12
+ common log file system.
13
+
14
+ Author:
15
+
16
+ Dexter Bradshaw [DexterB] 09-Dec-1998
17
+
18
+
19
+ Revision History:
20
+
21
+ =============================================================================*/
22
+
23
+ #include <winapifamily.h>
24
+
25
+ #pragma region Desktop Family or BootableSku Package
26
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PKG_BOOTABLESKU)
27
+
28
+ // begin_wdm
29
+ #ifndef _CLFS_PUBLIC_H_
30
+ #define _CLFS_PUBLIC_H_
31
+ // end_wdm
32
+
33
+ // begin_wdm
34
+ #if !defined(CLFSUSER_API)
35
+
36
+ #if defined(__CLFSUSER_EXPORTS__)
37
+ #define CLFSUSER_API
38
+ #else
39
+ #define CLFSUSER_API __declspec(dllimport)
40
+ #endif
41
+
42
+ #endif
43
+ // end_wdm
44
+
45
+ #ifndef CLFS_KERNEL_MODE
46
+
47
+ #include <stdio.h>
48
+
49
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
50
+ //
51
+ // PFILE
52
+ //
53
+ // Define PFILE to be a pointer to _iobuf *
54
+ //
55
+
56
+ typedef FILE *PFILE, **PPFILE;
57
+ typedef DWORD CLFSSTATUS;
58
+
59
+ # define ClfsLsnEqual LsnEqual
60
+ # define ClfsLsnLess LsnLess
61
+ # define ClfsLsnGreater LsnGreater
62
+ # define ClfsLsnNull LsnNull
63
+ # define ClfsLsnCreate LsnCreate
64
+ # define ClfsLsnContainer LsnContainer
65
+ # define ClfsLsnBlockOffset LsnBlockOffset
66
+ # define ClfsLsnRecordSequence LsnRecordSequence
67
+ # define ClfsLsnInvalid LsnInvalid
68
+ # define ClfsLsnIncrement LsnIncrement
69
+
70
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
71
+
72
+ #endif /* CLFS_KERNEL_MODE */
73
+
74
+ // begin_wdm
75
+
76
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
77
+
78
+ //
79
+ // FILE_ATTRIBUTE_DEDICATED is defined as FILE_ATTRIBUTE_TEMPORARY.
80
+ //
81
+
82
+ #define FILE_ATTRIBUTE_DEDICATED FILE_ATTRIBUTE_TEMPORARY
83
+
84
+ //
85
+ // Container name and container size extended attribute entry names.
86
+ //
87
+
88
+ #define EA_CONTAINER_NAME "ContainerName"
89
+ #define EA_CONTAINER_SIZE "ContainerSize"
90
+
91
+ //
92
+ // Base log file name 3-letter extension.
93
+ //
94
+
95
+ #define CLFS_BASELOG_EXTENSION L".blf"
96
+
97
+ //
98
+ // Common log file system public flags and constants.
99
+ //
100
+
101
+ #define CLFS_FLAG_NO_FLAGS 0x00000000 // No flags.
102
+ #define CLFS_FLAG_FORCE_APPEND 0x00000001 // Flag to force an append to log queue
103
+ #define CLFS_FLAG_FORCE_FLUSH 0x00000002 // Flag to force a log flush
104
+ #define CLFS_FLAG_USE_RESERVATION 0x00000004 // Flag to charge a data append to reservation
105
+ #define CLFS_FLAG_REENTRANT_FILE_SYSTEM 0x00000008 // Kernel mode create flag indicating a re-entrant file system.
106
+ #define CLFS_FLAG_NON_REENTRANT_FILTER 0x00000010 // Kernel mode create flag indicating non-reentrant filter.
107
+ #define CLFS_FLAG_REENTRANT_FILTER 0x00000020 // Kernel mode create flag indicating reentrant filter.
108
+ #define CLFS_FLAG_IGNORE_SHARE_ACCESS 0x00000040 // Kernel mode create flag indicating IO_IGNORE_SHARE_ACCESS_CHECK semantics.
109
+ #define CLFS_FLAG_READ_IN_PROGRESS 0x00000080 // Flag indicating read in progress and not completed.
110
+ #define CLFS_FLAG_MINIFILTER_LEVEL 0x00000100 // Kernel mode create flag indicating mini-filter target.
111
+ #define CLFS_FLAG_HIDDEN_SYSTEM_LOG 0x00000200 // Kernel mode create flag indicating the log and containers should be marked hidden & system.
112
+ // CLFS_FLAG_MAX_VALUE 0x00800000 // Highest value allowed for public flags.
113
+ /* NOTE that the uppper 8 bits of CLFS_FLAG values are reserved for internal use. */
114
+ //
115
+ // Marshalling Context Flag
116
+ //
117
+ #define CLFS_MARSHALLING_FLAG_NONE 0x00000000 // No flags
118
+ #define CLFS_MARSHALLING_FLAG_DISABLE_BUFF_INIT 0x00000001 // Flag to disable mashalling buffer intialization
119
+
120
+ //
121
+ // Flag indicating all CLFS I/O will be targeted to an intermediate level of the I/O stack
122
+ //
123
+
124
+ #define CLFS_FLAG_FILTER_INTERMEDIATE_LEVEL CLFS_FLAG_NON_REENTRANT_FILTER
125
+
126
+ //
127
+ // Flag indicating all CLFS I/O will be targeted to the top level of the I/O stack
128
+ //
129
+
130
+ #define CLFS_FLAG_FILTER_TOP_LEVEL CLFS_FLAG_REENTRANT_FILTER
131
+
132
+ //
133
+ // CLFS_CONTAINER_INDEX
134
+ //
135
+ // Index into the container table.
136
+ //
137
+
138
+ typedef ULONG CLFS_CONTAINER_ID;
139
+ typedef CLFS_CONTAINER_ID *PCLFS_CONTAINER_ID;
140
+ typedef CLFS_CONTAINER_ID **PPCLFS_CONTAINER_ID;
141
+
142
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
143
+
144
+ #ifdef __CLFS_PRIVATE_LSN__
145
+
146
+ #include <clfslsn.h>
147
+
148
+ #else
149
+
150
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
151
+
152
+ //
153
+ // CLS_LSN
154
+ //
155
+
156
+ typedef struct _CLS_LSN
157
+ {
158
+
159
+ ULONGLONG Internal;
160
+
161
+ } CLS_LSN, *PCLS_LSN, **PPCLS_LSN;
162
+
163
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
164
+
165
+ #endif /* __CLFS_PRIVATE_LSN__ */
166
+
167
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
168
+
169
+ //
170
+ // Alias CLS prefixed types with CLFS prefixes.
171
+ //
172
+
173
+ typedef CLS_LSN CLFS_LSN;
174
+ typedef CLFS_LSN *PCLFS_LSN, **PPCLFS_LSN;
175
+
176
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
177
+
178
+ #ifdef __cplusplus
179
+ extern "C"
180
+ {
181
+ #endif /* __cplusplus */
182
+
183
+ // end_wdm
184
+
185
+ //
186
+ // Definition of special LSN's: CLFS_LSN_INVALID and CLFS_LSN_NULL. Note that
187
+ // [CLFS_LSN_NULL, CLFS_LSN_INVALID) define the only valid LSN range. LSN values
188
+ // are strictly monotonic increasing.
189
+ //
190
+ #ifdef CLFS_KERNEL_MODE
191
+
192
+ #if defined __CLFS_SUPPORT_LIBRARY__
193
+
194
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
195
+ extern const CLFS_LSN CLFS_LSN_INVALID;
196
+ extern const CLFS_LSN CLFS_LSN_NULL;
197
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
198
+
199
+ #elif defined __CLFSUSER_EXPORTS__
200
+
201
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
202
+ extern __declspec(dllexport) const CLFS_LSN CLFS_LSN_INVALID;
203
+ extern __declspec(dllexport) const CLFS_LSN CLFS_LSN_NULL;
204
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
205
+
206
+ # else
207
+
208
+ // begin_wdm
209
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
210
+ extern __declspec(dllimport) const CLFS_LSN CLFS_LSN_INVALID;
211
+ extern __declspec(dllimport) const CLFS_LSN CLFS_LSN_NULL;
212
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
213
+ // end_wdm
214
+
215
+ # endif /* __CLFSUSER_EXPORTS__ */
216
+
217
+ #else
218
+
219
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
220
+ extern CLFSUSER_API const CLFS_LSN CLFS_LSN_INVALID;
221
+ extern CLFSUSER_API const CLFS_LSN CLFS_LSN_NULL;
222
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
223
+
224
+ #endif /* CLFS_KERNEL_MODE */
225
+
226
+ // begin_wdm
227
+
228
+ #ifdef __cplusplus
229
+ }
230
+ #endif /* __cplusplus */
231
+
232
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
233
+
234
+ //
235
+ // CLS_RECORD_TYPE
236
+ //
237
+ // Definition of record types.
238
+ //
239
+
240
+ #ifdef __cplusplus
241
+
242
+ const UCHAR ClfsNullRecord = 0x00; // Null record type.
243
+ const UCHAR ClfsDataRecord = 0x01; // Client data record.
244
+ const UCHAR ClfsRestartRecord = 0x02; // Restart record.
245
+
246
+
247
+ // Valid client records are restart and data records.
248
+
249
+ const UCHAR ClfsClientRecord = 0x03;
250
+
251
+ #else
252
+
253
+ #define ClfsNullRecord 0x00 // Null record type.
254
+ #define ClfsDataRecord 0x01 // Client data record.
255
+ #define ClfsRestartRecord 0x02 // Restart record.
256
+
257
+
258
+ // Valid client records are restart and data records.
259
+
260
+ #define ClfsClientRecord (ClfsDataRecord|ClfsRestartRecord)
261
+
262
+ #endif /* _cplusplus */
263
+
264
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
265
+
266
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
267
+ //
268
+ // Log container path prefix indicating the log container's location is
269
+ // actually a stream inside of the BLF.
270
+ //
271
+
272
+ #ifdef _cplusplus
273
+
274
+ const LPCWSTR CLFS_CONTAINER_STREAM_PREFIX = L"%BLF%:"
275
+
276
+ #else
277
+
278
+ #define CLFS_CONTAINER_STREAM_PREFIX L"%BLF%:"
279
+
280
+ #endif /* _cplusplus */
281
+
282
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
283
+
284
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
285
+ //
286
+ // Log container path prefix indicating the log container's location is
287
+ // relative to the base log file (BLF) and not an absolute path.
288
+ // Paths which do not being with said prefix are absolute paths.
289
+ //
290
+
291
+ #ifdef _cplusplus
292
+
293
+ const LPCWSTR CLFS_CONTAINER_RELATIVE_PREFIX = L"%BLF%\\"
294
+
295
+ #else
296
+
297
+ #define CLFS_CONTAINER_RELATIVE_PREFIX L"%BLF%\\"
298
+
299
+ #endif /* _cplusplus */
300
+
301
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
302
+
303
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
304
+ //
305
+ // Alias CLS prefix with CLFS prefixes.
306
+ //
307
+
308
+ typedef UCHAR CLS_RECORD_TYPE, *PCLS_RECORD_TYPE, **PPCLS_RECORD_TYPE;
309
+ typedef CLS_RECORD_TYPE CLFS_RECORD_TYPE, *PCLFS_RECORD_TYPE, **PPCLFS_RECORD_TYPE;
310
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
311
+
312
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
313
+ //
314
+ // CLS_CONTEXT_MODE
315
+ //
316
+ // The context mode specifies the direction and access methods used to scan the
317
+ // log file.
318
+ //
319
+
320
+ typedef enum _CLS_CONTEXT_MODE
321
+ {
322
+ ClsContextNone = 0x00,
323
+ ClsContextUndoNext,
324
+ ClsContextPrevious,
325
+ ClsContextForward
326
+
327
+ } CLS_CONTEXT_MODE, *PCLS_CONTEXT_MODE, **PPCLS_CONTEXT_MODE;
328
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
329
+
330
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
331
+ //
332
+ // Alias all CLS prefixes with CLFS prefixes.
333
+ //
334
+
335
+ typedef enum _CLFS_CONTEXT_MODE
336
+ {
337
+ ClfsContextNone = 0x00,
338
+ ClfsContextUndoNext,
339
+ ClfsContextPrevious,
340
+ ClfsContextForward
341
+
342
+ } CLFS_CONTEXT_MODE, *PCLFS_CONTEXT_MODE, **PPCLFS_CONTEXT_MODE;
343
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
344
+
345
+
346
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
347
+ //
348
+ // CLFSD_NODE_ID
349
+ //
350
+ // Common log file system node identifier. Every CLFS file system
351
+ // structure has a node identity and type. The node type is a signature
352
+ // field while the size is used in for consistency checking.
353
+ //
354
+
355
+ typedef struct _CLFS_NODE_ID
356
+ {
357
+ ULONG cType; // CLFS node type.
358
+ ULONG cbNode; // CLFS node size.
359
+
360
+ } CLFS_NODE_ID, *PCLFS_NODE_ID;
361
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
362
+
363
+
364
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
365
+ //
366
+ // CLS_WRITE_ENTRY
367
+ //
368
+ // Write entry specifying the contents of a user buffer and length that are
369
+ // marshaled in the space reservation and append interface of the CLS API.
370
+ //
371
+
372
+ typedef struct _CLS_WRITE_ENTRY
373
+ {
374
+ PVOID Buffer;
375
+ ULONG ByteLength;
376
+ } CLS_WRITE_ENTRY, *PCLS_WRITE_ENTRY, **PPCLS_WRITE_ENTRY;
377
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
378
+
379
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
380
+ //
381
+ // Alias all CLS prefixes with CLFS prefixes.
382
+ //
383
+
384
+ typedef CLS_WRITE_ENTRY CLFS_WRITE_ENTRY;
385
+ typedef CLFS_WRITE_ENTRY *PCLFS_WRITE_ENTRY, **PPCLFS_WRITE_ENTRY;
386
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
387
+
388
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
389
+ //
390
+ // CLFS_LOG_ID
391
+ //
392
+ // A log identifier is a GUID that describes uniquely a physical log file.
393
+ //
394
+
395
+ typedef GUID CLFS_LOG_ID;
396
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
397
+
398
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
399
+ //
400
+ // CLFS_INFORMATION
401
+ //
402
+ // Logical log file information structure describing either virtual or physical log
403
+ // file data, depending on the type of information queried.
404
+ //
405
+
406
+ typedef struct _CLS_INFORMATION
407
+ {
408
+ LONGLONG TotalAvailable; // Total log data space available.
409
+ LONGLONG CurrentAvailable; // Usable space in the log file.
410
+ LONGLONG TotalReservation; // Space reserved for UNDO's (aggregate for physical log)
411
+ ULONGLONG BaseFileSize; // Size of the base log file.
412
+ ULONGLONG ContainerSize; // Uniform size of log containers.
413
+ ULONG TotalContainers; // Total number of containers.
414
+ ULONG FreeContainers; // Number of containers not in active log.
415
+ ULONG TotalClients; // Total number of clients.
416
+ ULONG Attributes; // Log file attributes.
417
+ ULONG FlushThreshold; // Log file flush threshold.
418
+ ULONG SectorSize; // Underlying container sector size.
419
+ CLS_LSN MinArchiveTailLsn; // Marks the global archive tail.
420
+ CLS_LSN BaseLsn; // Start of the active log region.
421
+ CLS_LSN LastFlushedLsn; // Last flushed LSN in active log.
422
+ CLS_LSN LastLsn; // End of active log region.
423
+ CLS_LSN RestartLsn; // Location of restart record.
424
+ GUID Identity; // Unique identifier for the log.
425
+ } CLS_INFORMATION, *PCLS_INFORMATION, *PPCLS_INFORMATION;
426
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
427
+
428
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
429
+ //
430
+ // Alias CLS prefixes with CLS prefixes.
431
+ //
432
+
433
+ typedef CLS_INFORMATION CLFS_INFORMATION;
434
+ typedef CLFS_INFORMATION *PCLFS_INFORMATION, *PPCLFS_INFORMATION;
435
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
436
+ /*
437
+ //
438
+ // CLFS_CLIENT_INFORMATION
439
+ //
440
+ // The client information structure maintains client-based log metadata.
441
+ //
442
+
443
+ typedef struct _CLS_CLIENT_INFORMATION
444
+ {
445
+ CLS_INFORMATION ClfsInfo; // Contains base log file information.
446
+ ULONG ClientAttributes; // Virtual log file attributes.
447
+ LONGLONG ClientUndoCommitment; // Max. undo commitment for client.
448
+ CLS_LSN ClientArchiveTailLsn; // Marks the client archive tail.
449
+ CLS_LSN ClientBaseLsn; // Min. client LSN in active log region.
450
+ CLS_LSN ClientLastLsn; // Max. client LSN in active log region.
451
+ CLS_LSN ClientRestartLsn; // Location of restart record.
452
+
453
+ } CLS_CLIENT_INFORMATION, *PCLS_CLIENT_INFORMATION, **PPCLS_CLIENT_INFORMATION;
454
+
455
+ //
456
+ // Alias CLS prefixes with CLS prefixes.
457
+ //
458
+
459
+ typedef CLS_CLIENT_INFORMATION CLFS_CLIENT_INFORMATION;
460
+ typedef CLFS_CLIENT_INFORMATION *PCLFS_CLIENT_INFORMATION, *PPCLFS_CLIENT_INFORMATION;
461
+ */
462
+
463
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
464
+ //
465
+ // CLFS_LOG_NAME_INFORMATION
466
+ //
467
+ // The client information structure stores the name of a log. It is used
468
+ // to communicate ClfsLogNameInformation and ClfsLogPhysicalNameInformation.
469
+ //
470
+
471
+ typedef struct _CLFS_LOG_NAME_INFORMATION
472
+ {
473
+
474
+ USHORT NameLengthInBytes;
475
+ WCHAR Name[1];
476
+
477
+ } CLFS_LOG_NAME_INFORMATION, *PCLFS_LOG_NAME_INFORMATION, **PPCLFS_LOG_NAME_INFORMATION;
478
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
479
+
480
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
481
+ //
482
+ // CLFS_STREAM_ID_INFORMATION
483
+ //
484
+ // The client information structure provides a permanent identifier unique
485
+ // to the log for the stream in question.
486
+ //
487
+
488
+ typedef struct _CLFS_STREAM_ID_INFORMATION
489
+ {
490
+
491
+ UCHAR StreamIdentifier;
492
+
493
+ } CLFS_STREAM_ID_INFORMATION, *PCLFS_STREAM_ID_INFORMATION, **PPCLFS_STREAM_ID_INFORMATION;
494
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
495
+
496
+ #if (NTDDI_VERSION >= NTDDI_VISTA) || (_WIN32_WINNT >= _WIN32_WINNT_LONGHORN)
497
+ //
498
+ // CLFS_PHYSICAL_LSN_INFORMATION
499
+ //
500
+ // An information structure that describes a virtual:physical LSN pairing
501
+ // for the stream identified in the structure.
502
+ //
503
+ #pragma pack(push,8)
504
+ typedef struct _CLFS_PHYSICAL_LSN_INFORMATION
505
+ {
506
+ UCHAR StreamIdentifier;
507
+ CLFS_LSN VirtualLsn;
508
+ CLFS_LSN PhysicalLsn;
509
+
510
+ } CLFS_PHYSICAL_LSN_INFORMATION, *PCLFS_PHYSICAL_LSN_INFORMATION;
511
+ #pragma pack(pop)
512
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
513
+
514
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
515
+ //
516
+ // CLS_CONTAINER_STATE
517
+ //
518
+ // At any point in time a container could be inactive or uninitialized, active,
519
+ // pending deletion from the list of free containers, pending archival, or
520
+ // pending deletion while waiting to be archived.
521
+ //
522
+
523
+ typedef UINT32 CLS_CONTAINER_STATE, *PCLS_CONTAINER_STATE, *PPCLS_CONTAINER_STATE;
524
+ typedef CLS_CONTAINER_STATE CLFS_CONTAINER_STATE, *PCLFS_CONTAINER_STATE, *PPCLFS_CONTAINER_STATE;
525
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
526
+
527
+ #ifdef __cplusplus
528
+
529
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
530
+ const CLFS_CONTAINER_STATE ClsContainerInitializing = 0x01;
531
+ const CLFS_CONTAINER_STATE ClsContainerInactive = 0x02;
532
+ const CLFS_CONTAINER_STATE ClsContainerActive = 0x04;
533
+ const CLFS_CONTAINER_STATE ClsContainerActivePendingDelete = 0x08;
534
+ const CLFS_CONTAINER_STATE ClsContainerPendingArchive = 0x10;
535
+ const CLFS_CONTAINER_STATE ClsContainerPendingArchiveAndDelete = 0x20;
536
+
537
+ const CLFS_CONTAINER_STATE ClfsContainerInitializing = 0x01;
538
+ const CLFS_CONTAINER_STATE ClfsContainerInactive = 0x02;
539
+ const CLFS_CONTAINER_STATE ClfsContainerActive = 0x04;
540
+ const CLFS_CONTAINER_STATE ClfsContainerActivePendingDelete = 0x08;
541
+ const CLFS_CONTAINER_STATE ClfsContainerPendingArchive = 0x10;
542
+ const CLFS_CONTAINER_STATE ClfsContainerPendingArchiveAndDelete= 0x20;
543
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
544
+
545
+ #else
546
+
547
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
548
+ #define ClsContainerInitializing 0x01
549
+ #define ClsContainerInactive 0x02
550
+ #define ClsContainerActive 0x04
551
+ #define ClsContainerActivePendingDelete 0x08
552
+ #define ClsContainerPendingArchive 0x10
553
+ #define ClsContainerPendingArchiveAndDelete 0x20
554
+
555
+ #define ClfsContainerInitializing 0x01
556
+ #define ClfsContainerInactive 0x02
557
+ #define ClfsContainerActive 0x04
558
+ #define ClfsContainerActivePendingDelete 0x08
559
+ #define ClfsContainerPendingArchive 0x10
560
+ #define ClfsContainerPendingArchiveAndDelete 0x20
561
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
562
+
563
+ #endif /* __cplusplus */
564
+
565
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
566
+ //
567
+ // CLFS_MAX_CONTAINER_INFO
568
+ //
569
+ // The maximum length, in bytes, of the FileName field in the CLFS
570
+ // container information structure.
571
+ //
572
+
573
+ #ifdef __cplusplus
574
+
575
+ const ULONG CLFS_MAX_CONTAINER_INFO = (256);
576
+
577
+ #else
578
+
579
+ #define CLFS_MAX_CONTAINER_INFO (256)
580
+
581
+ #endif /* __cplusplus */
582
+
583
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
584
+
585
+
586
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
587
+ //
588
+ // CLS_CONTAINER_INFORMATION
589
+ //
590
+ // This structure defines a container descriptor. The descriptor specifies the
591
+ // container's creation and access times, size, file system name, file system
592
+ // attributes, state, minimum, and maximum LSNs.
593
+ //
594
+
595
+ typedef struct _CLS_CONTAINER_INFORMATION
596
+ {
597
+ ULONG FileAttributes; // File system attribute flag.
598
+ ULONGLONG CreationTime; // File creation time.
599
+ ULONGLONG LastAccessTime; // Last time container was read/written.
600
+ ULONGLONG LastWriteTime; // Last time container was written.
601
+ LONGLONG ContainerSize; // Size of container in bytes.
602
+ ULONG FileNameActualLength; // Length of the actual file name.
603
+ ULONG FileNameLength; // Length of file name in buffer
604
+ WCHAR FileName [CLFS_MAX_CONTAINER_INFO];// File system name for container.
605
+ CLFS_CONTAINER_STATE State; // Current state of the container.
606
+ CLFS_CONTAINER_ID PhysicalContainerId; // Physical container identifier.
607
+ CLFS_CONTAINER_ID LogicalContainerId; // Logical container identifier.
608
+
609
+ } CLS_CONTAINER_INFORMATION, *PCLS_CONTAINER_INFORMATION, **PPCLS_CONTAINER_INFORMATION;
610
+
611
+ //
612
+ // Alias all CLS prefixes with CLFS prefixes.
613
+ //
614
+
615
+ typedef CLS_CONTAINER_INFORMATION CLFS_CONTAINER_INFORMATION;
616
+ typedef CLFS_CONTAINER_INFORMATION *PCLFS_CONTAINER_INFORMATION, **PPCLFS_CONTAINER_INFORMATION;
617
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
618
+
619
+
620
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
621
+ //
622
+ // CLFS_LOG_INFORMATION_CLASS
623
+ //
624
+ // The information class specifies the kind of information a caller
625
+ // wishes to query or set on a log file.
626
+ //
627
+
628
+ typedef enum _CLS_LOG_INFORMATION_CLASS
629
+ {
630
+
631
+ ClfsLogBasicInformation = 0x00, // For virtual or physical logs, indicates the respective basic information.
632
+ ClfsLogBasicInformationPhysical, // Always indicates physical log basic information.
633
+ ClfsLogPhysicalNameInformation, // Always indicates physical name information.
634
+ ClfsLogStreamIdentifierInformation, // Virtual/physical log agnostic.
635
+ #if (NTDDI_VERSION >= NTDDI_VISTA) || (_WIN32_WINNT >= _WIN32_WINNT_LONGHORN)
636
+ ClfsLogSystemMarkingInformation, // Count of system marking references.
637
+ ClfsLogPhysicalLsnInformation // Maps virtual LSNs to physical LSNs; only valid for physical logs.
638
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
639
+
640
+ } CLS_LOG_INFORMATION_CLASS, *PCLS_LOG_INFORMATION_CLASS, **PPCLS_LOG_INFORMATION_CLASS;
641
+
642
+ //
643
+ // Alias all CLS prefixes with CLFS prefixes.
644
+ //
645
+
646
+ typedef CLS_LOG_INFORMATION_CLASS CLFS_LOG_INFORMATION_CLASS;
647
+ typedef CLFS_LOG_INFORMATION_CLASS *PCLFS_LOG_INFORMATION_CLASS, **PPCLFS_LOG_INFORMATION_CLASS;
648
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
649
+
650
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
651
+ //
652
+ // CLS_IOSTATS_CLASS
653
+ //
654
+ // Enumerated type defining the class of I/O statistics.
655
+ //
656
+
657
+ typedef enum _CLS_IOSTATS_CLASS
658
+ {
659
+ ClsIoStatsDefault = 0x0000,
660
+ ClsIoStatsMax = 0xFFFF
661
+
662
+ } CLS_IOSTATS_CLASS, *PCLS_IOSTATS_CLASS, **PPCLS_IOSTATS_CLASS;
663
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
664
+
665
+
666
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
667
+ //
668
+ // CLFS_IOSTATS_CLASS
669
+ //
670
+ // Alias all CLS prefixes with CLFS prefixes.
671
+ //
672
+
673
+ typedef enum _CLFS_IOSTATS_CLASS
674
+ {
675
+ ClfsIoStatsDefault = 0x0000,
676
+ ClfsIoStatsMax = 0xFFFF
677
+
678
+ } CLFS_IOSTATS_CLASS, *PCLFS_IOSTATS_CLASS, **PPCLFS_IOSTATS_CLASS;
679
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
680
+
681
+
682
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
683
+ //
684
+ // CLS_IO_STATISTICS
685
+ //
686
+ // This structure defines I/O performance counters particular to a log file. It consists
687
+ // of a header followed by the I/O statistics counters. The header is being ignored for
688
+ // now.
689
+ //
690
+
691
+ typedef struct _CLS_IO_STATISTICS_HEADER
692
+ {
693
+ UCHAR ubMajorVersion; // Major version of the statistics buffer.
694
+ UCHAR ubMinorVersion; // Minor version of the statistics buffer.
695
+ CLFS_IOSTATS_CLASS eStatsClass; // I/O statistics class.
696
+ USHORT cbLength; // Length of the statistics buffer.
697
+ ULONG coffData; // Offset of statistics counters.
698
+
699
+ } CLS_IO_STATISTICS_HEADER, *PCLS_IO_STATISTICS_HEADER, **PPCLS_IO_STATISTICS_HEADER;
700
+
701
+ //
702
+ // Alias all CLS prefixes with CLFS prefixes.
703
+ //
704
+
705
+ typedef CLS_IO_STATISTICS_HEADER CLFS_IO_STATISTICS_HEADER;
706
+ typedef CLFS_IO_STATISTICS_HEADER *PCLFS_IO_STATISTICS_HEADER, **PPCLFS_IO_STATISTICS_HEADER;
707
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
708
+
709
+
710
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
711
+ typedef struct _CLS_IO_STATISTICS
712
+ {
713
+ CLS_IO_STATISTICS_HEADER hdrIoStats; // Statistics buffer header.
714
+ ULONGLONG cFlush; // Flush count.
715
+ ULONGLONG cbFlush; // Cumulative number of bytes flushed.
716
+ ULONGLONG cMetaFlush; // Metadata flush count.
717
+ ULONGLONG cbMetaFlush; // Cumulative number of metadata bytes flushed.
718
+
719
+ } CLS_IO_STATISTICS, *PCLS_IO_STATISTICS, **PPCLS_IO_STATISTICS;
720
+
721
+ //
722
+ // Alias all CLS prefixes with CLFS prefixes.
723
+ //
724
+
725
+ typedef CLS_IO_STATISTICS CLFS_IO_STATISTICS;
726
+ typedef CLFS_IO_STATISTICS *PCLFS_IO_STATISTICS, **PPCLFS_IO_STATISTICS;
727
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
728
+
729
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
730
+ //
731
+ // CLFS_SCAN_MODE
732
+ //
733
+ // Container scan mode flags.
734
+ //
735
+
736
+ #ifdef __cplusplus
737
+
738
+ const UCHAR CLFS_SCAN_INIT = 0x01;
739
+ const UCHAR CLFS_SCAN_FORWARD = 0x02;
740
+ const UCHAR CLFS_SCAN_BACKWARD = 0x04;
741
+ const UCHAR CLFS_SCAN_CLOSE = 0x08;
742
+ const UCHAR CLFS_SCAN_INITIALIZED = 0x10;
743
+ const UCHAR CLFS_SCAN_BUFFERED = 0x20;
744
+
745
+ #else
746
+
747
+ #define CLFS_SCAN_INIT 0x01
748
+ #define CLFS_SCAN_FORWARD 0x02
749
+ #define CLFS_SCAN_BACKWARD 0x04
750
+ #define CLFS_SCAN_CLOSE 0x08
751
+ #define CLFS_SCAN_INITIALIZED 0x10
752
+ #define CLFS_SCAN_BUFFERED 0x20
753
+
754
+ #endif
755
+
756
+ typedef UCHAR CLFS_SCAN_MODE, *PCLFS_SCAN_MODE;
757
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
758
+
759
+
760
+ // end_wdm
761
+
762
+ #ifdef CLFS_KERNEL_MODE
763
+
764
+ // begin_wdm
765
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
766
+
767
+ //
768
+ // CLFS_SCAN_CONTEXT
769
+ //
770
+ // Container scan context for scanning all containers in a given physical log
771
+ // file.
772
+ //
773
+
774
+ //
775
+ // The log file object wraps an NT file object and the size of the structure.
776
+ // The log file object may be modified in the near future and there should be no
777
+ // dependencies on the size of the structure itself.
778
+ //
779
+
780
+ typedef FILE_OBJECT LOG_FILE_OBJECT, *PLOG_FILE_OBJECT, **PPLOG_FILE_OBJECT;
781
+
782
+ #if defined(_MSC_VER)
783
+ #if (_MSC_VER >= 1200)
784
+ #pragma warning(push)
785
+ #pragma warning(disable:4324) // structure padded due to __declspec(align())
786
+ #endif
787
+ #endif
788
+
789
+ typedef struct _CLS_SCAN_CONTEXT
790
+ {
791
+ CLFS_NODE_ID cidNode;
792
+ PLOG_FILE_OBJECT plfoLog;
793
+ __declspec(align(8)) ULONG cIndex;
794
+ __declspec(align(8)) ULONG cContainers;
795
+ __declspec(align(8)) ULONG cContainersReturned;
796
+ __declspec(align(8)) CLFS_SCAN_MODE eScanMode;
797
+ __declspec(align(8)) PCLS_CONTAINER_INFORMATION pinfoContainer;
798
+
799
+ } CLS_SCAN_CONTEXT, *PCLS_SCAN_CONTEXT, **PPCLS_SCAN_CONTEXT;
800
+
801
+ #if defined(_MSC_VER)
802
+ #if (_MSC_VER >= 1200)
803
+ #pragma warning(pop)
804
+ #endif
805
+ #endif
806
+
807
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
808
+
809
+ // end_wdm
810
+
811
+ #else
812
+
813
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
814
+ typedef struct _CLS_SCAN_CONTEXT
815
+ {
816
+ CLFS_NODE_ID cidNode;
817
+ HANDLE hLog;
818
+ __declspec(align(8)) ULONG cIndex;
819
+ __declspec(align(8)) ULONG cContainers;
820
+ __declspec(align(8)) ULONG cContainersReturned;
821
+ __declspec(align(8)) CLFS_SCAN_MODE eScanMode;
822
+ __declspec(align(8)) PCLS_CONTAINER_INFORMATION pinfoContainer;
823
+
824
+ } CLS_SCAN_CONTEXT, *PCLS_SCAN_CONTEXT, **PPCLS_SCAN_CONTEXT;
825
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
826
+
827
+ #endif /* CLFS_KERNEL_MODE */
828
+
829
+ // begin_wdm
830
+
831
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
832
+ //
833
+ // Alias all CLS prefixes with CLFS prefixes.
834
+ //
835
+
836
+ typedef CLS_SCAN_CONTEXT CLFS_SCAN_CONTEXT;
837
+ typedef CLFS_SCAN_CONTEXT *PCLFS_SCAN_CONTEXT, **PPCLFS_SCAN_CONTEXT;
838
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
839
+
840
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
841
+ //
842
+ // CLFS_ARCHIVE_DESCRIPTOR
843
+ //
844
+ // Log archive descriptors describe the set of discrete but logically
845
+ // contiguous disk extents comprising a snapshot of the active log when
846
+ // preparing for archival. Log archive descriptors specify enough information
847
+ // for log archive clients directly access the relevant contents of containers
848
+ // for archiving and restoring a snapshot of the log.
849
+ //
850
+
851
+ typedef struct _CLS_ARCHIVE_DESCRIPTOR
852
+ {
853
+ ULONGLONG coffLow;
854
+ ULONGLONG coffHigh;
855
+ CLS_CONTAINER_INFORMATION infoContainer;
856
+
857
+ } CLS_ARCHIVE_DESCRIPTOR, *PCLS_ARCHIVE_DESCRIPTOR, **PPCLS_ARCHIVE_DESCRIPTOR;
858
+
859
+ //
860
+ // Alias CLS prefixes with CLFS prefixes.
861
+ //
862
+
863
+ typedef CLS_ARCHIVE_DESCRIPTOR CLFS_ARCHIVE_DESCRIPTOR;
864
+ typedef CLFS_ARCHIVE_DESCRIPTOR *PCLFS_ARCHIVE_DESCRIPTOR, **PPCLFS_ARCHIVE_DESCRIPTOR;
865
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
866
+
867
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
868
+ //
869
+ // CLFS_ALLOCATION_ROUTINE
870
+ //
871
+ // Allocate a blocks for marshaled reads or writes
872
+ //
873
+
874
+ typedef PVOID (* CLFS_BLOCK_ALLOCATION) (ULONG cbBufferLength, PVOID pvUserContext);
875
+
876
+ //
877
+ // CLFS_DEALLOCATION_ROUTINE
878
+ //
879
+ // Deallocate buffers allocated by the CLFS_ALLOCATION_ROUTINE.
880
+ //
881
+
882
+ typedef void (* CLFS_BLOCK_DEALLOCATION) (PVOID pvBuffer, PVOID pvUserContext);
883
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
884
+
885
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
886
+ //
887
+ // CLFS_LOG_ARCHIVE_MODE
888
+ //
889
+ // Describes the archive support behavior for the log.
890
+ //
891
+
892
+ typedef enum _CLFS_LOG_ARCHIVE_MODE
893
+ {
894
+
895
+ ClfsLogArchiveEnabled = 0x01,
896
+ ClfsLogArchiveDisabled = 0x02
897
+
898
+ } CLFS_LOG_ARCHIVE_MODE, *PCLFS_LOG_ARCHIVE_MODE;
899
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
900
+
901
+
902
+ //-----------------------------------------------------------------------------
903
+ // LSN OPERATORS
904
+ //-----------------------------------------------------------------------------
905
+
906
+ #ifdef __cplusplus
907
+ extern "C"
908
+ {
909
+ #endif
910
+
911
+
912
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
913
+ //-----------------------------------------------------------------------------
914
+ // ClfsLsnEqual
915
+ //
916
+ // Method Description:
917
+ //
918
+ // Check for the equivalence of LSNs.
919
+ //
920
+ // Arguments:
921
+ //
922
+ // plsn1 -- first LSN comparator
923
+ // plsn2 -- second LSN comparator
924
+ //
925
+ //
926
+ // Return Value:
927
+ //
928
+ // TRUE if LSN values are equivalent and FALSE otherwise.
929
+ //
930
+ //-----------------------------------------------------------------------------
931
+
932
+ CLFSUSER_API BOOLEAN NTAPI
933
+ ClfsLsnEqual
934
+ (
935
+ _In_ const CLFS_LSN* plsn1,
936
+ _In_ const CLFS_LSN* plsn2
937
+ );
938
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
939
+
940
+
941
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
942
+ //-----------------------------------------------------------------------------
943
+ // ClfsLsnLess
944
+ //
945
+ // Method Description:
946
+ //
947
+ // Check if LSN1 is less than LSN2.
948
+ //
949
+ // Arguments:
950
+ //
951
+ // plsn1 -- first LSN comparator
952
+ // plsn2 -- second LSN comparator
953
+ //
954
+ //
955
+ // Return Value:
956
+ //
957
+ // TRUE if LSN1 is less than LSN2 and FALSE otherwise.
958
+ //
959
+ //-----------------------------------------------------------------------------
960
+
961
+ CLFSUSER_API BOOLEAN NTAPI
962
+ ClfsLsnLess
963
+ (
964
+ _In_ const CLFS_LSN* plsn1,
965
+ _In_ const CLFS_LSN* plsn2
966
+ );
967
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
968
+
969
+
970
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
971
+ //-----------------------------------------------------------------------------
972
+ // ClfsLsnGreater
973
+ //
974
+ // Method Description:
975
+ //
976
+ // Check if LSN1 is greater than LSN2.
977
+ //
978
+ // Arguments:
979
+ //
980
+ // plsn1 -- first LSN comparator
981
+ // plsn2 -- second LSN comparator
982
+ //
983
+ //
984
+ // Return Value:
985
+ //
986
+ // TRUE if LSN1 is greater than LSN2 and FALSE otherwise.
987
+ //
988
+ //-----------------------------------------------------------------------------
989
+
990
+ CLFSUSER_API BOOLEAN NTAPI
991
+ ClfsLsnGreater
992
+ (
993
+ _In_ const CLFS_LSN* plsn1,
994
+ _In_ const CLFS_LSN* plsn2
995
+ );
996
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
997
+
998
+
999
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1000
+ //-----------------------------------------------------------------------------
1001
+ // ClfsLsnNull (Inline)
1002
+ //
1003
+ // Method Description:
1004
+ //
1005
+ // Check whether or not an LSN is CLFS_LSN_NULL.
1006
+ //
1007
+ // Arguments:
1008
+ //
1009
+ // plsn -- reference to LSN tested against the NULL value.
1010
+ //
1011
+ //
1012
+ // Return Value:
1013
+ //
1014
+ // TRUE if and only if an LSN is equivalent to CLFS_LSN_NULL.
1015
+ // LSNs with the value CLFS_LSN_INVALID will return FALSE.
1016
+ //
1017
+ //-----------------------------------------------------------------------------
1018
+
1019
+ CLFSUSER_API BOOLEAN NTAPI
1020
+ ClfsLsnNull
1021
+ (
1022
+ _In_ const CLFS_LSN* plsn
1023
+ );
1024
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1025
+
1026
+
1027
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1028
+ //-----------------------------------------------------------------------------
1029
+ // ClfsLsnContainer (Inline)
1030
+ //
1031
+ // Routine Description:
1032
+ //
1033
+ // Extract the container identifier from the LSN.
1034
+ //
1035
+ // Arguments:
1036
+ //
1037
+ // plsn -- get block offset from this LSN
1038
+ //
1039
+ // Return Value:
1040
+ //
1041
+ // Returns the container identifier for the LSN.
1042
+ //
1043
+ //-----------------------------------------------------------------------------
1044
+
1045
+ CLFSUSER_API CLFS_CONTAINER_ID NTAPI
1046
+ ClfsLsnContainer
1047
+ (
1048
+ _In_ const CLFS_LSN* plsn
1049
+ );
1050
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1051
+
1052
+
1053
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1054
+ //-----------------------------------------------------------------------------
1055
+ // ClfsLsnCreate (Inline)
1056
+ //
1057
+ // Routine Description:
1058
+ //
1059
+ // Create an LSN given a log identifier, a container identifier, a block
1060
+ // offset and a bucket identifier. Caller must test for invalid LSN after
1061
+ // making this call.
1062
+ //
1063
+ // Arguments:
1064
+ //
1065
+ // cidContainer -- container identifier
1066
+ // offBlock -- block offset
1067
+ // cRecord -- ordinal number of the record in block
1068
+ //
1069
+ // Return Value:
1070
+ //
1071
+ // Returns a valid LSN if successful, otherwise it returns
1072
+ // CLFS_LSN_INVALID
1073
+ //
1074
+ //-----------------------------------------------------------------------------
1075
+
1076
+ CLFSUSER_API CLFS_LSN NTAPI
1077
+ ClfsLsnCreate
1078
+ (
1079
+ _In_ CLFS_CONTAINER_ID cidContainer,
1080
+ _In_ ULONG offBlock,
1081
+ _In_ ULONG cRecord
1082
+ );
1083
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1084
+
1085
+
1086
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1087
+ //-----------------------------------------------------------------------------
1088
+ // ClfsLsnBlockOffset (Inline)
1089
+ //
1090
+ // Routine Description:
1091
+ //
1092
+ // Extract the block offset from the LSN.
1093
+ //
1094
+ // Arguments:
1095
+ //
1096
+ // plsn -- get block offset from this LSN
1097
+ //
1098
+ // Return Value:
1099
+ //
1100
+ // Returns the block offset for the LSN.
1101
+ //
1102
+ //-----------------------------------------------------------------------------
1103
+
1104
+ CLFSUSER_API ULONG NTAPI
1105
+ ClfsLsnBlockOffset
1106
+ (
1107
+ _In_ const CLFS_LSN* plsn
1108
+ );
1109
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1110
+
1111
+
1112
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1113
+ //-----------------------------------------------------------------------------
1114
+ // ClfsLsnRecordSequence (Inline)
1115
+ //
1116
+ // Routine Description:
1117
+ //
1118
+ // Extract the bucket identifier from the LSN.
1119
+ //
1120
+ // Arguments:
1121
+ //
1122
+ // plsn -- get block offset from this LSN
1123
+ //
1124
+ // Return Value:
1125
+ //
1126
+ // Returns the bucket identifier for the LSN.
1127
+ //
1128
+ //-----------------------------------------------------------------------------
1129
+
1130
+ CLFSUSER_API ULONG NTAPI
1131
+ ClfsLsnRecordSequence
1132
+ (
1133
+ _In_ const CLFS_LSN* plsn
1134
+ );
1135
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1136
+
1137
+
1138
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1139
+ //-----------------------------------------------------------------------------
1140
+ // ClfsLsnInvalid
1141
+ //
1142
+ // Method Description:
1143
+ //
1144
+ // Check whether or not an LSN is CLFS_LSN_INVALID.
1145
+ //
1146
+ // Arguments:
1147
+ //
1148
+ // plsn -- reference to LSN tested against CLFS_LSN_INVALID.
1149
+ //
1150
+ //
1151
+ // Return Value:
1152
+ //
1153
+ // TRUE if and only if an LSN is equivalent to CLFS_LSN_INVALID.
1154
+ // LSNs with the value CLFS_LSN_NULL will return FALSE.
1155
+ //
1156
+ //-----------------------------------------------------------------------------
1157
+
1158
+ CLFSUSER_API BOOLEAN NTAPI
1159
+ ClfsLsnInvalid
1160
+ (
1161
+ _In_ const CLFS_LSN* plsn
1162
+ );
1163
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1164
+
1165
+
1166
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1167
+ //-----------------------------------------------------------------------------
1168
+ // ClfsLsnIncrement
1169
+ //
1170
+ // Method Description:
1171
+ //
1172
+ // Increment and LSN by 1
1173
+ //
1174
+ // Arguments:
1175
+ //
1176
+ // plsn -- LSN to be incremented.
1177
+ //
1178
+ //
1179
+ // Return Value:
1180
+ //
1181
+ // A valid LSN next in sequence to the input LSN, if successful.
1182
+ // Otherwise, this function returns CLFS_LSN_INVALID.
1183
+ //
1184
+ //-----------------------------------------------------------------------------
1185
+
1186
+ CLFSUSER_API CLFS_LSN NTAPI
1187
+ ClfsLsnIncrement (_In_ PCLFS_LSN plsn);
1188
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1189
+
1190
+
1191
+ #ifdef __cplusplus
1192
+ }
1193
+ #endif
1194
+
1195
+ #ifdef __cplusplus
1196
+
1197
+ #ifdef CLFS_OPERATORS
1198
+
1199
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1200
+ //
1201
+ // LSN arithmetic increment operator.
1202
+ //
1203
+
1204
+ inline CLFS_LSN
1205
+ operator++
1206
+ (
1207
+ _Inout_ CLFS_LSN& refLsn
1208
+ )
1209
+ {
1210
+ //
1211
+ // Prefix increment operator.
1212
+ //
1213
+
1214
+ refLsn = ClfsLsnIncrement (&refLsn);
1215
+ return refLsn;
1216
+ }
1217
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1218
+
1219
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1220
+ //
1221
+ // BOOLEAN LSN operators.
1222
+ //
1223
+
1224
+ inline BOOLEAN
1225
+ operator<
1226
+ (
1227
+ _In_ const CLFS_LSN& refLsn1,
1228
+ _In_ const CLFS_LSN& refLsn2
1229
+ )
1230
+ {
1231
+ return (ClfsLsnLess ((PCLFS_LSN) &refLsn1, (PCLFS_LSN) &refLsn2));
1232
+ }
1233
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1234
+
1235
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1236
+ inline BOOLEAN
1237
+ operator>
1238
+ (
1239
+ _In_ const CLFS_LSN& refLsn1,
1240
+ _In_ const CLFS_LSN& refLsn2
1241
+ )
1242
+ {
1243
+ return (ClfsLsnGreater ((PCLFS_LSN) &refLsn1, (PCLFS_LSN) &refLsn2));
1244
+ }
1245
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1246
+
1247
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1248
+ inline BOOLEAN
1249
+ operator==
1250
+ (
1251
+ _In_ const CLFS_LSN& refLsn1,
1252
+ _In_ const CLFS_LSN& refLsn2
1253
+ )
1254
+ {
1255
+ return (ClfsLsnEqual ((PCLFS_LSN) &refLsn1, (PCLFS_LSN) &refLsn2));
1256
+ }
1257
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1258
+
1259
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1260
+ inline BOOLEAN
1261
+ operator!=
1262
+ (
1263
+ _In_ const CLFS_LSN& refLsn1,
1264
+ _In_ const CLFS_LSN& refLsn2
1265
+ )
1266
+ {
1267
+ return (!ClfsLsnEqual ((PCLFS_LSN) &refLsn1, (PCLFS_LSN) &refLsn2));
1268
+ }
1269
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1270
+
1271
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1272
+ inline BOOLEAN
1273
+ operator<=
1274
+ (
1275
+ _In_ const CLFS_LSN& refLsn1,
1276
+ _In_ const CLFS_LSN& refLsn2
1277
+ )
1278
+ {
1279
+ return (!ClfsLsnGreater ((PCLFS_LSN) &refLsn1, (PCLFS_LSN) &refLsn2));
1280
+ }
1281
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1282
+
1283
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1284
+ inline BOOLEAN
1285
+ operator>=
1286
+ (
1287
+ _In_ const CLFS_LSN& refLsn1,
1288
+ _In_ const CLFS_LSN& refLsn2
1289
+ )
1290
+ {
1291
+ return (!ClfsLsnLess ((PCLFS_LSN) &refLsn1, (PCLFS_LSN) &refLsn2));
1292
+ }
1293
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
1294
+
1295
+ #endif /* CLFS_OPERATORS */
1296
+
1297
+ #endif /* __cplusplus */
1298
+
1299
+
1300
+ #endif /* _CLFS_PUBLIC_H_ */
1301
+ // end_wdm
1302
+
1303
+
1304
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_PKG_BOOTABLESKU) */
1305
+ #pragma endregion
1306
+
1307
+ //-----------------------------------------------------------------------------
1308
+ // END OF FILE
1309
+ //-----------------------------------------------------------------------------
1310
+
1311
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/clfslsn.h ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <winapifamily.h>
2
+
3
+ /*=============================================================================
4
+
5
+ Copyright (c) 1998 Microsoft Corporation
6
+
7
+ Module Name:
8
+
9
+ clfslsn.h
10
+
11
+ Abstract:
12
+
13
+ Header file containing the private definition for the common log
14
+ file system's log sequence number structure.
15
+
16
+ Author:
17
+
18
+ Dexter Bradshaw [DexterB] 09-Dec-1998
19
+
20
+
21
+ Revision History:
22
+
23
+ =============================================================================*/
24
+
25
+ #ifndef _CLFS_LSN_H_
26
+ #define _CLFS_LSN_H_
27
+
28
+ #pragma region Desktop Family
29
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
30
+
31
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
32
+ //
33
+ // CLFS_RECORD_INDEX
34
+ //
35
+ // Log record offset on container file. The log record offset consists of a block
36
+ // offset in the container and a bucket identifier indexing the records in the block.
37
+ // Declared up here because including clfs_x.h will try to define the LSN, which needs
38
+ // this.
39
+ //
40
+
41
+ typedef UINT32 CLFS_RECORD_INDEX;
42
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
43
+
44
+
45
+ #if (NTDDI_VERSION >= NTDDI_WS03SP1) || (_WIN32_WINNT >= _WIN32_WINNT_WS03)
46
+ //
47
+ // CLS_LSN
48
+ //
49
+ // The log sequence number (LSN) is a valid log file address. The LSN consists of
50
+ // three (3) parts: (a) a log identifier to identify which physical log the log record
51
+ // belongs to, (b) a container index identifying the log container where the log record
52
+ // lies, and (c) a record offset identified by the offset of the block in the container
53
+ // and an ordinal number for the record within the container.
54
+ //
55
+ //
56
+ // The structure of the LSN poses some inherent limitations of the number of logs,
57
+ // the number of containers, the size of a container, and the number of log records in
58
+ // a log block.
59
+ //
60
+ // Maximum number of physical log files is 64K.
61
+ // Maximum number of container identifiers is 4G.
62
+ // Maximum size of a container is 4G.
63
+ // Maximum number of sector-aligned log blocks is 8M
64
+ // Maximum number of record buckets in a log block is 512
65
+ //
66
+
67
+ typedef union _CLS_LSN
68
+ {
69
+ //
70
+ // Container identifier
71
+ //
72
+
73
+ struct
74
+ {
75
+ CLFS_RECORD_INDEX idxRecord; // Record offset on container.
76
+ CLFS_CONTAINER_ID cidContainer; // Container identifier.
77
+ } offset;
78
+
79
+ __volatile ULONGLONG ullOffset; // Sequence number within physical log.
80
+
81
+ } CLS_LSN, *PCLS_LSN, **PPCLS_LSN;
82
+
83
+ //
84
+ // Alias CLS prefixed types with CLFS prefixes.
85
+ //
86
+
87
+ typedef CLS_LSN CLFS_LSN;
88
+ typedef CLFS_LSN *PCLFS_LSN, **PPCLFS_LSN;
89
+ #endif /* NTDDI_VERSION || _WIN32_WINNT */
90
+
91
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
92
+ #pragma endregion
93
+
94
+ #endif
msvc/Windows Kits/10/Include/10.0.26100.0/shared/common.ver ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*---------------------------------------------------------------*/
3
+ /* */
4
+ /* The following section actually creates the version structure. */
5
+ /* They are ignored if we are not being invoked by RC. */
6
+ /* */
7
+ /* ntverp.H must be included before including this file */
8
+ /* */
9
+ /* If VER_LEGALCOPYRIGHT_STR is not defined, it will be */
10
+ /* constructed using VER_LEGALCOPYRIGHT_YEARS, so at least one */
11
+ /* these macros must be defined before including this file. */
12
+ /* */
13
+ /* VER_FILETYPE, VER_FILESUBTYPE, VER_FILEDESCRIPTION_STR, and */
14
+ /* VER_INTERNALNAME_STR must be defined before including this */
15
+ /* file. */
16
+ /* */
17
+ /* If VER_FILEVERSION is not defined, VER_PRODUCTVERSION will be */
18
+ /* used instead. If VER_FILEVERSION_STR is not defined, */
19
+ /* VER_PRODUCTVERSION_STR will be used instead. */
20
+ /* */
21
+ /* If VER_ORIGINALFILENAME_STR is not defined, it is set to */
22
+ /* the value in VER_INTERNALNAME_STR. */
23
+ /* */
24
+ /* If INTL is defined, then this is assumed to be an */
25
+ /* an international build; two string blocks will be created, */
26
+ /* (since all version resources must have English), and the */
27
+ /* second one can be localized */
28
+ /* */
29
+ /*---------------------------------------------------------------*/
30
+
31
+
32
+ /****************************************************************
33
+ When updating the copy right year Please Make sure you also update the
34
+ constant VER_LEGALCOPYRIGHT_STR_WITH_YEARS below
35
+ *****************************************************************/
36
+ #ifndef VER_LEGALCOPYRIGHT_YEARS
37
+ #define VER_LEGALCOPYRIGHT_YEARS "2021"
38
+ #endif
39
+
40
+ #ifndef VER_LEGALCOPYRIGHT_STR_WITH_YEARS
41
+ #define VER_LEGALCOPYRIGHT_STR_WITH_YEARS L"\251 2021 Microsoft Corporation. All rights reserved."
42
+ #endif
43
+
44
+ #ifndef VER_LEGALCOPYRIGHT_STR
45
+ #if defined(RC_INVOKED) && !defined(WIN16)
46
+ #define VER_LEGALCOPYRIGHT_STR L"\251 Microsoft Corporation. All rights reserved."
47
+ #else
48
+ #define VER_LEGALCOPYRIGHT_STR "Copyright (c) Microsoft Corporation. All rights reserved."
49
+ #endif
50
+ #endif
51
+
52
+
53
+ #ifndef VER_PRODUCTNAME_STR
54
+ #ifdef RC_INVOKED
55
+ #define VER_PRODUCTNAME_STR L"Microsoft\256 Windows\256 Operating System"
56
+ #else
57
+ #define VER_PRODUCTNAME_STR "Microsoft (R) Windows (R) Operating System"
58
+ #endif
59
+ #endif
60
+
61
+ #ifndef VER_PRODUCTVERSION
62
+ #define VER_PRODUCTVERSION 5,00,01,001
63
+ #endif
64
+
65
+ #ifndef VER_FILEVERSION
66
+ #define VER_FILEVERSION VER_PRODUCTVERSION
67
+ #endif
68
+
69
+ #ifndef VER_PRODUCTVERSION_STR
70
+ #define VER_PRODUCTVERSION_STR "5.00"
71
+ #endif
72
+
73
+ #ifndef VER_FILEVERSION_STR
74
+ #define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR
75
+ #endif
76
+
77
+ #ifndef VER_ORIGINALFILENAME_STR
78
+ #define VER_ORIGINALFILENAME_STR VER_INTERNALNAME_STR
79
+ #endif
80
+
81
+ #ifdef EXPORT_CONTROLLED
82
+
83
+ #ifdef EXPORT
84
+ #define EXPORT_TAG " (Export Version)"
85
+ #else
86
+ #define EXPORT_TAG " (US/Canada Only, Not for Export)"
87
+ #endif
88
+
89
+ #else /* Not Export Controlled */
90
+
91
+ #define EXPORT_TAG
92
+
93
+ #endif
94
+
95
+ #if defined(__BUILDMACHINE__)
96
+
97
+ #if (defined(_NEED_FULLVERSION_INFO) || !defined(OFFICIAL_BUILD))
98
+ #if defined(__BUILDDATE__)
99
+ #define B2(x,y) " (" #x "." #y ")"
100
+ #define B1(x,y) B2(x, y)
101
+ #if (defined(_NEED_FULLVERSION_INFO) && defined(OFFICIAL_BUILD) && defined(_BUILDBRANCH))
102
+ #define BUILD_MACHINE_TAG B1(_BUILDBRANCH, __BUILDDATE__)
103
+ #else
104
+ #define BUILD_MACHINE_TAG B1(__BUILDMACHINE__, __BUILDDATE__)
105
+ #endif
106
+ #else
107
+ #define B2(x) " (" #x ".160101.0800)"
108
+ #define B1(x) B2(x)
109
+ #define BUILD_MACHINE_TAG B1(__BUILDMACHINE__)
110
+ #endif
111
+ #else
112
+ #define BUILD_MACHINE_TAG " (WinBuild.160101.0800)"
113
+ #endif
114
+
115
+ #if defined(__BUILDMACHINE_LEN__)
116
+ #if __BUILDMACHINE_LEN__ >= 25
117
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
118
+ #elif __BUILDMACHINE_LEN__ == 24
119
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
120
+ #elif __BUILDMACHINE_LEN__ == 23
121
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
122
+ #elif __BUILDMACHINE_LEN__ == 22
123
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
124
+ #elif __BUILDMACHINE_LEN__ == 21
125
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
126
+ #elif __BUILDMACHINE_LEN__ == 20
127
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
128
+ #elif __BUILDMACHINE_LEN__ == 19
129
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
130
+ #elif __BUILDMACHINE_LEN__ == 18
131
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
132
+ #elif __BUILDMACHINE_LEN__ == 17
133
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
134
+ #elif __BUILDMACHINE_LEN__ == 16
135
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
136
+ #elif __BUILDMACHINE_LEN__ == 15
137
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
138
+ #elif __BUILDMACHINE_LEN__ == 14
139
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
140
+ #elif __BUILDMACHINE_LEN__ == 13
141
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
142
+ #elif __BUILDMACHINE_LEN__ == 12
143
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
144
+ #elif __BUILDMACHINE_LEN__ == 11
145
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
146
+ #elif __BUILDMACHINE_LEN__ == 10
147
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
148
+ #elif __BUILDMACHINE_LEN__ == 9
149
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
150
+ #elif __BUILDMACHINE_LEN__ == 8
151
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
152
+ #elif __BUILDMACHINE_LEN__ == 7
153
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
154
+ #elif __BUILDMACHINE_LEN__ == 6
155
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
156
+ #elif __BUILDMACHINE_LEN__ == 5
157
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
158
+ #elif __BUILDMACHINE_LEN__ == 4
159
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
160
+ #elif __BUILDMACHINE_LEN__ == 3
161
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
162
+ #elif __BUILDMACHINE_LEN__ == 2
163
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
164
+ #elif __BUILDMACHINE_LEN__ == 1
165
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
166
+ #else
167
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
168
+ #endif
169
+ #else
170
+ #define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
171
+ #endif
172
+ #else
173
+ #define BUILD_MACHINE_TAG
174
+ #define BUILD_MACHINE_TAG_PADDED
175
+ #endif
176
+
177
+ #ifdef VER_LANGNEUTRAL
178
+ #ifndef VER_VERSION_UNICODE_LANG
179
+ #define VER_VERSION_UNICODE_LANG "000004B0" /* LANG_NEUTRAL/SUBLANG_NEUTRAL, Unicode CP */
180
+ #endif
181
+ #ifndef VER_VERSION_ANSI_LANG
182
+ #define VER_VERSION_ANSI_LANG "000004E4" /* LANG_NEUTRAL/SUBLANG_NEUTRAL, Ansi CP */
183
+ #endif
184
+ #ifndef VER_VERSION_TRANSLATION
185
+ #define VER_VERSION_TRANSLATION 0x0000, 0x04B0
186
+ #endif
187
+ #else
188
+ #ifndef VER_VERSION_UNICODE_LANG
189
+ #define VER_VERSION_UNICODE_LANG "040904B0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */
190
+ #endif
191
+ #ifndef VER_VERSION_ANSI_LANG
192
+ #define VER_VERSION_ANSI_LANG "0c0904E4" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Ansi CP */
193
+ #endif
194
+ #ifndef VER_VERSION_TRANSLATION
195
+ #define VER_VERSION_TRANSLATION 0x0409, 0x04B0
196
+ #endif
197
+ #endif
198
+
199
+
200
+ #ifdef SMP_ID
201
+ #define VER_SAMPLE_IDENTIFIER_STR SMP_ID
202
+ #endif
203
+
204
+ #ifndef VER_SAMPLE_IDENTIFIER
205
+ #define VER_SAMPLE_IDENTIFIER "SAMPLE_IDENTIFIER"
206
+ #endif
207
+
208
+ #ifdef VER_SAMPLE_IDENTIFIER_STR
209
+ resname RCDATA
210
+ {
211
+ VER_SAMPLE_IDENTIFIER,
212
+ VER_SAMPLE_IDENTIFIER_STR
213
+ }
214
+ #endif
215
+
216
+
217
+ #ifdef RC_INVOKED
218
+
219
+ VS_VERSION_INFO VERSIONINFO
220
+ FILEVERSION VER_FILEVERSION
221
+ PRODUCTVERSION VER_PRODUCTVERSION
222
+ FILEFLAGSMASK VER_FILEFLAGSMASK
223
+ FILEFLAGS VER_FILEFLAGS
224
+ FILEOS VER_FILEOS
225
+ FILETYPE VER_FILETYPE
226
+ FILESUBTYPE VER_FILESUBTYPE
227
+ BEGIN
228
+ BLOCK "StringFileInfo"
229
+ BEGIN
230
+ BLOCK VER_VERSION_UNICODE_LANG
231
+ BEGIN
232
+ VALUE "CompanyName", VER_COMPANYNAME_STR
233
+ VALUE "FileDescription", VER_FILEDESCRIPTION_STR EXPORT_TAG
234
+ VALUE "FileVersion", VER_FILEVERSION_STR BUILD_MACHINE_TAG_PADDED
235
+ VALUE "InternalName", VER_INTERNALNAME_STR
236
+ VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
237
+ VALUE "OriginalFilename",VER_ORIGINALFILENAME_STR
238
+ VALUE "ProductName", VER_PRODUCTNAME_STR
239
+ VALUE "ProductVersion", VER_PRODUCTVERSION_STR
240
+ #ifdef VER_OLESELFREGISTER
241
+ VALUE "OleSelfRegister", "\0"
242
+ #endif
243
+ END
244
+
245
+ #ifdef VER_ANSICP /* Some apps are hard coded to look for ANSI CP. */
246
+ BLOCK VER_VERSION_ANSI_LANG
247
+ BEGIN
248
+ VALUE "CompanyName", VER_COMPANYNAME_STR
249
+ VALUE "FileDescription", VER_FILEDESCRIPTION_STR EXPORT_TAG
250
+ VALUE "FileVersion", VER_FILEVERSION_STR
251
+ VALUE "InternalName", VER_INTERNALNAME_STR
252
+ VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
253
+ VALUE "OriginalFilename",VER_ORIGINALFILENAME_STR
254
+ VALUE "ProductName", VER_PRODUCTNAME_STR
255
+ VALUE "ProductVersion", VER_PRODUCTVERSION_STR
256
+ #ifdef VER_OLESELFREGISTER
257
+ VALUE "OleSelfRegister", "\0"
258
+ #endif
259
+ END
260
+ #endif
261
+ END
262
+
263
+ BLOCK "VarFileInfo"
264
+ BEGIN
265
+ VALUE "Translation", VER_VERSION_TRANSLATION
266
+ END
267
+ END
268
+
269
+ #endif
msvc/Windows Kits/10/Include/10.0.26100.0/shared/concurrencysal.h ADDED
@@ -0,0 +1,394 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***
2
+ *concurrencysal.h - markers for documenting the concurrent semantics of APIs
3
+ *
4
+ * Copyright (c) Microsoft Corporation. All rights reserved.
5
+ *
6
+ *Purpose:
7
+ * This file contains macros for Concurrency SAL annotations. Definitions
8
+ * starting with _Internal are low level macros that are subject to change.
9
+ * Users should not use those low level macros directly.
10
+ * [ANSI]
11
+ *
12
+ * [Public]
13
+ *
14
+ ****/
15
+
16
+ #ifndef CONCURRENCYSAL_H
17
+ #define CONCURRENCYSAL_H
18
+
19
+ #pragma once
20
+
21
+ #ifdef __cplusplus // [
22
+ extern "C" {
23
+ #endif // ]
24
+
25
+ #if !defined(__midl) && defined(_PREFAST_) && !defined(_SDV_)
26
+
27
+ __ANNOTATION(SAL_guarded_by(__deferTypecheck void *));
28
+ __ANNOTATION(SAL_write_guarded_by(__deferTypecheck void *));
29
+ __ANNOTATION(SAL_requires_lock_held(__deferTypecheck void *));
30
+ __ANNOTATION(SAL_requires_exclusive_lock_held(__deferTypecheck void *));
31
+ __ANNOTATION(SAL_requires_shared_lock_held(__deferTypecheck void *));
32
+ __ANNOTATION(SAL_requires_lock_not_held(__deferTypecheck void *));
33
+ __ANNOTATION(SAL_requires_no_locks_held(void));
34
+ __ANNOTATION(SAL_set_lock_count_to_zero(__deferTypecheck void *));
35
+ __ANNOTATION(SAL_set_lock_count_to_one(__deferTypecheck void *));
36
+ __ANNOTATION(SAL_acquires_lock(__deferTypecheck void *));
37
+ __ANNOTATION(SAL_acquires_exclusive_lock(__deferTypecheck void *));
38
+ __ANNOTATION(SAL_acquires_shared_lock(__deferTypecheck void *));
39
+ __ANNOTATION(SAL_releases_lock(__deferTypecheck void *));
40
+ __ANNOTATION(SAL_releases_exclusive_lock(__deferTypecheck void *));
41
+ __ANNOTATION(SAL_releases_shared_lock(__deferTypecheck void *));
42
+ __ANNOTATION(SAL_ignore_lock_match(__deferTypecheck void *));
43
+ __ANNOTATION(SAL_has_lock_property(__AuToQuOtE __In_impl_ char *));
44
+ __ANNOTATION(SAL_has_lock_level(__AuToQuOtE __In_impl_ char *));
45
+ __ANNOTATION(SAL_lock_level_order(__deferTypecheck void *, __deferTypecheck void *));
46
+ __ANNOTATION(SAL_no_competing_thread(void));
47
+ __ANNOTATION(SAL_set_same_lock(__deferTypecheck void *, __deferTypecheck void *));
48
+
49
+ /*
50
+ * pre-defined global system locks
51
+ */
52
+ extern int _Global_interlock_;
53
+ extern int _Global_cancel_spin_lock_;
54
+ extern int _Global_critical_region_;
55
+
56
+ /*
57
+ * Annotation identifiers
58
+ */
59
+ #define _Internal_create_CSAL_identifier_(id) const char id[] = "";
60
+
61
+ _Internal_create_CSAL_identifier_(_Lock_kind_mutex_)
62
+ _Internal_create_CSAL_identifier_(_Lock_kind_event_)
63
+ _Internal_create_CSAL_identifier_(_Lock_kind_semaphore_)
64
+ _Internal_create_CSAL_identifier_(_Lock_kind_spin_lock_)
65
+ _Internal_create_CSAL_identifier_(_Lock_kind_critical_section_)
66
+
67
+ /*
68
+ * data protection
69
+ */
70
+ #define _Guarded_by_(lock) _SAL2_Source_(_Guarded_by_, (lock), _SA_annotes1(SAL_guarded_by,lock))
71
+ #define _Write_guarded_by_(lock) _SAL2_Source_(_Write_guarded_by_, (lock), _SA_annotes1(SAL_write_guarded_by,lock))
72
+ #define _Interlocked_ _Guarded_by_(_Global_interlock_)
73
+
74
+ /*
75
+ * interlocked operand used in interlocked instructions
76
+ */
77
+ #ifndef _Interlocked_operand_
78
+ #define _Interlocked_operand_ _SAL2_Source_(_Interlocked_operand_, (), _Pre_ _SA_annotes0(SAL_interlocked))
79
+ #endif
80
+
81
+ /*
82
+ * caller/callee locking contracts
83
+ */
84
+ #define _Requires_lock_held_(lock) _SAL2_Source_(_Requires_lock_held_, (lock), _Pre_ _SA_annotes1(SAL_requires_lock_held,lock))
85
+ #define _Requires_exclusive_lock_held_(lock) _SAL2_Source_(_Requires_exclusive_lock_held_, (lock), _Pre_ _SA_annotes1(SAL_requires_exclusive_lock_held,lock))
86
+ #define _Requires_shared_lock_held_(lock) _SAL2_Source_(_Requires_shared_lock_held_, (lock), _Pre_ _SA_annotes1(SAL_requires_shared_lock_held,lock))
87
+
88
+ #define _Requires_lock_not_held_(lock) _SAL2_Source_(_Requires_lock_not_held_, (lock), _Pre_ _SA_annotes1(SAL_requires_lock_not_held,lock))
89
+ #define _Requires_no_locks_held_ _SAL2_Source_(_Requires_no_locks_held_, (), _Pre_ _SA_annotes0(SAL_requires_no_locks_held))
90
+
91
+ /*
92
+ * acquire/release locking side effects
93
+ */
94
+ #define _Acquires_lock_(lock) _SAL2_Source_(_Acquires_lock_, (lock), _Post_ _SA_annotes1(SAL_acquires_lock,lock))
95
+ #define _Acquires_exclusive_lock_(lock) _SAL2_Source_(_Acquires_exclusive_lock_, (lock), _Post_ _SA_annotes1(SAL_acquires_exclusive_lock,lock))
96
+ #define _Acquires_shared_lock_(lock) _SAL2_Source_(_Acquires_shared_lock_, (lock), _Post_ _SA_annotes1(SAL_acquires_shared_lock,lock))
97
+
98
+ #define _Releases_lock_(lock) _SAL2_Source_(_Releases_lock_, (lock), _Post_ _SA_annotes1(SAL_releases_lock,lock))
99
+ #define _Releases_exclusive_lock_(lock) _SAL2_Source_(_Releases_exclusive_lock_, (lock), _Post_ _SA_annotes1(SAL_releases_exclusive_lock,lock))
100
+ #define _Releases_shared_lock_(lock) _SAL2_Source_(_Releases_shared_lock_, (lock), _Post_ _SA_annotes1(SAL_releases_shared_lock,lock))
101
+
102
+ /*
103
+ * acquire/release locking side effects for non-reentrant locks
104
+ */
105
+ #define _Acquires_nonreentrant_lock_(lock) \
106
+ _SAL2_Source_(_Acquires_nonreentrant_lock_, (lock), \
107
+ _Requires_lock_not_held_(lock) \
108
+ _Acquires_lock_(lock))
109
+
110
+ #define _Releases_nonreentrant_lock_(lock) \
111
+ _SAL2_Source_(_Releases_nonreentrant_lock_, (lock), \
112
+ _Requires_lock_held_(lock) \
113
+ _Releases_lock_(lock))
114
+
115
+ #define _Post_same_lock_(a,b) _SAL2_Source_(_Post_same_lock_, (a,b), _Post_ _SA_annotes2(SAL_set_same_lock,a,b))
116
+
117
+ /*
118
+ * lock level
119
+ */
120
+ #define _Create_lock_level_(level) _Internal_create_CSAL_identifier_(level)
121
+
122
+ #define _Has_lock_level_(level) _SAL2_Source_(_Has_lock_level_, (level), _SA_annotes1(SAL_has_lock_level,#level))
123
+
124
+ #define _Internal_lock_level_order_(a,b) _SAL2_Source_(_Internal_lock_level_order_, (a,b), _SA_annotes2(SAL_lock_level_order,a,b))
125
+ #define _Csalcat1_(x,y) x##y
126
+ #define _Csalcat2_(x,y) _Csalcat1_(x,y)
127
+
128
+ #define _Lock_level_order_(a,b) \
129
+ extern _Internal_lock_level_order_(a,b) void _Sal_order_##a##_##b(_In_z_ const char*a, _In_z_ const char*b); \
130
+ static __inline void CSALCAT2(CSAL_LockOrder,__COUNTER__)(void){_Sal_order_##a##_##b(#a,#b);}
131
+
132
+ /*
133
+ * threading context
134
+ */
135
+ #define _No_competing_thread_ _SAL2_Source_(_No_competing_thread_, (), _Pre_ _SA_annotes0(SAL_no_competing_thread))
136
+
137
+ /*
138
+ * refinement and suppression
139
+ */
140
+ extern _Acquires_lock_(*plock) void _Internal_acquires_lock_(void* plock);
141
+ extern _Releases_lock_(*plock) void _Internal_releases_lock_(void* plock);
142
+
143
+ #define _Internal_set_lock_count_to_zero_(lock) _SAL2_Source_(Internal_set_lock_count_to_zero_, (lock), _Post_ _SA_annotes1(SAL_set_lock_count_to_zero,lock))
144
+ #define _Internal_set_lock_count_to_one_(lock) _SAL2_Source_(_Internal_set_lock_count_to_one_, (lock), _Post_ _SA_annotes1(SAL_set_lock_count_to_one,lock))
145
+
146
+ extern _Internal_set_lock_count_to_one_(*plock) void _Internal_lock_held_(void* plock);
147
+ extern _Internal_set_lock_count_to_zero_(*plock) void _Internal_lock_not_held_(void* plock);
148
+ extern _Post_same_lock_(*plock1, *plock2) void _Internal_same_lock_(void* plock1, void* plock2);
149
+
150
+ #define _Analysis_assume_lock_acquired_(lock) _Internal_acquires_lock_((void*)(&(lock)))
151
+ #define _Analysis_assume_lock_released_(lock) _Internal_releases_lock_((void*)(&(lock)))
152
+
153
+ #define _Analysis_assume_lock_held_(lock) _Internal_lock_held_((void*)(&(lock)))
154
+ #define _Analysis_assume_lock_not_held_(lock) _Internal_lock_not_held_((void*)(&(lock)))
155
+ #define _Analysis_assume_same_lock_(lock1, lock2) _Internal_same_lock_((void*)(&(lock1)), (void*)(&(lock2)))
156
+
157
+ /*
158
+ * _Function_ignore_lock_checking_ may be deprecated in future versions of SAL
159
+ */
160
+ #define _Function_ignore_lock_checking_(lock) _SAL2_Source_(_Function_ignore_lock_checking_, (lock), _Pre_ _SA_annotes1(SAL_ignore_lock_match,lock))
161
+ extern _Function_ignore_lock_checking_(*plock) void _Internal_suppress_lock_checking_(void* plock);
162
+
163
+ /*
164
+ * _Analysis_suppress_lock_checking_ may be deprecated in future versions of SAL
165
+ */
166
+ #define _Analysis_suppress_lock_checking_(lock) _Internal_suppress_lock_checking_((void*)(&(lock)));
167
+
168
+ #define _Benign_race_begin_ __pragma(warning(push)) __pragma(warning(disable:26100 26101 26150 26130 26180 26131 26181 28112))
169
+ #define _Benign_race_end_ __pragma(warning(pop))
170
+
171
+ #define _No_competing_thread_begin_ __pragma(warning(push)) __pragma(warning(disable:26100 26101 26150 26101 26151 26110 26160 26130 26180 26131 26181 28112))
172
+ #define _No_competing_thread_end_ __pragma(warning(pop))
173
+
174
+ /*
175
+ * lock kinds
176
+ */
177
+ #define _Has_lock_kind_(kind) _SAL2_Source_(_Has_lock_kind_, (kind), _SA_annotes1(SAL_has_lock_property,#kind))
178
+
179
+ /*
180
+ * smart locks (RAII lock wrappers)
181
+ */
182
+ #ifdef __cplusplus
183
+ } // extern "C"
184
+
185
+ extern "C++"
186
+ {
187
+ template<class _SmartLockType> _Acquires_lock_(_smartLock) void _Internal_acquires_smart_lock_(const _SmartLockType& _smartLock);
188
+ template<class _SmartLockType> _Releases_lock_(_smartLock) void _Internal_releases_smart_lock_(const _SmartLockType& _smartLock);
189
+ } // extern "C++"
190
+
191
+ #define _Analysis_assume_smart_lock_acquired_(lock) _Internal_acquires_smart_lock_((lock))
192
+ #define _Analysis_assume_smart_lock_released_(lock) _Internal_releases_smart_lock_((lock))
193
+
194
+ extern "C" {
195
+ #endif
196
+
197
+ /*
198
+ * move semantics
199
+ */
200
+ #define _Internal_swap_lock_ 0
201
+
202
+ #define _Detaches_lock_(detached, lock) _Post_same_lock_(_Internal_swap_lock_, (lock)) _Post_same_lock_((detached), _Internal_swap_lock_)
203
+ #define _Moves_lock_(target, source) _Post_same_lock_(_Internal_swap_lock_, (source)) _Post_same_lock_((target), _Internal_swap_lock_)
204
+ #define _Replaces_lock_(target, source) _Post_same_lock_(_Internal_swap_lock_, (target)) _Post_same_lock_((target), (source)) _Releases_lock_(_Internal_swap_lock_)
205
+ #define _Swaps_locks_(left, right) _Post_same_lock_(_Internal_swap_lock_, (left)) _Post_same_lock_((left), (right)) _Post_same_lock_((right), _Internal_swap_lock_)
206
+
207
+ /*
208
+ * Old spelling
209
+ * Note: the old version may be deprecated in the future!!!
210
+ */
211
+ extern int __system_interlock;
212
+ extern int __system_cancel_spinlock;
213
+ extern int __system_critical_region;
214
+
215
+ #define __guarded_by(lock) _SAL1_1_Source_(__guarded_by, (lock), _SA_annotes1(SAL_guarded_by,lock))
216
+ #define __write_guarded_by(lock) _SAL1_1_Source_(__write_guarded_by, (lock), _SA_annotes1(SAL_write_guarded_by,lock))
217
+ #define __interlocked __guarded_by(_Global_interlock_)
218
+
219
+ /*
220
+ * caller/callee locking contracts
221
+ */
222
+ #define __requires_lock_held(lock) _SAL1_1_Source_(__requires_lock_held, (lock), __pre _SA_annotes1(SAL_requires_lock_held,lock))
223
+ #define __requires_exclusive_lock_held(lock) _SAL1_1_Source_(__requires_exclusive_lock_held, (lock), __pre _SA_annotes1(SAL_requires_exclusive_lock_held,lock))
224
+ #define __requires_shared_lock_held(lock) _SAL1_1_Source_(__requires_shared_lock_held, (lock), __pre _SA_annotes1(SAL_requires_shared_lock_held,lock))
225
+
226
+ #define __requires_lock_not_held(lock) _SAL1_1_Source_(__requires_lock_not_held, (lock), __pre _SA_annotes1(SAL_requires_lock_not_held,lock))
227
+ #define __requires_no_locks_held _SAL1_1_Source_(__requires_no_locks_held, (), __pre _SA_annotes0(SAL_requires_no_locks_held))
228
+
229
+ /*
230
+ * acquire/release locking side effects
231
+ */
232
+ #define __acquires_lock(lock) _SAL1_1_Source_(__acquires_lock, (lock), __post _SA_annotes1(SAL_acquires_lock,lock))
233
+ #define __acquires_exclusive_lock(lock) _SAL1_1_Source_(__acquires_exclusive_lock, (lock), __post _SA_annotes1(SAL_acquires_exclusive_lock,lock))
234
+ #define __acquires_shared_lock(lock) _SAL1_1_Source_(__acquires_shared_lock, (lock), __post _SA_annotes1(SAL_acquires_shared_lock,lock))
235
+
236
+ #define __releases_lock(lock) _SAL1_1_Source_(__releases_lock, (lock), __post _SA_annotes1(SAL_releases_lock,lock))
237
+ #define __releases_exclusive_lock(lock) _SAL1_1_Source_(__releases_exclusive_lock, (lock),__post _SA_annotes1(SAL_releases_exclusive_lock,lock))
238
+ #define __releases_shared_lock(lock) _SAL1_1_Source_(__releases_shared_lock, (lock), __post _SA_annotes1(SAL_releases_shared_lock,lock))
239
+
240
+ /*
241
+ * lock properties
242
+ * The following kind options are supported:
243
+ * __has_lock_property(MUTEX)
244
+ * __has_lock_property(EVENT)
245
+ * __has_lock_property(SEMAPHORE)
246
+ * __has_lock_property(OTHER_HANDLE)
247
+ * __has_lock_property(REENTRANT)
248
+ * __has_lock_property(NON_REENTRANT)
249
+ */
250
+ #define __has_lock_property(kind) _SAL1_1_Source_(__has_lock_property, (kind), _SA_annotes1(SAL_has_lock_property,#kind))
251
+
252
+ /*
253
+ * lock level
254
+ */
255
+ #define __declare_lock_level(level) _Internal_create_CSAL_identifier_(level)
256
+ #define __has_lock_level(level) _SAL1_1_Source_(__has_lock_level, (level), _SA_annotes1(SAL_has_lock_level,#level))
257
+
258
+ #define __internal_lock_level_order(a,b) _SAL1_1_Source_(__internal_lock_level_order, (a,b), _SA_annotes2(SAL_lock_level_order,#a,#b))
259
+ #define CSALCAT1(x,y) x##y
260
+ #define CSALCAT2(x,y) CSALCAT1(x,y)
261
+
262
+ #define __lock_level_order(a,b) \
263
+ extern __internal_lock_level_order(a,b) void __sal_order_##a##_##b(__in_z char*a, __in_z char*b); \
264
+ static __inline void CSALCAT2(CSAL_LockOrder,__COUNTER__)(void){__sal_order_##a##_##b(#a,#b);}
265
+
266
+ /*
267
+ * threading context
268
+ */
269
+ #define __no_competing_thread _SAL1_1_Source_(__no_competing_thread, (), __pre _SA_annotes0(SAL_no_competing_thread))
270
+
271
+ /*
272
+ * refinement and suppression
273
+ */
274
+ extern __acquires_lock(*plock) void __internal_acquires_lock(void* plock);
275
+ extern __releases_lock(*plock) void __internal_releases_lock(void* plock);
276
+
277
+ #define __analysis_assume_lock_acquired(lock) __internal_acquires_lock((void*)(&(lock)))
278
+ #define __analysis_assume_lock_released(lock) __internal_releases_lock((void*)(&(lock)))
279
+
280
+ #define __function_ignore_lock_checking(lock) _SAL1_1_Source_(__function_ignore_lock_cleanup, (lock), __pre _SA_annotes1(SAL_ignore_lock_match,lock))
281
+ extern __function_ignore_lock_checking(*plock) void __internal_suppress_lock_checking(void* plock);
282
+
283
+ #define __analysis_suppress_lock_checking(lock) __internal_suppress_lock_checking((void*)(&(lock)));
284
+
285
+ #define BENIGN_RACE_BEGIN __pragma(warning(push)) __pragma(warning(disable:26100 26150 26130 26180 26131 26181))
286
+ #define BENIGN_RACE_END __pragma(warning(pop))
287
+
288
+ #define NO_COMPETING_THREAD_BEGIN __pragma(warning(push)) __pragma(warning(disable:26100 26150 26101 26151 26110 26160 26130 26180 26131 26181))
289
+ #define NO_COMPETING_THREAD_END __pragma(warning(pop))
290
+
291
+ #else
292
+
293
+ #ifndef _Interlocked_operand_
294
+ #define _Interlocked_operand_
295
+ #endif
296
+
297
+ #define _Guarded_by_(lock)
298
+ #define _Write_guarded_by_(lock)
299
+ #define _Interlocked_
300
+ #define _Requires_lock_held_(lock)
301
+ #define _Requires_exclusive_lock_held_(lock)
302
+ #define _Requires_shared_lock_held_(lock)
303
+ #define _Requires_lock_not_held_(lock)
304
+ #define _Requires_no_locks_held_
305
+ #define _Acquires_lock_(lock)
306
+ #define _Acquires_exclusive_lock_(lock)
307
+ #define _Acquires_shared_lock_(lock)
308
+ #define _Releases_lock_(lock)
309
+ #define _Releases_exclusive_lock_(lock)
310
+ #define _Releases_shared_lock_(lock)
311
+ #define _Acquires_nonreentrant_lock_(lock)
312
+ #define _Releases_nonreentrant_lock_(lock)
313
+
314
+ #define _Post_same_lock_(lock1,lock2)
315
+
316
+ #define _Internal_set_lock_count_(lock, count)
317
+
318
+ #define _Create_lock_level_(level)
319
+ #define _Has_lock_level_(level)
320
+ #define _Internal_lock_level_order_(a,b)
321
+ #define _Csalcat1_(x,y)
322
+ #define _Csalcat2_(x,y)
323
+ #define _Lock_level_order_(a,b)
324
+ #define _No_competing_thread_
325
+ #define _Analysis_assume_lock_acquired_(lock)
326
+ #define _Analysis_assume_lock_released_(lock)
327
+ #define _Analysis_assume_lock_held_(lock)
328
+ #define _Analysis_assume_lock_not_held_(lock)
329
+ #define _Analysis_assume_same_lock_(lock1, lock2)
330
+ #define _Function_ignore_lock_checking_(lock)
331
+ #define _Analysis_suppress_lock_checking_(lock)
332
+
333
+ #define _Benign_race_begin_ __pragma(warning(push))
334
+ #define _Benign_race_end_ __pragma(warning(pop))
335
+
336
+ #define _No_competing_thread_begin_ __pragma(warning(push))
337
+ #define _No_competing_thread_end_ __pragma(warning(pop))
338
+
339
+ #define _Has_lock_kind_(kind)
340
+
341
+ #ifdef __cplusplus
342
+ #define _Analysis_assume_smart_lock_acquired_(lock)
343
+ #define _Analysis_assume_smart_lock_released_(lock)
344
+ #endif
345
+
346
+ #define _Detaches_lock_(detached, lock)
347
+ #define _Moves_lock_(target, source)
348
+ #define _Replaces_lock_(target, source)
349
+ #define _Swaps_locks_(left, right)
350
+
351
+ /*
352
+ * Old spelling: will be deprecated
353
+ */
354
+ #define __guarded_by(lock)
355
+ #define __write_guarded_by(lock)
356
+ #define __interlocked
357
+ #define __requires_lock_held(lock)
358
+ #define __requires_exclusive_lock_held(lock)
359
+ #define __requires_shared_lock_held(lock)
360
+ #define __requires_lock_not_held(lock)
361
+ #define __requires_no_locks_held
362
+ #define __acquires_lock(lock)
363
+ #define __acquires_exclusive_lock(lock)
364
+ #define __acquires_shared_lock(lock)
365
+ #define __releases_lock(lock)
366
+ #define __releases_exclusive_lock(lock)
367
+ #define __releases_shared_lock(lock)
368
+
369
+ #define __has_lock_property(kind)
370
+ #define __declare_lock_level(level)
371
+ #define __has_lock_level(level)
372
+ #define __internal_lock_level_order(a,b)
373
+ #define CSALCAT1(x,y)
374
+ #define CSALCAT2(x,y)
375
+ #define __lock_level_order(a,b)
376
+ #define __no_competing_thread
377
+ #define __analysis_assume_lock_acquired(lock)
378
+ #define __analysis_assume_lock_released(lock)
379
+ #define __function_ignore_lock_checking(lock)
380
+ #define __analysis_suppress_lock_checking(lock)
381
+
382
+ #define BENIGN_RACE_BEGIN __pragma(warning(push))
383
+ #define BENIGN_RACE_END __pragma(warning(pop))
384
+
385
+ #define NO_COMPETING_THREAD_BEGIN __pragma(warning(push))
386
+ #define NO_COMPETING_THREAD_END __pragma(warning(pop))
387
+
388
+ #endif
389
+
390
+ #ifdef __cplusplus
391
+ }
392
+ #endif
393
+
394
+ #endif // CONCURRENCYSAL_H
msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3d9.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/d3d9caps.h ADDED
@@ -0,0 +1,576 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*==========================================================================;
2
+ *
3
+ * Copyright (C) Microsoft Corporation. All Rights Reserved.
4
+ *
5
+ * File: d3d9caps.h
6
+ * Content: Direct3D capabilities include file
7
+ *
8
+ ***************************************************************************/
9
+
10
+ #ifndef _d3d9CAPS_H
11
+ #define _d3d9CAPS_H
12
+
13
+ #ifndef DIRECT3D_VERSION
14
+ #define DIRECT3D_VERSION 0x0900
15
+ #endif //DIRECT3D_VERSION
16
+
17
+ // include this file content only if compiling for DX9 interfaces
18
+ #if(DIRECT3D_VERSION >= 0x0900)
19
+
20
+ #include <winapifamily.h>
21
+
22
+ #pragma region Desktop Family
23
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
24
+
25
+ #if defined(_X86_) || defined(_IA64_)
26
+ #pragma pack(4)
27
+ #endif
28
+
29
+ typedef struct _D3DVSHADERCAPS2_0
30
+ {
31
+ DWORD Caps;
32
+ INT DynamicFlowControlDepth;
33
+ INT NumTemps;
34
+ INT StaticFlowControlDepth;
35
+ } D3DVSHADERCAPS2_0;
36
+
37
+ #define D3DVS20CAPS_PREDICATION (1<<0)
38
+
39
+ #define D3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH 24
40
+ #define D3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
41
+ #define D3DVS20_MAX_NUMTEMPS 32
42
+ #define D3DVS20_MIN_NUMTEMPS 12
43
+ #define D3DVS20_MAX_STATICFLOWCONTROLDEPTH 4
44
+ #define D3DVS20_MIN_STATICFLOWCONTROLDEPTH 1
45
+
46
+ typedef struct _D3DPSHADERCAPS2_0
47
+ {
48
+ DWORD Caps;
49
+ INT DynamicFlowControlDepth;
50
+ INT NumTemps;
51
+ INT StaticFlowControlDepth;
52
+ INT NumInstructionSlots;
53
+ } D3DPSHADERCAPS2_0;
54
+
55
+ #define D3DPS20CAPS_ARBITRARYSWIZZLE (1<<0)
56
+ #define D3DPS20CAPS_GRADIENTINSTRUCTIONS (1<<1)
57
+ #define D3DPS20CAPS_PREDICATION (1<<2)
58
+ #define D3DPS20CAPS_NODEPENDENTREADLIMIT (1<<3)
59
+ #define D3DPS20CAPS_NOTEXINSTRUCTIONLIMIT (1<<4)
60
+
61
+ #define D3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH 24
62
+ #define D3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
63
+ #define D3DPS20_MAX_NUMTEMPS 32
64
+ #define D3DPS20_MIN_NUMTEMPS 12
65
+ #define D3DPS20_MAX_STATICFLOWCONTROLDEPTH 4
66
+ #define D3DPS20_MIN_STATICFLOWCONTROLDEPTH 0
67
+ #define D3DPS20_MAX_NUMINSTRUCTIONSLOTS 512
68
+ #define D3DPS20_MIN_NUMINSTRUCTIONSLOTS 96
69
+
70
+ #define D3DMIN30SHADERINSTRUCTIONS 512
71
+ #define D3DMAX30SHADERINSTRUCTIONS 32768
72
+
73
+ /* D3D9Ex only -- */
74
+ #if !defined(D3D_DISABLE_9EX)
75
+
76
+ typedef struct _D3DOVERLAYCAPS
77
+ {
78
+ UINT Caps;
79
+ UINT MaxOverlayDisplayWidth;
80
+ UINT MaxOverlayDisplayHeight;
81
+ } D3DOVERLAYCAPS;
82
+
83
+ #define D3DOVERLAYCAPS_FULLRANGERGB 0x00000001
84
+ #define D3DOVERLAYCAPS_LIMITEDRANGERGB 0x00000002
85
+ #define D3DOVERLAYCAPS_YCbCr_BT601 0x00000004
86
+ #define D3DOVERLAYCAPS_YCbCr_BT709 0x00000008
87
+ #define D3DOVERLAYCAPS_YCbCr_BT601_xvYCC 0x00000010
88
+ #define D3DOVERLAYCAPS_YCbCr_BT709_xvYCC 0x00000020
89
+ #define D3DOVERLAYCAPS_STRETCHX 0x00000040
90
+ #define D3DOVERLAYCAPS_STRETCHY 0x00000080
91
+
92
+
93
+ typedef struct _D3DCONTENTPROTECTIONCAPS
94
+ {
95
+ DWORD Caps;
96
+ GUID KeyExchangeType;
97
+ UINT BufferAlignmentStart;
98
+ UINT BlockAlignmentSize;
99
+ ULONGLONG ProtectedMemorySize;
100
+ } D3DCONTENTPROTECTIONCAPS;
101
+
102
+ #define D3DCPCAPS_SOFTWARE 0x00000001
103
+ #define D3DCPCAPS_HARDWARE 0x00000002
104
+ #define D3DCPCAPS_PROTECTIONALWAYSON 0x00000004
105
+ #define D3DCPCAPS_PARTIALDECRYPTION 0x00000008
106
+ #define D3DCPCAPS_CONTENTKEY 0x00000010
107
+ #define D3DCPCAPS_FRESHENSESSIONKEY 0x00000020
108
+ #define D3DCPCAPS_ENCRYPTEDREADBACK 0x00000040
109
+ #define D3DCPCAPS_ENCRYPTEDREADBACKKEY 0x00000080
110
+ #define D3DCPCAPS_SEQUENTIAL_CTR_IV 0x00000100
111
+ #define D3DCPCAPS_ENCRYPTSLICEDATAONLY 0x00000200
112
+
113
+ DEFINE_GUID(D3DCRYPTOTYPE_AES128_CTR,
114
+ 0x9b6bd711, 0x4f74, 0x41c9, 0x9e, 0x7b, 0xb, 0xe2, 0xd7, 0xd9, 0x3b, 0x4f);
115
+ DEFINE_GUID(D3DCRYPTOTYPE_PROPRIETARY,
116
+ 0xab4e9afd, 0x1d1c, 0x46e6, 0xa7, 0x2f, 0x8, 0x69, 0x91, 0x7b, 0xd, 0xe8);
117
+
118
+ DEFINE_GUID(D3DKEYEXCHANGE_RSAES_OAEP,
119
+ 0xc1949895, 0xd72a, 0x4a1d, 0x8e, 0x5d, 0xed, 0x85, 0x7d, 0x17, 0x15, 0x20);
120
+ DEFINE_GUID(D3DKEYEXCHANGE_DXVA,
121
+ 0x43d3775c, 0x38e5, 0x4924, 0x8d, 0x86, 0xd3, 0xfc, 0xcf, 0x15, 0x3e, 0x9b);
122
+
123
+ #endif // !D3D_DISABLE_9EX
124
+ /* -- D3D9Ex only */
125
+
126
+ typedef struct _D3DCAPS9
127
+ {
128
+ /* Device Info */
129
+ D3DDEVTYPE DeviceType;
130
+ UINT AdapterOrdinal;
131
+
132
+ /* Caps from DX7 Draw */
133
+ DWORD Caps;
134
+ DWORD Caps2;
135
+ DWORD Caps3;
136
+ DWORD PresentationIntervals;
137
+
138
+ /* Cursor Caps */
139
+ DWORD CursorCaps;
140
+
141
+ /* 3D Device Caps */
142
+ DWORD DevCaps;
143
+
144
+ DWORD PrimitiveMiscCaps;
145
+ DWORD RasterCaps;
146
+ DWORD ZCmpCaps;
147
+ DWORD SrcBlendCaps;
148
+ DWORD DestBlendCaps;
149
+ DWORD AlphaCmpCaps;
150
+ DWORD ShadeCaps;
151
+ DWORD TextureCaps;
152
+ DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture9's
153
+ DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture9's
154
+ DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture9's
155
+ DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture9's
156
+ DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture9's
157
+
158
+ DWORD LineCaps; // D3DLINECAPS
159
+
160
+ DWORD MaxTextureWidth, MaxTextureHeight;
161
+ DWORD MaxVolumeExtent;
162
+
163
+ DWORD MaxTextureRepeat;
164
+ DWORD MaxTextureAspectRatio;
165
+ DWORD MaxAnisotropy;
166
+ float MaxVertexW;
167
+
168
+ float GuardBandLeft;
169
+ float GuardBandTop;
170
+ float GuardBandRight;
171
+ float GuardBandBottom;
172
+
173
+ float ExtentsAdjust;
174
+ DWORD StencilCaps;
175
+
176
+ DWORD FVFCaps;
177
+ DWORD TextureOpCaps;
178
+ DWORD MaxTextureBlendStages;
179
+ DWORD MaxSimultaneousTextures;
180
+
181
+ DWORD VertexProcessingCaps;
182
+ DWORD MaxActiveLights;
183
+ DWORD MaxUserClipPlanes;
184
+ DWORD MaxVertexBlendMatrices;
185
+ DWORD MaxVertexBlendMatrixIndex;
186
+
187
+ float MaxPointSize;
188
+
189
+ DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call
190
+ DWORD MaxVertexIndex;
191
+ DWORD MaxStreams;
192
+ DWORD MaxStreamStride; // max stride for SetStreamSource
193
+
194
+ DWORD VertexShaderVersion;
195
+ DWORD MaxVertexShaderConst; // number of vertex shader constant registers
196
+
197
+ DWORD PixelShaderVersion;
198
+ float PixelShader1xMaxValue; // max value storable in registers of ps.1.x shaders
199
+
200
+ // Here are the DX9 specific ones
201
+ DWORD DevCaps2;
202
+
203
+ float MaxNpatchTessellationLevel;
204
+ DWORD Reserved5;
205
+
206
+ UINT MasterAdapterOrdinal; // ordinal of master adaptor for adapter group
207
+ UINT AdapterOrdinalInGroup; // ordinal inside the adapter group
208
+ UINT NumberOfAdaptersInGroup; // number of adapters in this adapter group (only if master)
209
+ DWORD DeclTypes; // Data types, supported in vertex declarations
210
+ DWORD NumSimultaneousRTs; // Will be at least 1
211
+ DWORD StretchRectFilterCaps; // Filter caps supported by StretchRect
212
+ D3DVSHADERCAPS2_0 VS20Caps;
213
+ D3DPSHADERCAPS2_0 PS20Caps;
214
+ DWORD VertexTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture9's for texture, used in vertex shaders
215
+ DWORD MaxVShaderInstructionsExecuted; // maximum number of vertex shader instructions that can be executed
216
+ DWORD MaxPShaderInstructionsExecuted; // maximum number of pixel shader instructions that can be executed
217
+ DWORD MaxVertexShader30InstructionSlots;
218
+ DWORD MaxPixelShader30InstructionSlots;
219
+ } D3DCAPS9;
220
+
221
+ //
222
+ // BIT DEFINES FOR D3DCAPS9 DWORD MEMBERS
223
+ //
224
+
225
+ //
226
+ // Caps
227
+ //
228
+ #define D3DCAPS_OVERLAY 0x00000800L
229
+ #define D3DCAPS_READ_SCANLINE 0x00020000L
230
+
231
+ //
232
+ // Caps2
233
+ //
234
+ #define D3DCAPS2_FULLSCREENGAMMA 0x00020000L
235
+ #define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L
236
+ #define D3DCAPS2_RESERVED 0x02000000L
237
+ #define D3DCAPS2_CANMANAGERESOURCE 0x10000000L
238
+ #define D3DCAPS2_DYNAMICTEXTURES 0x20000000L
239
+ #define D3DCAPS2_CANAUTOGENMIPMAP 0x40000000L
240
+
241
+ /* D3D9Ex only -- */
242
+ #if !defined(D3D_DISABLE_9EX)
243
+
244
+ #define D3DCAPS2_CANSHARERESOURCE 0x80000000L
245
+
246
+ #endif // !D3D_DISABLE_9EX
247
+ /* -- D3D9Ex only */
248
+
249
+ //
250
+ // Caps3
251
+ //
252
+ #define D3DCAPS3_RESERVED 0x8000001fL
253
+
254
+ // Indicates that the device can respect the ALPHABLENDENABLE render state
255
+ // when fullscreen while using the FLIP or DISCARD swap effect.
256
+ // COPY and COPYVSYNC swap effects work whether or not this flag is set.
257
+ #define D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD 0x00000020L
258
+
259
+ // Indicates that the device can perform a gamma correction from
260
+ // a windowed back buffer containing linear content to the sRGB desktop.
261
+ #define D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION 0x00000080L
262
+
263
+ #define D3DCAPS3_COPY_TO_VIDMEM 0x00000100L /* Device can acclerate copies from sysmem to local vidmem */
264
+ #define D3DCAPS3_COPY_TO_SYSTEMMEM 0x00000200L /* Device can acclerate copies from local vidmem to sysmem */
265
+ #define D3DCAPS3_DXVAHD 0x00000400L
266
+ #define D3DCAPS3_DXVAHD_LIMITED 0x00000800L
267
+
268
+
269
+ //
270
+ // PresentationIntervals
271
+ //
272
+ #define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L
273
+ #define D3DPRESENT_INTERVAL_ONE 0x00000001L
274
+ #define D3DPRESENT_INTERVAL_TWO 0x00000002L
275
+ #define D3DPRESENT_INTERVAL_THREE 0x00000004L
276
+ #define D3DPRESENT_INTERVAL_FOUR 0x00000008L
277
+ #define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L
278
+
279
+ //
280
+ // CursorCaps
281
+ //
282
+ // Driver supports HW color cursor in at least hi-res modes(height >=400)
283
+ #define D3DCURSORCAPS_COLOR 0x00000001L
284
+ // Driver supports HW cursor also in low-res modes(height < 400)
285
+ #define D3DCURSORCAPS_LOWRES 0x00000002L
286
+
287
+ //
288
+ // DevCaps
289
+ //
290
+ #define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
291
+ #define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
292
+ #define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
293
+ #define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
294
+ #define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
295
+ #define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
296
+ #define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
297
+ #define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
298
+ #define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
299
+ #define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
300
+ #define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
301
+ #define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
302
+ #define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
303
+ #define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
304
+ #define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
305
+ #define D3DDEVCAPS_PUREDEVICE 0x00100000L /* Device supports D3DCREATE_PUREDEVICE */
306
+ #define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000L /* Device supports quintic Beziers and BSplines */
307
+ #define D3DDEVCAPS_RTPATCHES 0x00400000L /* Device supports Rect and Tri patches */
308
+ #define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */
309
+ #define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */
310
+
311
+ //
312
+ // PrimitiveMiscCaps
313
+ //
314
+ #define D3DPMISCCAPS_MASKZ 0x00000002L
315
+ #define D3DPMISCCAPS_CULLNONE 0x00000010L
316
+ #define D3DPMISCCAPS_CULLCW 0x00000020L
317
+ #define D3DPMISCCAPS_CULLCCW 0x00000040L
318
+ #define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080L
319
+ #define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100L /* Device correctly clips scaled points to clip planes */
320
+ #define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */
321
+ #define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */
322
+ #define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */
323
+ #define D3DPMISCCAPS_NULLREFERENCE 0x00001000L /* Reference Device that doesnt render */
324
+ #define D3DPMISCCAPS_INDEPENDENTWRITEMASKS 0x00004000L /* Device supports independent write masks for MET or MRT */
325
+ #define D3DPMISCCAPS_PERSTAGECONSTANT 0x00008000L /* Device supports per-stage constants */
326
+ #define D3DPMISCCAPS_FOGANDSPECULARALPHA 0x00010000L /* Device supports separate fog and specular alpha (many devices
327
+ use the specular alpha channel to store fog factor) */
328
+ #define D3DPMISCCAPS_SEPARATEALPHABLEND 0x00020000L /* Device supports separate blend settings for the alpha channel */
329
+ #define D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS 0x00040000L /* Device supports different bit depths for MRT */
330
+ #define D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000L /* Device supports post-pixel shader operations for MRT */
331
+ #define D3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000L /* Device clamps fog blend factor per vertex */
332
+
333
+ /* D3D9Ex only -- */
334
+ #if !defined(D3D_DISABLE_9EX)
335
+
336
+ #define D3DPMISCCAPS_POSTBLENDSRGBCONVERT 0x00200000L /* Indicates device can perform conversion to sRGB after blending. */
337
+
338
+ #endif // !D3D_DISABLE_9EX
339
+ /* -- D3D9Ex only */
340
+
341
+
342
+ //
343
+ // LineCaps
344
+ //
345
+ #define D3DLINECAPS_TEXTURE 0x00000001L
346
+ #define D3DLINECAPS_ZTEST 0x00000002L
347
+ #define D3DLINECAPS_BLEND 0x00000004L
348
+ #define D3DLINECAPS_ALPHACMP 0x00000008L
349
+ #define D3DLINECAPS_FOG 0x00000010L
350
+ #define D3DLINECAPS_ANTIALIAS 0x00000020L
351
+
352
+ //
353
+ // RasterCaps
354
+ //
355
+ #define D3DPRASTERCAPS_DITHER 0x00000001L
356
+ #define D3DPRASTERCAPS_ZTEST 0x00000010L
357
+ #define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
358
+ #define D3DPRASTERCAPS_FOGTABLE 0x00000100L
359
+ #define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
360
+ #define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
361
+ #define D3DPRASTERCAPS_FOGRANGE 0x00010000L
362
+ #define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
363
+ #define D3DPRASTERCAPS_WBUFFER 0x00040000L
364
+ #define D3DPRASTERCAPS_WFOG 0x00100000L
365
+ #define D3DPRASTERCAPS_ZFOG 0x00200000L
366
+ #define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L /* Device iterates colors perspective correct */
367
+ #define D3DPRASTERCAPS_SCISSORTEST 0x01000000L
368
+ #define D3DPRASTERCAPS_SLOPESCALEDEPTHBIAS 0x02000000L
369
+ #define D3DPRASTERCAPS_DEPTHBIAS 0x04000000L
370
+ #define D3DPRASTERCAPS_MULTISAMPLE_TOGGLE 0x08000000L
371
+
372
+ //
373
+ // ZCmpCaps, AlphaCmpCaps
374
+ //
375
+ #define D3DPCMPCAPS_NEVER 0x00000001L
376
+ #define D3DPCMPCAPS_LESS 0x00000002L
377
+ #define D3DPCMPCAPS_EQUAL 0x00000004L
378
+ #define D3DPCMPCAPS_LESSEQUAL 0x00000008L
379
+ #define D3DPCMPCAPS_GREATER 0x00000010L
380
+ #define D3DPCMPCAPS_NOTEQUAL 0x00000020L
381
+ #define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
382
+ #define D3DPCMPCAPS_ALWAYS 0x00000080L
383
+
384
+ //
385
+ // SourceBlendCaps, DestBlendCaps
386
+ //
387
+ #define D3DPBLENDCAPS_ZERO 0x00000001L
388
+ #define D3DPBLENDCAPS_ONE 0x00000002L
389
+ #define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
390
+ #define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
391
+ #define D3DPBLENDCAPS_SRCALPHA 0x00000010L
392
+ #define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
393
+ #define D3DPBLENDCAPS_DESTALPHA 0x00000040L
394
+ #define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
395
+ #define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
396
+ #define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
397
+ #define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
398
+ #define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
399
+ #define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
400
+ #define D3DPBLENDCAPS_BLENDFACTOR 0x00002000L /* Supports both D3DBLEND_BLENDFACTOR and D3DBLEND_INVBLENDFACTOR */
401
+
402
+ /* D3D9Ex only -- */
403
+ #if !defined(D3D_DISABLE_9EX)
404
+
405
+ #define D3DPBLENDCAPS_SRCCOLOR2 0x00004000L
406
+ #define D3DPBLENDCAPS_INVSRCCOLOR2 0x00008000L
407
+
408
+ #endif // !D3D_DISABLE_9EX
409
+ /* -- D3D9Ex only */
410
+
411
+
412
+ //
413
+ // ShadeCaps
414
+ //
415
+ #define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
416
+ #define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
417
+ #define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
418
+ #define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
419
+
420
+ //
421
+ // TextureCaps
422
+ //
423
+ #define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */
424
+ #define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */
425
+ #define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */
426
+ #define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */
427
+ #define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */
428
+ #define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */
429
+ // Device can use non-POW2 textures if:
430
+ // 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
431
+ // 2) D3DRS_WRAP(N) is zero for this texture's coordinates
432
+ // 3) mip mapping is not enabled (use magnification filter only)
433
+ #define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
434
+ #define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */
435
+ #define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */
436
+ #define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000L /* Device can do volume textures */
437
+ #define D3DPTEXTURECAPS_MIPMAP 0x00004000L /* Device can do mipmapped textures */
438
+ #define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L /* Device can do mipmapped volume textures */
439
+ #define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L /* Device can do mipmapped cube maps */
440
+ #define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L /* Device requires that cubemaps be power-of-2 dimension */
441
+ #define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L /* Device requires that volume maps be power-of-2 dimension */
442
+ #define D3DPTEXTURECAPS_NOPROJECTEDBUMPENV 0x00200000L /* Device does not support projected bump env lookup operation
443
+ in programmable and fixed function pixel shaders */
444
+
445
+ //
446
+ // TextureFilterCaps, StretchRectFilterCaps
447
+ //
448
+ #define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */
449
+ #define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
450
+ #define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
451
+ #define D3DPTFILTERCAPS_MINFPYRAMIDALQUAD 0x00000800L
452
+ #define D3DPTFILTERCAPS_MINFGAUSSIANQUAD 0x00001000L
453
+ #define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L /* Mip Filter */
454
+ #define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
455
+
456
+ /* D3D9Ex only -- */
457
+ #if !defined(D3D_DISABLE_9EX)
458
+
459
+ #define D3DPTFILTERCAPS_CONVOLUTIONMONO 0x00040000L /* Min and Mag for the convolution mono filter */
460
+
461
+ #endif // !D3D_DISABLE_9EX
462
+ /* -- D3D9Ex only */
463
+
464
+ #define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */
465
+ #define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
466
+ #define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
467
+ #define D3DPTFILTERCAPS_MAGFPYRAMIDALQUAD 0x08000000L
468
+ #define D3DPTFILTERCAPS_MAGFGAUSSIANQUAD 0x10000000L
469
+
470
+ //
471
+ // TextureAddressCaps
472
+ //
473
+ #define D3DPTADDRESSCAPS_WRAP 0x00000001L
474
+ #define D3DPTADDRESSCAPS_MIRROR 0x00000002L
475
+ #define D3DPTADDRESSCAPS_CLAMP 0x00000004L
476
+ #define D3DPTADDRESSCAPS_BORDER 0x00000008L
477
+ #define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
478
+ #define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L
479
+
480
+ //
481
+ // StencilCaps
482
+ //
483
+ #define D3DSTENCILCAPS_KEEP 0x00000001L
484
+ #define D3DSTENCILCAPS_ZERO 0x00000002L
485
+ #define D3DSTENCILCAPS_REPLACE 0x00000004L
486
+ #define D3DSTENCILCAPS_INCRSAT 0x00000008L
487
+ #define D3DSTENCILCAPS_DECRSAT 0x00000010L
488
+ #define D3DSTENCILCAPS_INVERT 0x00000020L
489
+ #define D3DSTENCILCAPS_INCR 0x00000040L
490
+ #define D3DSTENCILCAPS_DECR 0x00000080L
491
+ #define D3DSTENCILCAPS_TWOSIDED 0x00000100L
492
+
493
+ //
494
+ // TextureOpCaps
495
+ //
496
+ #define D3DTEXOPCAPS_DISABLE 0x00000001L
497
+ #define D3DTEXOPCAPS_SELECTARG1 0x00000002L
498
+ #define D3DTEXOPCAPS_SELECTARG2 0x00000004L
499
+ #define D3DTEXOPCAPS_MODULATE 0x00000008L
500
+ #define D3DTEXOPCAPS_MODULATE2X 0x00000010L
501
+ #define D3DTEXOPCAPS_MODULATE4X 0x00000020L
502
+ #define D3DTEXOPCAPS_ADD 0x00000040L
503
+ #define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
504
+ #define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
505
+ #define D3DTEXOPCAPS_SUBTRACT 0x00000200L
506
+ #define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
507
+ #define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
508
+ #define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
509
+ #define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
510
+ #define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
511
+ #define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
512
+ #define D3DTEXOPCAPS_PREMODULATE 0x00010000L
513
+ #define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
514
+ #define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
515
+ #define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
516
+ #define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
517
+ #define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
518
+ #define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
519
+ #define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
520
+ #define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L
521
+ #define D3DTEXOPCAPS_LERP 0x02000000L
522
+
523
+ //
524
+ // FVFCaps
525
+ //
526
+ #define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
527
+ #define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
528
+ #define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */
529
+
530
+ //
531
+ // VertexProcessingCaps
532
+ //
533
+ #define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */
534
+ #define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */
535
+ #define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */
536
+ #define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L /* device can do positional lights (includes point and spot) */
537
+ #define D3DVTXPCAPS_LOCALVIEWER 0x00000020L /* device can do local viewer */
538
+ #define D3DVTXPCAPS_TWEENING 0x00000040L /* device can do vertex tweening */
539
+ #define D3DVTXPCAPS_TEXGEN_SPHEREMAP 0x00000100L /* device supports D3DTSS_TCI_SPHEREMAP */
540
+ #define D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER 0x00000200L /* device does not support TexGen in non-local
541
+ viewer mode */
542
+
543
+ //
544
+ // DevCaps2
545
+ //
546
+ #define D3DDEVCAPS2_STREAMOFFSET 0x00000001L /* Device supports offsets in streams. Must be set by DX9 drivers */
547
+ #define D3DDEVCAPS2_DMAPNPATCH 0x00000002L /* Device supports displacement maps for N-Patches*/
548
+ #define D3DDEVCAPS2_ADAPTIVETESSRTPATCH 0x00000004L /* Device supports adaptive tesselation of RT-patches*/
549
+ #define D3DDEVCAPS2_ADAPTIVETESSNPATCH 0x00000008L /* Device supports adaptive tesselation of N-patches*/
550
+ #define D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES 0x00000010L /* Device supports StretchRect calls with a texture as the source*/
551
+ #define D3DDEVCAPS2_PRESAMPLEDDMAPNPATCH 0x00000020L /* Device supports presampled displacement maps for N-Patches */
552
+ #define D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET 0x00000040L /* Vertex elements in a vertex declaration can share the same stream offset */
553
+
554
+ //
555
+ // DeclTypes
556
+ //
557
+ #define D3DDTCAPS_UBYTE4 0x00000001L
558
+ #define D3DDTCAPS_UBYTE4N 0x00000002L
559
+ #define D3DDTCAPS_SHORT2N 0x00000004L
560
+ #define D3DDTCAPS_SHORT4N 0x00000008L
561
+ #define D3DDTCAPS_USHORT2N 0x00000010L
562
+ #define D3DDTCAPS_USHORT4N 0x00000020L
563
+ #define D3DDTCAPS_UDEC3 0x00000040L
564
+ #define D3DDTCAPS_DEC3N 0x00000080L
565
+ #define D3DDTCAPS_FLOAT16_2 0x00000100L
566
+ #define D3DDTCAPS_FLOAT16_4 0x00000200L
567
+
568
+
569
+ #pragma pack()
570
+
571
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
572
+ #pragma endregion
573
+
574
+ #endif /* (DIRECT3D_VERSION >= 0x0900) */
575
+ #endif /* _d3d9CAPS_H_ */
576
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3d9types.h ADDED
@@ -0,0 +1,2455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*==========================================================================;
2
+ *
3
+ * Copyright (C) Microsoft Corporation. All Rights Reserved.
4
+ *
5
+ * File: d3d9types.h
6
+ * Content: Direct3D capabilities include file
7
+ *
8
+ ***************************************************************************/
9
+
10
+ #ifndef _d3d9TYPES_H_
11
+ #define _d3d9TYPES_H_
12
+
13
+ #include <winapifamily.h>
14
+
15
+ #ifndef DIRECT3D_VERSION
16
+ #define DIRECT3D_VERSION 0x0900
17
+ #endif //DIRECT3D_VERSION
18
+
19
+ // include this file content only if compiling for DX9 interfaces
20
+ #if(DIRECT3D_VERSION >= 0x0900)
21
+
22
+ #include <float.h>
23
+
24
+ #if _MSC_VER >= 1200
25
+ #pragma warning(push)
26
+ #endif
27
+ #pragma warning(disable:4201) // anonymous unions warning
28
+ #if defined(_X86_) || defined(_IA64_)
29
+ #pragma pack(4)
30
+ #endif
31
+
32
+ #pragma region Desktop Family
33
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
34
+
35
+ // D3DCOLOR is equivalent to D3DFMT_A8R8G8B8
36
+ #ifndef D3DCOLOR_DEFINED
37
+ typedef DWORD D3DCOLOR;
38
+ #define D3DCOLOR_DEFINED
39
+ #endif
40
+
41
+ // maps unsigned 8 bits/channel to D3DCOLOR
42
+ #define D3DCOLOR_ARGB(a,r,g,b) \
43
+ ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
44
+ #define D3DCOLOR_RGBA(r,g,b,a) D3DCOLOR_ARGB(a,r,g,b)
45
+ #define D3DCOLOR_XRGB(r,g,b) D3DCOLOR_ARGB(0xff,r,g,b)
46
+
47
+ #define D3DCOLOR_XYUV(y,u,v) D3DCOLOR_ARGB(0xff,y,u,v)
48
+ #define D3DCOLOR_AYUV(a,y,u,v) D3DCOLOR_ARGB(a,y,u,v)
49
+
50
+ // maps floating point channels (0.f to 1.f range) to D3DCOLOR
51
+ #define D3DCOLOR_COLORVALUE(r,g,b,a) \
52
+ D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))
53
+
54
+
55
+ #ifndef D3DVECTOR_DEFINED
56
+ typedef struct _D3DVECTOR {
57
+ float x;
58
+ float y;
59
+ float z;
60
+ } D3DVECTOR;
61
+ #define D3DVECTOR_DEFINED
62
+ #endif
63
+
64
+ #ifndef D3DCOLORVALUE_DEFINED
65
+ typedef struct _D3DCOLORVALUE {
66
+ float r;
67
+ float g;
68
+ float b;
69
+ float a;
70
+ } D3DCOLORVALUE;
71
+ #define D3DCOLORVALUE_DEFINED
72
+ #endif
73
+
74
+ #ifndef D3DRECT_DEFINED
75
+ typedef struct _D3DRECT {
76
+ LONG x1;
77
+ LONG y1;
78
+ LONG x2;
79
+ LONG y2;
80
+ } D3DRECT;
81
+ #define D3DRECT_DEFINED
82
+ #endif
83
+
84
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
85
+ #pragma endregion
86
+
87
+ #pragma region App Family
88
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
89
+
90
+ #ifndef D3DMATRIX_DEFINED
91
+ typedef struct _D3DMATRIX {
92
+ union {
93
+ struct {
94
+ float _11, _12, _13, _14;
95
+ float _21, _22, _23, _24;
96
+ float _31, _32, _33, _34;
97
+ float _41, _42, _43, _44;
98
+
99
+ };
100
+ float m[4][4];
101
+ };
102
+ } D3DMATRIX;
103
+ #define D3DMATRIX_DEFINED
104
+ #endif
105
+
106
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */
107
+ #pragma endregion
108
+
109
+ #pragma region Desktop Family
110
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
111
+
112
+ typedef struct _D3DVIEWPORT9 {
113
+ DWORD X;
114
+ DWORD Y; /* Viewport Top left */
115
+ DWORD Width;
116
+ DWORD Height; /* Viewport Dimensions */
117
+ float MinZ; /* Min/max of clip Volume */
118
+ float MaxZ;
119
+ } D3DVIEWPORT9;
120
+
121
+ /*
122
+ * Values for clip fields.
123
+ */
124
+
125
+ // Max number of user clipping planes, supported in D3D.
126
+ #define D3DMAXUSERCLIPPLANES 32
127
+
128
+ // These bits could be ORed together to use with D3DRS_CLIPPLANEENABLE
129
+ //
130
+ #define D3DCLIPPLANE0 (1 << 0)
131
+ #define D3DCLIPPLANE1 (1 << 1)
132
+ #define D3DCLIPPLANE2 (1 << 2)
133
+ #define D3DCLIPPLANE3 (1 << 3)
134
+ #define D3DCLIPPLANE4 (1 << 4)
135
+ #define D3DCLIPPLANE5 (1 << 5)
136
+
137
+ // The following bits are used in the ClipUnion and ClipIntersection
138
+ // members of the D3DCLIPSTATUS9
139
+ //
140
+
141
+ #define D3DCS_LEFT 0x00000001L
142
+ #define D3DCS_RIGHT 0x00000002L
143
+ #define D3DCS_TOP 0x00000004L
144
+ #define D3DCS_BOTTOM 0x00000008L
145
+ #define D3DCS_FRONT 0x00000010L
146
+ #define D3DCS_BACK 0x00000020L
147
+ #define D3DCS_PLANE0 0x00000040L
148
+ #define D3DCS_PLANE1 0x00000080L
149
+ #define D3DCS_PLANE2 0x00000100L
150
+ #define D3DCS_PLANE3 0x00000200L
151
+ #define D3DCS_PLANE4 0x00000400L
152
+ #define D3DCS_PLANE5 0x00000800L
153
+
154
+ #define D3DCS_ALL (D3DCS_LEFT | \
155
+ D3DCS_RIGHT | \
156
+ D3DCS_TOP | \
157
+ D3DCS_BOTTOM | \
158
+ D3DCS_FRONT | \
159
+ D3DCS_BACK | \
160
+ D3DCS_PLANE0 | \
161
+ D3DCS_PLANE1 | \
162
+ D3DCS_PLANE2 | \
163
+ D3DCS_PLANE3 | \
164
+ D3DCS_PLANE4 | \
165
+ D3DCS_PLANE5)
166
+
167
+ typedef struct _D3DCLIPSTATUS9 {
168
+ DWORD ClipUnion;
169
+ DWORD ClipIntersection;
170
+ } D3DCLIPSTATUS9;
171
+
172
+ typedef struct _D3DMATERIAL9 {
173
+ D3DCOLORVALUE Diffuse; /* Diffuse color RGBA */
174
+ D3DCOLORVALUE Ambient; /* Ambient color RGB */
175
+ D3DCOLORVALUE Specular; /* Specular 'shininess' */
176
+ D3DCOLORVALUE Emissive; /* Emissive color RGB */
177
+ float Power; /* Sharpness if specular highlight */
178
+ } D3DMATERIAL9;
179
+
180
+ typedef enum _D3DLIGHTTYPE {
181
+ D3DLIGHT_POINT = 1,
182
+ D3DLIGHT_SPOT = 2,
183
+ D3DLIGHT_DIRECTIONAL = 3,
184
+ D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
185
+ } D3DLIGHTTYPE;
186
+
187
+ typedef struct _D3DLIGHT9 {
188
+ D3DLIGHTTYPE Type; /* Type of light source */
189
+ D3DCOLORVALUE Diffuse; /* Diffuse color of light */
190
+ D3DCOLORVALUE Specular; /* Specular color of light */
191
+ D3DCOLORVALUE Ambient; /* Ambient color of light */
192
+ D3DVECTOR Position; /* Position in world space */
193
+ D3DVECTOR Direction; /* Direction in world space */
194
+ float Range; /* Cutoff range */
195
+ float Falloff; /* Falloff */
196
+ float Attenuation0; /* Constant attenuation */
197
+ float Attenuation1; /* Linear attenuation */
198
+ float Attenuation2; /* Quadratic attenuation */
199
+ float Theta; /* Inner angle of spotlight cone */
200
+ float Phi; /* Outer angle of spotlight cone */
201
+ } D3DLIGHT9;
202
+
203
+ /*
204
+ * Options for clearing
205
+ */
206
+ #define D3DCLEAR_TARGET 0x00000001l /* Clear target surface */
207
+ #define D3DCLEAR_ZBUFFER 0x00000002l /* Clear target z buffer */
208
+ #define D3DCLEAR_STENCIL 0x00000004l /* Clear stencil planes */
209
+
210
+ /*
211
+ * The following defines the rendering states
212
+ */
213
+
214
+ typedef enum _D3DSHADEMODE {
215
+ D3DSHADE_FLAT = 1,
216
+ D3DSHADE_GOURAUD = 2,
217
+ D3DSHADE_PHONG = 3,
218
+ D3DSHADE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
219
+ } D3DSHADEMODE;
220
+
221
+ typedef enum _D3DFILLMODE {
222
+ D3DFILL_POINT = 1,
223
+ D3DFILL_WIREFRAME = 2,
224
+ D3DFILL_SOLID = 3,
225
+ D3DFILL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
226
+ } D3DFILLMODE;
227
+
228
+ typedef enum _D3DBLEND {
229
+ D3DBLEND_ZERO = 1,
230
+ D3DBLEND_ONE = 2,
231
+ D3DBLEND_SRCCOLOR = 3,
232
+ D3DBLEND_INVSRCCOLOR = 4,
233
+ D3DBLEND_SRCALPHA = 5,
234
+ D3DBLEND_INVSRCALPHA = 6,
235
+ D3DBLEND_DESTALPHA = 7,
236
+ D3DBLEND_INVDESTALPHA = 8,
237
+ D3DBLEND_DESTCOLOR = 9,
238
+ D3DBLEND_INVDESTCOLOR = 10,
239
+ D3DBLEND_SRCALPHASAT = 11,
240
+ D3DBLEND_BOTHSRCALPHA = 12,
241
+ D3DBLEND_BOTHINVSRCALPHA = 13,
242
+ D3DBLEND_BLENDFACTOR = 14, /* Only supported if D3DPBLENDCAPS_BLENDFACTOR is on */
243
+ D3DBLEND_INVBLENDFACTOR = 15, /* Only supported if D3DPBLENDCAPS_BLENDFACTOR is on */
244
+ /* D3D9Ex only -- */
245
+ #if !defined(D3D_DISABLE_9EX)
246
+
247
+ D3DBLEND_SRCCOLOR2 = 16,
248
+ D3DBLEND_INVSRCCOLOR2 = 17,
249
+
250
+ #endif // !D3D_DISABLE_9EX
251
+ /* -- D3D9Ex only */
252
+ D3DBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
253
+ } D3DBLEND;
254
+
255
+ typedef enum _D3DBLENDOP {
256
+ D3DBLENDOP_ADD = 1,
257
+ D3DBLENDOP_SUBTRACT = 2,
258
+ D3DBLENDOP_REVSUBTRACT = 3,
259
+ D3DBLENDOP_MIN = 4,
260
+ D3DBLENDOP_MAX = 5,
261
+ D3DBLENDOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
262
+ } D3DBLENDOP;
263
+
264
+ typedef enum _D3DTEXTUREADDRESS {
265
+ D3DTADDRESS_WRAP = 1,
266
+ D3DTADDRESS_MIRROR = 2,
267
+ D3DTADDRESS_CLAMP = 3,
268
+ D3DTADDRESS_BORDER = 4,
269
+ D3DTADDRESS_MIRRORONCE = 5,
270
+ D3DTADDRESS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
271
+ } D3DTEXTUREADDRESS;
272
+
273
+ typedef enum _D3DCULL {
274
+ D3DCULL_NONE = 1,
275
+ D3DCULL_CW = 2,
276
+ D3DCULL_CCW = 3,
277
+ D3DCULL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
278
+ } D3DCULL;
279
+
280
+ typedef enum _D3DCMPFUNC {
281
+ D3DCMP_NEVER = 1,
282
+ D3DCMP_LESS = 2,
283
+ D3DCMP_EQUAL = 3,
284
+ D3DCMP_LESSEQUAL = 4,
285
+ D3DCMP_GREATER = 5,
286
+ D3DCMP_NOTEQUAL = 6,
287
+ D3DCMP_GREATEREQUAL = 7,
288
+ D3DCMP_ALWAYS = 8,
289
+ D3DCMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
290
+ } D3DCMPFUNC;
291
+
292
+ typedef enum _D3DSTENCILOP {
293
+ D3DSTENCILOP_KEEP = 1,
294
+ D3DSTENCILOP_ZERO = 2,
295
+ D3DSTENCILOP_REPLACE = 3,
296
+ D3DSTENCILOP_INCRSAT = 4,
297
+ D3DSTENCILOP_DECRSAT = 5,
298
+ D3DSTENCILOP_INVERT = 6,
299
+ D3DSTENCILOP_INCR = 7,
300
+ D3DSTENCILOP_DECR = 8,
301
+ D3DSTENCILOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
302
+ } D3DSTENCILOP;
303
+
304
+ typedef enum _D3DFOGMODE {
305
+ D3DFOG_NONE = 0,
306
+ D3DFOG_EXP = 1,
307
+ D3DFOG_EXP2 = 2,
308
+ D3DFOG_LINEAR = 3,
309
+ D3DFOG_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
310
+ } D3DFOGMODE;
311
+
312
+ typedef enum _D3DZBUFFERTYPE {
313
+ D3DZB_FALSE = 0,
314
+ D3DZB_TRUE = 1, // Z buffering
315
+ D3DZB_USEW = 2, // W buffering
316
+ D3DZB_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
317
+ } D3DZBUFFERTYPE;
318
+
319
+ // Primitives supported by draw-primitive API
320
+ typedef enum _D3DPRIMITIVETYPE {
321
+ D3DPT_POINTLIST = 1,
322
+ D3DPT_LINELIST = 2,
323
+ D3DPT_LINESTRIP = 3,
324
+ D3DPT_TRIANGLELIST = 4,
325
+ D3DPT_TRIANGLESTRIP = 5,
326
+ D3DPT_TRIANGLEFAN = 6,
327
+ D3DPT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
328
+ } D3DPRIMITIVETYPE;
329
+
330
+ typedef enum _D3DTRANSFORMSTATETYPE {
331
+ D3DTS_VIEW = 2,
332
+ D3DTS_PROJECTION = 3,
333
+ D3DTS_TEXTURE0 = 16,
334
+ D3DTS_TEXTURE1 = 17,
335
+ D3DTS_TEXTURE2 = 18,
336
+ D3DTS_TEXTURE3 = 19,
337
+ D3DTS_TEXTURE4 = 20,
338
+ D3DTS_TEXTURE5 = 21,
339
+ D3DTS_TEXTURE6 = 22,
340
+ D3DTS_TEXTURE7 = 23,
341
+ D3DTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
342
+ } D3DTRANSFORMSTATETYPE;
343
+
344
+ #define D3DTS_WORLDMATRIX(index) (D3DTRANSFORMSTATETYPE)(index + 256)
345
+ #define D3DTS_WORLD D3DTS_WORLDMATRIX(0)
346
+ #define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1)
347
+ #define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2)
348
+ #define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3)
349
+
350
+ typedef enum _D3DRENDERSTATETYPE {
351
+ D3DRS_ZENABLE = 7, /* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) */
352
+ D3DRS_FILLMODE = 8, /* D3DFILLMODE */
353
+ D3DRS_SHADEMODE = 9, /* D3DSHADEMODE */
354
+ D3DRS_ZWRITEENABLE = 14, /* TRUE to enable z writes */
355
+ D3DRS_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */
356
+ D3DRS_LASTPIXEL = 16, /* TRUE for last-pixel on lines */
357
+ D3DRS_SRCBLEND = 19, /* D3DBLEND */
358
+ D3DRS_DESTBLEND = 20, /* D3DBLEND */
359
+ D3DRS_CULLMODE = 22, /* D3DCULL */
360
+ D3DRS_ZFUNC = 23, /* D3DCMPFUNC */
361
+ D3DRS_ALPHAREF = 24, /* D3DFIXED */
362
+ D3DRS_ALPHAFUNC = 25, /* D3DCMPFUNC */
363
+ D3DRS_DITHERENABLE = 26, /* TRUE to enable dithering */
364
+ D3DRS_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */
365
+ D3DRS_FOGENABLE = 28, /* TRUE to enable fog blending */
366
+ D3DRS_SPECULARENABLE = 29, /* TRUE to enable specular */
367
+ D3DRS_FOGCOLOR = 34, /* D3DCOLOR */
368
+ D3DRS_FOGTABLEMODE = 35, /* D3DFOGMODE */
369
+ D3DRS_FOGSTART = 36, /* Fog start (for both vertex and pixel fog) */
370
+ D3DRS_FOGEND = 37, /* Fog end */
371
+ D3DRS_FOGDENSITY = 38, /* Fog density */
372
+ D3DRS_RANGEFOGENABLE = 48, /* Enables range-based fog */
373
+ D3DRS_STENCILENABLE = 52, /* BOOL enable/disable stenciling */
374
+ D3DRS_STENCILFAIL = 53, /* D3DSTENCILOP to do if stencil test fails */
375
+ D3DRS_STENCILZFAIL = 54, /* D3DSTENCILOP to do if stencil test passes and Z test fails */
376
+ D3DRS_STENCILPASS = 55, /* D3DSTENCILOP to do if both stencil and Z tests pass */
377
+ D3DRS_STENCILFUNC = 56, /* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */
378
+ D3DRS_STENCILREF = 57, /* Reference value used in stencil test */
379
+ D3DRS_STENCILMASK = 58, /* Mask value used in stencil test */
380
+ D3DRS_STENCILWRITEMASK = 59, /* Write mask applied to values written to stencil buffer */
381
+ D3DRS_TEXTUREFACTOR = 60, /* D3DCOLOR used for multi-texture blend */
382
+ D3DRS_WRAP0 = 128, /* wrap for 1st texture coord. set */
383
+ D3DRS_WRAP1 = 129, /* wrap for 2nd texture coord. set */
384
+ D3DRS_WRAP2 = 130, /* wrap for 3rd texture coord. set */
385
+ D3DRS_WRAP3 = 131, /* wrap for 4th texture coord. set */
386
+ D3DRS_WRAP4 = 132, /* wrap for 5th texture coord. set */
387
+ D3DRS_WRAP5 = 133, /* wrap for 6th texture coord. set */
388
+ D3DRS_WRAP6 = 134, /* wrap for 7th texture coord. set */
389
+ D3DRS_WRAP7 = 135, /* wrap for 8th texture coord. set */
390
+ D3DRS_CLIPPING = 136,
391
+ D3DRS_LIGHTING = 137,
392
+ D3DRS_AMBIENT = 139,
393
+ D3DRS_FOGVERTEXMODE = 140,
394
+ D3DRS_COLORVERTEX = 141,
395
+ D3DRS_LOCALVIEWER = 142,
396
+ D3DRS_NORMALIZENORMALS = 143,
397
+ D3DRS_DIFFUSEMATERIALSOURCE = 145,
398
+ D3DRS_SPECULARMATERIALSOURCE = 146,
399
+ D3DRS_AMBIENTMATERIALSOURCE = 147,
400
+ D3DRS_EMISSIVEMATERIALSOURCE = 148,
401
+ D3DRS_VERTEXBLEND = 151,
402
+ D3DRS_CLIPPLANEENABLE = 152,
403
+ D3DRS_POINTSIZE = 154, /* float point size */
404
+ D3DRS_POINTSIZE_MIN = 155, /* float point size min threshold */
405
+ D3DRS_POINTSPRITEENABLE = 156, /* BOOL point texture coord control */
406
+ D3DRS_POINTSCALEENABLE = 157, /* BOOL point size scale enable */
407
+ D3DRS_POINTSCALE_A = 158, /* float point attenuation A value */
408
+ D3DRS_POINTSCALE_B = 159, /* float point attenuation B value */
409
+ D3DRS_POINTSCALE_C = 160, /* float point attenuation C value */
410
+ D3DRS_MULTISAMPLEANTIALIAS = 161, // BOOL - set to do FSAA with multisample buffer
411
+ D3DRS_MULTISAMPLEMASK = 162, // DWORD - per-sample enable/disable
412
+ D3DRS_PATCHEDGESTYLE = 163, // Sets whether patch edges will use float style tessellation
413
+ D3DRS_DEBUGMONITORTOKEN = 165, // DEBUG ONLY - token to debug monitor
414
+ D3DRS_POINTSIZE_MAX = 166, /* float point size max threshold */
415
+ D3DRS_INDEXEDVERTEXBLENDENABLE = 167,
416
+ D3DRS_COLORWRITEENABLE = 168, // per-channel write enable
417
+ D3DRS_TWEENFACTOR = 170, // float tween factor
418
+ D3DRS_BLENDOP = 171, // D3DBLENDOP setting
419
+ D3DRS_POSITIONDEGREE = 172, // NPatch position interpolation degree. D3DDEGREE_LINEAR or D3DDEGREE_CUBIC (default)
420
+ D3DRS_NORMALDEGREE = 173, // NPatch normal interpolation degree. D3DDEGREE_LINEAR (default) or D3DDEGREE_QUADRATIC
421
+ D3DRS_SCISSORTESTENABLE = 174,
422
+ D3DRS_SLOPESCALEDEPTHBIAS = 175,
423
+ D3DRS_ANTIALIASEDLINEENABLE = 176,
424
+ D3DRS_MINTESSELLATIONLEVEL = 178,
425
+ D3DRS_MAXTESSELLATIONLEVEL = 179,
426
+ D3DRS_ADAPTIVETESS_X = 180,
427
+ D3DRS_ADAPTIVETESS_Y = 181,
428
+ D3DRS_ADAPTIVETESS_Z = 182,
429
+ D3DRS_ADAPTIVETESS_W = 183,
430
+ D3DRS_ENABLEADAPTIVETESSELLATION = 184,
431
+ D3DRS_TWOSIDEDSTENCILMODE = 185, /* BOOL enable/disable 2 sided stenciling */
432
+ D3DRS_CCW_STENCILFAIL = 186, /* D3DSTENCILOP to do if ccw stencil test fails */
433
+ D3DRS_CCW_STENCILZFAIL = 187, /* D3DSTENCILOP to do if ccw stencil test passes and Z test fails */
434
+ D3DRS_CCW_STENCILPASS = 188, /* D3DSTENCILOP to do if both ccw stencil and Z tests pass */
435
+ D3DRS_CCW_STENCILFUNC = 189, /* D3DCMPFUNC fn. ccw Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */
436
+ D3DRS_COLORWRITEENABLE1 = 190, /* Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS */
437
+ D3DRS_COLORWRITEENABLE2 = 191, /* Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS */
438
+ D3DRS_COLORWRITEENABLE3 = 192, /* Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS */
439
+ D3DRS_BLENDFACTOR = 193, /* D3DCOLOR used for a constant blend factor during alpha blending for devices that support D3DPBLENDCAPS_BLENDFACTOR */
440
+ D3DRS_SRGBWRITEENABLE = 194, /* Enable rendertarget writes to be DE-linearized to SRGB (for formats that expose D3DUSAGE_QUERY_SRGBWRITE) */
441
+ D3DRS_DEPTHBIAS = 195,
442
+ D3DRS_WRAP8 = 198, /* Additional wrap states for vs_3_0+ attributes with D3DDECLUSAGE_TEXCOORD */
443
+ D3DRS_WRAP9 = 199,
444
+ D3DRS_WRAP10 = 200,
445
+ D3DRS_WRAP11 = 201,
446
+ D3DRS_WRAP12 = 202,
447
+ D3DRS_WRAP13 = 203,
448
+ D3DRS_WRAP14 = 204,
449
+ D3DRS_WRAP15 = 205,
450
+ D3DRS_SEPARATEALPHABLENDENABLE = 206, /* TRUE to enable a separate blending function for the alpha channel */
451
+ D3DRS_SRCBLENDALPHA = 207, /* SRC blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
452
+ D3DRS_DESTBLENDALPHA = 208, /* DST blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
453
+ D3DRS_BLENDOPALPHA = 209, /* Blending operation for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE */
454
+
455
+
456
+ D3DRS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
457
+ } D3DRENDERSTATETYPE;
458
+
459
+ // Maximum number of simultaneous render targets D3D supports
460
+ #define D3D_MAX_SIMULTANEOUS_RENDERTARGETS 4
461
+
462
+ // Values for material source
463
+ typedef enum _D3DMATERIALCOLORSOURCE
464
+ {
465
+ D3DMCS_MATERIAL = 0, // Color from material is used
466
+ D3DMCS_COLOR1 = 1, // Diffuse vertex color is used
467
+ D3DMCS_COLOR2 = 2, // Specular vertex color is used
468
+ D3DMCS_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
469
+ } D3DMATERIALCOLORSOURCE;
470
+
471
+ // Bias to apply to the texture coordinate set to apply a wrap to.
472
+ #define D3DRENDERSTATE_WRAPBIAS 128UL
473
+
474
+ /* Flags to construct the WRAP render states */
475
+ #define D3DWRAP_U 0x00000001L
476
+ #define D3DWRAP_V 0x00000002L
477
+ #define D3DWRAP_W 0x00000004L
478
+
479
+ /* Flags to construct the WRAP render states for 1D thru 4D texture coordinates */
480
+ #define D3DWRAPCOORD_0 0x00000001L // same as D3DWRAP_U
481
+ #define D3DWRAPCOORD_1 0x00000002L // same as D3DWRAP_V
482
+ #define D3DWRAPCOORD_2 0x00000004L // same as D3DWRAP_W
483
+ #define D3DWRAPCOORD_3 0x00000008L
484
+
485
+ /* Flags to construct D3DRS_COLORWRITEENABLE */
486
+ #define D3DCOLORWRITEENABLE_RED (1L<<0)
487
+ #define D3DCOLORWRITEENABLE_GREEN (1L<<1)
488
+ #define D3DCOLORWRITEENABLE_BLUE (1L<<2)
489
+ #define D3DCOLORWRITEENABLE_ALPHA (1L<<3)
490
+
491
+ /*
492
+ * State enumerants for per-stage processing of fixed function pixel processing
493
+ * Two of these affect fixed function vertex processing as well: TEXTURETRANSFORMFLAGS and TEXCOORDINDEX.
494
+ */
495
+ typedef enum _D3DTEXTURESTAGESTATETYPE
496
+ {
497
+ D3DTSS_COLOROP = 1, /* D3DTEXTUREOP - per-stage blending controls for color channels */
498
+ D3DTSS_COLORARG1 = 2, /* D3DTA_* (texture arg) */
499
+ D3DTSS_COLORARG2 = 3, /* D3DTA_* (texture arg) */
500
+ D3DTSS_ALPHAOP = 4, /* D3DTEXTUREOP - per-stage blending controls for alpha channel */
501
+ D3DTSS_ALPHAARG1 = 5, /* D3DTA_* (texture arg) */
502
+ D3DTSS_ALPHAARG2 = 6, /* D3DTA_* (texture arg) */
503
+ D3DTSS_BUMPENVMAT00 = 7, /* float (bump mapping matrix) */
504
+ D3DTSS_BUMPENVMAT01 = 8, /* float (bump mapping matrix) */
505
+ D3DTSS_BUMPENVMAT10 = 9, /* float (bump mapping matrix) */
506
+ D3DTSS_BUMPENVMAT11 = 10, /* float (bump mapping matrix) */
507
+ D3DTSS_TEXCOORDINDEX = 11, /* identifies which set of texture coordinates index this texture */
508
+ D3DTSS_BUMPENVLSCALE = 22, /* float scale for bump map luminance */
509
+ D3DTSS_BUMPENVLOFFSET = 23, /* float offset for bump map luminance */
510
+ D3DTSS_TEXTURETRANSFORMFLAGS = 24, /* D3DTEXTURETRANSFORMFLAGS controls texture transform */
511
+ D3DTSS_COLORARG0 = 26, /* D3DTA_* third arg for triadic ops */
512
+ D3DTSS_ALPHAARG0 = 27, /* D3DTA_* third arg for triadic ops */
513
+ D3DTSS_RESULTARG = 28, /* D3DTA_* arg for result (CURRENT or TEMP) */
514
+ D3DTSS_CONSTANT = 32, /* Per-stage constant D3DTA_CONSTANT */
515
+
516
+
517
+ D3DTSS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
518
+ } D3DTEXTURESTAGESTATETYPE;
519
+
520
+ /*
521
+ * State enumerants for per-sampler texture processing.
522
+ */
523
+ typedef enum _D3DSAMPLERSTATETYPE
524
+ {
525
+ D3DSAMP_ADDRESSU = 1, /* D3DTEXTUREADDRESS for U coordinate */
526
+ D3DSAMP_ADDRESSV = 2, /* D3DTEXTUREADDRESS for V coordinate */
527
+ D3DSAMP_ADDRESSW = 3, /* D3DTEXTUREADDRESS for W coordinate */
528
+ D3DSAMP_BORDERCOLOR = 4, /* D3DCOLOR */
529
+ D3DSAMP_MAGFILTER = 5, /* D3DTEXTUREFILTER filter to use for magnification */
530
+ D3DSAMP_MINFILTER = 6, /* D3DTEXTUREFILTER filter to use for minification */
531
+ D3DSAMP_MIPFILTER = 7, /* D3DTEXTUREFILTER filter to use between mipmaps during minification */
532
+ D3DSAMP_MIPMAPLODBIAS = 8, /* float Mipmap LOD bias */
533
+ D3DSAMP_MAXMIPLEVEL = 9, /* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) */
534
+ D3DSAMP_MAXANISOTROPY = 10, /* DWORD maximum anisotropy */
535
+ D3DSAMP_SRGBTEXTURE = 11, /* Default = 0 (which means Gamma 1.0,
536
+ no correction required.) else correct for
537
+ Gamma = 2.2 */
538
+ D3DSAMP_ELEMENTINDEX = 12, /* When multi-element texture is assigned to sampler, this
539
+ indicates which element index to use. Default = 0. */
540
+ D3DSAMP_DMAPOFFSET = 13, /* Offset in vertices in the pre-sampled displacement map.
541
+ Only valid for D3DDMAPSAMPLER sampler */
542
+ D3DSAMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
543
+ } D3DSAMPLERSTATETYPE;
544
+
545
+ /* Special sampler which is used in the tesselator */
546
+ #define D3DDMAPSAMPLER 256
547
+
548
+ // Samplers used in vertex shaders
549
+ #define D3DVERTEXTEXTURESAMPLER0 (D3DDMAPSAMPLER+1)
550
+ #define D3DVERTEXTEXTURESAMPLER1 (D3DDMAPSAMPLER+2)
551
+ #define D3DVERTEXTEXTURESAMPLER2 (D3DDMAPSAMPLER+3)
552
+ #define D3DVERTEXTEXTURESAMPLER3 (D3DDMAPSAMPLER+4)
553
+
554
+ // Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position
555
+ // and normal in the camera space) should be taken as texture coordinates
556
+ // Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from
557
+ //
558
+ #define D3DTSS_TCI_PASSTHRU 0x00000000
559
+ #define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000
560
+ #define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000
561
+ #define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000
562
+ #define D3DTSS_TCI_SPHEREMAP 0x00040000
563
+
564
+ /*
565
+ * Enumerations for COLOROP and ALPHAOP texture blending operations set in
566
+ * texture processing stage controls in D3DTSS.
567
+ */
568
+ typedef enum _D3DTEXTUREOP
569
+ {
570
+ // Control
571
+ D3DTOP_DISABLE = 1, // disables stage
572
+ D3DTOP_SELECTARG1 = 2, // the default
573
+ D3DTOP_SELECTARG2 = 3,
574
+
575
+ // Modulate
576
+ D3DTOP_MODULATE = 4, // multiply args together
577
+ D3DTOP_MODULATE2X = 5, // multiply and 1 bit
578
+ D3DTOP_MODULATE4X = 6, // multiply and 2 bits
579
+
580
+ // Add
581
+ D3DTOP_ADD = 7, // add arguments together
582
+ D3DTOP_ADDSIGNED = 8, // add with -0.5 bias
583
+ D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit
584
+ D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation
585
+ D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product
586
+ // Arg1 + Arg2 - Arg1*Arg2
587
+ // = Arg1 + (1-Arg1)*Arg2
588
+
589
+ // Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
590
+ D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha
591
+ D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha
592
+ D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRS_TEXTUREFACTOR
593
+
594
+ // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
595
+ D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha
596
+ D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color
597
+
598
+ // Specular mapping
599
+ D3DTOP_PREMODULATE = 17, // modulate with next texture before use
600
+ D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB
601
+ // COLOROP only
602
+ D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A
603
+ // COLOROP only
604
+ D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, // (1-Arg1.A)*Arg2.RGB + Arg1.RGB
605
+ // COLOROP only
606
+ D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, // (1-Arg1.RGB)*Arg2.RGB + Arg1.A
607
+ // COLOROP only
608
+
609
+ // Bump mapping
610
+ D3DTOP_BUMPENVMAP = 22, // per pixel env map perturbation
611
+ D3DTOP_BUMPENVMAPLUMINANCE = 23, // with luminance channel
612
+
613
+ // This can do either diffuse or specular bump mapping with correct input.
614
+ // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B)
615
+ // where each component has been scaled and offset to make it signed.
616
+ // The result is replicated into all four (including alpha) channels.
617
+ // This is a valid COLOROP only.
618
+ D3DTOP_DOTPRODUCT3 = 24,
619
+
620
+ // Triadic ops
621
+ D3DTOP_MULTIPLYADD = 25, // Arg0 + Arg1*Arg2
622
+ D3DTOP_LERP = 26, // (Arg0)*Arg1 + (1-Arg0)*Arg2
623
+
624
+ D3DTOP_FORCE_DWORD = 0x7fffffff,
625
+ } D3DTEXTUREOP;
626
+
627
+ /*
628
+ * Values for COLORARG0,1,2, ALPHAARG0,1,2, and RESULTARG texture blending
629
+ * operations set in texture processing stage controls in D3DRENDERSTATE.
630
+ */
631
+ #define D3DTA_SELECTMASK 0x0000000f // mask for arg selector
632
+ #define D3DTA_DIFFUSE 0x00000000 // select diffuse color (read only)
633
+ #define D3DTA_CURRENT 0x00000001 // select stage destination register (read/write)
634
+ #define D3DTA_TEXTURE 0x00000002 // select texture color (read only)
635
+ #define D3DTA_TFACTOR 0x00000003 // select D3DRS_TEXTUREFACTOR (read only)
636
+ #define D3DTA_SPECULAR 0x00000004 // select specular color (read only)
637
+ #define D3DTA_TEMP 0x00000005 // select temporary register color (read/write)
638
+ #define D3DTA_CONSTANT 0x00000006 // select texture stage constant
639
+ #define D3DTA_COMPLEMENT 0x00000010 // take 1.0 - x (read modifier)
640
+ #define D3DTA_ALPHAREPLICATE 0x00000020 // replicate alpha to color components (read modifier)
641
+
642
+ //
643
+ // Values for D3DSAMP_***FILTER texture stage states
644
+ //
645
+ typedef enum _D3DTEXTUREFILTERTYPE
646
+ {
647
+ D3DTEXF_NONE = 0, // filtering disabled (valid for mip filter only)
648
+ D3DTEXF_POINT = 1, // nearest
649
+ D3DTEXF_LINEAR = 2, // linear interpolation
650
+ D3DTEXF_ANISOTROPIC = 3, // anisotropic
651
+ D3DTEXF_PYRAMIDALQUAD = 6, // 4-sample tent
652
+ D3DTEXF_GAUSSIANQUAD = 7, // 4-sample gaussian
653
+ /* D3D9Ex only -- */
654
+ #if !defined(D3D_DISABLE_9EX)
655
+
656
+ D3DTEXF_CONVOLUTIONMONO = 8, // Convolution filter for monochrome textures
657
+
658
+ #endif // !D3D_DISABLE_9EX
659
+ /* -- D3D9Ex only */
660
+ D3DTEXF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
661
+ } D3DTEXTUREFILTERTYPE;
662
+
663
+ /* Bits for Flags in ProcessVertices call */
664
+
665
+ #define D3DPV_DONOTCOPYDATA (1 << 0)
666
+
667
+ //-------------------------------------------------------------------
668
+
669
+ // Flexible vertex format bits
670
+ //
671
+ #define D3DFVF_RESERVED0 0x001
672
+ #define D3DFVF_POSITION_MASK 0x400E
673
+ #define D3DFVF_XYZ 0x002
674
+ #define D3DFVF_XYZRHW 0x004
675
+ #define D3DFVF_XYZB1 0x006
676
+ #define D3DFVF_XYZB2 0x008
677
+ #define D3DFVF_XYZB3 0x00a
678
+ #define D3DFVF_XYZB4 0x00c
679
+ #define D3DFVF_XYZB5 0x00e
680
+ #define D3DFVF_XYZW 0x4002
681
+
682
+ #define D3DFVF_NORMAL 0x010
683
+ #define D3DFVF_PSIZE 0x020
684
+ #define D3DFVF_DIFFUSE 0x040
685
+ #define D3DFVF_SPECULAR 0x080
686
+
687
+ #define D3DFVF_TEXCOUNT_MASK 0xf00
688
+ #define D3DFVF_TEXCOUNT_SHIFT 8
689
+ #define D3DFVF_TEX0 0x000
690
+ #define D3DFVF_TEX1 0x100
691
+ #define D3DFVF_TEX2 0x200
692
+ #define D3DFVF_TEX3 0x300
693
+ #define D3DFVF_TEX4 0x400
694
+ #define D3DFVF_TEX5 0x500
695
+ #define D3DFVF_TEX6 0x600
696
+ #define D3DFVF_TEX7 0x700
697
+ #define D3DFVF_TEX8 0x800
698
+
699
+ #define D3DFVF_LASTBETA_UBYTE4 0x1000
700
+ #define D3DFVF_LASTBETA_D3DCOLOR 0x8000
701
+
702
+ #define D3DFVF_RESERVED2 0x6000 // 2 reserved bits
703
+
704
+ //---------------------------------------------------------------------
705
+ // Vertex Shaders
706
+ //
707
+
708
+ // Vertex shader declaration
709
+
710
+ // Vertex element semantics
711
+ //
712
+ typedef enum _D3DDECLUSAGE
713
+ {
714
+ D3DDECLUSAGE_POSITION = 0,
715
+ D3DDECLUSAGE_BLENDWEIGHT, // 1
716
+ D3DDECLUSAGE_BLENDINDICES, // 2
717
+ D3DDECLUSAGE_NORMAL, // 3
718
+ D3DDECLUSAGE_PSIZE, // 4
719
+ D3DDECLUSAGE_TEXCOORD, // 5
720
+ D3DDECLUSAGE_TANGENT, // 6
721
+ D3DDECLUSAGE_BINORMAL, // 7
722
+ D3DDECLUSAGE_TESSFACTOR, // 8
723
+ D3DDECLUSAGE_POSITIONT, // 9
724
+ D3DDECLUSAGE_COLOR, // 10
725
+ D3DDECLUSAGE_FOG, // 11
726
+ D3DDECLUSAGE_DEPTH, // 12
727
+ D3DDECLUSAGE_SAMPLE, // 13
728
+ } D3DDECLUSAGE;
729
+
730
+ #define MAXD3DDECLUSAGE D3DDECLUSAGE_SAMPLE
731
+ #define MAXD3DDECLUSAGEINDEX 15
732
+ #define MAXD3DDECLLENGTH 64 // does not include "end" marker vertex element
733
+
734
+ typedef enum _D3DDECLMETHOD
735
+ {
736
+ D3DDECLMETHOD_DEFAULT = 0,
737
+ D3DDECLMETHOD_PARTIALU,
738
+ D3DDECLMETHOD_PARTIALV,
739
+ D3DDECLMETHOD_CROSSUV, // Normal
740
+ D3DDECLMETHOD_UV,
741
+ D3DDECLMETHOD_LOOKUP, // Lookup a displacement map
742
+ D3DDECLMETHOD_LOOKUPPRESAMPLED, // Lookup a pre-sampled displacement map
743
+ } D3DDECLMETHOD;
744
+
745
+ #define MAXD3DDECLMETHOD D3DDECLMETHOD_LOOKUPPRESAMPLED
746
+
747
+ // Declarations for _Type fields
748
+ //
749
+ typedef enum _D3DDECLTYPE
750
+ {
751
+ D3DDECLTYPE_FLOAT1 = 0, // 1D float expanded to (value, 0., 0., 1.)
752
+ D3DDECLTYPE_FLOAT2 = 1, // 2D float expanded to (value, value, 0., 1.)
753
+ D3DDECLTYPE_FLOAT3 = 2, // 3D float expanded to (value, value, value, 1.)
754
+ D3DDECLTYPE_FLOAT4 = 3, // 4D float
755
+ D3DDECLTYPE_D3DCOLOR = 4, // 4D packed unsigned bytes mapped to 0. to 1. range
756
+ // Input is in D3DCOLOR format (ARGB) expanded to (R, G, B, A)
757
+ D3DDECLTYPE_UBYTE4 = 5, // 4D unsigned byte
758
+ D3DDECLTYPE_SHORT2 = 6, // 2D signed short expanded to (value, value, 0., 1.)
759
+ D3DDECLTYPE_SHORT4 = 7, // 4D signed short
760
+
761
+ // The following types are valid only with vertex shaders >= 2.0
762
+
763
+
764
+ D3DDECLTYPE_UBYTE4N = 8, // Each of 4 bytes is normalized by dividing to 255.0
765
+ D3DDECLTYPE_SHORT2N = 9, // 2D signed short normalized (v[0]/32767.0,v[1]/32767.0,0,1)
766
+ D3DDECLTYPE_SHORT4N = 10, // 4D signed short normalized (v[0]/32767.0,v[1]/32767.0,v[2]/32767.0,v[3]/32767.0)
767
+ D3DDECLTYPE_USHORT2N = 11, // 2D unsigned short normalized (v[0]/65535.0,v[1]/65535.0,0,1)
768
+ D3DDECLTYPE_USHORT4N = 12, // 4D unsigned short normalized (v[0]/65535.0,v[1]/65535.0,v[2]/65535.0,v[3]/65535.0)
769
+ D3DDECLTYPE_UDEC3 = 13, // 3D unsigned 10 10 10 format expanded to (value, value, value, 1)
770
+ D3DDECLTYPE_DEC3N = 14, // 3D signed 10 10 10 format normalized and expanded to (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1)
771
+ D3DDECLTYPE_FLOAT16_2 = 15, // Two 16-bit floating point values, expanded to (value, value, 0, 1)
772
+ D3DDECLTYPE_FLOAT16_4 = 16, // Four 16-bit floating point values
773
+ D3DDECLTYPE_UNUSED = 17, // When the type field in a decl is unused.
774
+ } D3DDECLTYPE;
775
+
776
+ #define MAXD3DDECLTYPE D3DDECLTYPE_UNUSED
777
+
778
+ typedef struct _D3DVERTEXELEMENT9
779
+ {
780
+ WORD Stream; // Stream index
781
+ WORD Offset; // Offset in the stream in bytes
782
+ BYTE Type; // Data type
783
+ BYTE Method; // Processing method
784
+ BYTE Usage; // Semantics
785
+ BYTE UsageIndex; // Semantic index
786
+ } D3DVERTEXELEMENT9, *LPD3DVERTEXELEMENT9;
787
+
788
+ // This is used to initialize the last vertex element in a vertex declaration
789
+ // array
790
+ //
791
+ #define D3DDECL_END() {0xFF,0,D3DDECLTYPE_UNUSED,0,0,0}
792
+
793
+ // Maximum supported number of texture coordinate sets
794
+ #define D3DDP_MAXTEXCOORD 8
795
+
796
+ //---------------------------------------------------------------------
797
+ // Values for IDirect3DDevice9::SetStreamSourceFreq's Setting parameter
798
+ //---------------------------------------------------------------------
799
+ #define D3DSTREAMSOURCE_INDEXEDDATA (1<<30)
800
+ #define D3DSTREAMSOURCE_INSTANCEDATA (2<<30)
801
+
802
+
803
+
804
+ //---------------------------------------------------------------------
805
+ //
806
+ // The internal format of Pixel Shader (PS) & Vertex Shader (VS)
807
+ // Instruction Tokens is defined in the Direct3D Device Driver Kit
808
+ //
809
+ //---------------------------------------------------------------------
810
+
811
+ //
812
+ // Instruction Token Bit Definitions
813
+ //
814
+ #define D3DSI_OPCODE_MASK 0x0000FFFF
815
+
816
+ #define D3DSI_INSTLENGTH_MASK 0x0F000000
817
+ #define D3DSI_INSTLENGTH_SHIFT 24
818
+
819
+ typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE
820
+ {
821
+ D3DSIO_NOP = 0,
822
+ D3DSIO_MOV ,
823
+ D3DSIO_ADD ,
824
+ D3DSIO_SUB ,
825
+ D3DSIO_MAD ,
826
+ D3DSIO_MUL ,
827
+ D3DSIO_RCP ,
828
+ D3DSIO_RSQ ,
829
+ D3DSIO_DP3 ,
830
+ D3DSIO_DP4 ,
831
+ D3DSIO_MIN ,
832
+ D3DSIO_MAX ,
833
+ D3DSIO_SLT ,
834
+ D3DSIO_SGE ,
835
+ D3DSIO_EXP ,
836
+ D3DSIO_LOG ,
837
+ D3DSIO_LIT ,
838
+ D3DSIO_DST ,
839
+ D3DSIO_LRP ,
840
+ D3DSIO_FRC ,
841
+ D3DSIO_M4x4 ,
842
+ D3DSIO_M4x3 ,
843
+ D3DSIO_M3x4 ,
844
+ D3DSIO_M3x3 ,
845
+ D3DSIO_M3x2 ,
846
+ D3DSIO_CALL ,
847
+ D3DSIO_CALLNZ ,
848
+ D3DSIO_LOOP ,
849
+ D3DSIO_RET ,
850
+ D3DSIO_ENDLOOP ,
851
+ D3DSIO_LABEL ,
852
+ D3DSIO_DCL ,
853
+ D3DSIO_POW ,
854
+ D3DSIO_CRS ,
855
+ D3DSIO_SGN ,
856
+ D3DSIO_ABS ,
857
+ D3DSIO_NRM ,
858
+ D3DSIO_SINCOS ,
859
+ D3DSIO_REP ,
860
+ D3DSIO_ENDREP ,
861
+ D3DSIO_IF ,
862
+ D3DSIO_IFC ,
863
+ D3DSIO_ELSE ,
864
+ D3DSIO_ENDIF ,
865
+ D3DSIO_BREAK ,
866
+ D3DSIO_BREAKC ,
867
+ D3DSIO_MOVA ,
868
+ D3DSIO_DEFB ,
869
+ D3DSIO_DEFI ,
870
+
871
+ D3DSIO_TEXCOORD = 64,
872
+ D3DSIO_TEXKILL ,
873
+ D3DSIO_TEX ,
874
+ D3DSIO_TEXBEM ,
875
+ D3DSIO_TEXBEML ,
876
+ D3DSIO_TEXREG2AR ,
877
+ D3DSIO_TEXREG2GB ,
878
+ D3DSIO_TEXM3x2PAD ,
879
+ D3DSIO_TEXM3x2TEX ,
880
+ D3DSIO_TEXM3x3PAD ,
881
+ D3DSIO_TEXM3x3TEX ,
882
+ D3DSIO_RESERVED0 ,
883
+ D3DSIO_TEXM3x3SPEC ,
884
+ D3DSIO_TEXM3x3VSPEC ,
885
+ D3DSIO_EXPP ,
886
+ D3DSIO_LOGP ,
887
+ D3DSIO_CND ,
888
+ D3DSIO_DEF ,
889
+ D3DSIO_TEXREG2RGB ,
890
+ D3DSIO_TEXDP3TEX ,
891
+ D3DSIO_TEXM3x2DEPTH ,
892
+ D3DSIO_TEXDP3 ,
893
+ D3DSIO_TEXM3x3 ,
894
+ D3DSIO_TEXDEPTH ,
895
+ D3DSIO_CMP ,
896
+ D3DSIO_BEM ,
897
+ D3DSIO_DP2ADD ,
898
+ D3DSIO_DSX ,
899
+ D3DSIO_DSY ,
900
+ D3DSIO_TEXLDD ,
901
+ D3DSIO_SETP ,
902
+ D3DSIO_TEXLDL ,
903
+ D3DSIO_BREAKP ,
904
+
905
+ D3DSIO_PHASE = 0xFFFD,
906
+ D3DSIO_COMMENT = 0xFFFE,
907
+ D3DSIO_END = 0xFFFF,
908
+
909
+ D3DSIO_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
910
+ } D3DSHADER_INSTRUCTION_OPCODE_TYPE;
911
+
912
+ //---------------------------------------------------------------------
913
+ // Use these constants with D3DSIO_SINCOS macro as SRC2, SRC3
914
+ //
915
+ #define D3DSINCOSCONST1 -1.5500992e-006f, -2.1701389e-005f, 0.0026041667f, 0.00026041668f
916
+ #define D3DSINCOSCONST2 -0.020833334f, -0.12500000f, 1.0f, 0.50000000f
917
+
918
+ //---------------------------------------------------------------------
919
+ // Co-Issue Instruction Modifier - if set then this instruction is to be
920
+ // issued in parallel with the previous instruction(s) for which this bit
921
+ // is not set.
922
+ //
923
+ #define D3DSI_COISSUE 0x40000000
924
+
925
+ //---------------------------------------------------------------------
926
+ // Opcode specific controls
927
+
928
+ #define D3DSP_OPCODESPECIFICCONTROL_MASK 0x00ff0000
929
+ #define D3DSP_OPCODESPECIFICCONTROL_SHIFT 16
930
+
931
+ // ps_2_0 texld controls
932
+ #define D3DSI_TEXLD_PROJECT (0x01 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
933
+ #define D3DSI_TEXLD_BIAS (0x02 << D3DSP_OPCODESPECIFICCONTROL_SHIFT)
934
+
935
+ // Comparison for dynamic conditional instruction opcodes (i.e. if, breakc)
936
+ typedef enum _D3DSHADER_COMPARISON
937
+ {
938
+ // < = >
939
+ D3DSPC_RESERVED0= 0, // 0 0 0
940
+ D3DSPC_GT = 1, // 0 0 1
941
+ D3DSPC_EQ = 2, // 0 1 0
942
+ D3DSPC_GE = 3, // 0 1 1
943
+ D3DSPC_LT = 4, // 1 0 0
944
+ D3DSPC_NE = 5, // 1 0 1
945
+ D3DSPC_LE = 6, // 1 1 0
946
+ D3DSPC_RESERVED1= 7 // 1 1 1
947
+ } D3DSHADER_COMPARISON;
948
+
949
+ // Comparison is part of instruction opcode token:
950
+ #define D3DSHADER_COMPARISON_SHIFT D3DSP_OPCODESPECIFICCONTROL_SHIFT
951
+ #define D3DSHADER_COMPARISON_MASK (0x7<<D3DSHADER_COMPARISON_SHIFT)
952
+
953
+ //---------------------------------------------------------------------
954
+ // Predication flags on instruction token
955
+ #define D3DSHADER_INSTRUCTION_PREDICATED (0x1 << 28)
956
+
957
+ //---------------------------------------------------------------------
958
+ // DCL Info Token Controls
959
+
960
+ // For dcl info tokens requiring a semantic (usage + index)
961
+ #define D3DSP_DCL_USAGE_SHIFT 0
962
+ #define D3DSP_DCL_USAGE_MASK 0x0000000f
963
+
964
+ #define D3DSP_DCL_USAGEINDEX_SHIFT 16
965
+ #define D3DSP_DCL_USAGEINDEX_MASK 0x000f0000
966
+
967
+ // DCL pixel shader sampler info token.
968
+ #define D3DSP_TEXTURETYPE_SHIFT 27
969
+ #define D3DSP_TEXTURETYPE_MASK 0x78000000
970
+
971
+ typedef enum _D3DSAMPLER_TEXTURE_TYPE
972
+ {
973
+ D3DSTT_UNKNOWN = 0<<D3DSP_TEXTURETYPE_SHIFT, // uninitialized value
974
+ D3DSTT_2D = 2<<D3DSP_TEXTURETYPE_SHIFT, // dcl_2d s# (for declaring a 2-D texture)
975
+ D3DSTT_CUBE = 3<<D3DSP_TEXTURETYPE_SHIFT, // dcl_cube s# (for declaring a cube texture)
976
+ D3DSTT_VOLUME = 4<<D3DSP_TEXTURETYPE_SHIFT, // dcl_volume s# (for declaring a volume texture)
977
+ D3DSTT_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
978
+ } D3DSAMPLER_TEXTURE_TYPE;
979
+
980
+ //---------------------------------------------------------------------
981
+ // Parameter Token Bit Definitions
982
+ //
983
+ #define D3DSP_REGNUM_MASK 0x000007FF
984
+
985
+ // destination parameter write mask
986
+ #define D3DSP_WRITEMASK_0 0x00010000 // Component 0 (X;Red)
987
+ #define D3DSP_WRITEMASK_1 0x00020000 // Component 1 (Y;Green)
988
+ #define D3DSP_WRITEMASK_2 0x00040000 // Component 2 (Z;Blue)
989
+ #define D3DSP_WRITEMASK_3 0x00080000 // Component 3 (W;Alpha)
990
+ #define D3DSP_WRITEMASK_ALL 0x000F0000 // All Components
991
+
992
+ // destination parameter modifiers
993
+ #define D3DSP_DSTMOD_SHIFT 20
994
+ #define D3DSP_DSTMOD_MASK 0x00F00000
995
+
996
+ // Bit masks for destination parameter modifiers
997
+ #define D3DSPDM_NONE (0<<D3DSP_DSTMOD_SHIFT) // nop
998
+ #define D3DSPDM_SATURATE (1<<D3DSP_DSTMOD_SHIFT) // clamp to 0. to 1. range
999
+ #define D3DSPDM_PARTIALPRECISION (2<<D3DSP_DSTMOD_SHIFT) // Partial precision hint
1000
+ #define D3DSPDM_MSAMPCENTROID (4<<D3DSP_DSTMOD_SHIFT) // Relevant to multisampling only:
1001
+ // When the pixel center is not covered, sample
1002
+ // attribute or compute gradients/LOD
1003
+ // using multisample "centroid" location.
1004
+ // "Centroid" is some location within the covered
1005
+ // region of the pixel.
1006
+
1007
+ // destination parameter
1008
+ #define D3DSP_DSTSHIFT_SHIFT 24
1009
+ #define D3DSP_DSTSHIFT_MASK 0x0F000000
1010
+
1011
+ // destination/source parameter register type
1012
+ #define D3DSP_REGTYPE_SHIFT 28
1013
+ #define D3DSP_REGTYPE_SHIFT2 8
1014
+ #define D3DSP_REGTYPE_MASK 0x70000000
1015
+ #define D3DSP_REGTYPE_MASK2 0x00001800
1016
+
1017
+ typedef enum _D3DSHADER_PARAM_REGISTER_TYPE
1018
+ {
1019
+ D3DSPR_TEMP = 0, // Temporary Register File
1020
+ D3DSPR_INPUT = 1, // Input Register File
1021
+ D3DSPR_CONST = 2, // Constant Register File
1022
+ D3DSPR_ADDR = 3, // Address Register (VS)
1023
+ D3DSPR_TEXTURE = 3, // Texture Register File (PS)
1024
+ D3DSPR_RASTOUT = 4, // Rasterizer Register File
1025
+ D3DSPR_ATTROUT = 5, // Attribute Output Register File
1026
+ D3DSPR_TEXCRDOUT = 6, // Texture Coordinate Output Register File
1027
+ D3DSPR_OUTPUT = 6, // Output register file for VS3.0+
1028
+ D3DSPR_CONSTINT = 7, // Constant Integer Vector Register File
1029
+ D3DSPR_COLOROUT = 8, // Color Output Register File
1030
+ D3DSPR_DEPTHOUT = 9, // Depth Output Register File
1031
+ D3DSPR_SAMPLER = 10, // Sampler State Register File
1032
+ D3DSPR_CONST2 = 11, // Constant Register File 2048 - 4095
1033
+ D3DSPR_CONST3 = 12, // Constant Register File 4096 - 6143
1034
+ D3DSPR_CONST4 = 13, // Constant Register File 6144 - 8191
1035
+ D3DSPR_CONSTBOOL = 14, // Constant Boolean register file
1036
+ D3DSPR_LOOP = 15, // Loop counter register file
1037
+ D3DSPR_TEMPFLOAT16 = 16, // 16-bit float temp register file
1038
+ D3DSPR_MISCTYPE = 17, // Miscellaneous (single) registers.
1039
+ D3DSPR_LABEL = 18, // Label
1040
+ D3DSPR_PREDICATE = 19, // Predicate register
1041
+ D3DSPR_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1042
+ } D3DSHADER_PARAM_REGISTER_TYPE;
1043
+
1044
+ // The miscellaneous register file (D3DSPR_MISCTYPES)
1045
+ // contains register types for which there is only ever one
1046
+ // register (i.e. the register # is not needed).
1047
+ // Rather than use up additional register types for such
1048
+ // registers, they are defined
1049
+ // as particular offsets into the misc. register file:
1050
+ typedef enum _D3DSHADER_MISCTYPE_OFFSETS
1051
+ {
1052
+ D3DSMO_POSITION = 0, // Input position x,y,z,rhw (PS)
1053
+ D3DSMO_FACE = 1, // Floating point primitive area (PS)
1054
+ } D3DSHADER_MISCTYPE_OFFSETS;
1055
+
1056
+ // Register offsets in the Rasterizer Register File
1057
+ //
1058
+ typedef enum _D3DVS_RASTOUT_OFFSETS
1059
+ {
1060
+ D3DSRO_POSITION = 0,
1061
+ D3DSRO_FOG,
1062
+ D3DSRO_POINT_SIZE,
1063
+ D3DSRO_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1064
+ } D3DVS_RASTOUT_OFFSETS;
1065
+
1066
+ // Source operand addressing modes
1067
+
1068
+ #define D3DVS_ADDRESSMODE_SHIFT 13
1069
+ #define D3DVS_ADDRESSMODE_MASK (1 << D3DVS_ADDRESSMODE_SHIFT)
1070
+
1071
+ typedef enum _D3DVS_ADDRESSMODE_TYPE
1072
+ {
1073
+ D3DVS_ADDRMODE_ABSOLUTE = (0 << D3DVS_ADDRESSMODE_SHIFT),
1074
+ D3DVS_ADDRMODE_RELATIVE = (1 << D3DVS_ADDRESSMODE_SHIFT),
1075
+ D3DVS_ADDRMODE_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1076
+ } D3DVS_ADDRESSMODE_TYPE;
1077
+
1078
+ #define D3DSHADER_ADDRESSMODE_SHIFT 13
1079
+ #define D3DSHADER_ADDRESSMODE_MASK (1 << D3DSHADER_ADDRESSMODE_SHIFT)
1080
+
1081
+ typedef enum _D3DSHADER_ADDRESSMODE_TYPE
1082
+ {
1083
+ D3DSHADER_ADDRMODE_ABSOLUTE = (0 << D3DSHADER_ADDRESSMODE_SHIFT),
1084
+ D3DSHADER_ADDRMODE_RELATIVE = (1 << D3DSHADER_ADDRESSMODE_SHIFT),
1085
+ D3DSHADER_ADDRMODE_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1086
+ } D3DSHADER_ADDRESSMODE_TYPE;
1087
+
1088
+ // Source operand swizzle definitions
1089
+ //
1090
+ #define D3DVS_SWIZZLE_SHIFT 16
1091
+ #define D3DVS_SWIZZLE_MASK 0x00FF0000
1092
+
1093
+ // The following bits define where to take component X from:
1094
+
1095
+ #define D3DVS_X_X (0 << D3DVS_SWIZZLE_SHIFT)
1096
+ #define D3DVS_X_Y (1 << D3DVS_SWIZZLE_SHIFT)
1097
+ #define D3DVS_X_Z (2 << D3DVS_SWIZZLE_SHIFT)
1098
+ #define D3DVS_X_W (3 << D3DVS_SWIZZLE_SHIFT)
1099
+
1100
+ // The following bits define where to take component Y from:
1101
+
1102
+ #define D3DVS_Y_X (0 << (D3DVS_SWIZZLE_SHIFT + 2))
1103
+ #define D3DVS_Y_Y (1 << (D3DVS_SWIZZLE_SHIFT + 2))
1104
+ #define D3DVS_Y_Z (2 << (D3DVS_SWIZZLE_SHIFT + 2))
1105
+ #define D3DVS_Y_W (3 << (D3DVS_SWIZZLE_SHIFT + 2))
1106
+
1107
+ // The following bits define where to take component Z from:
1108
+
1109
+ #define D3DVS_Z_X (0 << (D3DVS_SWIZZLE_SHIFT + 4))
1110
+ #define D3DVS_Z_Y (1 << (D3DVS_SWIZZLE_SHIFT + 4))
1111
+ #define D3DVS_Z_Z (2 << (D3DVS_SWIZZLE_SHIFT + 4))
1112
+ #define D3DVS_Z_W (3 << (D3DVS_SWIZZLE_SHIFT + 4))
1113
+
1114
+ // The following bits define where to take component W from:
1115
+
1116
+ #define D3DVS_W_X (0 << (D3DVS_SWIZZLE_SHIFT + 6))
1117
+ #define D3DVS_W_Y (1 << (D3DVS_SWIZZLE_SHIFT + 6))
1118
+ #define D3DVS_W_Z (2 << (D3DVS_SWIZZLE_SHIFT + 6))
1119
+ #define D3DVS_W_W (3 << (D3DVS_SWIZZLE_SHIFT + 6))
1120
+
1121
+ // Value when there is no swizzle (X is taken from X, Y is taken from Y,
1122
+ // Z is taken from Z, W is taken from W
1123
+ //
1124
+ #define D3DVS_NOSWIZZLE (D3DVS_X_X | D3DVS_Y_Y | D3DVS_Z_Z | D3DVS_W_W)
1125
+
1126
+ // source parameter swizzle
1127
+ #define D3DSP_SWIZZLE_SHIFT 16
1128
+ #define D3DSP_SWIZZLE_MASK 0x00FF0000
1129
+
1130
+ #define D3DSP_NOSWIZZLE \
1131
+ ( (0 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1132
+ (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1133
+ (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1134
+ (3 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1135
+
1136
+ // pixel-shader swizzle ops
1137
+ #define D3DSP_REPLICATERED \
1138
+ ( (0 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1139
+ (0 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1140
+ (0 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1141
+ (0 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1142
+
1143
+ #define D3DSP_REPLICATEGREEN \
1144
+ ( (1 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1145
+ (1 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1146
+ (1 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1147
+ (1 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1148
+
1149
+ #define D3DSP_REPLICATEBLUE \
1150
+ ( (2 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1151
+ (2 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1152
+ (2 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1153
+ (2 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1154
+
1155
+ #define D3DSP_REPLICATEALPHA \
1156
+ ( (3 << (D3DSP_SWIZZLE_SHIFT + 0)) | \
1157
+ (3 << (D3DSP_SWIZZLE_SHIFT + 2)) | \
1158
+ (3 << (D3DSP_SWIZZLE_SHIFT + 4)) | \
1159
+ (3 << (D3DSP_SWIZZLE_SHIFT + 6)) )
1160
+
1161
+ // source parameter modifiers
1162
+ #define D3DSP_SRCMOD_SHIFT 24
1163
+ #define D3DSP_SRCMOD_MASK 0x0F000000
1164
+
1165
+ typedef enum _D3DSHADER_PARAM_SRCMOD_TYPE
1166
+ {
1167
+ D3DSPSM_NONE = 0<<D3DSP_SRCMOD_SHIFT, // nop
1168
+ D3DSPSM_NEG = 1<<D3DSP_SRCMOD_SHIFT, // negate
1169
+ D3DSPSM_BIAS = 2<<D3DSP_SRCMOD_SHIFT, // bias
1170
+ D3DSPSM_BIASNEG = 3<<D3DSP_SRCMOD_SHIFT, // bias and negate
1171
+ D3DSPSM_SIGN = 4<<D3DSP_SRCMOD_SHIFT, // sign
1172
+ D3DSPSM_SIGNNEG = 5<<D3DSP_SRCMOD_SHIFT, // sign and negate
1173
+ D3DSPSM_COMP = 6<<D3DSP_SRCMOD_SHIFT, // complement
1174
+ D3DSPSM_X2 = 7<<D3DSP_SRCMOD_SHIFT, // *2
1175
+ D3DSPSM_X2NEG = 8<<D3DSP_SRCMOD_SHIFT, // *2 and negate
1176
+ D3DSPSM_DZ = 9<<D3DSP_SRCMOD_SHIFT, // divide through by z component
1177
+ D3DSPSM_DW = 10<<D3DSP_SRCMOD_SHIFT, // divide through by w component
1178
+ D3DSPSM_ABS = 11<<D3DSP_SRCMOD_SHIFT, // abs()
1179
+ D3DSPSM_ABSNEG = 12<<D3DSP_SRCMOD_SHIFT, // -abs()
1180
+ D3DSPSM_NOT = 13<<D3DSP_SRCMOD_SHIFT, // for predicate register: "!p0"
1181
+ D3DSPSM_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1182
+ } D3DSHADER_PARAM_SRCMOD_TYPE;
1183
+
1184
+ // Source or dest token bits [15:14]:
1185
+ // destination parameter modifiers
1186
+ #define D3DSP_MIN_PRECISION_SHIFT 14
1187
+ #define D3DSP_MIN_PRECISION_MASK 0x0000C000
1188
+
1189
+ typedef enum _D3DSHADER_MIN_PRECISION
1190
+ {
1191
+ D3DMP_DEFAULT = 0, // Default precision for the shader model
1192
+ D3DMP_16 = 1, // 16 bit per component
1193
+ D3DMP_2_8 = 2, // 10 bits (2.8) per component
1194
+ } D3DSHADER_MIN_PRECISION;
1195
+ // If the older D3DSPDM_PARTIALPRECISION is set,
1196
+ // that is equivalent to the whole operation specifying
1197
+ // D3DMP_16 (on all operands). The two encodings are not
1198
+ // used together however.
1199
+
1200
+
1201
+
1202
+ // pixel shader version token
1203
+ #define D3DPS_VERSION(_Major,_Minor) (0xFFFF0000|((_Major)<<8)|(_Minor))
1204
+
1205
+ // vertex shader version token
1206
+ #define D3DVS_VERSION(_Major,_Minor) (0xFFFE0000|((_Major)<<8)|(_Minor))
1207
+
1208
+ // extract major/minor from version cap
1209
+ #define D3DSHADER_VERSION_MAJOR(_Version) (((_Version)>>8)&0xFF)
1210
+ #define D3DSHADER_VERSION_MINOR(_Version) (((_Version)>>0)&0xFF)
1211
+
1212
+ // destination/source parameter register type
1213
+ #define D3DSI_COMMENTSIZE_SHIFT 16
1214
+ #define D3DSI_COMMENTSIZE_MASK 0x7FFF0000
1215
+ #define D3DSHADER_COMMENT(_DWordSize) \
1216
+ ((((_DWordSize)<<D3DSI_COMMENTSIZE_SHIFT)&D3DSI_COMMENTSIZE_MASK)|D3DSIO_COMMENT)
1217
+
1218
+ // pixel/vertex shader end token
1219
+ #define D3DPS_END() 0x0000FFFF
1220
+ #define D3DVS_END() 0x0000FFFF
1221
+
1222
+
1223
+ //---------------------------------------------------------------------
1224
+
1225
+ // High order surfaces
1226
+ //
1227
+ typedef enum _D3DBASISTYPE
1228
+ {
1229
+ D3DBASIS_BEZIER = 0,
1230
+ D3DBASIS_BSPLINE = 1,
1231
+ D3DBASIS_CATMULL_ROM = 2, /* In D3D8 this used to be D3DBASIS_INTERPOLATE */
1232
+ D3DBASIS_FORCE_DWORD = 0x7fffffff,
1233
+ } D3DBASISTYPE;
1234
+
1235
+ typedef enum _D3DDEGREETYPE
1236
+ {
1237
+ D3DDEGREE_LINEAR = 1,
1238
+ D3DDEGREE_QUADRATIC = 2,
1239
+ D3DDEGREE_CUBIC = 3,
1240
+ D3DDEGREE_QUINTIC = 5,
1241
+ D3DDEGREE_FORCE_DWORD = 0x7fffffff,
1242
+ } D3DDEGREETYPE;
1243
+
1244
+ typedef enum _D3DPATCHEDGESTYLE
1245
+ {
1246
+ D3DPATCHEDGE_DISCRETE = 0,
1247
+ D3DPATCHEDGE_CONTINUOUS = 1,
1248
+ D3DPATCHEDGE_FORCE_DWORD = 0x7fffffff,
1249
+ } D3DPATCHEDGESTYLE;
1250
+
1251
+ typedef enum _D3DSTATEBLOCKTYPE
1252
+ {
1253
+ D3DSBT_ALL = 1, // capture all state
1254
+ D3DSBT_PIXELSTATE = 2, // capture pixel state
1255
+ D3DSBT_VERTEXSTATE = 3, // capture vertex state
1256
+ D3DSBT_FORCE_DWORD = 0x7fffffff,
1257
+ } D3DSTATEBLOCKTYPE;
1258
+
1259
+ // The D3DVERTEXBLENDFLAGS type is used with D3DRS_VERTEXBLEND state.
1260
+ //
1261
+ typedef enum _D3DVERTEXBLENDFLAGS
1262
+ {
1263
+ D3DVBF_DISABLE = 0, // Disable vertex blending
1264
+ D3DVBF_1WEIGHTS = 1, // 2 matrix blending
1265
+ D3DVBF_2WEIGHTS = 2, // 3 matrix blending
1266
+ D3DVBF_3WEIGHTS = 3, // 4 matrix blending
1267
+ D3DVBF_TWEENING = 255, // blending using D3DRS_TWEENFACTOR
1268
+ D3DVBF_0WEIGHTS = 256, // one matrix is used with weight 1.0
1269
+ D3DVBF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum
1270
+ } D3DVERTEXBLENDFLAGS;
1271
+
1272
+ typedef enum _D3DTEXTURETRANSFORMFLAGS {
1273
+ D3DTTFF_DISABLE = 0, // texture coordinates are passed directly
1274
+ D3DTTFF_COUNT1 = 1, // rasterizer should expect 1-D texture coords
1275
+ D3DTTFF_COUNT2 = 2, // rasterizer should expect 2-D texture coords
1276
+ D3DTTFF_COUNT3 = 3, // rasterizer should expect 3-D texture coords
1277
+ D3DTTFF_COUNT4 = 4, // rasterizer should expect 4-D texture coords
1278
+ D3DTTFF_PROJECTED = 256, // texcoords to be divided by COUNTth element
1279
+ D3DTTFF_FORCE_DWORD = 0x7fffffff,
1280
+ } D3DTEXTURETRANSFORMFLAGS;
1281
+
1282
+ // Macros to set texture coordinate format bits in the FVF id
1283
+
1284
+ #define D3DFVF_TEXTUREFORMAT2 0 // Two floating point values
1285
+ #define D3DFVF_TEXTUREFORMAT1 3 // One floating point value
1286
+ #define D3DFVF_TEXTUREFORMAT3 1 // Three floating point values
1287
+ #define D3DFVF_TEXTUREFORMAT4 2 // Four floating point values
1288
+
1289
+ #define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
1290
+ #define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
1291
+ #define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
1292
+ #define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
1293
+
1294
+
1295
+ //---------------------------------------------------------------------
1296
+
1297
+ /* Direct3D9 Device types */
1298
+ typedef enum _D3DDEVTYPE
1299
+ {
1300
+ D3DDEVTYPE_HAL = 1,
1301
+ D3DDEVTYPE_REF = 2,
1302
+ D3DDEVTYPE_SW = 3,
1303
+
1304
+ D3DDEVTYPE_NULLREF = 4,
1305
+
1306
+ D3DDEVTYPE_FORCE_DWORD = 0x7fffffff
1307
+ } D3DDEVTYPE;
1308
+
1309
+ /* Multi-Sample buffer types */
1310
+ typedef enum _D3DMULTISAMPLE_TYPE
1311
+ {
1312
+ D3DMULTISAMPLE_NONE = 0,
1313
+ D3DMULTISAMPLE_NONMASKABLE = 1,
1314
+ D3DMULTISAMPLE_2_SAMPLES = 2,
1315
+ D3DMULTISAMPLE_3_SAMPLES = 3,
1316
+ D3DMULTISAMPLE_4_SAMPLES = 4,
1317
+ D3DMULTISAMPLE_5_SAMPLES = 5,
1318
+ D3DMULTISAMPLE_6_SAMPLES = 6,
1319
+ D3DMULTISAMPLE_7_SAMPLES = 7,
1320
+ D3DMULTISAMPLE_8_SAMPLES = 8,
1321
+ D3DMULTISAMPLE_9_SAMPLES = 9,
1322
+ D3DMULTISAMPLE_10_SAMPLES = 10,
1323
+ D3DMULTISAMPLE_11_SAMPLES = 11,
1324
+ D3DMULTISAMPLE_12_SAMPLES = 12,
1325
+ D3DMULTISAMPLE_13_SAMPLES = 13,
1326
+ D3DMULTISAMPLE_14_SAMPLES = 14,
1327
+ D3DMULTISAMPLE_15_SAMPLES = 15,
1328
+ D3DMULTISAMPLE_16_SAMPLES = 16,
1329
+
1330
+ D3DMULTISAMPLE_FORCE_DWORD = 0x7fffffff
1331
+ } D3DMULTISAMPLE_TYPE;
1332
+
1333
+ /* Formats
1334
+ * Most of these names have the following convention:
1335
+ * A = Alpha
1336
+ * R = Red
1337
+ * G = Green
1338
+ * B = Blue
1339
+ * X = Unused Bits
1340
+ * P = Palette
1341
+ * L = Luminance
1342
+ * U = dU coordinate for BumpMap
1343
+ * V = dV coordinate for BumpMap
1344
+ * S = Stencil
1345
+ * D = Depth (e.g. Z or W buffer)
1346
+ * C = Computed from other channels (typically on certain read operations)
1347
+ *
1348
+ * Further, the order of the pieces are from MSB first; hence
1349
+ * D3DFMT_A8L8 indicates that the high byte of this two byte
1350
+ * format is alpha.
1351
+ *
1352
+ * D3DFMT_D16_LOCKABLE indicates:
1353
+ * - An integer 16-bit value.
1354
+ * - An app-lockable surface.
1355
+ *
1356
+ * D3DFMT_D32F_LOCKABLE indicates:
1357
+ * - An IEEE 754 floating-point value.
1358
+ * - An app-lockable surface.
1359
+ *
1360
+ * All Depth/Stencil formats except D3DFMT_D16_LOCKABLE and D3DFMT_D32F_LOCKABLE indicate:
1361
+ * - no particular bit ordering per pixel, and
1362
+ * - are not app lockable, and
1363
+ * - the driver is allowed to consume more than the indicated
1364
+ * number of bits per Depth channel (but not Stencil channel).
1365
+ */
1366
+ #ifndef MAKEFOURCC
1367
+ #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
1368
+ ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
1369
+ ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
1370
+ #endif /* defined(MAKEFOURCC) */
1371
+
1372
+
1373
+ typedef enum _D3DFORMAT
1374
+ {
1375
+ D3DFMT_UNKNOWN = 0,
1376
+
1377
+ D3DFMT_R8G8B8 = 20,
1378
+ D3DFMT_A8R8G8B8 = 21,
1379
+ D3DFMT_X8R8G8B8 = 22,
1380
+ D3DFMT_R5G6B5 = 23,
1381
+ D3DFMT_X1R5G5B5 = 24,
1382
+ D3DFMT_A1R5G5B5 = 25,
1383
+ D3DFMT_A4R4G4B4 = 26,
1384
+ D3DFMT_R3G3B2 = 27,
1385
+ D3DFMT_A8 = 28,
1386
+ D3DFMT_A8R3G3B2 = 29,
1387
+ D3DFMT_X4R4G4B4 = 30,
1388
+ D3DFMT_A2B10G10R10 = 31,
1389
+ D3DFMT_A8B8G8R8 = 32,
1390
+ D3DFMT_X8B8G8R8 = 33,
1391
+ D3DFMT_G16R16 = 34,
1392
+ D3DFMT_A2R10G10B10 = 35,
1393
+ D3DFMT_A16B16G16R16 = 36,
1394
+
1395
+ D3DFMT_A8P8 = 40,
1396
+ D3DFMT_P8 = 41,
1397
+
1398
+ D3DFMT_L8 = 50,
1399
+ D3DFMT_A8L8 = 51,
1400
+ D3DFMT_A4L4 = 52,
1401
+
1402
+ D3DFMT_V8U8 = 60,
1403
+ D3DFMT_L6V5U5 = 61,
1404
+ D3DFMT_X8L8V8U8 = 62,
1405
+ D3DFMT_Q8W8V8U8 = 63,
1406
+ D3DFMT_V16U16 = 64,
1407
+ D3DFMT_A2W10V10U10 = 67,
1408
+
1409
+ D3DFMT_UYVY = MAKEFOURCC('U', 'Y', 'V', 'Y'),
1410
+ D3DFMT_R8G8_B8G8 = MAKEFOURCC('R', 'G', 'B', 'G'),
1411
+ D3DFMT_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2'),
1412
+ D3DFMT_G8R8_G8B8 = MAKEFOURCC('G', 'R', 'G', 'B'),
1413
+ D3DFMT_DXT1 = MAKEFOURCC('D', 'X', 'T', '1'),
1414
+ D3DFMT_DXT2 = MAKEFOURCC('D', 'X', 'T', '2'),
1415
+ D3DFMT_DXT3 = MAKEFOURCC('D', 'X', 'T', '3'),
1416
+ D3DFMT_DXT4 = MAKEFOURCC('D', 'X', 'T', '4'),
1417
+ D3DFMT_DXT5 = MAKEFOURCC('D', 'X', 'T', '5'),
1418
+
1419
+ D3DFMT_D16_LOCKABLE = 70,
1420
+ D3DFMT_D32 = 71,
1421
+ D3DFMT_D15S1 = 73,
1422
+ D3DFMT_D24S8 = 75,
1423
+ D3DFMT_D24X8 = 77,
1424
+ D3DFMT_D24X4S4 = 79,
1425
+ D3DFMT_D16 = 80,
1426
+
1427
+ D3DFMT_D32F_LOCKABLE = 82,
1428
+ D3DFMT_D24FS8 = 83,
1429
+
1430
+ /* D3D9Ex only -- */
1431
+ #if !defined(D3D_DISABLE_9EX)
1432
+
1433
+ /* Z-Stencil formats valid for CPU access */
1434
+ D3DFMT_D32_LOCKABLE = 84,
1435
+ D3DFMT_S8_LOCKABLE = 85,
1436
+
1437
+ #endif // !D3D_DISABLE_9EX
1438
+ /* -- D3D9Ex only */
1439
+
1440
+
1441
+ D3DFMT_L16 = 81,
1442
+
1443
+ D3DFMT_VERTEXDATA =100,
1444
+ D3DFMT_INDEX16 =101,
1445
+ D3DFMT_INDEX32 =102,
1446
+
1447
+ D3DFMT_Q16W16V16U16 =110,
1448
+
1449
+ D3DFMT_MULTI2_ARGB8 = MAKEFOURCC('M','E','T','1'),
1450
+
1451
+ // Floating point surface formats
1452
+
1453
+ // s10e5 formats (16-bits per channel)
1454
+ D3DFMT_R16F = 111,
1455
+ D3DFMT_G16R16F = 112,
1456
+ D3DFMT_A16B16G16R16F = 113,
1457
+
1458
+ // IEEE s23e8 formats (32-bits per channel)
1459
+ D3DFMT_R32F = 114,
1460
+ D3DFMT_G32R32F = 115,
1461
+ D3DFMT_A32B32G32R32F = 116,
1462
+
1463
+ D3DFMT_CxV8U8 = 117,
1464
+
1465
+ /* D3D9Ex only -- */
1466
+ #if !defined(D3D_DISABLE_9EX)
1467
+
1468
+ // Monochrome 1 bit per pixel format
1469
+ D3DFMT_A1 = 118,
1470
+
1471
+ // 2.8 biased fixed point
1472
+ D3DFMT_A2B10G10R10_XR_BIAS = 119,
1473
+
1474
+
1475
+ // Binary format indicating that the data has no inherent type
1476
+ D3DFMT_BINARYBUFFER = 199,
1477
+
1478
+ #endif // !D3D_DISABLE_9EX
1479
+ /* -- D3D9Ex only */
1480
+
1481
+
1482
+ D3DFMT_FORCE_DWORD =0x7fffffff
1483
+ } D3DFORMAT;
1484
+
1485
+ /* Display Modes */
1486
+ typedef struct _D3DDISPLAYMODE
1487
+ {
1488
+ UINT Width;
1489
+ UINT Height;
1490
+ UINT RefreshRate;
1491
+ D3DFORMAT Format;
1492
+ } D3DDISPLAYMODE;
1493
+
1494
+ /* Creation Parameters */
1495
+ typedef struct _D3DDEVICE_CREATION_PARAMETERS
1496
+ {
1497
+ UINT AdapterOrdinal;
1498
+ D3DDEVTYPE DeviceType;
1499
+ HWND hFocusWindow;
1500
+ DWORD BehaviorFlags;
1501
+ } D3DDEVICE_CREATION_PARAMETERS;
1502
+
1503
+
1504
+ /* SwapEffects */
1505
+ typedef enum _D3DSWAPEFFECT
1506
+ {
1507
+ D3DSWAPEFFECT_DISCARD = 1,
1508
+ D3DSWAPEFFECT_FLIP = 2,
1509
+ D3DSWAPEFFECT_COPY = 3,
1510
+
1511
+ /* D3D9Ex only -- */
1512
+ #if !defined(D3D_DISABLE_9EX)
1513
+ D3DSWAPEFFECT_OVERLAY = 4,
1514
+ D3DSWAPEFFECT_FLIPEX = 5,
1515
+ #endif // !D3D_DISABLE_9EX
1516
+ /* -- D3D9Ex only */
1517
+
1518
+ D3DSWAPEFFECT_FORCE_DWORD = 0x7fffffff
1519
+ } D3DSWAPEFFECT;
1520
+
1521
+ /* Pool types */
1522
+ typedef enum _D3DPOOL {
1523
+ D3DPOOL_DEFAULT = 0,
1524
+ D3DPOOL_MANAGED = 1,
1525
+ D3DPOOL_SYSTEMMEM = 2,
1526
+ D3DPOOL_SCRATCH = 3,
1527
+
1528
+ D3DPOOL_FORCE_DWORD = 0x7fffffff
1529
+ } D3DPOOL;
1530
+
1531
+
1532
+ /* RefreshRate pre-defines */
1533
+ #define D3DPRESENT_RATE_DEFAULT 0x00000000
1534
+
1535
+
1536
+ /* Resize Optional Parameters */
1537
+ typedef struct _D3DPRESENT_PARAMETERS_
1538
+ {
1539
+ UINT BackBufferWidth;
1540
+ UINT BackBufferHeight;
1541
+ D3DFORMAT BackBufferFormat;
1542
+ UINT BackBufferCount;
1543
+
1544
+ D3DMULTISAMPLE_TYPE MultiSampleType;
1545
+ DWORD MultiSampleQuality;
1546
+
1547
+ D3DSWAPEFFECT SwapEffect;
1548
+ HWND hDeviceWindow;
1549
+ BOOL Windowed;
1550
+ BOOL EnableAutoDepthStencil;
1551
+ D3DFORMAT AutoDepthStencilFormat;
1552
+ DWORD Flags;
1553
+
1554
+ /* FullScreen_RefreshRateInHz must be zero for Windowed mode */
1555
+ UINT FullScreen_RefreshRateInHz;
1556
+ UINT PresentationInterval;
1557
+ } D3DPRESENT_PARAMETERS;
1558
+
1559
+ // Values for D3DPRESENT_PARAMETERS.Flags
1560
+
1561
+ #define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER 0x00000001
1562
+ #define D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL 0x00000002
1563
+ #define D3DPRESENTFLAG_DEVICECLIP 0x00000004
1564
+ #define D3DPRESENTFLAG_VIDEO 0x00000010
1565
+
1566
+ /* D3D9Ex only -- */
1567
+ #if !defined(D3D_DISABLE_9EX)
1568
+
1569
+ #define D3DPRESENTFLAG_NOAUTOROTATE 0x00000020
1570
+ #define D3DPRESENTFLAG_UNPRUNEDMODE 0x00000040
1571
+ #define D3DPRESENTFLAG_OVERLAY_LIMITEDRGB 0x00000080
1572
+ #define D3DPRESENTFLAG_OVERLAY_YCbCr_BT709 0x00000100
1573
+ #define D3DPRESENTFLAG_OVERLAY_YCbCr_xvYCC 0x00000200
1574
+ #define D3DPRESENTFLAG_RESTRICTED_CONTENT 0x00000400
1575
+ #define D3DPRESENTFLAG_RESTRICT_SHARED_RESOURCE_DRIVER 0x00000800
1576
+
1577
+ #endif // !D3D_DISABLE_9EX
1578
+ /* -- D3D9Ex only */
1579
+
1580
+ /* Gamma Ramp: Same as DX7 */
1581
+
1582
+ typedef struct _D3DGAMMARAMP
1583
+ {
1584
+ WORD red [256];
1585
+ WORD green[256];
1586
+ WORD blue [256];
1587
+ } D3DGAMMARAMP;
1588
+
1589
+ /* Back buffer types */
1590
+ typedef enum _D3DBACKBUFFER_TYPE
1591
+ {
1592
+ D3DBACKBUFFER_TYPE_MONO = 0,
1593
+ D3DBACKBUFFER_TYPE_LEFT = 1,
1594
+ D3DBACKBUFFER_TYPE_RIGHT = 2,
1595
+
1596
+ D3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff
1597
+ } D3DBACKBUFFER_TYPE;
1598
+
1599
+
1600
+ /* Types */
1601
+ typedef enum _D3DRESOURCETYPE {
1602
+ D3DRTYPE_SURFACE = 1,
1603
+ D3DRTYPE_VOLUME = 2,
1604
+ D3DRTYPE_TEXTURE = 3,
1605
+ D3DRTYPE_VOLUMETEXTURE = 4,
1606
+ D3DRTYPE_CUBETEXTURE = 5,
1607
+ D3DRTYPE_VERTEXBUFFER = 6,
1608
+ D3DRTYPE_INDEXBUFFER = 7, //if this changes, change _D3DDEVINFO_RESOURCEMANAGER definition
1609
+
1610
+
1611
+ D3DRTYPE_FORCE_DWORD = 0x7fffffff
1612
+ } D3DRESOURCETYPE;
1613
+
1614
+ /* Usages */
1615
+ #define D3DUSAGE_RENDERTARGET (0x00000001L)
1616
+ #define D3DUSAGE_DEPTHSTENCIL (0x00000002L)
1617
+ #define D3DUSAGE_DYNAMIC (0x00000200L)
1618
+
1619
+ /* D3D9Ex only -- */
1620
+ #if !defined(D3D_DISABLE_9EX)
1621
+
1622
+ #define D3DUSAGE_NONSECURE (0x00800000L)
1623
+
1624
+ #endif // !D3D_DISABLE_9EX
1625
+ /* -- D3D9Ex only */
1626
+
1627
+ // When passed to CheckDeviceFormat, D3DUSAGE_AUTOGENMIPMAP may return
1628
+ // D3DOK_NOAUTOGEN if the device doesn't support autogeneration for that format.
1629
+ // D3DOK_NOAUTOGEN is a success code, not a failure code... the SUCCEEDED and FAILED macros
1630
+ // will return true and false respectively for this code.
1631
+ #define D3DUSAGE_AUTOGENMIPMAP (0x00000400L)
1632
+ #define D3DUSAGE_DMAP (0x00004000L)
1633
+
1634
+ // The following usages are valid only for querying CheckDeviceFormat
1635
+ #define D3DUSAGE_QUERY_LEGACYBUMPMAP (0x00008000L)
1636
+ #define D3DUSAGE_QUERY_SRGBREAD (0x00010000L)
1637
+ #define D3DUSAGE_QUERY_FILTER (0x00020000L)
1638
+ #define D3DUSAGE_QUERY_SRGBWRITE (0x00040000L)
1639
+ #define D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING (0x00080000L)
1640
+ #define D3DUSAGE_QUERY_VERTEXTEXTURE (0x00100000L)
1641
+ #define D3DUSAGE_QUERY_WRAPANDMIP (0x00200000L)
1642
+
1643
+ /* Usages for Vertex/Index buffers */
1644
+ #define D3DUSAGE_WRITEONLY (0x00000008L)
1645
+ #define D3DUSAGE_SOFTWAREPROCESSING (0x00000010L)
1646
+ #define D3DUSAGE_DONOTCLIP (0x00000020L)
1647
+ #define D3DUSAGE_POINTS (0x00000040L)
1648
+ #define D3DUSAGE_RTPATCHES (0x00000080L)
1649
+ #define D3DUSAGE_NPATCHES (0x00000100L)
1650
+
1651
+ /* D3D9Ex only -- */
1652
+ #if !defined(D3D_DISABLE_9EX)
1653
+
1654
+ #define D3DUSAGE_TEXTAPI (0x10000000L)
1655
+ #define D3DUSAGE_RESTRICTED_CONTENT (0x00000800L)
1656
+ #define D3DUSAGE_RESTRICT_SHARED_RESOURCE (0x00002000L)
1657
+ #define D3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER (0x00001000L)
1658
+
1659
+ #endif // !D3D_DISABLE_9EX
1660
+ /* -- D3D9Ex only */
1661
+
1662
+
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+
1677
+
1678
+
1679
+ /* CubeMap Face identifiers */
1680
+ typedef enum _D3DCUBEMAP_FACES
1681
+ {
1682
+ D3DCUBEMAP_FACE_POSITIVE_X = 0,
1683
+ D3DCUBEMAP_FACE_NEGATIVE_X = 1,
1684
+ D3DCUBEMAP_FACE_POSITIVE_Y = 2,
1685
+ D3DCUBEMAP_FACE_NEGATIVE_Y = 3,
1686
+ D3DCUBEMAP_FACE_POSITIVE_Z = 4,
1687
+ D3DCUBEMAP_FACE_NEGATIVE_Z = 5,
1688
+
1689
+ D3DCUBEMAP_FACE_FORCE_DWORD = 0x7fffffff
1690
+ } D3DCUBEMAP_FACES;
1691
+
1692
+
1693
+ /* Lock flags */
1694
+
1695
+ #define D3DLOCK_READONLY 0x00000010L
1696
+ #define D3DLOCK_DISCARD 0x00002000L
1697
+ #define D3DLOCK_NOOVERWRITE 0x00001000L
1698
+ #define D3DLOCK_NOSYSLOCK 0x00000800L
1699
+ #define D3DLOCK_DONOTWAIT 0x00004000L
1700
+
1701
+ #define D3DLOCK_NO_DIRTY_UPDATE 0x00008000L
1702
+
1703
+
1704
+
1705
+
1706
+
1707
+
1708
+
1709
+ /* Vertex Buffer Description */
1710
+ typedef struct _D3DVERTEXBUFFER_DESC
1711
+ {
1712
+ D3DFORMAT Format;
1713
+ D3DRESOURCETYPE Type;
1714
+ DWORD Usage;
1715
+ D3DPOOL Pool;
1716
+ UINT Size;
1717
+
1718
+ DWORD FVF;
1719
+
1720
+ } D3DVERTEXBUFFER_DESC;
1721
+
1722
+ /* Index Buffer Description */
1723
+ typedef struct _D3DINDEXBUFFER_DESC
1724
+ {
1725
+ D3DFORMAT Format;
1726
+ D3DRESOURCETYPE Type;
1727
+ DWORD Usage;
1728
+ D3DPOOL Pool;
1729
+ UINT Size;
1730
+ } D3DINDEXBUFFER_DESC;
1731
+
1732
+
1733
+ /* Surface Description */
1734
+ typedef struct _D3DSURFACE_DESC
1735
+ {
1736
+ D3DFORMAT Format;
1737
+ D3DRESOURCETYPE Type;
1738
+ DWORD Usage;
1739
+ D3DPOOL Pool;
1740
+
1741
+ D3DMULTISAMPLE_TYPE MultiSampleType;
1742
+ DWORD MultiSampleQuality;
1743
+ UINT Width;
1744
+ UINT Height;
1745
+ } D3DSURFACE_DESC;
1746
+
1747
+ typedef struct _D3DVOLUME_DESC
1748
+ {
1749
+ D3DFORMAT Format;
1750
+ D3DRESOURCETYPE Type;
1751
+ DWORD Usage;
1752
+ D3DPOOL Pool;
1753
+
1754
+ UINT Width;
1755
+ UINT Height;
1756
+ UINT Depth;
1757
+ } D3DVOLUME_DESC;
1758
+
1759
+ /* Structure for LockRect */
1760
+ typedef struct _D3DLOCKED_RECT
1761
+ {
1762
+ INT Pitch;
1763
+ void* pBits;
1764
+ } D3DLOCKED_RECT;
1765
+
1766
+ /* Structures for LockBox */
1767
+ typedef struct _D3DBOX
1768
+ {
1769
+ UINT Left;
1770
+ UINT Top;
1771
+ UINT Right;
1772
+ UINT Bottom;
1773
+ UINT Front;
1774
+ UINT Back;
1775
+ } D3DBOX;
1776
+
1777
+ typedef struct _D3DLOCKED_BOX
1778
+ {
1779
+ INT RowPitch;
1780
+ INT SlicePitch;
1781
+ void* pBits;
1782
+ } D3DLOCKED_BOX;
1783
+
1784
+ /* Structures for LockRange */
1785
+ typedef struct _D3DRANGE
1786
+ {
1787
+ UINT Offset;
1788
+ UINT Size;
1789
+ } D3DRANGE;
1790
+
1791
+ /* Structures for high order primitives */
1792
+ typedef struct _D3DRECTPATCH_INFO
1793
+ {
1794
+ UINT StartVertexOffsetWidth;
1795
+ UINT StartVertexOffsetHeight;
1796
+ UINT Width;
1797
+ UINT Height;
1798
+ UINT Stride;
1799
+ D3DBASISTYPE Basis;
1800
+ D3DDEGREETYPE Degree;
1801
+ } D3DRECTPATCH_INFO;
1802
+
1803
+ typedef struct _D3DTRIPATCH_INFO
1804
+ {
1805
+ UINT StartVertexOffset;
1806
+ UINT NumVertices;
1807
+ D3DBASISTYPE Basis;
1808
+ D3DDEGREETYPE Degree;
1809
+ } D3DTRIPATCH_INFO;
1810
+
1811
+ /* Adapter Identifier */
1812
+
1813
+ #define MAX_DEVICE_IDENTIFIER_STRING 512
1814
+ typedef struct _D3DADAPTER_IDENTIFIER9
1815
+ {
1816
+ char Driver[MAX_DEVICE_IDENTIFIER_STRING];
1817
+ char Description[MAX_DEVICE_IDENTIFIER_STRING];
1818
+ char DeviceName[32]; /* Device name for GDI (ex. \\.\DISPLAY1) */
1819
+
1820
+ #ifdef _WIN32
1821
+ LARGE_INTEGER DriverVersion; /* Defined for 32 bit components */
1822
+ #else
1823
+ DWORD DriverVersionLowPart; /* Defined for 16 bit driver components */
1824
+ DWORD DriverVersionHighPart;
1825
+ #endif
1826
+
1827
+ DWORD VendorId;
1828
+ DWORD DeviceId;
1829
+ DWORD SubSysId;
1830
+ DWORD Revision;
1831
+
1832
+ GUID DeviceIdentifier;
1833
+
1834
+ DWORD WHQLLevel;
1835
+
1836
+ } D3DADAPTER_IDENTIFIER9;
1837
+
1838
+
1839
+ /* Raster Status structure returned by GetRasterStatus */
1840
+ typedef struct _D3DRASTER_STATUS
1841
+ {
1842
+ BOOL InVBlank;
1843
+ UINT ScanLine;
1844
+ } D3DRASTER_STATUS;
1845
+
1846
+
1847
+
1848
+ /* Debug monitor tokens (DEBUG only)
1849
+
1850
+ Note that if D3DRS_DEBUGMONITORTOKEN is set, the call is treated as
1851
+ passing a token to the debug monitor. For example, if, after passing
1852
+ D3DDMT_ENABLE/DISABLE to D3DRS_DEBUGMONITORTOKEN other token values
1853
+ are passed in, the enabled/disabled state of the debug
1854
+ monitor will still persist.
1855
+
1856
+ The debug monitor defaults to enabled.
1857
+
1858
+ Calling GetRenderState on D3DRS_DEBUGMONITORTOKEN is not of any use.
1859
+ */
1860
+ typedef enum _D3DDEBUGMONITORTOKENS {
1861
+ D3DDMT_ENABLE = 0, // enable debug monitor
1862
+ D3DDMT_DISABLE = 1, // disable debug monitor
1863
+ D3DDMT_FORCE_DWORD = 0x7fffffff,
1864
+ } D3DDEBUGMONITORTOKENS;
1865
+
1866
+ // Async feedback
1867
+
1868
+ typedef enum _D3DQUERYTYPE {
1869
+ D3DQUERYTYPE_VCACHE = 4, /* D3DISSUE_END */
1870
+ D3DQUERYTYPE_RESOURCEMANAGER = 5, /* D3DISSUE_END */
1871
+ D3DQUERYTYPE_VERTEXSTATS = 6, /* D3DISSUE_END */
1872
+ D3DQUERYTYPE_EVENT = 8, /* D3DISSUE_END */
1873
+ D3DQUERYTYPE_OCCLUSION = 9, /* D3DISSUE_BEGIN, D3DISSUE_END */
1874
+ D3DQUERYTYPE_TIMESTAMP = 10, /* D3DISSUE_END */
1875
+ D3DQUERYTYPE_TIMESTAMPDISJOINT = 11, /* D3DISSUE_BEGIN, D3DISSUE_END */
1876
+ D3DQUERYTYPE_TIMESTAMPFREQ = 12, /* D3DISSUE_END */
1877
+ D3DQUERYTYPE_PIPELINETIMINGS = 13, /* D3DISSUE_BEGIN, D3DISSUE_END */
1878
+ D3DQUERYTYPE_INTERFACETIMINGS = 14, /* D3DISSUE_BEGIN, D3DISSUE_END */
1879
+ D3DQUERYTYPE_VERTEXTIMINGS = 15, /* D3DISSUE_BEGIN, D3DISSUE_END */
1880
+ D3DQUERYTYPE_PIXELTIMINGS = 16, /* D3DISSUE_BEGIN, D3DISSUE_END */
1881
+ D3DQUERYTYPE_BANDWIDTHTIMINGS = 17, /* D3DISSUE_BEGIN, D3DISSUE_END */
1882
+ D3DQUERYTYPE_CACHEUTILIZATION = 18, /* D3DISSUE_BEGIN, D3DISSUE_END */
1883
+ /* D3D9Ex only -- */
1884
+ #if !defined(D3D_DISABLE_9EX)
1885
+ D3DQUERYTYPE_MEMORYPRESSURE = 19, /* D3DISSUE_BEGIN, D3DISSUE_END */
1886
+ #endif // !D3D_DISABLE_9EX
1887
+ } D3DQUERYTYPE;
1888
+
1889
+ // Flags field for Issue
1890
+ #define D3DISSUE_END (1 << 0) // Tells the runtime to issue the end of a query, changing it's state to "non-signaled".
1891
+ #define D3DISSUE_BEGIN (1 << 1) // Tells the runtime to issue the beginng of a query.
1892
+
1893
+
1894
+ // Flags field for GetData
1895
+ #define D3DGETDATA_FLUSH (1 << 0) // Tells the runtime to flush if the query is outstanding.
1896
+
1897
+
1898
+ typedef struct _D3DRESOURCESTATS
1899
+ {
1900
+ // Data collected since last Present()
1901
+ BOOL bThrashing; /* indicates if thrashing */
1902
+ DWORD ApproxBytesDownloaded; /* Approximate number of bytes downloaded by resource manager */
1903
+ DWORD NumEvicts; /* number of objects evicted */
1904
+ DWORD NumVidCreates; /* number of objects created in video memory */
1905
+ DWORD LastPri; /* priority of last object evicted */
1906
+ DWORD NumUsed; /* number of objects set to the device */
1907
+ DWORD NumUsedInVidMem; /* number of objects set to the device, which are already in video memory */
1908
+ // Persistent data
1909
+ DWORD WorkingSet; /* number of objects in video memory */
1910
+ DWORD WorkingSetBytes; /* number of bytes in video memory */
1911
+ DWORD TotalManaged; /* total number of managed objects */
1912
+ DWORD TotalBytes; /* total number of bytes of managed objects */
1913
+ } D3DRESOURCESTATS;
1914
+
1915
+ #define D3DRTYPECOUNT (D3DRTYPE_INDEXBUFFER+1)
1916
+
1917
+ typedef struct _D3DDEVINFO_RESOURCEMANAGER
1918
+ {
1919
+ #ifndef WOW64_ENUM_WORKAROUND
1920
+ D3DRESOURCESTATS stats[D3DRTYPECOUNT];
1921
+ #else
1922
+ D3DRESOURCESTATS stats[8];
1923
+ #endif
1924
+ } D3DDEVINFO_RESOURCEMANAGER, *LPD3DDEVINFO_RESOURCEMANAGER;
1925
+
1926
+ typedef struct _D3DDEVINFO_D3DVERTEXSTATS
1927
+ {
1928
+ DWORD NumRenderedTriangles; /* total number of triangles that are not clipped in this frame */
1929
+ DWORD NumExtraClippingTriangles; /* Number of new triangles generated by clipping */
1930
+ } D3DDEVINFO_D3DVERTEXSTATS, *LPD3DDEVINFO_D3DVERTEXSTATS;
1931
+
1932
+
1933
+ typedef struct _D3DDEVINFO_VCACHE {
1934
+ DWORD Pattern; /* bit pattern, return value must be FOUR_CC('C', 'A', 'C', 'H') */
1935
+ DWORD OptMethod; /* optimization method 0 means longest strips, 1 means vertex cache based */
1936
+ DWORD CacheSize; /* cache size to optimize for (only required if type is 1) */
1937
+ DWORD MagicNumber; /* used to determine when to restart strips (only required if type is 1)*/
1938
+ } D3DDEVINFO_VCACHE, *LPD3DDEVINFO_VCACHE;
1939
+
1940
+ typedef struct _D3DDEVINFO_D3D9PIPELINETIMINGS
1941
+ {
1942
+ FLOAT VertexProcessingTimePercent;
1943
+ FLOAT PixelProcessingTimePercent;
1944
+ FLOAT OtherGPUProcessingTimePercent;
1945
+ FLOAT GPUIdleTimePercent;
1946
+ } D3DDEVINFO_D3D9PIPELINETIMINGS;
1947
+
1948
+ typedef struct _D3DDEVINFO_D3D9INTERFACETIMINGS
1949
+ {
1950
+ FLOAT WaitingForGPUToUseApplicationResourceTimePercent;
1951
+ FLOAT WaitingForGPUToAcceptMoreCommandsTimePercent;
1952
+ FLOAT WaitingForGPUToStayWithinLatencyTimePercent;
1953
+ FLOAT WaitingForGPUExclusiveResourceTimePercent;
1954
+ FLOAT WaitingForGPUOtherTimePercent;
1955
+ } D3DDEVINFO_D3D9INTERFACETIMINGS;
1956
+
1957
+ typedef struct _D3DDEVINFO_D3D9STAGETIMINGS
1958
+ {
1959
+ FLOAT MemoryProcessingPercent;
1960
+ FLOAT ComputationProcessingPercent;
1961
+ } D3DDEVINFO_D3D9STAGETIMINGS;
1962
+
1963
+ typedef struct _D3DDEVINFO_D3D9BANDWIDTHTIMINGS
1964
+ {
1965
+ FLOAT MaxBandwidthUtilized;
1966
+ FLOAT FrontEndUploadMemoryUtilizedPercent;
1967
+ FLOAT VertexRateUtilizedPercent;
1968
+ FLOAT TriangleSetupRateUtilizedPercent;
1969
+ FLOAT FillRateUtilizedPercent;
1970
+ } D3DDEVINFO_D3D9BANDWIDTHTIMINGS;
1971
+
1972
+ typedef struct _D3DDEVINFO_D3D9CACHEUTILIZATION
1973
+ {
1974
+ FLOAT TextureCacheHitRate; // Percentage of cache hits
1975
+ FLOAT PostTransformVertexCacheHitRate;
1976
+ } D3DDEVINFO_D3D9CACHEUTILIZATION;
1977
+
1978
+ /* D3D9Ex only -- */
1979
+ #if !defined(D3D_DISABLE_9EX)
1980
+
1981
+ typedef struct _D3DMEMORYPRESSURE
1982
+ {
1983
+ UINT64 BytesEvictedFromProcess;
1984
+ UINT64 SizeOfInefficientAllocation;
1985
+ DWORD LevelOfEfficiency;
1986
+ } D3DMEMORYPRESSURE;
1987
+
1988
+ typedef enum _D3DCOMPOSERECTSOP{
1989
+ D3DCOMPOSERECTS_COPY = 1,
1990
+ D3DCOMPOSERECTS_OR = 2,
1991
+ D3DCOMPOSERECTS_AND = 3,
1992
+ D3DCOMPOSERECTS_NEG = 4,
1993
+ D3DCOMPOSERECTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */
1994
+ } D3DCOMPOSERECTSOP;
1995
+
1996
+ typedef struct _D3DCOMPOSERECTDESC
1997
+ {
1998
+ USHORT X, Y; // Top-left coordinates of a rect in the source surface
1999
+ USHORT Width, Height; // Dimensions of the rect
2000
+ } D3DCOMPOSERECTDESC;
2001
+
2002
+ typedef struct _D3DCOMPOSERECTDESTINATION
2003
+ {
2004
+ USHORT SrcRectIndex; // Index of D3DCOMPOSERECTDESC
2005
+ USHORT Reserved; // For alignment
2006
+ SHORT X, Y; // Top-left coordinates of the rect in the destination surface
2007
+ } D3DCOMPOSERECTDESTINATION;
2008
+
2009
+ #define D3DCOMPOSERECTS_MAXNUMRECTS 0xFFFF
2010
+ #define D3DCONVOLUTIONMONO_MAXWIDTH 7
2011
+ #define D3DCONVOLUTIONMONO_MAXHEIGHT D3DCONVOLUTIONMONO_MAXWIDTH
2012
+ #define D3DFMT_A1_SURFACE_MAXWIDTH 8192
2013
+ #define D3DFMT_A1_SURFACE_MAXHEIGHT 2048
2014
+
2015
+
2016
+ typedef struct _D3DPRESENTSTATS {
2017
+ UINT PresentCount;
2018
+ UINT PresentRefreshCount;
2019
+ UINT SyncRefreshCount;
2020
+ LARGE_INTEGER SyncQPCTime;
2021
+ LARGE_INTEGER SyncGPUTime;
2022
+ } D3DPRESENTSTATS;
2023
+
2024
+ typedef enum D3DSCANLINEORDERING
2025
+ {
2026
+ D3DSCANLINEORDERING_UNKNOWN = 0,
2027
+ D3DSCANLINEORDERING_PROGRESSIVE = 1,
2028
+ D3DSCANLINEORDERING_INTERLACED = 2,
2029
+ } D3DSCANLINEORDERING;
2030
+
2031
+
2032
+ typedef struct D3DDISPLAYMODEEX
2033
+ {
2034
+ UINT Size;
2035
+ UINT Width;
2036
+ UINT Height;
2037
+ UINT RefreshRate;
2038
+ D3DFORMAT Format;
2039
+ D3DSCANLINEORDERING ScanLineOrdering;
2040
+ } D3DDISPLAYMODEEX;
2041
+
2042
+ typedef struct D3DDISPLAYMODEFILTER
2043
+ {
2044
+ UINT Size;
2045
+ D3DFORMAT Format;
2046
+ D3DSCANLINEORDERING ScanLineOrdering;
2047
+ } D3DDISPLAYMODEFILTER;
2048
+
2049
+
2050
+ typedef enum D3DDISPLAYROTATION
2051
+ {
2052
+ D3DDISPLAYROTATION_IDENTITY = 1, // No rotation.
2053
+ D3DDISPLAYROTATION_90 = 2, // Rotated 90 degrees.
2054
+ D3DDISPLAYROTATION_180 = 3, // Rotated 180 degrees.
2055
+ D3DDISPLAYROTATION_270 = 4 // Rotated 270 degrees.
2056
+ } D3DDISPLAYROTATION;
2057
+
2058
+ /* For use in ID3DResource9::SetPriority calls */
2059
+ #define D3D9_RESOURCE_PRIORITY_MINIMUM 0x28000000
2060
+ #define D3D9_RESOURCE_PRIORITY_LOW 0x50000000
2061
+ #define D3D9_RESOURCE_PRIORITY_NORMAL 0x78000000
2062
+ #define D3D9_RESOURCE_PRIORITY_HIGH 0xa0000000
2063
+ #define D3D9_RESOURCE_PRIORITY_MAXIMUM 0xc8000000
2064
+
2065
+ #define D3D_OMAC_SIZE 16
2066
+
2067
+ typedef struct _D3D_OMAC
2068
+ {
2069
+ BYTE Omac[D3D_OMAC_SIZE];
2070
+ } D3D_OMAC;
2071
+
2072
+ typedef enum _D3DAUTHENTICATEDCHANNELTYPE
2073
+ {
2074
+ D3DAUTHENTICATEDCHANNEL_D3D9 = 1,
2075
+ D3DAUTHENTICATEDCHANNEL_DRIVER_SOFTWARE = 2,
2076
+ D3DAUTHENTICATEDCHANNEL_DRIVER_HARDWARE = 3,
2077
+ } D3DAUTHENTICATEDCHANNELTYPE;
2078
+
2079
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERY_INPUT
2080
+ {
2081
+ GUID QueryType;
2082
+ HANDLE hChannel;
2083
+ UINT SequenceNumber;
2084
+ } D3DAUTHENTICATEDCHANNEL_QUERY_INPUT;
2085
+
2086
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT
2087
+ {
2088
+ D3D_OMAC omac;
2089
+ GUID QueryType;
2090
+ HANDLE hChannel;
2091
+ UINT SequenceNumber;
2092
+ HRESULT ReturnCode;
2093
+ } D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT;
2094
+
2095
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_PROTECTION,
2096
+ 0xa84eb584, 0xc495, 0x48aa, 0xb9, 0x4d, 0x8b, 0xd2, 0xd6, 0xfb, 0xce, 0x5);
2097
+
2098
+ typedef struct _D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS
2099
+ {
2100
+ union
2101
+ {
2102
+ struct
2103
+ {
2104
+ UINT ProtectionEnabled : 1;
2105
+ UINT OverlayOrFullscreenRequired : 1;
2106
+ UINT Reserved : 30;
2107
+ };
2108
+ UINT Value;
2109
+ };
2110
+
2111
+ } D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS;
2112
+
2113
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT
2114
+ {
2115
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2116
+
2117
+ D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS ProtectionFlags;
2118
+
2119
+ } D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT;
2120
+
2121
+
2122
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_CHANNELTYPE,
2123
+ 0xbc1b18a5, 0xb1fb, 0x42ab, 0xbd, 0x94, 0xb5, 0x82, 0x8b, 0x4b, 0xf7, 0xbe);
2124
+
2125
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT
2126
+ {
2127
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2128
+
2129
+ D3DAUTHENTICATEDCHANNELTYPE ChannelType;
2130
+
2131
+ } D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT;
2132
+
2133
+
2134
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_DEVICEHANDLE,
2135
+ 0xec1c539d, 0x8cff, 0x4e2a, 0xbc, 0xc4, 0xf5, 0x69, 0x2f, 0x99, 0xf4, 0x80);
2136
+
2137
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT
2138
+ {
2139
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2140
+
2141
+ HANDLE DeviceHandle;
2142
+
2143
+ } D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT;
2144
+
2145
+
2146
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_CRYPTOSESSION,
2147
+ 0x2634499e, 0xd018, 0x4d74, 0xac, 0x17, 0x7f, 0x72, 0x40, 0x59, 0x52, 0x8d);
2148
+
2149
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT
2150
+ {
2151
+ D3DAUTHENTICATEDCHANNEL_QUERY_INPUT Input;
2152
+
2153
+ HANDLE DXVA2DecodeHandle;
2154
+
2155
+ } D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT;
2156
+
2157
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT
2158
+ {
2159
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2160
+
2161
+ HANDLE DXVA2DecodeHandle;
2162
+ HANDLE CryptoSessionHandle;
2163
+ HANDLE DeviceHandle;
2164
+
2165
+ } D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_OUTPUT;
2166
+
2167
+
2168
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESSCOUNT,
2169
+ 0xdb207b3, 0x9450, 0x46a6, 0x82, 0xde, 0x1b, 0x96, 0xd4, 0x4f, 0x9c, 0xf2);
2170
+
2171
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT
2172
+ {
2173
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2174
+
2175
+ UINT NumRestrictedSharedResourceProcesses;
2176
+
2177
+ } D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT;
2178
+
2179
+
2180
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESS,
2181
+ 0x649bbadb, 0xf0f4, 0x4639, 0xa1, 0x5b, 0x24, 0x39, 0x3f, 0xc3, 0xab, 0xac);
2182
+
2183
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_INPUT
2184
+ {
2185
+ D3DAUTHENTICATEDCHANNEL_QUERY_INPUT Input;
2186
+
2187
+ UINT ProcessIndex;
2188
+
2189
+ } D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_INPUT;
2190
+
2191
+ typedef enum _D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE
2192
+ {
2193
+ PROCESSIDTYPE_UNKNOWN = 0,
2194
+ PROCESSIDTYPE_DWM = 1,
2195
+ PROCESSIDTYPE_HANDLE = 2
2196
+ } D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE;
2197
+
2198
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT
2199
+ {
2200
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2201
+
2202
+ UINT ProcessIndex;
2203
+ D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE ProcessIdentifer;
2204
+ HANDLE ProcessHandle;
2205
+
2206
+ } D3DAUTHENTICATEDCHANNEL_QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT;
2207
+
2208
+
2209
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_UNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT,
2210
+ 0x12f0bd6, 0xe662, 0x4474, 0xbe, 0xfd, 0xaa, 0x53, 0xe5, 0x14, 0x3c, 0x6d);
2211
+
2212
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT
2213
+ {
2214
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2215
+
2216
+ UINT NumUnrestrictedProtectedSharedResources;
2217
+
2218
+ } D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT;
2219
+
2220
+
2221
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_OUTPUTIDCOUNT,
2222
+ 0x2c042b5e, 0x8c07, 0x46d5, 0xaa, 0xbe, 0x8f, 0x75, 0xcb, 0xad, 0x4c, 0x31);
2223
+
2224
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT
2225
+ {
2226
+ D3DAUTHENTICATEDCHANNEL_QUERY_INPUT Input;
2227
+
2228
+ HANDLE DeviceHandle;
2229
+ HANDLE CryptoSessionHandle;
2230
+
2231
+ } D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT;
2232
+
2233
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT
2234
+ {
2235
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2236
+
2237
+ HANDLE DeviceHandle;
2238
+ HANDLE CryptoSessionHandle;
2239
+ UINT NumOutputIDs;
2240
+
2241
+ } D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT;
2242
+
2243
+
2244
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_OUTPUTID,
2245
+ 0x839ddca3, 0x9b4e, 0x41e4, 0xb0, 0x53, 0x89, 0x2b, 0xd2, 0xa1, 0x1e, 0xe7);
2246
+
2247
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT
2248
+ {
2249
+ D3DAUTHENTICATEDCHANNEL_QUERY_INPUT Input;
2250
+
2251
+ HANDLE DeviceHandle;
2252
+ HANDLE CryptoSessionHandle;
2253
+ UINT OutputIDIndex;
2254
+
2255
+ } D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT;
2256
+
2257
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT
2258
+ {
2259
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2260
+
2261
+ HANDLE DeviceHandle;
2262
+ HANDLE CryptoSessionHandle;
2263
+ UINT OutputIDIndex;
2264
+ UINT64 OutputID;
2265
+
2266
+ } D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_OUTPUT;
2267
+
2268
+
2269
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_ACCESSIBILITYATTRIBUTES,
2270
+ 0x6214d9d2, 0x432c, 0x4abb, 0x9f, 0xce, 0x21, 0x6e, 0xea, 0x26, 0x9e, 0x3b);
2271
+
2272
+ typedef enum _D3DBUSTYPE
2273
+ {
2274
+ D3DBUSTYPE_OTHER = 0x00000000,
2275
+ D3DBUSTYPE_PCI = 0x00000001,
2276
+ D3DBUSTYPE_PCIX = 0x00000002,
2277
+ D3DBUSTYPE_PCIEXPRESS = 0x00000003,
2278
+ D3DBUSTYPE_AGP = 0x00000004,
2279
+ D3DBUSIMPL_MODIFIER_INSIDE_OF_CHIPSET = 0x00010000,
2280
+ D3DBUSIMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP = 0x00020000,
2281
+ D3DBUSIMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET = 0x00030000,
2282
+ D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR = 0x00040000,
2283
+ D3DBUSIMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE = 0x00050000,
2284
+ D3DBUSIMPL_MODIFIER_NON_STANDARD = 0x80000000,
2285
+ } D3DBUSTYPE;
2286
+
2287
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT
2288
+ {
2289
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2290
+
2291
+ D3DBUSTYPE BusType;
2292
+ BOOL bAccessibleInContiguousBlocks;
2293
+ BOOL bAccessibleInNonContiguousBlocks;
2294
+
2295
+ } D3DAUTHENTICATEDCHANNEL_QUERYINFOBUSTYPE_OUTPUT;
2296
+
2297
+
2298
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUIDCOUNT,
2299
+ 0xb30f7066, 0x203c, 0x4b07, 0x93, 0xfc, 0xce, 0xaa, 0xfd, 0x61, 0x24, 0x1e);
2300
+
2301
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT
2302
+ {
2303
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2304
+
2305
+ UINT NumEncryptionGuids;
2306
+
2307
+ } D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUIDCOUNT_OUTPUT;
2308
+
2309
+
2310
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUID,
2311
+ 0xf83a5958, 0xe986, 0x4bda, 0xbe, 0xb0, 0x41, 0x1f, 0x6a, 0x7a, 0x1, 0xb7);
2312
+
2313
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_INPUT
2314
+ {
2315
+ D3DAUTHENTICATEDCHANNEL_QUERY_INPUT Input;
2316
+
2317
+ UINT EncryptionGuidIndex;
2318
+
2319
+ } D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_INPUT;
2320
+
2321
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT
2322
+ {
2323
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2324
+
2325
+ UINT EncryptionGuidIndex;
2326
+ GUID EncryptionGuid;
2327
+
2328
+ } D3DAUTHENTICATEDCHANNEL_QUERYEVICTIONENCRYPTIONGUID_OUTPUT;
2329
+
2330
+
2331
+ DEFINE_GUID(D3DAUTHENTICATEDQUERY_CURRENTENCRYPTIONWHENACCESSIBLE,
2332
+ 0xec1791c7, 0xdad3, 0x4f15, 0x9e, 0xc3, 0xfa, 0xa9, 0x3d, 0x60, 0xd4, 0xf0);
2333
+
2334
+ typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT
2335
+ {
2336
+ D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
2337
+
2338
+ GUID EncryptionGuid;
2339
+
2340
+ } D3DAUTHENTICATEDCHANNEL_QUERYUNCOMPRESSEDENCRYPTIONLEVEL_OUTPUT;
2341
+
2342
+
2343
+ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT
2344
+ {
2345
+ D3D_OMAC omac;
2346
+ GUID ConfigureType;
2347
+ HANDLE hChannel;
2348
+ UINT SequenceNumber;
2349
+
2350
+ } D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT;
2351
+
2352
+ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT
2353
+ {
2354
+ D3D_OMAC omac;
2355
+ GUID ConfigureType;
2356
+ HANDLE hChannel;
2357
+ UINT SequenceNumber;
2358
+ HRESULT ReturnCode;
2359
+
2360
+ } D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT;
2361
+
2362
+ DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_INITIALIZE,
2363
+ 0x6114bdb, 0x3523, 0x470a, 0x8d, 0xca, 0xfb, 0xc2, 0x84, 0x51, 0x54, 0xf0);
2364
+
2365
+ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE
2366
+ {
2367
+ D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
2368
+
2369
+ UINT StartSequenceQuery;
2370
+ UINT StartSequenceConfigure;
2371
+
2372
+ } D3DAUTHENTICATEDCHANNEL_CONFIGUREINITIALIZE;
2373
+
2374
+
2375
+ DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_PROTECTION,
2376
+ 0x50455658, 0x3f47, 0x4362, 0xbf, 0x99, 0xbf, 0xdf, 0xcd, 0xe9, 0xed, 0x29);
2377
+
2378
+ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION
2379
+ {
2380
+ D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
2381
+
2382
+ D3DAUTHENTICATEDCHANNEL_PROTECTION_FLAGS Protections;
2383
+
2384
+ } D3DAUTHENTICATEDCHANNEL_CONFIGUREPROTECTION;
2385
+
2386
+
2387
+ DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_CRYPTOSESSION,
2388
+ 0x6346cc54, 0x2cfc, 0x4ad4, 0x82, 0x24, 0xd1, 0x58, 0x37, 0xde, 0x77, 0x0);
2389
+
2390
+ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION
2391
+ {
2392
+ D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
2393
+
2394
+ HANDLE DXVA2DecodeHandle;
2395
+ HANDLE CryptoSessionHandle;
2396
+ HANDLE DeviceHandle;
2397
+
2398
+ } D3DAUTHENTICATEDCHANNEL_CONFIGURECRYPTOSESSION;
2399
+
2400
+
2401
+ DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_SHAREDRESOURCE,
2402
+ 0x772d047, 0x1b40, 0x48e8, 0x9c, 0xa6, 0xb5, 0xf5, 0x10, 0xde, 0x9f, 0x1);
2403
+
2404
+ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE
2405
+ {
2406
+ D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
2407
+
2408
+ D3DAUTHENTICATEDCHANNEL_PROCESSIDENTIFIERTYPE ProcessIdentiferType;
2409
+ HANDLE ProcessHandle;
2410
+ BOOL AllowAccess;
2411
+
2412
+ } D3DAUTHENTICATEDCHANNEL_CONFIGURESHAREDRESOURCE;
2413
+
2414
+
2415
+ DEFINE_GUID(D3DAUTHENTICATEDCONFIGURE_ENCRYPTIONWHENACCESSIBLE,
2416
+ 0x41fff286, 0x6ae0, 0x4d43, 0x9d, 0x55, 0xa4, 0x6e, 0x9e, 0xfd, 0x15, 0x8a);
2417
+
2418
+ typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGUREUNCOMPRESSEDENCRYPTION
2419
+ {
2420
+ D3DAUTHENTICATEDCHANNEL_CONFIGURE_INPUT Parameters;
2421
+
2422
+ GUID EncryptionGuid;
2423
+
2424
+ } D3DAUTHENTICATEDCHANNEL_CONFIGUREUNCOMPRESSEDENCRYPTION;
2425
+
2426
+ typedef struct _D3DENCRYPTED_BLOCK_INFO
2427
+ {
2428
+ UINT NumEncryptedBytesAtBeginning;
2429
+ UINT NumBytesInSkipPattern;
2430
+ UINT NumBytesInEncryptPattern;
2431
+ } D3DENCRYPTED_BLOCK_INFO;
2432
+
2433
+ typedef struct _D3DAES_CTR_IV
2434
+ {
2435
+ UINT64 IV; // Big-Endian IV
2436
+ UINT64 Count; // Big-Endian Block Count
2437
+ } D3DAES_CTR_IV;
2438
+
2439
+
2440
+ #endif // !D3D_DISABLE_9EX
2441
+ /* -- D3D9Ex only */
2442
+
2443
+ #pragma pack()
2444
+ #if _MSC_VER >= 1200
2445
+ #pragma warning(pop)
2446
+ #else
2447
+ #pragma warning(default:4201)
2448
+ #endif
2449
+
2450
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
2451
+ #pragma endregion
2452
+
2453
+ #endif /* (DIRECT3D_VERSION >= 0x0900) */
2454
+ #endif /* _d3d9TYPES(P)_H_ */
2455
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/d3dkmdt.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/d3dkmthk.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/d3dukmdt.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/dciddi.h ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************
2
+ *
3
+ * FILE: dciddi.h
4
+ *
5
+ * DESCRIPTION: definitions for MS/Intel-defined DCI interface
6
+ *
7
+ * Copyright (C) 1994-1999 Intel/Microsoft Corporation. All Rights Reserved.
8
+ *
9
+ *******************************************************************/
10
+
11
+ #ifndef _INC_DCIDDI
12
+ #define _INC_DCIDDI
13
+
14
+ #if _MSC_VER > 1000
15
+ #pragma once
16
+ #endif
17
+
18
+ #include <winapifamily.h>
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ #pragma region Desktop Family
25
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
26
+
27
+ /* DCI Command Escapes */
28
+ #define DCICOMMAND 3075
29
+ #define DCI_VERSION 0x0100
30
+
31
+ #define DCICREATEPRIMARYSURFACE 1
32
+ #define DCICREATEOFFSCREENSURFACE 2
33
+ #define DCICREATEOVERLAYSURFACE 3
34
+ #define DCIENUMSURFACE 4
35
+ #define DCIESCAPE 5
36
+
37
+ /* DCI-Defined error codes */
38
+ #define DCI_OK 0 /* success */
39
+
40
+ /* Hard errors -- DCI will be unavailable */
41
+ #define DCI_FAIL_GENERIC -1
42
+ #define DCI_FAIL_UNSUPPORTEDVERSION -2
43
+ #define DCI_FAIL_INVALIDSURFACE -3
44
+ #define DCI_FAIL_UNSUPPORTED -4
45
+
46
+ /* Soft errors -- DCI may be available later */
47
+ #define DCI_ERR_CURRENTLYNOTAVAIL -5
48
+ #define DCI_ERR_INVALIDRECT -6
49
+ #define DCI_ERR_UNSUPPORTEDFORMAT -7
50
+ #define DCI_ERR_UNSUPPORTEDMASK -8
51
+ #define DCI_ERR_TOOBIGHEIGHT -9
52
+ #define DCI_ERR_TOOBIGWIDTH -10
53
+ #define DCI_ERR_TOOBIGSIZE -11
54
+ #define DCI_ERR_OUTOFMEMORY -12
55
+ #define DCI_ERR_INVALIDPOSITION -13
56
+ #define DCI_ERR_INVALIDSTRETCH -14
57
+ #define DCI_ERR_INVALIDCLIPLIST -15
58
+ #define DCI_ERR_SURFACEISOBSCURED -16
59
+ #define DCI_ERR_XALIGN -17
60
+ #define DCI_ERR_YALIGN -18
61
+ #define DCI_ERR_XYALIGN -19
62
+ #define DCI_ERR_WIDTHALIGN -20
63
+ #define DCI_ERR_HEIGHTALIGN -21
64
+
65
+ /* success messages -- DCI call succeeded, but specified item changed */
66
+ #define DCI_STATUS_POINTERCHANGED 1
67
+ #define DCI_STATUS_STRIDECHANGED 2
68
+ #define DCI_STATUS_FORMATCHANGED 4
69
+ #define DCI_STATUS_SURFACEINFOCHANGED 8
70
+ #define DCI_STATUS_CHROMAKEYCHANGED 16
71
+ #define DCI_STATUS_WASSTILLDRAWING 32
72
+
73
+ #define DCI_SUCCESS(error) (((DCIRVAL)error) >= 0)
74
+
75
+ /* DCI Capability Flags */
76
+ #define DCI_SURFACE_TYPE 0x0000000F
77
+ #define DCI_PRIMARY 0x00000000
78
+ #define DCI_OFFSCREEN 0x00000001
79
+ #define DCI_OVERLAY 0x00000002
80
+
81
+ #define DCI_VISIBLE 0x00000010
82
+ #define DCI_CHROMAKEY 0x00000020
83
+ #define DCI_1632_ACCESS 0x00000040
84
+ #define DCI_DWORDSIZE 0x00000080
85
+ #define DCI_DWORDALIGN 0x00000100
86
+ #define DCI_WRITEONLY 0x00000200
87
+ #define DCI_ASYNC 0x00000400
88
+
89
+ #define DCI_CAN_STRETCHX 0x00001000
90
+ #define DCI_CAN_STRETCHY 0x00002000
91
+ #define DCI_CAN_STRETCHXY (DCI_CAN_STRETCHX | DCI_CAN_STRETCHY)
92
+
93
+ #define DCI_CAN_STRETCHXN 0x00004000
94
+ #define DCI_CAN_STRETCHYN 0x00008000
95
+ #define DCI_CAN_STRETCHXYN (DCI_CAN_STRETCHXN | DCI_CAN_STRETCHYN)
96
+
97
+
98
+ #define DCI_CANOVERLAY 0x00010000
99
+
100
+ /*
101
+ * Win32 RGNDATA structure. This will be used for cliplist info. passing.
102
+ */
103
+ #if (WINVER < 0x0400)
104
+
105
+ #ifndef RDH_RECTANGLES
106
+
107
+ typedef struct tagRECTL
108
+ {
109
+ LONG left;
110
+ LONG top;
111
+ LONG right;
112
+ LONG bottom;
113
+ } RECTL;
114
+ typedef RECTL* PRECTL;
115
+ typedef RECTL NEAR* NPRECTL;
116
+ typedef RECTL FAR* LPRECTL;
117
+ typedef const RECTL FAR* LPCRECTL;
118
+
119
+ #define RDH_RECTANGLES 0
120
+
121
+ typedef struct tagRGNDATAHEADER {
122
+ DWORD dwSize; /* size of structure */
123
+ DWORD iType; /* Will be RDH_RECTANGLES */
124
+ DWORD nCount; /* # of clipping rectangles */
125
+ DWORD nRgnSize; /* size of buffer -- can be zero */
126
+ RECTL rcBound; /* bounding rectangle for region*/
127
+ } RGNDATAHEADER;
128
+ typedef RGNDATAHEADER* PRGNDATAHEADER;
129
+ typedef RGNDATAHEADER NEAR* NPRGNDATAHEADER;
130
+ typedef RGNDATAHEADER FAR* LPRGNDATAHEADER;
131
+ typedef const RGNDATAHEADER FAR* LPCRGNDATAHEADER;
132
+
133
+ typedef struct tagRGNDATA {
134
+ RGNDATAHEADER rdh;
135
+ char Buffer[1];
136
+ } RGNDATA;
137
+ typedef RGNDATA* PRGNDATA;
138
+ typedef RGNDATA NEAR* NPRGNDATA;
139
+ typedef RGNDATA FAR* LPRGNDATA;
140
+ typedef const RGNDATA FAR* LPCRGNDATA;
141
+
142
+ #endif
143
+ #endif
144
+
145
+ typedef int DCIRVAL; /* return for callbacks */
146
+
147
+ /**************************************************************************
148
+ * input structures
149
+ **************************************************************************/
150
+
151
+ /*
152
+ * Used by a DCI client to provide input parameters for the
153
+ * DCICREATEPRIMARYSURFACE escape.
154
+ */
155
+ typedef struct _DCICMD {
156
+ DWORD dwCommand;
157
+ DWORD dwParam1;
158
+ DWORD dwParam2;
159
+ DWORD dwVersion;
160
+ DWORD dwReserved;
161
+ } DCICMD;
162
+
163
+ /*
164
+ * This structure is used by a DCI client to provide input parameters for
165
+ * the DCICREATE... calls. The fields that are actually relevant differ for
166
+ * each of the three calls. Details are in the DCI Spec chapter providing
167
+ * the function specifications.
168
+ */
169
+ typedef struct _DCICREATEINPUT {
170
+ DCICMD cmd; /* common header structure */
171
+ DWORD dwCompression; /* format of surface to be created */
172
+ DWORD dwMask[3]; /* for nonstandard RGB (e.g. 5-6-5, RGB32) */
173
+ DWORD dwWidth; /* height of the surface to be created */
174
+ DWORD dwHeight; /* width of input surfaces */
175
+ DWORD dwDCICaps; /* capabilities of surface wanted */
176
+ DWORD dwBitCount; /* bit depth of format to be created */
177
+ LPVOID lpSurface; /* pointer to an associated surface */
178
+ } DCICREATEINPUT, FAR *LPDCICREATEINPUT;
179
+
180
+
181
+ /**************************************************************************
182
+ * surface info. structures
183
+ **************************************************************************/
184
+
185
+ /*
186
+ * This structure is used to return information about available support
187
+ * during a DCIEnumSurface call. It is also used to create a primary
188
+ * surface, and as a member of the larger structures returned by the
189
+ * offscreen and overlay calls.
190
+ */
191
+ typedef struct _DCISURFACEINFO {
192
+ DWORD dwSize; /* size of structure */
193
+ DWORD dwDCICaps; /* capability flags (stretch, etc.) */
194
+ DWORD dwCompression; /* format of surface to be created */
195
+ DWORD dwMask[3]; /* for BI_BITMASK surfaces */
196
+
197
+ DWORD dwWidth; /* width of surface */
198
+ DWORD dwHeight; /* height of surface */
199
+ LONG lStride; /* distance in bytes betw. one pixel */
200
+ /* and the pixel directly below it */
201
+ DWORD dwBitCount; /* Bits per pixel for this dwCompression */
202
+ ULONG_PTR dwOffSurface; /* offset of surface pointer */
203
+ WORD wSelSurface; /* selector of surface pointer */
204
+ WORD wReserved;
205
+
206
+ DWORD dwReserved1; /* reserved for provider */
207
+ DWORD dwReserved2; /* reserved for DCIMAN */
208
+ DWORD dwReserved3; /* reserved for future */
209
+ DCIRVAL (CALLBACK *BeginAccess) (LPVOID, LPRECT); /* BeginAccess callback */
210
+ void (CALLBACK *EndAccess) (LPVOID); /* EndAcess callback */
211
+ void (CALLBACK *DestroySurface) (LPVOID); /* Destroy surface callback */
212
+ } DCISURFACEINFO, FAR *LPDCISURFACEINFO;
213
+
214
+
215
+ /*
216
+ * This structure is used by a DCI client to provide input parameters for the
217
+ * DCIEnumSurface call.
218
+ */
219
+
220
+ typedef
221
+ void
222
+ (*ENUM_CALLBACK) (
223
+ LPDCISURFACEINFO lpSurfaceInfo,
224
+ LPVOID lpContext
225
+ );
226
+
227
+ typedef struct _DCIENUMINPUT {
228
+ DCICMD cmd; /* common header structure */
229
+ RECT rSrc; /* source rect. for stretch */
230
+ RECT rDst; /* dest. rect. for stretch */
231
+ void (CALLBACK *EnumCallback)(LPDCISURFACEINFO, LPVOID); /* callback for supported formats */
232
+ LPVOID lpContext;
233
+ } DCIENUMINPUT, FAR *LPDCIENUMINPUT;
234
+
235
+
236
+ /*
237
+ * This structure must be allocated and returned by the DCI provider in
238
+ * response to a DCICREATEPRIMARYSURFACE call.
239
+ */
240
+ typedef DCISURFACEINFO DCIPRIMARY, FAR *LPDCIPRIMARY;
241
+
242
+ /*
243
+ * This structure must be allocated and returned by the DCI provider in
244
+ * response to a DCICREATEOFFSCREENSURFACE call.
245
+ */
246
+ typedef struct _DCIOFFSCREEN {
247
+
248
+ DCISURFACEINFO dciInfo; /* surface info */
249
+ DCIRVAL (CALLBACK *Draw) (LPVOID); /* copy to onscreen buffer */
250
+ DCIRVAL (CALLBACK *SetClipList) (LPVOID, LPRGNDATA); /* SetCliplist callback */
251
+ DCIRVAL (CALLBACK *SetDestination) (LPVOID, LPRECT, LPRECT); /* SetDestination callback */
252
+ } DCIOFFSCREEN, FAR *LPDCIOFFSCREEN;
253
+
254
+
255
+ /*
256
+ * This structure must be allocated and returned by the DCI provider in response
257
+ * to a DCICREATEOVERLAYSURFACE call.
258
+ */
259
+ typedef struct _DCIOVERLAY{
260
+
261
+ DCISURFACEINFO dciInfo; /* surface info */
262
+ DWORD dwChromakeyValue; /* chromakey color value */
263
+ DWORD dwChromakeyMask; /* specifies valid bits of value */
264
+ } DCIOVERLAY, FAR *LPDCIOVERLAY;
265
+
266
+
267
+ /* DCI FOURCC def.s for extended DIB formats */
268
+
269
+ #ifndef YVU9
270
+ #define YVU9 mmioFOURCC('Y','V','U','9')
271
+ #endif
272
+ #ifndef Y411
273
+ #define Y411 mmioFOURCC('Y','4','1','1')
274
+ #endif
275
+ #ifndef YUY2
276
+ #define YUY2 mmioFOURCC('Y','U','Y','2')
277
+ #endif
278
+ #ifndef YVYU
279
+ #define YVYU mmioFOURCC('Y','V','Y','U')
280
+ #endif
281
+ #ifndef UYVY
282
+ #define UYVY mmioFOURCC('U','Y','V','Y')
283
+ #endif
284
+ #ifndef Y211
285
+ #define Y211 mmioFOURCC('Y','2','1','1')
286
+ #endif
287
+
288
+
289
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
290
+ #pragma endregion
291
+
292
+ #ifdef __cplusplus
293
+ }
294
+ #endif
295
+
296
+ #endif // _INC_DCIDDI
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dcomptypes.h ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ //---------------------------------------------------------------------------
3
+ // Copyright (c) Microsoft Corporation. All rights reserved.
4
+ //---------------------------------------------------------------------------
5
+ #pragma once
6
+
7
+ #include <dxgitype.h> // for DXGI_RATIONAL
8
+ #include <dxgi1_5.h> // for DXGI_ALPHA_MODE, DXGI_HDR_METADATA_TYPE
9
+ #include <winapifamily.h>
10
+
11
+
12
+ #pragma region Desktop Family
13
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
14
+
15
+ #if (NTDDI_VERSION >= NTDDI_WIN8)
16
+
17
+
18
+ //
19
+ // DirectComposition types
20
+ //
21
+
22
+ enum DCOMPOSITION_BITMAP_INTERPOLATION_MODE
23
+ {
24
+ DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR = 0,
25
+ DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR = 1,
26
+
27
+ DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT = 0xffffffff
28
+ };
29
+
30
+ enum DCOMPOSITION_BORDER_MODE
31
+ {
32
+ DCOMPOSITION_BORDER_MODE_SOFT = 0,
33
+ DCOMPOSITION_BORDER_MODE_HARD = 1,
34
+
35
+ DCOMPOSITION_BORDER_MODE_INHERIT = 0xffffffff
36
+ };
37
+
38
+ enum DCOMPOSITION_COMPOSITE_MODE
39
+ {
40
+ DCOMPOSITION_COMPOSITE_MODE_SOURCE_OVER = 0,
41
+ DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT = 1,
42
+ #if (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE)
43
+ DCOMPOSITION_COMPOSITE_MODE_MIN_BLEND = 2,
44
+ #endif // (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE)
45
+
46
+ DCOMPOSITION_COMPOSITE_MODE_INHERIT = 0xffffffff
47
+ };
48
+
49
+ #if (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE)
50
+ enum DCOMPOSITION_BACKFACE_VISIBILITY
51
+ {
52
+ DCOMPOSITION_BACKFACE_VISIBILITY_VISIBLE = 0,
53
+ DCOMPOSITION_BACKFACE_VISIBILITY_HIDDEN = 1,
54
+
55
+ DCOMPOSITION_BACKFACE_VISIBILITY_INHERIT = 0xffffffff
56
+ };
57
+
58
+ enum DCOMPOSITION_OPACITY_MODE
59
+ {
60
+ DCOMPOSITION_OPACITY_MODE_LAYER = 0,
61
+ DCOMPOSITION_OPACITY_MODE_MULTIPLY = 1,
62
+
63
+ DCOMPOSITION_OPACITY_MODE_INHERIT = 0xffffffff
64
+ };
65
+ #endif // (_WIN32_WINNT >= _WIN32_WINNT_WINBLUE)
66
+
67
+ #if (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
68
+ enum DCOMPOSITION_DEPTH_MODE
69
+ {
70
+ DCOMPOSITION_DEPTH_MODE_TREE = 0,
71
+ DCOMPOSITION_DEPTH_MODE_SPATIAL = 1,
72
+ DCOMPOSITION_DEPTH_MODE_SORTED = 3,
73
+
74
+ DCOMPOSITION_DEPTH_MODE_INHERIT = 0xffffffff
75
+ };
76
+ #endif // (_WIN32_WINNT >= _WIN32_WINNT_WINTHRESHOLD)
77
+
78
+ typedef struct
79
+ {
80
+ LARGE_INTEGER lastFrameTime;
81
+ DXGI_RATIONAL currentCompositionRate;
82
+ LARGE_INTEGER currentTime;
83
+ LARGE_INTEGER timeFrequency;
84
+ LARGE_INTEGER nextEstimatedFrameTime;
85
+ } DCOMPOSITION_FRAME_STATISTICS;
86
+
87
+ //
88
+ // Composition object specific access flags
89
+ //
90
+
91
+ #define COMPOSITIONOBJECT_READ 0x0001L
92
+ #define COMPOSITIONOBJECT_WRITE 0x0002L
93
+
94
+ #define COMPOSITIONOBJECT_ALL_ACCESS (COMPOSITIONOBJECT_READ | COMPOSITIONOBJECT_WRITE)
95
+
96
+ //
97
+ // Composition Stats
98
+ //
99
+
100
+ typedef enum COMPOSITION_FRAME_ID_TYPE
101
+ {
102
+ COMPOSITION_FRAME_ID_CREATED = 0,
103
+ COMPOSITION_FRAME_ID_CONFIRMED = 1,
104
+ COMPOSITION_FRAME_ID_COMPLETED = 2
105
+ } COMPOSITION_FRAME_ID_TYPE;
106
+
107
+ typedef ULONG64 COMPOSITION_FRAME_ID;
108
+
109
+ typedef struct tagCOMPOSITION_FRAME_STATS
110
+ {
111
+ UINT64 startTime;
112
+ UINT64 targetTime;
113
+ UINT64 framePeriod;
114
+ } COMPOSITION_FRAME_STATS;
115
+
116
+ typedef struct tagCOMPOSITION_TARGET_ID
117
+ {
118
+ #if defined(__cplusplus) && !defined(SORTPP_PASS)
119
+ bool operator ==(const tagCOMPOSITION_TARGET_ID& rhs) const
120
+ {
121
+ return ((displayAdapterLuid.LowPart == rhs.displayAdapterLuid.LowPart) &&
122
+ (displayAdapterLuid.HighPart == rhs.displayAdapterLuid.HighPart) &&
123
+ (renderAdapterLuid.LowPart == rhs.renderAdapterLuid.LowPart) &&
124
+ (renderAdapterLuid.HighPart == rhs.renderAdapterLuid.HighPart) &&
125
+ (vidPnSourceId == rhs.vidPnSourceId) &&
126
+ (vidPnTargetId == rhs.vidPnTargetId) &&
127
+ ((uniqueId == rhs.uniqueId) || (uniqueId == 0) || (rhs.uniqueId == 0)));
128
+ }
129
+
130
+ bool operator !=(const tagCOMPOSITION_TARGET_ID& rhs) const
131
+ {
132
+ return !(*this == rhs);
133
+ }
134
+ #endif
135
+
136
+ LUID displayAdapterLuid;
137
+ LUID renderAdapterLuid;
138
+ UINT vidPnSourceId;
139
+ UINT vidPnTargetId;
140
+ UINT uniqueId;
141
+ } COMPOSITION_TARGET_ID;
142
+
143
+ typedef struct tagCOMPOSITION_STATS
144
+ {
145
+ UINT presentCount;
146
+ UINT refreshCount;
147
+ UINT virtualRefreshCount;
148
+ UINT64 time;
149
+ } COMPOSITION_STATS;
150
+
151
+ typedef struct tagCOMPOSITION_TARGET_STATS
152
+ {
153
+ UINT outstandingPresents;
154
+ UINT64 presentTime;
155
+ UINT64 vblankDuration;
156
+
157
+ COMPOSITION_STATS presentedStats;
158
+ COMPOSITION_STATS completedStats;
159
+ } COMPOSITION_TARGET_STATS;
160
+
161
+ // The maximum nubmer of objects we allow users to wait on the compositor clock
162
+ #define DCOMPOSITION_MAX_WAITFORCOMPOSITORCLOCK_OBJECTS 32
163
+
164
+ // Maximum number of targets kept per frame
165
+ #define COMPOSITION_STATS_MAX_TARGETS 256
166
+
167
+ #endif // NTDDI_WIN8
168
+
169
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
170
+ #pragma endregion
171
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/devguid.h ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++ BUILD Version: 0001 // Increment this if a change has global effects
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ devguid.h
8
+
9
+ Abstract:
10
+
11
+ Defines GUIDs for device classes used in Plug & Play.
12
+
13
+ --*/
14
+ #include <winapifamily.h>
15
+
16
+ #pragma region Desktop Family
17
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
18
+
19
+
20
+ DEFINE_GUID( GUID_DEVCLASS_1394, 0x6bdd1fc1L, 0x810f, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f );
21
+ DEFINE_GUID( GUID_DEVCLASS_1394DEBUG, 0x66f250d6L, 0x7801, 0x4a64, 0xb1, 0x39, 0xee, 0xa8, 0x0a, 0x45, 0x0b, 0x24 );
22
+ DEFINE_GUID( GUID_DEVCLASS_61883, 0x7ebefbc0L, 0x3200, 0x11d2, 0xb4, 0xc2, 0x00, 0xa0, 0xc9, 0x69, 0x7d, 0x07 );
23
+ DEFINE_GUID( GUID_DEVCLASS_ADAPTER, 0x4d36e964L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
24
+ DEFINE_GUID( GUID_DEVCLASS_APMSUPPORT, 0xd45b1c18L, 0xc8fa, 0x11d1, 0x9f, 0x77, 0x00, 0x00, 0xf8, 0x05, 0xf5, 0x30 );
25
+ DEFINE_GUID( GUID_DEVCLASS_AUDIOPROCESSINGOBJECT, 0x5989fce8L, 0x9cd0, 0x467d, 0x8a, 0x6a, 0x54, 0x19, 0xe3, 0x15, 0x29, 0xd4 );
26
+ DEFINE_GUID( GUID_DEVCLASS_AVC, 0xc06ff265L, 0xae09, 0x48f0, 0x81, 0x2c, 0x16, 0x75, 0x3d, 0x7c, 0xba, 0x83 );
27
+ DEFINE_GUID( GUID_DEVCLASS_BATTERY, 0x72631e54L, 0x78a4, 0x11d0, 0xbc, 0xf7, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a );
28
+ DEFINE_GUID( GUID_DEVCLASS_BIOMETRIC, 0x53d29ef7L, 0x377c, 0x4d14, 0x86, 0x4b, 0xeb, 0x3a, 0x85, 0x76, 0x93, 0x59 );
29
+ DEFINE_GUID( GUID_DEVCLASS_BLUETOOTH, 0xe0cbf06cL, 0xcd8b, 0x4647, 0xbb, 0x8a, 0x26, 0x3b, 0x43, 0xf0, 0xf9, 0x74 );
30
+ DEFINE_GUID( GUID_DEVCLASS_CAMERA, 0xca3e7ab9L, 0xb4c3, 0x4ae6, 0x82, 0x51, 0x57, 0x9e, 0xf9, 0x33, 0x89, 0x0f );
31
+ DEFINE_GUID( GUID_DEVCLASS_CDROM, 0x4d36e965L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
32
+ DEFINE_GUID( GUID_DEVCLASS_COMPUTEACCELERATOR, 0xf01a9d53L, 0x3ff6, 0x48d2, 0x9f, 0x97, 0xc8, 0xa7, 0x00, 0x4b, 0xe1, 0x0c );
33
+ DEFINE_GUID( GUID_DEVCLASS_COMPUTER, 0x4d36e966L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
34
+ DEFINE_GUID( GUID_DEVCLASS_DECODER, 0x6bdd1fc2L, 0x810f, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f );
35
+ DEFINE_GUID( GUID_DEVCLASS_DISKDRIVE, 0x4d36e967L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
36
+ DEFINE_GUID( GUID_DEVCLASS_DISPLAY, 0x4d36e968L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
37
+ DEFINE_GUID( GUID_DEVCLASS_DOT4, 0x48721b56L, 0x6795, 0x11d2, 0xb1, 0xa8, 0x00, 0x80, 0xc7, 0x2e, 0x74, 0xa2 );
38
+ DEFINE_GUID( GUID_DEVCLASS_DOT4PRINT, 0x49ce6ac8L, 0x6f86, 0x11d2, 0xb1, 0xe5, 0x00, 0x80, 0xc7, 0x2e, 0x74, 0xa2 );
39
+ DEFINE_GUID( GUID_DEVCLASS_EHSTORAGESILO, 0x9da2b80fL, 0xf89f, 0x4a49, 0xa5, 0xc2, 0x51, 0x1b, 0x08, 0x5b, 0x9e, 0x8a );
40
+ DEFINE_GUID( GUID_DEVCLASS_ENUM1394, 0xc459df55L, 0xdb08, 0x11d1, 0xb0, 0x09, 0x00, 0xa0, 0xc9, 0x08, 0x1f, 0xf6 );
41
+ DEFINE_GUID( GUID_DEVCLASS_EXTENSION, 0xe2f84ce7L, 0x8efa, 0x411c, 0xaa, 0x69, 0x97, 0x45, 0x4c, 0xa4, 0xcb, 0x57 );
42
+ DEFINE_GUID( GUID_DEVCLASS_FDC, 0x4d36e969L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
43
+ DEFINE_GUID( GUID_DEVCLASS_FIRMWARE, 0xf2e7dd72L, 0x6468, 0x4e36, 0xb6, 0xf1, 0x64, 0x88, 0xf4, 0x2c, 0x1b, 0x52 );
44
+ DEFINE_GUID( GUID_DEVCLASS_FLOPPYDISK, 0x4d36e980L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
45
+ DEFINE_GUID( GUID_DEVCLASS_GENERIC, 0xff494df1L, 0xc4ed, 0x4fac, 0x9b, 0x3f, 0x37, 0x86, 0xf6, 0xe9, 0x1e, 0x7e );
46
+ DEFINE_GUID( GUID_DEVCLASS_GPS, 0x6bdd1fc3L, 0x810f, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f );
47
+ DEFINE_GUID( GUID_DEVCLASS_HDC, 0x4d36e96aL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
48
+ DEFINE_GUID( GUID_DEVCLASS_HIDCLASS, 0x745a17a0L, 0x74d3, 0x11d0, 0xb6, 0xfe, 0x00, 0xa0, 0xc9, 0x0f, 0x57, 0xda );
49
+ DEFINE_GUID( GUID_DEVCLASS_HOLOGRAPHIC, 0xd612553dL, 0x06b1, 0x49ca, 0x89, 0x38, 0xe3, 0x9e, 0xf8, 0x0e, 0xb1, 0x6f );
50
+ DEFINE_GUID( GUID_DEVCLASS_I3C, 0x13cfe1b1L, 0x6b17, 0x424c, 0xac, 0x3f, 0x16, 0xac, 0xe8, 0x73, 0x38, 0x98 );
51
+ DEFINE_GUID( GUID_DEVCLASS_IMAGE, 0x6bdd1fc6L, 0x810f, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f );
52
+ DEFINE_GUID( GUID_DEVCLASS_INFINIBAND, 0x30ef7132L, 0xd858, 0x4a0c, 0xac, 0x24, 0xb9, 0x02, 0x8a, 0x5c, 0xca, 0x3f );
53
+ DEFINE_GUID( GUID_DEVCLASS_INFRARED, 0x6bdd1fc5L, 0x810f, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f );
54
+ DEFINE_GUID( GUID_DEVCLASS_KEYBOARD, 0x4d36e96bL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
55
+ DEFINE_GUID( GUID_DEVCLASS_LEGACYDRIVER, 0x8ecc055dL, 0x047f, 0x11d1, 0xa5, 0x37, 0x00, 0x00, 0xf8, 0x75, 0x3e, 0xd1 );
56
+ DEFINE_GUID( GUID_DEVCLASS_MEDIA, 0x4d36e96cL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
57
+ DEFINE_GUID( GUID_DEVCLASS_MEDIUM_CHANGER, 0xce5939aeL, 0xebde, 0x11d0, 0xb1, 0x81, 0x00, 0x00, 0xf8, 0x75, 0x3e, 0xc4 );
58
+ DEFINE_GUID( GUID_DEVCLASS_MEMORY, 0x5099944aL, 0xf6b9, 0x4057, 0xa0, 0x56, 0x8c, 0x55, 0x02, 0x28, 0x54, 0x4c );
59
+ DEFINE_GUID( GUID_DEVCLASS_MODEM, 0x4d36e96dL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
60
+ DEFINE_GUID( GUID_DEVCLASS_MONITOR, 0x4d36e96eL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
61
+ DEFINE_GUID( GUID_DEVCLASS_MOUSE, 0x4d36e96fL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
62
+ DEFINE_GUID( GUID_DEVCLASS_MTD, 0x4d36e970L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
63
+ DEFINE_GUID( GUID_DEVCLASS_MULTIFUNCTION, 0x4d36e971L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
64
+ DEFINE_GUID( GUID_DEVCLASS_MULTIPORTSERIAL, 0x50906cb8L, 0xba12, 0x11d1, 0xbf, 0x5d, 0x00, 0x00, 0xf8, 0x05, 0xf5, 0x30 );
65
+ DEFINE_GUID( GUID_DEVCLASS_NET, 0x4d36e972L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
66
+ DEFINE_GUID( GUID_DEVCLASS_NETCLIENT, 0x4d36e973L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
67
+ DEFINE_GUID( GUID_DEVCLASS_NETDRIVER, 0x87ef9ad1L, 0x8f70, 0x49ee, 0xb2, 0x15, 0xab, 0x1f, 0xca, 0xdc, 0xbe, 0x3c );
68
+ DEFINE_GUID( GUID_DEVCLASS_NETSERVICE, 0x4d36e974L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
69
+ DEFINE_GUID( GUID_DEVCLASS_NETTRANS, 0x4d36e975L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
70
+ DEFINE_GUID( GUID_DEVCLASS_NETUIO, 0x78912bc1L, 0xcb8e, 0x4b28, 0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f );
71
+ DEFINE_GUID( GUID_DEVCLASS_NODRIVER, 0x4d36e976L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
72
+ DEFINE_GUID( GUID_DEVCLASS_PCMCIA, 0x4d36e977L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
73
+ DEFINE_GUID( GUID_DEVCLASS_PNPPRINTERS, 0x4658ee7eL, 0xf050, 0x11d1, 0xb6, 0xbd, 0x00, 0xc0, 0x4f, 0xa3, 0x72, 0xa7 );
74
+ DEFINE_GUID( GUID_DEVCLASS_PORTS, 0x4d36e978L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
75
+ DEFINE_GUID( GUID_DEVCLASS_PRIMITIVE, 0x242681d1L, 0xeed3, 0x41d2, 0xa1, 0xef, 0x14, 0x68, 0xfc, 0x84, 0x31, 0x06 );
76
+ DEFINE_GUID( GUID_DEVCLASS_PRINTER, 0x4d36e979L, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
77
+ DEFINE_GUID( GUID_DEVCLASS_PRINTERUPGRADE, 0x4d36e97aL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
78
+ DEFINE_GUID( GUID_DEVCLASS_PRINTQUEUE, 0x1ed2bbf9L, 0x11f0, 0x4084, 0xb2, 0x1f, 0xad, 0x83, 0xa8, 0xe6, 0xdc, 0xdc );
79
+ DEFINE_GUID( GUID_DEVCLASS_PROCESSOR, 0x50127dc3L, 0x0f36, 0x415e, 0xa6, 0xcc, 0x4c, 0xb3, 0xbe, 0x91, 0x0B, 0x65 );
80
+ DEFINE_GUID( GUID_DEVCLASS_SBP2, 0xd48179beL, 0xec20, 0x11d1, 0xb6, 0xb8, 0x00, 0xc0, 0x4f, 0xa3, 0x72, 0xa7 );
81
+ DEFINE_GUID( GUID_DEVCLASS_SCMDISK, 0x53966cb1L, 0x4d46, 0x4166, 0xbf, 0x23, 0xc5, 0x22, 0x40, 0x3c, 0xd4, 0x95 );
82
+ DEFINE_GUID( GUID_DEVCLASS_SCMVOLUME, 0x53ccb149L, 0xe543, 0x4c84, 0xb6, 0xe0, 0xbc, 0xe4, 0xf6, 0xb7, 0xe8, 0x06 );
83
+ DEFINE_GUID( GUID_DEVCLASS_SCSIADAPTER, 0x4d36e97bL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
84
+ DEFINE_GUID( GUID_DEVCLASS_SECURITYACCELERATOR, 0x268c95a1L, 0xedfe, 0x11d3, 0x95, 0xc3, 0x00, 0x10, 0xdc, 0x40, 0x50, 0xa5 );
85
+ DEFINE_GUID( GUID_DEVCLASS_SENSOR, 0x5175d334L, 0xc371, 0x4806, 0xb3, 0xba, 0x71, 0xfd, 0x53, 0xc9, 0x25, 0x8d );
86
+ DEFINE_GUID( GUID_DEVCLASS_SIDESHOW, 0x997b5d8dL, 0xc442, 0x4f2e, 0xba, 0xf3, 0x9c, 0x8e, 0x67, 0x1e, 0x9e, 0x21 );
87
+ DEFINE_GUID( GUID_DEVCLASS_SMARTCARDREADER, 0x50dd5230L, 0xba8a, 0x11d1, 0xbf, 0x5d, 0x00, 0x00, 0xf8, 0x05, 0xf5, 0x30 );
88
+ DEFINE_GUID( GUID_DEVCLASS_SMRDISK, 0x53487c23L, 0x680f, 0x4585, 0xac, 0xc3, 0x1f, 0x10, 0xd6, 0x77, 0x7e, 0x82 );
89
+ DEFINE_GUID( GUID_DEVCLASS_SMRVOLUME, 0x53b3cf03L, 0x8f5a, 0x4788, 0x91, 0xb6, 0xd1, 0x9e, 0xd9, 0xfc, 0xcc, 0xbf );
90
+ DEFINE_GUID( GUID_DEVCLASS_SOFTWARECOMPONENT, 0x5c4c3332L, 0x344d, 0x483c, 0x87, 0x39, 0x25, 0x9e, 0x93, 0x4c, 0x9c, 0xc8 );
91
+ DEFINE_GUID( GUID_DEVCLASS_SOUND, 0x4d36e97cL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
92
+ DEFINE_GUID( GUID_DEVCLASS_SYSTEM, 0x4d36e97dL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
93
+ DEFINE_GUID( GUID_DEVCLASS_TAPEDRIVE, 0x6d807884L, 0x7d21, 0x11cf, 0x80, 0x1c, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
94
+ DEFINE_GUID( GUID_DEVCLASS_THERMAL, 0xca301ce1L, 0x74fc, 0x45ea, 0xa5, 0x57, 0x46, 0x1e, 0xf4, 0x8b, 0x9e, 0x37 );
95
+ DEFINE_GUID( GUID_DEVCLASS_UNKNOWN, 0x4d36e97eL, 0xe325, 0x11ce, 0xbf, 0xc1, 0x08, 0x00, 0x2b, 0xe1, 0x03, 0x18 );
96
+ DEFINE_GUID( GUID_DEVCLASS_UCM, 0xe6f1aa1cL, 0x7f3b, 0x4473, 0xb2, 0xe8, 0xc9, 0x7d, 0x8a, 0xc7, 0x1d, 0x53 );
97
+ DEFINE_GUID( GUID_DEVCLASS_USB, 0x36fc9e60L, 0xc465, 0x11cf, 0x80, 0x56, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00 );
98
+ DEFINE_GUID( GUID_DEVCLASS_VOLUME, 0x71a27cddL, 0x812a, 0x11d0, 0xbe, 0xc7, 0x08, 0x00, 0x2b, 0xe2, 0x09, 0x2f );
99
+ DEFINE_GUID( GUID_DEVCLASS_VOLUMESNAPSHOT, 0x533c5b84L, 0xec70, 0x11d2, 0x95, 0x05, 0x00, 0xc0, 0x4f, 0x79, 0xde, 0xaf );
100
+ DEFINE_GUID( GUID_DEVCLASS_WCEUSBS, 0x25dbce51L, 0x6c8f, 0x4a72, 0x8a, 0x6d, 0xb5, 0x4c, 0x2b, 0x4f, 0xc8, 0x35 );
101
+ DEFINE_GUID( GUID_DEVCLASS_WPD, 0xeec5ad98L, 0x8080, 0x425f, 0x92, 0x2a, 0xda, 0xbf, 0x3d, 0xe3, 0xf6, 0x9a );
102
+
103
+ //
104
+ // Define filesystem filter classes used for classification and load ordering.
105
+ // Classes are listed below in order from "highest" (i.e., farthest from the
106
+ // filesystem) to "lowest" (i.e., closest to the filesystem).
107
+ //
108
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_TOP, 0xb369baf4L, 0x5568, 0x4e82, 0xa8, 0x7e, 0xa9, 0x3e, 0xb1, 0x6b, 0xca, 0x87 );
109
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_ACTIVITYMONITOR, 0xb86dff51L, 0xa31e, 0x4bac, 0xb3, 0xcf, 0xe8, 0xcf, 0xe7, 0x5c, 0x9f, 0xc2 );
110
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_UNDELETE, 0xfe8f1572L, 0xc67a, 0x48c0, 0xbb, 0xac, 0x0b, 0x5c, 0x6d, 0x66, 0xca, 0xfb );
111
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_ANTIVIRUS, 0xb1d1a169L, 0xc54f, 0x4379, 0x81, 0xdb, 0xbe, 0xe7, 0xd8, 0x8d, 0x74, 0x54 );
112
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_REPLICATION, 0x48d3ebc4L, 0x4cf8, 0x48ff, 0xb8, 0x69, 0x9c, 0x68, 0xad, 0x42, 0xeb, 0x9f );
113
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_CONTINUOUSBACKUP, 0x71aa14f8L, 0x6fad, 0x4622, 0xad, 0x77, 0x92, 0xbb, 0x9d, 0x7e, 0x69, 0x47 );
114
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_CONTENTSCREENER, 0x3e3f0674L, 0xc83c, 0x4558, 0xbb, 0x26, 0x98, 0x20, 0xe1, 0xeb, 0xa5, 0xc5 );
115
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_QUOTAMANAGEMENT, 0x8503c911L, 0xa6c7, 0x4919, 0x8f, 0x79, 0x50, 0x28, 0xf5, 0x86, 0x6b, 0x0c );
116
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_SYSTEMRECOVERY, 0x2db15374L, 0x706e, 0x4131, 0xa0, 0xc7, 0xd7, 0xc7, 0x8e, 0xb0, 0x28, 0x9a );
117
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_CFSMETADATASERVER, 0xcdcf0939L, 0xb75b, 0x4630, 0xbf, 0x76, 0x80, 0xf7, 0xba, 0x65, 0x58, 0x84 );
118
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_HSM, 0xd546500aL, 0x2aeb, 0x45f6, 0x94, 0x82, 0xf4, 0xb1, 0x79, 0x9c, 0x31, 0x77 );
119
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_COMPRESSION, 0xf3586bafL, 0xb5aa, 0x49b5, 0x8d, 0x6c, 0x05, 0x69, 0x28, 0x4c, 0x63, 0x9f );
120
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_ENCRYPTION, 0xa0a701c0L, 0xa511, 0x42ff, 0xaa, 0x6c, 0x06, 0xdc, 0x03, 0x95, 0x57, 0x6f );
121
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_VIRTUALIZATION, 0xf75a86c0L, 0x10d8, 0x4c3a, 0xb2, 0x33, 0xed, 0x60, 0xe4, 0xcd, 0xfa, 0xac );
122
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_PHYSICALQUOTAMANAGEMENT, 0x6a0a8e78L, 0xbba6, 0x4fc4, 0xa7, 0x09, 0x1e, 0x33, 0xcd, 0x09, 0xd6, 0x7e );
123
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_OPENFILEBACKUP, 0xf8ecafa6L, 0x66d1, 0x41a5, 0x89, 0x9b, 0x66, 0x58, 0x5d, 0x72, 0x16, 0xb7 );
124
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_SECURITYENHANCER, 0xd02bc3daL, 0x0c8e, 0x4945, 0x9b, 0xd5, 0xf1, 0x88, 0x3c, 0x22, 0x6c, 0x8c );
125
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_COPYPROTECTION, 0x89786ff1L, 0x9c12, 0x402f, 0x9c, 0x9e, 0x17, 0x75, 0x3c, 0x7f, 0x43, 0x75 );
126
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_BOTTOM, 0x37765ea0L, 0x5958, 0x4fc9, 0xb0, 0x4b, 0x2f, 0xdf, 0xef, 0x97, 0xe5, 0x9e );
127
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_SYSTEM, 0x5d1b9aaaL, 0x01e2, 0x46af, 0x84, 0x9f, 0x27, 0x2b, 0x3f, 0x32, 0x4c, 0x46 );
128
+ DEFINE_GUID( GUID_DEVCLASS_FSFILTER_INFRASTRUCTURE, 0xe55fa6f9L, 0x128c, 0x4d04, 0xab, 0xab, 0x63, 0x0c, 0x74, 0xb1, 0x45, 0x3a );
129
+
130
+
131
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
132
+ #pragma endregion
133
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/devioctl.h ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++ BUILD Version: 0004 // Increment this if a change has global effects
2
+
3
+ Copyright (c) 1992-1999 Microsoft Corporation
4
+
5
+ Module Name:
6
+
7
+ devioctl.h
8
+
9
+ Abstract:
10
+
11
+ This module contains
12
+
13
+
14
+ Revision History:
15
+
16
+
17
+ --*/
18
+
19
+ // begin_winioctl
20
+
21
+ #ifndef _DEVIOCTL_
22
+ #define _DEVIOCTL_
23
+
24
+ // begin_ntddk begin_wdm begin_nthal begin_ntifs
25
+ //
26
+ // Define the various device type values. Note that values used by Microsoft
27
+ // Corporation are in the range 0-32767, and 32768-65535 are reserved for use
28
+ // by customers.
29
+ //
30
+
31
+ #define DEVICE_TYPE ULONG
32
+
33
+ #define FILE_DEVICE_BEEP 0x00000001
34
+ #define FILE_DEVICE_CD_ROM 0x00000002
35
+ #define FILE_DEVICE_CD_ROM_FILE_SYSTEM 0x00000003
36
+ #define FILE_DEVICE_CONTROLLER 0x00000004
37
+ #define FILE_DEVICE_DATALINK 0x00000005
38
+ #define FILE_DEVICE_DFS 0x00000006
39
+ #define FILE_DEVICE_DISK 0x00000007
40
+ #define FILE_DEVICE_DISK_FILE_SYSTEM 0x00000008
41
+ #define FILE_DEVICE_FILE_SYSTEM 0x00000009
42
+ #define FILE_DEVICE_INPORT_PORT 0x0000000a
43
+ #define FILE_DEVICE_KEYBOARD 0x0000000b
44
+ #define FILE_DEVICE_MAILSLOT 0x0000000c
45
+ #define FILE_DEVICE_MIDI_IN 0x0000000d
46
+ #define FILE_DEVICE_MIDI_OUT 0x0000000e
47
+ #define FILE_DEVICE_MOUSE 0x0000000f
48
+ #define FILE_DEVICE_MULTI_UNC_PROVIDER 0x00000010
49
+ #define FILE_DEVICE_NAMED_PIPE 0x00000011
50
+ #define FILE_DEVICE_NETWORK 0x00000012
51
+ #define FILE_DEVICE_NETWORK_BROWSER 0x00000013
52
+ #define FILE_DEVICE_NETWORK_FILE_SYSTEM 0x00000014
53
+ #define FILE_DEVICE_NULL 0x00000015
54
+ #define FILE_DEVICE_PARALLEL_PORT 0x00000016
55
+ #define FILE_DEVICE_PHYSICAL_NETCARD 0x00000017
56
+ #define FILE_DEVICE_PRINTER 0x00000018
57
+ #define FILE_DEVICE_SCANNER 0x00000019
58
+ #define FILE_DEVICE_SERIAL_MOUSE_PORT 0x0000001a
59
+ #define FILE_DEVICE_SERIAL_PORT 0x0000001b
60
+ #define FILE_DEVICE_SCREEN 0x0000001c
61
+ #define FILE_DEVICE_SOUND 0x0000001d
62
+ #define FILE_DEVICE_STREAMS 0x0000001e
63
+ #define FILE_DEVICE_TAPE 0x0000001f
64
+ #define FILE_DEVICE_TAPE_FILE_SYSTEM 0x00000020
65
+ #define FILE_DEVICE_TRANSPORT 0x00000021
66
+ #define FILE_DEVICE_UNKNOWN 0x00000022
67
+ #define FILE_DEVICE_VIDEO 0x00000023
68
+ #define FILE_DEVICE_VIRTUAL_DISK 0x00000024
69
+ #define FILE_DEVICE_WAVE_IN 0x00000025
70
+ #define FILE_DEVICE_WAVE_OUT 0x00000026
71
+ #define FILE_DEVICE_8042_PORT 0x00000027
72
+ #define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
73
+ #define FILE_DEVICE_BATTERY 0x00000029
74
+ #define FILE_DEVICE_BUS_EXTENDER 0x0000002a
75
+ #define FILE_DEVICE_MODEM 0x0000002b
76
+ #define FILE_DEVICE_VDM 0x0000002c
77
+ #define FILE_DEVICE_MASS_STORAGE 0x0000002d
78
+ #define FILE_DEVICE_SMB 0x0000002e
79
+ #define FILE_DEVICE_KS 0x0000002f
80
+ #define FILE_DEVICE_CHANGER 0x00000030
81
+ #define FILE_DEVICE_SMARTCARD 0x00000031
82
+ #define FILE_DEVICE_ACPI 0x00000032
83
+ #define FILE_DEVICE_DVD 0x00000033
84
+ #define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034
85
+ #define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035
86
+ #define FILE_DEVICE_DFS_VOLUME 0x00000036
87
+ #define FILE_DEVICE_SERENUM 0x00000037
88
+ #define FILE_DEVICE_TERMSRV 0x00000038
89
+ #define FILE_DEVICE_KSEC 0x00000039
90
+ #define FILE_DEVICE_FIPS 0x0000003A
91
+ #define FILE_DEVICE_INFINIBAND 0x0000003B
92
+ #define FILE_DEVICE_VMBUS 0x0000003E
93
+ #define FILE_DEVICE_CRYPT_PROVIDER 0x0000003F
94
+ #define FILE_DEVICE_WPD 0x00000040
95
+ #define FILE_DEVICE_BLUETOOTH 0x00000041
96
+ #define FILE_DEVICE_MT_COMPOSITE 0x00000042
97
+ #define FILE_DEVICE_MT_TRANSPORT 0x00000043
98
+ #define FILE_DEVICE_BIOMETRIC 0x00000044
99
+ #define FILE_DEVICE_PMI 0x00000045
100
+ #define FILE_DEVICE_EHSTOR 0x00000046
101
+ #define FILE_DEVICE_DEVAPI 0x00000047
102
+ #define FILE_DEVICE_GPIO 0x00000048
103
+ #define FILE_DEVICE_USBEX 0x00000049
104
+ #define FILE_DEVICE_CONSOLE 0x00000050
105
+ #define FILE_DEVICE_NFP 0x00000051
106
+ #define FILE_DEVICE_SYSENV 0x00000052
107
+ #define FILE_DEVICE_VIRTUAL_BLOCK 0x00000053
108
+ #define FILE_DEVICE_POINT_OF_SERVICE 0x00000054
109
+ #define FILE_DEVICE_STORAGE_REPLICATION 0x00000055
110
+ #define FILE_DEVICE_TRUST_ENV 0x00000056
111
+ #define FILE_DEVICE_UCM 0x00000057
112
+ #define FILE_DEVICE_UCMTCPCI 0x00000058
113
+ #define FILE_DEVICE_PERSISTENT_MEMORY 0x00000059
114
+ #define FILE_DEVICE_NVDIMM 0x0000005a
115
+ #define FILE_DEVICE_HOLOGRAPHIC 0x0000005b
116
+ #define FILE_DEVICE_SDFXHCI 0x0000005c
117
+ #define FILE_DEVICE_UCMUCSI 0x0000005d
118
+ #define FILE_DEVICE_PRM 0x0000005e
119
+ #define FILE_DEVICE_EVENT_COLLECTOR 0x0000005f
120
+ #define FILE_DEVICE_USB4 0x00000060
121
+ #define FILE_DEVICE_SOUNDWIRE 0x00000061
122
+ #define FILE_DEVICE_FABRIC_NVME 0x00000062
123
+ #define FILE_DEVICE_SVM 0x00000063
124
+ #define FILE_DEVICE_HARDWARE_ACCELERATOR 0x00000064
125
+ #define FILE_DEVICE_I3C 0x00000065
126
+
127
+ //
128
+ // Macro definition for defining IOCTL and FSCTL function control codes. Note
129
+ // that function codes 0-2047 are reserved for Microsoft Corporation, and
130
+ // 2048-4095 are reserved for customers.
131
+ //
132
+
133
+ #define CTL_CODE( DeviceType, Function, Method, Access ) ( \
134
+ ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
135
+ )
136
+
137
+ //
138
+ // Macro to extract device type out of the device io control code
139
+ //
140
+ #define DEVICE_TYPE_FROM_CTL_CODE(ctrlCode) (((ULONG)(ctrlCode & 0xffff0000)) >> 16)
141
+
142
+ //
143
+ // Macro to extract buffering method out of the device io control code
144
+ //
145
+ #define METHOD_FROM_CTL_CODE(ctrlCode) ((ULONG)(ctrlCode & 3))
146
+
147
+ //
148
+ // Define the method codes for how buffers are passed for I/O and FS controls
149
+ //
150
+
151
+ #define METHOD_BUFFERED 0
152
+ #define METHOD_IN_DIRECT 1
153
+ #define METHOD_OUT_DIRECT 2
154
+ #define METHOD_NEITHER 3
155
+
156
+ //
157
+ // Define some easier to comprehend aliases:
158
+ // METHOD_DIRECT_TO_HARDWARE (writes, aka METHOD_IN_DIRECT)
159
+ // METHOD_DIRECT_FROM_HARDWARE (reads, aka METHOD_OUT_DIRECT)
160
+ //
161
+
162
+ #define METHOD_DIRECT_TO_HARDWARE METHOD_IN_DIRECT
163
+ #define METHOD_DIRECT_FROM_HARDWARE METHOD_OUT_DIRECT
164
+
165
+ //
166
+ // Define the access check value for any access
167
+ //
168
+ //
169
+ // The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
170
+ // ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
171
+ // constants *MUST* always be in sync.
172
+ //
173
+ //
174
+ // FILE_SPECIAL_ACCESS is checked by the NT I/O system the same as FILE_ANY_ACCESS.
175
+ // The file systems, however, may add additional access checks for I/O and FS controls
176
+ // that use this value.
177
+ //
178
+
179
+
180
+ #define FILE_ANY_ACCESS 0
181
+ #define FILE_SPECIAL_ACCESS (FILE_ANY_ACCESS)
182
+ #define FILE_READ_ACCESS ( 0x0001 ) // file & pipe
183
+ #define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe
184
+
185
+ // end_ntddk end_wdm end_nthal end_ntifs
186
+
187
+ #endif // _DEVIOCTL_
188
+
189
+ // end_winioctl
msvc/Windows Kits/10/Include/10.0.26100.0/shared/devpkey.h ADDED
@@ -0,0 +1,429 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*++
3
+
4
+ Copyright (c) Microsoft Corporation. All rights reserved.
5
+
6
+ Module Name:
7
+
8
+ devpkey.h
9
+
10
+ Abstract:
11
+
12
+ Defines property keys for the Plug and Play Device Property API.
13
+
14
+ Environment:
15
+
16
+ User and Kernel modes.
17
+
18
+
19
+ --*/
20
+
21
+ #define DEVPKEY_H_INCLUDED
22
+
23
+ #include <winapifamily.h>
24
+
25
+ #pragma region Desktop Family or OneCore Family or Games Family
26
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
27
+
28
+ #include <devpropdef.h>
29
+
30
+
31
+ //
32
+ // DEVPKEY_NAME
33
+ // Namespace: {b725f130-47ef-101a-a5f1-02608c9eebac}
34
+ // Property IDs: 10
35
+ // Common DEVPKEY used to retrieve the display name for an object.
36
+ //
37
+ DEFINE_DEVPROPKEY(DEVPKEY_NAME, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac, 10); // DEVPROP_TYPE_STRING
38
+
39
+ //
40
+ // Device properties
41
+ // Namespace: {a45c254e-df1c-4efd-8020-67d146a850e0}
42
+ // Property IDs: 2-38
43
+ // These DEVPKEYs correspond to the SetupAPI SPDRP_XXX device properties.
44
+ //
45
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DeviceDesc, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 2); // DEVPROP_TYPE_STRING (localizable)
46
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_HardwareIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 3); // DEVPROP_TYPE_STRING_LIST
47
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_CompatibleIds, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 4); // DEVPROP_TYPE_STRING_LIST
48
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Service, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 6); // DEVPROP_TYPE_STRING
49
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Class, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 9); // DEVPROP_TYPE_STRING
50
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ClassGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10); // DEVPROP_TYPE_GUID
51
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Driver, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 11); // DEVPROP_TYPE_STRING
52
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ConfigFlags, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 12); // DEVPROP_TYPE_UINT32
53
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Manufacturer, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 13); // DEVPROP_TYPE_STRING (localizable)
54
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); // DEVPROP_TYPE_STRING (localizable)
55
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationInfo, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 15); // DEVPROP_TYPE_STRING (localizable)
56
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_PDOName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 16); // DEVPROP_TYPE_STRING
57
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Capabilities, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 17); // DEVPROP_TYPE_UINT32
58
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_UINumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 18); // DEVPROP_TYPE_UINT32
59
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_UpperFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 19); // DEVPROP_TYPE_STRING_LIST
60
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_LowerFilters, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 20); // DEVPROP_TYPE_STRING_LIST
61
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_BusTypeGuid, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 21); // DEVPROP_TYPE_GUID
62
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_LegacyBusType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 22); // DEVPROP_TYPE_UINT32
63
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_BusNumber, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 23); // DEVPROP_TYPE_UINT32
64
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_EnumeratorName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 24); // DEVPROP_TYPE_STRING
65
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Security, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
66
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_SecuritySDS, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
67
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DevType, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 27); // DEVPROP_TYPE_UINT32
68
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Exclusive, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 28); // DEVPROP_TYPE_BOOLEAN
69
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Characteristics, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 29); // DEVPROP_TYPE_UINT32
70
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Address, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 30); // DEVPROP_TYPE_UINT32
71
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_UINumberDescFormat, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 31); // DEVPROP_TYPE_STRING
72
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_PowerData, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 32); // DEVPROP_TYPE_BINARY
73
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalPolicy, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 33); // DEVPROP_TYPE_UINT32
74
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalPolicyDefault, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 34); // DEVPROP_TYPE_UINT32
75
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalPolicyOverride, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 35); // DEVPROP_TYPE_UINT32
76
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_InstallState, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 36); // DEVPROP_TYPE_UINT32
77
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_LocationPaths, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 37); // DEVPROP_TYPE_STRING_LIST
78
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_BaseContainerId, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 38); // DEVPROP_TYPE_GUID
79
+
80
+ //
81
+ // Device and Device Interface property
82
+ // Namespace: {78c34fc8-104a-4aca-9ea4-524d52996e57}
83
+ // Property IDs: 256
84
+ // Common DEVPKEY used to retrieve the device instance id associated with devices and device interfaces.
85
+ //
86
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_InstanceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 256); // DEVPROP_TYPE_STRING
87
+
88
+ //
89
+ // Device properties
90
+ // Namespace: {4340a6c5-93fa-4706-972c-7b648008a5a7}
91
+ // Property IDs: 2-3
92
+ // These DEVPKEYs correspond to a device's status and problem code.
93
+ //
94
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DevNodeStatus, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 2); // DEVPROP_TYPE_UINT32
95
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ProblemCode, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 3); // DEVPROP_TYPE_UINT32
96
+
97
+ //
98
+ // Device properties
99
+ // Namespace: {4340a6c5-93fa-4706-972c-7b648008a5a7}
100
+ // Property IDs: 4-11
101
+ // These DEVPKEYs correspond to a device's relations.
102
+ //
103
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_EjectionRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 4); // DEVPROP_TYPE_STRING_LIST
104
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_RemovalRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 5); // DEVPROP_TYPE_STRING_LIST
105
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_PowerRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 6); // DEVPROP_TYPE_STRING_LIST
106
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_BusRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 7); // DEVPROP_TYPE_STRING_LIST
107
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Parent, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 8); // DEVPROP_TYPE_STRING
108
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Children, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 9); // DEVPROP_TYPE_STRING_LIST
109
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Siblings, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 10); // DEVPROP_TYPE_STRING_LIST
110
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_TransportRelations, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 11); // DEVPROP_TYPE_STRING_LIST
111
+
112
+ //
113
+ // Device property
114
+ // Namespace: {4340a6c5-93fa-4706-972c-7b648008a5a7}
115
+ // Property IDs: 12-13
116
+ // This DEVPKEY corresponds to a the status code that resulted in a device to be in a problem state.
117
+ //
118
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ProblemStatus, 0x4340a6c5, 0x93fa, 0x4706, 0x97, 0x2c, 0x7b, 0x64, 0x80, 0x08, 0xa5, 0xa7, 12); // DEVPROP_TYPE_NTSTATUS
119
+
120
+ //
121
+ // Device properties
122
+ // Namespace: {80497100-8c73-48b9-aad9-ce387e19c56e}
123
+ // Property IDs: 2-3
124
+ // These DEVPKEYs are set for the corresponding types of root-enumerated devices.
125
+ //
126
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Reported, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 2); // DEVPROP_TYPE_BOOLEAN
127
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Legacy, 0x80497100, 0x8c73, 0x48b9, 0xaa, 0xd9, 0xce, 0x38, 0x7e, 0x19, 0xc5, 0x6e, 3); // DEVPROP_TYPE_BOOLEAN
128
+
129
+
130
+ //
131
+ // Device Container Id
132
+ // Namespace: {8c7ed206-3f8a-4827-b3ab-ae9e1faefc6c}
133
+ // Property IDs: all
134
+ //
135
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ContainerId, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 2); // DEVPROP_TYPE_GUID
136
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_InLocalMachineContainer, 0x8c7ed206, 0x3f8a, 0x4827, 0xb3, 0xab, 0xae, 0x9e, 0x1f, 0xae, 0xfc, 0x6c, 4); // DEVPROP_TYPE_BOOLEAN
137
+
138
+ //
139
+ // Device Container device driver properties (container metadata properties)
140
+ // Namespace: {7d0300e4-4fb7-493d-8a95-656f00e6a271}
141
+ // Property IDs: all
142
+ //
143
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ContainerModelName, 0x7d0300e4, 0x4fb7, 0x493d, 0x8a, 0x95, 0x65, 0x6f, 0x00, 0xe6, 0xa2, 0x71, 2); // DEVPROP_TYPE_STRING (localizable)
144
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ContainerManufacturer, 0x7d0300e4, 0x4fb7, 0x493d, 0x8a, 0x95, 0x65, 0x6f, 0x00, 0xe6, 0xa2, 0x71, 3); // DEVPROP_TYPE_STRING (localizable)
145
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ContainerCategories, 0x7d0300e4, 0x4fb7, 0x493d, 0x8a, 0x95, 0x65, 0x6f, 0x00, 0xe6, 0xa2, 0x71, 4); // DEVPROP_TYPE_STRING_LIST
146
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ContainerIcon, 0x7d0300e4, 0x4fb7, 0x493d, 0x8a, 0x95, 0x65, 0x6f, 0x00, 0xe6, 0xa2, 0x71, 5); // DEVPROP_TYPE_STRING
147
+
148
+
149
+ //
150
+ // Device property
151
+ // Namespace: {78c34fc8-104a-4aca-9ea4-524d52996e57}
152
+ // Property IDs: 39
153
+ // This DEVPKEY correspond to a device's model.
154
+ //
155
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Model, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 39); // DEVPROP_TYPE_STRING
156
+
157
+ //
158
+ // Device Experience related Keys
159
+ // Namespace: {80d81ea6-7473-4b0c-8216-efc11a2c4c8b}
160
+ // Property IDs: all
161
+ //
162
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ModelId, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 2); // DEVPROP_TYPE_GUID
163
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyNameAttributes, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 3); // DEVPROP_TYPE_UINT32
164
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ManufacturerAttributes, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 4); // DEVPROP_TYPE_UINT32
165
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_PresenceNotForDevice, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 5); // DEVPROP_TYPE_BOOLEAN
166
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_SignalStrength, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 6); // DEVPROP_TYPE_INT32
167
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_IsAssociateableByUserAction, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 7); // DEVPROP_TYPE_BOOLEAN
168
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ShowInUninstallUI, 0x80d81ea6, 0x7473, 0x4b0c, 0x82, 0x16, 0xef, 0xc1, 0x1a, 0x2c, 0x4c, 0x8b, 8); // DEVPROP_TYPE_BOOLEAN
169
+
170
+ //
171
+ // Hardware Support App (HSA) properties
172
+ //
173
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_CompanionApps, 0x6a742654, 0xd0b2, 0x4420, 0xa5, 0x23, 0xe0, 0x68, 0x35, 0x2a, 0xc1, 0xdf, 2); // DEVPROP_TYPE_STRING_LIST
174
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_PrimaryCompanionApp, 0x6a742654, 0xd0b2, 0x4420, 0xa5, 0x23, 0xe0, 0x68, 0x35, 0x2a, 0xc1, 0xdf, 3); // DEVPROP_TYPE_STRING
175
+
176
+ //
177
+ // Other Device properties
178
+ // Namespace: {540b947e-8b40-45bc-a8a2-6a0b894cbda2}
179
+ // Property IDs: all
180
+ //
181
+ #define DEVPKEY_Numa_Proximity_Domain DEVPKEY_Device_Numa_Proximity_Domain
182
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Proximity_Domain, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 1); // DEVPROP_TYPE_UINT32
183
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DHP_Rebalance_Policy, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 2); // DEVPROP_TYPE_UINT32
184
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Node, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 3); // DEVPROP_TYPE_UINT32
185
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_BusReportedDeviceDesc, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 4); // DEVPROP_TYPE_STRING
186
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_IsPresent, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 5); // DEVPROP_TYPE_BOOL
187
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_HasProblem, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 6); // DEVPROP_TYPE_BOOL
188
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ConfigurationId, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 7); // DEVPROP_TYPE_STRING
189
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ReportedDeviceIdsHash, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 8); // DEVPROP_TYPE_UINT32
190
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_PhysicalDeviceLocation, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 9); // DEVPROP_TYPE_BINARY
191
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_BiosDeviceName, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 10); // DEVPROP_TYPE_STRING
192
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverProblemDesc, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 11); // DEVPROP_TYPE_STRING
193
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DebuggerSafe, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 12); // DEVPROP_TYPE_UINT32
194
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_PostInstallInProgress, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 13); // DEVPROP_TYPE_BOOLEAN
195
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_Stack, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 14); // DEVPROP_TYPE_STRING_LIST
196
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ExtendedConfigurationIds, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 15); // DEVPROP_TYPE_STRING_LIST
197
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_IsRebootRequired, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 16); // DEVPROP_TYPE_BOOLEAN
198
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_FirmwareDate, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 17); // DEVPROP_TYPE_FILETIME
199
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_FirmwareVersion, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 18); // DEVPROP_TYPE_STRING
200
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_FirmwareRevision, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 19); // DEVPROP_TYPE_STRING
201
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DependencyProviders, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 20); // DEVPROP_TYPE_STRING_LIST
202
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DependencyDependents, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 21); // DEVPROP_TYPE_STRING_LIST
203
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_SoftRestartSupported, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 22); // DEVPROP_TYPE_BOOLEAN
204
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ExtendedAddress, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 23); // DEVPROP_TYPE_UINT64
205
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_AssignedToGuest, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 24); // DEVPROP_TYPE_BOOLEAN
206
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_CreatorProcessId, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 25); // DEVPROP_TYPE_UINT32
207
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_FirmwareVendor, 0x540b947e, 0x8b40, 0x45bc, 0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 26); // DEVPROP_TYPE_STRING
208
+
209
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_SessionId, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 6); // DEVPROP_TYPE_UINT32
210
+
211
+ //
212
+ // Device activity timestamp properties
213
+ // Namespace: {83da6326-97a6-4088-9453-a1923f573b29}
214
+ // Property IDs: 100-103
215
+ //
216
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_InstallDate, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 100); // DEVPROP_TYPE_FILETIME
217
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_FirstInstallDate, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 101); // DEVPROP_TYPE_FILETIME
218
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_LastArrivalDate, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 102); // DEVPROP_TYPE_FILETIME
219
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_LastRemovalDate, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 103); // DEVPROP_TYPE_FILETIME
220
+
221
+
222
+ //
223
+ // Device driver properties
224
+ // Namespace: {a8b865dd-2e3d-4094-ad97-e593a7c75d6}
225
+ // Property IDs: 2-15
226
+ //
227
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverDate, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 2); // DEVPROP_TYPE_FILETIME
228
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverVersion, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 3); // DEVPROP_TYPE_STRING
229
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverDesc, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 4); // DEVPROP_TYPE_STRING
230
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverInfPath, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 5); // DEVPROP_TYPE_STRING
231
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverInfSection, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 6); // DEVPROP_TYPE_STRING
232
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverInfSectionExt, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 7); // DEVPROP_TYPE_STRING
233
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_MatchingDeviceId, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 8); // DEVPROP_TYPE_STRING
234
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 9); // DEVPROP_TYPE_STRING
235
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverPropPageProvider, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 10); // DEVPROP_TYPE_STRING
236
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverCoInstallers, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 11); // DEVPROP_TYPE_STRING_LIST
237
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ResourcePickerTags, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 12); // DEVPROP_TYPE_STRING
238
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_ResourcePickerExceptions, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 13); // DEVPROP_TYPE_STRING
239
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverRank, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 14); // DEVPROP_TYPE_UINT32
240
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_DriverLogoLevel, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 15); // DEVPROP_TYPE_UINT32
241
+
242
+ //
243
+ // Device properties
244
+ // Namespace: {a8b865dd-2e3d-4094-ad97-e593a7c75d6}
245
+ // Property IDs: 17-19
246
+ // These DEVPKEYs may be set by the driver package installed for a device.
247
+ //
248
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_NoConnectSound, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 17); // DEVPROP_TYPE_BOOLEAN
249
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_GenericDriverInstalled, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 18); // DEVPROP_TYPE_BOOLEAN
250
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_AdditionalSoftwareRequested, 0xa8b865dd, 0x2e3d, 0x4094, 0xad, 0x97, 0xe5, 0x93, 0xa7, 0xc, 0x75, 0xd6, 19); // DEVPROP_TYPE_BOOLEAN
251
+
252
+ //
253
+ // Device safe-removal properties
254
+ // Namespace: {afd97640-86a3-4210-b67c-289c41aabe55}
255
+ // Property IDs: all
256
+ //
257
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_SafeRemovalRequired, 0xafd97640, 0x86a3, 0x4210, 0xb6, 0x7c, 0x28, 0x9c, 0x41, 0xaa, 0xbe, 0x55, 2); // DEVPROP_TYPE_BOOLEAN
258
+ DEFINE_DEVPROPKEY(DEVPKEY_Device_SafeRemovalRequiredOverride, 0xafd97640, 0x86a3, 0x4210, 0xb6, 0x7c, 0x28, 0x9c, 0x41, 0xaa, 0xbe, 0x55, 3); // DEVPROP_TYPE_BOOLEAN
259
+
260
+
261
+ //
262
+ // Device properties
263
+ // Namespace: {cf73bb51-3abf-44a2-85e0-9a3dc7a12132}
264
+ // Property IDs: all
265
+ // These DEVPKEYs may be set by the driver package installed for a device.
266
+ //
267
+ DEFINE_DEVPROPKEY(DEVPKEY_DrvPkg_Model, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 2); // DEVPROP_TYPE_STRING
268
+ DEFINE_DEVPROPKEY(DEVPKEY_DrvPkg_VendorWebSite, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 3); // DEVPROP_TYPE_STRING
269
+ DEFINE_DEVPROPKEY(DEVPKEY_DrvPkg_DetailedDescription, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 4); // DEVPROP_TYPE_STRING
270
+ DEFINE_DEVPROPKEY(DEVPKEY_DrvPkg_DocumentationLink, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 5); // DEVPROP_TYPE_STRING
271
+ DEFINE_DEVPROPKEY(DEVPKEY_DrvPkg_Icon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 6); // DEVPROP_TYPE_STRING_LIST
272
+ DEFINE_DEVPROPKEY(DEVPKEY_DrvPkg_BrandingIcon, 0xcf73bb51, 0x3abf, 0x44a2, 0x85, 0xe0, 0x9a, 0x3d, 0xc7, 0xa1, 0x21, 0x32, 7); // DEVPROP_TYPE_STRING_LIST
273
+
274
+
275
+ //
276
+ // Device setup class properties
277
+ // Namespace: {4321918b-f69e-470d-a5de-4d88c75ad24b}
278
+ // Property IDs: all
279
+ // These DEVPKEYs correspond to the SetupAPI SPCRP_XXX setup class properties.
280
+ //
281
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_UpperFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 19); // DEVPROP_TYPE_STRING_LIST
282
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_LowerFilters, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 20); // DEVPROP_TYPE_STRING_LIST
283
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_Security, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 25); // DEVPROP_TYPE_SECURITY_DESCRIPTOR
284
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_SecuritySDS, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 26); // DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING
285
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_DevType, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 27); // DEVPROP_TYPE_UINT32
286
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_Exclusive, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 28); // DEVPROP_TYPE_BOOLEAN
287
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_Characteristics, 0x4321918b, 0xf69e, 0x470d, 0xa5, 0xde, 0x4d, 0x88, 0xc7, 0x5a, 0xd2, 0x4b, 29); // DEVPROP_TYPE_UINT32
288
+
289
+ //
290
+ // Device setup class properties
291
+ // Namespace: {259abffc-50a7-47ce-af8-68c9a7d73366}
292
+ // Property IDs: 2-12
293
+ //
294
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_Name, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 2); // DEVPROP_TYPE_STRING
295
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_ClassName, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 3); // DEVPROP_TYPE_STRING
296
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_Icon, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 4); // DEVPROP_TYPE_STRING
297
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_ClassInstaller, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 5); // DEVPROP_TYPE_STRING
298
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_PropPageProvider, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 6); // DEVPROP_TYPE_STRING
299
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_NoInstallClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 7); // DEVPROP_TYPE_BOOLEAN
300
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_NoDisplayClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 8); // DEVPROP_TYPE_BOOLEAN
301
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_SilentInstall, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 9); // DEVPROP_TYPE_BOOLEAN
302
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_NoUseClass, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 10); // DEVPROP_TYPE_BOOLEAN
303
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_DefaultService, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 11); // DEVPROP_TYPE_STRING
304
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_IconPath, 0x259abffc, 0x50a7, 0x47ce, 0xaf, 0x8, 0x68, 0xc9, 0xa7, 0xd7, 0x33, 0x66, 12); // DEVPROP_TYPE_STRING_LIST
305
+
306
+ //
307
+ // Other Device setup class properties
308
+ // Namespace: {d14d3ef3-66cf-4ba2-9d38-0ddb37ab4701}
309
+ // Property IDs: all
310
+ //
311
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_DHPRebalanceOptOut, 0xd14d3ef3, 0x66cf, 0x4ba2, 0x9d, 0x38, 0x0d, 0xdb, 0x37, 0xab, 0x47, 0x01, 2); // DEVPROP_TYPE_BOOLEAN
312
+
313
+ //
314
+ // Other Device setup class properties
315
+ // Namespace: {713d1703-a2e2-49f5-9214-56472ef3da5c}
316
+ // Property IDs: all
317
+ //
318
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceClass_ClassCoInstallers, 0x713d1703, 0xa2e2, 0x49f5, 0x92, 0x14, 0x56, 0x47, 0x2e, 0xf3, 0xda, 0x5c, 2); // DEVPROP_TYPE_STRING_LIST
319
+
320
+ //
321
+ // Device interface properties
322
+ // Namespace: {026e516e-b814-414b-83cd-856d6fef4822}
323
+ // Property IDs: all
324
+ //
325
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_FriendlyName, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 2); // DEVPROP_TYPE_STRING
326
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Enabled, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 3); // DEVPROP_TYPE_BOOLEAN
327
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_ClassGuid, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 4); // DEVPROP_TYPE_GUID
328
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_ReferenceString, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 5); // DEVPROP_TYPE_STRING
329
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_Restricted, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 6); // DEVPROP_TYPE_BOOLEAN
330
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_UnrestrictedAppCapabilities, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 8); // DEVPROP_TYPE_STRING_LIST
331
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterface_SchematicName, 0x026e516e, 0xb814, 0x414b, 0x83, 0xcd, 0x85, 0x6d, 0x6f, 0xef, 0x48, 0x22, 9); // DEVPROP_TYPE_STRING
332
+
333
+ //
334
+ // Device interface class properties
335
+ // Namespace: {14c83a99-0b3f-44b7-be4c-a178d3990564}
336
+ // Property IDs: all
337
+ //
338
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterfaceClass_DefaultInterface, 0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 2); // DEVPROP_TYPE_STRING
339
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceInterfaceClass_Name, 0x14c83a99, 0x0b3f, 0x44b7, 0xbe, 0x4c, 0xa1, 0x78, 0xd3, 0x99, 0x05, 0x64, 3); // DEVPROP_TYPE_STRING
340
+
341
+ //
342
+ // Device Container Properties
343
+ // Namespace: {78c34fc8-104a-4aca-9ea4-524d52996e57}
344
+ // Property IDs: all
345
+ //
346
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Address, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 51); // DEVPROP_TYPE_STRING | DEVPROP_TYPE_STRING_LIST
347
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_DiscoveryMethod, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 52); // DEVPROP_TYPE_STRING_LIST
348
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsEncrypted, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 53); // DEVPROP_TYPE_BOOLEAN
349
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsAuthenticated, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 54); // DEVPROP_TYPE_BOOLEAN
350
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsConnected, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 55); // DEVPROP_TYPE_BOOLEAN
351
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsPaired, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 56); // DEVPROP_TYPE_BOOLEAN
352
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Icon, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 57); // DEVPROP_TYPE_STRING
353
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Version, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 65); // DEVPROP_TYPE_STRING
354
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Last_Seen, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 66); // DEVPROP_TYPE_FILETIME
355
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Last_Connected, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 67); // DEVPROP_TYPE_FILETIME
356
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsShowInDisconnectedState, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 68); // DEVPROP_TYPE_BOOLEAN
357
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsLocalMachine, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 70); // DEVPROP_TYPE_BOOLEAN
358
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_MetadataPath, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 71); // DEVPROP_TYPE_STRING
359
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsMetadataSearchInProgress, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 72); // DEVPROP_TYPE_BOOLEAN
360
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_MetadataChecksum, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 73); // DEVPROP_TYPE_BINARY
361
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsNotInterestingForDisplay, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 74); // DEVPROP_TYPE_BOOLEAN
362
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_LaunchDeviceStageOnDeviceConnect, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 76); // DEVPROP_TYPE_BOOLEAN
363
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_LaunchDeviceStageFromExplorer, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 77); // DEVPROP_TYPE_BOOLEAN
364
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_BaselineExperienceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 78); // DEVPROP_TYPE_GUID
365
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsDeviceUniquelyIdentifiable, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 79); // DEVPROP_TYPE_BOOLEAN
366
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_AssociationArray, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 80); // DEVPROP_TYPE_STRING_LIST
367
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_DeviceDescription1, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 81); // DEVPROP_TYPE_STRING
368
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_DeviceDescription2, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 82); // DEVPROP_TYPE_STRING
369
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_HasProblem, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 83); // DEVPROP_TYPE_BOOLEAN
370
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsSharedDevice, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 84); // DEVPROP_TYPE_BOOLEAN
371
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsNetworkDevice, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 85); // DEVPROP_TYPE_BOOLEAN
372
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsDefaultDevice, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 86); // DEVPROP_TYPE_BOOLEAN
373
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_MetadataCabinet, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 87); // DEVPROP_TYPE_STRING
374
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_RequiresPairingElevation, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 88); // DEVPROP_TYPE_BOOLEAN
375
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_ExperienceId, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 89); // DEVPROP_TYPE_GUID
376
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Category, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 90); // DEVPROP_TYPE_STRING_LIST
377
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Category_Desc_Singular, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 91); // DEVPROP_TYPE_STRING_LIST
378
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Category_Desc_Plural, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 92); // DEVPROP_TYPE_STRING_LIST
379
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Category_Icon, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 93); // DEVPROP_TYPE_STRING
380
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_CategoryGroup_Desc, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 94); // DEVPROP_TYPE_STRING_LIST
381
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_CategoryGroup_Icon, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 95); // DEVPROP_TYPE_STRING
382
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_PrimaryCategory, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 97); // DEVPROP_TYPE_STRING
383
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_UnpairUninstall, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 98); // DEVPROP_TYPE_BOOLEAN
384
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_RequiresUninstallElevation, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 99); // DEVPROP_TYPE_BOOLEAN
385
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_DeviceFunctionSubRank, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 100); // DEVPROP_TYPE_UINT32
386
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_AlwaysShowDeviceAsConnected, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 101); // DEVPROP_TYPE_BOOLEAN
387
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_ConfigFlags, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 105); // DEVPROP_TYPE_UINT32
388
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_PrivilegedPackageFamilyNames, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 106); // DEVPROP_TYPE_STRING_LIST
389
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_CustomPrivilegedPackageFamilyNames, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 107); // DEVPROP_TYPE_STRING_LIST
390
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_IsRebootRequired, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57, 108); // DEVPROP_TYPE_BOOLEAN
391
+
392
+ //
393
+ // Device Container Properties
394
+ // Namespace: {656a3bb3-ecc0-43fd-8477-4ae0404a96cd}
395
+ // Property IDs: all
396
+ //
397
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_FriendlyName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 12288); // DEVPROP_TYPE_STRING
398
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_Manufacturer, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 8192); // DEVPROP_TYPE_STRING
399
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_ModelName, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 8194); // DEVPROP_TYPE_STRING (localizable)
400
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_ModelNumber, 0x656A3BB3, 0xECC0, 0x43FD, 0x84, 0x77, 0x4A, 0xE0, 0x40, 0x4A, 0x96, 0xCD, 8195); // DEVPROP_TYPE_STRING
401
+
402
+ // {83da6326-97a6-4088-9453-a1923f573b29}
403
+ // Property IDs: 9
404
+ DEFINE_DEVPROPKEY(DEVPKEY_DeviceContainer_InstallInProgress, 0x83da6326, 0x97a6, 0x4088, 0x94, 0x53, 0xa1, 0x92, 0x3f, 0x57, 0x3b, 0x29, 9); // DEVPROP_TYPE_BOOLEAN
405
+
406
+ //
407
+ // DeviceContainer properties that can be set on a devnode.
408
+ // These used to be defined as DeviceDisplay
409
+ //
410
+ #define DEVPKEY_DeviceDisplay_DiscoveryMethod DEVPKEY_DeviceContainer_DiscoveryMethod
411
+ #define DEVPKEY_DeviceDisplay_IsShowInDisconnectedState DEVPKEY_DeviceContainer_IsShowInDisconnectedState
412
+ #define DEVPKEY_DeviceDisplay_IsNotInterestingForDisplay DEVPKEY_DeviceContainer_IsNotInterestingForDisplay
413
+ #define DEVPKEY_DeviceDisplay_IsNetworkDevice DEVPKEY_DeviceContainer_IsNetworkDevice
414
+ #define DEVPKEY_DeviceDisplay_Category DEVPKEY_DeviceContainer_Category
415
+ #define DEVPKEY_DeviceDisplay_UnpairUninstall DEVPKEY_DeviceContainer_UnpairUninstall
416
+ #define DEVPKEY_DeviceDisplay_RequiresUninstallElevation DEVPKEY_DeviceContainer_RequiresUninstallElevation
417
+ #define DEVPKEY_DeviceDisplay_AlwaysShowDeviceAsConnected DEVPKEY_DeviceContainer_AlwaysShowDeviceAsConnected
418
+
419
+
420
+ //
421
+ // DevQuery properties
422
+ // Namespace: {13673f42-a3d6-49f6-b4da-ae46e0c5237c}
423
+ // Property IDs: all
424
+ //
425
+ DEFINE_DEVPROPKEY(DEVPKEY_DevQuery_ObjectType, 0x13673f42, 0xa3d6, 0x49f6, 0xb4, 0xda, 0xae, 0x46, 0xe0, 0xc5, 0x23, 0x7c, 2); // DEVPROP_TYPE_UINT32
426
+
427
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
428
+ #pragma endregion
429
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/devpropdef.h ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #include <winapifamily.h>
2
+
3
+ /*++
4
+
5
+ Copyright (c) Microsoft Corporation. All rights reserved.
6
+
7
+ Module Name:
8
+
9
+ devpropdef.h
10
+
11
+ Abstract:
12
+
13
+ Defines property types and keys for the Plug and Play Device Property API.
14
+
15
+ Environment:
16
+
17
+ User and Kernel modes.
18
+
19
+ --*/
20
+
21
+
22
+ #pragma region Desktop Family or OneCore Family or Games Family
23
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES)
24
+
25
+ #ifndef _DEVPROPDEF_H_
26
+ #define _DEVPROPDEF_H_
27
+
28
+ //
29
+ // Type definition for property data types. Valid DEVPROPTYPE values are
30
+ // constructed from base DEVPROP_TYPE_ values, which may be modified by a
31
+ // logical OR with DEVPROP_TYPEMOD_ values, as appropriate.
32
+ //
33
+ typedef ULONG DEVPROPTYPE, *PDEVPROPTYPE;
34
+
35
+ //
36
+ // Property type modifiers. Used to modify base DEVPROP_TYPE_ values, as
37
+ // appropriate. Not valid as standalone DEVPROPTYPE values.
38
+ //
39
+ #define DEVPROP_TYPEMOD_ARRAY 0x00001000 // array of fixed-sized data elements
40
+ #define DEVPROP_TYPEMOD_LIST 0x00002000 // list of variable-sized data elements
41
+
42
+ //
43
+ // Property data types.
44
+ //
45
+ #define DEVPROP_TYPE_EMPTY 0x00000000 // nothing, no property data
46
+ #define DEVPROP_TYPE_NULL 0x00000001 // null property data
47
+ #define DEVPROP_TYPE_SBYTE 0x00000002 // 8-bit signed int (SBYTE)
48
+ #define DEVPROP_TYPE_BYTE 0x00000003 // 8-bit unsigned int (BYTE)
49
+ #define DEVPROP_TYPE_INT16 0x00000004 // 16-bit signed int (SHORT)
50
+ #define DEVPROP_TYPE_UINT16 0x00000005 // 16-bit unsigned int (USHORT)
51
+ #define DEVPROP_TYPE_INT32 0x00000006 // 32-bit signed int (LONG)
52
+ #define DEVPROP_TYPE_UINT32 0x00000007 // 32-bit unsigned int (ULONG)
53
+ #define DEVPROP_TYPE_INT64 0x00000008 // 64-bit signed int (LONG64)
54
+ #define DEVPROP_TYPE_UINT64 0x00000009 // 64-bit unsigned int (ULONG64)
55
+ #define DEVPROP_TYPE_FLOAT 0x0000000A // 32-bit floating-point (FLOAT)
56
+ #define DEVPROP_TYPE_DOUBLE 0x0000000B // 64-bit floating-point (DOUBLE)
57
+ #define DEVPROP_TYPE_DECIMAL 0x0000000C // 128-bit data (DECIMAL)
58
+ #define DEVPROP_TYPE_GUID 0x0000000D // 128-bit unique identifier (GUID)
59
+ #define DEVPROP_TYPE_CURRENCY 0x0000000E // 64 bit signed int currency value (CURRENCY)
60
+ #define DEVPROP_TYPE_DATE 0x0000000F // date (DATE)
61
+ #define DEVPROP_TYPE_FILETIME 0x00000010 // file time (FILETIME)
62
+ #define DEVPROP_TYPE_BOOLEAN 0x00000011 // 8-bit boolean (DEVPROP_BOOLEAN)
63
+ #define DEVPROP_TYPE_STRING 0x00000012 // null-terminated string
64
+ #define DEVPROP_TYPE_STRING_LIST (DEVPROP_TYPE_STRING|DEVPROP_TYPEMOD_LIST) // multi-sz string list
65
+ #define DEVPROP_TYPE_SECURITY_DESCRIPTOR 0x00000013 // self-relative binary SECURITY_DESCRIPTOR
66
+ #define DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING 0x00000014 // security descriptor string (SDDL format)
67
+ #define DEVPROP_TYPE_DEVPROPKEY 0x00000015 // device property key (DEVPROPKEY)
68
+ #define DEVPROP_TYPE_DEVPROPTYPE 0x00000016 // device property type (DEVPROPTYPE)
69
+ #define DEVPROP_TYPE_BINARY (DEVPROP_TYPE_BYTE|DEVPROP_TYPEMOD_ARRAY) // custom binary data
70
+ #define DEVPROP_TYPE_ERROR 0x00000017 // 32-bit Win32 system error code
71
+ #define DEVPROP_TYPE_NTSTATUS 0x00000018 // 32-bit NTSTATUS code
72
+ #define DEVPROP_TYPE_STRING_INDIRECT 0x00000019 // string resource (@[path\]<dllname>,-<strId>)
73
+
74
+ //
75
+ // Max base DEVPROP_TYPE_ and DEVPROP_TYPEMOD_ values.
76
+ //
77
+ #define MAX_DEVPROP_TYPE 0x00000019 // max valid DEVPROP_TYPE_ value
78
+ #define MAX_DEVPROP_TYPEMOD 0x00002000 // max valid DEVPROP_TYPEMOD_ value
79
+
80
+ //
81
+ // Bitmasks for extracting DEVPROP_TYPE_ and DEVPROP_TYPEMOD_ values.
82
+ //
83
+ #define DEVPROP_MASK_TYPE 0x00000FFF // range for base DEVPROP_TYPE_ values
84
+ #define DEVPROP_MASK_TYPEMOD 0x0000F000 // mask for DEVPROP_TYPEMOD_ type modifiers
85
+
86
+
87
+ //
88
+ // Property type specific data types.
89
+ //
90
+
91
+ // 8-bit boolean type definition for DEVPROP_TYPE_BOOLEAN (True=-1, False=0)
92
+ typedef CHAR DEVPROP_BOOLEAN, *PDEVPROP_BOOLEAN;
93
+ #define DEVPROP_TRUE ((DEVPROP_BOOLEAN)-1)
94
+ #define DEVPROP_FALSE ((DEVPROP_BOOLEAN) 0)
95
+
96
+
97
+ //
98
+ // DEVPROPKEY structure
99
+ //
100
+
101
+ #ifndef DEVPROPKEY_DEFINED
102
+ #define DEVPROPKEY_DEFINED
103
+
104
+ typedef GUID DEVPROPGUID, *PDEVPROPGUID;
105
+ typedef ULONG DEVPROPID, *PDEVPROPID;
106
+
107
+ typedef struct _DEVPROPKEY {
108
+ DEVPROPGUID fmtid;
109
+ DEVPROPID pid;
110
+ } DEVPROPKEY, *PDEVPROPKEY;
111
+
112
+ #endif // DEVPROPKEY_DEFINED
113
+
114
+ #ifndef IsEqualDevPropKey
115
+ #ifdef __cplusplus
116
+ #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualGUID((a).fmtid, (b).fmtid))
117
+ #ifdef _SYS_GUID_OPERATOR_EQ_
118
+ extern "C++" {
119
+ inline bool operator==(const DEVPROPKEY &a, const DEVPROPKEY &b) { return ((a.pid == b.pid) && (a.fmtid == b.fmtid)); }
120
+ inline bool operator!=(const DEVPROPKEY &a, const DEVPROPKEY &b) { return !(a == b); }
121
+ }
122
+ #endif // _SYS_GUID_OPERATOR_EQ_
123
+ #else // !__cplusplus
124
+ #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualGUID(&(a).fmtid, &(b).fmtid))
125
+ #endif // __cplusplus
126
+ #endif // !IsEqualDevPropKey
127
+
128
+ //
129
+ // DEVPROPSTORE Enumeration
130
+ //
131
+ // This enumeration describes where a property is stored.
132
+ //
133
+
134
+ typedef
135
+ #ifdef MIDL_PASS
136
+ [v1_enum]
137
+ #endif
138
+ enum _DEVPROPSTORE {
139
+ DEVPROP_STORE_SYSTEM,
140
+ DEVPROP_STORE_USER
141
+ } DEVPROPSTORE, *PDEVPROPSTORE;
142
+
143
+ //
144
+ // DEVPROPCOMPKEY structure
145
+ //
146
+ // This structure represents a compound key for a property.
147
+ //
148
+
149
+ typedef struct _DEVPROPCOMPKEY {
150
+ DEVPROPKEY Key;
151
+ DEVPROPSTORE Store;
152
+ #ifdef MIDL_PASS
153
+ [string] wchar_t *LocaleName;
154
+ #else
155
+ PCWSTR LocaleName;
156
+ #endif
157
+ } DEVPROPCOMPKEY, *PDEVPROPCOMPKEY;
158
+
159
+ #ifndef IsEqualLocaleName
160
+ #define IsEqualLocaleName(a, b) (((a) == (b)) || (((a) != NULL) && ((b) != NULL) && (_wcsicmp((a), (b)) == 0)))
161
+ #endif
162
+
163
+ #ifndef IsEqualDevPropCompKey
164
+ #define IsEqualDevPropCompKey(a, b) (IsEqualDevPropKey((a).Key, (b).Key) && ((a).Store == (b).Store) && IsEqualLocaleName((a).LocaleName, (b).LocaleName))
165
+ #ifdef __cplusplus
166
+ #ifdef _SYS_GUID_OPERATOR_EQ_
167
+ extern "C++" {
168
+ inline bool operator==(const DEVPROPCOMPKEY &a, const DEVPROPCOMPKEY &b) { return ((a.Key == b.Key) && (a.Store == b.Store) && IsEqualLocaleName(a.LocaleName, b.LocaleName)); }
169
+ inline bool operator!=(const DEVPROPCOMPKEY &a, const DEVPROPCOMPKEY &b) { return !(a == b); }
170
+ }
171
+ #endif // _SYS_GUID_OPERATOR_EQ_
172
+ #endif // __cplusplus
173
+ #endif // !IsEqualDevPropCompKey
174
+
175
+ //
176
+ // DEVPROPERTY structure
177
+ //
178
+
179
+ typedef struct _DEVPROPERTY {
180
+ DEVPROPCOMPKEY CompKey;
181
+ DEVPROPTYPE Type;
182
+ ULONG BufferSize;
183
+ #ifdef MIDL_PASS
184
+ [size_is(BufferSize)] BYTE *Buffer;
185
+ #else
186
+ __field_bcount_opt(BufferSize) PVOID Buffer;
187
+ #endif
188
+ } DEVPROPERTY, *PDEVPROPERTY;
189
+
190
+
191
+ //
192
+ // All valid DEVPROPKEY definitions must use a PROPID that is equal to or greater
193
+ // than DEVPROPID_FIRST_USABLE.
194
+ //
195
+ #define DEVPROPID_FIRST_USABLE 2
196
+
197
+ #endif // _DEVPROPDEF_H_
198
+
199
+
200
+ #ifdef DEFINE_DEVPROPKEY
201
+ #undef DEFINE_DEVPROPKEY
202
+ #endif
203
+ #ifdef INITGUID
204
+ #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
205
+ #else
206
+ #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY name
207
+ #endif // INITGUID
208
+
209
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM | WINAPI_PARTITION_GAMES) */
210
+ #pragma endregion
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dinputd.h ADDED
@@ -0,0 +1,763 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /****************************************************************************
2
+ *
3
+ * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved.
4
+ *
5
+ * File: dinputd.h
6
+ * Content: DirectInput include file for device driver implementors
7
+ *
8
+ ****************************************************************************/
9
+ #ifndef __DINPUTD_INCLUDED__
10
+ #define __DINPUTD_INCLUDED__
11
+
12
+ #include <winapifamily.h>
13
+
14
+ #ifndef DIRECTINPUT_VERSION
15
+ #define DIRECTINPUT_VERSION 0x0800
16
+ #pragma message(__FILE__ ": DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800")
17
+ #endif
18
+
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+ #pragma region Desktop Family
24
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
25
+
26
+ /****************************************************************************
27
+ *
28
+ * Interfaces
29
+ *
30
+ ****************************************************************************/
31
+
32
+ #ifndef DIJ_RINGZERO
33
+
34
+ DEFINE_GUID(IID_IDirectInputEffectDriver, 0x02538130,0x898F,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
35
+ DEFINE_GUID(IID_IDirectInputJoyConfig, 0x1DE12AB1,0xC9F5,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
36
+ DEFINE_GUID(IID_IDirectInputPIDDriver, 0xEEC6993A,0xB3FD,0x11D2,0xA9,0x16,0x00,0xC0,0x4F,0xB9,0x86,0x38);
37
+
38
+ DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xeb0d7dfa,0x1990,0x4f27,0xb4,0xd6,0xed,0xf2,0xee,0xc4,0xa4,0x4c);
39
+
40
+ #endif /* DIJ_RINGZERO */
41
+
42
+
43
+ /****************************************************************************
44
+ *
45
+ * IDirectInputEffectDriver
46
+ *
47
+ ****************************************************************************/
48
+
49
+ typedef struct DIOBJECTATTRIBUTES {
50
+ DWORD dwFlags;
51
+ WORD wUsagePage;
52
+ WORD wUsage;
53
+ } DIOBJECTATTRIBUTES, *LPDIOBJECTATTRIBUTES;
54
+ typedef const DIOBJECTATTRIBUTES *LPCDIOBJECTATTRIBUTES;
55
+
56
+ typedef struct DIFFOBJECTATTRIBUTES {
57
+ DWORD dwFFMaxForce;
58
+ DWORD dwFFForceResolution;
59
+ } DIFFOBJECTATTRIBUTES, *LPDIFFOBJECTATTRIBUTES;
60
+ typedef const DIFFOBJECTATTRIBUTES *LPCDIFFOBJECTATTRIBUTES;
61
+
62
+ typedef struct DIOBJECTCALIBRATION {
63
+ LONG lMin;
64
+ LONG lCenter;
65
+ LONG lMax;
66
+ } DIOBJECTCALIBRATION, *LPDIOBJECTCALIBRATION;
67
+ typedef const DIOBJECTCALIBRATION *LPCDIOBJECTCALIBRATION;
68
+
69
+ typedef struct DIPOVCALIBRATION {
70
+ LONG lMin[5];
71
+ LONG lMax[5];
72
+ } DIPOVCALIBRATION, *LPDIPOVCALIBRATION;
73
+ typedef const DIPOVCALIBRATION *LPCDIPOVCALIBRATION;
74
+
75
+ typedef struct DIEFFECTATTRIBUTES {
76
+ DWORD dwEffectId;
77
+ DWORD dwEffType;
78
+ DWORD dwStaticParams;
79
+ DWORD dwDynamicParams;
80
+ DWORD dwCoords;
81
+ } DIEFFECTATTRIBUTES, *LPDIEFFECTATTRIBUTES;
82
+ typedef const DIEFFECTATTRIBUTES *LPCDIEFFECTATTRIBUTES;
83
+
84
+ typedef struct DIFFDEVICEATTRIBUTES {
85
+ DWORD dwFlags;
86
+ DWORD dwFFSamplePeriod;
87
+ DWORD dwFFMinTimeResolution;
88
+ } DIFFDEVICEATTRIBUTES, *LPDIFFDEVICEATTRIBUTES;
89
+ typedef const DIFFDEVICEATTRIBUTES *LPCDIFFDEVICEATTRIBUTES;
90
+
91
+ typedef struct DIDRIVERVERSIONS {
92
+ DWORD dwSize;
93
+ DWORD dwFirmwareRevision;
94
+ DWORD dwHardwareRevision;
95
+ DWORD dwFFDriverVersion;
96
+ } DIDRIVERVERSIONS, *LPDIDRIVERVERSIONS;
97
+ typedef const DIDRIVERVERSIONS *LPCDIDRIVERVERSIONS;
98
+
99
+ typedef struct DIDEVICESTATE {
100
+ DWORD dwSize;
101
+ DWORD dwState;
102
+ DWORD dwLoad;
103
+ } DIDEVICESTATE, *LPDIDEVICESTATE;
104
+
105
+ #define DEV_STS_EFFECT_RUNNING DIEGES_PLAYING
106
+
107
+ #ifndef DIJ_RINGZERO
108
+
109
+ typedef struct DIHIDFFINITINFO {
110
+ DWORD dwSize;
111
+ LPWSTR pwszDeviceInterface;
112
+ GUID GuidInstance;
113
+ } DIHIDFFINITINFO, *LPDIHIDFFINITINFO;
114
+
115
+ #undef INTERFACE
116
+ #define INTERFACE IDirectInputEffectDriver
117
+
118
+ DECLARE_INTERFACE_(IDirectInputEffectDriver, IUnknown)
119
+ {
120
+ /*** IUnknown methods ***/
121
+ STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
122
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
123
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
124
+
125
+ /*** IDirectInputEffectDriver methods ***/
126
+ STDMETHOD(DeviceID)(THIS_ DWORD,DWORD,DWORD,DWORD,LPVOID) PURE;
127
+ STDMETHOD(GetVersions)(THIS_ LPDIDRIVERVERSIONS) PURE;
128
+ STDMETHOD(Escape)(THIS_ DWORD,DWORD,LPDIEFFESCAPE) PURE;
129
+ STDMETHOD(SetGain)(THIS_ DWORD,DWORD) PURE;
130
+ STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD,DWORD) PURE;
131
+ STDMETHOD(GetForceFeedbackState)(THIS_ DWORD,LPDIDEVICESTATE) PURE;
132
+ STDMETHOD(DownloadEffect)(THIS_ DWORD,DWORD,LPDWORD,LPCDIEFFECT,DWORD) PURE;
133
+ STDMETHOD(DestroyEffect)(THIS_ DWORD,DWORD) PURE;
134
+ STDMETHOD(StartEffect)(THIS_ DWORD,DWORD,DWORD,DWORD) PURE;
135
+ STDMETHOD(StopEffect)(THIS_ DWORD,DWORD) PURE;
136
+ STDMETHOD(GetEffectStatus)(THIS_ DWORD,DWORD,LPDWORD) PURE;
137
+ };
138
+
139
+ typedef struct IDirectInputEffectDriver *LPDIRECTINPUTEFFECTDRIVER;
140
+
141
+ #if !defined(__cplusplus) || defined(CINTERFACE)
142
+ #define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
143
+ #define IDirectInputEffectDriver_AddRef(p) (p)->lpVtbl->AddRef(p)
144
+ #define IDirectInputEffectDriver_Release(p) (p)->lpVtbl->Release(p)
145
+ #define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->lpVtbl->DeviceID(p,a,b,c,d,e)
146
+ #define IDirectInputEffectDriver_GetVersions(p,a) (p)->lpVtbl->GetVersions(p,a)
147
+ #define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->lpVtbl->Escape(p,a,b,c)
148
+ #define IDirectInputEffectDriver_SetGain(p,a,b) (p)->lpVtbl->SetGain(p,a,b)
149
+ #define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->lpVtbl->SendForceFeedbackCommand(p,a,b)
150
+ #define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->lpVtbl->GetForceFeedbackState(p,a,b)
151
+ #define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->lpVtbl->DownloadEffect(p,a,b,c,d,e)
152
+ #define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->lpVtbl->DestroyEffect(p,a,b)
153
+ #define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->lpVtbl->StartEffect(p,a,b,c,d)
154
+ #define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->lpVtbl->StopEffect(p,a,b)
155
+ #define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->lpVtbl->GetEffectStatus(p,a,b,c)
156
+ #else
157
+ #define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
158
+ #define IDirectInputEffectDriver_AddRef(p) (p)->AddRef()
159
+ #define IDirectInputEffectDriver_Release(p) (p)->Release()
160
+ #define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->DeviceID(a,b,c,d,e)
161
+ #define IDirectInputEffectDriver_GetVersions(p,a) (p)->GetVersions(a)
162
+ #define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->Escape(a,b,c)
163
+ #define IDirectInputEffectDriver_SetGain(p,a,b) (p)->SetGain(a,b)
164
+ #define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->SendForceFeedbackCommand(a,b)
165
+ #define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->GetForceFeedbackState(a,b)
166
+ #define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->DownloadEffect(a,b,c,d,e)
167
+ #define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->DestroyEffect(a,b)
168
+ #define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->StartEffect(a,b,c,d)
169
+ #define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->StopEffect(a,b)
170
+ #define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->GetEffectStatus(a,b,c)
171
+ #endif
172
+
173
+
174
+ #endif /* DIJ_RINGZERO */
175
+
176
+
177
+ /****************************************************************************
178
+ *
179
+ * IDirectInputJoyConfig
180
+ *
181
+ ****************************************************************************/
182
+
183
+ /****************************************************************************
184
+ *
185
+ * Definitions copied from the DDK
186
+ *
187
+ ****************************************************************************/
188
+
189
+ #ifndef JOY_HW_NONE
190
+
191
+ /* pre-defined joystick types */
192
+ #define JOY_HW_NONE 0
193
+ #define JOY_HW_CUSTOM 1
194
+ #define JOY_HW_2A_2B_GENERIC 2
195
+ #define JOY_HW_2A_4B_GENERIC 3
196
+ #define JOY_HW_2B_GAMEPAD 4
197
+ #define JOY_HW_2B_FLIGHTYOKE 5
198
+ #define JOY_HW_2B_FLIGHTYOKETHROTTLE 6
199
+ #define JOY_HW_3A_2B_GENERIC 7
200
+ #define JOY_HW_3A_4B_GENERIC 8
201
+ #define JOY_HW_4B_GAMEPAD 9
202
+ #define JOY_HW_4B_FLIGHTYOKE 10
203
+ #define JOY_HW_4B_FLIGHTYOKETHROTTLE 11
204
+ #define JOY_HW_TWO_2A_2B_WITH_Y 12
205
+ #define JOY_HW_LASTENTRY 13
206
+
207
+
208
+ /* calibration flags */
209
+ #define JOY_ISCAL_XY 0x00000001l /* XY are calibrated */
210
+ #define JOY_ISCAL_Z 0x00000002l /* Z is calibrated */
211
+ #define JOY_ISCAL_R 0x00000004l /* R is calibrated */
212
+ #define JOY_ISCAL_U 0x00000008l /* U is calibrated */
213
+ #define JOY_ISCAL_V 0x00000010l /* V is calibrated */
214
+ #define JOY_ISCAL_POV 0x00000020l /* POV is calibrated */
215
+
216
+ /* point of view constants */
217
+ #define JOY_POV_NUMDIRS 4
218
+ #define JOY_POVVAL_FORWARD 0
219
+ #define JOY_POVVAL_BACKWARD 1
220
+ #define JOY_POVVAL_LEFT 2
221
+ #define JOY_POVVAL_RIGHT 3
222
+
223
+ /* Specific settings for joystick hardware */
224
+ #define JOY_HWS_HASZ 0x00000001l /* has Z info? */
225
+ #define JOY_HWS_HASPOV 0x00000002l /* point of view hat present */
226
+ #define JOY_HWS_POVISBUTTONCOMBOS 0x00000004l /* pov done through combo of buttons */
227
+ #define JOY_HWS_POVISPOLL 0x00000008l /* pov done through polling */
228
+ #define JOY_HWS_ISYOKE 0x00000010l /* joystick is a flight yoke */
229
+ #define JOY_HWS_ISGAMEPAD 0x00000020l /* joystick is a game pad */
230
+ #define JOY_HWS_ISCARCTRL 0x00000040l /* joystick is a car controller */
231
+ /* X defaults to J1 X axis */
232
+ #define JOY_HWS_XISJ1Y 0x00000080l /* X is on J1 Y axis */
233
+ #define JOY_HWS_XISJ2X 0x00000100l /* X is on J2 X axis */
234
+ #define JOY_HWS_XISJ2Y 0x00000200l /* X is on J2 Y axis */
235
+ /* Y defaults to J1 Y axis */
236
+ #define JOY_HWS_YISJ1X 0x00000400l /* Y is on J1 X axis */
237
+ #define JOY_HWS_YISJ2X 0x00000800l /* Y is on J2 X axis */
238
+ #define JOY_HWS_YISJ2Y 0x00001000l /* Y is on J2 Y axis */
239
+ /* Z defaults to J2 Y axis */
240
+ #define JOY_HWS_ZISJ1X 0x00002000l /* Z is on J1 X axis */
241
+ #define JOY_HWS_ZISJ1Y 0x00004000l /* Z is on J1 Y axis */
242
+ #define JOY_HWS_ZISJ2X 0x00008000l /* Z is on J2 X axis */
243
+ /* POV defaults to J2 Y axis, if it is not button based */
244
+ #define JOY_HWS_POVISJ1X 0x00010000l /* pov done through J1 X axis */
245
+ #define JOY_HWS_POVISJ1Y 0x00020000l /* pov done through J1 Y axis */
246
+ #define JOY_HWS_POVISJ2X 0x00040000l /* pov done through J2 X axis */
247
+ /* R defaults to J2 X axis */
248
+ #define JOY_HWS_HASR 0x00080000l /* has R (4th axis) info */
249
+ #define JOY_HWS_RISJ1X 0x00100000l /* R done through J1 X axis */
250
+ #define JOY_HWS_RISJ1Y 0x00200000l /* R done through J1 Y axis */
251
+ #define JOY_HWS_RISJ2Y 0x00400000l /* R done through J2 X axis */
252
+ /* U & V for future hardware */
253
+ #define JOY_HWS_HASU 0x00800000l /* has U (5th axis) info */
254
+ #define JOY_HWS_HASV 0x01000000l /* has V (6th axis) info */
255
+
256
+ /* Usage settings */
257
+ #define JOY_US_HASRUDDER 0x00000001l /* joystick configured with rudder */
258
+ #define JOY_US_PRESENT 0x00000002l /* is joystick actually present? */
259
+ #define JOY_US_ISOEM 0x00000004l /* joystick is an OEM defined type */
260
+
261
+ /* reserved for future use -> as link to next possible dword */
262
+ #define JOY_US_RESERVED 0x80000000l /* reserved */
263
+
264
+
265
+ /* Settings for TypeInfo Flags1 */
266
+ #define JOYTYPE_ZEROGAMEENUMOEMDATA 0x00000001l /* Zero GameEnum's OEM data field */
267
+ #define JOYTYPE_NOAUTODETECTGAMEPORT 0x00000002l /* Device does not support Autodetect gameport*/
268
+ #define JOYTYPE_NOHIDDIRECT 0x00000004l /* Do not use HID directly for this device */
269
+ #define JOYTYPE_ANALOGCOMPAT 0x00000008l /* Expose the analog compatible ID */
270
+ #define JOYTYPE_DEFAULTPROPSHEET 0x80000000l /* CPL overrides custom property sheet */
271
+
272
+ /* Settings for TypeInfo Flags2 */
273
+ #define JOYTYPE_DEVICEHIDE 0x00010000l /* Hide unclassified devices */
274
+ #define JOYTYPE_MOUSEHIDE 0x00020000l /* Hide mice */
275
+ #define JOYTYPE_KEYBHIDE 0x00040000l /* Hide keyboards */
276
+ #define JOYTYPE_GAMEHIDE 0x00080000l /* Hide game controllers */
277
+ #define JOYTYPE_HIDEACTIVE 0x00100000l /* Hide flags are active */
278
+ #define JOYTYPE_INFOMASK 0x00E00000l /* Mask for type specific info */
279
+ #define JOYTYPE_INFODEFAULT 0x00000000l /* Use default axis mappings */
280
+ #define JOYTYPE_INFOYYPEDALS 0x00200000l /* Use Y as a combined pedals axis */
281
+ #define JOYTYPE_INFOZYPEDALS 0x00400000l /* Use Z for accelerate, Y for brake */
282
+ #define JOYTYPE_INFOYRPEDALS 0x00600000l /* Use Y for accelerate, R for brake */
283
+ #define JOYTYPE_INFOZRPEDALS 0x00800000l /* Use Z for accelerate, R for brake */
284
+ #define JOYTYPE_INFOZISSLIDER 0x00200000l /* Use Z as a slider */
285
+ #define JOYTYPE_INFOZISZ 0x00400000l /* Use Z as Z axis */
286
+ #define JOYTYPE_ENABLEINPUTREPORT 0x01000000l /* Enable initial input reports */
287
+
288
+ /* struct for storing x,y, z, and rudder values */
289
+ typedef struct joypos_tag {
290
+ DWORD dwX;
291
+ DWORD dwY;
292
+ DWORD dwZ;
293
+ DWORD dwR;
294
+ DWORD dwU;
295
+ DWORD dwV;
296
+ } JOYPOS, FAR *LPJOYPOS;
297
+
298
+ /* struct for storing ranges */
299
+ typedef struct joyrange_tag {
300
+ JOYPOS jpMin;
301
+ JOYPOS jpMax;
302
+ JOYPOS jpCenter;
303
+ } JOYRANGE,FAR *LPJOYRANGE;
304
+
305
+ /*
306
+ * dwTimeout - value at which to timeout joystick polling
307
+ * jrvRanges - range of values app wants returned for axes
308
+ * jpDeadZone - area around center to be considered
309
+ * as "dead". specified as a percentage
310
+ * (0-100). Only X & Y handled by system driver
311
+ */
312
+ typedef struct joyreguservalues_tag {
313
+ DWORD dwTimeOut;
314
+ JOYRANGE jrvRanges;
315
+ JOYPOS jpDeadZone;
316
+ } JOYREGUSERVALUES, FAR *LPJOYREGUSERVALUES;
317
+
318
+ typedef struct joyreghwsettings_tag {
319
+ DWORD dwFlags;
320
+ DWORD dwNumButtons;
321
+ } JOYREGHWSETTINGS, FAR *LPJOYHWSETTINGS;
322
+
323
+ /* range of values returned by the hardware (filled in by calibration) */
324
+ /*
325
+ * jrvHardware - values returned by hardware
326
+ * dwPOVValues - POV values returned by hardware
327
+ * dwCalFlags - what has been calibrated
328
+ */
329
+ typedef struct joyreghwvalues_tag {
330
+ JOYRANGE jrvHardware;
331
+ DWORD dwPOVValues[JOY_POV_NUMDIRS];
332
+ DWORD dwCalFlags;
333
+ } JOYREGHWVALUES, FAR *LPJOYREGHWVALUES;
334
+
335
+ /* hardware configuration */
336
+ /*
337
+ * hws - hardware settings
338
+ * dwUsageSettings - usage settings
339
+ * hwv - values returned by hardware
340
+ * dwType - type of joystick
341
+ * dwReserved - reserved for OEM drivers
342
+ */
343
+ typedef struct joyreghwconfig_tag {
344
+ JOYREGHWSETTINGS hws;
345
+ DWORD dwUsageSettings;
346
+ JOYREGHWVALUES hwv;
347
+ DWORD dwType;
348
+ DWORD dwReserved;
349
+ } JOYREGHWCONFIG, FAR *LPJOYREGHWCONFIG;
350
+
351
+ /* joystick calibration info structure */
352
+ typedef struct joycalibrate_tag {
353
+ UINT wXbase;
354
+ UINT wXdelta;
355
+ UINT wYbase;
356
+ UINT wYdelta;
357
+ UINT wZbase;
358
+ UINT wZdelta;
359
+ } JOYCALIBRATE;
360
+ typedef JOYCALIBRATE FAR *LPJOYCALIBRATE;
361
+
362
+ #endif
363
+
364
+ #ifndef DIJ_RINGZERO
365
+
366
+ #define MAX_JOYSTRING 256
367
+ typedef BOOL (FAR PASCAL * LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID);
368
+
369
+ #ifndef MAX_JOYSTICKOEMVXDNAME
370
+ #define MAX_JOYSTICKOEMVXDNAME 260
371
+ #endif
372
+
373
+ #define DITC_REGHWSETTINGS 0x00000001
374
+ #define DITC_CLSIDCONFIG 0x00000002
375
+ #define DITC_DISPLAYNAME 0x00000004
376
+ #define DITC_CALLOUT 0x00000008
377
+ #define DITC_HARDWAREID 0x00000010
378
+ #define DITC_FLAGS1 0x00000020
379
+ #define DITC_FLAGS2 0x00000040
380
+ #define DITC_MAPFILE 0x00000080
381
+
382
+
383
+
384
+ /* This structure is defined for DirectX 5.0 compatibility */
385
+
386
+ typedef struct DIJOYTYPEINFO_DX5 {
387
+ DWORD dwSize;
388
+ JOYREGHWSETTINGS hws;
389
+ CLSID clsidConfig;
390
+ WCHAR wszDisplayName[MAX_JOYSTRING];
391
+ WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
392
+ } DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5;
393
+ typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5;
394
+
395
+ /* This structure is defined for DirectX 6.1 compatibility */
396
+ typedef struct DIJOYTYPEINFO_DX6 {
397
+ DWORD dwSize;
398
+ JOYREGHWSETTINGS hws;
399
+ CLSID clsidConfig;
400
+ WCHAR wszDisplayName[MAX_JOYSTRING];
401
+ WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
402
+ WCHAR wszHardwareId[MAX_JOYSTRING];
403
+ DWORD dwFlags1;
404
+ } DIJOYTYPEINFO_DX6, *LPDIJOYTYPEINFO_DX6;
405
+ typedef const DIJOYTYPEINFO_DX6 *LPCDIJOYTYPEINFO_DX6;
406
+
407
+ typedef struct DIJOYTYPEINFO {
408
+ DWORD dwSize;
409
+ JOYREGHWSETTINGS hws;
410
+ CLSID clsidConfig;
411
+ WCHAR wszDisplayName[MAX_JOYSTRING];
412
+ WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
413
+ #if(DIRECTINPUT_VERSION >= 0x05b2)
414
+ WCHAR wszHardwareId[MAX_JOYSTRING];
415
+ DWORD dwFlags1;
416
+ #if(DIRECTINPUT_VERSION >= 0x0800)
417
+ DWORD dwFlags2;
418
+ WCHAR wszMapFile[MAX_JOYSTRING];
419
+ #endif /* DIRECTINPUT_VERSION >= 0x0800 */
420
+ #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
421
+ } DIJOYTYPEINFO, *LPDIJOYTYPEINFO;
422
+ typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO;
423
+ #define DIJC_GUIDINSTANCE 0x00000001
424
+ #define DIJC_REGHWCONFIGTYPE 0x00000002
425
+ #define DIJC_GAIN 0x00000004
426
+ #define DIJC_CALLOUT 0x00000008
427
+ #define DIJC_WDMGAMEPORT 0x00000010
428
+
429
+ /* This structure is defined for DirectX 5.0 compatibility */
430
+
431
+ typedef struct DIJOYCONFIG_DX5 {
432
+ DWORD dwSize;
433
+ GUID guidInstance;
434
+ JOYREGHWCONFIG hwc;
435
+ DWORD dwGain;
436
+ WCHAR wszType[MAX_JOYSTRING];
437
+ WCHAR wszCallout[MAX_JOYSTRING];
438
+ } DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5;
439
+ typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5;
440
+
441
+ typedef struct DIJOYCONFIG {
442
+ DWORD dwSize;
443
+ GUID guidInstance;
444
+ JOYREGHWCONFIG hwc;
445
+ DWORD dwGain;
446
+ WCHAR wszType[MAX_JOYSTRING];
447
+ WCHAR wszCallout[MAX_JOYSTRING];
448
+ #if(DIRECTINPUT_VERSION >= 0x05b2)
449
+ GUID guidGameport;
450
+ #endif /* DIRECTINPUT_VERSION >= 0x05b2 */
451
+ } DIJOYCONFIG, *LPDIJOYCONFIG;
452
+ typedef const DIJOYCONFIG *LPCDIJOYCONFIG;
453
+
454
+
455
+ #define DIJU_USERVALUES 0x00000001
456
+ #define DIJU_GLOBALDRIVER 0x00000002
457
+ #define DIJU_GAMEPORTEMULATOR 0x00000004
458
+
459
+ typedef struct DIJOYUSERVALUES {
460
+ DWORD dwSize;
461
+ JOYREGUSERVALUES ruv;
462
+ WCHAR wszGlobalDriver[MAX_JOYSTRING];
463
+ WCHAR wszGameportEmulator[MAX_JOYSTRING];
464
+ } DIJOYUSERVALUES, *LPDIJOYUSERVALUES;
465
+ typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES;
466
+
467
+ DEFINE_GUID(GUID_KeyboardClass, 0x4D36E96B,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
468
+ DEFINE_GUID(GUID_MediaClass, 0x4D36E96C,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
469
+ DEFINE_GUID(GUID_MouseClass, 0x4D36E96F,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
470
+ DEFINE_GUID(GUID_HIDClass, 0x745A17A0,0x74D3,0x11D0,0xB6,0xFE,0x00,0xA0,0xC9,0x0F,0x57,0xDA);
471
+
472
+ #undef INTERFACE
473
+ #define INTERFACE IDirectInputJoyConfig
474
+
475
+ DECLARE_INTERFACE_(IDirectInputJoyConfig, IUnknown)
476
+ {
477
+ /*** IUnknown methods ***/
478
+ STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
479
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
480
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
481
+
482
+ /*** IDirectInputJoyConfig methods ***/
483
+ STDMETHOD(Acquire)(THIS) PURE;
484
+ STDMETHOD(Unacquire)(THIS) PURE;
485
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
486
+ STDMETHOD(SendNotify)(THIS) PURE;
487
+ STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
488
+ STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
489
+ STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD) PURE;
490
+ STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
491
+ STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
492
+ STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
493
+ STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
494
+ STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
495
+ STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
496
+ STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
497
+ STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
498
+ STDMETHOD(OpenConfigKey)(THIS_ UINT,DWORD,PHKEY) PURE;
499
+ };
500
+
501
+ typedef struct IDirectInputJoyConfig *LPDIRECTINPUTJOYCONFIG;
502
+
503
+ #if !defined(__cplusplus) || defined(CINTERFACE)
504
+ #define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
505
+ #define IDirectInputJoyConfig_AddRef(p) (p)->lpVtbl->AddRef(p)
506
+ #define IDirectInputJoyConfig_Release(p) (p)->lpVtbl->Release(p)
507
+ #define IDirectInputJoyConfig_Acquire(p) (p)->lpVtbl->Acquire(p)
508
+ #define IDirectInputJoyConfig_Unacquire(p) (p)->lpVtbl->Unacquire(p)
509
+ #define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
510
+ #define IDirectInputJoyConfig_SendNotify(p) (p)->lpVtbl->SendNotify(p)
511
+ #define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
512
+ #define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
513
+ #define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->lpVtbl->SetTypeInfo(p,a,b,c)
514
+ #define IDirectInputJoyConfig_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
515
+ #define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
516
+ #define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
517
+ #define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
518
+ #define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
519
+ #define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
520
+ #define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
521
+ #define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
522
+ #define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->lpVtbl->OpenConfigKey(p,a,b,c)
523
+ #else
524
+ #define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
525
+ #define IDirectInputJoyConfig_AddRef(p) (p)->AddRef()
526
+ #define IDirectInputJoyConfig_Release(p) (p)->Release()
527
+ #define IDirectInputJoyConfig_Acquire(p) (p)->Acquire()
528
+ #define IDirectInputJoyConfig_Unacquire(p) (p)->Unacquire()
529
+ #define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
530
+ #define IDirectInputJoyConfig_SendNotify(p) (p)->SendNotify()
531
+ #define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
532
+ #define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
533
+ #define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->SetTypeInfo(a,b,c)
534
+ #define IDirectInputJoyConfig_DeleteType(p,a) (p)->DeleteType(a)
535
+ #define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
536
+ #define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
537
+ #define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->DeleteConfig(a)
538
+ #define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
539
+ #define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
540
+ #define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
541
+ #define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
542
+ #define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->OpenConfigKey(a,b,c)
543
+ #endif
544
+
545
+ #endif /* DIJ_RINGZERO */
546
+
547
+ #if(DIRECTINPUT_VERSION >= 0x0800)
548
+
549
+ #ifndef DIJ_RINGZERO
550
+
551
+ #undef INTERFACE
552
+ #define INTERFACE IDirectInputJoyConfig8
553
+
554
+ DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
555
+ {
556
+ /*** IUnknown methods ***/
557
+ STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
558
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
559
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
560
+
561
+ /*** IDirectInputJoyConfig8 methods ***/
562
+ STDMETHOD(Acquire)(THIS) PURE;
563
+ STDMETHOD(Unacquire)(THIS) PURE;
564
+ STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
565
+ STDMETHOD(SendNotify)(THIS) PURE;
566
+ STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
567
+ STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
568
+ STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD,LPWSTR) PURE;
569
+ STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
570
+ STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
571
+ STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
572
+ STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
573
+ STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
574
+ STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
575
+ STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
576
+ STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
577
+ STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE;
578
+ };
579
+
580
+ typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8;
581
+
582
+ #if !defined(__cplusplus) || defined(CINTERFACE)
583
+ #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
584
+ #define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p)
585
+ #define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p)
586
+ #define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p)
587
+ #define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
588
+ #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
589
+ #define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p)
590
+ #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
591
+ #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
592
+ #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d)
593
+ #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
594
+ #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
595
+ #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
596
+ #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
597
+ #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
598
+ #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
599
+ #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
600
+ #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
601
+ #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a)
602
+ #else
603
+ #define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
604
+ #define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef()
605
+ #define IDirectInputJoyConfig8_Release(p) (p)->Release()
606
+ #define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire()
607
+ #define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire()
608
+ #define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
609
+ #define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify()
610
+ #define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
611
+ #define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
612
+ #define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d)
613
+ #define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a)
614
+ #define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
615
+ #define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
616
+ #define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a)
617
+ #define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
618
+ #define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
619
+ #define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
620
+ #define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
621
+ #define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a)
622
+ #endif
623
+
624
+ #endif /* DIJ_RINGZERO */
625
+
626
+ /****************************************************************************
627
+ *
628
+ * Notification Messages
629
+ *
630
+ ****************************************************************************/
631
+
632
+ /* RegisterWindowMessage with this to get DirectInput notification messages */
633
+ #define DIRECTINPUT_NOTIFICATION_MSGSTRINGA "DIRECTINPUT_NOTIFICATION_MSGSTRING"
634
+ #define DIRECTINPUT_NOTIFICATION_MSGSTRINGW L"DIRECTINPUT_NOTIFICATION_MSGSTRING"
635
+
636
+ #ifdef UNICODE
637
+ #define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGW
638
+ #else
639
+ #define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGA
640
+ #endif
641
+
642
+ #define DIMSGWP_NEWAPPSTART 0x00000001
643
+ #define DIMSGWP_DX8APPSTART 0x00000002
644
+ #define DIMSGWP_DX8MAPPERAPPSTART 0x00000003
645
+
646
+ #endif /* DIRECTINPUT_VERSION >= 0x0800 */
647
+
648
+ #define DIAPPIDFLAG_NOTIME 0x00000001
649
+ #define DIAPPIDFLAG_NOSIZE 0x00000002
650
+
651
+ #define DIRECTINPUT_REGSTR_VAL_APPIDFLAGA "AppIdFlag"
652
+ #define DIRECTINPUT_REGSTR_KEY_LASTAPPA "MostRecentApplication"
653
+ #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA "MostRecentMapperApplication"
654
+ #define DIRECTINPUT_REGSTR_VAL_VERSIONA "Version"
655
+ #define DIRECTINPUT_REGSTR_VAL_NAMEA "Name"
656
+ #define DIRECTINPUT_REGSTR_VAL_IDA "Id"
657
+ #define DIRECTINPUT_REGSTR_VAL_MAPPERA "UsesMapper"
658
+ #define DIRECTINPUT_REGSTR_VAL_LASTSTARTA "MostRecentStart"
659
+
660
+ #define DIRECTINPUT_REGSTR_VAL_APPIDFLAGW L"AppIdFlag"
661
+ #define DIRECTINPUT_REGSTR_KEY_LASTAPPW L"MostRecentApplication"
662
+ #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW L"MostRecentMapperApplication"
663
+ #define DIRECTINPUT_REGSTR_VAL_VERSIONW L"Version"
664
+ #define DIRECTINPUT_REGSTR_VAL_NAMEW L"Name"
665
+ #define DIRECTINPUT_REGSTR_VAL_IDW L"Id"
666
+ #define DIRECTINPUT_REGSTR_VAL_MAPPERW L"UsesMapper"
667
+ #define DIRECTINPUT_REGSTR_VAL_LASTSTARTW L"MostRecentStart"
668
+
669
+ #ifdef UNICODE
670
+ #define DIRECTINPUT_REGSTR_VAL_APPIDFLAG DIRECTINPUT_REGSTR_VAL_APPIDFLAGW
671
+ #define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPW
672
+ #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW
673
+ #define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONW
674
+ #define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEW
675
+ #define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDW
676
+ #define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERW
677
+ #define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTW
678
+ #else
679
+ #define DIRECTINPUT_REGSTR_VAL_APPIDFLAG DIRECTINPUT_REGSTR_VAL_APPIDFLAGA
680
+ #define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPA
681
+ #define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA
682
+ #define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONA
683
+ #define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEA
684
+ #define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDA
685
+ #define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERA
686
+ #define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTA
687
+ #endif
688
+
689
+
690
+ /****************************************************************************
691
+ *
692
+ * Return Codes
693
+ *
694
+ ****************************************************************************/
695
+
696
+ #define DIERR_NOMOREITEMS \
697
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
698
+
699
+ /*
700
+ * Device driver-specific codes.
701
+ */
702
+
703
+ #define DIERR_DRIVERFIRST 0x80040300L
704
+ #define DIERR_DRIVERLAST 0x800403FFL
705
+
706
+ /*
707
+ * Unless the specific driver has been precisely identified, no meaning
708
+ * should be attributed to these values other than that the driver
709
+ * originated the error. However, to illustrate the types of error that
710
+ * may be causing the failure, the PID force feedback driver distributed
711
+ * with DirectX 7 could return the following errors:
712
+ *
713
+ * DIERR_DRIVERFIRST + 1
714
+ * The requested usage was not found.
715
+ * DIERR_DRIVERFIRST + 2
716
+ * The parameter block couldn't be downloaded to the device.
717
+ * DIERR_DRIVERFIRST + 3
718
+ * PID initialization failed.
719
+ * DIERR_DRIVERFIRST + 4
720
+ * The provided values couldn't be scaled.
721
+ */
722
+
723
+
724
+ /*
725
+ * Device installer errors.
726
+ */
727
+
728
+ /*
729
+ * Registry entry or DLL for class installer invalid
730
+ * or class installer not found.
731
+ */
732
+ #define DIERR_INVALIDCLASSINSTALLER 0x80040400L
733
+
734
+ /*
735
+ * The user cancelled the install operation.
736
+ */
737
+ #define DIERR_CANCELLED 0x80040401L
738
+
739
+ /*
740
+ * The INF file for the selected device could not be
741
+ * found or is invalid or is damaged.
742
+ */
743
+ #define DIERR_BADINF 0x80040402L
744
+
745
+ /****************************************************************************
746
+ *
747
+ * Map files
748
+ *
749
+ ****************************************************************************/
750
+
751
+ /*
752
+ * Delete particular data from default map file.
753
+ */
754
+ #define DIDIFT_DELETE 0x01000000
755
+
756
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
757
+ #pragma endregion
758
+
759
+ #ifdef __cplusplus
760
+ };
761
+ #endif
762
+
763
+ #endif /* __DINPUTD_INCLUDED__ */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/diskguid.h ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*++
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Module Name:
6
+
7
+ diskguid.h
8
+
9
+ Abstract:
10
+
11
+ GPT disk GUIDs.
12
+
13
+ Revision History:
14
+
15
+ --*/
16
+ #include <winapifamily.h>
17
+
18
+ #pragma region Desktop Family or OneCore Family
19
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
20
+
21
+
22
+ //
23
+ // GPT Partition Type GUIDs
24
+ //
25
+ // need these GUIDs outside conditional includes so that user can
26
+ // #include <ntdddisk.h> in precompiled header
27
+ // #include <initguid.h> in a single source file
28
+ // #include <ntdddisk.h> in that source file a second time to instantiate the GUIDs
29
+ //
30
+
31
+ #ifdef DEFINE_GUID
32
+
33
+ //
34
+ // Make sure FAR is defined...
35
+ //
36
+ #ifndef FAR
37
+ #ifdef _WIN32
38
+ #define FAR
39
+ #else
40
+ #define FAR _far
41
+ #endif
42
+ #endif
43
+
44
+
45
+ //
46
+ // Define the GPT partition guids known by disk drivers and volume managers.
47
+ //
48
+
49
+ DEFINE_GUID(PARTITION_BASIC_DATA_GUID, 0xEBD0A0A2L, 0xB9E5, 0x4433, 0x87, 0xC0, 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7); // Basic data partition
50
+ DEFINE_GUID(PARTITION_BSP_GUID, 0x57434F53L, 0x4DF9, 0x45B9, 0x8E, 0x9E, 0x23, 0x70, 0xF0, 0x06, 0x45, 0x7C); // BSP partition
51
+ DEFINE_GUID(PARTITION_CLUSTER_GUID, 0xDB97DBA9L, 0x0840, 0x4BAE, 0x97, 0xF0, 0xFF, 0xB9, 0xA3, 0x27, 0xC7, 0xE1); // Cluster metadata partition
52
+ DEFINE_GUID(PARTITION_DPP_GUID, 0x57434F53L, 0x94CB, 0x43F0, 0xA5, 0x33, 0xD7, 0x3C, 0x10, 0xCF, 0xA5, 0x7D); // DPP partition
53
+ DEFINE_GUID(PARTITION_ENTRY_UNUSED_GUID, 0x00000000L, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); // Entry unused
54
+ DEFINE_GUID(PARTITION_LDM_DATA_GUID, 0xAF9B60A0L, 0x1431, 0x4F62, 0xBC, 0x68, 0x33, 0x11, 0x71, 0x4A, 0x69, 0xAD); // Logical Disk Manager data partition
55
+ DEFINE_GUID(PARTITION_LDM_METADATA_GUID, 0x5808C8AAL, 0x7E8F, 0x42E0, 0x85, 0xD2, 0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3); // Logical Disk Manager metadata partition
56
+ DEFINE_GUID(PARTITION_MAIN_OS_GUID, 0x57434F53L, 0x8F45, 0x405E, 0x8A, 0x23, 0x18, 0x6D, 0x8A, 0x43, 0x30, 0xD3); // Main OS partition
57
+ DEFINE_GUID(PARTITION_MSFT_RECOVERY_GUID, 0xDE94BBA4L, 0x06D1, 0x4D40, 0xA1, 0x6A, 0xBF, 0xD5, 0x01, 0x79, 0xD6, 0xAC); // Microsoft recovery partition
58
+ DEFINE_GUID(PARTITION_MSFT_RESERVED_GUID, 0xE3C9E316L, 0x0B5C, 0x4DB8, 0x81, 0x7D, 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE); // Microsoft reserved space
59
+ DEFINE_GUID(PARTITION_MSFT_SNAPSHOT_GUID, 0xCADDEBF1L, 0x4400, 0x4DE8, 0xB1, 0x03, 0x12, 0x11, 0x7D, 0xCF, 0x3C, 0xCF); // Microsoft shadow copy partition
60
+ DEFINE_GUID(PARTITION_OS_DATA_GUID, 0x57434F53L, 0x23F2, 0x44D5, 0xA8, 0x30, 0x67, 0xBB, 0xDA, 0xA6, 0x09, 0xF9); // OS data partition
61
+ DEFINE_GUID(PARTITION_PATCH_GUID, 0x8967A686L, 0x96AA, 0x6AA8, 0x95, 0x89, 0xA8, 0x42, 0x56, 0x54, 0x10, 0x90); // Patch partition
62
+ DEFINE_GUID(PARTITION_PRE_INSTALLED_GUID, 0x57434F53L, 0x7FE0, 0x4196, 0x9B, 0x42, 0x42, 0x7B, 0x51, 0x64, 0x34, 0x84); // PreInstalled partition
63
+ DEFINE_GUID(PARTITION_SBL_CACHE_SSD_GUID, 0xeeff8352L, 0xdd2a, 0x44db, 0xae, 0x83, 0xbe, 0xe1, 0xcf, 0x74, 0x81, 0xdc); // Storage Bus Layer Cache partition
64
+ DEFINE_GUID(PARTITION_SBL_CACHE_SSD_RESERVED_GUID, 0xdcc0c7c1L, 0x55ad, 0x4f17, 0x9d, 0x43, 0x4b, 0xc7, 0x76, 0xe0, 0x11, 0x7e); // Storage Bus Layer Cache partition
65
+ DEFINE_GUID(PARTITION_SBL_CACHE_HDD_GUID, 0x03aaa829L, 0xebfc, 0x4e7e, 0xaa, 0xc9, 0xc4, 0xd7, 0x6c, 0x63, 0xb2, 0x4b); // Storage Bus Layer Cache partition
66
+ DEFINE_GUID(PARTITION_SERVICING_FILES_GUID, 0x57434F53L, 0x432E, 0x4014, 0xAE, 0x4C, 0x8D, 0xEA, 0xA9, 0xC0, 0x00, 0x6A); // Servicing files partition
67
+ DEFINE_GUID(PARTITION_SERVICING_METADATA_GUID, 0x57434F53L, 0xC691, 0x4A05, 0xBB, 0x4E, 0x70, 0x3D, 0xAF, 0xD2, 0x29, 0xCE); // Servicing metadata partition
68
+ DEFINE_GUID(PARTITION_SERVICING_RESERVE_GUID, 0x57434F53L, 0x4B81, 0x460B, 0xA3, 0x19, 0xFF, 0xB6, 0xFE, 0x13, 0x6D, 0x14); // Servicing reserve partition
69
+ DEFINE_GUID(PARTITION_SERVICING_STAGING_ROOT_GUID, 0x57434F53L, 0xE84d, 0x4E84, 0xAA, 0xF3, 0xEC, 0xBB, 0xBD, 0x04, 0xB9, 0xDF); // Servicing staging root partition
70
+ DEFINE_GUID(PARTITION_SPACES_GUID, 0xE75CAF8FL, 0xF680, 0x4CEE, 0xAF, 0xA3, 0xB0, 0x01, 0xE5, 0x6E, 0xFC, 0x2D); // Storage Spaces protective partition
71
+ DEFINE_GUID(PARTITION_SPACES_DATA_GUID, 0xE7ADDCB4L, 0xDC34, 0x4539, 0x9A, 0x76, 0xEB, 0xBD, 0x07, 0xBE, 0x6F, 0x7E); // Storage Spaces protective partition
72
+ DEFINE_GUID(PARTITION_SYSTEM_GUID, 0xC12A7328L, 0xF81F, 0x11D2, 0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B); // EFI system partition
73
+ DEFINE_GUID(PARTITION_WINDOWS_SYSTEM_GUID, 0x57434F53L, 0xE3E3, 0x4631, 0xA5, 0xC5, 0x26, 0xD2, 0x24, 0x38, 0x73, 0xAA); // Windows system partition
74
+ #endif
75
+
76
+ #ifdef __cplusplus
77
+ #define IsEqualPartitionType IsEqualGUID
78
+ #else
79
+ #define IsEqualPartitionType(_a, _b) IsEqualGUID(&(_a), &(_b))
80
+ #endif
81
+
82
+ #define IsRecognizedGptPartition(_t) ( \
83
+ IsEqualPartitionType((_t), PARTITION_BSP_GUID) || \
84
+ IsEqualPartitionType((_t), PARTITION_DPP_GUID) || \
85
+ IsEqualPartitionType((_t), PARTITION_BASIC_DATA_GUID) || \
86
+ IsEqualPartitionType((_t), PARTITION_MAIN_OS_GUID) || \
87
+ IsEqualPartitionType((_t), PARTITION_MSFT_RECOVERY_GUID) || \
88
+ IsEqualPartitionType((_t), PARTITION_OS_DATA_GUID) || \
89
+ IsEqualPartitionType((_t), PARTITION_PRE_INSTALLED_GUID) || \
90
+ IsEqualPartitionType((_t), PARTITION_SERVICING_FILES_GUID) || \
91
+ IsEqualPartitionType((_t), PARTITION_SERVICING_METADATA_GUID) || \
92
+ IsEqualPartitionType((_t), PARTITION_SERVICING_RESERVE_GUID) || \
93
+ IsEqualPartitionType((_t), PARTITION_SERVICING_STAGING_ROOT_GUID) || \
94
+ IsEqualPartitionType((_t), PARTITION_WINDOWS_SYSTEM_GUID))
95
+
96
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
97
+ #pragma endregion
98
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dls1.h ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ /*==========================================================================;
4
+ //
5
+ // dls1.h
6
+ //
7
+ //
8
+ // Description:
9
+ //
10
+ // Interface defines and structures for the Instrument Collection Form
11
+ // RIFF DLS.
12
+ //
13
+ //
14
+ // Written by Sonic Foundry 1996. Released for public use.
15
+ //
16
+ //=========================================================================*/
17
+
18
+ //--------------------------------------------------------------------------
19
+ // The file dls1.h was reviewed by LCA in June 2011 and per license is
20
+ // acceptable for Microsoft use under Dealpoint ID 109444
21
+ //--------------------------------------------------------------------------
22
+
23
+ #ifndef _INC_DLS1
24
+ #define _INC_DLS1
25
+
26
+ #include <winapifamily.h>
27
+
28
+ #pragma region Desktop Family
29
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
30
+
31
+ /*//////////////////////////////////////////////////////////////////////////
32
+ //
33
+ //
34
+ // Layout of an instrument collection:
35
+ //
36
+ //
37
+ // RIFF [] 'DLS ' [dlid,colh,INSTLIST,WAVEPOOL,INFOLIST]
38
+ //
39
+ // INSTLIST
40
+ // LIST [] 'lins'
41
+ // LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
42
+ // LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
43
+ // LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
44
+ //
45
+ // RGNLIST
46
+ // LIST [] 'lrgn'
47
+ // LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
48
+ // LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
49
+ // LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
50
+ //
51
+ // ARTLIST
52
+ // LIST [] 'lart'
53
+ // 'art1' level 1 Articulation connection graph
54
+ // 'art2' level 2 Articulation connection graph
55
+ // '3rd1' Possible 3rd party articulation structure 1
56
+ // '3rd2' Possible 3rd party articulation structure 2 .... and so on
57
+ //
58
+ // WAVEPOOL
59
+ // ptbl [] [pool table]
60
+ // LIST [] 'wvpl'
61
+ // [path],
62
+ // [path],
63
+ // LIST [] 'wave' [dlid,RIFFWAVE]
64
+ // LIST [] 'wave' [dlid,RIFFWAVE]
65
+ // LIST [] 'wave' [dlid,RIFFWAVE]
66
+ // LIST [] 'wave' [dlid,RIFFWAVE]
67
+ // LIST [] 'wave' [dlid,RIFFWAVE]
68
+ //
69
+ // INFOLIST
70
+ // LIST [] 'INFO'
71
+ // 'icmt' 'Comment.'
72
+ // 'icop' 'Copyright (C) Someone'
73
+ //
74
+ /////////////////////////////////////////////////////////////////////////*/
75
+
76
+
77
+ /*/////////////////////////////////////////////////////////////////////////
78
+ // FOURCC's used in the DLS file
79
+ /////////////////////////////////////////////////////////////////////////*/
80
+
81
+ #define FOURCC_DLS mmioFOURCC('D','L','S',' ')
82
+ #define FOURCC_DLID mmioFOURCC('d','l','i','d')
83
+ #define FOURCC_COLH mmioFOURCC('c','o','l','h')
84
+ #define FOURCC_WVPL mmioFOURCC('w','v','p','l')
85
+ #define FOURCC_PTBL mmioFOURCC('p','t','b','l')
86
+ #define FOURCC_PATH mmioFOURCC('p','a','t','h')
87
+ #define FOURCC_wave mmioFOURCC('w','a','v','e')
88
+ #define FOURCC_LINS mmioFOURCC('l','i','n','s')
89
+ #define FOURCC_INS mmioFOURCC('i','n','s',' ')
90
+ #define FOURCC_INSH mmioFOURCC('i','n','s','h')
91
+ #define FOURCC_LRGN mmioFOURCC('l','r','g','n')
92
+ #define FOURCC_RGN mmioFOURCC('r','g','n',' ')
93
+ #define FOURCC_RGNH mmioFOURCC('r','g','n','h')
94
+ #define FOURCC_LART mmioFOURCC('l','a','r','t')
95
+ #define FOURCC_ART1 mmioFOURCC('a','r','t','1')
96
+ #define FOURCC_WLNK mmioFOURCC('w','l','n','k')
97
+ #define FOURCC_WSMP mmioFOURCC('w','s','m','p')
98
+ #define FOURCC_VERS mmioFOURCC('v','e','r','s')
99
+
100
+ /*/////////////////////////////////////////////////////////////////////////
101
+ // Articulation connection graph definitions
102
+ /////////////////////////////////////////////////////////////////////////*/
103
+
104
+ /* Generic Sources */
105
+ #define CONN_SRC_NONE 0x0000
106
+ #define CONN_SRC_LFO 0x0001
107
+ #define CONN_SRC_KEYONVELOCITY 0x0002
108
+ #define CONN_SRC_KEYNUMBER 0x0003
109
+ #define CONN_SRC_EG1 0x0004
110
+ #define CONN_SRC_EG2 0x0005
111
+ #define CONN_SRC_PITCHWHEEL 0x0006
112
+
113
+ /* Midi Controllers 0-127 */
114
+ #define CONN_SRC_CC1 0x0081
115
+ #define CONN_SRC_CC7 0x0087
116
+ #define CONN_SRC_CC10 0x008a
117
+ #define CONN_SRC_CC11 0x008b
118
+
119
+ /* Generic Destinations */
120
+ #define CONN_DST_NONE 0x0000
121
+ #define CONN_DST_ATTENUATION 0x0001
122
+ #define CONN_DST_PITCH 0x0003
123
+ #define CONN_DST_PAN 0x0004
124
+
125
+ /* LFO Destinations */
126
+ #define CONN_DST_LFO_FREQUENCY 0x0104
127
+ #define CONN_DST_LFO_STARTDELAY 0x0105
128
+
129
+ /* EG1 Destinations */
130
+ #define CONN_DST_EG1_ATTACKTIME 0x0206
131
+ #define CONN_DST_EG1_DECAYTIME 0x0207
132
+ #define CONN_DST_EG1_RELEASETIME 0x0209
133
+ #define CONN_DST_EG1_SUSTAINLEVEL 0x020a
134
+
135
+ /* EG2 Destinations */
136
+ #define CONN_DST_EG2_ATTACKTIME 0x030a
137
+ #define CONN_DST_EG2_DECAYTIME 0x030b
138
+ #define CONN_DST_EG2_RELEASETIME 0x030d
139
+ #define CONN_DST_EG2_SUSTAINLEVEL 0x030e
140
+
141
+ #define CONN_TRN_NONE 0x0000
142
+ #define CONN_TRN_CONCAVE 0x0001
143
+
144
+ typedef struct _DLSID {
145
+ ULONG ulData1;
146
+ USHORT usData2;
147
+ USHORT usData3;
148
+ BYTE abData4[8];
149
+ } DLSID, FAR *LPDLSID;
150
+
151
+ typedef struct _DLSVERSION {
152
+ DWORD dwVersionMS;
153
+ DWORD dwVersionLS;
154
+ }DLSVERSION, FAR *LPDLSVERSION;
155
+
156
+
157
+ typedef struct _CONNECTION {
158
+ USHORT usSource;
159
+ USHORT usControl;
160
+ USHORT usDestination;
161
+ USHORT usTransform;
162
+ LONG lScale;
163
+ }CONNECTION, FAR *LPCONNECTION;
164
+
165
+
166
+ /* Level 1 Articulation Data */
167
+
168
+ typedef struct _CONNECTIONLIST {
169
+ ULONG cbSize; /* size of the connection list structure */
170
+ ULONG cConnections; /* count of connections in the list */
171
+ } CONNECTIONLIST, FAR *LPCONNECTIONLIST;
172
+
173
+
174
+
175
+ /*/////////////////////////////////////////////////////////////////////////
176
+ // Generic type defines for regions and instruments
177
+ /////////////////////////////////////////////////////////////////////////*/
178
+
179
+ typedef struct _RGNRANGE {
180
+ USHORT usLow;
181
+ USHORT usHigh;
182
+ }RGNRANGE, FAR * LPRGNRANGE;
183
+
184
+ #define F_INSTRUMENT_DRUMS 0x80000000
185
+
186
+ typedef struct _MIDILOCALE {
187
+ ULONG ulBank;
188
+ ULONG ulInstrument;
189
+ }MIDILOCALE, FAR *LPMIDILOCALE;
190
+
191
+ /*/////////////////////////////////////////////////////////////////////////
192
+ // Header structures found in an DLS file for collection, instruments, and
193
+ // regions.
194
+ /////////////////////////////////////////////////////////////////////////*/
195
+
196
+ #define F_RGN_OPTION_SELFNONEXCLUSIVE 0x0001
197
+
198
+ typedef struct _RGNHEADER {
199
+ RGNRANGE RangeKey; /* Key range */
200
+ RGNRANGE RangeVelocity; /* Velocity Range */
201
+ USHORT fusOptions; /* Synthesis options for this range */
202
+ USHORT usKeyGroup; /* Key grouping for non simultaneous play */
203
+ /* 0 = no group, 1 up is group */
204
+ /* for Level 1 only groups 1-15 are allowed */
205
+ }RGNHEADER, FAR *LPRGNHEADER;
206
+
207
+ typedef struct _INSTHEADER {
208
+ ULONG cRegions; /* Count of regions in this instrument */
209
+ MIDILOCALE Locale; /* Intended MIDI locale of this instrument */
210
+ }INSTHEADER, FAR *LPINSTHEADER;
211
+
212
+ typedef struct _DLSHEADER {
213
+ ULONG cInstruments; /* Count of instruments in the collection */
214
+ }DLSHEADER, FAR *LPDLSHEADER;
215
+
216
+ /*////////////////////////////////////////////////////////////////////////////
217
+ // definitions for the Wave link structure
218
+ ////////////////////////////////////////////////////////////////////////////*/
219
+
220
+ /* **** For level 1 only WAVELINK_CHANNEL_MONO is valid **** */
221
+ /* ulChannel allows for up to 32 channels of audio with each bit position */
222
+ /* specifiying a channel of playback */
223
+
224
+ #define WAVELINK_CHANNEL_LEFT 0x0001l
225
+ #define WAVELINK_CHANNEL_RIGHT 0x0002l
226
+
227
+ #define F_WAVELINK_PHASE_MASTER 0x0001
228
+
229
+ typedef struct _WAVELINK { /* any paths or links are stored right after struct */
230
+ USHORT fusOptions; /* options flags for this wave */
231
+ USHORT usPhaseGroup; /* Phase grouping for locking channels */
232
+ ULONG ulChannel; /* channel placement */
233
+ ULONG ulTableIndex; /* index into the wave pool table, 0 based */
234
+ }WAVELINK, FAR *LPWAVELINK;
235
+
236
+ #define POOL_CUE_NULL 0xffffffffl
237
+
238
+ typedef struct _POOLCUE {
239
+ ULONG ulOffset; /* Offset to the entry in the list */
240
+ }POOLCUE, FAR *LPPOOLCUE;
241
+
242
+ typedef struct _POOLTABLE {
243
+ ULONG cbSize; /* size of the pool table structure */
244
+ ULONG cCues; /* count of cues in the list */
245
+ } POOLTABLE, FAR *LPPOOLTABLE;
246
+
247
+ /*////////////////////////////////////////////////////////////////////////////
248
+ // Structures for the "wsmp" chunk
249
+ ////////////////////////////////////////////////////////////////////////////*/
250
+
251
+ #define F_WSMP_NO_TRUNCATION 0x0001l
252
+ #define F_WSMP_NO_COMPRESSION 0x0002l
253
+
254
+
255
+ typedef struct _rwsmp {
256
+ ULONG cbSize;
257
+ USHORT usUnityNote; /* MIDI Unity Playback Note */
258
+ SHORT sFineTune; /* Fine Tune in log tuning */
259
+ LONG lAttenuation; /* Overall Attenuation to be applied to data */
260
+ ULONG fulOptions; /* Flag options */
261
+ ULONG cSampleLoops; /* Count of Sample loops, 0 loops is one shot */
262
+ } WSMPL, FAR *LPWSMPL;
263
+
264
+
265
+ /* This loop type is a normal forward playing loop which is continually */
266
+ /* played until the envelope reaches an off threshold in the release */
267
+ /* portion of the volume envelope */
268
+
269
+ #define WLOOP_TYPE_FORWARD 0
270
+
271
+ typedef struct _rloop {
272
+ ULONG cbSize;
273
+ ULONG ulType; /* Loop Type */
274
+ ULONG ulStart; /* Start of loop in samples */
275
+ ULONG ulLength; /* Length of loop in samples */
276
+ } WLOOP, FAR *LPWLOOP;
277
+
278
+
279
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
280
+ #pragma endregion
281
+
282
+ #endif /*_INC_DLS1 */
283
+
284
+
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dls2.h ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // Copyright (C) Microsoft. All rights reserved.
3
+ //
4
+ /*
5
+
6
+ dls2.h
7
+
8
+ Description:
9
+
10
+ Interface defines and structures for the DLS2 extensions of DLS.
11
+
12
+
13
+ Written by Microsoft 1998. Released for public use.
14
+
15
+ */
16
+
17
+ #ifndef _INC_DLS2
18
+ #define _INC_DLS2
19
+
20
+ #include <winapifamily.h>
21
+
22
+ #pragma region Desktop Family
23
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
24
+
25
+ /*
26
+ FOURCC's used in the DLS2 file, in addition to DLS1 chunks
27
+ */
28
+
29
+ #define FOURCC_RGN2 mmioFOURCC('r','g','n','2')
30
+ #define FOURCC_LAR2 mmioFOURCC('l','a','r','2')
31
+ #define FOURCC_ART2 mmioFOURCC('a','r','t','2')
32
+ #define FOURCC_CDL mmioFOURCC('c','d','l',' ')
33
+ #define FOURCC_DLID mmioFOURCC('d','l','i','d')
34
+
35
+ /*
36
+ Articulation connection graph definitions. These are in addition to
37
+ the definitions in the DLS1 header.
38
+ */
39
+
40
+ /* Generic Sources (in addition to DLS1 sources. */
41
+ #define CONN_SRC_POLYPRESSURE 0x0007 /* Polyphonic Pressure */
42
+ #define CONN_SRC_CHANNELPRESSURE 0x0008 /* Channel Pressure */
43
+ #define CONN_SRC_VIBRATO 0x0009 /* Vibrato LFO */
44
+ #define CONN_SRC_MONOPRESSURE 0x000a /* MIDI Mono pressure */
45
+
46
+
47
+ /* Midi Controllers */
48
+ #define CONN_SRC_CC91 0x00db /* Reverb Send */
49
+ #define CONN_SRC_CC93 0x00dd /* Chorus Send */
50
+
51
+
52
+ /* Generic Destinations */
53
+ #define CONN_DST_GAIN 0x0001 /* Same as CONN_DST_ ATTENUATION, but more appropriate terminology. */
54
+ #define CONN_DST_KEYNUMBER 0x0005 /* Key Number Generator */
55
+
56
+ /* Audio Channel Output Destinations */
57
+ #define CONN_DST_LEFT 0x0010 /* Left Channel Send */
58
+ #define CONN_DST_RIGHT 0x0011 /* Right Channel Send */
59
+ #define CONN_DST_CENTER 0x0012 /* Center Channel Send */
60
+ #define CONN_DST_LEFTREAR 0x0013 /* Left Rear Channel Send */
61
+ #define CONN_DST_RIGHTREAR 0x0014 /* Right Rear Channel Send */
62
+ #define CONN_DST_LFE_CHANNEL 0x0015 /* LFE Channel Send */
63
+ #define CONN_DST_CHORUS 0x0080 /* Chorus Send */
64
+ #define CONN_DST_REVERB 0x0081 /* Reverb Send */
65
+
66
+ /* Vibrato LFO Destinations */
67
+ #define CONN_DST_VIB_FREQUENCY 0x0114 /* Vibrato Frequency */
68
+ #define CONN_DST_VIB_STARTDELAY 0x0115 /* Vibrato Start Delay */
69
+
70
+ /* EG1 Destinations */
71
+ #define CONN_DST_EG1_DELAYTIME 0x020B /* EG1 Delay Time */
72
+ #define CONN_DST_EG1_HOLDTIME 0x020C /* EG1 Hold Time */
73
+ #if (NTDDI_VERSION >= NTDDI_WINXP) /* Windows XP or greater */
74
+ #define CONN_DST_EG1_SHUTDOWNTIME 0x020D /* EG1 Shutdown Time */
75
+ #endif
76
+
77
+ /* EG2 Destinations */
78
+ #define CONN_DST_EG2_DELAYTIME 0x030F /* EG2 Delay Time */
79
+ #define CONN_DST_EG2_HOLDTIME 0x0310 /* EG2 Hold Time */
80
+
81
+
82
+ /* Filter Destinations */
83
+ #define CONN_DST_FILTER_CUTOFF 0x0500 /* Filter Cutoff Frequency */
84
+ #define CONN_DST_FILTER_Q 0x0501 /* Filter Resonance */
85
+
86
+
87
+ /* Transforms */
88
+ #define CONN_TRN_CONVEX 0x0002 /* Convex Transform */
89
+ #define CONN_TRN_SWITCH 0x0003 /* Switch Transform */
90
+
91
+
92
+ /* Conditional chunk operators */
93
+ #define DLS_CDL_AND 0x0001 /* X = X & Y */
94
+ #define DLS_CDL_OR 0x0002 /* X = X | Y */
95
+ #define DLS_CDL_XOR 0x0003 /* X = X ^ Y */
96
+ #define DLS_CDL_ADD 0x0004 /* X = X + Y */
97
+ #define DLS_CDL_SUBTRACT 0x0005 /* X = X - Y */
98
+ #define DLS_CDL_MULTIPLY 0x0006 /* X = X * Y */
99
+ #define DLS_CDL_DIVIDE 0x0007 /* X = X / Y */
100
+ #define DLS_CDL_LOGICAL_AND 0x0008 /* X = X && Y */
101
+ #define DLS_CDL_LOGICAL_OR 0x0009 /* X = X || Y */
102
+ #define DLS_CDL_LT 0x000A /* X = (X < Y) */
103
+ #define DLS_CDL_LE 0x000B /* X = (X <= Y) */
104
+ #define DLS_CDL_GT 0x000C /* X = (X > Y) */
105
+ #define DLS_CDL_GE 0x000D /* X = (X >= Y) */
106
+ #define DLS_CDL_EQ 0x000E /* X = (X == Y) */
107
+ #define DLS_CDL_NOT 0x000F /* X = !X */
108
+ #define DLS_CDL_CONST 0x0010 /* 32-bit constant */
109
+ #define DLS_CDL_QUERY 0x0011 /* 32-bit value returned from query */
110
+ #define DLS_CDL_QUERYSUPPORTED 0x0012 /* Test to see if query is supported by synth */
111
+
112
+ /*
113
+ Loop and release
114
+ */
115
+
116
+ #if (NTDDI_VERSION < NTDDI_WINXP) /* Windows 2000 and SPs */
117
+ #define WLOOP_TYPE_RELEASE 2
118
+ #else
119
+ #define WLOOP_TYPE_RELEASE 1
120
+ #endif
121
+
122
+ /*
123
+ WaveLink chunk <wlnk-ck>
124
+ */
125
+
126
+ #if (NTDDI_VERSION >= NTDDI_WINXP) /* Windows XP or greater */
127
+ #define F_WAVELINK_MULTICHANNEL 0x0002
128
+ #endif
129
+
130
+ /*
131
+ WaveLink chunk <wlnk-ck>
132
+ */
133
+
134
+ #define F_WAVELINK_MULTICHANNEL 0x0002
135
+
136
+
137
+ /*
138
+ DLSID queries for <cdl-ck>
139
+ */
140
+
141
+ DEFINE_GUID(DLSID_GMInHardware, 0x178f2f24, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
142
+ DEFINE_GUID(DLSID_GSInHardware, 0x178f2f25, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
143
+ DEFINE_GUID(DLSID_XGInHardware, 0x178f2f26, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
144
+ DEFINE_GUID(DLSID_SupportsDLS1, 0x178f2f27, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
145
+ DEFINE_GUID(DLSID_SupportsDLS2, 0xf14599e5, 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
146
+ DEFINE_GUID(DLSID_SampleMemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
147
+ DEFINE_GUID(DLSID_ManufacturersID, 0xb03e1181, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
148
+ DEFINE_GUID(DLSID_ProductID, 0xb03e1182, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
149
+ DEFINE_GUID(DLSID_SamplePlaybackRate, 0x2a91f713, 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
150
+
151
+
152
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
153
+ #pragma endregion
154
+
155
+ #endif /* _INC_DLS2 */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dmdls.h ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /************************************************************************
2
+ * *
3
+ * dmdls.h -- DLS download definitions for DirectMusic API's *
4
+ * *
5
+ * Copyright (c) Microsoft Corporation. All rights reserved. *
6
+ * *
7
+ ************************************************************************/
8
+
9
+ #ifndef _DMDLS_
10
+ #define _DMDLS_
11
+ #include <winapifamily.h>
12
+
13
+ #pragma region Desktop Family
14
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
15
+
16
+
17
+ #include "dls1.h"
18
+
19
+ typedef long PCENT; /* Pitch cents */
20
+ typedef long GCENT; /* Gain cents */
21
+ typedef long TCENT; /* Time cents */
22
+ typedef long PERCENT; /* Per.. cent! */
23
+
24
+ typedef LONGLONG REFERENCE_TIME;
25
+ typedef REFERENCE_TIME *LPREFERENCE_TIME;
26
+ typedef long MUSIC_TIME;
27
+
28
+ #ifndef MAKEFOURCC
29
+ #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
30
+ ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
31
+ ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
32
+
33
+
34
+ typedef DWORD FOURCC; /* a four character code */
35
+ #endif
36
+
37
+ typedef struct _DMUS_DOWNLOADINFO
38
+ {
39
+ DWORD dwDLType; /* Instrument or Wave */
40
+ DWORD dwDLId; /* Unique identifier to tag this download. */
41
+ DWORD dwNumOffsetTableEntries; /* Number of index in the offset address table. */
42
+ DWORD cbSize; /* Total size of this memory chunk. */
43
+ } DMUS_DOWNLOADINFO;
44
+
45
+ #define DMUS_DOWNLOADINFO_INSTRUMENT 1
46
+ #define DMUS_DOWNLOADINFO_WAVE 2
47
+ #define DMUS_DOWNLOADINFO_INSTRUMENT2 3 /* New version for better DLS2 support. */
48
+
49
+ #if (NTDDI_VERSION >= NTDDI_WINXP) /* Windows XP or greater */
50
+
51
+ /* Support for oneshot and streaming wave data */
52
+ #define DMUS_DOWNLOADINFO_WAVEARTICULATION 4 /* Wave articulation data */
53
+ #define DMUS_DOWNLOADINFO_STREAMINGWAVE 5 /* One chunk of a streaming */
54
+ #define DMUS_DOWNLOADINFO_ONESHOTWAVE 6
55
+
56
+ #endif
57
+
58
+ #define DMUS_DEFAULT_SIZE_OFFSETTABLE 1
59
+
60
+ /* Flags for DMUS_INSTRUMENT's ulFlags member */
61
+
62
+ #define DMUS_INSTRUMENT_GM_INSTRUMENT (1 << 0)
63
+
64
+ typedef struct _DMUS_OFFSETTABLE
65
+ {
66
+ ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
67
+ } DMUS_OFFSETTABLE;
68
+
69
+ typedef struct _DMUS_INSTRUMENT
70
+ {
71
+ ULONG ulPatch;
72
+ ULONG ulFirstRegionIdx;
73
+ ULONG ulGlobalArtIdx; /* If zero the instrument does not have an articulation */
74
+ ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the instrument */
75
+ ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the instrument */
76
+ ULONG ulFlags;
77
+ } DMUS_INSTRUMENT;
78
+
79
+ typedef struct _DMUS_REGION
80
+ {
81
+ RGNRANGE RangeKey;
82
+ RGNRANGE RangeVelocity;
83
+ USHORT fusOptions;
84
+ USHORT usKeyGroup;
85
+ ULONG ulRegionArtIdx; /* If zero the region does not have an articulation */
86
+ ULONG ulNextRegionIdx; /* If zero no more regions */
87
+ ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the region */
88
+ WAVELINK WaveLink;
89
+ WSMPL WSMP; /* If WSMP.cSampleLoops > 1 then a WLOOP is included */
90
+ WLOOP WLOOP[1];
91
+ } DMUS_REGION;
92
+
93
+ typedef struct _DMUS_LFOPARAMS
94
+ {
95
+ PCENT pcFrequency;
96
+ TCENT tcDelay;
97
+ GCENT gcVolumeScale;
98
+ PCENT pcPitchScale;
99
+ GCENT gcMWToVolume;
100
+ PCENT pcMWToPitch;
101
+ } DMUS_LFOPARAMS;
102
+
103
+ typedef struct _DMUS_VEGPARAMS
104
+ {
105
+ TCENT tcAttack;
106
+ TCENT tcDecay;
107
+ PERCENT ptSustain;
108
+ TCENT tcRelease;
109
+ TCENT tcVel2Attack;
110
+ TCENT tcKey2Decay;
111
+ } DMUS_VEGPARAMS;
112
+
113
+ typedef struct _DMUS_PEGPARAMS
114
+ {
115
+ TCENT tcAttack;
116
+ TCENT tcDecay;
117
+ PERCENT ptSustain;
118
+ TCENT tcRelease;
119
+ TCENT tcVel2Attack;
120
+ TCENT tcKey2Decay;
121
+ PCENT pcRange;
122
+ } DMUS_PEGPARAMS;
123
+
124
+ typedef struct _DMUS_MSCPARAMS
125
+ {
126
+ PERCENT ptDefaultPan;
127
+ } DMUS_MSCPARAMS;
128
+
129
+ typedef struct _DMUS_ARTICPARAMS
130
+ {
131
+ DMUS_LFOPARAMS LFO;
132
+ DMUS_VEGPARAMS VolEG;
133
+ DMUS_PEGPARAMS PitchEG;
134
+ DMUS_MSCPARAMS Misc;
135
+ } DMUS_ARTICPARAMS;
136
+
137
+ typedef struct _DMUS_ARTICULATION /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT format. */
138
+ {
139
+ ULONG ulArt1Idx; /* DLS Level 1 articulation chunk */
140
+ ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
141
+ } DMUS_ARTICULATION;
142
+
143
+ typedef struct _DMUS_ARTICULATION2 /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT2 format. */
144
+ {
145
+ ULONG ulArtIdx; /* DLS Level 1/2 articulation chunk */
146
+ ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
147
+ ULONG ulNextArtIdx; /* Additional articulation chunks */
148
+ } DMUS_ARTICULATION2;
149
+
150
+ #define DMUS_MIN_DATA_SIZE 4
151
+ /* The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK */
152
+
153
+ typedef struct _DMUS_EXTENSIONCHUNK
154
+ {
155
+ ULONG cbSize; /* Size of extension chunk */
156
+ ULONG ulNextExtCkIdx; /* If zero no more 3rd party entenstion chunks */
157
+ FOURCC ExtCkID;
158
+ BYTE byExtCk[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
159
+ } DMUS_EXTENSIONCHUNK;
160
+
161
+ /* The actual number is determined by cbSize of struct _DMUS_COPYRIGHT */
162
+
163
+ typedef struct _DMUS_COPYRIGHT
164
+ {
165
+ ULONG cbSize; /* Size of copyright information */
166
+ BYTE byCopyright[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
167
+ } DMUS_COPYRIGHT;
168
+
169
+ typedef struct _DMUS_WAVEDATA
170
+ {
171
+ ULONG cbSize;
172
+ BYTE byData[DMUS_MIN_DATA_SIZE];
173
+ } DMUS_WAVEDATA;
174
+
175
+ typedef struct _DMUS_WAVE
176
+ {
177
+ ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the wave */
178
+ ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the wave */
179
+ ULONG ulWaveDataIdx; /* Location of actual wave data. */
180
+ WAVEFORMATEX WaveformatEx;
181
+ } DMUS_WAVE;
182
+
183
+ typedef struct _DMUS_NOTERANGE *LPDMUS_NOTERANGE;
184
+ typedef struct _DMUS_NOTERANGE
185
+ {
186
+ DWORD dwLowNote; /* Sets the low note for the range of MIDI note events to which the instrument responds.*/
187
+ DWORD dwHighNote; /* Sets the high note for the range of MIDI note events to which the instrument responds.*/
188
+ } DMUS_NOTERANGE;
189
+
190
+ #if (NTDDI_VERSION >= NTDDI_WINXP) /* Windows XP or greater */
191
+
192
+ typedef struct _DMUS_WAVEARTDL
193
+ {
194
+ ULONG ulDownloadIdIdx; /* Download ID's of each buffer */
195
+ ULONG ulBus; /* Playback bus */
196
+ ULONG ulBuffers; /* Buffers */
197
+ ULONG ulMasterDLId; /* Download ID of master voice of subordinate group */
198
+ USHORT usOptions; /* Same as DLS2 region options */
199
+ } DMUS_WAVEARTDL,
200
+ *LPDMUS_WAVEARTDL;
201
+
202
+ typedef struct _DMUS_WAVEDL
203
+ {
204
+ ULONG cbWaveData; /* Bytes of wave data */
205
+ } DMUS_WAVEDL,
206
+ *LPDMUS_WAVEDL;
207
+
208
+ #endif /* NTDDI_VERSION >= NTDDI_WINXP */
209
+
210
+
211
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
212
+ #pragma endregion
213
+
214
+ #endif /* _DMDLS_ */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dmerror.h ADDED
@@ -0,0 +1,864 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /************************************************************************
2
+ * *
3
+ * dmerror.h -- Error codes returned by DirectMusic API's *
4
+ * *
5
+ * Copyright (c) Microsoft Corporation. All rights reserved. *
6
+ * *
7
+ ************************************************************************/
8
+
9
+ #ifndef _DMERROR_
10
+ #define _DMERROR_
11
+ #include <winapifamily.h>
12
+
13
+ #pragma region Desktop Family
14
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
15
+
16
+
17
+ #define DMUS_ERRBASE 0x1000 /* Make error codes human readable in hex */
18
+
19
+ #ifndef MAKE_HRESULT
20
+ #define MAKE_HRESULT(sev,fac,code) \
21
+ ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
22
+ #endif
23
+
24
+ #define MAKE_DMHRESULTSUCCESS(code) MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
25
+ #define MAKE_DMHRESULTERROR(code) MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
26
+
27
+ /* DMUS_S_PARTIALLOAD
28
+ *
29
+ * The object could only load partially. This can happen if some components are
30
+ * not registered properly, such as embedded tracks and tools. This can also happen
31
+ * if some content is missing. For example, if a segment uses a DLS collection that
32
+ * is not in the loader's current search directory.
33
+ */
34
+ #define DMUS_S_PARTIALLOAD MAKE_DMHRESULTSUCCESS(0x091)
35
+
36
+ /* DMUS_S_PARTIALDOWNLOAD
37
+ *
38
+ * Return value from IDirectMusicBand::Download() which indicates that
39
+ * some of the instruments safely downloaded, but others failed. This usually
40
+ * occurs when some instruments are on PChannels not supported by the performance
41
+ * or port.
42
+ */
43
+ #define DMUS_S_PARTIALDOWNLOAD MAKE_DMHRESULTSUCCESS(0x092)
44
+
45
+ /* DMUS_S_REQUEUE
46
+ *
47
+ * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
48
+ * performance that it should cue the PMsg again automatically.
49
+ */
50
+ #define DMUS_S_REQUEUE MAKE_DMHRESULTSUCCESS(0x200)
51
+
52
+ /* DMUS_S_FREE
53
+ *
54
+ * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
55
+ * performance that it should free the PMsg automatically.
56
+ */
57
+ #define DMUS_S_FREE MAKE_DMHRESULTSUCCESS(0x201)
58
+
59
+ /* DMUS_S_END
60
+ *
61
+ * Return value from IDirectMusicTrack::Play() which indicates to the
62
+ * segment that the track has no more data after mtEnd.
63
+ */
64
+ #define DMUS_S_END MAKE_DMHRESULTSUCCESS(0x202)
65
+
66
+ /* DMUS_S_STRING_TRUNCATED
67
+ *
68
+ * Returned string has been truncated to fit the buffer size.
69
+ */
70
+ #define DMUS_S_STRING_TRUNCATED MAKE_DMHRESULTSUCCESS(0x210)
71
+
72
+ /* DMUS_S_LAST_TOOL
73
+ *
74
+ * Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
75
+ * is already stamped with the last tool in the graph. The returned PMsg's
76
+ * tool pointer is now NULL.
77
+ */
78
+ #define DMUS_S_LAST_TOOL MAKE_DMHRESULTSUCCESS(0x211)
79
+
80
+ /* DMUS_S_OVER_CHORD
81
+ *
82
+ * Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates
83
+ * that no note has been calculated because the music value has the note
84
+ * at a position higher than the top note of the chord. This applies only
85
+ * to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
86
+ * that the caller should not do anything with the note. It is not meant
87
+ * to be played against this chord.
88
+ */
89
+ #define DMUS_S_OVER_CHORD MAKE_DMHRESULTSUCCESS(0x212)
90
+
91
+ /* DMUS_S_UP_OCTAVE
92
+ *
93
+ * Returned from IDirectMusicPerformance::MIDIToMusic(), and
94
+ * IDirectMusicPerformance::MusicToMIDI(), this indicates
95
+ * that the note conversion generated a note value that is below 0,
96
+ * so it has been bumped up one or more octaves to be in the proper
97
+ * MIDI range of 0 through 127.
98
+ * Note that this is valid for MIDIToMusic() when using play modes
99
+ * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
100
+ * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
101
+ * valid for all play modes.
102
+ * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
103
+ */
104
+ #define DMUS_S_UP_OCTAVE MAKE_DMHRESULTSUCCESS(0x213)
105
+
106
+ /* DMUS_S_DOWN_OCTAVE
107
+ *
108
+ * Returned from IDirectMusicPerformance::MIDIToMusic(), and
109
+ * IDirectMusicPerformance::MusicToMIDI(), this indicates
110
+ * that the note conversion generated a note value that is above 127,
111
+ * so it has been bumped down one or more octaves to be in the proper
112
+ * MIDI range of 0 through 127.
113
+ * Note that this is valid for MIDIToMusic() when using play modes
114
+ * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
115
+ * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
116
+ * valid for all play modes.
117
+ * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
118
+ */
119
+ #define DMUS_S_DOWN_OCTAVE MAKE_DMHRESULTSUCCESS(0x214)
120
+
121
+ /* DMUS_S_NOBUFFERCONTROL
122
+ *
123
+ * Although the audio output from the port will be routed to the
124
+ * same device as the given DirectSound buffer, buffer controls
125
+ * such as pan and volume will not affect the output.
126
+ *
127
+ */
128
+ #define DMUS_S_NOBUFFERCONTROL MAKE_DMHRESULTSUCCESS(0x215)
129
+
130
+ #if (NTDDI_VERSION >= NTDDI_WINXP) /* Windows XP or greater */
131
+
132
+ /* DMUS_S_GARBAGE_COLLECTED
133
+ *
134
+ * The requested operation was not performed because during CollectGarbage
135
+ * the loader determined that the object had been released.
136
+ */
137
+ #define DMUS_S_GARBAGE_COLLECTED MAKE_DMHRESULTSUCCESS(0x216)
138
+
139
+ #endif
140
+
141
+ /* DMUS_E_DRIVER_FAILED
142
+ *
143
+ * An unexpected error was returned from a device driver, indicating
144
+ * possible failure of the driver or hardware.
145
+ */
146
+ #define DMUS_E_DRIVER_FAILED MAKE_DMHRESULTERROR(0x0101)
147
+
148
+ /* DMUS_E_PORTS_OPEN
149
+ *
150
+ * The requested operation cannot be performed while there are
151
+ * instantiated ports in any process in the system.
152
+ */
153
+ #define DMUS_E_PORTS_OPEN MAKE_DMHRESULTERROR(0x0102)
154
+
155
+ /* DMUS_E_DEVICE_IN_USE
156
+ *
157
+ * The requested device is already in use (possibly by a non-DirectMusic
158
+ * client) and cannot be opened again.
159
+ */
160
+ #define DMUS_E_DEVICE_IN_USE MAKE_DMHRESULTERROR(0x0103)
161
+
162
+ /* DMUS_E_INSUFFICIENTBUFFER
163
+ *
164
+ * Buffer is not large enough for requested operation.
165
+ */
166
+ #define DMUS_E_INSUFFICIENTBUFFER MAKE_DMHRESULTERROR(0x0104)
167
+
168
+ /* DMUS_E_BUFFERNOTSET
169
+ *
170
+ * No buffer was prepared for the download data.
171
+ */
172
+ #define DMUS_E_BUFFERNOTSET MAKE_DMHRESULTERROR(0x0105)
173
+
174
+ /* DMUS_E_BUFFERNOTAVAILABLE
175
+ *
176
+ * Download failed due to inability to access or create download buffer.
177
+ */
178
+ #define DMUS_E_BUFFERNOTAVAILABLE MAKE_DMHRESULTERROR(0x0106)
179
+
180
+ /* DMUS_E_NOTADLSCOL
181
+ *
182
+ * Error parsing DLS collection. File is corrupt.
183
+ */
184
+ #define DMUS_E_NOTADLSCOL MAKE_DMHRESULTERROR(0x0108)
185
+
186
+ /* DMUS_E_INVALIDOFFSET
187
+ *
188
+ * Wave chunks in DLS collection file are at incorrect offsets.
189
+ */
190
+ #define DMUS_E_INVALIDOFFSET MAKE_DMHRESULTERROR(0x0109)
191
+
192
+ /* DMUS_E_ALREADY_LOADED
193
+ *
194
+ * Second attempt to load a DLS collection that is currently open.
195
+ */
196
+ #define DMUS_E_ALREADY_LOADED MAKE_DMHRESULTERROR(0x0111)
197
+
198
+ /* DMUS_E_INVALIDPOS
199
+ *
200
+ * Error reading wave data from DLS collection. Indicates bad file.
201
+ */
202
+ #define DMUS_E_INVALIDPOS MAKE_DMHRESULTERROR(0x0113)
203
+
204
+ /* DMUS_E_INVALIDPATCH
205
+ *
206
+ * There is no instrument in the collection that matches patch number.
207
+ */
208
+ #define DMUS_E_INVALIDPATCH MAKE_DMHRESULTERROR(0x0114)
209
+
210
+ /* DMUS_E_CANNOTSEEK
211
+ *
212
+ * The IStream* doesn't support Seek().
213
+ */
214
+ #define DMUS_E_CANNOTSEEK MAKE_DMHRESULTERROR(0x0115)
215
+
216
+ /* DMUS_E_CANNOTWRITE
217
+ *
218
+ * The IStream* doesn't support Write().
219
+ */
220
+ #define DMUS_E_CANNOTWRITE MAKE_DMHRESULTERROR(0x0116)
221
+
222
+ /* DMUS_E_CHUNKNOTFOUND
223
+ *
224
+ * The RIFF parser doesn't contain a required chunk while parsing file.
225
+ */
226
+ #define DMUS_E_CHUNKNOTFOUND MAKE_DMHRESULTERROR(0x0117)
227
+
228
+ /* DMUS_E_INVALID_DOWNLOADID
229
+ *
230
+ * Invalid download id was used in the process of creating a download buffer.
231
+ */
232
+ #define DMUS_E_INVALID_DOWNLOADID MAKE_DMHRESULTERROR(0x0119)
233
+
234
+ /* DMUS_E_NOT_DOWNLOADED_TO_PORT
235
+ *
236
+ * Tried to unload an object that was not downloaded or previously unloaded.
237
+ */
238
+ #define DMUS_E_NOT_DOWNLOADED_TO_PORT MAKE_DMHRESULTERROR(0x0120)
239
+
240
+ /* DMUS_E_ALREADY_DOWNLOADED
241
+ *
242
+ * Buffer was already downloaded to synth.
243
+ */
244
+ #define DMUS_E_ALREADY_DOWNLOADED MAKE_DMHRESULTERROR(0x0121)
245
+
246
+ /* DMUS_E_UNKNOWN_PROPERTY
247
+ *
248
+ * The specified property item was not recognized by the target object.
249
+ */
250
+ #define DMUS_E_UNKNOWN_PROPERTY MAKE_DMHRESULTERROR(0x0122)
251
+
252
+ /* DMUS_E_SET_UNSUPPORTED
253
+ *
254
+ * The specified property item may not be set on the target object.
255
+ */
256
+ #define DMUS_E_SET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0123)
257
+
258
+ /* DMUS_E_GET_UNSUPPORTED
259
+ *
260
+ * The specified property item may not be retrieved from the target object.
261
+ */
262
+ #define DMUS_E_GET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0124)
263
+
264
+ /* DMUS_E_NOTMONO
265
+ *
266
+ * Wave chunk has more than one interleaved channel. DLS format requires MONO.
267
+ */
268
+ #define DMUS_E_NOTMONO MAKE_DMHRESULTERROR(0x0125)
269
+
270
+ /* DMUS_E_BADARTICULATION
271
+ *
272
+ * Invalid articulation chunk in DLS collection.
273
+ */
274
+ #define DMUS_E_BADARTICULATION MAKE_DMHRESULTERROR(0x0126)
275
+
276
+ /* DMUS_E_BADINSTRUMENT
277
+ *
278
+ * Invalid instrument chunk in DLS collection.
279
+ */
280
+ #define DMUS_E_BADINSTRUMENT MAKE_DMHRESULTERROR(0x0127)
281
+
282
+ /* DMUS_E_BADWAVELINK
283
+ *
284
+ * Wavelink chunk in DLS collection points to invalid wave.
285
+ */
286
+ #define DMUS_E_BADWAVELINK MAKE_DMHRESULTERROR(0x0128)
287
+
288
+ /* DMUS_E_NOARTICULATION
289
+ *
290
+ * Articulation missing from instrument in DLS collection.
291
+ */
292
+ #define DMUS_E_NOARTICULATION MAKE_DMHRESULTERROR(0x0129)
293
+
294
+ /* DMUS_E_NOTPCM
295
+ *
296
+ * Downoaded DLS wave is not in PCM format.
297
+ */
298
+ #define DMUS_E_NOTPCM MAKE_DMHRESULTERROR(0x012A)
299
+
300
+ /* DMUS_E_BADWAVE
301
+ *
302
+ * Bad wave chunk in DLS collection
303
+ */
304
+ #define DMUS_E_BADWAVE MAKE_DMHRESULTERROR(0x012B)
305
+
306
+ /* DMUS_E_BADOFFSETTABLE
307
+ *
308
+ * Offset Table for download buffer has errors.
309
+ */
310
+ #define DMUS_E_BADOFFSETTABLE MAKE_DMHRESULTERROR(0x012C)
311
+
312
+ /* DMUS_E_UNKNOWNDOWNLOAD
313
+ *
314
+ * Attempted to download unknown data type.
315
+ */
316
+ #define DMUS_E_UNKNOWNDOWNLOAD MAKE_DMHRESULTERROR(0x012D)
317
+
318
+ /* DMUS_E_NOSYNTHSINK
319
+ *
320
+ * The operation could not be completed because no sink was connected to
321
+ * the synthesizer.
322
+ */
323
+ #define DMUS_E_NOSYNTHSINK MAKE_DMHRESULTERROR(0x012E)
324
+
325
+ /* DMUS_E_ALREADYOPEN
326
+ *
327
+ * An attempt was made to open the software synthesizer while it was already
328
+ * open.
329
+ * ASSERT?
330
+ */
331
+ #define DMUS_E_ALREADYOPEN MAKE_DMHRESULTERROR(0x012F)
332
+
333
+ /* DMUS_E_ALREADYCLOSE
334
+ *
335
+ * An attempt was made to close the software synthesizer while it was already
336
+ * open.
337
+ * ASSERT?
338
+ */
339
+ #define DMUS_E_ALREADYCLOSED MAKE_DMHRESULTERROR(0x0130)
340
+
341
+ /* DMUS_E_SYNTHNOTCONFIGURED
342
+ *
343
+ * The operation could not be completed because the software synth has not
344
+ * yet been fully configured.
345
+ * ASSERT?
346
+ */
347
+ #define DMUS_E_SYNTHNOTCONFIGURED MAKE_DMHRESULTERROR(0x0131)
348
+
349
+ /* DMUS_E_SYNTHACTIVE
350
+ *
351
+ * The operation cannot be carried out while the synthesizer is active.
352
+ */
353
+ #define DMUS_E_SYNTHACTIVE MAKE_DMHRESULTERROR(0x0132)
354
+
355
+ /* DMUS_E_CANNOTREAD
356
+ *
357
+ * An error occurred while attempting to read from the IStream* object.
358
+ */
359
+ #define DMUS_E_CANNOTREAD MAKE_DMHRESULTERROR(0x0133)
360
+
361
+ /* DMUS_E_DMUSIC_RELEASED
362
+ *
363
+ * The operation cannot be performed because the final instance of the
364
+ * DirectMusic object was released. Ports cannot be used after final
365
+ * release of the DirectMusic object.
366
+ */
367
+ #define DMUS_E_DMUSIC_RELEASED MAKE_DMHRESULTERROR(0x0134)
368
+
369
+ /* DMUS_E_BUFFER_EMPTY
370
+ *
371
+ * There was no data in the referenced buffer.
372
+ */
373
+ #define DMUS_E_BUFFER_EMPTY MAKE_DMHRESULTERROR(0x0135)
374
+
375
+ /* DMUS_E_BUFFER_FULL
376
+ *
377
+ * There is insufficient space to insert the given event into the buffer.
378
+ */
379
+ #define DMUS_E_BUFFER_FULL MAKE_DMHRESULTERROR(0x0136)
380
+
381
+ /* DMUS_E_PORT_NOT_CAPTURE
382
+ *
383
+ * The given operation could not be carried out because the port is a
384
+ * capture port.
385
+ */
386
+ #define DMUS_E_PORT_NOT_CAPTURE MAKE_DMHRESULTERROR(0x0137)
387
+
388
+ /* DMUS_E_PORT_NOT_RENDER
389
+ *
390
+ * The given operation could not be carried out because the port is a
391
+ * render port.
392
+ */
393
+ #define DMUS_E_PORT_NOT_RENDER MAKE_DMHRESULTERROR(0x0138)
394
+
395
+ /* DMUS_E_DSOUND_NOT_SET
396
+ *
397
+ * The port could not be created because no DirectSound has been specified.
398
+ * Specify a DirectSound interface via the IDirectMusic::SetDirectSound
399
+ * method; pass NULL to have DirectMusic manage usage of DirectSound.
400
+ */
401
+ #define DMUS_E_DSOUND_NOT_SET MAKE_DMHRESULTERROR(0x0139)
402
+
403
+ /* DMUS_E_ALREADY_ACTIVATED
404
+ *
405
+ * The operation cannot be carried out while the port is active.
406
+ */
407
+ #define DMUS_E_ALREADY_ACTIVATED MAKE_DMHRESULTERROR(0x013A)
408
+
409
+ /* DMUS_E_INVALIDBUFFER
410
+ *
411
+ * Invalid DirectSound buffer was handed to port.
412
+ */
413
+ #define DMUS_E_INVALIDBUFFER MAKE_DMHRESULTERROR(0x013B)
414
+
415
+ /* DMUS_E_WAVEFORMATNOTSUPPORTED
416
+ *
417
+ * Invalid buffer format was handed to the synth sink.
418
+ */
419
+ #define DMUS_E_WAVEFORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x013C)
420
+
421
+ /* DMUS_E_SYNTHINACTIVE
422
+ *
423
+ * The operation cannot be carried out while the synthesizer is inactive.
424
+ */
425
+ #define DMUS_E_SYNTHINACTIVE MAKE_DMHRESULTERROR(0x013D)
426
+
427
+ /* DMUS_E_DSOUND_ALREADY_SET
428
+ *
429
+ * IDirectMusic::SetDirectSound has already been called. It may not be
430
+ * changed while in use.
431
+ */
432
+ #define DMUS_E_DSOUND_ALREADY_SET MAKE_DMHRESULTERROR(0x013E)
433
+
434
+ /* DMUS_E_INVALID_EVENT
435
+ *
436
+ * The given event is invalid (either it is not a valid MIDI message
437
+ * or it makes use of running status). The event cannot be packed
438
+ * into the buffer.
439
+ */
440
+ #define DMUS_E_INVALID_EVENT MAKE_DMHRESULTERROR(0x013F)
441
+
442
+ /* DMUS_E_UNSUPPORTED_STREAM
443
+ *
444
+ * The IStream* object does not contain data supported by the loading object.
445
+ */
446
+ #define DMUS_E_UNSUPPORTED_STREAM MAKE_DMHRESULTERROR(0x0150)
447
+
448
+ /* DMUS_E_ALREADY_INITED
449
+ *
450
+ * The object has already been initialized.
451
+ */
452
+ #define DMUS_E_ALREADY_INITED MAKE_DMHRESULTERROR(0x0151)
453
+
454
+ /* DMUS_E_INVALID_BAND
455
+ *
456
+ * The file does not contain a valid band.
457
+ */
458
+ #define DMUS_E_INVALID_BAND MAKE_DMHRESULTERROR(0x0152)
459
+
460
+ /* DMUS_E_TRACK_HDR_NOT_FIRST_CK
461
+ *
462
+ * The IStream* object's data does not have a track header as the first chunk,
463
+ * and therefore can not be read by the segment object.
464
+ */
465
+ #define DMUS_E_TRACK_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0155)
466
+
467
+ /* DMUS_E_TOOL_HDR_NOT_FIRST_CK
468
+ *
469
+ * The IStream* object's data does not have a tool header as the first chunk,
470
+ * and therefore can not be read by the graph object.
471
+ */
472
+ #define DMUS_E_TOOL_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0156)
473
+
474
+ /* DMUS_E_INVALID_TRACK_HDR
475
+ *
476
+ * The IStream* object's data contains an invalid track header (ckid is 0 and
477
+ * fccType is NULL,) and therefore can not be read by the segment object.
478
+ */
479
+ #define DMUS_E_INVALID_TRACK_HDR MAKE_DMHRESULTERROR(0x0157)
480
+
481
+ /* DMUS_E_INVALID_TOOL_HDR
482
+ *
483
+ * The IStream* object's data contains an invalid tool header (ckid is 0 and
484
+ * fccType is NULL,) and therefore can not be read by the graph object.
485
+ */
486
+ #define DMUS_E_INVALID_TOOL_HDR MAKE_DMHRESULTERROR(0x0158)
487
+
488
+ /* DMUS_E_ALL_TOOLS_FAILED
489
+ *
490
+ * The graph object was unable to load all tools from the IStream* object data.
491
+ * This may be due to errors in the stream, or the tools being incorrectly
492
+ * registered on the client.
493
+ */
494
+ #define DMUS_E_ALL_TOOLS_FAILED MAKE_DMHRESULTERROR(0x0159)
495
+
496
+ /* DMUS_E_ALL_TRACKS_FAILED
497
+ *
498
+ * The segment object was unable to load all tracks from the IStream* object data.
499
+ * This may be due to errors in the stream, or the tracks being incorrectly
500
+ * registered on the client.
501
+ */
502
+ #define DMUS_E_ALL_TRACKS_FAILED MAKE_DMHRESULTERROR(0x0160)
503
+
504
+ /* DMUS_E_NOT_FOUND
505
+ *
506
+ * The requested item was not contained by the object.
507
+ */
508
+ #define DMUS_E_NOT_FOUND MAKE_DMHRESULTERROR(0x0161)
509
+
510
+ /* DMUS_E_NOT_INIT
511
+ *
512
+ * A required object is not initialized or failed to initialize.
513
+ */
514
+ #define DMUS_E_NOT_INIT MAKE_DMHRESULTERROR(0x0162)
515
+
516
+ /* DMUS_E_TYPE_DISABLED
517
+ *
518
+ * The requested parameter type is currently disabled. Parameter types may
519
+ * be enabled and disabled by certain calls to SetParam().
520
+ */
521
+ #define DMUS_E_TYPE_DISABLED MAKE_DMHRESULTERROR(0x0163)
522
+
523
+ /* DMUS_E_TYPE_UNSUPPORTED
524
+ *
525
+ * The requested parameter type is not supported on the object.
526
+ */
527
+ #define DMUS_E_TYPE_UNSUPPORTED MAKE_DMHRESULTERROR(0x0164)
528
+
529
+ /* DMUS_E_TIME_PAST
530
+ *
531
+ * The time is in the past, and the operation can not succeed.
532
+ */
533
+ #define DMUS_E_TIME_PAST MAKE_DMHRESULTERROR(0x0165)
534
+
535
+ /* DMUS_E_TRACK_NOT_FOUND
536
+ *
537
+ * The requested track is not contained by the segment.
538
+ */
539
+ #define DMUS_E_TRACK_NOT_FOUND MAKE_DMHRESULTERROR(0x0166)
540
+
541
+ #if (NTDDI_VERSION >= NTDDI_WINXP) /* Windows XP or greater */
542
+
543
+ /* DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT
544
+ *
545
+ * The track does not support clock time playback or getparam.
546
+ */
547
+ #define DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT MAKE_DMHRESULTERROR(0x0167)
548
+
549
+ #endif
550
+
551
+ /* DMUS_E_NO_MASTER_CLOCK
552
+ *
553
+ * There is no master clock in the performance. Be sure to call
554
+ * IDirectMusicPerformance::Init().
555
+ */
556
+ #define DMUS_E_NO_MASTER_CLOCK MAKE_DMHRESULTERROR(0x0170)
557
+
558
+ /* DMUS_E_LOADER_NOCLASSID
559
+ *
560
+ * The class id field is required and missing in the DMUS_OBJECTDESC.
561
+ */
562
+ #define DMUS_E_LOADER_NOCLASSID MAKE_DMHRESULTERROR(0x0180)
563
+
564
+ /* DMUS_E_LOADER_BADPATH
565
+ *
566
+ * The requested file path is invalid.
567
+ */
568
+ #define DMUS_E_LOADER_BADPATH MAKE_DMHRESULTERROR(0x0181)
569
+
570
+ /* DMUS_E_LOADER_FAILEDOPEN
571
+ *
572
+ * File open failed - either file doesn't exist or is locked.
573
+ */
574
+ #define DMUS_E_LOADER_FAILEDOPEN MAKE_DMHRESULTERROR(0x0182)
575
+
576
+ /* DMUS_E_LOADER_FORMATNOTSUPPORTED
577
+ *
578
+ * Search data type is not supported.
579
+ */
580
+ #define DMUS_E_LOADER_FORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x0183)
581
+
582
+ /* DMUS_E_LOADER_FAILEDCREATE
583
+ *
584
+ * Unable to find or create object.
585
+ */
586
+ #define DMUS_E_LOADER_FAILEDCREATE MAKE_DMHRESULTERROR(0x0184)
587
+
588
+ /* DMUS_E_LOADER_OBJECTNOTFOUND
589
+ *
590
+ * Object was not found.
591
+ */
592
+ #define DMUS_E_LOADER_OBJECTNOTFOUND MAKE_DMHRESULTERROR(0x0185)
593
+
594
+ /* DMUS_E_LOADER_NOFILENAME
595
+ *
596
+ * The file name is missing from the DMUS_OBJECTDESC.
597
+ */
598
+ #define DMUS_E_LOADER_NOFILENAME MAKE_DMHRESULTERROR(0x0186)
599
+
600
+ /* DMUS_E_INVALIDFILE
601
+ *
602
+ * The file requested is not a valid file.
603
+ */
604
+ #define DMUS_E_INVALIDFILE MAKE_DMHRESULTERROR(0x0200)
605
+
606
+ /* DMUS_E_ALREADY_EXISTS
607
+ *
608
+ * The tool is already contained in the graph. Create a new instance.
609
+ */
610
+ #define DMUS_E_ALREADY_EXISTS MAKE_DMHRESULTERROR(0x0201)
611
+
612
+ /* DMUS_E_OUT_OF_RANGE
613
+ *
614
+ * Value is out of range, for instance the requested length is longer than
615
+ * the segment.
616
+ */
617
+ #define DMUS_E_OUT_OF_RANGE MAKE_DMHRESULTERROR(0x0202)
618
+
619
+ /* DMUS_E_SEGMENT_INIT_FAILED
620
+ *
621
+ * Segment initialization failed, most likely due to a critical memory situation.
622
+ */
623
+ #define DMUS_E_SEGMENT_INIT_FAILED MAKE_DMHRESULTERROR(0x0203)
624
+
625
+ /* DMUS_E_ALREADY_SENT
626
+ *
627
+ * The DMUS_PMSG has already been sent to the performance object via
628
+ * IDirectMusicPerformance::SendPMsg().
629
+ */
630
+ #define DMUS_E_ALREADY_SENT MAKE_DMHRESULTERROR(0x0204)
631
+
632
+ /* DMUS_E_CANNOT_FREE
633
+ *
634
+ * The DMUS_PMSG was either not allocated by the performance via
635
+ * IDirectMusicPerformance::AllocPMsg(), or it was already freed via
636
+ * IDirectMusicPerformance::FreePMsg().
637
+ */
638
+ #define DMUS_E_CANNOT_FREE MAKE_DMHRESULTERROR(0x0205)
639
+
640
+ /* DMUS_E_CANNOT_OPEN_PORT
641
+ *
642
+ * The default system port could not be opened.
643
+ */
644
+ #define DMUS_E_CANNOT_OPEN_PORT MAKE_DMHRESULTERROR(0x0206)
645
+
646
+ /* DMUS_E_CANNOT_CONVERT
647
+ *
648
+ * A call to MIDIToMusic() or MusicToMIDI() resulted in an error because
649
+ * the requested conversion could not happen. This usually occurs when the
650
+ * provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.
651
+ */
652
+ #define DMUS_E_CANNOT_CONVERT MAKE_DMHRESULTERROR(0x0207)
653
+ /* misspelling in previous versions of DirectX preserved for backward compatibility */
654
+ #define DMUS_E_CONNOT_CONVERT DMUS_E_CANNOT_CONVERT
655
+
656
+ /* DMUS_E_DESCEND_CHUNK_FAIL
657
+ *
658
+ * DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file
659
+ * was reached before the desired chunk was found.
660
+ */
661
+ #define DMUS_E_DESCEND_CHUNK_FAIL MAKE_DMHRESULTERROR(0x0210)
662
+
663
+
664
+ #if (NTDDI_VERSION >= NTDDI_WINXP) /* Windows XP or greater */
665
+
666
+ /* DMUS_E_NOT_LOADED
667
+ *
668
+ * An attempt to use this object failed because it first needs to
669
+ * be loaded.
670
+ */
671
+ #define DMUS_E_NOT_LOADED MAKE_DMHRESULTERROR(0x0211)
672
+
673
+ /* DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE
674
+ *
675
+ * The activeX scripting engine for the script's language is not compatible with
676
+ * DirectMusic.
677
+ *
678
+ */
679
+ #define DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE MAKE_DMHRESULTERROR(0x0213)
680
+
681
+ /* DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE
682
+ *
683
+ * A varient was used that had a type that is not supported by DirectMusic.
684
+ *
685
+ */
686
+ #define DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE MAKE_DMHRESULTERROR(0x0214)
687
+
688
+ /* DMUS_E_SCRIPT_ERROR_IN_SCRIPT
689
+ *
690
+ * An error was encountered while parsing or executing the script.
691
+ * The pErrorInfo parameter (if supplied) was filled with information about the error.
692
+ */
693
+ #define DMUS_E_SCRIPT_ERROR_IN_SCRIPT MAKE_DMHRESULTERROR(0x0215)
694
+
695
+ /* DMUS_E_SCRIPT_CANTLOAD_OLEAUT32
696
+ *
697
+ * Loading of oleaut32.dll failed. VBScript and other activeX scripting languages
698
+ * require use of oleaut32.dll. On platforms where oleaut32.dll is not present, only
699
+ * the DirectMusicScript language, which doesn't require oleaut32.dll can be used.
700
+ */
701
+ #define DMUS_E_SCRIPT_CANTLOAD_OLEAUT32 MAKE_DMHRESULTERROR(0x0216)
702
+
703
+ /* DMUS_E_SCRIPT_LOADSCRIPT_ERROR
704
+ *
705
+ * An error occured while parsing a script loaded using LoadScript. The script that
706
+ * was loaded contains an error.
707
+ */
708
+ #define DMUS_E_SCRIPT_LOADSCRIPT_ERROR MAKE_DMHRESULTERROR(0x0217)
709
+
710
+ /* DMUS_E_SCRIPT_INVALID_FILE
711
+ *
712
+ * The script file is invalid.
713
+ */
714
+ #define DMUS_E_SCRIPT_INVALID_FILE MAKE_DMHRESULTERROR(0x0218)
715
+
716
+ /* DMUS_E_INVALID_SCRIPTTRACK
717
+ *
718
+ * The file contains an invalid script track.
719
+ */
720
+ #define DMUS_E_INVALID_SCRIPTTRACK MAKE_DMHRESULTERROR(0x0219)
721
+
722
+ /* DMUS_E_SCRIPT_VARIABLE_NOT_FOUND
723
+ *
724
+ * The script does not contain a variable with the specified name.
725
+ */
726
+ #define DMUS_E_SCRIPT_VARIABLE_NOT_FOUND MAKE_DMHRESULTERROR(0x021A)
727
+
728
+ /* DMUS_E_SCRIPT_ROUTINE_NOT_FOUND
729
+ *
730
+ * The script does not contain a routine with the specified name.
731
+ */
732
+ #define DMUS_E_SCRIPT_ROUTINE_NOT_FOUND MAKE_DMHRESULTERROR(0x021B)
733
+
734
+ /* DMUS_E_SCRIPT_CONTENT_READONLY
735
+ *
736
+ * Scripts variables for content referenced or embedded in a script cannot be set.
737
+ */
738
+ #define DMUS_E_SCRIPT_CONTENT_READONLY MAKE_DMHRESULTERROR(0x021C)
739
+
740
+ /* DMUS_E_SCRIPT_NOT_A_REFERENCE
741
+ *
742
+ * Attempt was made to set a script's variable by reference to a value that was
743
+ * not an object type.
744
+ */
745
+ #define DMUS_E_SCRIPT_NOT_A_REFERENCE MAKE_DMHRESULTERROR(0x021D)
746
+
747
+ /* DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED
748
+ *
749
+ * Attempt was made to set a script's variable by value to an object that does
750
+ * not support a default value property.
751
+ */
752
+ #define DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED MAKE_DMHRESULTERROR(0x021E)
753
+
754
+ /* DMUS_E_INVALID_SEGMENTTRIGGERTRACK
755
+ *
756
+ * The file contains an invalid segment trigger track.
757
+ */
758
+ #define DMUS_E_INVALID_SEGMENTTRIGGERTRACK MAKE_DMHRESULTERROR(0x0220)
759
+
760
+ /* DMUS_E_INVALID_LYRICSTRACK
761
+ *
762
+ * The file contains an invalid lyrics track.
763
+ */
764
+ #define DMUS_E_INVALID_LYRICSTRACK MAKE_DMHRESULTERROR(0x0221)
765
+
766
+ /* DMUS_E_INVALID_PARAMCONTROLTRACK
767
+ *
768
+ * The file contains an invalid parameter control track.
769
+ */
770
+ #define DMUS_E_INVALID_PARAMCONTROLTRACK MAKE_DMHRESULTERROR(0x0222)
771
+
772
+ /* DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR
773
+ *
774
+ * A script written in AudioVBScript could not be read because it contained a statement that
775
+ * is not allowed by the AudioVBScript language.
776
+ */
777
+ #define DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR MAKE_DMHRESULTERROR(0x0223)
778
+
779
+ /* DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR
780
+ *
781
+ * A script routine written in AudioVBScript failed because an invalid operation occurred. For example,
782
+ * adding the number 3 to a segment object would produce this error. So would attempting to call a routine
783
+ * that doesn't exist.
784
+ */
785
+ #define DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR MAKE_DMHRESULTERROR(0x0224)
786
+
787
+ /* DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE
788
+ *
789
+ * A script routine written in AudioVBScript failed because a function outside of a script failed to complete.
790
+ * For example, a call to PlaySegment that fails to play because of low memory would return this error.
791
+ */
792
+ #define DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE MAKE_DMHRESULTERROR(0x0225)
793
+
794
+ /* DMUS_E_AUDIOPATHS_NOT_VALID
795
+ *
796
+ * The Performance has set up some PChannels using the AssignPChannel command, which
797
+ * makes it not capable of supporting audio paths.
798
+ */
799
+ #define DMUS_E_AUDIOPATHS_NOT_VALID MAKE_DMHRESULTERROR(0x0226)
800
+
801
+ /* DMUS_E_AUDIOPATHS_IN_USE
802
+ *
803
+ * This is the inverse of the previous error.
804
+ * The Performance has set up some audio paths, which makes is incompatible
805
+ * with the calls to allocate pchannels, etc.
806
+ */
807
+ #define DMUS_E_AUDIOPATHS_IN_USE MAKE_DMHRESULTERROR(0x0227)
808
+
809
+ /* DMUS_E_NO_AUDIOPATH_CONFIG
810
+ *
811
+ * A segment was asked for its embedded audio path configuration,
812
+ * but there isn't any.
813
+ */
814
+ #define DMUS_E_NO_AUDIOPATH_CONFIG MAKE_DMHRESULTERROR(0x0228)
815
+
816
+ /* DMUS_E_AUDIOPATH_INACTIVE
817
+ *
818
+ * An audiopath is inactive, perhaps because closedown was called.
819
+ */
820
+ #define DMUS_E_AUDIOPATH_INACTIVE MAKE_DMHRESULTERROR(0x0229)
821
+
822
+ /* DMUS_E_AUDIOPATH_NOBUFFER
823
+ *
824
+ * An audiopath failed to create because a requested buffer could not be created.
825
+ */
826
+ #define DMUS_E_AUDIOPATH_NOBUFFER MAKE_DMHRESULTERROR(0x022A)
827
+
828
+ /* DMUS_E_AUDIOPATH_NOPORT
829
+ *
830
+ * An audiopath could not be used for playback because it lacked port assignments.
831
+ */
832
+ #define DMUS_E_AUDIOPATH_NOPORT MAKE_DMHRESULTERROR(0x022B)
833
+
834
+ /* DMUS_E_NO_AUDIOPATH
835
+ *
836
+ * Attempt was made to play segment in audiopath mode and there was no audiopath.
837
+ */
838
+ #define DMUS_E_NO_AUDIOPATH MAKE_DMHRESULTERROR(0x022C)
839
+
840
+ /* DMUS_E_INVALIDCHUNK
841
+ *
842
+ * Invalid data was found in a RIFF file chunk.
843
+ */
844
+ #define DMUS_E_INVALIDCHUNK MAKE_DMHRESULTERROR(0x022D)
845
+
846
+ /* DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER
847
+ *
848
+ * Attempt was made to create an audiopath that sends to a global effects buffer which did not exist.
849
+ */
850
+ #define DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER MAKE_DMHRESULTERROR(0x022E)
851
+
852
+ /* DMUS_E_INVALID_CONTAINER_OBJECT
853
+ *
854
+ * The file does not contain a valid container object.
855
+ */
856
+ #define DMUS_E_INVALID_CONTAINER_OBJECT MAKE_DMHRESULTERROR(0x022F)
857
+
858
+ #endif /* NTDDI_VERSION >= NTDDI_WINXP */
859
+
860
+
861
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
862
+ #pragma endregion
863
+
864
+ #endif /* _DMERROR_ */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dmusbuff.h ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************
2
+ * *
3
+ * DMusBuff.h -- This module defines the buffer format for DirectMusic *
4
+ * Shared file between user mode and kernel mode components *
5
+ * *
6
+ * Copyright (c) 1998, Microsoft Corp. All rights reserved. *
7
+ * *
8
+ ***************************************************************************/
9
+
10
+ #ifndef _DMusBuff_
11
+ #define _DMusBuff_
12
+
13
+ #include <winapifamily.h>
14
+
15
+ #pragma region Desktop Family
16
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
17
+
18
+ #include "dmdls.h"
19
+
20
+ /* Format of DirectMusic events in a buffer
21
+ *
22
+ * A buffer contains 1 or more events, each with the following header.
23
+ * Immediately following the header is the event data. The header+data
24
+ * size is rounded to the nearest quadword (8 bytes).
25
+ */
26
+
27
+ #include <pshpack4.h> /* Do not pad at end - that's where the data is */
28
+ typedef struct _DMUS_EVENTHEADER *LPDMUS_EVENTHEADER;
29
+ typedef struct _DMUS_EVENTHEADER
30
+ {
31
+ DWORD cbEvent; /* Unrounded bytes in event */
32
+ DWORD dwChannelGroup; /* Channel group of event */
33
+ REFERENCE_TIME rtDelta; /* Delta from start time of entire buffer */
34
+ DWORD dwFlags; /* Flags DMUS_EVENT_xxx */
35
+ } DMUS_EVENTHEADER;
36
+ #include <poppack.h>
37
+
38
+ #define DMUS_EVENT_STRUCTURED 0x00000001 /* Unstructured data (SysEx, etc.) */
39
+
40
+ /* The number of bytes to allocate for an event with 'cb' data bytes.
41
+ */
42
+ #define QWORD_ALIGN(x) (((x) + 7) & ~7)
43
+ #define DMUS_EVENT_SIZE(cb) QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
44
+
45
+
46
+
47
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
48
+ #pragma endregion
49
+
50
+ #endif /* _DMusBuff_ */
msvc/Windows Kits/10/Include/10.0.26100.0/shared/dontuse.h ADDED
@@ -0,0 +1,595 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******************************************************************
2
+ * *
3
+ * dontuse.h -- This module deprecates Banned APIs *
4
+ * *
5
+ * Copyright (c) Microsoft Corp. All rights reserved. *
6
+ * *
7
+ ******************************************************************/
8
+ #ifndef _DONTUSE_H_INCLUDED_
9
+ #define _DONTUSE_H_INCLUDED_
10
+ #pragma once
11
+ #include <winapifamily.h>
12
+
13
+ #pragma region Desktop Family
14
+ #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
15
+
16
+
17
+
18
+ #ifdef DEPRECATE_SUPPORTED
19
+ // First all the names that are a/w variants (or shouldn't be #defined by now anyway).
20
+
21
+
22
+ //Windows
23
+ #pragma deprecated(lstrcpyA)
24
+ #pragma deprecated(lstrcpyW)
25
+ #pragma deprecated(lstrcpynA)
26
+ #pragma deprecated(lstrcpynW)
27
+ #pragma deprecated(lstrcatA)
28
+ #pragma deprecated(lstrcatW)
29
+ #pragma deprecated(lstrcatnA)
30
+ #pragma deprecated(lstrcatnW)
31
+ #pragma deprecated(wsprintfA)
32
+ #pragma deprecated(wsprintfW)
33
+ #pragma deprecated(wvsprintfA)
34
+ #pragma deprecated(wvsprintfW)
35
+
36
+ //shlwapi
37
+ #ifndef _STRSAFE_H_INCLUDED_
38
+ #pragma deprecated(StrCpyW)
39
+ #endif
40
+ #pragma deprecated(StrNCpyW)
41
+ #pragma deprecated(StrCpyNW)
42
+ #pragma deprecated(StrCatW)
43
+ #pragma deprecated(StrNCatW)
44
+ #pragma deprecated(StrCatNW)
45
+ #pragma deprecated(wnsprintf)
46
+ #ifndef _STRSAFE_H_INCLUDED_
47
+ #pragma deprecated(wnsprintfW)
48
+ #endif
49
+ #pragma deprecated(wvnsprintfW)
50
+ #pragma deprecated(StrCatBuffW)
51
+
52
+
53
+ #if defined(_MSC_VER) && (_MSC_VER < 1700)
54
+
55
+ //crt
56
+ #pragma deprecated(gets)
57
+ #pragma deprecated(_getws)
58
+ #pragma deprecated(strcpy)
59
+ #pragma deprecated(wcscpy)
60
+ #pragma deprecated(strncat)
61
+ #pragma deprecated(wcsncat)
62
+ #pragma deprecated(strcat)
63
+ #pragma deprecated(wcscat)
64
+ #pragma deprecated(strncpy)
65
+ #pragma deprecated(wcsncpy)
66
+ #pragma deprecated(_snprintf)
67
+ #pragma deprecated(_snwprintf)
68
+ #pragma deprecated(_vsnprintf)
69
+ #pragma deprecated(_vsnwprintf)
70
+ #pragma deprecated(vsprintf)
71
+ #pragma deprecated(vswprintf)
72
+ #pragma deprecated(sprintf)
73
+ #pragma deprecated(swprintf)
74
+ #pragma deprecated(_makepath)
75
+ #pragma deprecated(_wmakepath)
76
+ #pragma deprecated(_splitpath)
77
+ #pragma deprecated(_wsplitpath)
78
+
79
+ #pragma deprecated(sprintfA)
80
+ #pragma deprecated(sprintfW)
81
+ #pragma deprecated(strcatA)
82
+ #pragma deprecated(strcatW)
83
+ #pragma deprecated(strcpyA)
84
+ #pragma deprecated(strcpyW)
85
+ #pragma deprecated(nsprintf)
86
+ #pragma deprecated(IsBadCodePtr)
87
+ #pragma deprecated(IsBadHugeReadPtr)
88
+ #pragma deprecated(IsBadHugeWritePtr)
89
+ #pragma deprecated(IsBadReadPtr)
90
+ #pragma deprecated(IsBadStringPtr)
91
+ #pragma deprecated(IsBadWritePtr)
92
+ #pragma deprecated(_ftccat)
93
+ #pragma deprecated("_ftccpy")
94
+ #pragma deprecated(_tccat)
95
+ #pragma deprecated("_tccpy")
96
+ #pragma deprecated(makepath)
97
+ #pragma deprecated(StrCatChainW)
98
+ #pragma deprecated(ualstrcpyW)
99
+
100
+ #pragma deprecated(scanf)
101
+ #pragma deprecated(wscanf)
102
+ #pragma deprecated(sscanf)
103
+ #pragma deprecated(swscanf)
104
+ #pragma deprecated(_snscanf)
105
+ #pragma deprecated(_snwscanf)
106
+ #pragma deprecated(snscanf)
107
+ #pragma deprecated("swscanf")
108
+
109
+ #endif // defined(_MSC_VER) && (_MSC_VER < 1700)
110
+
111
+ // Then all the windows.h names - we need to undef and redef based on UNICODE setting
112
+ #undef lstrcat
113
+ #undef lstrcatn
114
+ #undef lstrcpy
115
+ #undef lstrcpyn
116
+ #undef wsprintf
117
+ #undef wvsprintf
118
+ #pragma deprecated(lstrcat)
119
+ #pragma deprecated(lstrcatn)
120
+ #pragma deprecated(lstrcpy)
121
+ #pragma deprecated(lstrcpyn)
122
+ #pragma deprecated(wsprintf)
123
+ #pragma deprecated(wvsprintf)
124
+ #ifdef UNICODE
125
+ #define lstrcat lstrcatW
126
+ #define lstrcatn lstrcatnW
127
+ #define lstrcpy lstrcpyW
128
+ #define lstrcpyn lstrcpynW
129
+ #define wsprintf wsprintfW
130
+ #define wvsprintf wvsprintfW
131
+ #else
132
+ #define lstrcat lstrcatA
133
+ #define lstrcatn lstrcatnA
134
+ #define lstrcpy lstrcpyA
135
+ #define lstrcpyn lstrcpynA
136
+ #define wsprintf wsprintfA
137
+ #define wvsprintf wvsprintfA
138
+ #endif
139
+
140
+
141
+
142
+ // Then the shlwapi names - they key off UNICODE also.
143
+
144
+ #undef StrCpyA
145
+ #undef StrCatA
146
+ #undef StrCpy
147
+ #undef StrCat
148
+ #undef StrNCat
149
+ #undef StrCatN
150
+ #undef StrCpyN
151
+ #undef StrCatNA
152
+ #undef StrCpyNA
153
+ #undef StrNCpy
154
+ #undef wvnsprintfA
155
+ #undef wvnsprintf
156
+ #undef wnsprintfA
157
+ #undef wnsprintf
158
+ #undef StrCatBuffA
159
+ #undef StrCatBuff
160
+ #pragma deprecated(StrCatNA)
161
+ #pragma deprecated(StrCpyNA)
162
+ #pragma deprecated(StrCpyA)
163
+ #pragma deprecated(StrCatA)
164
+ #pragma deprecated(StrCat)
165
+ #pragma deprecated(StrCpy)
166
+ #pragma deprecated(StrNCat)
167
+ #pragma deprecated(StrCatN)
168
+ #pragma deprecated(StrNCpy)
169
+ #pragma deprecated(StrCpyN)
170
+ #pragma deprecated(StrNCpyA)
171
+ #pragma deprecated(StrNCatA)
172
+ #pragma deprecated(wvnsprintfA)
173
+ #pragma deprecated(wvnsprintf)
174
+ #pragma deprecated(wnsprintfA)
175
+ #pragma deprecated("wnsprintf")
176
+ #pragma deprecated(StrCatBuffA)
177
+ #pragma deprecated(StrCatBuff)
178
+ #define StrCpyA lstrcpyA
179
+ #define StrCatA lstrcatA
180
+ #define StrCatN StrNCat
181
+ #define StrCpyN StrNCpy
182
+ #define wvnsprintfA vsprintf
183
+ #define wnsprintfA wsprintf
184
+ #define StrCatBuffA lstrcatA
185
+ #ifdef UNICODE
186
+ #define StrCat StrCatW
187
+ #define StrNCat StrNCatW
188
+ #define StrCpy StrCpyW
189
+ #define StrNCpy StrNCpyW
190
+ #define wvnsprintf vswprintf
191
+ #define wnsprintf wsprintf
192
+ #define StrCatBuff StrCatW
193
+ #else
194
+ #define StrCat lstrcatA
195
+ #define StrNCat StrNCatA
196
+ #define StrCpy lstrcpyA
197
+ #define StrNCpy StrNCpyA
198
+ #define wvnsprintf vsprintf
199
+ #define wnsprintf vsprintf
200
+ #define StrCatBuff lstrcatA
201
+ #endif
202
+
203
+
204
+ #if defined(_MSC_VER) && (_MSC_VER < 1700)
205
+
206
+ // Then all the CRT names - we need to undef/redef based on _UNICODE value.
207
+
208
+ #undef _getts
209
+ #undef _tcscat
210
+ #undef _tcsncat
211
+ #undef _tcscpy
212
+ #undef _tcsncpy
213
+ #undef _stprintf
214
+ #undef _vsntprintf
215
+ #undef _vstprintf
216
+ #undef _ftcscpy
217
+ #undef _ftcscat
218
+ #undef _fstrcpy
219
+ #undef _fstrcat
220
+ #undef _fstrncat
221
+ #undef _fstrncpy
222
+ #undef _sntprintf
223
+ #undef _tmakepath
224
+ #undef _tsplitpath
225
+ #undef _tscanf
226
+ #undef _stscanf
227
+ #undef _sntscanf
228
+ #pragma deprecated(_getts)
229
+ #pragma deprecated(_tcscat)
230
+ #pragma deprecated(_tcsncat)
231
+ #pragma deprecated(_tcscpy)
232
+ #pragma deprecated(_tcsncpy)
233
+ #pragma deprecated(_stprintf)
234
+ #pragma deprecated(_vsntprintf)
235
+ #pragma deprecated(_vstprintf)
236
+ #pragma deprecated("_ftcscpy")
237
+ #pragma deprecated("_ftcscat")
238
+ #pragma deprecated(_fstrcpy)
239
+ #pragma deprecated(_fstrcat)
240
+ #pragma deprecated(_fstrncat)
241
+ #pragma deprecated(_fstrncpy)
242
+ #pragma deprecated(_sntprintf)
243
+ #pragma deprecated(_tmakepath)
244
+ #pragma deprecated(_tsplitpath)
245
+ #pragma deprecated(_tscanf)
246
+ #pragma deprecated(_stscanf)
247
+ #pragma deprecated(_sntscanf)
248
+ #ifdef _UNICODE
249
+ #define _getts _getws
250
+ #define _tcscat wcscat
251
+ #define _tscncat wcsncat
252
+ #define _tcscpy wcscpy
253
+ #define _tcsncpy wcsncpy
254
+ #define _sntprintf _snwprintf
255
+ #define _vsntprintf _vsnwprintf
256
+ #define _vstprintf vswprintf
257
+ #define _ftcscpy wcscpy
258
+ #define _ftcscat wcscat
259
+ #define _fstrcpy wcscpy
260
+ #define _fstrcat wcscat
261
+ #define _fstrncpy wcsncpy
262
+ #define _fstrncat wcsncat
263
+ #define _fstrcpy wcscpy
264
+ #define _stprintf swprintf
265
+ #define _tmakepath _wmakepath
266
+ #define _tsplitpath _wsplitpath
267
+ #define _tscanf wscanf
268
+ #define _stscanf swscanf
269
+ #define _sntscanf snwscanf
270
+ #else
271
+ #define _getts gets
272
+ #define _tcscat strcat
273
+ #define _tcsncat strncat
274
+ #define _tcscpy strcpy
275
+ #define _tcsncpy strncpy
276
+ #define _sntprintf _snprintf
277
+ #define _vsntprintf _vsnprintf
278
+ #define _vstprintf vsprintf
279
+ #define _ftcscpy strcpy
280
+ #define _ftcscat strcat
281
+ #define _fstrcpy strcpy
282
+ #define _fstrcat strcat
283
+ #define _fstrncpy strncpy
284
+ #define _fstrncat strncat
285
+ #define _fstrcpy strcpy
286
+ #define _stprintf vsprintf
287
+ #define _tmakepath _makepath
288
+ #define _tsplitpath _splitpath
289
+ #define _tscanf scanf
290
+ #define _stscanf sscanf
291
+ #define _sntscanf snscanf
292
+ #endif
293
+
294
+ #endif // defined(_MSC_VER) && (_MSC_VER < 1700)
295
+
296
+ #else // DEPRECATE_SUPPORTED
297
+
298
+ // WINDOWS
299
+
300
+ #undef lstrcpy
301
+ #define lstrcpy lstrcpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
302
+ #undef lstrcpyA
303
+ #define lstrcpyA lstrcpyA_instead_use_strcpy_s_or_StringCchCopyA_or_StringCbCopyA
304
+ #undef lstrcpyW
305
+ #define lstrcpyW lstrcpyW_instead_use_wcscpy_s_or_StringCchCopyW_or_StringCbCopyW
306
+
307
+ #undef lstrcpyn
308
+ #define lstrcpyn lstrcpyn_instead_use_strncpy_s_or_StringCchCopyN_or_StringCbCopyN
309
+ #undef lstrcpynA
310
+ #define lstrcpynA lstrcpynA_instead_use_strncpy_s_or_StringCchCopyNA_or_StringCbCopyNA
311
+ #undef lstrcpynW
312
+ #define lstrcpynW lstrcpynW_instead_use_wcsncpy_s_or_StringCchCopyNW_or_StringCbCopyNW
313
+
314
+ #undef lstrcat
315
+ #define lstrcat lstrcat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
316
+ #undef lstrcatA
317
+ #define lstrcatA lstrcatA_instead_use_strcat_s_or_StringCchCatA_or_StringCbCatA
318
+ #undef lstrcatW
319
+ #define lstrcatW lstrcatW_instead_use_wcscat_s_or_StringCchCatW_or_StringCbCatW
320
+
321
+ #undef lstrcatn
322
+ #define lstrcatn lstrcatn_instead_use_strncat_s_or_StringCchCatN_or_StringCbCatN
323
+ #undef lstrcatnA
324
+ #define lstrcatnA lstrcatnA_instead_use_strncat_s_or_StringCchCatNA_or_StringCbCatNA
325
+ #undef lstrcatnW
326
+ #define lstrcatnW lstrcatnW_instead_use_wcsncat_s_or_StringCchCatNW_or_StringCbCatNW
327
+
328
+ #undef wsprintf
329
+ #define wsprintf wsprintf_instead_use_sprintf_s_or_StringCchPrintf_or_StringCbPrintf
330
+ #undef wsprintfA
331
+ #define wsprintfA wsprintfA_instead_use_sprintf_s_or_StringCchPrintfA_or_StringCbPrintfA
332
+ #undef wsprintfW
333
+ #define wsprintfW wsprintfW_instead_use_sprintf_s_or_StringCchPrintfW_or_StringCbPrintfW
334
+
335
+ #undef wvsprintf
336
+ #define wvsprintf wvsprintf_instead_use_vsprintf_s_or_StringCchVPrintf_or_StringCbVPrintf
337
+ #undef wvsprintfA
338
+ #define wvsprintfA wvsprintfA_instead_use_vsprintf_s_or_StringCchVPrintfA_or_StringCbVPrintfA
339
+ #undef wvsprintfW
340
+ #define wvsprintfW wvsprintfW_instead_use_swprintf_s_or_StringCchVPrintfW_or_StringCbVPrintfW
341
+
342
+
343
+
344
+ // SHLWAPI
345
+
346
+ #undef StrCpy
347
+ #define StrCpy StrCpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
348
+ #undef StrCpyA
349
+ #define StrCpyA StrCpyA_instead_use_strcpy_s_or_StringCchCopyA_or_StringCbCopyA
350
+ #undef StrCpyW
351
+ #define StrCpyW StrCpyW_instead_use_wcscpy_s_or_StringCchCopyW_or_StringCbCopyW
352
+
353
+ #undef StrNCpy
354
+ #define StrNCpy StrNCpy_instead_use_strncpy_s_or_StringCchCopyN_or_StringCbCopyN
355
+ #undef StrNCpyA
356
+ #define StrNCpyA StrNCpyA_instead_use_strncpy_s_or_StringCchCopyNA_or_StringCbCopyNA
357
+ #undef StrNCpyW
358
+ #define StrNCpyW StrNCpyW_instead_use_wcsncpy_s_or_StringCchCopyNW_or_StringCbCopyNW
359
+
360
+ #undef StrCpyN
361
+ #define StrCpyN StrCpyN_instead_use_strncpy_s_or_StringCchCopyN_or_StringCbCopyN
362
+ #undef StrCpyNA
363
+ #define StrCpyNA StrCpyNA_instead_use_strncpy_s_or_StringCchCopyNA_or_StringCbCopyNA
364
+ #undef StrCpyNW
365
+ #define StrCpyNW StrCpyNW_instead_use_wcsncpy_s_or_StringCchCopyNW_or_StringCbCopyNW
366
+
367
+ #undef StrCat
368
+ #define StrCat StrCat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
369
+ #undef StrCatA
370
+ #define StrCatA StrCatA_instead_use_strcat_s_or_StringCchCatA_or_StringCbCatA
371
+ #undef StrCatW
372
+ #define StrCatW StrCatW_instead_use_wcscat_s_or_StringCchCatW_or_StringCbCatW
373
+
374
+ #undef StrNCat
375
+ #define StrNCat StrNCat_instead_use_strncat_s_or_StringCchCatN_or_StringCbCatN
376
+ #undef StrNCatA
377
+ #define StrNCatA StrNCatA_instead_use_strncat_s_or_StringCchCatNA_or_StringCbCatNA
378
+ #undef StrNCatW
379
+ #define StrNCatW StrNCatW_instead_use_wcsncat_s_or_StringCchCatNW_or_StringCbCatNW
380
+
381
+ #undef StrCatN
382
+ #define StrCatN StrCatN_instead_use_strncat_s_or_StringCchCatN_or_StringCbCatN
383
+ #undef StrCatNA
384
+ #define StrCatNA StrCatNA_instead_use_strncat_s_or_StringCchCatNA_or_StringCbCatNA
385
+ #undef StrCatNW
386
+ #define StrCatNW StrCatNW_instead_use_wcsncat_s_or_StringCchCatNW_or_StringCbCatNW
387
+
388
+ #undef wnsprintf
389
+ #define wnsprintf wnsprintf_instead_use_vsprintf_s_or_StringCchPrintf_or_StringCbPrintf
390
+ #undef wnsprintfA
391
+ #define wnsprintfA wnsprintfA_instead_use_vsprintf_s_or_StringCchPrintfA_or_StringCbPrintfA
392
+ #undef wnsprintfW
393
+ #define wnsprintfW wnsprintfW_instead_use_vswprintf_s_or_StringCchPrintfW_or_StringCbPrintfW
394
+
395
+ #undef wvnsprintf
396
+ #define wvnsprintf wvnsprintf_instead_use_vsprintf_s_or_StringCchVPrintf_or_StringCbVPrintf
397
+ #undef wvnsprintfA
398
+ #define wvnsprintfA wvnsprintfA_instead_use_vsprintf_s_or_StringCchVPrintfA_or_StringCbVPrintfA
399
+ #undef wvnsprintfW
400
+ #define wvnsprintfW wvnsprintfW_instead_use_vswprintf_s_or_StringCchVPrintfW_or_StringCbVPrintfW
401
+
402
+ #undef StrCatBuff
403
+ #define StrCatBuff StrCatBuff_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
404
+ #undef StrCatBuffA
405
+ #define StrCatBuffA StrCatBuffA_instead_use_strcat_s_or_StringCchCatA_or_StringCbCatA
406
+ #undef StrCatBuffW
407
+ #define StrCatBuffW StrCatBuffW_instead_use_strcat_s_or_StringCchCatW_or_StringCbCatW
408
+
409
+
410
+ // CRT
411
+
412
+ #undef gets
413
+ #define gets _gets_instead_use__gets_or_StringCchGets_or_StringCbGets
414
+ #undef _getws
415
+ #define _getws _getws_instead_use__getWs_or_StringCchGetsW_or_StringCbGetsW
416
+ #undef _getts
417
+ #define _getts _getts_instead_use__gets_or_StringCchGets_or_StringCbGets
418
+
419
+ #undef strcpy
420
+ #define strcpy strcpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
421
+ #undef wcscpy
422
+ #define wcscpy wcscpy_instead_use_wcscpy_s_or_StringCchCopyW_or_StringCbCopyW
423
+ #undef _tcscpy
424
+ #define _tcscpy _tcscpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
425
+
426
+ #undef strcat
427
+ #define strcat strcat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
428
+ #undef wcscat
429
+ #define wcscat wcscat_instead_use_wcscat_s_or_StringCchCatW_or_StringCbCatW
430
+ #undef _tcscat
431
+ #define _tcscat _tcscat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
432
+
433
+ #undef strncat
434
+ #define strncat strncat_instead_use_strncat_s_or_StringCchCatN_or_StringCbCatN
435
+ #undef wcsncat
436
+ #define wcsncat wcsncat_instead_use_wcsncat_s_or_StringCchCatNW_or_StringCbCatNW
437
+ #undef _tcsncat
438
+ #define _tcsncat _tcsncat_instead_use_strncat_s_or_StringCchCatN_or_StringCbCatN
439
+
440
+ #undef strncpy
441
+ #define strncpy strncpy_instead_use_strncpy_s_or_StringCchCpyN_or_StringCbCpyN
442
+ #undef wcsncpy
443
+ #define wcsncpy wcsncpy_instead_use_wcsncpy_s_or_StringCchCpyNW_or_StringCbCpyNW
444
+ #undef _tcsncpy
445
+ #define _tcsncpy _tcsncpy_instead_use_strncpy_s_or_StringCchCpyN_or_StringCbCpyN
446
+
447
+ #undef _snprintf
448
+ #define _snprintf _snprintf_instead_use_snprintf_s_or_StringCchPrintf_or_StringCbPrintf
449
+ #undef _snwprintf
450
+ #define _snwprintf _snwprintf_instead_use_snwprintf_s_or_StringCchPrintfW_or_StringCbPrintfW
451
+ #undef _sntprintf
452
+ #define _sntprintf _sntprintf_instead_use_sprintf_s_or_StringCchPrintf_or_StringCbPrintf
453
+
454
+ #undef _vsnprintf
455
+ #define _vsnprintf _vsnprintf_instead_use_vsnprintf_s_or_StringCchVPrintf_or_StringCbVPrintf
456
+ #undef _vsnwprintf
457
+ #define _vsnwprintf _vsnwprintf_instead_use_vsnwprintf_s_or_StringCchVPrintfW_or_StringCbVPrintfW
458
+ #undef _vsntprintf
459
+ #define _vsntprintf _vsntprintf_instead_use_vsprintf_s_or_StringCchVPrintf_or_StringCbVPrintf
460
+
461
+ #undef vsprintf
462
+ #define vsprintf vsprintf_instead_use_vsprintf_s_or_StringCchVPrintf_or_StringCbVPrintf
463
+ #undef vswprintf
464
+ #define vswprintf vswprintf_instead_use_vswprintf_s_or_StringCchVPrintfW_or_StringCbVPrintfW
465
+ #undef _vstprintf
466
+ #define _vstprintf _vstprintf_instead_use_vsprintf_s_or_StringCchVPrintf_or_StringCbVPrintf
467
+
468
+ #undef sprintf
469
+ #define sprintf sprintf_instead_use_sprintf_s_or_StringCchPrintf_or_StringCbPrintf
470
+ #undef swprintf
471
+ #define swprintf swprintf_instead_use_swprintf_s_or_StringCchPrintfW_or_StringCbPrintfW
472
+ #undef _stprintf
473
+ #define _stprintf _stprintf_instead_use_vsprintf_s_or_StringCchPrintf_or_StringCbPrintf
474
+
475
+ #undef _makepath
476
+ #define _makepath _makepath_instead_use_makepath_s
477
+ #undef _wmakepath
478
+ #define _wmakepath _wmakepath_instead_use_wmakepath_s
479
+ #undef _tmakepath
480
+ #define _tmakepath _tmakepath_instead_use_tmakepath_s
481
+
482
+ #undef _splitpath
483
+ #define _splitpath _splitpath_instead_use_splitpath_s
484
+ #undef _wsplitpath
485
+ #define _wsplitpath _wsplitpath_instead_use_wsplitpath_s
486
+ #undef _tsplitpath
487
+ #define _tsplitpath _tsplitpath_instead_use_tsplitpath_s
488
+
489
+ #undef scanf
490
+ #define scanf scanf_instead_use_scanf_S
491
+ #undef wscanf
492
+ #define wscanf wscanf_instead_use_wscanf_S
493
+ #undef _tscanf
494
+ #define _tscanf _tscanf_instead_use_scanf_S
495
+
496
+ #undef sscanf
497
+ #define sscanf sscanf_instead_use_sscanf_S
498
+ #undef swscanf
499
+ #define swscanf swscanf_instead_use_swscanf_s
500
+ #undef _stscanf
501
+ #define _stscanf _stscanf_instead_use_sscanf_S
502
+
503
+ #undef _snscanf
504
+ #define _snscanf _snscanf_instead_use__snscanf_s
505
+ #undef _snwscanf
506
+ #define _snwscanf _snwscanf_instead_use__snwscanf_s
507
+ #undef snscanf
508
+ #define snscanf snscanf_instead_use__snscanf_s
509
+ #undef swscanf
510
+ #define swscanf swscanf_instead_use__snwscanf_s
511
+ #undef _sntscanf
512
+ #define _sntscanf _sntscanf_instead_use__snscanf_s
513
+
514
+ #undef _ftcscat
515
+ #define _ftcscat _ftcscat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
516
+ #undef _ftcscpy
517
+ #define _ftcscpy _ftcscpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
518
+ #undef _fstrcat
519
+ #define _fstrcat _fstrcat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
520
+ #undef _fstrcpy
521
+ #define _fstrcpy _fstrcpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
522
+ #undef _fstrncat
523
+ #define _fstrncat _fstrncat_instead_use_strncat_s_or_StringCchCatN_or_StringCbCatN
524
+ #undef _fstrncpy
525
+ #define _fstrncpy _fstrncpy_instead_use_strncpy_s_or_StringCchCpyN_or_StringCbCpyN
526
+
527
+
528
+
529
+ // MISC
530
+
531
+ #undef sprintfA
532
+ #define sprintfA sprintfA_instead_use_sprintf_s_or_StringCchPrintfA_or_StringCbPrintfA
533
+ #undef sprintfW
534
+ #define sprintfW sprintfW_instead_use_swprintf_s_or_StringCchPrintfW_or_StringCbPrintfW
535
+
536
+ #undef strcpyA
537
+ #define strcpyA strcpyA_instead_use_strcpy_s_or_StringCchCopyA_or_StringCbCopyA
538
+ #undef strcpyW
539
+ #define strcpyW strcpyW_instead_use_wcscpy_s_or_StringCchCopyW_or_StringCbCopyW
540
+
541
+ #undef strcatA
542
+ #define strcatA strcatA_instead_use_strcat_s_or_StringCchCatA_or_StringCbCatA
543
+ #undef strcatW
544
+ #define strcatW strcatW_instead_use_wcscat_s_or_StringCchCatW_or_StringCbCatW
545
+
546
+ #undef nsprintf
547
+ #define nsprintf nsprintf_instead_use_vsprintf_s_or_StringCchPrintf_or_StringCbPrintf
548
+
549
+ #undef IsBadCodePtr
550
+ #define IsBadCodePtr IsBadCodePtr_is_no_longer_supported
551
+
552
+ #undef IsBadHugeReadPtr
553
+ #define IsBadHugeReadPtr IsBadHugeReadPtr_is_no_longer_supported
554
+
555
+ #undef IsBadHugeWritePtr
556
+ #define IsBadHugeWritePtr IsBadHugeWritePtr_is_no_longer_supported
557
+
558
+ #undef IsBadReadPtr
559
+ #define IsBadReadPtr IsBadReadPtr_is_no_longer_supported
560
+
561
+ #undef IsBadStringPtr
562
+ #define IsBadStringPtr IsBadStringPtr_is_no_longer_supported
563
+
564
+ #undef IsBadWritePtr
565
+ #define IsBadWritePtr IsBadWritePtr_is_no_longer_supported
566
+
567
+ #undef _ftccat
568
+ #define _ftccat _ftccat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
569
+
570
+ #undef _ftccpy
571
+ #define _ftccpy _ftccpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
572
+
573
+ #undef _tccat
574
+ #define _tccat _tccat_instead_use_strcat_s_or_StringCchCat_or_StringCbCat
575
+
576
+ #undef _tccpy
577
+ #define _tccpy _tccpy_instead_use_strcpy_s_or_StringCchCopy_or_StringCbCopy
578
+
579
+ #undef makepath
580
+ #define makepath makepath_instead_use_makepath_s_or_wmakepath_s
581
+
582
+ #undef StrCatChainW
583
+ #define StrCatChainW StrCatChainW_is_no_longer_supported
584
+
585
+ #undef ualstrcpyW
586
+ #define ualstrcpyW ualstrcpyW_is_no_longer_supported
587
+
588
+
589
+ #endif // !DEPRECATE_SUPPORTED
590
+
591
+
592
+ #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
593
+ #pragma endregion
594
+
595
+ #endif // _DONTUSE_H_INCLUDED_