direct_storage/
bindings.rs

1// Bindings generated by `windows-bindgen` 0.59.0
2
3#![allow(
4    non_snake_case,
5    non_upper_case_globals,
6    non_camel_case_types,
7    dead_code,
8    clippy::all
9)]
10
11pub mod Microsoft {
12    pub mod Direct3D {
13        pub mod DirectStorage {
14            #[inline]
15            pub unsafe fn DStorageCreateCompressionCodec<T>(
16                format: DSTORAGE_COMPRESSION_FORMAT,
17                numthreads: u32,
18            ) -> windows_core::Result<T>
19            where
20                T: windows_core::Interface,
21            {
22                windows_targets::link!("dstorage" "system" fn DStorageCreateCompressionCodec(format : DSTORAGE_COMPRESSION_FORMAT, numthreads : u32, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
23                let mut result__ = core::ptr::null_mut();
24                unsafe {
25                    DStorageCreateCompressionCodec(format, numthreads, &T::IID, &mut result__)
26                        .and_then(|| windows_core::Type::from_abi(result__))
27                }
28            }
29            #[inline]
30            pub unsafe fn DStorageGetFactory<T>() -> windows_core::Result<T>
31            where
32                T: windows_core::Interface,
33            {
34                windows_targets::link!("dstorage" "system" fn DStorageGetFactory(riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
35                let mut result__ = core::ptr::null_mut();
36                unsafe {
37                    DStorageGetFactory(&T::IID, &mut result__)
38                        .and_then(|| windows_core::Type::from_abi(result__))
39                }
40            }
41            #[inline]
42            pub unsafe fn DStorageSetConfiguration(
43                configuration: *const DSTORAGE_CONFIGURATION,
44            ) -> windows_core::Result<()> {
45                windows_targets::link!("dstorage" "system" fn DStorageSetConfiguration(configuration : *const DSTORAGE_CONFIGURATION) -> windows_core::HRESULT);
46                unsafe { DStorageSetConfiguration(configuration).ok() }
47            }
48            #[inline]
49            pub unsafe fn DStorageSetConfiguration1(
50                configuration: *const DSTORAGE_CONFIGURATION1,
51            ) -> windows_core::Result<()> {
52                windows_targets::link!("dstorage" "system" fn DStorageSetConfiguration1(configuration : *const DSTORAGE_CONFIGURATION1) -> windows_core::HRESULT);
53                unsafe { DStorageSetConfiguration1(configuration).ok() }
54            }
55            #[repr(transparent)]
56            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
57            pub struct DSTORAGE_COMMAND_TYPE(pub i32);
58            pub const DSTORAGE_COMMAND_TYPE_EVENT: DSTORAGE_COMMAND_TYPE =
59                DSTORAGE_COMMAND_TYPE(3i32);
60            pub const DSTORAGE_COMMAND_TYPE_NONE: DSTORAGE_COMMAND_TYPE =
61                DSTORAGE_COMMAND_TYPE(-1i32);
62            pub const DSTORAGE_COMMAND_TYPE_REQUEST: DSTORAGE_COMMAND_TYPE =
63                DSTORAGE_COMMAND_TYPE(0i32);
64            pub const DSTORAGE_COMMAND_TYPE_SIGNAL: DSTORAGE_COMMAND_TYPE =
65                DSTORAGE_COMMAND_TYPE(2i32);
66            pub const DSTORAGE_COMMAND_TYPE_STATUS: DSTORAGE_COMMAND_TYPE =
67                DSTORAGE_COMMAND_TYPE(1i32);
68            #[repr(transparent)]
69            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
70            pub struct DSTORAGE_COMPRESSION(pub i32);
71            pub const DSTORAGE_COMPRESSION_BEST_RATIO: DSTORAGE_COMPRESSION =
72                DSTORAGE_COMPRESSION(1i32);
73            pub const DSTORAGE_COMPRESSION_DEFAULT: DSTORAGE_COMPRESSION =
74                DSTORAGE_COMPRESSION(0i32);
75            pub const DSTORAGE_COMPRESSION_FASTEST: DSTORAGE_COMPRESSION =
76                DSTORAGE_COMPRESSION(-1i32);
77            #[repr(transparent)]
78            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
79            pub struct DSTORAGE_COMPRESSION_FORMAT(pub u8);
80            pub const DSTORAGE_COMPRESSION_FORMAT_GDEFLATE: DSTORAGE_COMPRESSION_FORMAT =
81                DSTORAGE_COMPRESSION_FORMAT(1u8);
82            pub const DSTORAGE_COMPRESSION_FORMAT_NONE: DSTORAGE_COMPRESSION_FORMAT =
83                DSTORAGE_COMPRESSION_FORMAT(0u8);
84            #[repr(transparent)]
85            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
86            pub struct DSTORAGE_COMPRESSION_SUPPORT(pub u32);
87            impl DSTORAGE_COMPRESSION_SUPPORT {
88                pub const fn contains(&self, other: Self) -> bool {
89                    self.0 & other.0 == other.0
90                }
91            }
92            impl core::ops::BitOr for DSTORAGE_COMPRESSION_SUPPORT {
93                type Output = Self;
94                fn bitor(self, other: Self) -> Self {
95                    Self(self.0 | other.0)
96                }
97            }
98            impl core::ops::BitAnd for DSTORAGE_COMPRESSION_SUPPORT {
99                type Output = Self;
100                fn bitand(self, other: Self) -> Self {
101                    Self(self.0 & other.0)
102                }
103            }
104            impl core::ops::BitOrAssign for DSTORAGE_COMPRESSION_SUPPORT {
105                fn bitor_assign(&mut self, other: Self) {
106                    self.0.bitor_assign(other.0)
107                }
108            }
109            impl core::ops::BitAndAssign for DSTORAGE_COMPRESSION_SUPPORT {
110                fn bitand_assign(&mut self, other: Self) {
111                    self.0.bitand_assign(other.0)
112                }
113            }
114            impl core::ops::Not for DSTORAGE_COMPRESSION_SUPPORT {
115                type Output = Self;
116                fn not(self) -> Self {
117                    Self(self.0.not())
118                }
119            }
120            pub const DSTORAGE_COMPRESSION_SUPPORT_CPU_FALLBACK: DSTORAGE_COMPRESSION_SUPPORT =
121                DSTORAGE_COMPRESSION_SUPPORT(4u32);
122            pub const DSTORAGE_COMPRESSION_SUPPORT_GPU_FALLBACK: DSTORAGE_COMPRESSION_SUPPORT =
123                DSTORAGE_COMPRESSION_SUPPORT(2u32);
124            pub const DSTORAGE_COMPRESSION_SUPPORT_GPU_OPTIMIZED: DSTORAGE_COMPRESSION_SUPPORT =
125                DSTORAGE_COMPRESSION_SUPPORT(1u32);
126            pub const DSTORAGE_COMPRESSION_SUPPORT_NONE: DSTORAGE_COMPRESSION_SUPPORT =
127                DSTORAGE_COMPRESSION_SUPPORT(0u32);
128            pub const DSTORAGE_COMPRESSION_SUPPORT_USES_COMPUTE_QUEUE:
129                DSTORAGE_COMPRESSION_SUPPORT = DSTORAGE_COMPRESSION_SUPPORT(8u32);
130            pub const DSTORAGE_COMPRESSION_SUPPORT_USES_COPY_QUEUE: DSTORAGE_COMPRESSION_SUPPORT =
131                DSTORAGE_COMPRESSION_SUPPORT(16u32);
132            #[repr(C)]
133            #[derive(Clone, Copy, Debug, PartialEq)]
134            pub struct DSTORAGE_CONFIGURATION {
135                pub NumSubmitThreads: u32,
136                pub NumBuiltInCpuDecompressionThreads: i32,
137                pub ForceMappingLayer: windows::Win32::Foundation::BOOL,
138                pub DisableBypassIO: windows::Win32::Foundation::BOOL,
139                pub DisableTelemetry: windows::Win32::Foundation::BOOL,
140                pub DisableGpuDecompressionMetacommand: windows::Win32::Foundation::BOOL,
141                pub DisableGpuDecompression: windows::Win32::Foundation::BOOL,
142            }
143            impl Default for DSTORAGE_CONFIGURATION {
144                fn default() -> Self {
145                    unsafe { core::mem::zeroed() }
146                }
147            }
148            #[repr(C)]
149            #[derive(Clone, Copy, Debug, PartialEq)]
150            pub struct DSTORAGE_CONFIGURATION1 {
151                pub NumSubmitThreads: u32,
152                pub NumBuiltInCpuDecompressionThreads: i32,
153                pub ForceMappingLayer: windows::Win32::Foundation::BOOL,
154                pub DisableBypassIO: windows::Win32::Foundation::BOOL,
155                pub DisableTelemetry: windows::Win32::Foundation::BOOL,
156                pub DisableGpuDecompressionMetacommand: windows::Win32::Foundation::BOOL,
157                pub DisableGpuDecompression: windows::Win32::Foundation::BOOL,
158                pub ForceFileBuffering: windows::Win32::Foundation::BOOL,
159            }
160            impl Default for DSTORAGE_CONFIGURATION1 {
161                fn default() -> Self {
162                    unsafe { core::mem::zeroed() }
163                }
164            }
165            pub const DSTORAGE_CUSTOM_COMPRESSION_0: DSTORAGE_COMPRESSION_FORMAT =
166                DSTORAGE_COMPRESSION_FORMAT(128u8);
167            #[repr(transparent)]
168            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
169            pub struct DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS(pub u32);
170            impl DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS {
171                pub const fn contains(&self, other: Self) -> bool {
172                    self.0 & other.0 == other.0
173                }
174            }
175            impl core::ops::BitOr for DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS {
176                type Output = Self;
177                fn bitor(self, other: Self) -> Self {
178                    Self(self.0 | other.0)
179                }
180            }
181            impl core::ops::BitAnd for DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS {
182                type Output = Self;
183                fn bitand(self, other: Self) -> Self {
184                    Self(self.0 & other.0)
185                }
186            }
187            impl core::ops::BitOrAssign for DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS {
188                fn bitor_assign(&mut self, other: Self) {
189                    self.0.bitor_assign(other.0)
190                }
191            }
192            impl core::ops::BitAndAssign for DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS {
193                fn bitand_assign(&mut self, other: Self) {
194                    self.0.bitand_assign(other.0)
195                }
196            }
197            impl core::ops::Not for DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS {
198                type Output = Self;
199                fn not(self) -> Self {
200                    Self(self.0.not())
201                }
202            }
203            pub const DSTORAGE_CUSTOM_DECOMPRESSION_FLAG_DEST_IN_UPLOAD_HEAP:
204                DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS = DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS(1u32);
205            pub const DSTORAGE_CUSTOM_DECOMPRESSION_FLAG_NONE: DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS =
206                DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS(0u32);
207            #[repr(C)]
208            #[derive(Clone, Copy, Debug, PartialEq)]
209            pub struct DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST {
210                pub Id: u64,
211                pub CompressionFormat: DSTORAGE_COMPRESSION_FORMAT,
212                pub Reserved: [u8; 3],
213                pub Flags: DSTORAGE_CUSTOM_DECOMPRESSION_FLAGS,
214                pub SrcSize: u64,
215                pub SrcBuffer: *const core::ffi::c_void,
216                pub DstSize: u64,
217                pub DstBuffer: *mut core::ffi::c_void,
218            }
219            impl Default for DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST {
220                fn default() -> Self {
221                    unsafe { core::mem::zeroed() }
222                }
223            }
224            #[repr(C)]
225            #[derive(Clone, Copy, Debug, PartialEq)]
226            pub struct DSTORAGE_CUSTOM_DECOMPRESSION_RESULT {
227                pub Id: u64,
228                pub Result: windows_core::HRESULT,
229            }
230            impl Default for DSTORAGE_CUSTOM_DECOMPRESSION_RESULT {
231                fn default() -> Self {
232                    unsafe { core::mem::zeroed() }
233                }
234            }
235            #[repr(transparent)]
236            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
237            pub struct DSTORAGE_DEBUG(pub i32);
238            impl DSTORAGE_DEBUG {
239                pub const fn contains(&self, other: Self) -> bool {
240                    self.0 & other.0 == other.0
241                }
242            }
243            impl core::ops::BitOr for DSTORAGE_DEBUG {
244                type Output = Self;
245                fn bitor(self, other: Self) -> Self {
246                    Self(self.0 | other.0)
247                }
248            }
249            impl core::ops::BitAnd for DSTORAGE_DEBUG {
250                type Output = Self;
251                fn bitand(self, other: Self) -> Self {
252                    Self(self.0 & other.0)
253                }
254            }
255            impl core::ops::BitOrAssign for DSTORAGE_DEBUG {
256                fn bitor_assign(&mut self, other: Self) {
257                    self.0.bitor_assign(other.0)
258                }
259            }
260            impl core::ops::BitAndAssign for DSTORAGE_DEBUG {
261                fn bitand_assign(&mut self, other: Self) {
262                    self.0.bitand_assign(other.0)
263                }
264            }
265            impl core::ops::Not for DSTORAGE_DEBUG {
266                type Output = Self;
267                fn not(self) -> Self {
268                    Self(self.0.not())
269                }
270            }
271            pub const DSTORAGE_DEBUG_BREAK_ON_ERROR: DSTORAGE_DEBUG = DSTORAGE_DEBUG(2i32);
272            pub const DSTORAGE_DEBUG_NONE: DSTORAGE_DEBUG = DSTORAGE_DEBUG(0i32);
273            pub const DSTORAGE_DEBUG_RECORD_OBJECT_NAMES: DSTORAGE_DEBUG = DSTORAGE_DEBUG(4i32);
274            pub const DSTORAGE_DEBUG_SHOW_ERRORS: DSTORAGE_DEBUG = DSTORAGE_DEBUG(1i32);
275            #[repr(C)]
276            pub union DSTORAGE_DESTINATION {
277                pub Memory: DSTORAGE_DESTINATION_MEMORY,
278                pub Buffer: core::mem::ManuallyDrop<DSTORAGE_DESTINATION_BUFFER>,
279                pub Texture: core::mem::ManuallyDrop<DSTORAGE_DESTINATION_TEXTURE_REGION>,
280                pub MultipleSubresources:
281                    core::mem::ManuallyDrop<DSTORAGE_DESTINATION_MULTIPLE_SUBRESOURCES>,
282                pub Tiles: core::mem::ManuallyDrop<DSTORAGE_DESTINATION_TILES>,
283            }
284            impl Clone for DSTORAGE_DESTINATION {
285                fn clone(&self) -> Self {
286                    unsafe { core::mem::transmute_copy(self) }
287                }
288            }
289            impl Default for DSTORAGE_DESTINATION {
290                fn default() -> Self {
291                    unsafe { core::mem::zeroed() }
292                }
293            }
294            #[repr(C)]
295            #[derive(Clone, Debug, PartialEq)]
296            pub struct DSTORAGE_DESTINATION_BUFFER {
297                pub Resource: core::mem::ManuallyDrop<
298                    Option<windows::Win32::Graphics::Direct3D12::ID3D12Resource>,
299                >,
300                pub Offset: u64,
301                pub Size: u32,
302            }
303            impl Default for DSTORAGE_DESTINATION_BUFFER {
304                fn default() -> Self {
305                    unsafe { core::mem::zeroed() }
306                }
307            }
308            #[repr(C)]
309            #[derive(Clone, Copy, Debug, PartialEq)]
310            pub struct DSTORAGE_DESTINATION_MEMORY {
311                pub Buffer: *mut core::ffi::c_void,
312                pub Size: u32,
313            }
314            impl Default for DSTORAGE_DESTINATION_MEMORY {
315                fn default() -> Self {
316                    unsafe { core::mem::zeroed() }
317                }
318            }
319            #[repr(C)]
320            #[derive(Clone, Debug, PartialEq)]
321            pub struct DSTORAGE_DESTINATION_MULTIPLE_SUBRESOURCES {
322                pub Resource: core::mem::ManuallyDrop<
323                    Option<windows::Win32::Graphics::Direct3D12::ID3D12Resource>,
324                >,
325                pub FirstSubresource: u32,
326            }
327            impl Default for DSTORAGE_DESTINATION_MULTIPLE_SUBRESOURCES {
328                fn default() -> Self {
329                    unsafe { core::mem::zeroed() }
330                }
331            }
332            #[repr(C)]
333            #[derive(Clone, Debug, PartialEq)]
334            pub struct DSTORAGE_DESTINATION_TEXTURE_REGION {
335                pub Resource: core::mem::ManuallyDrop<
336                    Option<windows::Win32::Graphics::Direct3D12::ID3D12Resource>,
337                >,
338                pub SubresourceIndex: u32,
339                pub Region: windows::Win32::Graphics::Direct3D12::D3D12_BOX,
340            }
341            impl Default for DSTORAGE_DESTINATION_TEXTURE_REGION {
342                fn default() -> Self {
343                    unsafe { core::mem::zeroed() }
344                }
345            }
346            #[repr(C)]
347            #[derive(Clone, Debug, PartialEq)]
348            pub struct DSTORAGE_DESTINATION_TILES {
349                pub Resource: core::mem::ManuallyDrop<
350                    Option<windows::Win32::Graphics::Direct3D12::ID3D12Resource>,
351                >,
352                pub TiledRegionStartCoordinate:
353                    windows::Win32::Graphics::Direct3D12::D3D12_TILED_RESOURCE_COORDINATE,
354                pub TileRegionSize: windows::Win32::Graphics::Direct3D12::D3D12_TILE_REGION_SIZE,
355            }
356            impl Default for DSTORAGE_DESTINATION_TILES {
357                fn default() -> Self {
358                    unsafe { core::mem::zeroed() }
359                }
360            }
361            pub const DSTORAGE_DISABLE_BUILTIN_CPU_DECOMPRESSION: i32 = -1i32;
362            #[repr(C)]
363            pub struct DSTORAGE_ERROR_FIRST_FAILURE {
364                pub HResult: windows_core::HRESULT,
365                pub CommandType: DSTORAGE_COMMAND_TYPE,
366                pub Anonymous: DSTORAGE_ERROR_FIRST_FAILURE_0,
367            }
368            impl Clone for DSTORAGE_ERROR_FIRST_FAILURE {
369                fn clone(&self) -> Self {
370                    unsafe { core::mem::transmute_copy(self) }
371                }
372            }
373            impl Default for DSTORAGE_ERROR_FIRST_FAILURE {
374                fn default() -> Self {
375                    unsafe { core::mem::zeroed() }
376                }
377            }
378            #[repr(C)]
379            pub union DSTORAGE_ERROR_FIRST_FAILURE_0 {
380                pub Request: core::mem::ManuallyDrop<DSTORAGE_ERROR_PARAMETERS_REQUEST>,
381                pub Status: core::mem::ManuallyDrop<DSTORAGE_ERROR_PARAMETERS_STATUS>,
382                pub Signal: core::mem::ManuallyDrop<DSTORAGE_ERROR_PARAMETERS_SIGNAL>,
383                pub Event: DSTORAGE_ERROR_PARAMETERS_EVENT,
384            }
385            impl Clone for DSTORAGE_ERROR_FIRST_FAILURE_0 {
386                fn clone(&self) -> Self {
387                    unsafe { core::mem::transmute_copy(self) }
388                }
389            }
390            impl Default for DSTORAGE_ERROR_FIRST_FAILURE_0 {
391                fn default() -> Self {
392                    unsafe { core::mem::zeroed() }
393                }
394            }
395            #[repr(C)]
396            #[derive(Clone, Copy, Debug, PartialEq)]
397            pub struct DSTORAGE_ERROR_PARAMETERS_EVENT {
398                pub Handle: windows::Win32::Foundation::HANDLE,
399            }
400            impl Default for DSTORAGE_ERROR_PARAMETERS_EVENT {
401                fn default() -> Self {
402                    unsafe { core::mem::zeroed() }
403                }
404            }
405            #[repr(C)]
406            pub struct DSTORAGE_ERROR_PARAMETERS_REQUEST {
407                pub Filename: [u16; 260],
408                pub RequestName: [i8; 64],
409                pub Request: DSTORAGE_REQUEST,
410            }
411            impl Clone for DSTORAGE_ERROR_PARAMETERS_REQUEST {
412                fn clone(&self) -> Self {
413                    unsafe { core::mem::transmute_copy(self) }
414                }
415            }
416            impl Default for DSTORAGE_ERROR_PARAMETERS_REQUEST {
417                fn default() -> Self {
418                    unsafe { core::mem::zeroed() }
419                }
420            }
421            #[repr(C)]
422            #[derive(Clone, Debug, PartialEq)]
423            pub struct DSTORAGE_ERROR_PARAMETERS_SIGNAL {
424                pub Fence: core::mem::ManuallyDrop<
425                    Option<windows::Win32::Graphics::Direct3D12::ID3D12Fence>,
426                >,
427                pub Value: u64,
428            }
429            impl Default for DSTORAGE_ERROR_PARAMETERS_SIGNAL {
430                fn default() -> Self {
431                    unsafe { core::mem::zeroed() }
432                }
433            }
434            #[repr(C)]
435            #[derive(Clone, Debug, PartialEq)]
436            pub struct DSTORAGE_ERROR_PARAMETERS_STATUS {
437                pub StatusArray: core::mem::ManuallyDrop<Option<IDStorageStatusArray>>,
438                pub Index: u32,
439            }
440            impl Default for DSTORAGE_ERROR_PARAMETERS_STATUS {
441                fn default() -> Self {
442                    unsafe { core::mem::zeroed() }
443                }
444            }
445            #[repr(C)]
446            pub struct DSTORAGE_ERROR_RECORD {
447                pub FailureCount: u32,
448                pub FirstFailure: DSTORAGE_ERROR_FIRST_FAILURE,
449            }
450            impl Clone for DSTORAGE_ERROR_RECORD {
451                fn clone(&self) -> Self {
452                    unsafe { core::mem::transmute_copy(self) }
453                }
454            }
455            impl Default for DSTORAGE_ERROR_RECORD {
456                fn default() -> Self {
457                    unsafe { core::mem::zeroed() }
458                }
459            }
460            #[repr(transparent)]
461            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
462            pub struct DSTORAGE_GET_REQUEST_FLAGS(pub u32);
463            impl DSTORAGE_GET_REQUEST_FLAGS {
464                pub const fn contains(&self, other: Self) -> bool {
465                    self.0 & other.0 == other.0
466                }
467            }
468            impl core::ops::BitOr for DSTORAGE_GET_REQUEST_FLAGS {
469                type Output = Self;
470                fn bitor(self, other: Self) -> Self {
471                    Self(self.0 | other.0)
472                }
473            }
474            impl core::ops::BitAnd for DSTORAGE_GET_REQUEST_FLAGS {
475                type Output = Self;
476                fn bitand(self, other: Self) -> Self {
477                    Self(self.0 & other.0)
478                }
479            }
480            impl core::ops::BitOrAssign for DSTORAGE_GET_REQUEST_FLAGS {
481                fn bitor_assign(&mut self, other: Self) {
482                    self.0.bitor_assign(other.0)
483                }
484            }
485            impl core::ops::BitAndAssign for DSTORAGE_GET_REQUEST_FLAGS {
486                fn bitand_assign(&mut self, other: Self) {
487                    self.0.bitand_assign(other.0)
488                }
489            }
490            impl core::ops::Not for DSTORAGE_GET_REQUEST_FLAGS {
491                type Output = Self;
492                fn not(self) -> Self {
493                    Self(self.0.not())
494                }
495            }
496            pub const DSTORAGE_GET_REQUEST_FLAG_SELECT_ALL: DSTORAGE_GET_REQUEST_FLAGS =
497                DSTORAGE_GET_REQUEST_FLAGS(3u32);
498            pub const DSTORAGE_GET_REQUEST_FLAG_SELECT_BUILTIN: DSTORAGE_GET_REQUEST_FLAGS =
499                DSTORAGE_GET_REQUEST_FLAGS(2u32);
500            pub const DSTORAGE_GET_REQUEST_FLAG_SELECT_CUSTOM: DSTORAGE_GET_REQUEST_FLAGS =
501                DSTORAGE_GET_REQUEST_FLAGS(1u32);
502            pub const DSTORAGE_MAX_QUEUE_CAPACITY: u32 = 8192u32;
503            pub const DSTORAGE_MIN_QUEUE_CAPACITY: u32 = 128u32;
504            #[repr(transparent)]
505            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
506            pub struct DSTORAGE_PRIORITY(pub i8);
507            pub const DSTORAGE_PRIORITY_COUNT: DSTORAGE_PRIORITY = DSTORAGE_PRIORITY(4i8);
508            pub const DSTORAGE_PRIORITY_FIRST: DSTORAGE_PRIORITY = DSTORAGE_PRIORITY(-1i8);
509            pub const DSTORAGE_PRIORITY_HIGH: DSTORAGE_PRIORITY = DSTORAGE_PRIORITY(1i8);
510            pub const DSTORAGE_PRIORITY_LAST: DSTORAGE_PRIORITY = DSTORAGE_PRIORITY(2i8);
511            pub const DSTORAGE_PRIORITY_LOW: DSTORAGE_PRIORITY = DSTORAGE_PRIORITY(-1i8);
512            pub const DSTORAGE_PRIORITY_NORMAL: DSTORAGE_PRIORITY = DSTORAGE_PRIORITY(0i8);
513            pub const DSTORAGE_PRIORITY_REALTIME: DSTORAGE_PRIORITY = DSTORAGE_PRIORITY(2i8);
514            #[repr(C)]
515            #[derive(Clone, Debug, PartialEq)]
516            pub struct DSTORAGE_QUEUE_DESC {
517                pub SourceType: DSTORAGE_REQUEST_SOURCE_TYPE,
518                pub Capacity: u16,
519                pub Priority: DSTORAGE_PRIORITY,
520                pub Name: windows_core::PCSTR,
521                pub Device: core::mem::ManuallyDrop<
522                    Option<windows::Win32::Graphics::Direct3D12::ID3D12Device>,
523                >,
524            }
525            impl Default for DSTORAGE_QUEUE_DESC {
526                fn default() -> Self {
527                    unsafe { core::mem::zeroed() }
528                }
529            }
530            #[repr(C)]
531            #[derive(Clone, Debug, PartialEq)]
532            pub struct DSTORAGE_QUEUE_INFO {
533                pub Desc: DSTORAGE_QUEUE_DESC,
534                pub EmptySlotCount: u16,
535                pub RequestCountUntilAutoSubmit: u16,
536            }
537            impl Default for DSTORAGE_QUEUE_INFO {
538                fn default() -> Self {
539                    unsafe { core::mem::zeroed() }
540                }
541            }
542            #[repr(C)]
543            pub struct DSTORAGE_REQUEST {
544                pub Options: DSTORAGE_REQUEST_OPTIONS,
545                pub Source: DSTORAGE_SOURCE,
546                pub Destination: DSTORAGE_DESTINATION,
547                pub UncompressedSize: u32,
548                pub CancellationTag: u64,
549                pub Name: windows_core::PCSTR,
550            }
551            impl Clone for DSTORAGE_REQUEST {
552                fn clone(&self) -> Self {
553                    unsafe { core::mem::transmute_copy(self) }
554                }
555            }
556            impl Default for DSTORAGE_REQUEST {
557                fn default() -> Self {
558                    unsafe { core::mem::zeroed() }
559                }
560            }
561            pub const DSTORAGE_REQUEST_DESTINATION_BUFFER: DSTORAGE_REQUEST_DESTINATION_TYPE =
562                DSTORAGE_REQUEST_DESTINATION_TYPE(1u64);
563            pub const DSTORAGE_REQUEST_DESTINATION_MEMORY: DSTORAGE_REQUEST_DESTINATION_TYPE =
564                DSTORAGE_REQUEST_DESTINATION_TYPE(0u64);
565            pub const DSTORAGE_REQUEST_DESTINATION_MULTIPLE_SUBRESOURCES:
566                DSTORAGE_REQUEST_DESTINATION_TYPE = DSTORAGE_REQUEST_DESTINATION_TYPE(3u64);
567            pub const DSTORAGE_REQUEST_DESTINATION_TEXTURE_REGION:
568                DSTORAGE_REQUEST_DESTINATION_TYPE = DSTORAGE_REQUEST_DESTINATION_TYPE(2u64);
569            pub const DSTORAGE_REQUEST_DESTINATION_TILES: DSTORAGE_REQUEST_DESTINATION_TYPE =
570                DSTORAGE_REQUEST_DESTINATION_TYPE(4u64);
571            #[repr(transparent)]
572            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
573            pub struct DSTORAGE_REQUEST_DESTINATION_TYPE(pub u64);
574            pub const DSTORAGE_REQUEST_MAX_NAME: u32 = 64u32;
575            #[repr(C)]
576            #[derive(Clone, Copy, Debug, PartialEq)]
577            pub struct DSTORAGE_REQUEST_OPTIONS {
578                pub _bitfield1: u8,
579                pub Reserved1: [u8; 7],
580                pub _bitfield2: u64,
581            }
582            impl Default for DSTORAGE_REQUEST_OPTIONS {
583                fn default() -> Self {
584                    unsafe { core::mem::zeroed() }
585                }
586            }
587            pub const DSTORAGE_REQUEST_SOURCE_FILE: DSTORAGE_REQUEST_SOURCE_TYPE =
588                DSTORAGE_REQUEST_SOURCE_TYPE(0u64);
589            pub const DSTORAGE_REQUEST_SOURCE_MEMORY: DSTORAGE_REQUEST_SOURCE_TYPE =
590                DSTORAGE_REQUEST_SOURCE_TYPE(1u64);
591            #[repr(transparent)]
592            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
593            pub struct DSTORAGE_REQUEST_SOURCE_TYPE(pub u64);
594            pub const DSTORAGE_SDK_VERSION: u32 = 202u32;
595            #[repr(C)]
596            pub union DSTORAGE_SOURCE {
597                pub Memory: DSTORAGE_SOURCE_MEMORY,
598                pub File: core::mem::ManuallyDrop<DSTORAGE_SOURCE_FILE>,
599            }
600            impl Clone for DSTORAGE_SOURCE {
601                fn clone(&self) -> Self {
602                    unsafe { core::mem::transmute_copy(self) }
603                }
604            }
605            impl Default for DSTORAGE_SOURCE {
606                fn default() -> Self {
607                    unsafe { core::mem::zeroed() }
608                }
609            }
610            #[repr(C)]
611            #[derive(Clone, Debug, PartialEq)]
612            pub struct DSTORAGE_SOURCE_FILE {
613                pub Source: core::mem::ManuallyDrop<Option<IDStorageFile>>,
614                pub Offset: u64,
615                pub Size: u32,
616            }
617            impl Default for DSTORAGE_SOURCE_FILE {
618                fn default() -> Self {
619                    unsafe { core::mem::zeroed() }
620                }
621            }
622            #[repr(C)]
623            #[derive(Clone, Copy, Debug, PartialEq)]
624            pub struct DSTORAGE_SOURCE_MEMORY {
625                pub Source: *const core::ffi::c_void,
626                pub Size: u32,
627            }
628            impl Default for DSTORAGE_SOURCE_MEMORY {
629                fn default() -> Self {
630                    unsafe { core::mem::zeroed() }
631                }
632            }
633            #[repr(transparent)]
634            #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
635            pub struct DSTORAGE_STAGING_BUFFER_SIZE(pub u32);
636            pub const DSTORAGE_STAGING_BUFFER_SIZE_0: DSTORAGE_STAGING_BUFFER_SIZE =
637                DSTORAGE_STAGING_BUFFER_SIZE(0u32);
638            pub const DSTORAGE_STAGING_BUFFER_SIZE_32MB: DSTORAGE_STAGING_BUFFER_SIZE =
639                DSTORAGE_STAGING_BUFFER_SIZE(33554432u32);
640            pub const E_DSTORAGE_ACCESS_VIOLATION: windows_core::HRESULT =
641                windows_core::HRESULT(0x89240009_u32 as _);
642            pub const E_DSTORAGE_ALREADY_RUNNING: windows_core::HRESULT =
643                windows_core::HRESULT(0x89240001_u32 as _);
644            pub const E_DSTORAGE_BCPACK_BAD_DATA: windows_core::HRESULT =
645                windows_core::HRESULT(0x89240035_u32 as _);
646            pub const E_DSTORAGE_BCPACK_BAD_HEADER: windows_core::HRESULT =
647                windows_core::HRESULT(0x89240034_u32 as _);
648            pub const E_DSTORAGE_COMPRESSED_DATA_TOO_LARGE: windows_core::HRESULT =
649                windows_core::HRESULT(0x89240039_u32 as _);
650            pub const E_DSTORAGE_DECOMPRESSION_ERROR: windows_core::HRESULT =
651                windows_core::HRESULT(0x89240030_u32 as _);
652            pub const E_DSTORAGE_DECRYPTION_ERROR: windows_core::HRESULT =
653                windows_core::HRESULT(0x89240036_u32 as _);
654            pub const E_DSTORAGE_DEPRECATED_PREVIEW_GDK: windows_core::HRESULT =
655                windows_core::HRESULT(0x89240018_u32 as _);
656            pub const E_DSTORAGE_END_OF_FILE: windows_core::HRESULT =
657                windows_core::HRESULT(0x89240007_u32 as _);
658            pub const E_DSTORAGE_FILEBUFFERING_REQUIRES_DISABLED_BYPASSIO: windows_core::HRESULT =
659                windows_core::HRESULT(0x89240041_u32 as _);
660            pub const E_DSTORAGE_FILE_NOT_OPEN: windows_core::HRESULT =
661                windows_core::HRESULT(0x8924000B_u32 as _);
662            pub const E_DSTORAGE_FILE_TOO_FRAGMENTED: windows_core::HRESULT =
663                windows_core::HRESULT(0x89240038_u32 as _);
664            pub const E_DSTORAGE_INDEX_BOUND: windows_core::HRESULT =
665                windows_core::HRESULT(0x89240015_u32 as _);
666            pub const E_DSTORAGE_INVALID_BCPACK_MODE: windows_core::HRESULT =
667                windows_core::HRESULT(0x8924000D_u32 as _);
668            pub const E_DSTORAGE_INVALID_CLUSTER_SIZE: windows_core::HRESULT =
669                windows_core::HRESULT(0x89240011_u32 as _);
670            pub const E_DSTORAGE_INVALID_DESTINATION_SIZE: windows_core::HRESULT =
671                windows_core::HRESULT(0x8924000F_u32 as _);
672            pub const E_DSTORAGE_INVALID_DESTINATION_TYPE: windows_core::HRESULT =
673                windows_core::HRESULT(0x89240040_u32 as _);
674            pub const E_DSTORAGE_INVALID_FENCE: windows_core::HRESULT =
675                windows_core::HRESULT(0x89240022_u32 as _);
676            pub const E_DSTORAGE_INVALID_FILE_HANDLE: windows_core::HRESULT =
677                windows_core::HRESULT(0x89240017_u32 as _);
678            pub const E_DSTORAGE_INVALID_FILE_OFFSET: windows_core::HRESULT =
679                windows_core::HRESULT(0x8924001A_u32 as _);
680            pub const E_DSTORAGE_INVALID_INTERMEDIATE_SIZE: windows_core::HRESULT =
681                windows_core::HRESULT(0x8924001C_u32 as _);
682            pub const E_DSTORAGE_INVALID_MEMORY_QUEUE_PRIORITY: windows_core::HRESULT =
683                windows_core::HRESULT(0x89240024_u32 as _);
684            pub const E_DSTORAGE_INVALID_QUEUE_CAPACITY: windows_core::HRESULT =
685                windows_core::HRESULT(0x89240003_u32 as _);
686            pub const E_DSTORAGE_INVALID_QUEUE_PRIORITY: windows_core::HRESULT =
687                windows_core::HRESULT(0x89240013_u32 as _);
688            pub const E_DSTORAGE_INVALID_SOURCE_TYPE: windows_core::HRESULT =
689                windows_core::HRESULT(0x8924001B_u32 as _);
690            pub const E_DSTORAGE_INVALID_STAGING_BUFFER_SIZE: windows_core::HRESULT =
691                windows_core::HRESULT(0x89240020_u32 as _);
692            pub const E_DSTORAGE_INVALID_STATUS_ARRAY: windows_core::HRESULT =
693                windows_core::HRESULT(0x89240023_u32 as _);
694            pub const E_DSTORAGE_INVALID_SWIZZLE_MODE: windows_core::HRESULT =
695                windows_core::HRESULT(0x8924000E_u32 as _);
696            pub const E_DSTORAGE_IO_TIMEOUT: windows_core::HRESULT =
697                windows_core::HRESULT(0x89240016_u32 as _);
698            pub const E_DSTORAGE_NOT_RUNNING: windows_core::HRESULT =
699                windows_core::HRESULT(0x89240002_u32 as _);
700            pub const E_DSTORAGE_PASSTHROUGH_ERROR: windows_core::HRESULT =
701                windows_core::HRESULT(0x89240037_u32 as _);
702            pub const E_DSTORAGE_QUEUE_CLOSED: windows_core::HRESULT =
703                windows_core::HRESULT(0x89240010_u32 as _);
704            pub const E_DSTORAGE_REQUEST_TOO_LARGE: windows_core::HRESULT =
705                windows_core::HRESULT(0x89240008_u32 as _);
706            pub const E_DSTORAGE_RESERVED_FIELDS: windows_core::HRESULT =
707                windows_core::HRESULT(0x8924000C_u32 as _);
708            pub const E_DSTORAGE_STAGING_BUFFER_LOCKED: windows_core::HRESULT =
709                windows_core::HRESULT(0x8924001F_u32 as _);
710            pub const E_DSTORAGE_STAGING_BUFFER_TOO_SMALL: windows_core::HRESULT =
711                windows_core::HRESULT(0x89240021_u32 as _);
712            pub const E_DSTORAGE_SYSTEM_NOT_SUPPORTED: windows_core::HRESULT =
713                windows_core::HRESULT(0x8924001D_u32 as _);
714            pub const E_DSTORAGE_TOO_MANY_FILES: windows_core::HRESULT =
715                windows_core::HRESULT(0x89240014_u32 as _);
716            pub const E_DSTORAGE_TOO_MANY_QUEUES: windows_core::HRESULT =
717                windows_core::HRESULT(0x89240012_u32 as _);
718            pub const E_DSTORAGE_UNSUPPORTED_FILE: windows_core::HRESULT =
719                windows_core::HRESULT(0x8924000A_u32 as _);
720            pub const E_DSTORAGE_UNSUPPORTED_VOLUME: windows_core::HRESULT =
721                windows_core::HRESULT(0x89240005_u32 as _);
722            pub const E_DSTORAGE_XVD_DEVICE_NOT_SUPPORTED: windows_core::HRESULT =
723                windows_core::HRESULT(0x89240004_u32 as _);
724            pub const E_DSTORAGE_XVD_NOT_REGISTERED: windows_core::HRESULT =
725                windows_core::HRESULT(0x89240019_u32 as _);
726            pub const E_DSTORAGE_ZLIB_BAD_DATA: windows_core::HRESULT =
727                windows_core::HRESULT(0x89240032_u32 as _);
728            pub const E_DSTORAGE_ZLIB_BAD_HEADER: windows_core::HRESULT =
729                windows_core::HRESULT(0x89240031_u32 as _);
730            pub const E_DSTORAGE_ZLIB_PARITY_FAIL: windows_core::HRESULT =
731                windows_core::HRESULT(0x89240033_u32 as _);
732            pub const FACILITY_GAME: u32 = 2340u32;
733            windows_core::imp::define_interface!(
734                IDStorageCompressionCodec,
735                IDStorageCompressionCodec_Vtbl,
736                0x84ef5121_9b43_4d03_b5c1_cc34606b262d
737            );
738            windows_core::imp::interface_hierarchy!(
739                IDStorageCompressionCodec,
740                windows_core::IUnknown
741            );
742            impl IDStorageCompressionCodec {
743                pub unsafe fn CompressBuffer(
744                    &self,
745                    uncompresseddata: *const core::ffi::c_void,
746                    uncompresseddatasize: usize,
747                    compressionsetting: DSTORAGE_COMPRESSION,
748                    compressedbuffer: *mut core::ffi::c_void,
749                    compressedbuffersize: usize,
750                    compresseddatasize: *mut usize,
751                ) -> windows_core::Result<()> {
752                    unsafe {
753                        (windows_core::Interface::vtable(self).CompressBuffer)(
754                            windows_core::Interface::as_raw(self),
755                            uncompresseddata,
756                            uncompresseddatasize,
757                            compressionsetting,
758                            compressedbuffer as _,
759                            compressedbuffersize,
760                            compresseddatasize as _,
761                        )
762                        .ok()
763                    }
764                }
765                pub unsafe fn DecompressBuffer(
766                    &self,
767                    compresseddata: *const core::ffi::c_void,
768                    compresseddatasize: usize,
769                    uncompressedbuffer: *mut core::ffi::c_void,
770                    uncompressedbuffersize: usize,
771                    uncompresseddatasize: *mut usize,
772                ) -> windows_core::Result<()> {
773                    unsafe {
774                        (windows_core::Interface::vtable(self).DecompressBuffer)(
775                            windows_core::Interface::as_raw(self),
776                            compresseddata,
777                            compresseddatasize,
778                            uncompressedbuffer as _,
779                            uncompressedbuffersize,
780                            uncompresseddatasize as _,
781                        )
782                        .ok()
783                    }
784                }
785                pub unsafe fn CompressBufferBound(&self, uncompresseddatasize: usize) -> usize {
786                    unsafe {
787                        (windows_core::Interface::vtable(self).CompressBufferBound)(
788                            windows_core::Interface::as_raw(self),
789                            uncompresseddatasize,
790                        )
791                    }
792                }
793            }
794            #[repr(C)]
795            pub struct IDStorageCompressionCodec_Vtbl {
796                pub base__: windows_core::IUnknown_Vtbl,
797                pub CompressBuffer: unsafe extern "system" fn(
798                    *mut core::ffi::c_void,
799                    *const core::ffi::c_void,
800                    usize,
801                    DSTORAGE_COMPRESSION,
802                    *mut core::ffi::c_void,
803                    usize,
804                    *mut usize,
805                )
806                    -> windows_core::HRESULT,
807                pub DecompressBuffer: unsafe extern "system" fn(
808                    *mut core::ffi::c_void,
809                    *const core::ffi::c_void,
810                    usize,
811                    *mut core::ffi::c_void,
812                    usize,
813                    *mut usize,
814                )
815                    -> windows_core::HRESULT,
816                pub CompressBufferBound:
817                    unsafe extern "system" fn(*mut core::ffi::c_void, usize) -> usize,
818            }
819            pub trait IDStorageCompressionCodec_Impl: windows_core::IUnknownImpl {
820                fn CompressBuffer(
821                    &self,
822                    uncompresseddata: *const core::ffi::c_void,
823                    uncompresseddatasize: usize,
824                    compressionsetting: DSTORAGE_COMPRESSION,
825                    compressedbuffer: *mut core::ffi::c_void,
826                    compressedbuffersize: usize,
827                    compresseddatasize: *mut usize,
828                ) -> windows_core::Result<()>;
829                fn DecompressBuffer(
830                    &self,
831                    compresseddata: *const core::ffi::c_void,
832                    compresseddatasize: usize,
833                    uncompressedbuffer: *mut core::ffi::c_void,
834                    uncompressedbuffersize: usize,
835                    uncompresseddatasize: *mut usize,
836                ) -> windows_core::Result<()>;
837                fn CompressBufferBound(&self, uncompresseddatasize: usize) -> usize;
838            }
839            impl IDStorageCompressionCodec_Vtbl {
840                pub const fn new<Identity: IDStorageCompressionCodec_Impl, const OFFSET: isize>(
841                ) -> Self {
842                    unsafe extern "system" fn CompressBuffer<
843                        Identity: IDStorageCompressionCodec_Impl,
844                        const OFFSET: isize,
845                    >(
846                        this: *mut core::ffi::c_void,
847                        uncompresseddata: *const core::ffi::c_void,
848                        uncompresseddatasize: usize,
849                        compressionsetting: DSTORAGE_COMPRESSION,
850                        compressedbuffer: *mut core::ffi::c_void,
851                        compressedbuffersize: usize,
852                        compresseddatasize: *mut usize,
853                    ) -> windows_core::HRESULT {
854                        unsafe {
855                            let this: &Identity =
856                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
857                            IDStorageCompressionCodec_Impl::CompressBuffer(
858                                this,
859                                core::mem::transmute_copy(&uncompresseddata),
860                                core::mem::transmute_copy(&uncompresseddatasize),
861                                core::mem::transmute_copy(&compressionsetting),
862                                core::mem::transmute_copy(&compressedbuffer),
863                                core::mem::transmute_copy(&compressedbuffersize),
864                                core::mem::transmute_copy(&compresseddatasize),
865                            )
866                            .into()
867                        }
868                    }
869                    unsafe extern "system" fn DecompressBuffer<
870                        Identity: IDStorageCompressionCodec_Impl,
871                        const OFFSET: isize,
872                    >(
873                        this: *mut core::ffi::c_void,
874                        compresseddata: *const core::ffi::c_void,
875                        compresseddatasize: usize,
876                        uncompressedbuffer: *mut core::ffi::c_void,
877                        uncompressedbuffersize: usize,
878                        uncompresseddatasize: *mut usize,
879                    ) -> windows_core::HRESULT {
880                        unsafe {
881                            let this: &Identity =
882                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
883                            IDStorageCompressionCodec_Impl::DecompressBuffer(
884                                this,
885                                core::mem::transmute_copy(&compresseddata),
886                                core::mem::transmute_copy(&compresseddatasize),
887                                core::mem::transmute_copy(&uncompressedbuffer),
888                                core::mem::transmute_copy(&uncompressedbuffersize),
889                                core::mem::transmute_copy(&uncompresseddatasize),
890                            )
891                            .into()
892                        }
893                    }
894                    unsafe extern "system" fn CompressBufferBound<
895                        Identity: IDStorageCompressionCodec_Impl,
896                        const OFFSET: isize,
897                    >(
898                        this: *mut core::ffi::c_void,
899                        uncompresseddatasize: usize,
900                    ) -> usize {
901                        unsafe {
902                            let this: &Identity =
903                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
904                            IDStorageCompressionCodec_Impl::CompressBufferBound(
905                                this,
906                                core::mem::transmute_copy(&uncompresseddatasize),
907                            )
908                        }
909                    }
910                    Self {
911                        base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
912                        CompressBuffer: CompressBuffer::<Identity, OFFSET>,
913                        DecompressBuffer: DecompressBuffer::<Identity, OFFSET>,
914                        CompressBufferBound: CompressBufferBound::<Identity, OFFSET>,
915                    }
916                }
917                pub fn matches(iid: &windows_core::GUID) -> bool {
918                    iid == &<IDStorageCompressionCodec as windows_core::Interface>::IID
919                }
920            }
921            impl windows_core::RuntimeName for IDStorageCompressionCodec {}
922            windows_core::imp::define_interface!(
923                IDStorageCustomDecompressionQueue,
924                IDStorageCustomDecompressionQueue_Vtbl,
925                0x97179b2f_2c21_49ca_8291_4e1bf4a160df
926            );
927            windows_core::imp::interface_hierarchy!(
928                IDStorageCustomDecompressionQueue,
929                windows_core::IUnknown
930            );
931            impl IDStorageCustomDecompressionQueue {
932                pub unsafe fn GetEvent(&self) -> windows::Win32::Foundation::HANDLE {
933                    unsafe {
934                        (windows_core::Interface::vtable(self).GetEvent)(
935                            windows_core::Interface::as_raw(self),
936                        )
937                    }
938                }
939                pub unsafe fn GetRequests(
940                    &self,
941                    requests: &mut [DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST],
942                    numrequests: *mut u32,
943                ) -> windows_core::Result<()> {
944                    unsafe {
945                        (windows_core::Interface::vtable(self).GetRequests)(
946                            windows_core::Interface::as_raw(self),
947                            requests.len().try_into().unwrap(),
948                            core::mem::transmute(requests.as_ptr()),
949                            numrequests as _,
950                        )
951                        .ok()
952                    }
953                }
954                pub unsafe fn SetRequestResults(
955                    &self,
956                    results: &[DSTORAGE_CUSTOM_DECOMPRESSION_RESULT],
957                ) -> windows_core::Result<()> {
958                    unsafe {
959                        (windows_core::Interface::vtable(self).SetRequestResults)(
960                            windows_core::Interface::as_raw(self),
961                            results.len().try_into().unwrap(),
962                            core::mem::transmute(results.as_ptr()),
963                        )
964                        .ok()
965                    }
966                }
967            }
968            #[repr(C)]
969            pub struct IDStorageCustomDecompressionQueue_Vtbl {
970                pub base__: windows_core::IUnknown_Vtbl,
971                pub GetEvent: unsafe extern "system" fn(
972                    *mut core::ffi::c_void,
973                )
974                    -> windows::Win32::Foundation::HANDLE,
975                pub GetRequests: unsafe extern "system" fn(
976                    *mut core::ffi::c_void,
977                    u32,
978                    *mut DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST,
979                    *mut u32,
980                )
981                    -> windows_core::HRESULT,
982                pub SetRequestResults: unsafe extern "system" fn(
983                    *mut core::ffi::c_void,
984                    u32,
985                    *const DSTORAGE_CUSTOM_DECOMPRESSION_RESULT,
986                )
987                    -> windows_core::HRESULT,
988            }
989            pub trait IDStorageCustomDecompressionQueue_Impl: windows_core::IUnknownImpl {
990                fn GetEvent(&self) -> windows::Win32::Foundation::HANDLE;
991                fn GetRequests(
992                    &self,
993                    maxrequests: u32,
994                    requests: *mut DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST,
995                    numrequests: *mut u32,
996                ) -> windows_core::Result<()>;
997                fn SetRequestResults(
998                    &self,
999                    numresults: u32,
1000                    results: *const DSTORAGE_CUSTOM_DECOMPRESSION_RESULT,
1001                ) -> windows_core::Result<()>;
1002            }
1003            impl IDStorageCustomDecompressionQueue_Vtbl {
1004                pub const fn new<
1005                    Identity: IDStorageCustomDecompressionQueue_Impl,
1006                    const OFFSET: isize,
1007                >() -> Self {
1008                    unsafe extern "system" fn GetEvent<
1009                        Identity: IDStorageCustomDecompressionQueue_Impl,
1010                        const OFFSET: isize,
1011                    >(
1012                        this: *mut core::ffi::c_void,
1013                    ) -> windows::Win32::Foundation::HANDLE {
1014                        unsafe {
1015                            let this: &Identity =
1016                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1017                            IDStorageCustomDecompressionQueue_Impl::GetEvent(this)
1018                        }
1019                    }
1020                    unsafe extern "system" fn GetRequests<
1021                        Identity: IDStorageCustomDecompressionQueue_Impl,
1022                        const OFFSET: isize,
1023                    >(
1024                        this: *mut core::ffi::c_void,
1025                        maxrequests: u32,
1026                        requests: *mut DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST,
1027                        numrequests: *mut u32,
1028                    ) -> windows_core::HRESULT {
1029                        unsafe {
1030                            let this: &Identity =
1031                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1032                            IDStorageCustomDecompressionQueue_Impl::GetRequests(
1033                                this,
1034                                core::mem::transmute_copy(&maxrequests),
1035                                core::mem::transmute_copy(&requests),
1036                                core::mem::transmute_copy(&numrequests),
1037                            )
1038                            .into()
1039                        }
1040                    }
1041                    unsafe extern "system" fn SetRequestResults<
1042                        Identity: IDStorageCustomDecompressionQueue_Impl,
1043                        const OFFSET: isize,
1044                    >(
1045                        this: *mut core::ffi::c_void,
1046                        numresults: u32,
1047                        results: *const DSTORAGE_CUSTOM_DECOMPRESSION_RESULT,
1048                    ) -> windows_core::HRESULT {
1049                        unsafe {
1050                            let this: &Identity =
1051                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1052                            IDStorageCustomDecompressionQueue_Impl::SetRequestResults(
1053                                this,
1054                                core::mem::transmute_copy(&numresults),
1055                                core::mem::transmute_copy(&results),
1056                            )
1057                            .into()
1058                        }
1059                    }
1060                    Self {
1061                        base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
1062                        GetEvent: GetEvent::<Identity, OFFSET>,
1063                        GetRequests: GetRequests::<Identity, OFFSET>,
1064                        SetRequestResults: SetRequestResults::<Identity, OFFSET>,
1065                    }
1066                }
1067                pub fn matches(iid: &windows_core::GUID) -> bool {
1068                    iid == &<IDStorageCustomDecompressionQueue as windows_core::Interface>::IID
1069                }
1070            }
1071            impl windows_core::RuntimeName for IDStorageCustomDecompressionQueue {}
1072            windows_core::imp::define_interface!(
1073                IDStorageCustomDecompressionQueue1,
1074                IDStorageCustomDecompressionQueue1_Vtbl,
1075                0x0d47c6c9_e61a_4706_93b4_68bfe3f4aa4a
1076            );
1077            impl core::ops::Deref for IDStorageCustomDecompressionQueue1 {
1078                type Target = IDStorageCustomDecompressionQueue;
1079                fn deref(&self) -> &Self::Target {
1080                    unsafe { core::mem::transmute(self) }
1081                }
1082            }
1083            windows_core::imp::interface_hierarchy!(
1084                IDStorageCustomDecompressionQueue1,
1085                windows_core::IUnknown,
1086                IDStorageCustomDecompressionQueue
1087            );
1088            impl IDStorageCustomDecompressionQueue1 {
1089                pub unsafe fn GetRequests1(
1090                    &self,
1091                    flags: DSTORAGE_GET_REQUEST_FLAGS,
1092                    requests: &mut [DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST],
1093                    numrequests: *mut u32,
1094                ) -> windows_core::Result<()> {
1095                    unsafe {
1096                        (windows_core::Interface::vtable(self).GetRequests1)(
1097                            windows_core::Interface::as_raw(self),
1098                            flags,
1099                            requests.len().try_into().unwrap(),
1100                            core::mem::transmute(requests.as_ptr()),
1101                            numrequests as _,
1102                        )
1103                        .ok()
1104                    }
1105                }
1106            }
1107            #[repr(C)]
1108            pub struct IDStorageCustomDecompressionQueue1_Vtbl {
1109                pub base__: IDStorageCustomDecompressionQueue_Vtbl,
1110                pub GetRequests1: unsafe extern "system" fn(
1111                    *mut core::ffi::c_void,
1112                    DSTORAGE_GET_REQUEST_FLAGS,
1113                    u32,
1114                    *mut DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST,
1115                    *mut u32,
1116                )
1117                    -> windows_core::HRESULT,
1118            }
1119            pub trait IDStorageCustomDecompressionQueue1_Impl:
1120                IDStorageCustomDecompressionQueue_Impl
1121            {
1122                fn GetRequests1(
1123                    &self,
1124                    flags: DSTORAGE_GET_REQUEST_FLAGS,
1125                    maxrequests: u32,
1126                    requests: *mut DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST,
1127                    numrequests: *mut u32,
1128                ) -> windows_core::Result<()>;
1129            }
1130            impl IDStorageCustomDecompressionQueue1_Vtbl {
1131                pub const fn new<
1132                    Identity: IDStorageCustomDecompressionQueue1_Impl,
1133                    const OFFSET: isize,
1134                >() -> Self {
1135                    unsafe extern "system" fn GetRequests1<
1136                        Identity: IDStorageCustomDecompressionQueue1_Impl,
1137                        const OFFSET: isize,
1138                    >(
1139                        this: *mut core::ffi::c_void,
1140                        flags: DSTORAGE_GET_REQUEST_FLAGS,
1141                        maxrequests: u32,
1142                        requests: *mut DSTORAGE_CUSTOM_DECOMPRESSION_REQUEST,
1143                        numrequests: *mut u32,
1144                    ) -> windows_core::HRESULT {
1145                        unsafe {
1146                            let this: &Identity =
1147                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1148                            IDStorageCustomDecompressionQueue1_Impl::GetRequests1(
1149                                this,
1150                                core::mem::transmute_copy(&flags),
1151                                core::mem::transmute_copy(&maxrequests),
1152                                core::mem::transmute_copy(&requests),
1153                                core::mem::transmute_copy(&numrequests),
1154                            )
1155                            .into()
1156                        }
1157                    }
1158                    Self {
1159                        base__: IDStorageCustomDecompressionQueue_Vtbl::new::<Identity, OFFSET>(),
1160                        GetRequests1: GetRequests1::<Identity, OFFSET>,
1161                    }
1162                }
1163                pub fn matches(iid: &windows_core::GUID) -> bool {
1164                    iid == &<IDStorageCustomDecompressionQueue1 as windows_core::Interface>::IID
1165                        || iid
1166                            == &<IDStorageCustomDecompressionQueue as windows_core::Interface>::IID
1167                }
1168            }
1169            impl windows_core::RuntimeName for IDStorageCustomDecompressionQueue1 {}
1170            windows_core::imp::define_interface!(
1171                IDStorageFactory,
1172                IDStorageFactory_Vtbl,
1173                0x6924ea0c_c3cd_4826_b10a_f64f4ed927c1
1174            );
1175            windows_core::imp::interface_hierarchy!(IDStorageFactory, windows_core::IUnknown);
1176            impl IDStorageFactory {
1177                pub unsafe fn CreateQueue<T>(
1178                    &self,
1179                    desc: *const DSTORAGE_QUEUE_DESC,
1180                ) -> windows_core::Result<T>
1181                where
1182                    T: windows_core::Interface,
1183                {
1184                    let mut result__ = core::ptr::null_mut();
1185                    unsafe {
1186                        (windows_core::Interface::vtable(self).CreateQueue)(
1187                            windows_core::Interface::as_raw(self),
1188                            core::mem::transmute(desc),
1189                            &T::IID,
1190                            &mut result__,
1191                        )
1192                        .and_then(|| windows_core::Type::from_abi(result__))
1193                    }
1194                }
1195                pub unsafe fn OpenFile<P0, T>(&self, path: P0) -> windows_core::Result<T>
1196                where
1197                    P0: windows_core::Param<windows_core::PCWSTR>,
1198                    T: windows_core::Interface,
1199                {
1200                    let mut result__ = core::ptr::null_mut();
1201                    unsafe {
1202                        (windows_core::Interface::vtable(self).OpenFile)(
1203                            windows_core::Interface::as_raw(self),
1204                            path.param().abi(),
1205                            &T::IID,
1206                            &mut result__,
1207                        )
1208                        .and_then(|| windows_core::Type::from_abi(result__))
1209                    }
1210                }
1211                pub unsafe fn CreateStatusArray<P1, T>(
1212                    &self,
1213                    capacity: u32,
1214                    name: P1,
1215                ) -> windows_core::Result<T>
1216                where
1217                    P1: windows_core::Param<windows_core::PCSTR>,
1218                    T: windows_core::Interface,
1219                {
1220                    let mut result__ = core::ptr::null_mut();
1221                    unsafe {
1222                        (windows_core::Interface::vtable(self).CreateStatusArray)(
1223                            windows_core::Interface::as_raw(self),
1224                            capacity,
1225                            name.param().abi(),
1226                            &T::IID,
1227                            &mut result__,
1228                        )
1229                        .and_then(|| windows_core::Type::from_abi(result__))
1230                    }
1231                }
1232                pub unsafe fn SetDebugFlags(&self, flags: DSTORAGE_DEBUG) {
1233                    unsafe {
1234                        (windows_core::Interface::vtable(self).SetDebugFlags)(
1235                            windows_core::Interface::as_raw(self),
1236                            flags.0 as _,
1237                        )
1238                    }
1239                }
1240                pub unsafe fn SetStagingBufferSize(&self, size: u32) -> windows_core::Result<()> {
1241                    unsafe {
1242                        (windows_core::Interface::vtable(self).SetStagingBufferSize)(
1243                            windows_core::Interface::as_raw(self),
1244                            size,
1245                        )
1246                        .ok()
1247                    }
1248                }
1249            }
1250            #[repr(C)]
1251            pub struct IDStorageFactory_Vtbl {
1252                pub base__: windows_core::IUnknown_Vtbl,
1253                pub CreateQueue: unsafe extern "system" fn(
1254                    *mut core::ffi::c_void,
1255                    *const DSTORAGE_QUEUE_DESC,
1256                    *const windows_core::GUID,
1257                    *mut *mut core::ffi::c_void,
1258                )
1259                    -> windows_core::HRESULT,
1260                pub OpenFile: unsafe extern "system" fn(
1261                    *mut core::ffi::c_void,
1262                    windows_core::PCWSTR,
1263                    *const windows_core::GUID,
1264                    *mut *mut core::ffi::c_void,
1265                ) -> windows_core::HRESULT,
1266                pub CreateStatusArray: unsafe extern "system" fn(
1267                    *mut core::ffi::c_void,
1268                    u32,
1269                    windows_core::PCSTR,
1270                    *const windows_core::GUID,
1271                    *mut *mut core::ffi::c_void,
1272                )
1273                    -> windows_core::HRESULT,
1274                pub SetDebugFlags: unsafe extern "system" fn(*mut core::ffi::c_void, u32),
1275                pub SetStagingBufferSize:
1276                    unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
1277            }
1278            pub trait IDStorageFactory_Impl: windows_core::IUnknownImpl {
1279                fn CreateQueue(
1280                    &self,
1281                    desc: *const DSTORAGE_QUEUE_DESC,
1282                    riid: *const windows_core::GUID,
1283                    ppv: *mut *mut core::ffi::c_void,
1284                ) -> windows_core::Result<()>;
1285                fn OpenFile(
1286                    &self,
1287                    path: &windows_core::PCWSTR,
1288                    riid: *const windows_core::GUID,
1289                    ppv: *mut *mut core::ffi::c_void,
1290                ) -> windows_core::Result<()>;
1291                fn CreateStatusArray(
1292                    &self,
1293                    capacity: u32,
1294                    name: &windows_core::PCSTR,
1295                    riid: *const windows_core::GUID,
1296                    ppv: *mut *mut core::ffi::c_void,
1297                ) -> windows_core::Result<()>;
1298                fn SetDebugFlags(&self, flags: &DSTORAGE_DEBUG);
1299                fn SetStagingBufferSize(&self, size: u32) -> windows_core::Result<()>;
1300            }
1301            impl IDStorageFactory_Vtbl {
1302                pub const fn new<Identity: IDStorageFactory_Impl, const OFFSET: isize>() -> Self {
1303                    unsafe extern "system" fn CreateQueue<
1304                        Identity: IDStorageFactory_Impl,
1305                        const OFFSET: isize,
1306                    >(
1307                        this: *mut core::ffi::c_void,
1308                        desc: *const DSTORAGE_QUEUE_DESC,
1309                        riid: *const windows_core::GUID,
1310                        ppv: *mut *mut core::ffi::c_void,
1311                    ) -> windows_core::HRESULT {
1312                        unsafe {
1313                            let this: &Identity =
1314                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1315                            IDStorageFactory_Impl::CreateQueue(
1316                                this,
1317                                core::mem::transmute_copy(&desc),
1318                                core::mem::transmute_copy(&riid),
1319                                core::mem::transmute_copy(&ppv),
1320                            )
1321                            .into()
1322                        }
1323                    }
1324                    unsafe extern "system" fn OpenFile<
1325                        Identity: IDStorageFactory_Impl,
1326                        const OFFSET: isize,
1327                    >(
1328                        this: *mut core::ffi::c_void,
1329                        path: windows_core::PCWSTR,
1330                        riid: *const windows_core::GUID,
1331                        ppv: *mut *mut core::ffi::c_void,
1332                    ) -> windows_core::HRESULT {
1333                        unsafe {
1334                            let this: &Identity =
1335                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1336                            IDStorageFactory_Impl::OpenFile(
1337                                this,
1338                                core::mem::transmute(&path),
1339                                core::mem::transmute_copy(&riid),
1340                                core::mem::transmute_copy(&ppv),
1341                            )
1342                            .into()
1343                        }
1344                    }
1345                    unsafe extern "system" fn CreateStatusArray<
1346                        Identity: IDStorageFactory_Impl,
1347                        const OFFSET: isize,
1348                    >(
1349                        this: *mut core::ffi::c_void,
1350                        capacity: u32,
1351                        name: windows_core::PCSTR,
1352                        riid: *const windows_core::GUID,
1353                        ppv: *mut *mut core::ffi::c_void,
1354                    ) -> windows_core::HRESULT {
1355                        unsafe {
1356                            let this: &Identity =
1357                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1358                            IDStorageFactory_Impl::CreateStatusArray(
1359                                this,
1360                                core::mem::transmute_copy(&capacity),
1361                                core::mem::transmute(&name),
1362                                core::mem::transmute_copy(&riid),
1363                                core::mem::transmute_copy(&ppv),
1364                            )
1365                            .into()
1366                        }
1367                    }
1368                    unsafe extern "system" fn SetDebugFlags<
1369                        Identity: IDStorageFactory_Impl,
1370                        const OFFSET: isize,
1371                    >(
1372                        this: *mut core::ffi::c_void,
1373                        flags: u32,
1374                    ) {
1375                        unsafe {
1376                            let this: &Identity =
1377                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1378                            IDStorageFactory_Impl::SetDebugFlags(this, core::mem::transmute(&flags))
1379                        }
1380                    }
1381                    unsafe extern "system" fn SetStagingBufferSize<
1382                        Identity: IDStorageFactory_Impl,
1383                        const OFFSET: isize,
1384                    >(
1385                        this: *mut core::ffi::c_void,
1386                        size: u32,
1387                    ) -> windows_core::HRESULT {
1388                        unsafe {
1389                            let this: &Identity =
1390                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1391                            IDStorageFactory_Impl::SetStagingBufferSize(
1392                                this,
1393                                core::mem::transmute_copy(&size),
1394                            )
1395                            .into()
1396                        }
1397                    }
1398                    Self {
1399                        base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
1400                        CreateQueue: CreateQueue::<Identity, OFFSET>,
1401                        OpenFile: OpenFile::<Identity, OFFSET>,
1402                        CreateStatusArray: CreateStatusArray::<Identity, OFFSET>,
1403                        SetDebugFlags: SetDebugFlags::<Identity, OFFSET>,
1404                        SetStagingBufferSize: SetStagingBufferSize::<Identity, OFFSET>,
1405                    }
1406                }
1407                pub fn matches(iid: &windows_core::GUID) -> bool {
1408                    iid == &<IDStorageFactory as windows_core::Interface>::IID
1409                }
1410            }
1411            impl windows_core::RuntimeName for IDStorageFactory {}
1412            windows_core::imp::define_interface!(
1413                IDStorageFile,
1414                IDStorageFile_Vtbl,
1415                0x5de95e7b_955a_4868_a73c_243b29f4b8da
1416            );
1417            windows_core::imp::interface_hierarchy!(IDStorageFile, windows_core::IUnknown);
1418            impl IDStorageFile {
1419                pub unsafe fn Close(&self) {
1420                    unsafe {
1421                        (windows_core::Interface::vtable(self).Close)(
1422                            windows_core::Interface::as_raw(self),
1423                        )
1424                    }
1425                }
1426                pub unsafe fn GetFileInformation(
1427                    &self,
1428                    info: *mut windows::Win32::Storage::FileSystem::BY_HANDLE_FILE_INFORMATION,
1429                ) -> windows_core::Result<()> {
1430                    unsafe {
1431                        (windows_core::Interface::vtable(self).GetFileInformation)(
1432                            windows_core::Interface::as_raw(self),
1433                            info as _,
1434                        )
1435                        .ok()
1436                    }
1437                }
1438            }
1439            #[repr(C)]
1440            pub struct IDStorageFile_Vtbl {
1441                pub base__: windows_core::IUnknown_Vtbl,
1442                pub Close: unsafe extern "system" fn(*mut core::ffi::c_void),
1443                pub GetFileInformation: unsafe extern "system" fn(
1444                    *mut core::ffi::c_void,
1445                    *mut windows::Win32::Storage::FileSystem::BY_HANDLE_FILE_INFORMATION,
1446                )
1447                    -> windows_core::HRESULT,
1448            }
1449            pub trait IDStorageFile_Impl: windows_core::IUnknownImpl {
1450                fn Close(&self);
1451                fn GetFileInformation(
1452                    &self,
1453                    info: *mut windows::Win32::Storage::FileSystem::BY_HANDLE_FILE_INFORMATION,
1454                ) -> windows_core::Result<()>;
1455            }
1456            impl IDStorageFile_Vtbl {
1457                pub const fn new<Identity: IDStorageFile_Impl, const OFFSET: isize>() -> Self {
1458                    unsafe extern "system" fn Close<
1459                        Identity: IDStorageFile_Impl,
1460                        const OFFSET: isize,
1461                    >(
1462                        this: *mut core::ffi::c_void,
1463                    ) {
1464                        unsafe {
1465                            let this: &Identity =
1466                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1467                            IDStorageFile_Impl::Close(this)
1468                        }
1469                    }
1470                    unsafe extern "system" fn GetFileInformation<
1471                        Identity: IDStorageFile_Impl,
1472                        const OFFSET: isize,
1473                    >(
1474                        this: *mut core::ffi::c_void,
1475                        info: *mut windows::Win32::Storage::FileSystem::BY_HANDLE_FILE_INFORMATION,
1476                    ) -> windows_core::HRESULT {
1477                        unsafe {
1478                            let this: &Identity =
1479                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1480                            IDStorageFile_Impl::GetFileInformation(
1481                                this,
1482                                core::mem::transmute_copy(&info),
1483                            )
1484                            .into()
1485                        }
1486                    }
1487                    Self {
1488                        base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
1489                        Close: Close::<Identity, OFFSET>,
1490                        GetFileInformation: GetFileInformation::<Identity, OFFSET>,
1491                    }
1492                }
1493                pub fn matches(iid: &windows_core::GUID) -> bool {
1494                    iid == &<IDStorageFile as windows_core::Interface>::IID
1495                }
1496            }
1497            impl windows_core::RuntimeName for IDStorageFile {}
1498            windows_core::imp::define_interface!(
1499                IDStorageQueue,
1500                IDStorageQueue_Vtbl,
1501                0xcfdbd83f_9e06_4fda_8ea5_69042137f49b
1502            );
1503            windows_core::imp::interface_hierarchy!(IDStorageQueue, windows_core::IUnknown);
1504            impl IDStorageQueue {
1505                pub unsafe fn EnqueueRequest(&self, request: *const DSTORAGE_REQUEST) {
1506                    unsafe {
1507                        (windows_core::Interface::vtable(self).EnqueueRequest)(
1508                            windows_core::Interface::as_raw(self),
1509                            core::mem::transmute(request),
1510                        )
1511                    }
1512                }
1513                pub unsafe fn EnqueueStatus<P0>(&self, statusarray: P0, index: u32)
1514                where
1515                    P0: windows_core::Param<IDStorageStatusArray>,
1516                {
1517                    unsafe {
1518                        (windows_core::Interface::vtable(self).EnqueueStatus)(
1519                            windows_core::Interface::as_raw(self),
1520                            statusarray.param().abi(),
1521                            index,
1522                        )
1523                    }
1524                }
1525                pub unsafe fn EnqueueSignal<P0>(&self, fence: P0, value: u64)
1526                where
1527                    P0: windows_core::Param<windows::Win32::Graphics::Direct3D12::ID3D12Fence>,
1528                {
1529                    unsafe {
1530                        (windows_core::Interface::vtable(self).EnqueueSignal)(
1531                            windows_core::Interface::as_raw(self),
1532                            fence.param().abi(),
1533                            value,
1534                        )
1535                    }
1536                }
1537                pub unsafe fn Submit(&self) {
1538                    unsafe {
1539                        (windows_core::Interface::vtable(self).Submit)(
1540                            windows_core::Interface::as_raw(self),
1541                        )
1542                    }
1543                }
1544                pub unsafe fn CancelRequestsWithTag(&self, mask: u64, value: u64) {
1545                    unsafe {
1546                        (windows_core::Interface::vtable(self).CancelRequestsWithTag)(
1547                            windows_core::Interface::as_raw(self),
1548                            mask,
1549                            value,
1550                        )
1551                    }
1552                }
1553                pub unsafe fn Close(&self) {
1554                    unsafe {
1555                        (windows_core::Interface::vtable(self).Close)(
1556                            windows_core::Interface::as_raw(self),
1557                        )
1558                    }
1559                }
1560                pub unsafe fn GetErrorEvent(&self) -> windows::Win32::Foundation::HANDLE {
1561                    unsafe {
1562                        (windows_core::Interface::vtable(self).GetErrorEvent)(
1563                            windows_core::Interface::as_raw(self),
1564                        )
1565                    }
1566                }
1567                pub unsafe fn RetrieveErrorRecord(&self) -> DSTORAGE_ERROR_RECORD {
1568                    unsafe {
1569                        let mut result__ = core::mem::zeroed();
1570                        (windows_core::Interface::vtable(self).RetrieveErrorRecord)(
1571                            windows_core::Interface::as_raw(self),
1572                            &mut result__,
1573                        );
1574                        core::mem::transmute(result__)
1575                    }
1576                }
1577                pub unsafe fn Query(&self) -> DSTORAGE_QUEUE_INFO {
1578                    unsafe {
1579                        let mut result__ = core::mem::zeroed();
1580                        (windows_core::Interface::vtable(self).Query)(
1581                            windows_core::Interface::as_raw(self),
1582                            &mut result__,
1583                        );
1584                        core::mem::transmute(result__)
1585                    }
1586                }
1587            }
1588            #[repr(C)]
1589            pub struct IDStorageQueue_Vtbl {
1590                pub base__: windows_core::IUnknown_Vtbl,
1591                pub EnqueueRequest:
1592                    unsafe extern "system" fn(*mut core::ffi::c_void, *const DSTORAGE_REQUEST),
1593                pub EnqueueStatus:
1594                    unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u32),
1595                pub EnqueueSignal:
1596                    unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void, u64),
1597                pub Submit: unsafe extern "system" fn(*mut core::ffi::c_void),
1598                pub CancelRequestsWithTag:
1599                    unsafe extern "system" fn(*mut core::ffi::c_void, u64, u64),
1600                pub Close: unsafe extern "system" fn(*mut core::ffi::c_void),
1601                pub GetErrorEvent: unsafe extern "system" fn(
1602                    *mut core::ffi::c_void,
1603                )
1604                    -> windows::Win32::Foundation::HANDLE,
1605                pub RetrieveErrorRecord:
1606                    unsafe extern "system" fn(*mut core::ffi::c_void, *mut DSTORAGE_ERROR_RECORD),
1607                pub Query:
1608                    unsafe extern "system" fn(*mut core::ffi::c_void, *mut DSTORAGE_QUEUE_INFO),
1609            }
1610            pub trait IDStorageQueue_Impl: windows_core::IUnknownImpl {
1611                fn EnqueueRequest(&self, request: *const DSTORAGE_REQUEST);
1612                fn EnqueueStatus(
1613                    &self,
1614                    statusarray: windows_core::Ref<'_, IDStorageStatusArray>,
1615                    index: u32,
1616                );
1617                fn EnqueueSignal(
1618                    &self,
1619                    fence: windows_core::Ref<'_, windows::Win32::Graphics::Direct3D12::ID3D12Fence>,
1620                    value: u64,
1621                );
1622                fn Submit(&self);
1623                fn CancelRequestsWithTag(&self, mask: u64, value: u64);
1624                fn Close(&self);
1625                fn GetErrorEvent(&self) -> windows::Win32::Foundation::HANDLE;
1626                fn RetrieveErrorRecord(&self, record: *mut DSTORAGE_ERROR_RECORD);
1627                fn Query(&self, info: *mut DSTORAGE_QUEUE_INFO);
1628            }
1629            impl IDStorageQueue_Vtbl {
1630                pub const fn new<Identity: IDStorageQueue_Impl, const OFFSET: isize>() -> Self {
1631                    unsafe extern "system" fn EnqueueRequest<
1632                        Identity: IDStorageQueue_Impl,
1633                        const OFFSET: isize,
1634                    >(
1635                        this: *mut core::ffi::c_void,
1636                        request: *const DSTORAGE_REQUEST,
1637                    ) {
1638                        unsafe {
1639                            let this: &Identity =
1640                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1641                            IDStorageQueue_Impl::EnqueueRequest(
1642                                this,
1643                                core::mem::transmute_copy(&request),
1644                            )
1645                        }
1646                    }
1647                    unsafe extern "system" fn EnqueueStatus<
1648                        Identity: IDStorageQueue_Impl,
1649                        const OFFSET: isize,
1650                    >(
1651                        this: *mut core::ffi::c_void,
1652                        statusarray: *mut core::ffi::c_void,
1653                        index: u32,
1654                    ) {
1655                        unsafe {
1656                            let this: &Identity =
1657                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1658                            IDStorageQueue_Impl::EnqueueStatus(
1659                                this,
1660                                core::mem::transmute_copy(&statusarray),
1661                                core::mem::transmute_copy(&index),
1662                            )
1663                        }
1664                    }
1665                    unsafe extern "system" fn EnqueueSignal<
1666                        Identity: IDStorageQueue_Impl,
1667                        const OFFSET: isize,
1668                    >(
1669                        this: *mut core::ffi::c_void,
1670                        fence: *mut core::ffi::c_void,
1671                        value: u64,
1672                    ) {
1673                        unsafe {
1674                            let this: &Identity =
1675                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1676                            IDStorageQueue_Impl::EnqueueSignal(
1677                                this,
1678                                core::mem::transmute_copy(&fence),
1679                                core::mem::transmute_copy(&value),
1680                            )
1681                        }
1682                    }
1683                    unsafe extern "system" fn Submit<
1684                        Identity: IDStorageQueue_Impl,
1685                        const OFFSET: isize,
1686                    >(
1687                        this: *mut core::ffi::c_void,
1688                    ) {
1689                        unsafe {
1690                            let this: &Identity =
1691                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1692                            IDStorageQueue_Impl::Submit(this)
1693                        }
1694                    }
1695                    unsafe extern "system" fn CancelRequestsWithTag<
1696                        Identity: IDStorageQueue_Impl,
1697                        const OFFSET: isize,
1698                    >(
1699                        this: *mut core::ffi::c_void,
1700                        mask: u64,
1701                        value: u64,
1702                    ) {
1703                        unsafe {
1704                            let this: &Identity =
1705                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1706                            IDStorageQueue_Impl::CancelRequestsWithTag(
1707                                this,
1708                                core::mem::transmute_copy(&mask),
1709                                core::mem::transmute_copy(&value),
1710                            )
1711                        }
1712                    }
1713                    unsafe extern "system" fn Close<
1714                        Identity: IDStorageQueue_Impl,
1715                        const OFFSET: isize,
1716                    >(
1717                        this: *mut core::ffi::c_void,
1718                    ) {
1719                        unsafe {
1720                            let this: &Identity =
1721                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1722                            IDStorageQueue_Impl::Close(this)
1723                        }
1724                    }
1725                    unsafe extern "system" fn GetErrorEvent<
1726                        Identity: IDStorageQueue_Impl,
1727                        const OFFSET: isize,
1728                    >(
1729                        this: *mut core::ffi::c_void,
1730                    ) -> windows::Win32::Foundation::HANDLE {
1731                        unsafe {
1732                            let this: &Identity =
1733                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1734                            IDStorageQueue_Impl::GetErrorEvent(this)
1735                        }
1736                    }
1737                    unsafe extern "system" fn RetrieveErrorRecord<
1738                        Identity: IDStorageQueue_Impl,
1739                        const OFFSET: isize,
1740                    >(
1741                        this: *mut core::ffi::c_void,
1742                        record: *mut DSTORAGE_ERROR_RECORD,
1743                    ) {
1744                        unsafe {
1745                            let this: &Identity =
1746                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1747                            IDStorageQueue_Impl::RetrieveErrorRecord(
1748                                this,
1749                                core::mem::transmute_copy(&record),
1750                            )
1751                        }
1752                    }
1753                    unsafe extern "system" fn Query<
1754                        Identity: IDStorageQueue_Impl,
1755                        const OFFSET: isize,
1756                    >(
1757                        this: *mut core::ffi::c_void,
1758                        info: *mut DSTORAGE_QUEUE_INFO,
1759                    ) {
1760                        unsafe {
1761                            let this: &Identity =
1762                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1763                            IDStorageQueue_Impl::Query(this, core::mem::transmute_copy(&info))
1764                        }
1765                    }
1766                    Self {
1767                        base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
1768                        EnqueueRequest: EnqueueRequest::<Identity, OFFSET>,
1769                        EnqueueStatus: EnqueueStatus::<Identity, OFFSET>,
1770                        EnqueueSignal: EnqueueSignal::<Identity, OFFSET>,
1771                        Submit: Submit::<Identity, OFFSET>,
1772                        CancelRequestsWithTag: CancelRequestsWithTag::<Identity, OFFSET>,
1773                        Close: Close::<Identity, OFFSET>,
1774                        GetErrorEvent: GetErrorEvent::<Identity, OFFSET>,
1775                        RetrieveErrorRecord: RetrieveErrorRecord::<Identity, OFFSET>,
1776                        Query: Query::<Identity, OFFSET>,
1777                    }
1778                }
1779                pub fn matches(iid: &windows_core::GUID) -> bool {
1780                    iid == &<IDStorageQueue as windows_core::Interface>::IID
1781                }
1782            }
1783            impl windows_core::RuntimeName for IDStorageQueue {}
1784            windows_core::imp::define_interface!(
1785                IDStorageQueue1,
1786                IDStorageQueue1_Vtbl,
1787                0xdd2f482c_5eff_41e8_9c9e_d2374b278128
1788            );
1789            impl core::ops::Deref for IDStorageQueue1 {
1790                type Target = IDStorageQueue;
1791                fn deref(&self) -> &Self::Target {
1792                    unsafe { core::mem::transmute(self) }
1793                }
1794            }
1795            windows_core::imp::interface_hierarchy!(
1796                IDStorageQueue1,
1797                windows_core::IUnknown,
1798                IDStorageQueue
1799            );
1800            impl IDStorageQueue1 {
1801                pub unsafe fn EnqueueSetEvent(&self, handle: windows::Win32::Foundation::HANDLE) {
1802                    unsafe {
1803                        (windows_core::Interface::vtable(self).EnqueueSetEvent)(
1804                            windows_core::Interface::as_raw(self),
1805                            handle,
1806                        )
1807                    }
1808                }
1809            }
1810            #[repr(C)]
1811            pub struct IDStorageQueue1_Vtbl {
1812                pub base__: IDStorageQueue_Vtbl,
1813                pub EnqueueSetEvent: unsafe extern "system" fn(
1814                    *mut core::ffi::c_void,
1815                    windows::Win32::Foundation::HANDLE,
1816                ),
1817            }
1818            pub trait IDStorageQueue1_Impl: IDStorageQueue_Impl {
1819                fn EnqueueSetEvent(&self, handle: windows::Win32::Foundation::HANDLE);
1820            }
1821            impl IDStorageQueue1_Vtbl {
1822                pub const fn new<Identity: IDStorageQueue1_Impl, const OFFSET: isize>() -> Self {
1823                    unsafe extern "system" fn EnqueueSetEvent<
1824                        Identity: IDStorageQueue1_Impl,
1825                        const OFFSET: isize,
1826                    >(
1827                        this: *mut core::ffi::c_void,
1828                        handle: windows::Win32::Foundation::HANDLE,
1829                    ) {
1830                        unsafe {
1831                            let this: &Identity =
1832                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1833                            IDStorageQueue1_Impl::EnqueueSetEvent(
1834                                this,
1835                                core::mem::transmute_copy(&handle),
1836                            )
1837                        }
1838                    }
1839                    Self {
1840                        base__: IDStorageQueue_Vtbl::new::<Identity, OFFSET>(),
1841                        EnqueueSetEvent: EnqueueSetEvent::<Identity, OFFSET>,
1842                    }
1843                }
1844                pub fn matches(iid: &windows_core::GUID) -> bool {
1845                    iid == &<IDStorageQueue1 as windows_core::Interface>::IID
1846                        || iid == &<IDStorageQueue as windows_core::Interface>::IID
1847                }
1848            }
1849            impl windows_core::RuntimeName for IDStorageQueue1 {}
1850            windows_core::imp::define_interface!(
1851                IDStorageQueue2,
1852                IDStorageQueue2_Vtbl,
1853                0xb1c9d643_3a49_44a2_b46f_653649470d18
1854            );
1855            impl core::ops::Deref for IDStorageQueue2 {
1856                type Target = IDStorageQueue1;
1857                fn deref(&self) -> &Self::Target {
1858                    unsafe { core::mem::transmute(self) }
1859                }
1860            }
1861            windows_core::imp::interface_hierarchy!(
1862                IDStorageQueue2,
1863                windows_core::IUnknown,
1864                IDStorageQueue,
1865                IDStorageQueue1
1866            );
1867            impl IDStorageQueue2 {
1868                pub unsafe fn GetCompressionSupport(
1869                    &self,
1870                    format: DSTORAGE_COMPRESSION_FORMAT,
1871                ) -> DSTORAGE_COMPRESSION_SUPPORT {
1872                    unsafe {
1873                        (windows_core::Interface::vtable(self).GetCompressionSupport)(
1874                            windows_core::Interface::as_raw(self),
1875                            format,
1876                        )
1877                    }
1878                }
1879            }
1880            #[repr(C)]
1881            pub struct IDStorageQueue2_Vtbl {
1882                pub base__: IDStorageQueue1_Vtbl,
1883                pub GetCompressionSupport:
1884                    unsafe extern "system" fn(
1885                        *mut core::ffi::c_void,
1886                        DSTORAGE_COMPRESSION_FORMAT,
1887                    ) -> DSTORAGE_COMPRESSION_SUPPORT,
1888            }
1889            pub trait IDStorageQueue2_Impl: IDStorageQueue1_Impl {
1890                fn GetCompressionSupport(
1891                    &self,
1892                    format: DSTORAGE_COMPRESSION_FORMAT,
1893                ) -> DSTORAGE_COMPRESSION_SUPPORT;
1894            }
1895            impl IDStorageQueue2_Vtbl {
1896                pub const fn new<Identity: IDStorageQueue2_Impl, const OFFSET: isize>() -> Self {
1897                    unsafe extern "system" fn GetCompressionSupport<
1898                        Identity: IDStorageQueue2_Impl,
1899                        const OFFSET: isize,
1900                    >(
1901                        this: *mut core::ffi::c_void,
1902                        format: DSTORAGE_COMPRESSION_FORMAT,
1903                    ) -> DSTORAGE_COMPRESSION_SUPPORT {
1904                        unsafe {
1905                            let this: &Identity =
1906                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1907                            IDStorageQueue2_Impl::GetCompressionSupport(
1908                                this,
1909                                core::mem::transmute_copy(&format),
1910                            )
1911                        }
1912                    }
1913                    Self {
1914                        base__: IDStorageQueue1_Vtbl::new::<Identity, OFFSET>(),
1915                        GetCompressionSupport: GetCompressionSupport::<Identity, OFFSET>,
1916                    }
1917                }
1918                pub fn matches(iid: &windows_core::GUID) -> bool {
1919                    iid == &<IDStorageQueue2 as windows_core::Interface>::IID
1920                        || iid == &<IDStorageQueue as windows_core::Interface>::IID
1921                        || iid == &<IDStorageQueue1 as windows_core::Interface>::IID
1922                }
1923            }
1924            impl windows_core::RuntimeName for IDStorageQueue2 {}
1925            windows_core::imp::define_interface!(
1926                IDStorageStatusArray,
1927                IDStorageStatusArray_Vtbl,
1928                0x82397587_7cd5_453b_a02e_31379bd64656
1929            );
1930            windows_core::imp::interface_hierarchy!(IDStorageStatusArray, windows_core::IUnknown);
1931            impl IDStorageStatusArray {
1932                pub unsafe fn IsComplete(&self, index: u32) -> bool {
1933                    unsafe {
1934                        (windows_core::Interface::vtable(self).IsComplete)(
1935                            windows_core::Interface::as_raw(self),
1936                            index,
1937                        )
1938                    }
1939                }
1940                pub unsafe fn GetHResult(&self, index: u32) -> windows_core::Result<()> {
1941                    unsafe {
1942                        (windows_core::Interface::vtable(self).GetHResult)(
1943                            windows_core::Interface::as_raw(self),
1944                            index,
1945                        )
1946                        .ok()
1947                    }
1948                }
1949            }
1950            #[repr(C)]
1951            pub struct IDStorageStatusArray_Vtbl {
1952                pub base__: windows_core::IUnknown_Vtbl,
1953                pub IsComplete: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> bool,
1954                pub GetHResult:
1955                    unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
1956            }
1957            pub trait IDStorageStatusArray_Impl: windows_core::IUnknownImpl {
1958                fn IsComplete(&self, index: u32) -> bool;
1959                fn GetHResult(&self, index: u32) -> windows_core::Result<()>;
1960            }
1961            impl IDStorageStatusArray_Vtbl {
1962                pub const fn new<Identity: IDStorageStatusArray_Impl, const OFFSET: isize>() -> Self
1963                {
1964                    unsafe extern "system" fn IsComplete<
1965                        Identity: IDStorageStatusArray_Impl,
1966                        const OFFSET: isize,
1967                    >(
1968                        this: *mut core::ffi::c_void,
1969                        index: u32,
1970                    ) -> bool {
1971                        unsafe {
1972                            let this: &Identity =
1973                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1974                            IDStorageStatusArray_Impl::IsComplete(
1975                                this,
1976                                core::mem::transmute_copy(&index),
1977                            )
1978                        }
1979                    }
1980                    unsafe extern "system" fn GetHResult<
1981                        Identity: IDStorageStatusArray_Impl,
1982                        const OFFSET: isize,
1983                    >(
1984                        this: *mut core::ffi::c_void,
1985                        index: u32,
1986                    ) -> windows_core::HRESULT {
1987                        unsafe {
1988                            let this: &Identity =
1989                                &*((this as *const *const ()).offset(OFFSET) as *const Identity);
1990                            IDStorageStatusArray_Impl::GetHResult(
1991                                this,
1992                                core::mem::transmute_copy(&index),
1993                            )
1994                            .into()
1995                        }
1996                    }
1997                    Self {
1998                        base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
1999                        IsComplete: IsComplete::<Identity, OFFSET>,
2000                        GetHResult: GetHResult::<Identity, OFFSET>,
2001                    }
2002                }
2003                pub fn matches(iid: &windows_core::GUID) -> bool {
2004                    iid == &<IDStorageStatusArray as windows_core::Interface>::IID
2005                }
2006            }
2007            impl windows_core::RuntimeName for IDStorageStatusArray {}
2008        }
2009    }
2010}