1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
2 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
3 #[repr(C)]
4 #[cfg(feature = "Win32_Foundation")]
5 pub struct DYNAMIC_TIME_ZONE_INFORMATION {
6     pub Bias: i32,
7     pub StandardName: [u16; 32],
8     pub StandardDate: super::super::Foundation::SYSTEMTIME,
9     pub StandardBias: i32,
10     pub DaylightName: [u16; 32],
11     pub DaylightDate: super::super::Foundation::SYSTEMTIME,
12     pub DaylightBias: i32,
13     pub TimeZoneKeyName: [u16; 128],
14     pub DynamicDaylightTimeDisabled: super::super::Foundation::BOOLEAN,
15 }
16 #[cfg(feature = "Win32_Foundation")]
17 impl DYNAMIC_TIME_ZONE_INFORMATION {}
18 #[cfg(feature = "Win32_Foundation")]
19 impl ::std::default::Default for DYNAMIC_TIME_ZONE_INFORMATION {
default() -> Self20     fn default() -> Self {
21         unsafe { ::std::mem::zeroed() }
22     }
23 }
24 #[cfg(feature = "Win32_Foundation")]
25 impl ::std::fmt::Debug for DYNAMIC_TIME_ZONE_INFORMATION {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result26     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27         fmt.debug_struct("DYNAMIC_TIME_ZONE_INFORMATION")
28             .field("Bias", &self.Bias)
29             .field("StandardName", &self.StandardName)
30             .field("StandardDate", &self.StandardDate)
31             .field("StandardBias", &self.StandardBias)
32             .field("DaylightName", &self.DaylightName)
33             .field("DaylightDate", &self.DaylightDate)
34             .field("DaylightBias", &self.DaylightBias)
35             .field("TimeZoneKeyName", &self.TimeZoneKeyName)
36             .field("DynamicDaylightTimeDisabled", &self.DynamicDaylightTimeDisabled)
37             .finish()
38     }
39 }
40 #[cfg(feature = "Win32_Foundation")]
41 impl ::std::cmp::PartialEq for DYNAMIC_TIME_ZONE_INFORMATION {
eq(&self, other: &Self) -> bool42     fn eq(&self, other: &Self) -> bool {
43         self.Bias == other.Bias && self.StandardName == other.StandardName && self.StandardDate == other.StandardDate && self.StandardBias == other.StandardBias && self.DaylightName == other.DaylightName && self.DaylightDate == other.DaylightDate && self.DaylightBias == other.DaylightBias && self.TimeZoneKeyName == other.TimeZoneKeyName && self.DynamicDaylightTimeDisabled == other.DynamicDaylightTimeDisabled
44     }
45 }
46 #[cfg(feature = "Win32_Foundation")]
47 impl ::std::cmp::Eq for DYNAMIC_TIME_ZONE_INFORMATION {}
48 #[cfg(feature = "Win32_Foundation")]
49 unsafe impl ::windows::runtime::Abi for DYNAMIC_TIME_ZONE_INFORMATION {
50     type Abi = Self;
51     type DefaultType = Self;
52 }
53 #[cfg(feature = "Win32_Foundation")]
54 #[inline]
EnumDynamicTimeZoneInformation(dwindex: u32, lptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u3255 pub unsafe fn EnumDynamicTimeZoneInformation(dwindex: u32, lptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32 {
56     #[cfg(windows)]
57     {
58         #[link(name = "windows")]
59         extern "system" {
60             fn EnumDynamicTimeZoneInformation(dwindex: u32, lptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32;
61         }
62         ::std::mem::transmute(EnumDynamicTimeZoneInformation(::std::mem::transmute(dwindex), ::std::mem::transmute(lptimezoneinformation)))
63     }
64     #[cfg(not(windows))]
65     unimplemented!("Unsupported target OS");
66 }
67 #[cfg(feature = "Win32_Foundation")]
68 #[inline]
FileTimeToSystemTime(lpfiletime: *const super::super::Foundation::FILETIME, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL69 pub unsafe fn FileTimeToSystemTime(lpfiletime: *const super::super::Foundation::FILETIME, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL {
70     #[cfg(windows)]
71     {
72         #[link(name = "windows")]
73         extern "system" {
74             fn FileTimeToSystemTime(lpfiletime: *const super::super::Foundation::FILETIME, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL;
75         }
76         ::std::mem::transmute(FileTimeToSystemTime(::std::mem::transmute(lpfiletime), ::std::mem::transmute(lpsystemtime)))
77     }
78     #[cfg(not(windows))]
79     unimplemented!("Unsupported target OS");
80 }
81 #[cfg(feature = "Win32_Foundation")]
82 #[inline]
GetDynamicTimeZoneInformation(ptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u3283 pub unsafe fn GetDynamicTimeZoneInformation(ptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32 {
84     #[cfg(windows)]
85     {
86         #[link(name = "windows")]
87         extern "system" {
88             fn GetDynamicTimeZoneInformation(ptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32;
89         }
90         ::std::mem::transmute(GetDynamicTimeZoneInformation(::std::mem::transmute(ptimezoneinformation)))
91     }
92     #[cfg(not(windows))]
93     unimplemented!("Unsupported target OS");
94 }
95 #[cfg(feature = "Win32_Foundation")]
96 #[inline]
GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, firstyear: *mut u32, lastyear: *mut u32) -> u3297 pub unsafe fn GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, firstyear: *mut u32, lastyear: *mut u32) -> u32 {
98     #[cfg(windows)]
99     {
100         #[link(name = "windows")]
101         extern "system" {
102             fn GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, firstyear: *mut u32, lastyear: *mut u32) -> u32;
103         }
104         ::std::mem::transmute(GetDynamicTimeZoneInformationEffectiveYears(::std::mem::transmute(lptimezoneinformation), ::std::mem::transmute(firstyear), ::std::mem::transmute(lastyear)))
105     }
106     #[cfg(not(windows))]
107     unimplemented!("Unsupported target OS");
108 }
109 #[cfg(feature = "Win32_Foundation")]
110 #[inline]
GetTimeZoneInformation(lptimezoneinformation: *mut TIME_ZONE_INFORMATION) -> u32111 pub unsafe fn GetTimeZoneInformation(lptimezoneinformation: *mut TIME_ZONE_INFORMATION) -> u32 {
112     #[cfg(windows)]
113     {
114         #[link(name = "windows")]
115         extern "system" {
116             fn GetTimeZoneInformation(lptimezoneinformation: *mut TIME_ZONE_INFORMATION) -> u32;
117         }
118         ::std::mem::transmute(GetTimeZoneInformation(::std::mem::transmute(lptimezoneinformation)))
119     }
120     #[cfg(not(windows))]
121     unimplemented!("Unsupported target OS");
122 }
123 #[cfg(feature = "Win32_Foundation")]
124 #[inline]
GetTimeZoneInformationForYear(wyear: u16, pdtzi: *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi: *mut TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL125 pub unsafe fn GetTimeZoneInformationForYear(wyear: u16, pdtzi: *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi: *mut TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL {
126     #[cfg(windows)]
127     {
128         #[link(name = "windows")]
129         extern "system" {
130             fn GetTimeZoneInformationForYear(wyear: u16, pdtzi: *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi: *mut TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL;
131         }
132         ::std::mem::transmute(GetTimeZoneInformationForYear(::std::mem::transmute(wyear), ::std::mem::transmute(pdtzi), ::std::mem::transmute(ptzi)))
133     }
134     #[cfg(not(windows))]
135     unimplemented!("Unsupported target OS");
136 }
137 #[cfg(feature = "Win32_Foundation")]
138 #[inline]
LocalFileTimeToLocalSystemTime(timezoneinformation: *const TIME_ZONE_INFORMATION, localfiletime: *const super::super::Foundation::FILETIME, localsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL139 pub unsafe fn LocalFileTimeToLocalSystemTime(timezoneinformation: *const TIME_ZONE_INFORMATION, localfiletime: *const super::super::Foundation::FILETIME, localsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL {
140     #[cfg(windows)]
141     {
142         #[link(name = "windows")]
143         extern "system" {
144             fn LocalFileTimeToLocalSystemTime(timezoneinformation: *const TIME_ZONE_INFORMATION, localfiletime: *const super::super::Foundation::FILETIME, localsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL;
145         }
146         ::std::mem::transmute(LocalFileTimeToLocalSystemTime(::std::mem::transmute(timezoneinformation), ::std::mem::transmute(localfiletime), ::std::mem::transmute(localsystemtime)))
147     }
148     #[cfg(not(windows))]
149     unimplemented!("Unsupported target OS");
150 }
151 #[cfg(feature = "Win32_Foundation")]
152 #[inline]
LocalSystemTimeToLocalFileTime(timezoneinformation: *const TIME_ZONE_INFORMATION, localsystemtime: *const super::super::Foundation::SYSTEMTIME, localfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL153 pub unsafe fn LocalSystemTimeToLocalFileTime(timezoneinformation: *const TIME_ZONE_INFORMATION, localsystemtime: *const super::super::Foundation::SYSTEMTIME, localfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL {
154     #[cfg(windows)]
155     {
156         #[link(name = "windows")]
157         extern "system" {
158             fn LocalSystemTimeToLocalFileTime(timezoneinformation: *const TIME_ZONE_INFORMATION, localsystemtime: *const super::super::Foundation::SYSTEMTIME, localfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL;
159         }
160         ::std::mem::transmute(LocalSystemTimeToLocalFileTime(::std::mem::transmute(timezoneinformation), ::std::mem::transmute(localsystemtime), ::std::mem::transmute(localfiletime)))
161     }
162     #[cfg(not(windows))]
163     unimplemented!("Unsupported target OS");
164 }
165 #[cfg(feature = "Win32_Foundation")]
166 #[inline]
SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL167 pub unsafe fn SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL {
168     #[cfg(windows)]
169     {
170         #[link(name = "windows")]
171         extern "system" {
172             fn SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL;
173         }
174         ::std::mem::transmute(SetDynamicTimeZoneInformation(::std::mem::transmute(lptimezoneinformation)))
175     }
176     #[cfg(not(windows))]
177     unimplemented!("Unsupported target OS");
178 }
179 #[cfg(feature = "Win32_Foundation")]
180 #[inline]
SetTimeZoneInformation(lptimezoneinformation: *const TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL181 pub unsafe fn SetTimeZoneInformation(lptimezoneinformation: *const TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL {
182     #[cfg(windows)]
183     {
184         #[link(name = "windows")]
185         extern "system" {
186             fn SetTimeZoneInformation(lptimezoneinformation: *const TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL;
187         }
188         ::std::mem::transmute(SetTimeZoneInformation(::std::mem::transmute(lptimezoneinformation)))
189     }
190     #[cfg(not(windows))]
191     unimplemented!("Unsupported target OS");
192 }
193 #[cfg(feature = "Win32_Foundation")]
194 #[inline]
SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL195 pub unsafe fn SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL {
196     #[cfg(windows)]
197     {
198         #[link(name = "windows")]
199         extern "system" {
200             fn SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL;
201         }
202         ::std::mem::transmute(SystemTimeToFileTime(::std::mem::transmute(lpsystemtime), ::std::mem::transmute(lpfiletime)))
203     }
204     #[cfg(not(windows))]
205     unimplemented!("Unsupported target OS");
206 }
207 #[cfg(feature = "Win32_Foundation")]
208 #[inline]
SystemTimeToTzSpecificLocalTime(lptimezoneinformation: *const TIME_ZONE_INFORMATION, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL209 pub unsafe fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation: *const TIME_ZONE_INFORMATION, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL {
210     #[cfg(windows)]
211     {
212         #[link(name = "windows")]
213         extern "system" {
214             fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation: *const TIME_ZONE_INFORMATION, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL;
215         }
216         ::std::mem::transmute(SystemTimeToTzSpecificLocalTime(::std::mem::transmute(lptimezoneinformation), ::std::mem::transmute(lpuniversaltime), ::std::mem::transmute(lplocaltime)))
217     }
218     #[cfg(not(windows))]
219     unimplemented!("Unsupported target OS");
220 }
221 #[cfg(feature = "Win32_Foundation")]
222 #[inline]
SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL223 pub unsafe fn SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL {
224     #[cfg(windows)]
225     {
226         #[link(name = "windows")]
227         extern "system" {
228             fn SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL;
229         }
230         ::std::mem::transmute(SystemTimeToTzSpecificLocalTimeEx(::std::mem::transmute(lptimezoneinformation), ::std::mem::transmute(lpuniversaltime), ::std::mem::transmute(lplocaltime)))
231     }
232     #[cfg(not(windows))]
233     unimplemented!("Unsupported target OS");
234 }
235 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
236 #[repr(C)]
237 #[cfg(feature = "Win32_Foundation")]
238 pub struct TIME_ZONE_INFORMATION {
239     pub Bias: i32,
240     pub StandardName: [u16; 32],
241     pub StandardDate: super::super::Foundation::SYSTEMTIME,
242     pub StandardBias: i32,
243     pub DaylightName: [u16; 32],
244     pub DaylightDate: super::super::Foundation::SYSTEMTIME,
245     pub DaylightBias: i32,
246 }
247 #[cfg(feature = "Win32_Foundation")]
248 impl TIME_ZONE_INFORMATION {}
249 #[cfg(feature = "Win32_Foundation")]
250 impl ::std::default::Default for TIME_ZONE_INFORMATION {
default() -> Self251     fn default() -> Self {
252         unsafe { ::std::mem::zeroed() }
253     }
254 }
255 #[cfg(feature = "Win32_Foundation")]
256 impl ::std::fmt::Debug for TIME_ZONE_INFORMATION {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result257     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
258         fmt.debug_struct("TIME_ZONE_INFORMATION")
259             .field("Bias", &self.Bias)
260             .field("StandardName", &self.StandardName)
261             .field("StandardDate", &self.StandardDate)
262             .field("StandardBias", &self.StandardBias)
263             .field("DaylightName", &self.DaylightName)
264             .field("DaylightDate", &self.DaylightDate)
265             .field("DaylightBias", &self.DaylightBias)
266             .finish()
267     }
268 }
269 #[cfg(feature = "Win32_Foundation")]
270 impl ::std::cmp::PartialEq for TIME_ZONE_INFORMATION {
eq(&self, other: &Self) -> bool271     fn eq(&self, other: &Self) -> bool {
272         self.Bias == other.Bias && self.StandardName == other.StandardName && self.StandardDate == other.StandardDate && self.StandardBias == other.StandardBias && self.DaylightName == other.DaylightName && self.DaylightDate == other.DaylightDate && self.DaylightBias == other.DaylightBias
273     }
274 }
275 #[cfg(feature = "Win32_Foundation")]
276 impl ::std::cmp::Eq for TIME_ZONE_INFORMATION {}
277 #[cfg(feature = "Win32_Foundation")]
278 unsafe impl ::windows::runtime::Abi for TIME_ZONE_INFORMATION {
279     type Abi = Self;
280     type DefaultType = Self;
281 }
282 pub const TSF_Authenticated: u32 = 2u32;
283 pub const TSF_Hardware: u32 = 1u32;
284 pub const TSF_IPv6: u32 = 4u32;
285 pub const TSF_SignatureAuthenticated: u32 = 8u32;
286 #[cfg(feature = "Win32_Foundation")]
287 #[inline]
TzSpecificLocalTimeToSystemTime(lptimezoneinformation: *const TIME_ZONE_INFORMATION, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL288 pub unsafe fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation: *const TIME_ZONE_INFORMATION, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL {
289     #[cfg(windows)]
290     {
291         #[link(name = "windows")]
292         extern "system" {
293             fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation: *const TIME_ZONE_INFORMATION, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL;
294         }
295         ::std::mem::transmute(TzSpecificLocalTimeToSystemTime(::std::mem::transmute(lptimezoneinformation), ::std::mem::transmute(lplocaltime), ::std::mem::transmute(lpuniversaltime)))
296     }
297     #[cfg(not(windows))]
298     unimplemented!("Unsupported target OS");
299 }
300 #[cfg(feature = "Win32_Foundation")]
301 #[inline]
TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL302 pub unsafe fn TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL {
303     #[cfg(windows)]
304     {
305         #[link(name = "windows")]
306         extern "system" {
307             fn TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL;
308         }
309         ::std::mem::transmute(TzSpecificLocalTimeToSystemTimeEx(::std::mem::transmute(lptimezoneinformation), ::std::mem::transmute(lplocaltime), ::std::mem::transmute(lpuniversaltime)))
310     }
311     #[cfg(not(windows))]
312     unimplemented!("Unsupported target OS");
313 }
314