]>
Commit | Line | Data |
---|---|---|
353b0b11 FG |
1 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] |
2 | #[cfg(feature = "Win32_Foundation")] | |
3 | #[inline] | |
4 | pub unsafe fn EnumDynamicTimeZoneInformation(dwindex: u32, lptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32 { | |
5 | ::windows::imp::link ! ( "advapi32.dll""system" fn EnumDynamicTimeZoneInformation ( dwindex : u32 , lptimezoneinformation : *mut DYNAMIC_TIME_ZONE_INFORMATION ) -> u32 ); | |
6 | EnumDynamicTimeZoneInformation(dwindex, lptimezoneinformation) | |
7 | } | |
8 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
9 | #[cfg(feature = "Win32_Foundation")] | |
10 | #[inline] | |
11 | pub unsafe fn FileTimeToSystemTime(lpfiletime: *const super::super::Foundation::FILETIME, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { | |
12 | ::windows::imp::link ! ( "kernel32.dll""system" fn FileTimeToSystemTime ( lpfiletime : *const super::super::Foundation:: FILETIME , lpsystemtime : *mut super::super::Foundation:: SYSTEMTIME ) -> super::super::Foundation:: BOOL ); | |
13 | FileTimeToSystemTime(lpfiletime, lpsystemtime) | |
14 | } | |
15 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
16 | #[cfg(feature = "Win32_Foundation")] | |
17 | #[inline] | |
18 | pub unsafe fn GetDynamicTimeZoneInformation(ptimezoneinformation: *mut DYNAMIC_TIME_ZONE_INFORMATION) -> u32 { | |
19 | ::windows::imp::link ! ( "kernel32.dll""system" fn GetDynamicTimeZoneInformation ( ptimezoneinformation : *mut DYNAMIC_TIME_ZONE_INFORMATION ) -> u32 ); | |
20 | GetDynamicTimeZoneInformation(ptimezoneinformation) | |
21 | } | |
22 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
23 | #[cfg(feature = "Win32_Foundation")] | |
24 | #[inline] | |
25 | pub unsafe fn GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION, firstyear: *mut u32, lastyear: *mut u32) -> u32 { | |
26 | ::windows::imp::link ! ( "advapi32.dll""system" fn GetDynamicTimeZoneInformationEffectiveYears ( lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION , firstyear : *mut u32 , lastyear : *mut u32 ) -> u32 ); | |
27 | GetDynamicTimeZoneInformationEffectiveYears(lptimezoneinformation, firstyear, lastyear) | |
28 | } | |
29 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
30 | #[cfg(feature = "Win32_Foundation")] | |
31 | #[inline] | |
32 | pub unsafe fn GetTimeZoneInformation(lptimezoneinformation: *mut TIME_ZONE_INFORMATION) -> u32 { | |
33 | ::windows::imp::link ! ( "kernel32.dll""system" fn GetTimeZoneInformation ( lptimezoneinformation : *mut TIME_ZONE_INFORMATION ) -> u32 ); | |
34 | GetTimeZoneInformation(lptimezoneinformation) | |
35 | } | |
36 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
37 | #[cfg(feature = "Win32_Foundation")] | |
38 | #[inline] | |
39 | pub unsafe fn GetTimeZoneInformationForYear(wyear: u16, pdtzi: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, ptzi: *mut TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL { | |
40 | ::windows::imp::link ! ( "kernel32.dll""system" fn GetTimeZoneInformationForYear ( wyear : u16 , pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION , ptzi : *mut TIME_ZONE_INFORMATION ) -> super::super::Foundation:: BOOL ); | |
41 | GetTimeZoneInformationForYear(wyear, ::core::mem::transmute(pdtzi.unwrap_or(::std::ptr::null())), ptzi) | |
42 | } | |
43 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
44 | #[cfg(feature = "Win32_Foundation")] | |
45 | #[inline] | |
46 | pub unsafe fn LocalFileTimeToLocalSystemTime(timezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, localfiletime: *const super::super::Foundation::FILETIME, localsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { | |
47 | ::windows::imp::link ! ( "kernel32.dll""system" fn LocalFileTimeToLocalSystemTime ( timezoneinformation : *const TIME_ZONE_INFORMATION , localfiletime : *const super::super::Foundation:: FILETIME , localsystemtime : *mut super::super::Foundation:: SYSTEMTIME ) -> super::super::Foundation:: BOOL ); | |
48 | LocalFileTimeToLocalSystemTime(::core::mem::transmute(timezoneinformation.unwrap_or(::std::ptr::null())), localfiletime, localsystemtime) | |
49 | } | |
50 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
51 | #[cfg(feature = "Win32_Foundation")] | |
52 | #[inline] | |
53 | pub unsafe fn LocalSystemTimeToLocalFileTime(timezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, localsystemtime: *const super::super::Foundation::SYSTEMTIME, localfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { | |
54 | ::windows::imp::link ! ( "kernel32.dll""system" fn LocalSystemTimeToLocalFileTime ( timezoneinformation : *const TIME_ZONE_INFORMATION , localsystemtime : *const super::super::Foundation:: SYSTEMTIME , localfiletime : *mut super::super::Foundation:: FILETIME ) -> super::super::Foundation:: BOOL ); | |
55 | LocalSystemTimeToLocalFileTime(::core::mem::transmute(timezoneinformation.unwrap_or(::std::ptr::null())), localsystemtime, localfiletime) | |
56 | } | |
57 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
58 | #[cfg(feature = "Win32_Foundation")] | |
59 | #[inline] | |
60 | pub unsafe fn SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL { | |
61 | ::windows::imp::link ! ( "kernel32.dll""system" fn SetDynamicTimeZoneInformation ( lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION ) -> super::super::Foundation:: BOOL ); | |
62 | SetDynamicTimeZoneInformation(lptimezoneinformation) | |
63 | } | |
64 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
65 | #[cfg(feature = "Win32_Foundation")] | |
66 | #[inline] | |
67 | pub unsafe fn SetTimeZoneInformation(lptimezoneinformation: *const TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL { | |
68 | ::windows::imp::link ! ( "kernel32.dll""system" fn SetTimeZoneInformation ( lptimezoneinformation : *const TIME_ZONE_INFORMATION ) -> super::super::Foundation:: BOOL ); | |
69 | SetTimeZoneInformation(lptimezoneinformation) | |
70 | } | |
71 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
72 | #[cfg(feature = "Win32_Foundation")] | |
73 | #[inline] | |
74 | pub unsafe fn SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { | |
75 | ::windows::imp::link ! ( "kernel32.dll""system" fn SystemTimeToFileTime ( lpsystemtime : *const super::super::Foundation:: SYSTEMTIME , lpfiletime : *mut super::super::Foundation:: FILETIME ) -> super::super::Foundation:: BOOL ); | |
76 | SystemTimeToFileTime(lpsystemtime, lpfiletime) | |
77 | } | |
78 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
79 | #[cfg(feature = "Win32_Foundation")] | |
80 | #[inline] | |
81 | pub unsafe fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { | |
82 | ::windows::imp::link ! ( "kernel32.dll""system" fn SystemTimeToTzSpecificLocalTime ( lptimezoneinformation : *const TIME_ZONE_INFORMATION , lpuniversaltime : *const super::super::Foundation:: SYSTEMTIME , lplocaltime : *mut super::super::Foundation:: SYSTEMTIME ) -> super::super::Foundation:: BOOL ); | |
83 | SystemTimeToTzSpecificLocalTime(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lpuniversaltime, lplocaltime) | |
84 | } | |
85 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
86 | #[cfg(feature = "Win32_Foundation")] | |
87 | #[inline] | |
88 | pub unsafe fn SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { | |
89 | ::windows::imp::link ! ( "kernel32.dll""system" fn SystemTimeToTzSpecificLocalTimeEx ( lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION , lpuniversaltime : *const super::super::Foundation:: SYSTEMTIME , lplocaltime : *mut super::super::Foundation:: SYSTEMTIME ) -> super::super::Foundation:: BOOL ); | |
90 | SystemTimeToTzSpecificLocalTimeEx(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lpuniversaltime, lplocaltime) | |
91 | } | |
92 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
93 | #[cfg(feature = "Win32_Foundation")] | |
94 | #[inline] | |
95 | pub unsafe fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { | |
96 | ::windows::imp::link ! ( "kernel32.dll""system" fn TzSpecificLocalTimeToSystemTime ( lptimezoneinformation : *const TIME_ZONE_INFORMATION , lplocaltime : *const super::super::Foundation:: SYSTEMTIME , lpuniversaltime : *mut super::super::Foundation:: SYSTEMTIME ) -> super::super::Foundation:: BOOL ); | |
97 | TzSpecificLocalTimeToSystemTime(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lplocaltime, lpuniversaltime) | |
98 | } | |
99 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
100 | #[cfg(feature = "Win32_Foundation")] | |
101 | #[inline] | |
102 | pub unsafe fn TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { | |
103 | ::windows::imp::link ! ( "kernel32.dll""system" fn TzSpecificLocalTimeToSystemTimeEx ( lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION , lplocaltime : *const super::super::Foundation:: SYSTEMTIME , lpuniversaltime : *mut super::super::Foundation:: SYSTEMTIME ) -> super::super::Foundation:: BOOL ); | |
104 | TzSpecificLocalTimeToSystemTimeEx(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lplocaltime, lpuniversaltime) | |
105 | } | |
106 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
107 | pub const TIME_ZONE_ID_INVALID: u32 = 4294967295u32; | |
108 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
109 | pub const TSF_Authenticated: u32 = 2u32; | |
110 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
111 | pub const TSF_Hardware: u32 = 1u32; | |
112 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
113 | pub const TSF_IPv6: u32 = 4u32; | |
114 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
115 | pub const TSF_SignatureAuthenticated: u32 = 8u32; | |
116 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
117 | pub const wszW32TimeRegKeyPolicyTimeProviders: ::windows::core::PCWSTR = ::windows::w!("Software\\Policies\\Microsoft\\W32Time\\TimeProviders"); | |
118 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
119 | pub const wszW32TimeRegKeyTimeProviders: ::windows::core::PCWSTR = ::windows::w!("System\\CurrentControlSet\\Services\\W32Time\\TimeProviders"); | |
120 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
121 | pub const wszW32TimeRegValueDllName: ::windows::core::PCWSTR = ::windows::w!("DllName"); | |
122 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
123 | pub const wszW32TimeRegValueEnabled: ::windows::core::PCWSTR = ::windows::w!("Enabled"); | |
124 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
125 | pub const wszW32TimeRegValueInputProvider: ::windows::core::PCWSTR = ::windows::w!("InputProvider"); | |
126 | #[doc = "*Required features: `\"Win32_System_Time\"`*"] | |
127 | pub const wszW32TimeRegValueMetaDataProvider: ::windows::core::PCWSTR = ::windows::w!("MetaDataProvider"); | |
128 | #[repr(C)] | |
129 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
130 | #[cfg(feature = "Win32_Foundation")] | |
131 | pub struct DYNAMIC_TIME_ZONE_INFORMATION { | |
132 | pub Bias: i32, | |
133 | pub StandardName: [u16; 32], | |
134 | pub StandardDate: super::super::Foundation::SYSTEMTIME, | |
135 | pub StandardBias: i32, | |
136 | pub DaylightName: [u16; 32], | |
137 | pub DaylightDate: super::super::Foundation::SYSTEMTIME, | |
138 | pub DaylightBias: i32, | |
139 | pub TimeZoneKeyName: [u16; 128], | |
140 | pub DynamicDaylightTimeDisabled: super::super::Foundation::BOOLEAN, | |
141 | } | |
142 | #[cfg(feature = "Win32_Foundation")] | |
143 | impl ::core::marker::Copy for DYNAMIC_TIME_ZONE_INFORMATION {} | |
144 | #[cfg(feature = "Win32_Foundation")] | |
145 | impl ::core::clone::Clone for DYNAMIC_TIME_ZONE_INFORMATION { | |
146 | fn clone(&self) -> Self { | |
147 | *self | |
148 | } | |
149 | } | |
150 | #[cfg(feature = "Win32_Foundation")] | |
151 | impl ::core::fmt::Debug for DYNAMIC_TIME_ZONE_INFORMATION { | |
152 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
153 | f.debug_struct("DYNAMIC_TIME_ZONE_INFORMATION").field("Bias", &self.Bias).field("StandardName", &self.StandardName).field("StandardDate", &self.StandardDate).field("StandardBias", &self.StandardBias).field("DaylightName", &self.DaylightName).field("DaylightDate", &self.DaylightDate).field("DaylightBias", &self.DaylightBias).field("TimeZoneKeyName", &self.TimeZoneKeyName).field("DynamicDaylightTimeDisabled", &self.DynamicDaylightTimeDisabled).finish() | |
154 | } | |
155 | } | |
156 | #[cfg(feature = "Win32_Foundation")] | |
157 | impl ::windows::core::TypeKind for DYNAMIC_TIME_ZONE_INFORMATION { | |
158 | type TypeKind = ::windows::core::CopyType; | |
159 | } | |
160 | #[cfg(feature = "Win32_Foundation")] | |
161 | impl ::core::cmp::PartialEq for DYNAMIC_TIME_ZONE_INFORMATION { | |
162 | fn eq(&self, other: &Self) -> bool { | |
163 | 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 | |
164 | } | |
165 | } | |
166 | #[cfg(feature = "Win32_Foundation")] | |
167 | impl ::core::cmp::Eq for DYNAMIC_TIME_ZONE_INFORMATION {} | |
168 | #[cfg(feature = "Win32_Foundation")] | |
169 | impl ::core::default::Default for DYNAMIC_TIME_ZONE_INFORMATION { | |
170 | fn default() -> Self { | |
171 | unsafe { ::core::mem::zeroed() } | |
172 | } | |
173 | } | |
174 | #[repr(C)] | |
175 | #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] | |
176 | #[cfg(feature = "Win32_Foundation")] | |
177 | pub struct TIME_ZONE_INFORMATION { | |
178 | pub Bias: i32, | |
179 | pub StandardName: [u16; 32], | |
180 | pub StandardDate: super::super::Foundation::SYSTEMTIME, | |
181 | pub StandardBias: i32, | |
182 | pub DaylightName: [u16; 32], | |
183 | pub DaylightDate: super::super::Foundation::SYSTEMTIME, | |
184 | pub DaylightBias: i32, | |
185 | } | |
186 | #[cfg(feature = "Win32_Foundation")] | |
187 | impl ::core::marker::Copy for TIME_ZONE_INFORMATION {} | |
188 | #[cfg(feature = "Win32_Foundation")] | |
189 | impl ::core::clone::Clone for TIME_ZONE_INFORMATION { | |
190 | fn clone(&self) -> Self { | |
191 | *self | |
192 | } | |
193 | } | |
194 | #[cfg(feature = "Win32_Foundation")] | |
195 | impl ::core::fmt::Debug for TIME_ZONE_INFORMATION { | |
196 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
197 | f.debug_struct("TIME_ZONE_INFORMATION").field("Bias", &self.Bias).field("StandardName", &self.StandardName).field("StandardDate", &self.StandardDate).field("StandardBias", &self.StandardBias).field("DaylightName", &self.DaylightName).field("DaylightDate", &self.DaylightDate).field("DaylightBias", &self.DaylightBias).finish() | |
198 | } | |
199 | } | |
200 | #[cfg(feature = "Win32_Foundation")] | |
201 | impl ::windows::core::TypeKind for TIME_ZONE_INFORMATION { | |
202 | type TypeKind = ::windows::core::CopyType; | |
203 | } | |
204 | #[cfg(feature = "Win32_Foundation")] | |
205 | impl ::core::cmp::PartialEq for TIME_ZONE_INFORMATION { | |
206 | fn eq(&self, other: &Self) -> bool { | |
207 | 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 | |
208 | } | |
209 | } | |
210 | #[cfg(feature = "Win32_Foundation")] | |
211 | impl ::core::cmp::Eq for TIME_ZONE_INFORMATION {} | |
212 | #[cfg(feature = "Win32_Foundation")] | |
213 | impl ::core::default::Default for TIME_ZONE_INFORMATION { | |
214 | fn default() -> Self { | |
215 | unsafe { ::core::mem::zeroed() } | |
216 | } | |
217 | } | |
218 | #[cfg(feature = "implement")] | |
219 | ::core::include!("impl.rs"); |