| 1 |
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, dead_code, clippy::all)] |
| 2 |
windows_targets::link!("kernel32.dll" "system" fn GetTimeZoneInformationForYear(wyear : u16, pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi : *mut TIME_ZONE_INFORMATION) -> BOOL); |
| 3 |
windows_targets::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const SYSTEMTIME, lpfiletime : *mut FILETIME) -> BOOL); |
| 4 |
windows_targets::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lpuniversaltime : *const SYSTEMTIME, lplocaltime : *mut SYSTEMTIME) -> BOOL); |
| 5 |
windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lplocaltime : *const SYSTEMTIME, lpuniversaltime : *mut SYSTEMTIME) -> BOOL); |
| 6 |
pub type BOOL = i32; |
| 7 |
pub type BOOLEAN = u8; |
| 8 |
#[repr(C)] |
| 9 |
pub struct DYNAMIC_TIME_ZONE_INFORMATION { |
| 10 |
pub Bias: i32, |
| 11 |
pub StandardName: [u16; 32], |
| 12 |
pub StandardDate: SYSTEMTIME, |
| 13 |
pub StandardBias: i32, |
| 14 |
pub DaylightName: [u16; 32], |
| 15 |
pub DaylightDate: SYSTEMTIME, |
| 16 |
pub DaylightBias: i32, |
| 17 |
pub TimeZoneKeyName: [u16; 128], |
| 18 |
pub DynamicDaylightTimeDisabled: BOOLEAN, |
| 19 |
} |
| 20 |
impl Copy for DYNAMIC_TIME_ZONE_INFORMATION {} |
| 21 |
impl Clone for DYNAMIC_TIME_ZONE_INFORMATION { |
| 22 |
fn clone(&self) -> Self { |
| 23 |
*self |
| 24 |
} |
| 25 |
} |
| 26 |
#[repr(C)] |
| 27 |
pub struct FILETIME { |
| 28 |
pub dwLowDateTime: u32, |
| 29 |
pub dwHighDateTime: u32, |
| 30 |
} |
| 31 |
impl Copy for FILETIME {} |
| 32 |
impl Clone for FILETIME { |
| 33 |
fn clone(&self) -> Self { |
| 34 |
*self |
| 35 |
} |
| 36 |
} |
| 37 |
#[repr(C)] |
| 38 |
pub struct SYSTEMTIME { |
| 39 |
pub wYear: u16, |
| 40 |
pub wMonth: u16, |
| 41 |
pub wDayOfWeek: u16, |
| 42 |
pub wDay: u16, |
| 43 |
pub wHour: u16, |
| 44 |
pub wMinute: u16, |
| 45 |
pub wSecond: u16, |
| 46 |
pub wMilliseconds: u16, |
| 47 |
} |
| 48 |
impl Copy for SYSTEMTIME {} |
| 49 |
impl Clone for SYSTEMTIME { |
| 50 |
fn clone(&self) -> Self { |
| 51 |
*self |
| 52 |
} |
| 53 |
} |
| 54 |
#[repr(C)] |
| 55 |
pub struct TIME_ZONE_INFORMATION { |
| 56 |
pub Bias: i32, |
| 57 |
pub StandardName: [u16; 32], |
| 58 |
pub StandardDate: SYSTEMTIME, |
| 59 |
pub StandardBias: i32, |
| 60 |
pub DaylightName: [u16; 32], |
| 61 |
pub DaylightDate: SYSTEMTIME, |
| 62 |
pub DaylightBias: i32, |
| 63 |
} |
| 64 |
impl Copy for TIME_ZONE_INFORMATION {} |
| 65 |
impl Clone for TIME_ZONE_INFORMATION { |
| 66 |
fn clone(&self) -> Self { |
| 67 |
*self |
| 68 |
} |
| 69 |
} |