diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.github/workflows/ci.yml b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.github/workflows/ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..e8cabbede6547318e0fdf669aa7e824f1bd865b3 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + test: + name: Test with Rust ${{ matrix.rust }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + rust: [1.41.1, stable, beta, nightly] + steps: + - uses: actions/checkout@v2 + - uses: hecrj/setup-rust-action@v1 + with: + rust-version: ${{ matrix.rust }} + - run: cargo test --verbose --all-features + - run: cargo test --verbose --no-default-features --features alloc + - run: cargo test --verbose --no-default-features + + clippy: + name: Lint with Clippy + runs-on: ubuntu-latest + env: + RUSTFLAGS: -Dwarnings + steps: + - uses: actions/checkout@v2 + - uses: hecrj/setup-rust-action@v1 + with: + components: clippy + - run: cargo clippy --all-targets --verbose --no-default-features + - run: cargo clippy --all-targets --verbose --all-features + + test-minimal: + name: Test minimal dependency version with Rust nightly + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: hecrj/setup-rust-action@v1 + with: + rust-version: nightly + - run: cargo test -Zminimal-versions --verbose --all-features + + miri: + name: Run tests under `miri` to check for UB + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@nightly + with: + components: miri + - run: cargo miri test --all-features diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_char.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_char.rs new file mode 100644 index 0000000000000000000000000000000000000000..5011949f76a075c39ba366687e526a564652d6bc --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_char.rs @@ -0,0 +1,1069 @@ +use core::cmp::Ordering; +use core::mem; +use core::{char, fmt}; +#[cfg(feature = "std")] +use std::error::Error; + +#[allow(non_camel_case_types)] +/// An ASCII character. It wraps a `u8`, with the highest bit always zero. +#[derive(Clone, PartialEq, PartialOrd, Ord, Eq, Hash, Copy)] +#[repr(u8)] +pub enum AsciiChar { + /// `'\0'` + Null = 0, + /// [Start Of Heading](http://en.wikipedia.org/wiki/Start_of_Heading) + SOH = 1, + /// [Start Of teXt](http://en.wikipedia.org/wiki/Start_of_Text) + SOX = 2, + /// [End of TeXt](http://en.wikipedia.org/wiki/End-of-Text_character) + ETX = 3, + /// [End Of Transmission](http://en.wikipedia.org/wiki/End-of-Transmission_character) + EOT = 4, + /// [Enquiry](http://en.wikipedia.org/wiki/Enquiry_character) + ENQ = 5, + /// [Acknowledgement](http://en.wikipedia.org/wiki/Acknowledge_character) + ACK = 6, + /// [bell / alarm / audible](http://en.wikipedia.org/wiki/Bell_character) + /// + /// `'\a'` is not recognized by Rust. + Bell = 7, + /// [Backspace](http://en.wikipedia.org/wiki/Backspace) + /// + /// `'\b'` is not recognized by Rust. + BackSpace = 8, + /// `'\t'` + Tab = 9, + /// `'\n'` + LineFeed = 10, + /// [Vertical tab](http://en.wikipedia.org/wiki/Vertical_Tab) + /// + /// `'\v'` is not recognized by Rust. + VT = 11, + /// [Form Feed](http://en.wikipedia.org/wiki/Form_Feed) + /// + /// `'\f'` is not recognized by Rust. + FF = 12, + /// `'\r'` + CarriageReturn = 13, + /// [Shift In](http://en.wikipedia.org/wiki/Shift_Out_and_Shift_In_characters) + SI = 14, + /// [Shift Out](http://en.wikipedia.org/wiki/Shift_Out_and_Shift_In_characters) + SO = 15, + /// [Data Link Escape](http://en.wikipedia.org/wiki/Data_Link_Escape) + DLE = 16, + /// [Device control 1, often XON](http://en.wikipedia.org/wiki/Device_Control_1) + DC1 = 17, + /// Device control 2 + DC2 = 18, + /// Device control 3, Often XOFF + DC3 = 19, + /// Device control 4 + DC4 = 20, + /// [Negative AcKnowledgement](http://en.wikipedia.org/wiki/Negative-acknowledge_character) + NAK = 21, + /// [Synchronous idle](http://en.wikipedia.org/wiki/Synchronous_Idle) + SYN = 22, + /// [End of Transmission Block](http://en.wikipedia.org/wiki/End-of-Transmission-Block_character) + ETB = 23, + /// [Cancel](http://en.wikipedia.org/wiki/Cancel_character) + CAN = 24, + /// [End of Medium](http://en.wikipedia.org/wiki/End_of_Medium) + EM = 25, + /// [Substitute](http://en.wikipedia.org/wiki/Substitute_character) + SUB = 26, + /// [Escape](http://en.wikipedia.org/wiki/Escape_character) + /// + /// `'\e'` is not recognized by Rust. + ESC = 27, + /// [File Separator](http://en.wikipedia.org/wiki/File_separator) + FS = 28, + /// [Group Separator](http://en.wikipedia.org/wiki/Group_separator) + GS = 29, + /// [Record Separator](http://en.wikipedia.org/wiki/Record_separator) + RS = 30, + /// [Unit Separator](http://en.wikipedia.org/wiki/Unit_separator) + US = 31, + /// `' '` + Space = 32, + /// `'!'` + Exclamation = 33, + /// `'"'` + Quotation = 34, + /// `'#'` + Hash = 35, + /// `'$'` + Dollar = 36, + /// `'%'` + Percent = 37, + /// `'&'` + Ampersand = 38, + /// `'\''` + Apostrophe = 39, + /// `'('` + ParenOpen = 40, + /// `')'` + ParenClose = 41, + /// `'*'` + Asterisk = 42, + /// `'+'` + Plus = 43, + /// `','` + Comma = 44, + /// `'-'` + Minus = 45, + /// `'.'` + Dot = 46, + /// `'/'` + Slash = 47, + /// `'0'` + _0 = 48, + /// `'1'` + _1 = 49, + /// `'2'` + _2 = 50, + /// `'3'` + _3 = 51, + /// `'4'` + _4 = 52, + /// `'5'` + _5 = 53, + /// `'6'` + _6 = 54, + /// `'7'` + _7 = 55, + /// `'8'` + _8 = 56, + /// `'9'` + _9 = 57, + /// `':'` + Colon = 58, + /// `';'` + Semicolon = 59, + /// `'<'` + LessThan = 60, + /// `'='` + Equal = 61, + /// `'>'` + GreaterThan = 62, + /// `'?'` + Question = 63, + /// `'@'` + At = 64, + /// `'A'` + A = 65, + /// `'B'` + B = 66, + /// `'C'` + C = 67, + /// `'D'` + D = 68, + /// `'E'` + E = 69, + /// `'F'` + F = 70, + /// `'G'` + G = 71, + /// `'H'` + H = 72, + /// `'I'` + I = 73, + /// `'J'` + J = 74, + /// `'K'` + K = 75, + /// `'L'` + L = 76, + /// `'M'` + M = 77, + /// `'N'` + N = 78, + /// `'O'` + O = 79, + /// `'P'` + P = 80, + /// `'Q'` + Q = 81, + /// `'R'` + R = 82, + /// `'S'` + S = 83, + /// `'T'` + T = 84, + /// `'U'` + U = 85, + /// `'V'` + V = 86, + /// `'W'` + W = 87, + /// `'X'` + X = 88, + /// `'Y'` + Y = 89, + /// `'Z'` + Z = 90, + /// `'['` + BracketOpen = 91, + /// `'\'` + BackSlash = 92, + /// `']'` + BracketClose = 93, + /// `'^'` + Caret = 94, + /// `'_'` + UnderScore = 95, + /// `'`'` + Grave = 96, + /// `'a'` + a = 97, + /// `'b'` + b = 98, + /// `'c'` + c = 99, + /// `'d'` + d = 100, + /// `'e'` + e = 101, + /// `'f'` + f = 102, + /// `'g'` + g = 103, + /// `'h'` + h = 104, + /// `'i'` + i = 105, + /// `'j'` + j = 106, + /// `'k'` + k = 107, + /// `'l'` + l = 108, + /// `'m'` + m = 109, + /// `'n'` + n = 110, + /// `'o'` + o = 111, + /// `'p'` + p = 112, + /// `'q'` + q = 113, + /// `'r'` + r = 114, + /// `'s'` + s = 115, + /// `'t'` + t = 116, + /// `'u'` + u = 117, + /// `'v'` + v = 118, + /// `'w'` + w = 119, + /// `'x'` + x = 120, + /// `'y'` + y = 121, + /// `'z'` + z = 122, + /// `'{'` + CurlyBraceOpen = 123, + /// `'|'` + VerticalBar = 124, + /// `'}'` + CurlyBraceClose = 125, + /// `'~'` + Tilde = 126, + /// [Delete](http://en.wikipedia.org/wiki/Delete_character) + DEL = 127, +} + +impl AsciiChar { + /// Constructs an ASCII character from a `u8`, `char` or other character type. + /// + /// # Errors + /// Returns `Err(())` if the character can't be ASCII encoded. + /// + /// # Example + /// ``` + /// # use ascii::AsciiChar; + /// let a = AsciiChar::from_ascii('g').unwrap(); + /// assert_eq!(a.as_char(), 'g'); + /// ``` + #[inline] + pub fn from_ascii(ch: C) -> Result { + ch.to_ascii_char() + } + + /// Create an `AsciiChar` from a `char`, panicking if it's not ASCII. + /// + /// This function is intended for creating `AsciiChar` values from + /// hardcoded known-good character literals such as `'K'`, `'-'` or `'\0'`, + /// and for use in `const` contexts. + /// Use [`from_ascii()`](#method.from_ascii) instead when you're not + /// certain the character is ASCII. + /// + /// # Examples + /// + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('@'), AsciiChar::At); + /// assert_eq!(AsciiChar::new('C').as_char(), 'C'); + /// ``` + /// + /// In a constant: + /// ``` + /// # use ascii::AsciiChar; + /// const SPLIT_ON: AsciiChar = AsciiChar::new(','); + /// ``` + /// + /// This will not compile: + /// ```compile_fail + /// # use ascii::AsciiChar; + /// const BAD: AsciiChar = AsciiChar::new('Ø'); + /// ``` + /// + /// # Panics + /// + /// This function will panic if passed a non-ASCII character. + /// + /// The panic message might not be the most descriptive due to the + /// current limitations of `const fn`. + #[must_use] + pub const fn new(ch: char) -> AsciiChar { + // It's restricted to this function, and without it + // we'd need to specify `AsciiChar::` or `Self::` 128 times. + #[allow(clippy::enum_glob_use)] + use AsciiChar::*; + + #[rustfmt::skip] + const ALL: [AsciiChar; 128] = [ + Null, SOH, SOX, ETX, EOT, ENQ, ACK, Bell, + BackSpace, Tab, LineFeed, VT, FF, CarriageReturn, SI, SO, + DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, + CAN, EM, SUB, ESC, FS, GS, RS, US, + Space, Exclamation, Quotation, Hash, Dollar, Percent, Ampersand, Apostrophe, + ParenOpen, ParenClose, Asterisk, Plus, Comma, Minus, Dot, Slash, + _0, _1, _2, _3, _4, _5, _6, _7, + _8, _9, Colon, Semicolon, LessThan, Equal, GreaterThan, Question, + At, A, B, C, D, E, F, G, + H, I, J, K, L, M, N, O, + P, Q, R, S, T, U, V, W, + X, Y, Z, BracketOpen, BackSlash, BracketClose, Caret, UnderScore, + Grave, a, b, c, d, e, f, g, + h, i, j, k, l, m, n, o, + p, q, r, s, t, u, v, w, + x, y, z, CurlyBraceOpen, VerticalBar, CurlyBraceClose, Tilde, DEL, + ]; + + // We want to slice here and detect `const_err` from rustc if the slice is invalid + #[allow(clippy::indexing_slicing)] + ALL[ch as usize] + } + + /// Constructs an ASCII character from a `u8`, `char` or other character + /// type without any checks. + /// + /// # Safety + /// + /// This function is very unsafe as it can create invalid enum + /// discriminants, which instantly creates undefined behavior. + /// (`let _ = AsciiChar::from_ascii_unchecked(200);` alone is UB). + /// + /// The undefined behavior is not just theoretical either: + /// For example, `[0; 128][AsciiChar::from_ascii_unchecked(255) as u8 as usize] = 0` + /// might not panic, creating a buffer overflow, + /// and `Some(AsciiChar::from_ascii_unchecked(128))` might be `None`. + #[inline] + #[must_use] + pub unsafe fn from_ascii_unchecked(ch: u8) -> Self { + // SAFETY: Caller guarantees `ch` is within bounds of ascii. + unsafe { ch.to_ascii_char_unchecked() } + } + + /// Converts an ASCII character into a `u8`. + #[inline] + #[must_use] + pub const fn as_byte(self) -> u8 { + self as u8 + } + + /// Converts an ASCII character into a `char`. + #[inline] + #[must_use] + pub const fn as_char(self) -> char { + self as u8 as char + } + + // the following methods are like ctype, and the implementation is inspired by musl. + // The ascii_ methods take self by reference for maximum compatibility + // with the corresponding methods on u8 and char. + // It is bad for both usability and performance, but marking those + // that doesn't have a non-ascii sibling #[inline] should + // make the compiler optimize away the indirection. + + /// Turns uppercase into lowercase, but also modifies '@' and '<'..='_' + #[must_use] + const fn to_not_upper(self) -> u8 { + self as u8 | 0b010_0000 + } + + /// Check if the character is a letter (a-z, A-Z) + #[inline] + #[must_use] + pub const fn is_alphabetic(self) -> bool { + (self.to_not_upper() >= b'a') & (self.to_not_upper() <= b'z') + } + + /// Check if the character is a letter (a-z, A-Z). + /// + /// This method is identical to [`is_alphabetic()`](#method.is_alphabetic) + #[inline] + #[must_use] + pub const fn is_ascii_alphabetic(&self) -> bool { + self.is_alphabetic() + } + + /// Check if the character is a digit in the given radix. + /// + /// If the radix is always 10 or 16, + /// [`is_ascii_digit()`](#method.is_ascii_digit) and + /// [`is_ascii_hexdigit()`](#method.is_ascii_hexdigit()) will be faster. + /// + /// # Panics + /// + /// Radixes greater than 36 are not supported and will result in a panic. + #[must_use] + pub fn is_digit(self, radix: u32) -> bool { + match (self as u8, radix) { + (b'0'..=b'9', 0..=36) => u32::from(self as u8 - b'0') < radix, + (b'a'..=b'z', 11..=36) => u32::from(self as u8 - b'a') < radix - 10, + (b'A'..=b'Z', 11..=36) => u32::from(self as u8 - b'A') < radix - 10, + (_, 0..=36) => false, + (_, _) => panic!("radixes greater than 36 are not supported"), + } + } + + /// Check if the character is a number (0-9) + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('0').is_ascii_digit(), true); + /// assert_eq!(AsciiChar::new('9').is_ascii_digit(), true); + /// assert_eq!(AsciiChar::new('a').is_ascii_digit(), false); + /// assert_eq!(AsciiChar::new('A').is_ascii_digit(), false); + /// assert_eq!(AsciiChar::new('/').is_ascii_digit(), false); + /// ``` + #[inline] + #[must_use] + pub const fn is_ascii_digit(&self) -> bool { + (*self as u8 >= b'0') & (*self as u8 <= b'9') + } + + /// Check if the character is a letter or number + #[inline] + #[must_use] + pub const fn is_alphanumeric(self) -> bool { + self.is_alphabetic() | self.is_ascii_digit() + } + + /// Check if the character is a letter or number + /// + /// This method is identical to [`is_alphanumeric()`](#method.is_alphanumeric) + #[inline] + #[must_use] + pub const fn is_ascii_alphanumeric(&self) -> bool { + self.is_alphanumeric() + } + + /// Check if the character is a space or horizontal tab + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert!(AsciiChar::Space.is_ascii_blank()); + /// assert!(AsciiChar::Tab.is_ascii_blank()); + /// assert!(!AsciiChar::VT.is_ascii_blank()); + /// assert!(!AsciiChar::LineFeed.is_ascii_blank()); + /// assert!(!AsciiChar::CarriageReturn.is_ascii_blank()); + /// assert!(!AsciiChar::FF.is_ascii_blank()); + /// ``` + #[inline] + #[must_use] + pub const fn is_ascii_blank(&self) -> bool { + (*self as u8 == b' ') | (*self as u8 == b'\t') + } + + /// Check if the character one of ' ', '\t', '\n', '\r', + /// '\0xb' (vertical tab) or '\0xc' (form feed). + #[inline] + #[must_use] + pub const fn is_whitespace(self) -> bool { + let b = self as u8; + self.is_ascii_blank() | (b == b'\n') | (b == b'\r') | (b == 0x0b) | (b == 0x0c) + } + + /// Check if the character is a ' ', '\t', '\n', '\r' or '\0xc' (form feed). + /// + /// This method is NOT identical to `is_whitespace()`. + #[inline] + #[must_use] + pub const fn is_ascii_whitespace(&self) -> bool { + self.is_ascii_blank() + | (*self as u8 == b'\n') + | (*self as u8 == b'\r') + | (*self as u8 == 0x0c/*form feed*/) + } + + /// Check if the character is a control character + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('\0').is_ascii_control(), true); + /// assert_eq!(AsciiChar::new('n').is_ascii_control(), false); + /// assert_eq!(AsciiChar::new(' ').is_ascii_control(), false); + /// assert_eq!(AsciiChar::new('\n').is_ascii_control(), true); + /// assert_eq!(AsciiChar::new('\t').is_ascii_control(), true); + /// assert_eq!(AsciiChar::EOT.is_ascii_control(), true); + /// ``` + #[inline] + #[must_use] + pub const fn is_ascii_control(&self) -> bool { + ((*self as u8) < b' ') | (*self as u8 == 127) + } + + /// Checks if the character is printable (except space) + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('n').is_ascii_graphic(), true); + /// assert_eq!(AsciiChar::new(' ').is_ascii_graphic(), false); + /// assert_eq!(AsciiChar::new('\n').is_ascii_graphic(), false); + /// ``` + #[inline] + #[must_use] + pub const fn is_ascii_graphic(&self) -> bool { + self.as_byte().wrapping_sub(b' ' + 1) < 0x5E + } + + /// Checks if the character is printable (including space) + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('n').is_ascii_printable(), true); + /// assert_eq!(AsciiChar::new(' ').is_ascii_printable(), true); + /// assert_eq!(AsciiChar::new('\n').is_ascii_printable(), false); + /// ``` + #[inline] + #[must_use] + pub const fn is_ascii_printable(&self) -> bool { + self.as_byte().wrapping_sub(b' ') < 0x5F + } + + /// Checks if the character is alphabetic and lowercase (a-z). + /// + /// # Examples + /// ``` + /// use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('a').is_lowercase(), true); + /// assert_eq!(AsciiChar::new('A').is_lowercase(), false); + /// assert_eq!(AsciiChar::new('@').is_lowercase(), false); + /// ``` + #[inline] + #[must_use] + pub const fn is_lowercase(self) -> bool { + self.as_byte().wrapping_sub(b'a') < 26 + } + + /// Checks if the character is alphabetic and lowercase (a-z). + /// + /// This method is identical to [`is_lowercase()`](#method.is_lowercase) + #[inline] + #[must_use] + pub const fn is_ascii_lowercase(&self) -> bool { + self.is_lowercase() + } + + /// Checks if the character is alphabetic and uppercase (A-Z). + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('A').is_uppercase(), true); + /// assert_eq!(AsciiChar::new('a').is_uppercase(), false); + /// assert_eq!(AsciiChar::new('@').is_uppercase(), false); + /// ``` + #[inline] + #[must_use] + pub const fn is_uppercase(self) -> bool { + self.as_byte().wrapping_sub(b'A') < 26 + } + + /// Checks if the character is alphabetic and uppercase (A-Z). + /// + /// This method is identical to [`is_uppercase()`](#method.is_uppercase) + #[inline] + #[must_use] + pub const fn is_ascii_uppercase(&self) -> bool { + self.is_uppercase() + } + + /// Checks if the character is punctuation + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('n').is_ascii_punctuation(), false); + /// assert_eq!(AsciiChar::new(' ').is_ascii_punctuation(), false); + /// assert_eq!(AsciiChar::new('_').is_ascii_punctuation(), true); + /// assert_eq!(AsciiChar::new('~').is_ascii_punctuation(), true); + /// ``` + #[inline] + #[must_use] + pub const fn is_ascii_punctuation(&self) -> bool { + self.is_ascii_graphic() & !self.is_alphanumeric() + } + + /// Checks if the character is a valid hex digit + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('5').is_ascii_hexdigit(), true); + /// assert_eq!(AsciiChar::new('a').is_ascii_hexdigit(), true); + /// assert_eq!(AsciiChar::new('F').is_ascii_hexdigit(), true); + /// assert_eq!(AsciiChar::new('G').is_ascii_hexdigit(), false); + /// assert_eq!(AsciiChar::new(' ').is_ascii_hexdigit(), false); + /// ``` + #[inline] + #[must_use] + pub const fn is_ascii_hexdigit(&self) -> bool { + self.is_ascii_digit() | ((*self as u8 | 0x20_u8).wrapping_sub(b'a') < 6) + } + + /// Unicode has printable versions of the ASCII control codes, like '␛'. + /// + /// This function is identical with `.as_char()` + /// for all values `.is_printable()` returns true for, + /// but replaces the control codes with those unicodes printable versions. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('\0').as_printable_char(), '␀'); + /// assert_eq!(AsciiChar::new('\n').as_printable_char(), '␊'); + /// assert_eq!(AsciiChar::new(' ').as_printable_char(), ' '); + /// assert_eq!(AsciiChar::new('p').as_printable_char(), 'p'); + /// ``` + #[must_use] + pub fn as_printable_char(self) -> char { + match self as u8 { + // Non printable characters + // SAFETY: From codepoint 0x2400 ('␀') to 0x241f (`␟`), there are characters representing + // the unprintable characters from 0x0 to 0x1f, ordered correctly. + // As `b` is guaranteed to be within 0x0 to 0x1f, the conversion represents a + // valid character. + b @ 0x0..=0x1f => unsafe { char::from_u32_unchecked(u32::from('␀') + u32::from(b)) }, + + // 0x7f (delete) has it's own character at codepoint 0x2420, not 0x247f, so it is special + // cased to return it's character + 0x7f => '␡', + + // All other characters are printable, and per function contract use `Self::as_char` + _ => self.as_char(), + } + } + + /// Replaces letters `a` to `z` with `A` to `Z` + pub fn make_ascii_uppercase(&mut self) { + *self = self.to_ascii_uppercase(); + } + + /// Replaces letters `A` to `Z` with `a` to `z` + pub fn make_ascii_lowercase(&mut self) { + *self = self.to_ascii_lowercase(); + } + + /// Maps letters a-z to A-Z and returns any other character unchanged. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('u').to_ascii_uppercase().as_char(), 'U'); + /// assert_eq!(AsciiChar::new('U').to_ascii_uppercase().as_char(), 'U'); + /// assert_eq!(AsciiChar::new('2').to_ascii_uppercase().as_char(), '2'); + /// assert_eq!(AsciiChar::new('=').to_ascii_uppercase().as_char(), '='); + /// assert_eq!(AsciiChar::new('[').to_ascii_uppercase().as_char(), '['); + /// ``` + #[inline] + #[must_use] + #[allow(clippy::indexing_slicing)] // We're sure it'll either access one or the other, as `bool` is either `0` or `1` + pub const fn to_ascii_uppercase(&self) -> Self { + [*self, AsciiChar::new((*self as u8 & 0b101_1111) as char)][self.is_lowercase() as usize] + } + + /// Maps letters A-Z to a-z and returns any other character unchanged. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiChar; + /// assert_eq!(AsciiChar::new('U').to_ascii_lowercase().as_char(), 'u'); + /// assert_eq!(AsciiChar::new('u').to_ascii_lowercase().as_char(), 'u'); + /// assert_eq!(AsciiChar::new('2').to_ascii_lowercase().as_char(), '2'); + /// assert_eq!(AsciiChar::new('^').to_ascii_lowercase().as_char(), '^'); + /// assert_eq!(AsciiChar::new('\x7f').to_ascii_lowercase().as_char(), '\x7f'); + /// ``` + #[inline] + #[must_use] + #[allow(clippy::indexing_slicing)] // We're sure it'll either access one or the other, as `bool` is either `0` or `1` + pub const fn to_ascii_lowercase(&self) -> Self { + [*self, AsciiChar::new(self.to_not_upper() as char)][self.is_uppercase() as usize] + } + + /// Compares two characters case-insensitively. + #[inline] + #[must_use] + pub const fn eq_ignore_ascii_case(&self, other: &Self) -> bool { + (self.as_byte() == other.as_byte()) + | (self.is_alphabetic() & (self.to_not_upper() == other.to_not_upper())) + } +} + +impl fmt::Display for AsciiChar { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + self.as_char().fmt(f) + } +} + +impl fmt::Debug for AsciiChar { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + self.as_char().fmt(f) + } +} + +impl Default for AsciiChar { + fn default() -> AsciiChar { + AsciiChar::Null + } +} + +macro_rules! impl_into_partial_eq_ord { + ($wider:ty, $to_wider:expr) => { + impl From for $wider { + #[inline] + fn from(a: AsciiChar) -> $wider { + $to_wider(a) + } + } + impl PartialEq<$wider> for AsciiChar { + #[inline] + fn eq(&self, rhs: &$wider) -> bool { + $to_wider(*self) == *rhs + } + } + impl PartialEq for $wider { + #[inline] + fn eq(&self, rhs: &AsciiChar) -> bool { + *self == $to_wider(*rhs) + } + } + impl PartialOrd<$wider> for AsciiChar { + #[inline] + fn partial_cmp(&self, rhs: &$wider) -> Option { + $to_wider(*self).partial_cmp(rhs) + } + } + impl PartialOrd for $wider { + #[inline] + fn partial_cmp(&self, rhs: &AsciiChar) -> Option { + self.partial_cmp(&$to_wider(*rhs)) + } + } + }; +} +impl_into_partial_eq_ord! {u8, AsciiChar::as_byte} +impl_into_partial_eq_ord! {char, AsciiChar::as_char} + +/// Error returned by `ToAsciiChar`. +#[derive(Clone, Copy, PartialEq, Eq)] +pub struct ToAsciiCharError(()); + +const ERRORMSG_CHAR: &str = "not an ASCII character"; + +#[cfg(not(feature = "std"))] +impl ToAsciiCharError { + /// Returns a description for this error, like `std::error::Error::description`. + #[inline] + #[must_use] + #[allow(clippy::unused_self)] + pub const fn description(&self) -> &'static str { + ERRORMSG_CHAR + } +} + +impl fmt::Debug for ToAsciiCharError { + fn fmt(&self, fmtr: &mut fmt::Formatter) -> fmt::Result { + write!(fmtr, "{}", ERRORMSG_CHAR) + } +} + +impl fmt::Display for ToAsciiCharError { + fn fmt(&self, fmtr: &mut fmt::Formatter) -> fmt::Result { + write!(fmtr, "{}", ERRORMSG_CHAR) + } +} + +#[cfg(feature = "std")] +impl Error for ToAsciiCharError { + #[inline] + fn description(&self) -> &'static str { + ERRORMSG_CHAR + } +} + +/// Convert `char`, `u8` and other character types to `AsciiChar`. +pub trait ToAsciiChar { + /// Convert to `AsciiChar`. + /// + /// # Errors + /// If `self` is outside the valid ascii range, this returns `Err` + fn to_ascii_char(self) -> Result; + + /// Convert to `AsciiChar` without checking that it is an ASCII character. + /// + /// # Safety + /// Calling this function with a value outside of the ascii range, `0x0` to `0x7f` inclusive, + /// is undefined behavior. + // TODO: Make sure this is the contract we want to express in this function. + // It is ambigous if numbers such as `0xffffff20_u32` are valid ascii characters, + // as this function returns `Ascii::Space` due to the cast to `u8`, even though + // `to_ascii_char` returns `Err()`. + unsafe fn to_ascii_char_unchecked(self) -> AsciiChar; +} + +impl ToAsciiChar for AsciiChar { + #[inline] + fn to_ascii_char(self) -> Result { + Ok(self) + } + + #[inline] + unsafe fn to_ascii_char_unchecked(self) -> AsciiChar { + self + } +} + +impl ToAsciiChar for u8 { + #[inline] + fn to_ascii_char(self) -> Result { + u32::from(self).to_ascii_char() + } + #[inline] + unsafe fn to_ascii_char_unchecked(self) -> AsciiChar { + // SAFETY: Caller guarantees `self` is within bounds of the enum + // variants, so this cast successfully produces a valid ascii + // variant + unsafe { mem::transmute::(self) } + } +} + +// Note: Casts to `u8` here does not cause problems, as the negative +// range is mapped outside of ascii bounds and we don't mind losing +// the sign, as long as negative numbers are mapped outside ascii range. +#[allow(clippy::cast_sign_loss)] +impl ToAsciiChar for i8 { + #[inline] + fn to_ascii_char(self) -> Result { + u32::from(self as u8).to_ascii_char() + } + #[inline] + unsafe fn to_ascii_char_unchecked(self) -> AsciiChar { + // SAFETY: Caller guarantees `self` is within bounds of the enum + // variants, so this cast successfully produces a valid ascii + // variant + unsafe { mem::transmute::(self as u8) } + } +} + +impl ToAsciiChar for char { + #[inline] + fn to_ascii_char(self) -> Result { + u32::from(self).to_ascii_char() + } + #[inline] + unsafe fn to_ascii_char_unchecked(self) -> AsciiChar { + // SAFETY: Caller guarantees we're within ascii range. + unsafe { u32::from(self).to_ascii_char_unchecked() } + } +} + +impl ToAsciiChar for u32 { + fn to_ascii_char(self) -> Result { + match self { + // SAFETY: We're within the valid ascii range in this branch. + 0x0..=0x7f => Ok(unsafe { self.to_ascii_char_unchecked() }), + _ => Err(ToAsciiCharError(())), + } + } + + #[inline] + unsafe fn to_ascii_char_unchecked(self) -> AsciiChar { + // Note: This cast discards the top bytes, this may cause problems, see + // the TODO on this method's documentation in the trait. + // SAFETY: Caller guarantees we're within ascii range. + #[allow(clippy::cast_possible_truncation)] // We want to truncate it + unsafe { + (self as u8).to_ascii_char_unchecked() + } + } +} + +impl ToAsciiChar for u16 { + fn to_ascii_char(self) -> Result { + u32::from(self).to_ascii_char() + } + #[inline] + unsafe fn to_ascii_char_unchecked(self) -> AsciiChar { + // Note: This cast discards the top bytes, this may cause problems, see + // the TODO on this method's documentation in the trait. + // SAFETY: Caller guarantees we're within ascii range. + #[allow(clippy::cast_possible_truncation)] // We want to truncate it + unsafe { + (self as u8).to_ascii_char_unchecked() + } + } +} + +#[cfg(test)] +mod tests { + use super::{AsciiChar, ToAsciiChar, ToAsciiCharError}; + + #[test] + fn to_ascii_char() { + fn generic(ch: C) -> Result { + ch.to_ascii_char() + } + assert_eq!(generic(AsciiChar::A), Ok(AsciiChar::A)); + assert_eq!(generic(b'A'), Ok(AsciiChar::A)); + assert_eq!(generic('A'), Ok(AsciiChar::A)); + assert!(generic(200_u16).is_err()); + assert!(generic('λ').is_err()); + } + + #[test] + fn as_byte_and_char() { + assert_eq!(AsciiChar::A.as_byte(), b'A'); + assert_eq!(AsciiChar::A.as_char(), 'A'); + } + + #[test] + fn new_array_is_correct() { + for byte in 0..128_u8 { + assert_eq!(AsciiChar::new(byte as char).as_byte(), byte); + } + } + + #[test] + fn is_all() { + #![allow(clippy::is_digit_ascii_radix)] // testing it + for byte in 0..128_u8 { + let ch = byte as char; + let ascii = AsciiChar::new(ch); + assert_eq!(ascii.is_alphabetic(), ch.is_alphabetic()); + assert_eq!(ascii.is_ascii_alphabetic(), ch.is_ascii_alphabetic()); + assert_eq!(ascii.is_alphanumeric(), ch.is_alphanumeric()); + assert_eq!(ascii.is_ascii_alphanumeric(), ch.is_ascii_alphanumeric()); + assert_eq!(ascii.is_digit(8), ch.is_digit(8), "is_digit(8) {:?}", ch); + assert_eq!(ascii.is_digit(10), ch.is_digit(10), "is_digit(10) {:?}", ch); + assert_eq!(ascii.is_digit(16), ch.is_digit(16), "is_digit(16) {:?}", ch); + assert_eq!(ascii.is_digit(36), ch.is_digit(36), "is_digit(36) {:?}", ch); + assert_eq!(ascii.is_ascii_digit(), ch.is_ascii_digit()); + assert_eq!(ascii.is_ascii_hexdigit(), ch.is_ascii_hexdigit()); + assert_eq!(ascii.is_ascii_control(), ch.is_ascii_control()); + assert_eq!(ascii.is_ascii_graphic(), ch.is_ascii_graphic()); + assert_eq!(ascii.is_ascii_punctuation(), ch.is_ascii_punctuation()); + assert_eq!( + ascii.is_whitespace(), + ch.is_whitespace(), + "{:?} ({:#04x})", + ch, + byte + ); + assert_eq!( + ascii.is_ascii_whitespace(), + ch.is_ascii_whitespace(), + "{:?} ({:#04x})", + ch, + byte + ); + assert_eq!(ascii.is_uppercase(), ch.is_uppercase()); + assert_eq!(ascii.is_ascii_uppercase(), ch.is_ascii_uppercase()); + assert_eq!(ascii.is_lowercase(), ch.is_lowercase()); + assert_eq!(ascii.is_ascii_lowercase(), ch.is_ascii_lowercase()); + assert_eq!(ascii.to_ascii_uppercase(), ch.to_ascii_uppercase()); + assert_eq!(ascii.to_ascii_lowercase(), ch.to_ascii_lowercase()); + } + } + + #[test] + fn is_digit_strange_radixes() { + assert_eq!(AsciiChar::_0.is_digit(0), '0'.is_digit(0)); + assert_eq!(AsciiChar::_0.is_digit(1), '0'.is_digit(1)); + assert_eq!(AsciiChar::_5.is_digit(5), '5'.is_digit(5)); + assert_eq!(AsciiChar::z.is_digit(35), 'z'.is_digit(35)); + } + + #[test] + #[should_panic] + fn is_digit_bad_radix() { + let _ = AsciiChar::_7.is_digit(37); + } + + #[test] + fn cmp_wider() { + assert_eq!(AsciiChar::A, 'A'); + assert_eq!(b'b', AsciiChar::b); + assert!(AsciiChar::a < 'z'); + } + + #[test] + fn ascii_case() { + assert_eq!(AsciiChar::At.to_ascii_lowercase(), AsciiChar::At); + assert_eq!(AsciiChar::At.to_ascii_uppercase(), AsciiChar::At); + assert_eq!(AsciiChar::A.to_ascii_lowercase(), AsciiChar::a); + assert_eq!(AsciiChar::A.to_ascii_uppercase(), AsciiChar::A); + assert_eq!(AsciiChar::a.to_ascii_lowercase(), AsciiChar::a); + assert_eq!(AsciiChar::a.to_ascii_uppercase(), AsciiChar::A); + + let mut mutable = (AsciiChar::A, AsciiChar::a); + mutable.0.make_ascii_lowercase(); + mutable.1.make_ascii_uppercase(); + assert_eq!(mutable.0, AsciiChar::a); + assert_eq!(mutable.1, AsciiChar::A); + + assert!(AsciiChar::LineFeed.eq_ignore_ascii_case(&AsciiChar::LineFeed)); + assert!(!AsciiChar::LineFeed.eq_ignore_ascii_case(&AsciiChar::CarriageReturn)); + assert!(AsciiChar::z.eq_ignore_ascii_case(&AsciiChar::Z)); + assert!(AsciiChar::Z.eq_ignore_ascii_case(&AsciiChar::z)); + assert!(AsciiChar::A.eq_ignore_ascii_case(&AsciiChar::a)); + assert!(!AsciiChar::K.eq_ignore_ascii_case(&AsciiChar::C)); + assert!(!AsciiChar::Z.eq_ignore_ascii_case(&AsciiChar::DEL)); + assert!(!AsciiChar::BracketOpen.eq_ignore_ascii_case(&AsciiChar::CurlyBraceOpen)); + assert!(!AsciiChar::Grave.eq_ignore_ascii_case(&AsciiChar::At)); + assert!(!AsciiChar::Grave.eq_ignore_ascii_case(&AsciiChar::DEL)); + } + + #[test] + #[cfg(feature = "std")] + fn fmt_ascii() { + assert_eq!(format!("{}", AsciiChar::t), "t"); + assert_eq!(format!("{:?}", AsciiChar::t), "'t'"); + assert_eq!(format!("{}", AsciiChar::LineFeed), "\n"); + assert_eq!(format!("{:?}", AsciiChar::LineFeed), "'\\n'"); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_str.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_str.rs new file mode 100644 index 0000000000000000000000000000000000000000..e8a6e1255001550f9d65df90b6ee61b52c0a7c65 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_str.rs @@ -0,0 +1,1600 @@ +#[cfg(feature = "alloc")] +use alloc::borrow::ToOwned; +#[cfg(feature = "alloc")] +use alloc::boxed::Box; +use core::fmt; +use core::ops::{Index, IndexMut}; +use core::ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive}; +use core::slice::{self, Iter, IterMut, SliceIndex}; +#[cfg(feature = "std")] +use std::error::Error; +#[cfg(feature = "std")] +use std::ffi::CStr; + +use ascii_char::AsciiChar; +#[cfg(feature = "alloc")] +use ascii_string::AsciiString; + +/// [`AsciiStr`] represents a byte or string slice that only contains ASCII characters. +/// +/// It wraps an `[AsciiChar]` and implements many of `str`s methods and traits. +/// +/// It can be created by a checked conversion from a `str` or `[u8]`, or borrowed from an +/// `AsciiString`. +#[derive(PartialEq, Eq, PartialOrd, Ord, Hash)] +#[repr(transparent)] +pub struct AsciiStr { + slice: [AsciiChar], +} + +impl AsciiStr { + /// Converts `&self` to a `&str` slice. + #[inline] + #[must_use] + pub fn as_str(&self) -> &str { + // SAFETY: All variants of `AsciiChar` are valid bytes for a `str`. + unsafe { &*(self as *const AsciiStr as *const str) } + } + + /// Converts `&self` into a byte slice. + #[inline] + #[must_use] + pub fn as_bytes(&self) -> &[u8] { + // SAFETY: All variants of `AsciiChar` are valid `u8`, given they're `repr(u8)`. + unsafe { &*(self as *const AsciiStr as *const [u8]) } + } + + /// Returns the entire string as slice of `AsciiChar`s. + #[inline] + #[must_use] + pub const fn as_slice(&self) -> &[AsciiChar] { + &self.slice + } + + /// Returns the entire string as mutable slice of `AsciiChar`s. + #[inline] + #[must_use] + pub fn as_mut_slice(&mut self) -> &mut [AsciiChar] { + &mut self.slice + } + + /// Returns a raw pointer to the `AsciiStr`'s buffer. + /// + /// The caller must ensure that the slice outlives the pointer this function returns, or else it + /// will end up pointing to garbage. Modifying the `AsciiStr` may cause it's buffer to be + /// reallocated, which would also make any pointers to it invalid. + #[inline] + #[must_use] + pub const fn as_ptr(&self) -> *const AsciiChar { + self.as_slice().as_ptr() + } + + /// Returns an unsafe mutable pointer to the `AsciiStr`'s buffer. + /// + /// The caller must ensure that the slice outlives the pointer this function returns, or else it + /// will end up pointing to garbage. Modifying the `AsciiStr` may cause it's buffer to be + /// reallocated, which would also make any pointers to it invalid. + #[inline] + #[must_use] + pub fn as_mut_ptr(&mut self) -> *mut AsciiChar { + self.as_mut_slice().as_mut_ptr() + } + + /// Copies the content of this `AsciiStr` into an owned `AsciiString`. + #[cfg(feature = "alloc")] + #[must_use] + pub fn to_ascii_string(&self) -> AsciiString { + AsciiString::from(self.slice.to_vec()) + } + + /// Converts anything that can represent a byte slice into an `AsciiStr`. + /// + /// # Errors + /// If `bytes` contains a non-ascii byte, `Err` will be returned + /// + /// # Examples + /// ``` + /// # use ascii::AsciiStr; + /// let foo = AsciiStr::from_ascii(b"foo"); + /// let err = AsciiStr::from_ascii("Ŋ"); + /// assert_eq!(foo.unwrap().as_str(), "foo"); + /// assert_eq!(err.unwrap_err().valid_up_to(), 0); + /// ``` + #[inline] + pub fn from_ascii(bytes: &B) -> Result<&AsciiStr, AsAsciiStrError> + where + B: AsRef<[u8]> + ?Sized, + { + bytes.as_ref().as_ascii_str() + } + + /// Converts anything that can be represented as a byte slice to an `AsciiStr` without checking + /// for non-ASCII characters.. + /// + /// # Safety + /// If any of the bytes in `bytes` do not represent valid ascii characters, calling + /// this function is undefined behavior. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiStr; + /// let foo = unsafe { AsciiStr::from_ascii_unchecked(&b"foo"[..]) }; + /// assert_eq!(foo.as_str(), "foo"); + /// ``` + #[inline] + #[must_use] + pub unsafe fn from_ascii_unchecked(bytes: &[u8]) -> &AsciiStr { + // SAFETY: Caller guarantees all bytes in `bytes` are valid + // ascii characters. + unsafe { bytes.as_ascii_str_unchecked() } + } + + /// Returns the number of characters / bytes in this ASCII sequence. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiStr; + /// let s = AsciiStr::from_ascii("foo").unwrap(); + /// assert_eq!(s.len(), 3); + /// ``` + #[inline] + #[must_use] + pub const fn len(&self) -> usize { + self.slice.len() + } + + /// Returns true if the ASCII slice contains zero bytes. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiStr; + /// let mut empty = AsciiStr::from_ascii("").unwrap(); + /// let mut full = AsciiStr::from_ascii("foo").unwrap(); + /// assert!(empty.is_empty()); + /// assert!(!full.is_empty()); + /// ``` + #[inline] + #[must_use] + pub const fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Returns an iterator over the characters of the `AsciiStr`. + #[inline] + #[must_use] + pub fn chars(&self) -> Chars { + Chars(self.slice.iter()) + } + + /// Returns an iterator over the characters of the `AsciiStr` which allows you to modify the + /// value of each `AsciiChar`. + #[inline] + #[must_use] + pub fn chars_mut(&mut self) -> CharsMut { + CharsMut(self.slice.iter_mut()) + } + + /// Returns an iterator over parts of the `AsciiStr` separated by a character. + /// + /// # Examples + /// ``` + /// # use ascii::{AsciiStr, AsciiChar}; + /// let words = AsciiStr::from_ascii("apple banana lemon").unwrap() + /// .split(AsciiChar::Space) + /// .map(|a| a.as_str()) + /// .collect::>(); + /// assert_eq!(words, ["apple", "banana", "lemon"]); + /// ``` + #[must_use] + pub fn split(&self, on: AsciiChar) -> impl DoubleEndedIterator { + Split { + on, + ended: false, + chars: self.chars(), + } + } + + /// Returns an iterator over the lines of the `AsciiStr`, which are themselves `AsciiStr`s. + /// + /// Lines are ended with either `LineFeed` (`\n`), or `CarriageReturn` then `LineFeed` (`\r\n`). + /// + /// The final line ending is optional. + #[inline] + #[must_use] + pub fn lines(&self) -> impl DoubleEndedIterator { + Lines { string: self } + } + + /// Returns an ASCII string slice with leading and trailing whitespace removed. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiStr; + /// let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap(); + /// assert_eq!("white \tspace", example.trim()); + /// ``` + #[must_use] + pub fn trim(&self) -> &Self { + self.trim_start().trim_end() + } + + /// Returns an ASCII string slice with leading whitespace removed. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiStr; + /// let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap(); + /// assert_eq!("white \tspace \t", example.trim_start()); + /// ``` + #[must_use] + pub fn trim_start(&self) -> &Self { + let whitespace_len = self + .chars() + .position(|ch| !ch.is_whitespace()) + .unwrap_or_else(|| self.len()); + + // SAFETY: `whitespace_len` is `0..=len`, which is at most `len`, which is a valid empty slice. + unsafe { self.as_slice().get_unchecked(whitespace_len..).into() } + } + + /// Returns an ASCII string slice with trailing whitespace removed. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiStr; + /// let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap(); + /// assert_eq!(" \twhite \tspace", example.trim_end()); + /// ``` + #[must_use] + pub fn trim_end(&self) -> &Self { + // Number of whitespace characters counting from the end + let whitespace_len = self + .chars() + .rev() + .position(|ch| !ch.is_whitespace()) + .unwrap_or_else(|| self.len()); + + // SAFETY: `whitespace_len` is `0..=len`, which is at most `len`, which is a valid empty slice, and at least `0`, which is the whole slice. + unsafe { + self.as_slice() + .get_unchecked(..self.len() - whitespace_len) + .into() + } + } + + /// Compares two strings case-insensitively. + #[must_use] + pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool { + self.len() == other.len() + && self + .chars() + .zip(other.chars()) + .all(|(ch, other_ch)| ch.eq_ignore_ascii_case(&other_ch)) + } + + /// Replaces lowercase letters with their uppercase equivalent. + pub fn make_ascii_uppercase(&mut self) { + for ch in self.chars_mut() { + *ch = ch.to_ascii_uppercase(); + } + } + + /// Replaces uppercase letters with their lowercase equivalent. + pub fn make_ascii_lowercase(&mut self) { + for ch in self.chars_mut() { + *ch = ch.to_ascii_lowercase(); + } + } + + /// Returns a copy of this string where letters 'a' to 'z' are mapped to 'A' to 'Z'. + #[cfg(feature = "alloc")] + #[must_use] + pub fn to_ascii_uppercase(&self) -> AsciiString { + let mut ascii_string = self.to_ascii_string(); + ascii_string.make_ascii_uppercase(); + ascii_string + } + + /// Returns a copy of this string where letters 'A' to 'Z' are mapped to 'a' to 'z'. + #[cfg(feature = "alloc")] + #[must_use] + pub fn to_ascii_lowercase(&self) -> AsciiString { + let mut ascii_string = self.to_ascii_string(); + ascii_string.make_ascii_lowercase(); + ascii_string + } + + /// Returns the first character if the string is not empty. + #[inline] + #[must_use] + pub fn first(&self) -> Option { + self.slice.first().copied() + } + + /// Returns the last character if the string is not empty. + #[inline] + #[must_use] + pub fn last(&self) -> Option { + self.slice.last().copied() + } + + /// Converts a [`Box`] into a [`AsciiString`] without copying or allocating. + #[cfg(feature = "alloc")] + #[inline] + #[must_use] + pub fn into_ascii_string(self: Box) -> AsciiString { + let slice = Box::<[AsciiChar]>::from(self); + AsciiString::from(slice.into_vec()) + } +} + +macro_rules! impl_partial_eq { + ($wider: ty) => { + impl PartialEq<$wider> for AsciiStr { + #[inline] + fn eq(&self, other: &$wider) -> bool { + >::as_ref(self) == other + } + } + impl PartialEq for $wider { + #[inline] + fn eq(&self, other: &AsciiStr) -> bool { + self == >::as_ref(other) + } + } + }; +} + +impl_partial_eq! {str} +impl_partial_eq! {[u8]} +impl_partial_eq! {[AsciiChar]} + +#[cfg(feature = "alloc")] +impl ToOwned for AsciiStr { + type Owned = AsciiString; + + #[inline] + fn to_owned(&self) -> AsciiString { + self.to_ascii_string() + } +} + +impl AsRef<[u8]> for AsciiStr { + #[inline] + fn as_ref(&self) -> &[u8] { + self.as_bytes() + } +} +impl AsRef for AsciiStr { + #[inline] + fn as_ref(&self) -> &str { + self.as_str() + } +} +impl AsRef<[AsciiChar]> for AsciiStr { + #[inline] + fn as_ref(&self) -> &[AsciiChar] { + &self.slice + } +} +impl AsMut<[AsciiChar]> for AsciiStr { + #[inline] + fn as_mut(&mut self) -> &mut [AsciiChar] { + &mut self.slice + } +} + +impl Default for &'static AsciiStr { + #[inline] + fn default() -> &'static AsciiStr { + From::from(&[] as &[AsciiChar]) + } +} +impl<'a> From<&'a [AsciiChar]> for &'a AsciiStr { + #[inline] + fn from(slice: &[AsciiChar]) -> &AsciiStr { + let ptr = slice as *const [AsciiChar] as *const AsciiStr; + unsafe { &*ptr } + } +} +impl<'a> From<&'a mut [AsciiChar]> for &'a mut AsciiStr { + #[inline] + fn from(slice: &mut [AsciiChar]) -> &mut AsciiStr { + let ptr = slice as *mut [AsciiChar] as *mut AsciiStr; + unsafe { &mut *ptr } + } +} +#[cfg(feature = "alloc")] +impl From> for Box { + #[inline] + fn from(owned: Box<[AsciiChar]>) -> Box { + let ptr = Box::into_raw(owned) as *mut AsciiStr; + unsafe { Box::from_raw(ptr) } + } +} + +impl AsRef for AsciiStr { + #[inline] + fn as_ref(&self) -> &AsciiStr { + self + } +} +impl AsMut for AsciiStr { + #[inline] + fn as_mut(&mut self) -> &mut AsciiStr { + self + } +} +impl AsRef for [AsciiChar] { + #[inline] + fn as_ref(&self) -> &AsciiStr { + self.into() + } +} +impl AsMut for [AsciiChar] { + #[inline] + fn as_mut(&mut self) -> &mut AsciiStr { + self.into() + } +} + +impl<'a> From<&'a AsciiStr> for &'a [AsciiChar] { + #[inline] + fn from(astr: &AsciiStr) -> &[AsciiChar] { + &astr.slice + } +} +impl<'a> From<&'a mut AsciiStr> for &'a mut [AsciiChar] { + #[inline] + fn from(astr: &mut AsciiStr) -> &mut [AsciiChar] { + &mut astr.slice + } +} +impl<'a> From<&'a AsciiStr> for &'a [u8] { + #[inline] + fn from(astr: &AsciiStr) -> &[u8] { + astr.as_bytes() + } +} +impl<'a> From<&'a AsciiStr> for &'a str { + #[inline] + fn from(astr: &AsciiStr) -> &str { + astr.as_str() + } +} +macro_rules! widen_box { + ($wider: ty) => { + #[cfg(feature = "alloc")] + impl From> for Box<$wider> { + #[inline] + fn from(owned: Box) -> Box<$wider> { + let ptr = Box::into_raw(owned) as *mut $wider; + unsafe { Box::from_raw(ptr) } + } + } + }; +} +widen_box! {[AsciiChar]} +widen_box! {[u8]} +widen_box! {str} + +// allows &AsciiChar to be used by generic AsciiString Extend and FromIterator +impl AsRef for AsciiChar { + fn as_ref(&self) -> &AsciiStr { + slice::from_ref(self).into() + } +} + +impl fmt::Display for AsciiStr { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(self.as_str(), f) + } +} + +impl fmt::Debug for AsciiStr { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(self.as_str(), f) + } +} + +macro_rules! impl_index { + ($idx:ty) => { + #[allow(clippy::indexing_slicing)] // In `Index`, if it's out of bounds, panic is the default + impl Index<$idx> for AsciiStr { + type Output = AsciiStr; + + #[inline] + fn index(&self, index: $idx) -> &AsciiStr { + self.slice[index].as_ref() + } + } + + #[allow(clippy::indexing_slicing)] // In `IndexMut`, if it's out of bounds, panic is the default + impl IndexMut<$idx> for AsciiStr { + #[inline] + fn index_mut(&mut self, index: $idx) -> &mut AsciiStr { + self.slice[index].as_mut() + } + } + }; +} + +impl_index! { Range } +impl_index! { RangeTo } +impl_index! { RangeFrom } +impl_index! { RangeFull } +impl_index! { RangeInclusive } +impl_index! { RangeToInclusive } + +#[allow(clippy::indexing_slicing)] // In `Index`, if it's out of bounds, panic is the default +impl Index for AsciiStr { + type Output = AsciiChar; + + #[inline] + fn index(&self, index: usize) -> &AsciiChar { + &self.slice[index] + } +} + +#[allow(clippy::indexing_slicing)] // In `IndexMut`, if it's out of bounds, panic is the default +impl IndexMut for AsciiStr { + #[inline] + fn index_mut(&mut self, index: usize) -> &mut AsciiChar { + &mut self.slice[index] + } +} + +/// Produces references for compatibility with `[u8]`. +/// +/// (`str` doesn't implement `IntoIterator` for its references, +/// so there is no compatibility to lose.) +impl<'a> IntoIterator for &'a AsciiStr { + type Item = &'a AsciiChar; + type IntoIter = CharsRef<'a>; + #[inline] + fn into_iter(self) -> Self::IntoIter { + CharsRef(self.as_slice().iter()) + } +} + +impl<'a> IntoIterator for &'a mut AsciiStr { + type Item = &'a mut AsciiChar; + type IntoIter = CharsMut<'a>; + #[inline] + fn into_iter(self) -> Self::IntoIter { + self.chars_mut() + } +} + +/// A copying iterator over the characters of an `AsciiStr`. +#[derive(Clone, Debug)] +pub struct Chars<'a>(Iter<'a, AsciiChar>); +impl<'a> Chars<'a> { + /// Returns the ascii string slice with the remaining characters. + #[must_use] + pub fn as_str(&self) -> &'a AsciiStr { + self.0.as_slice().into() + } +} +impl<'a> Iterator for Chars<'a> { + type Item = AsciiChar; + #[inline] + fn next(&mut self) -> Option { + self.0.next().copied() + } + fn size_hint(&self) -> (usize, Option) { + self.0.size_hint() + } +} +impl<'a> DoubleEndedIterator for Chars<'a> { + #[inline] + fn next_back(&mut self) -> Option { + self.0.next_back().copied() + } +} +impl<'a> ExactSizeIterator for Chars<'a> { + fn len(&self) -> usize { + self.0.len() + } +} + +/// A mutable iterator over the characters of an `AsciiStr`. +#[derive(Debug)] +pub struct CharsMut<'a>(IterMut<'a, AsciiChar>); +impl<'a> CharsMut<'a> { + /// Returns the ascii string slice with the remaining characters. + #[must_use] + pub fn into_str(self) -> &'a mut AsciiStr { + self.0.into_slice().into() + } +} +impl<'a> Iterator for CharsMut<'a> { + type Item = &'a mut AsciiChar; + #[inline] + fn next(&mut self) -> Option<&'a mut AsciiChar> { + self.0.next() + } + fn size_hint(&self) -> (usize, Option) { + self.0.size_hint() + } +} +impl<'a> DoubleEndedIterator for CharsMut<'a> { + #[inline] + fn next_back(&mut self) -> Option<&'a mut AsciiChar> { + self.0.next_back() + } +} +impl<'a> ExactSizeIterator for CharsMut<'a> { + fn len(&self) -> usize { + self.0.len() + } +} + +/// An immutable iterator over the characters of an `AsciiStr`. +#[derive(Clone, Debug)] +pub struct CharsRef<'a>(Iter<'a, AsciiChar>); +impl<'a> CharsRef<'a> { + /// Returns the ascii string slice with the remaining characters. + #[must_use] + pub fn as_str(&self) -> &'a AsciiStr { + self.0.as_slice().into() + } +} +impl<'a> Iterator for CharsRef<'a> { + type Item = &'a AsciiChar; + #[inline] + fn next(&mut self) -> Option<&'a AsciiChar> { + self.0.next() + } + fn size_hint(&self) -> (usize, Option) { + self.0.size_hint() + } +} +impl<'a> DoubleEndedIterator for CharsRef<'a> { + #[inline] + fn next_back(&mut self) -> Option<&'a AsciiChar> { + self.0.next_back() + } +} + +/// An iterator over parts of an `AsciiStr` separated by an `AsciiChar`. +/// +/// This type is created by [`AsciiChar::split()`](struct.AsciiChar.html#method.split). +#[derive(Clone, Debug)] +struct Split<'a> { + on: AsciiChar, + ended: bool, + chars: Chars<'a>, +} +impl<'a> Iterator for Split<'a> { + type Item = &'a AsciiStr; + + fn next(&mut self) -> Option<&'a AsciiStr> { + if !self.ended { + let start: &AsciiStr = self.chars.as_str(); + let split_on = self.on; + + if let Some(at) = self.chars.position(|ch| ch == split_on) { + // SAFETY: `at` is guaranteed to be in bounds, as `position` returns `Ok(0..len)`. + Some(unsafe { start.as_slice().get_unchecked(..at).into() }) + } else { + self.ended = true; + Some(start) + } + } else { + None + } + } +} +impl<'a> DoubleEndedIterator for Split<'a> { + fn next_back(&mut self) -> Option<&'a AsciiStr> { + if !self.ended { + let start: &AsciiStr = self.chars.as_str(); + let split_on = self.on; + + if let Some(at) = self.chars.rposition(|ch| ch == split_on) { + // SAFETY: `at` is guaranteed to be in bounds, as `rposition` returns `Ok(0..len)`, and slices `1..`, `2..`, etc... until `len..` inclusive, are valid. + Some(unsafe { start.as_slice().get_unchecked(at + 1..).into() }) + } else { + self.ended = true; + Some(start) + } + } else { + None + } + } +} + +/// An iterator over the lines of the internal character array. +#[derive(Clone, Debug)] +struct Lines<'a> { + string: &'a AsciiStr, +} +impl<'a> Iterator for Lines<'a> { + type Item = &'a AsciiStr; + + fn next(&mut self) -> Option<&'a AsciiStr> { + if let Some(idx) = self + .string + .chars() + .position(|chr| chr == AsciiChar::LineFeed) + { + // SAFETY: `idx` is guaranteed to be `1..len`, as we get it from `position` as `0..len` and make sure it's not `0`. + let line = if idx > 0 + && *unsafe { self.string.as_slice().get_unchecked(idx - 1) } + == AsciiChar::CarriageReturn + { + // SAFETY: As per above, `idx` is guaranteed to be `1..len` + unsafe { self.string.as_slice().get_unchecked(..idx - 1).into() } + } else { + // SAFETY: As per above, `idx` is guaranteed to be `0..len` + unsafe { self.string.as_slice().get_unchecked(..idx).into() } + }; + // SAFETY: As per above, `idx` is guaranteed to be `0..len`, so at the extreme, slicing `len..` is a valid empty slice. + self.string = unsafe { self.string.as_slice().get_unchecked(idx + 1..).into() }; + Some(line) + } else if self.string.is_empty() { + None + } else { + let line = self.string; + // SAFETY: An empty string is a valid string. + self.string = unsafe { AsciiStr::from_ascii_unchecked(b"") }; + Some(line) + } + } +} + +impl<'a> DoubleEndedIterator for Lines<'a> { + fn next_back(&mut self) -> Option<&'a AsciiStr> { + if self.string.is_empty() { + return None; + } + + // If we end with `LF` / `CR/LF`, remove them + if let Some(AsciiChar::LineFeed) = self.string.last() { + // SAFETY: `last()` returned `Some`, so our len is at least 1. + self.string = unsafe { + self.string + .as_slice() + .get_unchecked(..self.string.len() - 1) + .into() + }; + + if let Some(AsciiChar::CarriageReturn) = self.string.last() { + // SAFETY: `last()` returned `Some`, so our len is at least 1. + self.string = unsafe { + self.string + .as_slice() + .get_unchecked(..self.string.len() - 1) + .into() + }; + } + } + + // Get the position of the first `LF` from the end. + let lf_rev_pos = self + .string + .chars() + .rev() + .position(|ch| ch == AsciiChar::LineFeed) + .unwrap_or_else(|| self.string.len()); + + // SAFETY: `lf_rev_pos` will be in range `0..=len`, so `len - lf_rev_pos` + // will be within `0..=len`, making it correct as a start and end + // point for the strings. + let line = unsafe { + self.string + .as_slice() + .get_unchecked(self.string.len() - lf_rev_pos..) + .into() + }; + self.string = unsafe { + self.string + .as_slice() + .get_unchecked(..self.string.len() - lf_rev_pos) + .into() + }; + Some(line) + } +} + +/// Error that is returned when a sequence of `u8` are not all ASCII. +/// +/// Is used by `As[Mut]AsciiStr` and the `from_ascii` method on `AsciiStr` and `AsciiString`. +#[derive(Clone, Copy, PartialEq, Eq, Debug)] +pub struct AsAsciiStrError(usize); + +const ERRORMSG_STR: &str = "one or more bytes are not ASCII"; + +impl AsAsciiStrError { + /// Returns the index of the first non-ASCII byte. + /// + /// It is the maximum index such that `from_ascii(input[..index])` would return `Ok(_)`. + #[inline] + #[must_use] + pub const fn valid_up_to(self) -> usize { + self.0 + } + #[cfg(not(feature = "std"))] + /// Returns a description for this error, like `std::error::Error::description`. + #[inline] + #[must_use] + #[allow(clippy::unused_self)] + pub const fn description(&self) -> &'static str { + ERRORMSG_STR + } +} +impl fmt::Display for AsAsciiStrError { + fn fmt(&self, fmtr: &mut fmt::Formatter) -> fmt::Result { + write!(fmtr, "the byte at index {} is not ASCII", self.0) + } +} +#[cfg(feature = "std")] +impl Error for AsAsciiStrError { + #[inline] + fn description(&self) -> &'static str { + ERRORMSG_STR + } +} + +/// Convert slices of bytes or [`AsciiChar`] to [`AsciiStr`]. +// Could nearly replace this trait with SliceIndex, but its methods isn't even +// on a path for stabilization. +pub trait AsAsciiStr { + /// Used to constrain `SliceIndex` + #[doc(hidden)] + type Inner; + /// Convert a subslice to an ASCII slice. + /// + /// # Errors + /// Returns `Err` if the range is out of bounds or if not all bytes in the + /// slice are ASCII. The value in the error will be the index of the first + /// non-ASCII byte or the end of the slice. + /// + /// # Examples + /// ``` + /// use ascii::AsAsciiStr; + /// assert!("'zoä'".slice_ascii(..3).is_ok()); + /// assert!("'zoä'".slice_ascii(0..4).is_err()); + /// assert!("'zoä'".slice_ascii(5..=5).is_ok()); + /// assert!("'zoä'".slice_ascii(4..).is_err()); + /// assert!(b"\r\n".slice_ascii(..).is_ok()); + /// ``` + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[Self::Inner], Output = [Self::Inner]>; + /// Convert to an ASCII slice. + /// + /// # Errors + /// Returns `Err` if not all bytes are valid ascii values. + /// + /// # Example + /// ``` + /// use ascii::{AsAsciiStr, AsciiChar}; + /// assert!("ASCII".as_ascii_str().is_ok()); + /// assert!(b"\r\n".as_ascii_str().is_ok()); + /// assert!("'zoä'".as_ascii_str().is_err()); + /// assert!(b"\xff".as_ascii_str().is_err()); + /// assert!([AsciiChar::C][..].as_ascii_str().is_ok()); // infallible + /// ``` + fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> { + self.slice_ascii(..) + } + /// Get a single ASCII character from the slice. + /// + /// Returns `None` if the index is out of bounds or the byte is not ASCII. + /// + /// # Examples + /// ``` + /// use ascii::{AsAsciiStr, AsciiChar}; + /// assert_eq!("'zoä'".get_ascii(4), None); + /// assert_eq!("'zoä'".get_ascii(5), Some(AsciiChar::Apostrophe)); + /// assert_eq!("'zoä'".get_ascii(6), None); + /// ``` + fn get_ascii(&self, index: usize) -> Option { + self.slice_ascii(index..=index) + .ok() + .and_then(AsciiStr::first) + } + /// Convert to an ASCII slice without checking for non-ASCII characters. + /// + /// # Safety + /// Calling this function when `self` contains non-ascii characters is + /// undefined behavior. + /// + /// # Examples + /// + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr; +} + +/// Convert mutable slices of bytes or [`AsciiChar`] to [`AsciiStr`]. +pub trait AsMutAsciiStr: AsAsciiStr { + /// Convert a subslice to an ASCII slice. + /// + /// # Errors + /// This function returns `Err` if range is out of bounds, or if + /// `self` contains non-ascii values + fn slice_ascii_mut(&mut self, range: R) -> Result<&mut AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[Self::Inner], Output = [Self::Inner]>; + + /// Convert to a mutable ASCII slice. + /// + /// # Errors + /// This function returns `Err` if `self` contains non-ascii values + fn as_mut_ascii_str(&mut self) -> Result<&mut AsciiStr, AsAsciiStrError> { + self.slice_ascii_mut(..) + } + + /// Convert to a mutable ASCII slice without checking for non-ASCII characters. + /// + /// # Safety + /// Calling this function when `self` contains non-ascii characters is + /// undefined behavior. + unsafe fn as_mut_ascii_str_unchecked(&mut self) -> &mut AsciiStr; +} + +// These generic implementations mirror the generic implementations for AsRef in core. +impl<'a, T> AsAsciiStr for &'a T +where + T: AsAsciiStr + ?Sized, +{ + type Inner = ::Inner; + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[Self::Inner], Output = [Self::Inner]>, + { + ::slice_ascii(*self, range) + } + + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + unsafe { ::as_ascii_str_unchecked(*self) } + } +} + +impl<'a, T> AsAsciiStr for &'a mut T +where + T: AsAsciiStr + ?Sized, +{ + type Inner = ::Inner; + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[Self::Inner], Output = [Self::Inner]>, + { + ::slice_ascii(*self, range) + } + + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + unsafe { ::as_ascii_str_unchecked(*self) } + } +} + +impl<'a, T> AsMutAsciiStr for &'a mut T +where + T: AsMutAsciiStr + ?Sized, +{ + fn slice_ascii_mut(&mut self, range: R) -> Result<&mut AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[Self::Inner], Output = [Self::Inner]>, + { + ::slice_ascii_mut(*self, range) + } + + unsafe fn as_mut_ascii_str_unchecked(&mut self) -> &mut AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + unsafe { ::as_mut_ascii_str_unchecked(*self) } + } +} + +impl AsAsciiStr for AsciiStr { + type Inner = AsciiChar; + + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[AsciiChar], Output = [AsciiChar]>, + { + self.slice.slice_ascii(range) + } + + #[inline] + fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> { + Ok(self) + } + + #[inline] + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr { + self + } + + #[inline] + fn get_ascii(&self, index: usize) -> Option { + self.slice.get_ascii(index) + } +} +impl AsMutAsciiStr for AsciiStr { + fn slice_ascii_mut(&mut self, range: R) -> Result<&mut AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[AsciiChar], Output = [AsciiChar]>, + { + self.slice.slice_ascii_mut(range) + } + + #[inline] + unsafe fn as_mut_ascii_str_unchecked(&mut self) -> &mut AsciiStr { + self + } +} + +impl AsAsciiStr for [AsciiChar] { + type Inner = AsciiChar; + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[AsciiChar], Output = [AsciiChar]>, + { + match self.get(range) { + Some(slice) => Ok(slice.into()), + None => Err(AsAsciiStrError(self.len())), + } + } + + #[inline] + fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> { + Ok(self.into()) + } + + #[inline] + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr { + <&AsciiStr>::from(self) + } + + #[inline] + fn get_ascii(&self, index: usize) -> Option { + self.get(index).copied() + } +} +impl AsMutAsciiStr for [AsciiChar] { + fn slice_ascii_mut(&mut self, range: R) -> Result<&mut AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[AsciiChar], Output = [AsciiChar]>, + { + let len = self.len(); + match self.get_mut(range) { + Some(slice) => Ok(slice.into()), + None => Err(AsAsciiStrError(len)), + } + } + #[inline] + unsafe fn as_mut_ascii_str_unchecked(&mut self) -> &mut AsciiStr { + <&mut AsciiStr>::from(self) + } +} + +impl AsAsciiStr for [u8] { + type Inner = u8; + + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[u8], Output = [u8]>, + { + if let Some(slice) = self.get(range) { + slice.as_ascii_str().map_err(|AsAsciiStrError(not_ascii)| { + let offset = slice.as_ptr() as usize - self.as_ptr() as usize; + AsAsciiStrError(offset + not_ascii) + }) + } else { + Err(AsAsciiStrError(self.len())) + } + } + + fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> { + // is_ascii is likely optimized + if self.is_ascii() { + // SAFETY: `is_ascii` guarantees all bytes are within ascii range. + unsafe { Ok(self.as_ascii_str_unchecked()) } + } else { + Err(AsAsciiStrError( + self.iter().take_while(|&b| b.is_ascii()).count(), + )) + } + } + + #[inline] + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + unsafe { &*(self as *const [u8] as *const AsciiStr) } + } +} +impl AsMutAsciiStr for [u8] { + fn slice_ascii_mut(&mut self, range: R) -> Result<&mut AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[u8], Output = [u8]>, + { + let (ptr, len) = (self.as_ptr(), self.len()); + if let Some(slice) = self.get_mut(range) { + let slice_ptr = slice.as_ptr(); + slice + .as_mut_ascii_str() + .map_err(|AsAsciiStrError(not_ascii)| { + let offset = slice_ptr as usize - ptr as usize; + AsAsciiStrError(offset + not_ascii) + }) + } else { + Err(AsAsciiStrError(len)) + } + } + + fn as_mut_ascii_str(&mut self) -> Result<&mut AsciiStr, AsAsciiStrError> { + // is_ascii() is likely optimized + if self.is_ascii() { + // SAFETY: `is_ascii` guarantees all bytes are within ascii range. + unsafe { Ok(self.as_mut_ascii_str_unchecked()) } + } else { + Err(AsAsciiStrError( + self.iter().take_while(|&b| b.is_ascii()).count(), + )) + } + } + + #[inline] + unsafe fn as_mut_ascii_str_unchecked(&mut self) -> &mut AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + unsafe { &mut *(self as *mut [u8] as *mut AsciiStr) } + } +} + +impl AsAsciiStr for str { + type Inner = u8; + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[u8], Output = [u8]>, + { + self.as_bytes().slice_ascii(range) + } + fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> { + self.as_bytes().as_ascii_str() + } + #[inline] + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + unsafe { self.as_bytes().as_ascii_str_unchecked() } + } +} +impl AsMutAsciiStr for str { + fn slice_ascii_mut(&mut self, range: R) -> Result<&mut AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[u8], Output = [u8]>, + { + // SAFETY: We don't modify the reference in this function, and the caller may + // only modify it to include valid ascii characters. + let bytes = unsafe { self.as_bytes_mut() }; + match bytes.get_mut(range) { + // Valid ascii slice + Some(slice) if slice.is_ascii() => { + // SAFETY: All bytes are ascii, so this cast is valid + let ptr = slice.as_mut_ptr().cast::(); + let len = slice.len(); + + // SAFETY: The pointer is valid for `len` elements, as it came + // from a slice. + unsafe { + let slice = core::slice::from_raw_parts_mut(ptr, len); + Ok(<&mut AsciiStr>::from(slice)) + } + } + Some(slice) => { + let not_ascii_len = slice.iter().copied().take_while(u8::is_ascii).count(); + let offset = slice.as_ptr() as usize - self.as_ptr() as usize; + + Err(AsAsciiStrError(offset + not_ascii_len)) + } + None => Err(AsAsciiStrError(self.len())), + } + } + fn as_mut_ascii_str(&mut self) -> Result<&mut AsciiStr, AsAsciiStrError> { + match self.bytes().position(|b| !b.is_ascii()) { + Some(index) => Err(AsAsciiStrError(index)), + // SAFETY: All bytes were iterated, and all were ascii + None => unsafe { Ok(self.as_mut_ascii_str_unchecked()) }, + } + } + #[inline] + unsafe fn as_mut_ascii_str_unchecked(&mut self) -> &mut AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + &mut *(self as *mut str as *mut AsciiStr) + } +} + +/// Note that the trailing null byte will be removed in the conversion. +#[cfg(feature = "std")] +impl AsAsciiStr for CStr { + type Inner = u8; + fn slice_ascii(&self, range: R) -> Result<&AsciiStr, AsAsciiStrError> + where + R: SliceIndex<[u8], Output = [u8]>, + { + self.to_bytes().slice_ascii(range) + } + #[inline] + fn as_ascii_str(&self) -> Result<&AsciiStr, AsAsciiStrError> { + self.to_bytes().as_ascii_str() + } + #[inline] + unsafe fn as_ascii_str_unchecked(&self) -> &AsciiStr { + // SAFETY: Caller guarantees `self` does not contain non-ascii characters + unsafe { self.to_bytes().as_ascii_str_unchecked() } + } +} + +#[cfg(test)] +mod tests { + use super::{AsAsciiStr, AsAsciiStrError, AsMutAsciiStr, AsciiStr}; + #[cfg(feature = "alloc")] + use alloc::string::{String, ToString}; + #[cfg(feature = "alloc")] + use alloc::vec::Vec; + use AsciiChar; + + /// Ensures that common types, `str`, `[u8]`, `AsciiStr` and their + /// references, shared and mutable implement `AsAsciiStr`. + #[test] + fn generic_as_ascii_str() { + // Generic function to ensure `C` implements `AsAsciiStr` + fn generic(c: &C) -> Result<&AsciiStr, AsAsciiStrError> { + c.as_ascii_str() + } + + let arr = [AsciiChar::A]; + let ascii_str = arr.as_ref().into(); + let mut mut_arr = arr; // Note: We need a second copy to prevent overlapping mutable borrows. + let mut_ascii_str = mut_arr.as_mut().into(); + let mut_arr_mut_ref: &mut [AsciiChar] = &mut [AsciiChar::A]; + let mut string_bytes = [b'A']; + let string_mut = unsafe { core::str::from_utf8_unchecked_mut(&mut string_bytes) }; // SAFETY: 'A' is a valid string. + let string_mut_bytes: &mut [u8] = &mut [b'A']; + + // Note: This is a trick because `rustfmt` doesn't support + // attributes on blocks yet. + #[rustfmt::skip] + let _ = [ + assert_eq!(generic::("A" ), Ok(ascii_str)), + assert_eq!(generic::<[u8] >(&b"A"[..] ), Ok(ascii_str)), + assert_eq!(generic::(ascii_str ), Ok(ascii_str)), + assert_eq!(generic::<[AsciiChar] >(&arr ), Ok(ascii_str)), + assert_eq!(generic::<&str >(&"A" ), Ok(ascii_str)), + assert_eq!(generic::<&[u8] >(&&b"A"[..] ), Ok(ascii_str)), + assert_eq!(generic::<&AsciiStr >(&ascii_str ), Ok(ascii_str)), + assert_eq!(generic::<&[AsciiChar] >(&&arr[..] ), Ok(ascii_str)), + assert_eq!(generic::<&mut str >(&string_mut ), Ok(ascii_str)), + assert_eq!(generic::<&mut [u8] >(&string_mut_bytes), Ok(ascii_str)), + assert_eq!(generic::<&mut AsciiStr >(&mut_ascii_str ), Ok(ascii_str)), + assert_eq!(generic::<&mut [AsciiChar]>(&mut_arr_mut_ref ), Ok(ascii_str)), + ]; + } + + #[cfg(feature = "std")] + #[test] + fn cstring_as_ascii_str() { + use std::ffi::CString; + fn generic(c: &C) -> Result<&AsciiStr, AsAsciiStrError> { + c.as_ascii_str() + } + let arr = [AsciiChar::A]; + let ascii_str: &AsciiStr = arr.as_ref().into(); + let cstr = CString::new("A").unwrap(); + assert_eq!(generic(&*cstr), Ok(ascii_str)); + } + + #[test] + fn generic_as_mut_ascii_str() { + fn generic_mut( + c: &mut C, + ) -> Result<&mut AsciiStr, AsAsciiStrError> { + c.as_mut_ascii_str() + } + + let mut arr_mut = [AsciiChar::B]; + let mut ascii_str_mut: &mut AsciiStr = arr_mut.as_mut().into(); + // Need a second reference to prevent overlapping mutable borrows + let mut arr_mut_2 = [AsciiChar::B]; + let ascii_str_mut_2: &mut AsciiStr = arr_mut_2.as_mut().into(); + assert_eq!(generic_mut(&mut ascii_str_mut), Ok(&mut *ascii_str_mut_2)); + assert_eq!(generic_mut(ascii_str_mut), Ok(&mut *ascii_str_mut_2)); + } + + #[test] + fn as_ascii_str() { + macro_rules! err {{$i:expr} => {Err(AsAsciiStrError($i))}} + let s = "abčd"; + let b = s.as_bytes(); + assert_eq!(s.as_ascii_str(), err!(2)); + assert_eq!(b.as_ascii_str(), err!(2)); + let a: &AsciiStr = [AsciiChar::a, AsciiChar::b][..].as_ref(); + assert_eq!(s[..2].as_ascii_str(), Ok(a)); + assert_eq!(b[..2].as_ascii_str(), Ok(a)); + assert_eq!(s.slice_ascii(..2), Ok(a)); + assert_eq!(b.slice_ascii(..2), Ok(a)); + assert_eq!(s.slice_ascii(..=2), err!(2)); + assert_eq!(b.slice_ascii(..=2), err!(2)); + assert_eq!(s.get_ascii(4), Some(AsciiChar::d)); + assert_eq!(b.get_ascii(4), Some(AsciiChar::d)); + assert_eq!(s.get_ascii(3), None); + assert_eq!(b.get_ascii(3), None); + assert_eq!(s.get_ascii(b.len()), None); + assert_eq!(b.get_ascii(b.len()), None); + assert_eq!(a.get_ascii(0), Some(AsciiChar::a)); + assert_eq!(a.get_ascii(a.len()), None); + } + + #[test] + #[cfg(feature = "std")] + fn cstr_as_ascii_str() { + use std::ffi::CStr; + macro_rules! err {{$i:expr} => {Err(AsAsciiStrError($i))}} + let cstr = CStr::from_bytes_with_nul(b"a\xbbcde\xffg\0").unwrap(); + assert_eq!(cstr.as_ascii_str(), err!(1)); + assert_eq!(cstr.slice_ascii(2..), err!(5)); + assert_eq!(cstr.get_ascii(5), None); + assert_eq!(cstr.get_ascii(6), Some(AsciiChar::g)); + assert_eq!(cstr.get_ascii(7), None); + let ascii_slice = &[AsciiChar::X, AsciiChar::Y, AsciiChar::Z, AsciiChar::Null][..]; + let ascii_str: &AsciiStr = ascii_slice.as_ref(); + let cstr = CStr::from_bytes_with_nul(ascii_str.as_bytes()).unwrap(); + assert_eq!(cstr.slice_ascii(..2), Ok(&ascii_str[..2])); + assert_eq!(cstr.as_ascii_str(), Ok(&ascii_str[..3])); + } + + #[test] + #[cfg(feature = "alloc")] + fn as_mut_ascii_str() { + macro_rules! err {{$i:expr} => {Err(AsAsciiStrError($i))}} + let mut s: String = "abčd".to_string(); + let mut b: Vec = s.clone().into(); + let mut first = [AsciiChar::a, AsciiChar::b]; + let mut second = [AsciiChar::d]; + assert_eq!(s.as_mut_ascii_str(), err!(2)); + assert_eq!(b.as_mut_ascii_str(), err!(2)); + assert_eq!(s.slice_ascii_mut(..), err!(2)); + assert_eq!(b.slice_ascii_mut(..), err!(2)); + assert_eq!(s[..2].as_mut_ascii_str(), Ok((&mut first[..]).into())); + assert_eq!(b[..2].as_mut_ascii_str(), Ok((&mut first[..]).into())); + assert_eq!(s.slice_ascii_mut(0..2), Ok((&mut first[..]).into())); + assert_eq!(b.slice_ascii_mut(0..2), Ok((&mut first[..]).into())); + assert_eq!(s.slice_ascii_mut(4..), Ok((&mut second[..]).into())); + assert_eq!(b.slice_ascii_mut(4..), Ok((&mut second[..]).into())); + assert_eq!(s.slice_ascii_mut(4..=10), err!(5)); + assert_eq!(b.slice_ascii_mut(4..=10), err!(5)); + } + + #[test] + fn default() { + let default: &'static AsciiStr = Default::default(); + assert!(default.is_empty()); + } + + #[test] + #[allow(clippy::redundant_slicing)] + fn index() { + let mut arr = [AsciiChar::A, AsciiChar::B, AsciiChar::C, AsciiChar::D]; + { + let a: &AsciiStr = arr[..].into(); + assert_eq!(a[..].as_slice(), &a.as_slice()[..]); + assert_eq!(a[..4].as_slice(), &a.as_slice()[..4]); + assert_eq!(a[4..].as_slice(), &a.as_slice()[4..]); + assert_eq!(a[2..3].as_slice(), &a.as_slice()[2..3]); + assert_eq!(a[..=3].as_slice(), &a.as_slice()[..=3]); + assert_eq!(a[1..=1].as_slice(), &a.as_slice()[1..=1]); + } + let mut copy = arr; + let a_mut: &mut AsciiStr = { &mut arr[..] }.into(); + assert_eq!(a_mut[..].as_mut_slice(), &mut copy[..]); + assert_eq!(a_mut[..2].as_mut_slice(), &mut copy[..2]); + assert_eq!(a_mut[3..].as_mut_slice(), &mut copy[3..]); + assert_eq!(a_mut[4..4].as_mut_slice(), &mut copy[4..4]); + assert_eq!(a_mut[..=0].as_mut_slice(), &mut copy[..=0]); + assert_eq!(a_mut[0..=2].as_mut_slice(), &mut copy[0..=2]); + } + + #[test] + fn as_str() { + let b = b"( ;"; + let v = AsciiStr::from_ascii(b).unwrap(); + assert_eq!(v.as_str(), "( ;"); + assert_eq!(AsRef::::as_ref(v), "( ;"); + } + + #[test] + fn as_bytes() { + let b = b"( ;"; + let v = AsciiStr::from_ascii(b).unwrap(); + assert_eq!(v.as_bytes(), b"( ;"); + assert_eq!(AsRef::<[u8]>::as_ref(v), b"( ;"); + } + + #[test] + fn make_ascii_case() { + let mut bytes = ([b'a', b'@', b'A'], [b'A', b'@', b'a']); + let a = bytes.0.as_mut_ascii_str().unwrap(); + let b = bytes.1.as_mut_ascii_str().unwrap(); + assert!(a.eq_ignore_ascii_case(b)); + assert!(b.eq_ignore_ascii_case(a)); + a.make_ascii_lowercase(); + b.make_ascii_uppercase(); + assert_eq!(a, "a@a"); + assert_eq!(b, "A@A"); + } + + #[test] + #[cfg(feature = "alloc")] + fn to_ascii_case() { + let bytes = ([b'a', b'@', b'A'], [b'A', b'@', b'a']); + let a = bytes.0.as_ascii_str().unwrap(); + let b = bytes.1.as_ascii_str().unwrap(); + assert_eq!(a.to_ascii_lowercase().as_str(), "a@a"); + assert_eq!(a.to_ascii_uppercase().as_str(), "A@A"); + assert_eq!(b.to_ascii_lowercase().as_str(), "a@a"); + assert_eq!(b.to_ascii_uppercase().as_str(), "A@A"); + } + + #[test] + fn chars_iter() { + let chars = &[ + b'h', b'e', b'l', b'l', b'o', b' ', b'w', b'o', b'r', b'l', b'd', b'\0', + ]; + let ascii = AsciiStr::from_ascii(chars).unwrap(); + for (achar, byte) in ascii.chars().zip(chars.iter().copied()) { + assert_eq!(achar, byte); + } + } + + #[test] + fn chars_iter_mut() { + let chars = &mut [ + b'h', b'e', b'l', b'l', b'o', b' ', b'w', b'o', b'r', b'l', b'd', b'\0', + ]; + let ascii = chars.as_mut_ascii_str().unwrap(); + *ascii.chars_mut().next().unwrap() = AsciiChar::H; + assert_eq!(ascii[0], b'H'); + } + + #[test] + fn lines_iter() { + use core::iter::Iterator; + + let lines: [&str; 4] = ["foo", "bar", "", "baz"]; + let joined = "foo\r\nbar\n\nbaz\n"; + let ascii = AsciiStr::from_ascii(joined.as_bytes()).unwrap(); + for (asciiline, line) in ascii.lines().zip(&lines) { + assert_eq!(asciiline, *line); + } + assert_eq!(ascii.lines().count(), lines.len()); + + let lines: [&str; 4] = ["foo", "bar", "", "baz"]; + let joined = "foo\r\nbar\n\nbaz"; + let ascii = AsciiStr::from_ascii(joined.as_bytes()).unwrap(); + for (asciiline, line) in ascii.lines().zip(&lines) { + assert_eq!(asciiline, *line); + } + assert_eq!(ascii.lines().count(), lines.len()); + + let trailing_line_break = b"\n"; + let ascii = AsciiStr::from_ascii(&trailing_line_break).unwrap(); + let mut line_iter = ascii.lines(); + assert_eq!(line_iter.next(), Some(AsciiStr::from_ascii("").unwrap())); + assert_eq!(line_iter.next(), None); + + let empty_lines = b"\n\r\n\n\r\n"; + let mut iter_count = 0; + let ascii = AsciiStr::from_ascii(&empty_lines).unwrap(); + for line in ascii.lines() { + iter_count += 1; + assert!(line.is_empty()); + } + assert_eq!(4, iter_count); + } + + #[test] + fn lines_iter_rev() { + let joined = "foo\r\nbar\n\nbaz\n"; + let ascii = AsciiStr::from_ascii(joined.as_bytes()).unwrap(); + assert_eq!(ascii.lines().rev().count(), 4); + assert_eq!(ascii.lines().rev().count(), joined.lines().rev().count()); + for (asciiline, line) in ascii.lines().rev().zip(joined.lines().rev()) { + assert_eq!(asciiline, line); + } + let mut iter = ascii.lines(); + assert_eq!(iter.next(), Some("foo".as_ascii_str().unwrap())); + assert_eq!(iter.next_back(), Some("baz".as_ascii_str().unwrap())); + assert_eq!(iter.next_back(), Some("".as_ascii_str().unwrap())); + assert_eq!(iter.next(), Some("bar".as_ascii_str().unwrap())); + + let empty_lines = b"\n\r\n\n\r\n"; + let mut iter_count = 0; + let ascii = AsciiStr::from_ascii(&empty_lines).unwrap(); + for line in ascii.lines().rev() { + iter_count += 1; + assert!(line.is_empty()); + } + assert_eq!(4, iter_count); + } + + #[test] + fn lines_iter_empty() { + assert_eq!("".as_ascii_str().unwrap().lines().next(), None); + assert_eq!("".as_ascii_str().unwrap().lines().next_back(), None); + assert_eq!("".lines().next(), None); + } + + #[test] + fn split_str() { + fn split_equals_str(haystack: &str, needle: char) { + let mut strs = haystack.split(needle); + let mut asciis = haystack + .as_ascii_str() + .unwrap() + .split(AsciiChar::from_ascii(needle).unwrap()) + .map(AsciiStr::as_str); + loop { + assert_eq!(asciis.size_hint(), strs.size_hint()); + let (a, s) = (asciis.next(), strs.next()); + assert_eq!(a, s); + if a == None { + break; + } + } + // test fusedness if str's version is fused + if strs.next() == None { + assert_eq!(asciis.next(), None); + } + } + split_equals_str("", '='); + split_equals_str("1,2,3", ','); + split_equals_str("foo;bar;baz;", ';'); + split_equals_str("|||", '|'); + split_equals_str(" a b c ", ' '); + } + + #[test] + fn split_str_rev() { + let words = " foo bar baz "; + let ascii = words.as_ascii_str().unwrap(); + for (word, asciiword) in words + .split(' ') + .rev() + .zip(ascii.split(AsciiChar::Space).rev()) + { + assert_eq!(asciiword, word); + } + let mut iter = ascii.split(AsciiChar::Space); + assert_eq!(iter.next(), Some("".as_ascii_str().unwrap())); + assert_eq!(iter.next_back(), Some("".as_ascii_str().unwrap())); + assert_eq!(iter.next(), Some("foo".as_ascii_str().unwrap())); + assert_eq!(iter.next_back(), Some("baz".as_ascii_str().unwrap())); + assert_eq!(iter.next_back(), Some("bar".as_ascii_str().unwrap())); + assert_eq!(iter.next(), Some("".as_ascii_str().unwrap())); + assert_eq!(iter.next_back(), None); + } + + #[test] + fn split_str_empty() { + let empty = <&AsciiStr>::default(); + let mut iter = empty.split(AsciiChar::NAK); + assert_eq!(iter.next(), Some(empty)); + assert_eq!(iter.next(), None); + let mut iter = empty.split(AsciiChar::NAK); + assert_eq!(iter.next_back(), Some(empty)); + assert_eq!(iter.next_back(), None); + assert_eq!("".split('s').next(), Some("")); // str.split() also produces one element + } + + #[test] + #[cfg(feature = "std")] + fn fmt_ascii_str() { + let s = "abc".as_ascii_str().unwrap(); + assert_eq!(format!("{}", s), "abc".to_string()); + assert_eq!(format!("{:?}", s), "\"abc\"".to_string()); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_string.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_string.rs new file mode 100644 index 0000000000000000000000000000000000000000..4cb6a17356e611c5831469c95f3a952f2fa62569 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/ascii_string.rs @@ -0,0 +1,1057 @@ +use alloc::borrow::{Borrow, BorrowMut, Cow, ToOwned}; +use alloc::fmt; +use alloc::string::String; +use alloc::vec::Vec; +use alloc::boxed::Box; +use alloc::rc::Rc; +use alloc::sync::Arc; +#[cfg(feature = "std")] +use core::any::Any; +use core::iter::FromIterator; +use core::mem; +use core::ops::{Add, AddAssign, Deref, DerefMut, Index, IndexMut}; +use core::str::FromStr; +#[cfg(feature = "std")] +use std::error::Error; +#[cfg(feature = "std")] +use std::ffi::{CStr, CString}; + +use ascii_char::AsciiChar; +use ascii_str::{AsAsciiStr, AsAsciiStrError, AsciiStr}; + +/// A growable string stored as an ASCII encoded buffer. +#[derive(Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[repr(transparent)] +pub struct AsciiString { + vec: Vec, +} + +impl AsciiString { + /// Creates a new, empty ASCII string buffer without allocating. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::new(); + /// ``` + #[inline] + #[must_use] + pub const fn new() -> Self { + AsciiString { vec: Vec::new() } + } + + /// Creates a new ASCII string buffer with the given capacity. + /// The string will be able to hold exactly `capacity` bytes without reallocating. + /// If `capacity` is 0, the ASCII string will not allocate. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::with_capacity(10); + /// ``` + #[inline] + #[must_use] + pub fn with_capacity(capacity: usize) -> Self { + AsciiString { + vec: Vec::with_capacity(capacity), + } + } + + /// Creates a new `AsciiString` from a length, capacity and pointer. + /// + /// # Safety + /// + /// This is highly unsafe, due to the number of invariants that aren't checked: + /// + /// * The memory at `buf` need to have been previously allocated by the same allocator this + /// library uses, with an alignment of 1. + /// * `length` needs to be less than or equal to `capacity`. + /// * `capacity` needs to be the correct value. + /// * `buf` must have `length` valid ascii elements and contain a total of `capacity` total, + /// possibly, uninitialized, elements. + /// * Nothing else must be using the memory `buf` points to. + /// + /// Violating these may cause problems like corrupting the allocator's internal data structures. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// # use ascii::AsciiString; + /// use std::mem; + /// + /// unsafe { + /// let mut s = AsciiString::from_ascii("hello").unwrap(); + /// let ptr = s.as_mut_ptr(); + /// let len = s.len(); + /// let capacity = s.capacity(); + /// + /// mem::forget(s); + /// + /// let s = AsciiString::from_raw_parts(ptr, len, capacity); + /// + /// assert_eq!(AsciiString::from_ascii("hello").unwrap(), s); + /// } + /// ``` + #[inline] + #[must_use] + pub unsafe fn from_raw_parts(buf: *mut AsciiChar, length: usize, capacity: usize) -> Self { + AsciiString { + // SAFETY: Caller guarantees that `buf` was previously allocated by this library, + // that `buf` contains `length` valid ascii elements and has a total capacity + // of `capacity` elements, and that nothing else is using the momory. + vec: unsafe { Vec::from_raw_parts(buf, length, capacity) }, + } + } + + /// Converts a vector of bytes to an `AsciiString` without checking for non-ASCII characters. + /// + /// # Safety + /// This function is unsafe because it does not check that the bytes passed to it are valid + /// ASCII characters. If this constraint is violated, it may cause memory unsafety issues with + /// future of the `AsciiString`, as the rest of this library assumes that `AsciiString`s are + /// ASCII encoded. + #[inline] + #[must_use] + pub unsafe fn from_ascii_unchecked(bytes: B) -> Self + where + B: Into>, + { + let mut bytes = bytes.into(); + // SAFETY: The caller guarantees all bytes are valid ascii bytes. + let ptr = bytes.as_mut_ptr().cast::(); + let length = bytes.len(); + let capacity = bytes.capacity(); + mem::forget(bytes); + + // SAFETY: We guarantee all invariants, as we got the + // pointer, length and capacity from a `Vec`, + // and we also guarantee the pointer is valid per + // the `SAFETY` notice above. + let vec = Vec::from_raw_parts(ptr, length, capacity); + + Self { vec } + } + + /// Converts anything that can represent a byte buffer into an `AsciiString`. + /// + /// # Errors + /// Returns the byte buffer if not all of the bytes are ASCII characters. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let foo = AsciiString::from_ascii("foo".to_string()).unwrap(); + /// let err = AsciiString::from_ascii("Ŋ".to_string()).unwrap_err(); + /// assert_eq!(foo.as_str(), "foo"); + /// assert_eq!(err.into_source(), "Ŋ"); + /// ``` + pub fn from_ascii(bytes: B) -> Result> + where + B: Into> + AsRef<[u8]>, + { + match bytes.as_ref().as_ascii_str() { + // SAFETY: `as_ascii_str` guarantees all bytes are valid ascii bytes. + Ok(_) => Ok(unsafe { AsciiString::from_ascii_unchecked(bytes) }), + Err(e) => Err(FromAsciiError { + error: e, + owner: bytes, + }), + } + } + + /// Pushes the given ASCII string onto this ASCII string buffer. + /// + /// # Examples + /// ``` + /// # use ascii::{AsciiString, AsAsciiStr}; + /// use std::str::FromStr; + /// let mut s = AsciiString::from_str("foo").unwrap(); + /// s.push_str("bar".as_ascii_str().unwrap()); + /// assert_eq!(s, "foobar".as_ascii_str().unwrap()); + /// ``` + #[inline] + pub fn push_str(&mut self, string: &AsciiStr) { + self.vec.extend(string.chars()); + } + + /// Inserts the given ASCII string at the given place in this ASCII string buffer. + /// + /// # Panics + /// + /// Panics if `idx` is larger than the `AsciiString`'s length. + /// + /// # Examples + /// ``` + /// # use ascii::{AsciiString, AsAsciiStr}; + /// use std::str::FromStr; + /// let mut s = AsciiString::from_str("abc").unwrap(); + /// s.insert_str(1, "def".as_ascii_str().unwrap()); + /// assert_eq!(&*s, "adefbc"); + #[inline] + pub fn insert_str(&mut self, idx: usize, string: &AsciiStr) { + self.vec.reserve(string.len()); + self.vec.splice(idx..idx, string.into_iter().copied()); + } + + /// Returns the number of bytes that this ASCII string buffer can hold without reallocating. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let s = String::with_capacity(10); + /// assert!(s.capacity() >= 10); + /// ``` + #[inline] + #[must_use] + pub fn capacity(&self) -> usize { + self.vec.capacity() + } + + /// Reserves capacity for at least `additional` more bytes to be inserted in the given + /// `AsciiString`. The collection may reserve more space to avoid frequent reallocations. + /// + /// # Panics + /// Panics if the new capacity overflows `usize`. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::new(); + /// s.reserve(10); + /// assert!(s.capacity() >= 10); + /// ``` + #[inline] + pub fn reserve(&mut self, additional: usize) { + self.vec.reserve(additional); + } + + /// Reserves the minimum capacity for exactly `additional` more bytes to be inserted in the + /// given `AsciiString`. Does nothing if the capacity is already sufficient. + /// + /// Note that the allocator may give the collection more space than it requests. Therefore + /// capacity can not be relied upon to be precisely minimal. Prefer `reserve` if future + /// insertions are expected. + /// + /// # Panics + /// Panics if the new capacity overflows `usize`. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::new(); + /// s.reserve_exact(10); + /// assert!(s.capacity() >= 10); + /// ``` + #[inline] + + pub fn reserve_exact(&mut self, additional: usize) { + self.vec.reserve_exact(additional); + } + + /// Shrinks the capacity of this ASCII string buffer to match it's length. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// use std::str::FromStr; + /// let mut s = AsciiString::from_str("foo").unwrap(); + /// s.reserve(100); + /// assert!(s.capacity() >= 100); + /// s.shrink_to_fit(); + /// assert_eq!(s.capacity(), 3); + /// ``` + #[inline] + + pub fn shrink_to_fit(&mut self) { + self.vec.shrink_to_fit(); + } + + /// Adds the given ASCII character to the end of the ASCII string. + /// + /// # Examples + /// ``` + /// # use ascii::{ AsciiChar, AsciiString}; + /// let mut s = AsciiString::from_ascii("abc").unwrap(); + /// s.push(AsciiChar::from_ascii('1').unwrap()); + /// s.push(AsciiChar::from_ascii('2').unwrap()); + /// s.push(AsciiChar::from_ascii('3').unwrap()); + /// assert_eq!(s, "abc123"); + /// ``` + #[inline] + + pub fn push(&mut self, ch: AsciiChar) { + self.vec.push(ch); + } + + /// Shortens a ASCII string to the specified length. + /// + /// # Panics + /// Panics if `new_len` > current length. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::from_ascii("hello").unwrap(); + /// s.truncate(2); + /// assert_eq!(s, "he"); + /// ``` + #[inline] + + pub fn truncate(&mut self, new_len: usize) { + self.vec.truncate(new_len); + } + + /// Removes the last character from the ASCII string buffer and returns it. + /// Returns `None` if this string buffer is empty. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::from_ascii("foo").unwrap(); + /// assert_eq!(s.pop().map(|c| c.as_char()), Some('o')); + /// assert_eq!(s.pop().map(|c| c.as_char()), Some('o')); + /// assert_eq!(s.pop().map(|c| c.as_char()), Some('f')); + /// assert_eq!(s.pop(), None); + /// ``` + #[inline] + #[must_use] + pub fn pop(&mut self) -> Option { + self.vec.pop() + } + + /// Removes the ASCII character at position `idx` from the buffer and returns it. + /// + /// # Warning + /// This is an O(n) operation as it requires copying every element in the buffer. + /// + /// # Panics + /// If `idx` is out of bounds this function will panic. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::from_ascii("foo").unwrap(); + /// assert_eq!(s.remove(0).as_char(), 'f'); + /// assert_eq!(s.remove(1).as_char(), 'o'); + /// assert_eq!(s.remove(0).as_char(), 'o'); + /// ``` + #[inline] + #[must_use] + pub fn remove(&mut self, idx: usize) -> AsciiChar { + self.vec.remove(idx) + } + + /// Inserts an ASCII character into the buffer at position `idx`. + /// + /// # Warning + /// This is an O(n) operation as it requires copying every element in the buffer. + /// + /// # Panics + /// If `idx` is out of bounds this function will panic. + /// + /// # Examples + /// ``` + /// # use ascii::{AsciiString,AsciiChar}; + /// let mut s = AsciiString::from_ascii("foo").unwrap(); + /// s.insert(2, AsciiChar::b); + /// assert_eq!(s, "fobo"); + /// ``` + #[inline] + + pub fn insert(&mut self, idx: usize, ch: AsciiChar) { + self.vec.insert(idx, ch); + } + + /// Returns the number of bytes in this ASCII string. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let s = AsciiString::from_ascii("foo").unwrap(); + /// assert_eq!(s.len(), 3); + /// ``` + #[inline] + #[must_use] + pub fn len(&self) -> usize { + self.vec.len() + } + + /// Returns true if the ASCII string contains zero bytes. + /// + /// # Examples + /// ``` + /// # use ascii::{AsciiChar, AsciiString}; + /// let mut s = AsciiString::new(); + /// assert!(s.is_empty()); + /// s.push(AsciiChar::from_ascii('a').unwrap()); + /// assert!(!s.is_empty()); + /// ``` + #[inline] + #[must_use] + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Truncates the ASCII string, setting length (but not capacity) to zero. + /// + /// # Examples + /// ``` + /// # use ascii::AsciiString; + /// let mut s = AsciiString::from_ascii("foo").unwrap(); + /// s.clear(); + /// assert!(s.is_empty()); + /// ``` + #[inline] + + pub fn clear(&mut self) { + self.vec.clear(); + } + + /// Converts this [`AsciiString`] into a [`Box`]`<`[`AsciiStr`]`>`. + /// + /// This will drop any excess capacity + #[inline] + #[must_use] + pub fn into_boxed_ascii_str(self) -> Box { + let slice = self.vec.into_boxed_slice(); + Box::from(slice) + } +} + +impl Deref for AsciiString { + type Target = AsciiStr; + + #[inline] + fn deref(&self) -> &AsciiStr { + self.vec.as_slice().as_ref() + } +} + +impl DerefMut for AsciiString { + #[inline] + fn deref_mut(&mut self) -> &mut AsciiStr { + self.vec.as_mut_slice().as_mut() + } +} + +impl PartialEq for AsciiString { + #[inline] + fn eq(&self, other: &str) -> bool { + **self == *other + } +} + +impl PartialEq for str { + #[inline] + fn eq(&self, other: &AsciiString) -> bool { + **other == *self + } +} + +macro_rules! impl_eq { + ($lhs:ty, $rhs:ty) => { + impl PartialEq<$rhs> for $lhs { + #[inline] + fn eq(&self, other: &$rhs) -> bool { + PartialEq::eq(&**self, &**other) + } + } + }; +} + +impl_eq! { AsciiString, String } +impl_eq! { String, AsciiString } +impl_eq! { &AsciiStr, String } +impl_eq! { String, &AsciiStr } +impl_eq! { &AsciiStr, AsciiString } +impl_eq! { AsciiString, &AsciiStr } +impl_eq! { &str, AsciiString } +impl_eq! { AsciiString, &str } + +impl Borrow for AsciiString { + #[inline] + fn borrow(&self) -> &AsciiStr { + &**self + } +} + +impl BorrowMut for AsciiString { + #[inline] + fn borrow_mut(&mut self) -> &mut AsciiStr { + &mut **self + } +} + +impl From> for AsciiString { + #[inline] + fn from(vec: Vec) -> Self { + AsciiString { vec } + } +} + +impl From for AsciiString { + #[inline] + fn from(ch: AsciiChar) -> Self { + AsciiString { vec: vec![ch] } + } +} + +impl From for Vec { + fn from(mut s: AsciiString) -> Vec { + // SAFETY: All ascii bytes are valid `u8`, as we are `repr(u8)`. + // Note: We forget `self` to avoid `self.vec` from being deallocated. + let ptr = s.vec.as_mut_ptr().cast::(); + let length = s.vec.len(); + let capacity = s.vec.capacity(); + mem::forget(s); + + // SAFETY: We guarantee all invariants due to getting `ptr`, `length` + // and `capacity` from a `Vec`. We also guarantee `ptr` is valid + // due to the `SAFETY` block above. + unsafe { Vec::from_raw_parts(ptr, length, capacity) } + } +} + +impl From for Vec { + fn from(s: AsciiString) -> Vec { + s.vec + } +} + +impl<'a> From<&'a AsciiStr> for AsciiString { + #[inline] + fn from(s: &'a AsciiStr) -> Self { + s.to_ascii_string() + } +} + +impl<'a> From<&'a [AsciiChar]> for AsciiString { + #[inline] + fn from(s: &'a [AsciiChar]) -> AsciiString { + s.iter().copied().collect() + } +} + +impl From for String { + #[inline] + fn from(s: AsciiString) -> String { + // SAFETY: All ascii bytes are `utf8`. + unsafe { String::from_utf8_unchecked(s.into()) } + } +} + +impl From> for AsciiString { + #[inline] + fn from(boxed: Box) -> Self { + boxed.into_ascii_string() + } +} + +impl From for Box { + #[inline] + fn from(string: AsciiString) -> Self { + string.into_boxed_ascii_str() + } +} + +impl From for Rc { + fn from(s: AsciiString) -> Rc { + let var: Rc<[AsciiChar]> = s.vec.into(); + // SAFETY: AsciiStr is repr(transparent) and thus has the same layout as [AsciiChar] + unsafe { Rc::from_raw(Rc::into_raw(var) as *const AsciiStr) } + } +} + +impl From for Arc { + fn from(s: AsciiString) -> Arc { + let var: Arc<[AsciiChar]> = s.vec.into(); + // SAFETY: AsciiStr is repr(transparent) and thus has the same layout as [AsciiChar] + unsafe { Arc::from_raw(Arc::into_raw(var) as *const AsciiStr) } + } +} + +impl<'a> From> for AsciiString { + fn from(cow: Cow<'a, AsciiStr>) -> AsciiString { + cow.into_owned() + } +} + +impl From for Cow<'static, AsciiStr> { + fn from(string: AsciiString) -> Cow<'static, AsciiStr> { + Cow::Owned(string) + } +} + +impl<'a> From<&'a AsciiStr> for Cow<'a, AsciiStr> { + fn from(s: &'a AsciiStr) -> Cow<'a, AsciiStr> { + Cow::Borrowed(s) + } +} + +impl AsRef for AsciiString { + #[inline] + fn as_ref(&self) -> &AsciiStr { + &**self + } +} + +impl AsRef<[AsciiChar]> for AsciiString { + #[inline] + fn as_ref(&self) -> &[AsciiChar] { + &self.vec + } +} + +impl AsRef<[u8]> for AsciiString { + #[inline] + fn as_ref(&self) -> &[u8] { + self.as_bytes() + } +} + +impl AsRef for AsciiString { + #[inline] + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl AsMut for AsciiString { + #[inline] + fn as_mut(&mut self) -> &mut AsciiStr { + &mut *self + } +} + +impl AsMut<[AsciiChar]> for AsciiString { + #[inline] + fn as_mut(&mut self) -> &mut [AsciiChar] { + &mut self.vec + } +} + +impl FromStr for AsciiString { + type Err = AsAsciiStrError; + + fn from_str(s: &str) -> Result { + s.as_ascii_str().map(AsciiStr::to_ascii_string) + } +} + +impl fmt::Display for AsciiString { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&**self, f) + } +} + +impl fmt::Debug for AsciiString { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(&**self, f) + } +} + +/// Please note that the `std::fmt::Result` returned by these methods does not support +/// transmission of an error other than that an error occurred. +impl fmt::Write for AsciiString { + fn write_str(&mut self, s: &str) -> fmt::Result { + if let Ok(astr) = AsciiStr::from_ascii(s) { + self.push_str(astr); + Ok(()) + } else { + Err(fmt::Error) + } + } + + fn write_char(&mut self, c: char) -> fmt::Result { + if let Ok(achar) = AsciiChar::from_ascii(c) { + self.push(achar); + Ok(()) + } else { + Err(fmt::Error) + } + } +} + +impl> FromIterator for AsciiString { + fn from_iter>(iter: I) -> AsciiString { + let mut buf = AsciiString::new(); + buf.extend(iter); + buf + } +} + +impl> Extend for AsciiString { + fn extend>(&mut self, iterable: I) { + let iterator = iterable.into_iter(); + let (lower_bound, _) = iterator.size_hint(); + self.reserve(lower_bound); + for item in iterator { + self.push_str(item.as_ref()); + } + } +} + +impl<'a> Add<&'a AsciiStr> for AsciiString { + type Output = AsciiString; + + #[inline] + fn add(mut self, other: &AsciiStr) -> AsciiString { + self.push_str(other); + self + } +} + +impl<'a> AddAssign<&'a AsciiStr> for AsciiString { + #[inline] + fn add_assign(&mut self, other: &AsciiStr) { + self.push_str(other); + } +} + +#[allow(clippy::indexing_slicing)] // In `Index`, if it's out of bounds, panic is the default +impl Index for AsciiString +where + AsciiStr: Index, +{ + type Output = >::Output; + + #[inline] + fn index(&self, index: T) -> &>::Output { + &(**self)[index] + } +} + +#[allow(clippy::indexing_slicing)] // In `IndexMut`, if it's out of bounds, panic is the default +impl IndexMut for AsciiString +where + AsciiStr: IndexMut, +{ + #[inline] + fn index_mut(&mut self, index: T) -> &mut >::Output { + &mut (**self)[index] + } +} + +/// A possible error value when converting an `AsciiString` from a byte vector or string. +/// It wraps an `AsAsciiStrError` which you can get through the `ascii_error()` method. +/// +/// This is the error type for `AsciiString::from_ascii()` and +/// `IntoAsciiString::into_ascii_string()`. They will never clone or touch the content of the +/// original type; It can be extracted by the `into_source` method. +/// +/// #Examples +/// ``` +/// # use ascii::IntoAsciiString; +/// let err = "bø!".to_string().into_ascii_string().unwrap_err(); +/// assert_eq!(err.ascii_error().valid_up_to(), 1); +/// assert_eq!(err.into_source(), "bø!".to_string()); +/// ``` +#[derive(Clone, Copy, PartialEq, Eq)] +pub struct FromAsciiError { + error: AsAsciiStrError, + owner: O, +} +impl FromAsciiError { + /// Get the position of the first non-ASCII byte or character. + #[inline] + #[must_use] + pub fn ascii_error(&self) -> AsAsciiStrError { + self.error + } + /// Get back the original, unmodified type. + #[inline] + #[must_use] + pub fn into_source(self) -> O { + self.owner + } +} +impl fmt::Debug for FromAsciiError { + #[inline] + fn fmt(&self, fmtr: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(&self.error, fmtr) + } +} +impl fmt::Display for FromAsciiError { + #[inline] + fn fmt(&self, fmtr: &mut fmt::Formatter) -> fmt::Result { + fmt::Display::fmt(&self.error, fmtr) + } +} +#[cfg(feature = "std")] +impl Error for FromAsciiError { + #[inline] + #[allow(deprecated)] // TODO: Remove deprecation once the earliest version we support deprecates this method. + fn description(&self) -> &str { + self.error.description() + } + /// Always returns an `AsAsciiStrError` + fn cause(&self) -> Option<&dyn Error> { + Some(&self.error as &dyn Error) + } +} + +/// Convert vectors into `AsciiString`. +pub trait IntoAsciiString: Sized { + /// Convert to `AsciiString` without checking for non-ASCII characters. + /// + /// # Safety + /// If `self` contains non-ascii characters, calling this function is + /// undefined behavior. + unsafe fn into_ascii_string_unchecked(self) -> AsciiString; + + /// Convert to `AsciiString`. + /// + /// # Errors + /// If `self` contains non-ascii characters, this will return `Err` + fn into_ascii_string(self) -> Result>; +} + +impl IntoAsciiString for Vec { + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + AsciiString::from(self) + } + #[inline] + fn into_ascii_string(self) -> Result> { + Ok(AsciiString::from(self)) + } +} + +impl<'a> IntoAsciiString for &'a [AsciiChar] { + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + AsciiString::from(self) + } + #[inline] + fn into_ascii_string(self) -> Result> { + Ok(AsciiString::from(self)) + } +} + +impl<'a> IntoAsciiString for &'a AsciiStr { + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + AsciiString::from(self) + } + #[inline] + fn into_ascii_string(self) -> Result> { + Ok(AsciiString::from(self)) + } +} + +macro_rules! impl_into_ascii_string { + ('a, $wider:ty) => { + impl<'a> IntoAsciiString for $wider { + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + // SAFETY: Caller guarantees `self` only has valid ascii bytes + unsafe { AsciiString::from_ascii_unchecked(self) } + } + + #[inline] + fn into_ascii_string(self) -> Result> { + AsciiString::from_ascii(self) + } + } + }; + + ($wider:ty) => { + impl IntoAsciiString for $wider { + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + // SAFETY: Caller guarantees `self` only has valid ascii bytes + unsafe { AsciiString::from_ascii_unchecked(self) } + } + + #[inline] + fn into_ascii_string(self) -> Result> { + AsciiString::from_ascii(self) + } + } + }; +} + +impl_into_ascii_string! {AsciiString} +impl_into_ascii_string! {Vec} +impl_into_ascii_string! {'a, &'a [u8]} +impl_into_ascii_string! {String} +impl_into_ascii_string! {'a, &'a str} + +/// # Notes +/// The trailing null byte `CString` has will be removed during this conversion. +#[cfg(feature = "std")] +impl IntoAsciiString for CString { + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + // SAFETY: Caller guarantees `self` only has valid ascii bytes + unsafe { AsciiString::from_ascii_unchecked(self.into_bytes()) } + } + + fn into_ascii_string(self) -> Result> { + AsciiString::from_ascii(self.into_bytes_with_nul()) + .map_err(|FromAsciiError { error, owner }| { + FromAsciiError { + // SAFETY: We don't discard the NULL byte from the original + // string, so we ensure that it's null terminated + owner: unsafe { CString::from_vec_unchecked(owner) }, + error, + } + }) + .map(|mut s| { + let nul = s.pop(); + debug_assert_eq!(nul, Some(AsciiChar::Null)); + s + }) + } +} + +/// Note that the trailing null byte will be removed in the conversion. +#[cfg(feature = "std")] +impl<'a> IntoAsciiString for &'a CStr { + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + // SAFETY: Caller guarantees `self` only has valid ascii bytes + unsafe { AsciiString::from_ascii_unchecked(self.to_bytes()) } + } + + fn into_ascii_string(self) -> Result> { + AsciiString::from_ascii(self.to_bytes_with_nul()) + .map_err(|FromAsciiError { error, owner }| FromAsciiError { + // SAFETY: We don't discard the NULL byte from the original + // string, so we ensure that it's null terminated + owner: unsafe { CStr::from_ptr(owner.as_ptr().cast()) }, + error, + }) + .map(|mut s| { + let nul = s.pop(); + debug_assert_eq!(nul, Some(AsciiChar::Null)); + s + }) + } +} + +impl<'a, B> IntoAsciiString for Cow<'a, B> +where + B: 'a + ToOwned + ?Sized, + &'a B: IntoAsciiString, + ::Owned: IntoAsciiString, +{ + #[inline] + unsafe fn into_ascii_string_unchecked(self) -> AsciiString { + // SAFETY: Caller guarantees `self` only has valid ascii bytes + unsafe { IntoAsciiString::into_ascii_string_unchecked(self.into_owned()) } + } + + fn into_ascii_string(self) -> Result> { + match self { + Cow::Owned(b) => { + IntoAsciiString::into_ascii_string(b).map_err(|FromAsciiError { error, owner }| { + FromAsciiError { + owner: Cow::Owned(owner), + error, + } + }) + } + Cow::Borrowed(b) => { + IntoAsciiString::into_ascii_string(b).map_err(|FromAsciiError { error, owner }| { + FromAsciiError { + owner: Cow::Borrowed(owner), + error, + } + }) + } + } + } +} + +#[cfg(test)] +mod tests { + use super::{AsciiString, IntoAsciiString}; + use alloc::str::FromStr; + use alloc::string::{String, ToString}; + use alloc::vec::Vec; + use alloc::boxed::Box; + #[cfg(feature = "std")] + use std::ffi::CString; + use {AsciiChar, AsciiStr}; + + #[test] + fn into_string() { + let v = AsciiString::from_ascii(&[40_u8, 32, 59][..]).unwrap(); + assert_eq!(Into::::into(v), "( ;".to_string()); + } + + #[test] + fn into_bytes() { + let v = AsciiString::from_ascii(&[40_u8, 32, 59][..]).unwrap(); + assert_eq!(Into::>::into(v), vec![40_u8, 32, 59]); + } + + #[test] + fn from_ascii_vec() { + let vec = vec![ + AsciiChar::from_ascii('A').unwrap(), + AsciiChar::from_ascii('B').unwrap(), + ]; + assert_eq!(AsciiString::from(vec), AsciiString::from_str("AB").unwrap()); + } + + #[test] + #[cfg(feature = "std")] + fn from_cstring() { + let cstring = CString::new("baz").unwrap(); + let ascii_str = cstring.clone().into_ascii_string().unwrap(); + let expected_chars = &[AsciiChar::b, AsciiChar::a, AsciiChar::z]; + assert_eq!(ascii_str.len(), 3); + assert_eq!(ascii_str.as_slice(), expected_chars); + + // SAFETY: "baz" only contains valid ascii characters. + let ascii_str_unchecked = unsafe { cstring.into_ascii_string_unchecked() }; + assert_eq!(ascii_str_unchecked.len(), 3); + assert_eq!(ascii_str_unchecked.as_slice(), expected_chars); + + let sparkle_heart_bytes = vec![240_u8, 159, 146, 150]; + let cstring = CString::new(sparkle_heart_bytes).unwrap(); + let cstr = &*cstring; + let ascii_err = cstr.into_ascii_string().unwrap_err(); + assert_eq!(ascii_err.into_source(), &*cstring); + } + + #[test] + #[cfg(feature = "std")] + fn fmt_ascii_string() { + let s = "abc".to_string().into_ascii_string().unwrap(); + assert_eq!(format!("{}", s), "abc".to_string()); + assert_eq!(format!("{:?}", s), "\"abc\"".to_string()); + } + + #[test] + fn write_fmt() { + use alloc::{fmt, str}; + + let mut s0 = AsciiString::new(); + fmt::write(&mut s0, format_args!("Hello World")).unwrap(); + assert_eq!(s0, "Hello World"); + + let mut s1 = AsciiString::new(); + fmt::write(&mut s1, format_args!("{}", 9)).unwrap(); + assert_eq!(s1, "9"); + + let mut s2 = AsciiString::new(); + let sparkle_heart_bytes = [240, 159, 146, 150]; + let sparkle_heart = str::from_utf8(&sparkle_heart_bytes).unwrap(); + assert!(fmt::write(&mut s2, format_args!("{}", sparkle_heart)).is_err()); + } + + #[test] + fn to_and_from_box() { + let string = "abc".into_ascii_string().unwrap(); + let converted: Box = Box::from(string.clone()); + let converted: AsciiString = converted.into(); + assert_eq!(string, converted); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/free_functions.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/free_functions.rs new file mode 100644 index 0000000000000000000000000000000000000000..55d97321e45276f846dbe816196fbaf73970d877 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/free_functions.rs @@ -0,0 +1,59 @@ +use ascii_char::{AsciiChar, ToAsciiChar}; + +/// Terminals use [caret notation](https://en.wikipedia.org/wiki/Caret_notation) +/// to display some typed control codes, such as ^D for EOT and ^Z for SUB. +/// +/// This function returns the caret notation letter for control codes, +/// or `None` for printable characters. +/// +/// # Examples +/// ``` +/// # use ascii::{AsciiChar, caret_encode}; +/// assert_eq!(caret_encode(b'\0'), Some(AsciiChar::At)); +/// assert_eq!(caret_encode(AsciiChar::DEL), Some(AsciiChar::Question)); +/// assert_eq!(caret_encode(b'E'), None); +/// assert_eq!(caret_encode(b'\n'), Some(AsciiChar::J)); +/// ``` +pub fn caret_encode>(c: C) -> Option { + // The formula is explained in the Wikipedia article. + let c = c.into() ^ 0b0100_0000; + if (b'?'..=b'_').contains(&c) { + // SAFETY: All bytes between '?' (0x3F) and '_' (0x5f) are valid ascii characters. + Some(unsafe { c.to_ascii_char_unchecked() }) + } else { + None + } +} + +/// Returns the control code represented by a [caret notation](https://en.wikipedia.org/wiki/Caret_notation) +/// letter, or `None` if the letter is not used in caret notation. +/// +/// This function is the inverse of `caret_encode()`. +/// +/// # Examples +/// +/// Basic usage: +/// +/// ``` +/// # use ascii::{AsciiChar, caret_decode}; +/// assert_eq!(caret_decode(b'?'), Some(AsciiChar::DEL)); +/// assert_eq!(caret_decode(AsciiChar::D), Some(AsciiChar::EOT)); +/// assert_eq!(caret_decode(b'\0'), None); +/// ``` +/// +/// Symmetry: +/// +/// ``` +/// # use ascii::{AsciiChar, caret_encode, caret_decode}; +/// assert_eq!(caret_encode(AsciiChar::US).and_then(caret_decode), Some(AsciiChar::US)); +/// assert_eq!(caret_decode(b'@').and_then(caret_encode), Some(AsciiChar::At)); +/// ``` +pub fn caret_decode>(c: C) -> Option { + // The formula is explained in the Wikipedia article. + match c.into() { + // SAFETY: All bytes between '?' (0x3F) and '_' (0x5f) after `xoring` with `0b0100_0000` are + // valid bytes, as they represent characters between '␀' (0x0) and '␠' (0x1f) + '␡' (0x7f) + b'?'..=b'_' => Some(unsafe { AsciiChar::from_ascii_unchecked(c.into() ^ 0b0100_0000) }), + _ => None, + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/lib.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..5eacc162fbffbdea2db8068f2be636786b4ab45a --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/lib.rs @@ -0,0 +1,82 @@ +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! A library that provides ASCII-only string and character types, equivalent to the `char`, `str` +//! and `String` types in the standard library. +//! +//! Please refer to the readme file to learn about the different feature modes of this crate. +//! +//! # Minimum supported Rust version +//! +//! The minimum Rust version for 1.1.\* releases is 1.41.1. +//! Later 1.y.0 releases might require newer Rust versions, but the three most +//! recent stable releases at the time of publishing will always be supported. +//! For example this means that if the current stable Rust version is 1.70 when +//! ascii 1.2.0 is released, then ascii 1.2.\* will not require a newer +//! Rust version than 1.68. +//! +//! # History +//! +//! This package included the Ascii types that were removed from the Rust standard library by the +//! 2014-12 [reform of the `std::ascii` module](https://github.com/rust-lang/rfcs/pull/486). The +//! API changed significantly since then. + +#![cfg_attr(not(feature = "std"), no_std)] +// Clippy lints +#![warn( + clippy::pedantic, + clippy::decimal_literal_representation, + clippy::get_unwrap, + clippy::indexing_slicing +)] +// Naming conventions sometimes go against this lint +#![allow(clippy::module_name_repetitions)] +// We need to get literal non-asciis for tests +#![allow(clippy::non_ascii_literal)] +// Sometimes it looks better to invert the order, such as when the `else` block is small +#![allow(clippy::if_not_else)] +// Shadowing is common and doesn't affect understanding +// TODO: Consider removing `shadow_unrelated`, as it can show some actual logic errors +#![allow(clippy::shadow_unrelated, clippy::shadow_reuse, clippy::shadow_same)] +// A `if let` / `else` sometimes looks better than using iterator adaptors +#![allow(clippy::option_if_let_else)] +// In tests, we're fine with indexing, since a panic is a failure. +#![cfg_attr(test, allow(clippy::indexing_slicing))] +// for compatibility with methods on char and u8 +#![allow(clippy::trivially_copy_pass_by_ref)] +// In preparation for feature `unsafe_block_in_unsafe_fn` (https://github.com/rust-lang/rust/issues/71668) +#![allow(unused_unsafe)] + +#[cfg(feature = "alloc")] +#[macro_use] +extern crate alloc; +#[cfg(feature = "std")] +extern crate core; + +#[cfg(feature = "serde")] +extern crate serde; + +#[cfg(all(test, feature = "serde_test"))] +extern crate serde_test; + +mod ascii_char; +mod ascii_str; +#[cfg(feature = "alloc")] +mod ascii_string; +mod free_functions; +#[cfg(feature = "serde")] +mod serialization; + +pub use ascii_char::{AsciiChar, ToAsciiChar, ToAsciiCharError}; +pub use ascii_str::{AsAsciiStr, AsAsciiStrError, AsMutAsciiStr, AsciiStr}; +pub use ascii_str::{Chars, CharsMut, CharsRef}; +#[cfg(feature = "alloc")] +pub use ascii_string::{AsciiString, FromAsciiError, IntoAsciiString}; +pub use free_functions::{caret_decode, caret_encode}; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_char.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_char.rs new file mode 100644 index 0000000000000000000000000000000000000000..9fd843a1494cf0c3b96918a9b94a29efe757e7a5 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_char.rs @@ -0,0 +1,89 @@ +use std::fmt; + +use serde::de::{Error, Unexpected, Visitor}; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + +use ascii_char::AsciiChar; + +impl Serialize for AsciiChar { + #[inline] + fn serialize(&self, serializer: S) -> Result { + serializer.serialize_char(self.as_char()) + } +} + +struct AsciiCharVisitor; + +impl<'de> Visitor<'de> for AsciiCharVisitor { + type Value = AsciiChar; + + fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str("an ascii character") + } + + #[inline] + fn visit_char(self, v: char) -> Result { + AsciiChar::from_ascii(v).map_err(|_| Error::invalid_value(Unexpected::Char(v), &self)) + } + + #[inline] + fn visit_str(self, v: &str) -> Result { + if v.len() == 1 { + let c = v.chars().next().unwrap(); + self.visit_char(c) + } else { + Err(Error::invalid_value(Unexpected::Str(v), &self)) + } + } +} + +impl<'de> Deserialize<'de> for AsciiChar { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_char(AsciiCharVisitor) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[cfg(feature = "serde_test")] + const ASCII_CHAR: char = 'e'; + #[cfg(feature = "serde_test")] + const ASCII_STR: &str = "e"; + #[cfg(feature = "serde_test")] + const UNICODE_CHAR: char = 'é'; + + #[test] + fn basic() { + fn assert_serialize() {} + fn assert_deserialize<'de, T: Deserialize<'de>>() {} + assert_serialize::(); + assert_deserialize::(); + } + + #[test] + #[cfg(feature = "serde_test")] + fn serialize() { + use serde_test::{assert_tokens, Token}; + let ascii_char = AsciiChar::from_ascii(ASCII_CHAR).unwrap(); + assert_tokens(&ascii_char, &[Token::Char(ASCII_CHAR)]); + } + + #[test] + #[cfg(feature = "serde_test")] + fn deserialize() { + use serde_test::{assert_de_tokens, assert_de_tokens_error, Token}; + let ascii_char = AsciiChar::from_ascii(ASCII_CHAR).unwrap(); + assert_de_tokens(&ascii_char, &[Token::String(ASCII_STR)]); + assert_de_tokens(&ascii_char, &[Token::Str(ASCII_STR)]); + assert_de_tokens(&ascii_char, &[Token::BorrowedStr(ASCII_STR)]); + assert_de_tokens_error::( + &[Token::Char(UNICODE_CHAR)], + "invalid value: character `é`, expected an ascii character", + ); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_str.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_str.rs new file mode 100644 index 0000000000000000000000000000000000000000..9aa9353afba6ba19473b7f0812b82d65359b7444 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_str.rs @@ -0,0 +1,79 @@ +use std::fmt; + +use serde::de::{Error, Unexpected, Visitor}; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + +use ascii_str::AsciiStr; + +impl Serialize for AsciiStr { + #[inline] + fn serialize(&self, serializer: S) -> Result { + serializer.serialize_str(self.as_str()) + } +} + +struct AsciiStrVisitor; + +impl<'a> Visitor<'a> for AsciiStrVisitor { + type Value = &'a AsciiStr; + + fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str("a borrowed ascii string") + } + + fn visit_borrowed_str(self, v: &'a str) -> Result { + AsciiStr::from_ascii(v.as_bytes()) + .map_err(|_| Error::invalid_value(Unexpected::Str(v), &self)) + } + + fn visit_borrowed_bytes(self, v: &'a [u8]) -> Result { + AsciiStr::from_ascii(v).map_err(|_| Error::invalid_value(Unexpected::Bytes(v), &self)) + } +} + +impl<'de: 'a, 'a> Deserialize<'de> for &'a AsciiStr { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_str(AsciiStrVisitor) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[cfg(feature = "serde_test")] + const ASCII: &str = "Francais"; + #[cfg(feature = "serde_test")] + const UNICODE: &str = "Français"; + + #[test] + fn basic() { + fn assert_serialize() {} + fn assert_deserialize<'de, T: Deserialize<'de>>() {} + assert_serialize::<&AsciiStr>(); + assert_deserialize::<&AsciiStr>(); + } + + #[test] + #[cfg(feature = "serde_test")] + fn serialize() { + use serde_test::{assert_tokens, Token}; + let ascii_str = AsciiStr::from_ascii(ASCII).unwrap(); + assert_tokens(&ascii_str, &[Token::BorrowedStr(ASCII)]); + } + + #[test] + #[cfg(feature = "serde_test")] + fn deserialize() { + use serde_test::{assert_de_tokens, assert_de_tokens_error, Token}; + let ascii_str = AsciiStr::from_ascii(ASCII).unwrap(); + assert_de_tokens(&ascii_str, &[Token::BorrowedBytes(ASCII.as_bytes())]); + assert_de_tokens_error::<&AsciiStr>( + &[Token::BorrowedStr(UNICODE)], + "invalid value: string \"Français\", expected a borrowed ascii string", + ); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_string.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_string.rs new file mode 100644 index 0000000000000000000000000000000000000000..1547655f1ec423a2acdd5855477447153a12f6a5 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/ascii_string.rs @@ -0,0 +1,149 @@ +use std::fmt; + +use serde::de::{Error, Unexpected, Visitor}; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + +use ascii_str::AsciiStr; +use ascii_string::AsciiString; + +impl Serialize for AsciiString { + #[inline] + fn serialize(&self, serializer: S) -> Result { + serializer.serialize_str(self.as_str()) + } +} + +struct AsciiStringVisitor; + +impl<'de> Visitor<'de> for AsciiStringVisitor { + type Value = AsciiString; + + fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str("an ascii string") + } + + fn visit_str(self, v: &str) -> Result { + AsciiString::from_ascii(v).map_err(|_| Error::invalid_value(Unexpected::Str(v), &self)) + } + + fn visit_string(self, v: String) -> Result { + AsciiString::from_ascii(v.as_bytes()) + .map_err(|_| Error::invalid_value(Unexpected::Str(&v), &self)) + } + + fn visit_bytes(self, v: &[u8]) -> Result { + AsciiString::from_ascii(v).map_err(|_| Error::invalid_value(Unexpected::Bytes(v), &self)) + } + + fn visit_byte_buf(self, v: Vec) -> Result { + AsciiString::from_ascii(v.as_slice()) + .map_err(|_| Error::invalid_value(Unexpected::Bytes(&v), &self)) + } +} + +struct AsciiStringInPlaceVisitor<'a>(&'a mut AsciiString); + +impl<'a, 'de> Visitor<'de> for AsciiStringInPlaceVisitor<'a> { + type Value = (); + + fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { + formatter.write_str("an ascii string") + } + + fn visit_str(self, v: &str) -> Result { + let ascii_str = match AsciiStr::from_ascii(v.as_bytes()) { + Ok(ascii_str) => ascii_str, + Err(_) => return Err(Error::invalid_value(Unexpected::Str(v), &self)), + }; + self.0.clear(); + self.0.push_str(ascii_str); + Ok(()) + } + + fn visit_string(self, v: String) -> Result { + let ascii_string = match AsciiString::from_ascii(v.as_bytes()) { + Ok(ascii_string) => ascii_string, + Err(_) => return Err(Error::invalid_value(Unexpected::Str(&v), &self)), + }; + *self.0 = ascii_string; + Ok(()) + } + + fn visit_bytes(self, v: &[u8]) -> Result { + let ascii_str = match AsciiStr::from_ascii(v) { + Ok(ascii_str) => ascii_str, + Err(_) => return Err(Error::invalid_value(Unexpected::Bytes(v), &self)), + }; + self.0.clear(); + self.0.push_str(ascii_str); + Ok(()) + } + + fn visit_byte_buf(self, v: Vec) -> Result { + let ascii_string = match AsciiString::from_ascii(v.as_slice()) { + Ok(ascii_string) => ascii_string, + Err(_) => return Err(Error::invalid_value(Unexpected::Bytes(&v), &self)), + }; + *self.0 = ascii_string; + Ok(()) + } +} + +impl<'de> Deserialize<'de> for AsciiString { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_string(AsciiStringVisitor) + } + + fn deserialize_in_place(deserializer: D, place: &mut Self) -> Result<(), D::Error> + where + D: Deserializer<'de>, + { + deserializer.deserialize_string(AsciiStringInPlaceVisitor(place)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[cfg(feature = "serde_test")] + const ASCII: &str = "Francais"; + #[cfg(feature = "serde_test")] + const UNICODE: &str = "Français"; + + #[test] + fn basic() { + fn assert_serialize() {} + fn assert_deserialize<'de, T: Deserialize<'de>>() {} + assert_serialize::(); + assert_deserialize::(); + } + + #[test] + #[cfg(feature = "serde_test")] + fn serialize() { + use serde_test::{assert_tokens, Token}; + + let ascii_string = AsciiString::from_ascii(ASCII).unwrap(); + assert_tokens(&ascii_string, &[Token::String(ASCII)]); + assert_tokens(&ascii_string, &[Token::Str(ASCII)]); + assert_tokens(&ascii_string, &[Token::BorrowedStr(ASCII)]); + } + + #[test] + #[cfg(feature = "serde_test")] + fn deserialize() { + use serde_test::{assert_de_tokens, assert_de_tokens_error, Token}; + let ascii_string = AsciiString::from_ascii(ASCII).unwrap(); + assert_de_tokens(&ascii_string, &[Token::Bytes(ASCII.as_bytes())]); + assert_de_tokens(&ascii_string, &[Token::BorrowedBytes(ASCII.as_bytes())]); + assert_de_tokens(&ascii_string, &[Token::ByteBuf(ASCII.as_bytes())]); + assert_de_tokens_error::( + &[Token::String(UNICODE)], + "invalid value: string \"Français\", expected an ascii string", + ); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..69a4e03a1cd1619bbf2f06268ff2380cdd375c66 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ascii-1.1.0/src/serialization/mod.rs @@ -0,0 +1,3 @@ +mod ascii_char; +mod ascii_str; +mod ascii_string; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/defer.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/defer.rs new file mode 100644 index 0000000000000000000000000000000000000000..246f907988275860b03b65fea171e1168e5a1e73 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/defer.rs @@ -0,0 +1,69 @@ +#![feature(test)] + +extern crate test; + +use crossbeam_epoch::{self as epoch, Owned}; +use crossbeam_utils::thread::scope; +use test::Bencher; + +#[bench] +fn single_alloc_defer_free(b: &mut Bencher) { + b.iter(|| { + let guard = &epoch::pin(); + let p = Owned::new(1).into_shared(guard); + unsafe { + guard.defer_destroy(p); + } + }); +} + +#[bench] +fn single_defer(b: &mut Bencher) { + b.iter(|| { + let guard = &epoch::pin(); + guard.defer(move || ()); + }); +} + +#[bench] +fn multi_alloc_defer_free(b: &mut Bencher) { + const THREADS: usize = 16; + const STEPS: usize = 10_000; + + b.iter(|| { + scope(|s| { + for _ in 0..THREADS { + s.spawn(|_| { + for _ in 0..STEPS { + let guard = &epoch::pin(); + let p = Owned::new(1).into_shared(guard); + unsafe { + guard.defer_destroy(p); + } + } + }); + } + }) + .unwrap(); + }); +} + +#[bench] +fn multi_defer(b: &mut Bencher) { + const THREADS: usize = 16; + const STEPS: usize = 10_000; + + b.iter(|| { + scope(|s| { + for _ in 0..THREADS { + s.spawn(|_| { + for _ in 0..STEPS { + let guard = &epoch::pin(); + guard.defer(move || ()); + } + }); + } + }) + .unwrap(); + }); +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/flush.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/flush.rs new file mode 100644 index 0000000000000000000000000000000000000000..99aab19e1e259448a3befc87e83cc786adc44dbb --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/flush.rs @@ -0,0 +1,52 @@ +#![feature(test)] + +extern crate test; + +use std::sync::Barrier; + +use crossbeam_epoch as epoch; +use crossbeam_utils::thread::scope; +use test::Bencher; + +#[bench] +fn single_flush(b: &mut Bencher) { + const THREADS: usize = 16; + + let start = Barrier::new(THREADS + 1); + let end = Barrier::new(THREADS + 1); + + scope(|s| { + for _ in 0..THREADS { + s.spawn(|_| { + epoch::pin(); + start.wait(); + end.wait(); + }); + } + + start.wait(); + b.iter(|| epoch::pin().flush()); + end.wait(); + }) + .unwrap(); +} + +#[bench] +fn multi_flush(b: &mut Bencher) { + const THREADS: usize = 16; + const STEPS: usize = 10_000; + + b.iter(|| { + scope(|s| { + for _ in 0..THREADS { + s.spawn(|_| { + for _ in 0..STEPS { + let guard = &epoch::pin(); + guard.flush(); + } + }); + } + }) + .unwrap(); + }); +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/pin.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/pin.rs new file mode 100644 index 0000000000000000000000000000000000000000..8bf87e9b73d0212f29aea1f618996e2d4ea4575c --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/benches/pin.rs @@ -0,0 +1,31 @@ +#![feature(test)] + +extern crate test; + +use crossbeam_epoch as epoch; +use crossbeam_utils::thread::scope; +use test::Bencher; + +#[bench] +fn single_pin(b: &mut Bencher) { + b.iter(epoch::pin); +} + +#[bench] +fn multi_pin(b: &mut Bencher) { + const THREADS: usize = 16; + const STEPS: usize = 100_000; + + b.iter(|| { + scope(|s| { + for _ in 0..THREADS { + s.spawn(|_| { + for _ in 0..STEPS { + epoch::pin(); + } + }); + } + }) + .unwrap(); + }); +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/examples/sanitize.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/examples/sanitize.rs new file mode 100644 index 0000000000000000000000000000000000000000..4109c34a8cf3f60fe3b07e64429ede57e280000f --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/examples/sanitize.rs @@ -0,0 +1,66 @@ +use std::sync::atomic::AtomicUsize; +use std::sync::atomic::Ordering::{AcqRel, Acquire, Relaxed}; +use std::sync::Arc; +use std::thread; +use std::time::{Duration, Instant}; + +use crossbeam_epoch::{self as epoch, Atomic, Collector, LocalHandle, Owned, Shared}; +use rand::Rng; + +fn worker(a: Arc>, handle: LocalHandle) -> usize { + let mut rng = rand::thread_rng(); + let mut sum = 0; + + if rng.gen() { + thread::sleep(Duration::from_millis(1)); + } + let timeout = Duration::from_millis(rng.gen_range(0..10)); + let now = Instant::now(); + + while now.elapsed() < timeout { + for _ in 0..100 { + let guard = &handle.pin(); + guard.flush(); + + let val = if rng.gen() { + let p = a.swap(Owned::new(AtomicUsize::new(sum)), AcqRel, guard); + unsafe { + guard.defer_destroy(p); + guard.flush(); + p.deref().load(Relaxed) + } + } else { + let p = a.load(Acquire, guard); + unsafe { p.deref().fetch_add(sum, Relaxed) } + }; + + sum = sum.wrapping_add(val); + } + } + + sum +} + +fn main() { + for _ in 0..100 { + let collector = Collector::new(); + let a = Arc::new(Atomic::new(AtomicUsize::new(777))); + + let threads = (0..16) + .map(|_| { + let a = a.clone(); + let c = collector.clone(); + thread::spawn(move || worker(a, c.register())) + }) + .collect::>(); + + for t in threads { + t.join().unwrap(); + } + + unsafe { + a.swap(Shared::null(), AcqRel, epoch::unprotected()) + .into_owned(); + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/atomic.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/atomic.rs new file mode 100644 index 0000000000000000000000000000000000000000..41b4cd91020b6e663d6c0df411a2f82b90254b91 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/atomic.rs @@ -0,0 +1,1702 @@ +use alloc::boxed::Box; +use core::alloc::Layout; +use core::borrow::{Borrow, BorrowMut}; +use core::cmp; +use core::fmt; +use core::marker::PhantomData; +use core::mem::{self, MaybeUninit}; +use core::ops::{Deref, DerefMut}; +use core::ptr; +use core::slice; + +use crate::guard::Guard; +use crate::primitive::sync::atomic::{AtomicUsize, Ordering}; +use crossbeam_utils::atomic::AtomicConsume; + +/// Given ordering for the success case in a compare-exchange operation, returns the strongest +/// appropriate ordering for the failure case. +#[inline] +fn strongest_failure_ordering(ord: Ordering) -> Ordering { + use self::Ordering::*; + match ord { + Relaxed | Release => Relaxed, + Acquire | AcqRel => Acquire, + _ => SeqCst, + } +} + +/// The error returned on failed compare-and-set operation. +// TODO: remove in the next major version. +#[deprecated(note = "Use `CompareExchangeError` instead")] +pub type CompareAndSetError<'g, T, P> = CompareExchangeError<'g, T, P>; + +/// The error returned on failed compare-and-swap operation. +pub struct CompareExchangeError<'g, T: ?Sized + Pointable, P: Pointer> { + /// The value in the atomic pointer at the time of the failed operation. + pub current: Shared<'g, T>, + + /// The new value, which the operation failed to store. + pub new: P, +} + +impl + fmt::Debug> fmt::Debug for CompareExchangeError<'_, T, P> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("CompareExchangeError") + .field("current", &self.current) + .field("new", &self.new) + .finish() + } +} + +/// Memory orderings for compare-and-set operations. +/// +/// A compare-and-set operation can have different memory orderings depending on whether it +/// succeeds or fails. This trait generalizes different ways of specifying memory orderings. +/// +/// The two ways of specifying orderings for compare-and-set are: +/// +/// 1. Just one `Ordering` for the success case. In case of failure, the strongest appropriate +/// ordering is chosen. +/// 2. A pair of `Ordering`s. The first one is for the success case, while the second one is +/// for the failure case. +// TODO: remove in the next major version. +#[deprecated( + note = "`compare_and_set` and `compare_and_set_weak` that use this trait are deprecated, \ + use `compare_exchange` or `compare_exchange_weak instead`" +)] +pub trait CompareAndSetOrdering { + /// The ordering of the operation when it succeeds. + fn success(&self) -> Ordering; + + /// The ordering of the operation when it fails. + /// + /// The failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker than + /// the success ordering. + fn failure(&self) -> Ordering; +} + +#[allow(deprecated)] +impl CompareAndSetOrdering for Ordering { + #[inline] + fn success(&self) -> Ordering { + *self + } + + #[inline] + fn failure(&self) -> Ordering { + strongest_failure_ordering(*self) + } +} + +#[allow(deprecated)] +impl CompareAndSetOrdering for (Ordering, Ordering) { + #[inline] + fn success(&self) -> Ordering { + self.0 + } + + #[inline] + fn failure(&self) -> Ordering { + self.1 + } +} + +/// Returns a bitmask containing the unused least significant bits of an aligned pointer to `T`. +#[inline] +fn low_bits() -> usize { + (1 << T::ALIGN.trailing_zeros()) - 1 +} + +/// Panics if the pointer is not properly unaligned. +#[inline] +fn ensure_aligned(raw: usize) { + assert_eq!(raw & low_bits::(), 0, "unaligned pointer"); +} + +/// Given a tagged pointer `data`, returns the same pointer, but tagged with `tag`. +/// +/// `tag` is truncated to fit into the unused bits of the pointer to `T`. +#[inline] +fn compose_tag(data: usize, tag: usize) -> usize { + (data & !low_bits::()) | (tag & low_bits::()) +} + +/// Decomposes a tagged pointer `data` into the pointer and the tag. +#[inline] +fn decompose_tag(data: usize) -> (usize, usize) { + (data & !low_bits::(), data & low_bits::()) +} + +/// Types that are pointed to by a single word. +/// +/// In concurrent programming, it is necessary to represent an object within a word because atomic +/// operations (e.g., reads, writes, read-modify-writes) support only single words. This trait +/// qualifies such types that are pointed to by a single word. +/// +/// The trait generalizes `Box` for a sized type `T`. In a box, an object of type `T` is +/// allocated in heap and it is owned by a single-word pointer. This trait is also implemented for +/// `[MaybeUninit]` by storing its size along with its elements and pointing to the pair of array +/// size and elements. +/// +/// Pointers to `Pointable` types can be stored in [`Atomic`], [`Owned`], and [`Shared`]. In +/// particular, Crossbeam supports dynamically sized slices as follows. +/// +/// ``` +/// use std::mem::MaybeUninit; +/// use crossbeam_epoch::Owned; +/// +/// let o = Owned::<[MaybeUninit]>::init(10); // allocating [i32; 10] +/// ``` +pub trait Pointable { + /// The alignment of pointer. + const ALIGN: usize; + + /// The type for initializers. + type Init; + + /// Initializes a with the given initializer. + /// + /// # Safety + /// + /// The result should be a multiple of `ALIGN`. + unsafe fn init(init: Self::Init) -> usize; + + /// Dereferences the given pointer. + /// + /// # Safety + /// + /// - The given `ptr` should have been initialized with [`Pointable::init`]. + /// - `ptr` should not have yet been dropped by [`Pointable::drop`]. + /// - `ptr` should not be mutably dereferenced by [`Pointable::deref_mut`] concurrently. + unsafe fn deref<'a>(ptr: usize) -> &'a Self; + + /// Mutably dereferences the given pointer. + /// + /// # Safety + /// + /// - The given `ptr` should have been initialized with [`Pointable::init`]. + /// - `ptr` should not have yet been dropped by [`Pointable::drop`]. + /// - `ptr` should not be dereferenced by [`Pointable::deref`] or [`Pointable::deref_mut`] + /// concurrently. + unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self; + + /// Drops the object pointed to by the given pointer. + /// + /// # Safety + /// + /// - The given `ptr` should have been initialized with [`Pointable::init`]. + /// - `ptr` should not have yet been dropped by [`Pointable::drop`]. + /// - `ptr` should not be dereferenced by [`Pointable::deref`] or [`Pointable::deref_mut`] + /// concurrently. + unsafe fn drop(ptr: usize); +} + +impl Pointable for T { + const ALIGN: usize = mem::align_of::(); + + type Init = T; + + unsafe fn init(init: Self::Init) -> usize { + Box::into_raw(Box::new(init)) as usize + } + + unsafe fn deref<'a>(ptr: usize) -> &'a Self { + &*(ptr as *const T) + } + + unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self { + &mut *(ptr as *mut T) + } + + unsafe fn drop(ptr: usize) { + drop(Box::from_raw(ptr as *mut T)); + } +} + +/// Array with size. +/// +/// # Memory layout +/// +/// An array consisting of size and elements: +/// +/// ```text +/// elements +/// | +/// | +/// ------------------------------------ +/// | size | 0 | 1 | 2 | 3 | 4 | 5 | 6 | +/// ------------------------------------ +/// ``` +/// +/// Its memory layout is different from that of `Box<[T]>` in that size is in the allocation (not +/// along with pointer as in `Box<[T]>`). +/// +/// Elements are not present in the type, but they will be in the allocation. +/// ``` +#[repr(C)] +struct Array { + /// The number of elements (not the number of bytes). + len: usize, + elements: [MaybeUninit; 0], +} + +impl Array { + fn layout(len: usize) -> Layout { + Layout::new::() + .extend(Layout::array::>(len).unwrap()) + .unwrap() + .0 + .pad_to_align() + } +} + +impl Pointable for [MaybeUninit] { + const ALIGN: usize = mem::align_of::>(); + + type Init = usize; + + unsafe fn init(len: Self::Init) -> usize { + let layout = Array::::layout(len); + let ptr = alloc::alloc::alloc(layout).cast::>(); + if ptr.is_null() { + alloc::alloc::handle_alloc_error(layout); + } + ptr::addr_of_mut!((*ptr).len).write(len); + ptr as usize + } + + unsafe fn deref<'a>(ptr: usize) -> &'a Self { + let array = &*(ptr as *const Array); + slice::from_raw_parts(array.elements.as_ptr() as *const _, array.len) + } + + unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Self { + let array = &*(ptr as *mut Array); + slice::from_raw_parts_mut(array.elements.as_ptr() as *mut _, array.len) + } + + unsafe fn drop(ptr: usize) { + let len = (*(ptr as *mut Array)).len; + let layout = Array::::layout(len); + alloc::alloc::dealloc(ptr as *mut u8, layout); + } +} + +/// An atomic pointer that can be safely shared between threads. +/// +/// The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused +/// least significant bits of the address. For example, the tag for a pointer to a sized type `T` +/// should be less than `(1 << mem::align_of::().trailing_zeros())`. +/// +/// Any method that loads the pointer must be passed a reference to a [`Guard`]. +/// +/// Crossbeam supports dynamically sized types. See [`Pointable`] for details. +pub struct Atomic { + data: AtomicUsize, + _marker: PhantomData<*mut T>, +} + +unsafe impl Send for Atomic {} +unsafe impl Sync for Atomic {} + +impl Atomic { + /// Allocates `value` on the heap and returns a new atomic pointer pointing to it. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Atomic; + /// + /// let a = Atomic::new(1234); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn new(init: T) -> Atomic { + Self::init(init) + } +} + +impl Atomic { + /// Allocates `value` on the heap and returns a new atomic pointer pointing to it. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Atomic; + /// + /// let a = Atomic::::init(1234); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn init(init: T::Init) -> Atomic { + Self::from(Owned::init(init)) + } + + /// Returns a new atomic pointer pointing to the tagged pointer `data`. + fn from_usize(data: usize) -> Self { + Self { + data: AtomicUsize::new(data), + _marker: PhantomData, + } + } + + /// Returns a new null atomic pointer. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Atomic; + /// + /// let a = Atomic::::null(); + /// ``` + #[cfg(not(crossbeam_loom))] + pub const fn null() -> Atomic { + Self { + data: AtomicUsize::new(0), + _marker: PhantomData, + } + } + /// Returns a new null atomic pointer. + #[cfg(crossbeam_loom)] + pub fn null() -> Atomic { + Self { + data: AtomicUsize::new(0), + _marker: PhantomData, + } + } + + /// Loads a `Shared` from the atomic pointer. + /// + /// This method takes an [`Ordering`] argument which describes the memory ordering of this + /// operation. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// let p = a.load(SeqCst, guard); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn load<'g>(&self, ord: Ordering, _: &'g Guard) -> Shared<'g, T> { + unsafe { Shared::from_usize(self.data.load(ord)) } + } + + /// Loads a `Shared` from the atomic pointer using a "consume" memory ordering. + /// + /// This is similar to the "acquire" ordering, except that an ordering is + /// only guaranteed with operations that "depend on" the result of the load. + /// However consume loads are usually much faster than acquire loads on + /// architectures with a weak memory model since they don't require memory + /// fence instructions. + /// + /// The exact definition of "depend on" is a bit vague, but it works as you + /// would expect in practice since a lot of software, especially the Linux + /// kernel, rely on this behavior. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// let p = a.load_consume(guard); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn load_consume<'g>(&self, _: &'g Guard) -> Shared<'g, T> { + unsafe { Shared::from_usize(self.data.load_consume()) } + } + + /// Stores a `Shared` or `Owned` pointer into the atomic pointer. + /// + /// This method takes an [`Ordering`] argument which describes the memory ordering of this + /// operation. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{Atomic, Owned, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// # unsafe { drop(a.load(SeqCst, &crossbeam_epoch::pin()).into_owned()); } // avoid leak + /// a.store(Shared::null(), SeqCst); + /// a.store(Owned::new(1234), SeqCst); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn store>(&self, new: P, ord: Ordering) { + self.data.store(new.into_usize(), ord); + } + + /// Stores a `Shared` or `Owned` pointer into the atomic pointer, returning the previous + /// `Shared`. + /// + /// This method takes an [`Ordering`] argument which describes the memory ordering of this + /// operation. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// let p = a.swap(Shared::null(), SeqCst, guard); + /// # unsafe { drop(p.into_owned()); } // avoid leak + /// ``` + pub fn swap<'g, P: Pointer>(&self, new: P, ord: Ordering, _: &'g Guard) -> Shared<'g, T> { + unsafe { Shared::from_usize(self.data.swap(new.into_usize(), ord)) } + } + + /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current + /// value is the same as `current`. The tag is also taken into account, so two pointers to the + /// same object, but with different tags, will not be considered equal. + /// + /// The return value is a result indicating whether the new pointer was written. On success the + /// pointer that was written is returned. On failure the actual current value and `new` are + /// returned. + /// + /// This method takes two `Ordering` arguments to describe the memory + /// ordering of this operation. `success` describes the required ordering for the + /// read-modify-write operation that takes place if the comparison with `current` succeeds. + /// `failure` describes the required ordering for the load operation that takes place when + /// the comparison fails. Using `Acquire` as success ordering makes the store part + /// of this operation `Relaxed`, and using `Release` makes the successful load + /// `Relaxed`. The failure ordering can only be `SeqCst`, `Acquire` or `Relaxed` + /// and must be equivalent to or weaker than the success ordering. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// + /// let guard = &epoch::pin(); + /// let curr = a.load(SeqCst, guard); + /// let res1 = a.compare_exchange(curr, Shared::null(), SeqCst, SeqCst, guard); + /// let res2 = a.compare_exchange(curr, Owned::new(5678), SeqCst, SeqCst, guard); + /// # unsafe { drop(curr.into_owned()); } // avoid leak + /// ``` + pub fn compare_exchange<'g, P>( + &self, + current: Shared<'_, T>, + new: P, + success: Ordering, + failure: Ordering, + _: &'g Guard, + ) -> Result, CompareExchangeError<'g, T, P>> + where + P: Pointer, + { + let new = new.into_usize(); + self.data + .compare_exchange(current.into_usize(), new, success, failure) + .map(|_| unsafe { Shared::from_usize(new) }) + .map_err(|current| unsafe { + CompareExchangeError { + current: Shared::from_usize(current), + new: P::from_usize(new), + } + }) + } + + /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current + /// value is the same as `current`. The tag is also taken into account, so two pointers to the + /// same object, but with different tags, will not be considered equal. + /// + /// Unlike [`compare_exchange`], this method is allowed to spuriously fail even when comparison + /// succeeds, which can result in more efficient code on some platforms. The return value is a + /// result indicating whether the new pointer was written. On success the pointer that was + /// written is returned. On failure the actual current value and `new` are returned. + /// + /// This method takes two `Ordering` arguments to describe the memory + /// ordering of this operation. `success` describes the required ordering for the + /// read-modify-write operation that takes place if the comparison with `current` succeeds. + /// `failure` describes the required ordering for the load operation that takes place when + /// the comparison fails. Using `Acquire` as success ordering makes the store part + /// of this operation `Relaxed`, and using `Release` makes the successful load + /// `Relaxed`. The failure ordering can only be `SeqCst`, `Acquire` or `Relaxed` + /// and must be equivalent to or weaker than the success ordering. + /// + /// [`compare_exchange`]: Atomic::compare_exchange + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// + /// let mut new = Owned::new(5678); + /// let mut ptr = a.load(SeqCst, guard); + /// # unsafe { drop(a.load(SeqCst, guard).into_owned()); } // avoid leak + /// loop { + /// match a.compare_exchange_weak(ptr, new, SeqCst, SeqCst, guard) { + /// Ok(p) => { + /// ptr = p; + /// break; + /// } + /// Err(err) => { + /// ptr = err.current; + /// new = err.new; + /// } + /// } + /// } + /// + /// let mut curr = a.load(SeqCst, guard); + /// loop { + /// match a.compare_exchange_weak(curr, Shared::null(), SeqCst, SeqCst, guard) { + /// Ok(_) => break, + /// Err(err) => curr = err.current, + /// } + /// } + /// # unsafe { drop(curr.into_owned()); } // avoid leak + /// ``` + pub fn compare_exchange_weak<'g, P>( + &self, + current: Shared<'_, T>, + new: P, + success: Ordering, + failure: Ordering, + _: &'g Guard, + ) -> Result, CompareExchangeError<'g, T, P>> + where + P: Pointer, + { + let new = new.into_usize(); + self.data + .compare_exchange_weak(current.into_usize(), new, success, failure) + .map(|_| unsafe { Shared::from_usize(new) }) + .map_err(|current| unsafe { + CompareExchangeError { + current: Shared::from_usize(current), + new: P::from_usize(new), + } + }) + } + + /// Fetches the pointer, and then applies a function to it that returns a new value. + /// Returns a `Result` of `Ok(previous_value)` if the function returned `Some`, else `Err(_)`. + /// + /// Note that the given function may be called multiple times if the value has been changed by + /// other threads in the meantime, as long as the function returns `Some(_)`, but the function + /// will have been applied only once to the stored value. + /// + /// `fetch_update` takes two [`Ordering`] arguments to describe the memory + /// ordering of this operation. The first describes the required ordering for + /// when the operation finally succeeds while the second describes the + /// required ordering for loads. These correspond to the success and failure + /// orderings of [`Atomic::compare_exchange`] respectively. + /// + /// Using [`Acquire`] as success ordering makes the store part of this + /// operation [`Relaxed`], and using [`Release`] makes the final successful + /// load [`Relaxed`]. The (failed) load ordering can only be [`SeqCst`], + /// [`Acquire`] or [`Relaxed`] and must be equivalent to or weaker than the + /// success ordering. + /// + /// [`Relaxed`]: Ordering::Relaxed + /// [`Acquire`]: Ordering::Acquire + /// [`Release`]: Ordering::Release + /// [`SeqCst`]: Ordering::SeqCst + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// + /// let res1 = a.fetch_update(SeqCst, SeqCst, guard, |x| Some(x.with_tag(1))); + /// assert!(res1.is_ok()); + /// + /// let res2 = a.fetch_update(SeqCst, SeqCst, guard, |x| None); + /// assert!(res2.is_err()); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn fetch_update<'g, F>( + &self, + set_order: Ordering, + fail_order: Ordering, + guard: &'g Guard, + mut func: F, + ) -> Result, Shared<'g, T>> + where + F: FnMut(Shared<'g, T>) -> Option>, + { + let mut prev = self.load(fail_order, guard); + while let Some(next) = func(prev) { + match self.compare_exchange_weak(prev, next, set_order, fail_order, guard) { + Ok(shared) => return Ok(shared), + Err(next_prev) => prev = next_prev.current, + } + } + Err(prev) + } + + /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current + /// value is the same as `current`. The tag is also taken into account, so two pointers to the + /// same object, but with different tags, will not be considered equal. + /// + /// The return value is a result indicating whether the new pointer was written. On success the + /// pointer that was written is returned. On failure the actual current value and `new` are + /// returned. + /// + /// This method takes a [`CompareAndSetOrdering`] argument which describes the memory + /// ordering of this operation. + /// + /// # Migrating to `compare_exchange` + /// + /// `compare_and_set` is equivalent to `compare_exchange` with the following mapping for + /// memory orderings: + /// + /// Original | Success | Failure + /// -------- | ------- | ------- + /// Relaxed | Relaxed | Relaxed + /// Acquire | Acquire | Acquire + /// Release | Release | Relaxed + /// AcqRel | AcqRel | Acquire + /// SeqCst | SeqCst | SeqCst + /// + /// # Examples + /// + /// ``` + /// # #![allow(deprecated)] + /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// + /// let guard = &epoch::pin(); + /// let curr = a.load(SeqCst, guard); + /// let res1 = a.compare_and_set(curr, Shared::null(), SeqCst, guard); + /// let res2 = a.compare_and_set(curr, Owned::new(5678), SeqCst, guard); + /// # unsafe { drop(curr.into_owned()); } // avoid leak + /// ``` + // TODO: remove in the next major version. + #[allow(deprecated)] + #[deprecated(note = "Use `compare_exchange` instead")] + pub fn compare_and_set<'g, O, P>( + &self, + current: Shared<'_, T>, + new: P, + ord: O, + guard: &'g Guard, + ) -> Result, CompareAndSetError<'g, T, P>> + where + O: CompareAndSetOrdering, + P: Pointer, + { + self.compare_exchange(current, new, ord.success(), ord.failure(), guard) + } + + /// Stores the pointer `new` (either `Shared` or `Owned`) into the atomic pointer if the current + /// value is the same as `current`. The tag is also taken into account, so two pointers to the + /// same object, but with different tags, will not be considered equal. + /// + /// Unlike [`compare_and_set`], this method is allowed to spuriously fail even when comparison + /// succeeds, which can result in more efficient code on some platforms. The return value is a + /// result indicating whether the new pointer was written. On success the pointer that was + /// written is returned. On failure the actual current value and `new` are returned. + /// + /// This method takes a [`CompareAndSetOrdering`] argument which describes the memory + /// ordering of this operation. + /// + /// [`compare_and_set`]: Atomic::compare_and_set + /// + /// # Migrating to `compare_exchange_weak` + /// + /// `compare_and_set_weak` is equivalent to `compare_exchange_weak` with the following mapping for + /// memory orderings: + /// + /// Original | Success | Failure + /// -------- | ------- | ------- + /// Relaxed | Relaxed | Relaxed + /// Acquire | Acquire | Acquire + /// Release | Release | Relaxed + /// AcqRel | AcqRel | Acquire + /// SeqCst | SeqCst | SeqCst + /// + /// # Examples + /// + /// ``` + /// # #![allow(deprecated)] + /// use crossbeam_epoch::{self as epoch, Atomic, Owned, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// + /// let mut new = Owned::new(5678); + /// let mut ptr = a.load(SeqCst, guard); + /// # unsafe { drop(a.load(SeqCst, guard).into_owned()); } // avoid leak + /// loop { + /// match a.compare_and_set_weak(ptr, new, SeqCst, guard) { + /// Ok(p) => { + /// ptr = p; + /// break; + /// } + /// Err(err) => { + /// ptr = err.current; + /// new = err.new; + /// } + /// } + /// } + /// + /// let mut curr = a.load(SeqCst, guard); + /// loop { + /// match a.compare_and_set_weak(curr, Shared::null(), SeqCst, guard) { + /// Ok(_) => break, + /// Err(err) => curr = err.current, + /// } + /// } + /// # unsafe { drop(curr.into_owned()); } // avoid leak + /// ``` + // TODO: remove in the next major version. + #[allow(deprecated)] + #[deprecated(note = "Use `compare_exchange_weak` instead")] + pub fn compare_and_set_weak<'g, O, P>( + &self, + current: Shared<'_, T>, + new: P, + ord: O, + guard: &'g Guard, + ) -> Result, CompareAndSetError<'g, T, P>> + where + O: CompareAndSetOrdering, + P: Pointer, + { + self.compare_exchange_weak(current, new, ord.success(), ord.failure(), guard) + } + + /// Bitwise "and" with the current tag. + /// + /// Performs a bitwise "and" operation on the current tag and the argument `val`, and sets the + /// new tag to the result. Returns the previous pointer. + /// + /// This method takes an [`Ordering`] argument which describes the memory ordering of this + /// operation. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::::from(Shared::null().with_tag(3)); + /// let guard = &epoch::pin(); + /// assert_eq!(a.fetch_and(2, SeqCst, guard).tag(), 3); + /// assert_eq!(a.load(SeqCst, guard).tag(), 2); + /// ``` + pub fn fetch_and<'g>(&self, val: usize, ord: Ordering, _: &'g Guard) -> Shared<'g, T> { + unsafe { Shared::from_usize(self.data.fetch_and(val | !low_bits::(), ord)) } + } + + /// Bitwise "or" with the current tag. + /// + /// Performs a bitwise "or" operation on the current tag and the argument `val`, and sets the + /// new tag to the result. Returns the previous pointer. + /// + /// This method takes an [`Ordering`] argument which describes the memory ordering of this + /// operation. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::::from(Shared::null().with_tag(1)); + /// let guard = &epoch::pin(); + /// assert_eq!(a.fetch_or(2, SeqCst, guard).tag(), 1); + /// assert_eq!(a.load(SeqCst, guard).tag(), 3); + /// ``` + pub fn fetch_or<'g>(&self, val: usize, ord: Ordering, _: &'g Guard) -> Shared<'g, T> { + unsafe { Shared::from_usize(self.data.fetch_or(val & low_bits::(), ord)) } + } + + /// Bitwise "xor" with the current tag. + /// + /// Performs a bitwise "xor" operation on the current tag and the argument `val`, and sets the + /// new tag to the result. Returns the previous pointer. + /// + /// This method takes an [`Ordering`] argument which describes the memory ordering of this + /// operation. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Shared}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::::from(Shared::null().with_tag(1)); + /// let guard = &epoch::pin(); + /// assert_eq!(a.fetch_xor(3, SeqCst, guard).tag(), 1); + /// assert_eq!(a.load(SeqCst, guard).tag(), 2); + /// ``` + pub fn fetch_xor<'g>(&self, val: usize, ord: Ordering, _: &'g Guard) -> Shared<'g, T> { + unsafe { Shared::from_usize(self.data.fetch_xor(val & low_bits::(), ord)) } + } + + /// Takes ownership of the pointee. + /// + /// This consumes the atomic and converts it into [`Owned`]. As [`Atomic`] doesn't have a + /// destructor and doesn't drop the pointee while [`Owned`] does, this is suitable for + /// destructors of data structures. + /// + /// # Panics + /// + /// Panics if this pointer is null, but only in debug mode. + /// + /// # Safety + /// + /// This method may be called only if the pointer is valid and nobody else is holding a + /// reference to the same object. + /// + /// # Examples + /// + /// ```rust + /// # use std::mem; + /// # use crossbeam_epoch::Atomic; + /// struct DataStructure { + /// ptr: Atomic, + /// } + /// + /// impl Drop for DataStructure { + /// fn drop(&mut self) { + /// // By now the DataStructure lives only in our thread and we are sure we don't hold + /// // any Shared or & to it ourselves. + /// unsafe { + /// drop(mem::replace(&mut self.ptr, Atomic::null()).into_owned()); + /// } + /// } + /// } + /// ``` + pub unsafe fn into_owned(self) -> Owned { + Owned::from_usize(self.data.into_inner()) + } + + /// Takes ownership of the pointee if it is non-null. + /// + /// This consumes the atomic and converts it into [`Owned`]. As [`Atomic`] doesn't have a + /// destructor and doesn't drop the pointee while [`Owned`] does, this is suitable for + /// destructors of data structures. + /// + /// # Safety + /// + /// This method may be called only if the pointer is valid and nobody else is holding a + /// reference to the same object, or the pointer is null. + /// + /// # Examples + /// + /// ```rust + /// # use std::mem; + /// # use crossbeam_epoch::Atomic; + /// struct DataStructure { + /// ptr: Atomic, + /// } + /// + /// impl Drop for DataStructure { + /// fn drop(&mut self) { + /// // By now the DataStructure lives only in our thread and we are sure we don't hold + /// // any Shared or & to it ourselves, but it may be null, so we have to be careful. + /// let old = mem::replace(&mut self.ptr, Atomic::null()); + /// unsafe { + /// if let Some(x) = old.try_into_owned() { + /// drop(x) + /// } + /// } + /// } + /// } + /// ``` + pub unsafe fn try_into_owned(self) -> Option> { + let data = self.data.into_inner(); + if decompose_tag::(data).0 == 0 { + None + } else { + Some(Owned::from_usize(data)) + } + } +} + +impl fmt::Debug for Atomic { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let data = self.data.load(Ordering::SeqCst); + let (raw, tag) = decompose_tag::(data); + + f.debug_struct("Atomic") + .field("raw", &raw) + .field("tag", &tag) + .finish() + } +} + +impl fmt::Pointer for Atomic { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let data = self.data.load(Ordering::SeqCst); + let (raw, _) = decompose_tag::(data); + fmt::Pointer::fmt(&(unsafe { T::deref(raw) as *const _ }), f) + } +} + +impl Clone for Atomic { + /// Returns a copy of the atomic value. + /// + /// Note that a `Relaxed` load is used here. If you need synchronization, use it with other + /// atomics or fences. + fn clone(&self) -> Self { + let data = self.data.load(Ordering::Relaxed); + Atomic::from_usize(data) + } +} + +impl Default for Atomic { + fn default() -> Self { + Atomic::null() + } +} + +impl From> for Atomic { + /// Returns a new atomic pointer pointing to `owned`. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{Atomic, Owned}; + /// + /// let a = Atomic::::from(Owned::new(1234)); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + fn from(owned: Owned) -> Self { + let data = owned.data; + mem::forget(owned); + Self::from_usize(data) + } +} + +impl From> for Atomic { + fn from(b: Box) -> Self { + Self::from(Owned::from(b)) + } +} + +impl From for Atomic { + fn from(t: T) -> Self { + Self::new(t) + } +} + +impl<'g, T: ?Sized + Pointable> From> for Atomic { + /// Returns a new atomic pointer pointing to `ptr`. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{Atomic, Shared}; + /// + /// let a = Atomic::::from(Shared::::null()); + /// ``` + fn from(ptr: Shared<'g, T>) -> Self { + Self::from_usize(ptr.data) + } +} + +impl From<*const T> for Atomic { + /// Returns a new atomic pointer pointing to `raw`. + /// + /// # Examples + /// + /// ``` + /// use std::ptr; + /// use crossbeam_epoch::Atomic; + /// + /// let a = Atomic::::from(ptr::null::()); + /// ``` + fn from(raw: *const T) -> Self { + Self::from_usize(raw as usize) + } +} + +/// A trait for either `Owned` or `Shared` pointers. +pub trait Pointer { + /// Returns the machine representation of the pointer. + fn into_usize(self) -> usize; + + /// Returns a new pointer pointing to the tagged pointer `data`. + /// + /// # Safety + /// + /// The given `data` should have been created by `Pointer::into_usize()`, and one `data` should + /// not be converted back by `Pointer::from_usize()` multiple times. + unsafe fn from_usize(data: usize) -> Self; +} + +/// An owned heap-allocated object. +/// +/// This type is very similar to `Box`. +/// +/// The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused +/// least significant bits of the address. +pub struct Owned { + data: usize, + _marker: PhantomData>, +} + +impl Pointer for Owned { + #[inline] + fn into_usize(self) -> usize { + let data = self.data; + mem::forget(self); + data + } + + /// Returns a new pointer pointing to the tagged pointer `data`. + /// + /// # Panics + /// + /// Panics if the data is zero in debug mode. + #[inline] + unsafe fn from_usize(data: usize) -> Self { + debug_assert!(data != 0, "converting zero into `Owned`"); + Owned { + data, + _marker: PhantomData, + } + } +} + +impl Owned { + /// Returns a new owned pointer pointing to `raw`. + /// + /// This function is unsafe because improper use may lead to memory problems. Argument `raw` + /// must be a valid pointer. Also, a double-free may occur if the function is called twice on + /// the same raw pointer. + /// + /// # Panics + /// + /// Panics if `raw` is not properly aligned. + /// + /// # Safety + /// + /// The given `raw` should have been derived from `Owned`, and one `raw` should not be converted + /// back by `Owned::from_raw()` multiple times. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Owned; + /// + /// let o = unsafe { Owned::from_raw(Box::into_raw(Box::new(1234))) }; + /// ``` + pub unsafe fn from_raw(raw: *mut T) -> Owned { + let raw = raw as usize; + ensure_aligned::(raw); + Self::from_usize(raw) + } + + /// Converts the owned pointer into a `Box`. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Owned; + /// + /// let o = Owned::new(1234); + /// let b: Box = o.into_box(); + /// assert_eq!(*b, 1234); + /// ``` + pub fn into_box(self) -> Box { + let (raw, _) = decompose_tag::(self.data); + mem::forget(self); + unsafe { Box::from_raw(raw as *mut _) } + } + + /// Allocates `value` on the heap and returns a new owned pointer pointing to it. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Owned; + /// + /// let o = Owned::new(1234); + /// ``` + pub fn new(init: T) -> Owned { + Self::init(init) + } +} + +impl Owned { + /// Allocates `value` on the heap and returns a new owned pointer pointing to it. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Owned; + /// + /// let o = Owned::::init(1234); + /// ``` + pub fn init(init: T::Init) -> Owned { + unsafe { Self::from_usize(T::init(init)) } + } + + /// Converts the owned pointer into a [`Shared`]. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Owned}; + /// + /// let o = Owned::new(1234); + /// let guard = &epoch::pin(); + /// let p = o.into_shared(guard); + /// # unsafe { drop(p.into_owned()); } // avoid leak + /// ``` + #[allow(clippy::needless_lifetimes)] + pub fn into_shared<'g>(self, _: &'g Guard) -> Shared<'g, T> { + unsafe { Shared::from_usize(self.into_usize()) } + } + + /// Returns the tag stored within the pointer. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Owned; + /// + /// assert_eq!(Owned::new(1234).tag(), 0); + /// ``` + pub fn tag(&self) -> usize { + let (_, tag) = decompose_tag::(self.data); + tag + } + + /// Returns the same pointer, but tagged with `tag`. `tag` is truncated to be fit into the + /// unused bits of the pointer to `T`. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Owned; + /// + /// let o = Owned::new(0u64); + /// assert_eq!(o.tag(), 0); + /// let o = o.with_tag(2); + /// assert_eq!(o.tag(), 2); + /// ``` + pub fn with_tag(self, tag: usize) -> Owned { + let data = self.into_usize(); + unsafe { Self::from_usize(compose_tag::(data, tag)) } + } +} + +impl Drop for Owned { + fn drop(&mut self) { + let (raw, _) = decompose_tag::(self.data); + unsafe { + T::drop(raw); + } + } +} + +impl fmt::Debug for Owned { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (raw, tag) = decompose_tag::(self.data); + + f.debug_struct("Owned") + .field("raw", &raw) + .field("tag", &tag) + .finish() + } +} + +impl Clone for Owned { + fn clone(&self) -> Self { + Owned::new((**self).clone()).with_tag(self.tag()) + } +} + +impl Deref for Owned { + type Target = T; + + fn deref(&self) -> &T { + let (raw, _) = decompose_tag::(self.data); + unsafe { T::deref(raw) } + } +} + +impl DerefMut for Owned { + fn deref_mut(&mut self) -> &mut T { + let (raw, _) = decompose_tag::(self.data); + unsafe { T::deref_mut(raw) } + } +} + +impl From for Owned { + fn from(t: T) -> Self { + Owned::new(t) + } +} + +impl From> for Owned { + /// Returns a new owned pointer pointing to `b`. + /// + /// # Panics + /// + /// Panics if the pointer (the `Box`) is not properly aligned. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Owned; + /// + /// let o = unsafe { Owned::from_raw(Box::into_raw(Box::new(1234))) }; + /// ``` + fn from(b: Box) -> Self { + unsafe { Self::from_raw(Box::into_raw(b)) } + } +} + +impl Borrow for Owned { + fn borrow(&self) -> &T { + self.deref() + } +} + +impl BorrowMut for Owned { + fn borrow_mut(&mut self) -> &mut T { + self.deref_mut() + } +} + +impl AsRef for Owned { + fn as_ref(&self) -> &T { + self.deref() + } +} + +impl AsMut for Owned { + fn as_mut(&mut self) -> &mut T { + self.deref_mut() + } +} + +/// A pointer to an object protected by the epoch GC. +/// +/// The pointer is valid for use only during the lifetime `'g`. +/// +/// The pointer must be properly aligned. Since it is aligned, a tag can be stored into the unused +/// least significant bits of the address. +pub struct Shared<'g, T: 'g + ?Sized + Pointable> { + data: usize, + _marker: PhantomData<(&'g (), *const T)>, +} + +impl Clone for Shared<'_, T> { + fn clone(&self) -> Self { + *self + } +} + +impl Copy for Shared<'_, T> {} + +impl Pointer for Shared<'_, T> { + #[inline] + fn into_usize(self) -> usize { + self.data + } + + #[inline] + unsafe fn from_usize(data: usize) -> Self { + Shared { + data, + _marker: PhantomData, + } + } +} + +impl<'g, T> Shared<'g, T> { + /// Converts the pointer to a raw pointer (without the tag). + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Owned}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let o = Owned::new(1234); + /// let raw = &*o as *const _; + /// let a = Atomic::from(o); + /// + /// let guard = &epoch::pin(); + /// let p = a.load(SeqCst, guard); + /// assert_eq!(p.as_raw(), raw); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn as_raw(&self) -> *const T { + let (raw, _) = decompose_tag::(self.data); + raw as *const _ + } +} + +impl<'g, T: ?Sized + Pointable> Shared<'g, T> { + /// Returns a new null pointer. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Shared; + /// + /// let p = Shared::::null(); + /// assert!(p.is_null()); + /// ``` + pub fn null() -> Shared<'g, T> { + Shared { + data: 0, + _marker: PhantomData, + } + } + + /// Returns `true` if the pointer is null. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Owned}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::null(); + /// let guard = &epoch::pin(); + /// assert!(a.load(SeqCst, guard).is_null()); + /// a.store(Owned::new(1234), SeqCst); + /// assert!(!a.load(SeqCst, guard).is_null()); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn is_null(&self) -> bool { + let (raw, _) = decompose_tag::(self.data); + raw == 0 + } + + /// Dereferences the pointer. + /// + /// Returns a reference to the pointee that is valid during the lifetime `'g`. + /// + /// # Safety + /// + /// Dereferencing a pointer is unsafe because it could be pointing to invalid memory. + /// + /// Another concern is the possibility of data races due to lack of proper synchronization. + /// For example, consider the following scenario: + /// + /// 1. A thread creates a new object: `a.store(Owned::new(10), Relaxed)` + /// 2. Another thread reads it: `*a.load(Relaxed, guard).as_ref().unwrap()` + /// + /// The problem is that relaxed orderings don't synchronize initialization of the object with + /// the read from the second thread. This is a data race. A possible solution would be to use + /// `Release` and `Acquire` orderings. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// let p = a.load(SeqCst, guard); + /// unsafe { + /// assert_eq!(p.deref(), &1234); + /// } + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub unsafe fn deref(&self) -> &'g T { + let (raw, _) = decompose_tag::(self.data); + T::deref(raw) + } + + /// Dereferences the pointer. + /// + /// Returns a mutable reference to the pointee that is valid during the lifetime `'g`. + /// + /// # Safety + /// + /// * There is no guarantee that there are no more threads attempting to read/write from/to the + /// actual object at the same time. + /// + /// The user must know that there are no concurrent accesses towards the object itself. + /// + /// * Other than the above, all safety concerns of `deref()` applies here. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(vec![1, 2, 3, 4]); + /// let guard = &epoch::pin(); + /// + /// let mut p = a.load(SeqCst, guard); + /// unsafe { + /// assert!(!p.is_null()); + /// let b = p.deref_mut(); + /// assert_eq!(b, &vec![1, 2, 3, 4]); + /// b.push(5); + /// assert_eq!(b, &vec![1, 2, 3, 4, 5]); + /// } + /// + /// let p = a.load(SeqCst, guard); + /// unsafe { + /// assert_eq!(p.deref(), &vec![1, 2, 3, 4, 5]); + /// } + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub unsafe fn deref_mut(&mut self) -> &'g mut T { + let (raw, _) = decompose_tag::(self.data); + T::deref_mut(raw) + } + + /// Converts the pointer to a reference. + /// + /// Returns `None` if the pointer is null, or else a reference to the object wrapped in `Some`. + /// + /// # Safety + /// + /// Dereferencing a pointer is unsafe because it could be pointing to invalid memory. + /// + /// Another concern is the possibility of data races due to lack of proper synchronization. + /// For example, consider the following scenario: + /// + /// 1. A thread creates a new object: `a.store(Owned::new(10), Relaxed)` + /// 2. Another thread reads it: `*a.load(Relaxed, guard).as_ref().unwrap()` + /// + /// The problem is that relaxed orderings don't synchronize initialization of the object with + /// the read from the second thread. This is a data race. A possible solution would be to use + /// `Release` and `Acquire` orderings. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// let guard = &epoch::pin(); + /// let p = a.load(SeqCst, guard); + /// unsafe { + /// assert_eq!(p.as_ref(), Some(&1234)); + /// } + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub unsafe fn as_ref(&self) -> Option<&'g T> { + let (raw, _) = decompose_tag::(self.data); + if raw == 0 { + None + } else { + Some(T::deref(raw)) + } + } + + /// Takes ownership of the pointee. + /// + /// # Panics + /// + /// Panics if this pointer is null, but only in debug mode. + /// + /// # Safety + /// + /// This method may be called only if the pointer is valid and nobody else is holding a + /// reference to the same object. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// unsafe { + /// let guard = &epoch::unprotected(); + /// let p = a.load(SeqCst, guard); + /// drop(p.into_owned()); + /// } + /// ``` + pub unsafe fn into_owned(self) -> Owned { + debug_assert!(!self.is_null(), "converting a null `Shared` into `Owned`"); + Owned::from_usize(self.data) + } + + /// Takes ownership of the pointee if it is not null. + /// + /// # Safety + /// + /// This method may be called only if the pointer is valid and nobody else is holding a + /// reference to the same object, or if the pointer is null. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(1234); + /// unsafe { + /// let guard = &epoch::unprotected(); + /// let p = a.load(SeqCst, guard); + /// if let Some(x) = p.try_into_owned() { + /// drop(x); + /// } + /// } + /// ``` + pub unsafe fn try_into_owned(self) -> Option> { + if self.is_null() { + None + } else { + Some(Owned::from_usize(self.data)) + } + } + + /// Returns the tag stored within the pointer. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Owned}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::::from(Owned::new(0u64).with_tag(2)); + /// let guard = &epoch::pin(); + /// let p = a.load(SeqCst, guard); + /// assert_eq!(p.tag(), 2); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn tag(&self) -> usize { + let (_, tag) = decompose_tag::(self.data); + tag + } + + /// Returns the same pointer, but tagged with `tag`. `tag` is truncated to be fit into the + /// unused bits of the pointer to `T`. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(0u64); + /// let guard = &epoch::pin(); + /// let p1 = a.load(SeqCst, guard); + /// let p2 = p1.with_tag(2); + /// + /// assert_eq!(p1.tag(), 0); + /// assert_eq!(p2.tag(), 2); + /// assert_eq!(p1.as_raw(), p2.as_raw()); + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn with_tag(&self, tag: usize) -> Shared<'g, T> { + unsafe { Self::from_usize(compose_tag::(self.data, tag)) } + } +} + +impl From<*const T> for Shared<'_, T> { + /// Returns a new pointer pointing to `raw`. + /// + /// # Panics + /// + /// Panics if `raw` is not properly aligned. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::Shared; + /// + /// let p = Shared::from(Box::into_raw(Box::new(1234)) as *const _); + /// assert!(!p.is_null()); + /// # unsafe { drop(p.into_owned()); } // avoid leak + /// ``` + fn from(raw: *const T) -> Self { + let raw = raw as usize; + ensure_aligned::(raw); + unsafe { Self::from_usize(raw) } + } +} + +impl<'g, T: ?Sized + Pointable> PartialEq> for Shared<'g, T> { + fn eq(&self, other: &Self) -> bool { + self.data == other.data + } +} + +impl Eq for Shared<'_, T> {} + +impl<'g, T: ?Sized + Pointable> PartialOrd> for Shared<'g, T> { + fn partial_cmp(&self, other: &Self) -> Option { + self.data.partial_cmp(&other.data) + } +} + +impl Ord for Shared<'_, T> { + fn cmp(&self, other: &Self) -> cmp::Ordering { + self.data.cmp(&other.data) + } +} + +impl fmt::Debug for Shared<'_, T> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (raw, tag) = decompose_tag::(self.data); + + f.debug_struct("Shared") + .field("raw", &raw) + .field("tag", &tag) + .finish() + } +} + +impl fmt::Pointer for Shared<'_, T> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + fmt::Pointer::fmt(&(unsafe { self.deref() as *const _ }), f) + } +} + +impl Default for Shared<'_, T> { + fn default() -> Self { + Shared::null() + } +} + +#[cfg(all(test, not(crossbeam_loom)))] +mod tests { + use super::{Owned, Shared}; + use std::mem::MaybeUninit; + + #[test] + fn valid_tag_i8() { + Shared::::null().with_tag(0); + } + + #[test] + fn valid_tag_i64() { + Shared::::null().with_tag(7); + } + + #[test] + fn const_atomic_null() { + use super::Atomic; + static _U: Atomic = Atomic::::null(); + } + + #[test] + fn array_init() { + let owned = Owned::<[MaybeUninit]>::init(10); + let arr: &[MaybeUninit] = &owned; + assert_eq!(arr.len(), 10); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/collector.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/collector.rs new file mode 100644 index 0000000000000000000000000000000000000000..12655d6cdb86afbdeff3bc93c5798140fe66d74d --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/collector.rs @@ -0,0 +1,464 @@ +/// Epoch-based garbage collector. +/// +/// # Examples +/// +/// ``` +/// use crossbeam_epoch::Collector; +/// +/// let collector = Collector::new(); +/// +/// let handle = collector.register(); +/// drop(collector); // `handle` still works after dropping `collector` +/// +/// handle.pin().flush(); +/// ``` +use core::fmt; + +use crate::guard::Guard; +use crate::internal::{Global, Local}; +use crate::primitive::sync::Arc; + +/// An epoch-based garbage collector. +pub struct Collector { + pub(crate) global: Arc, +} + +unsafe impl Send for Collector {} +unsafe impl Sync for Collector {} + +impl Default for Collector { + fn default() -> Self { + Self { + global: Arc::new(Global::new()), + } + } +} + +impl Collector { + /// Creates a new collector. + pub fn new() -> Self { + Self::default() + } + + /// Registers a new handle for the collector. + pub fn register(&self) -> LocalHandle { + Local::register(self) + } +} + +impl Clone for Collector { + /// Creates another reference to the same garbage collector. + fn clone(&self) -> Self { + Collector { + global: self.global.clone(), + } + } +} + +impl fmt::Debug for Collector { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.pad("Collector { .. }") + } +} + +impl PartialEq for Collector { + /// Checks if both handles point to the same collector. + fn eq(&self, rhs: &Collector) -> bool { + Arc::ptr_eq(&self.global, &rhs.global) + } +} +impl Eq for Collector {} + +/// A handle to a garbage collector. +pub struct LocalHandle { + pub(crate) local: *const Local, +} + +impl LocalHandle { + /// Pins the handle. + #[inline] + pub fn pin(&self) -> Guard { + unsafe { (*self.local).pin() } + } + + /// Returns `true` if the handle is pinned. + #[inline] + pub fn is_pinned(&self) -> bool { + unsafe { (*self.local).is_pinned() } + } + + /// Returns the `Collector` associated with this handle. + #[inline] + pub fn collector(&self) -> &Collector { + unsafe { (*self.local).collector() } + } +} + +impl Drop for LocalHandle { + #[inline] + fn drop(&mut self) { + unsafe { + Local::release_handle(&*self.local); + } + } +} + +impl fmt::Debug for LocalHandle { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.pad("LocalHandle { .. }") + } +} + +#[cfg(all(test, not(crossbeam_loom)))] +mod tests { + use std::mem::ManuallyDrop; + use std::sync::atomic::{AtomicUsize, Ordering}; + + use crossbeam_utils::thread; + + use crate::{Collector, Owned}; + + const NUM_THREADS: usize = 8; + + #[test] + fn pin_reentrant() { + let collector = Collector::new(); + let handle = collector.register(); + drop(collector); + + assert!(!handle.is_pinned()); + { + let _guard = &handle.pin(); + assert!(handle.is_pinned()); + { + let _guard = &handle.pin(); + assert!(handle.is_pinned()); + } + assert!(handle.is_pinned()); + } + assert!(!handle.is_pinned()); + } + + #[test] + fn flush_local_bag() { + let collector = Collector::new(); + let handle = collector.register(); + drop(collector); + + for _ in 0..100 { + let guard = &handle.pin(); + unsafe { + let a = Owned::new(7).into_shared(guard); + guard.defer_destroy(a); + + assert!(!(*guard.local).bag.with(|b| (*b).is_empty())); + + while !(*guard.local).bag.with(|b| (*b).is_empty()) { + guard.flush(); + } + } + } + } + + #[test] + fn garbage_buffering() { + let collector = Collector::new(); + let handle = collector.register(); + drop(collector); + + let guard = &handle.pin(); + unsafe { + for _ in 0..10 { + let a = Owned::new(7).into_shared(guard); + guard.defer_destroy(a); + } + assert!(!(*guard.local).bag.with(|b| (*b).is_empty())); + } + } + + #[test] + fn pin_holds_advance() { + #[cfg(miri)] + const N: usize = 500; + #[cfg(not(miri))] + const N: usize = 500_000; + + let collector = Collector::new(); + + thread::scope(|scope| { + for _ in 0..NUM_THREADS { + scope.spawn(|_| { + let handle = collector.register(); + for _ in 0..N { + let guard = &handle.pin(); + + let before = collector.global.epoch.load(Ordering::Relaxed); + collector.global.collect(guard); + let after = collector.global.epoch.load(Ordering::Relaxed); + + assert!(after.wrapping_sub(before) <= 2); + } + }); + } + }) + .unwrap(); + } + + #[cfg(not(crossbeam_sanitize))] // TODO: assertions failed due to `cfg(crossbeam_sanitize)` reduce `internal::MAX_OBJECTS` + #[test] + fn incremental() { + #[cfg(miri)] + const COUNT: usize = 500; + #[cfg(not(miri))] + const COUNT: usize = 100_000; + static DESTROYS: AtomicUsize = AtomicUsize::new(0); + + let collector = Collector::new(); + let handle = collector.register(); + + unsafe { + let guard = &handle.pin(); + for _ in 0..COUNT { + let a = Owned::new(7i32).into_shared(guard); + guard.defer_unchecked(move || { + drop(a.into_owned()); + DESTROYS.fetch_add(1, Ordering::Relaxed); + }); + } + guard.flush(); + } + + let mut last = 0; + + while last < COUNT { + let curr = DESTROYS.load(Ordering::Relaxed); + assert!(curr - last <= 1024); + last = curr; + + let guard = &handle.pin(); + collector.global.collect(guard); + } + assert!(DESTROYS.load(Ordering::Relaxed) == COUNT); + } + + #[test] + fn buffering() { + const COUNT: usize = 10; + #[cfg(miri)] + const N: usize = 500; + #[cfg(not(miri))] + const N: usize = 100_000; + static DESTROYS: AtomicUsize = AtomicUsize::new(0); + + let collector = Collector::new(); + let handle = collector.register(); + + unsafe { + let guard = &handle.pin(); + for _ in 0..COUNT { + let a = Owned::new(7i32).into_shared(guard); + guard.defer_unchecked(move || { + drop(a.into_owned()); + DESTROYS.fetch_add(1, Ordering::Relaxed); + }); + } + } + + for _ in 0..N { + collector.global.collect(&handle.pin()); + } + assert!(DESTROYS.load(Ordering::Relaxed) < COUNT); + + handle.pin().flush(); + + while DESTROYS.load(Ordering::Relaxed) < COUNT { + let guard = &handle.pin(); + collector.global.collect(guard); + } + assert_eq!(DESTROYS.load(Ordering::Relaxed), COUNT); + } + + #[test] + fn count_drops() { + #[cfg(miri)] + const COUNT: usize = 500; + #[cfg(not(miri))] + const COUNT: usize = 100_000; + static DROPS: AtomicUsize = AtomicUsize::new(0); + + struct Elem(#[allow(dead_code)] i32); + + impl Drop for Elem { + fn drop(&mut self) { + DROPS.fetch_add(1, Ordering::Relaxed); + } + } + + let collector = Collector::new(); + let handle = collector.register(); + + unsafe { + let guard = &handle.pin(); + + for _ in 0..COUNT { + let a = Owned::new(Elem(7i32)).into_shared(guard); + guard.defer_destroy(a); + } + guard.flush(); + } + + while DROPS.load(Ordering::Relaxed) < COUNT { + let guard = &handle.pin(); + collector.global.collect(guard); + } + assert_eq!(DROPS.load(Ordering::Relaxed), COUNT); + } + + #[test] + fn count_destroy() { + #[cfg(miri)] + const COUNT: usize = 500; + #[cfg(not(miri))] + const COUNT: usize = 100_000; + static DESTROYS: AtomicUsize = AtomicUsize::new(0); + + let collector = Collector::new(); + let handle = collector.register(); + + unsafe { + let guard = &handle.pin(); + + for _ in 0..COUNT { + let a = Owned::new(7i32).into_shared(guard); + guard.defer_unchecked(move || { + drop(a.into_owned()); + DESTROYS.fetch_add(1, Ordering::Relaxed); + }); + } + guard.flush(); + } + + while DESTROYS.load(Ordering::Relaxed) < COUNT { + let guard = &handle.pin(); + collector.global.collect(guard); + } + assert_eq!(DESTROYS.load(Ordering::Relaxed), COUNT); + } + + #[test] + fn drop_array() { + const COUNT: usize = 700; + static DROPS: AtomicUsize = AtomicUsize::new(0); + + struct Elem(#[allow(dead_code)] i32); + + impl Drop for Elem { + fn drop(&mut self) { + DROPS.fetch_add(1, Ordering::Relaxed); + } + } + + let collector = Collector::new(); + let handle = collector.register(); + + let mut guard = handle.pin(); + + let mut v = Vec::with_capacity(COUNT); + for i in 0..COUNT { + v.push(Elem(i as i32)); + } + + { + let a = Owned::new(v).into_shared(&guard); + unsafe { + guard.defer_destroy(a); + } + guard.flush(); + } + + while DROPS.load(Ordering::Relaxed) < COUNT { + guard.repin(); + collector.global.collect(&guard); + } + assert_eq!(DROPS.load(Ordering::Relaxed), COUNT); + } + + #[test] + fn destroy_array() { + #[cfg(miri)] + const COUNT: usize = 500; + #[cfg(not(miri))] + const COUNT: usize = 100_000; + static DESTROYS: AtomicUsize = AtomicUsize::new(0); + + let collector = Collector::new(); + let handle = collector.register(); + + unsafe { + let guard = &handle.pin(); + + let mut v = Vec::with_capacity(COUNT); + for i in 0..COUNT { + v.push(i as i32); + } + + let len = v.len(); + let cap = v.capacity(); + let ptr = ManuallyDrop::new(v).as_mut_ptr(); + guard.defer_unchecked(move || { + drop(Vec::from_raw_parts(ptr, len, cap)); + DESTROYS.fetch_add(len, Ordering::Relaxed); + }); + guard.flush(); + } + + while DESTROYS.load(Ordering::Relaxed) < COUNT { + let guard = &handle.pin(); + collector.global.collect(guard); + } + assert_eq!(DESTROYS.load(Ordering::Relaxed), COUNT); + } + + #[test] + fn stress() { + const THREADS: usize = 8; + #[cfg(miri)] + const COUNT: usize = 500; + #[cfg(not(miri))] + const COUNT: usize = 100_000; + static DROPS: AtomicUsize = AtomicUsize::new(0); + + struct Elem(#[allow(dead_code)] i32); + + impl Drop for Elem { + fn drop(&mut self) { + DROPS.fetch_add(1, Ordering::Relaxed); + } + } + + let collector = Collector::new(); + + thread::scope(|scope| { + for _ in 0..THREADS { + scope.spawn(|_| { + let handle = collector.register(); + for _ in 0..COUNT { + let guard = &handle.pin(); + unsafe { + let a = Owned::new(Elem(7i32)).into_shared(guard); + guard.defer_destroy(a); + } + } + }); + } + }) + .unwrap(); + + let handle = collector.register(); + while DROPS.load(Ordering::Relaxed) < COUNT * THREADS { + let guard = &handle.pin(); + collector.global.collect(guard); + } + assert_eq!(DROPS.load(Ordering::Relaxed), COUNT * THREADS); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/default.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/default.rs new file mode 100644 index 0000000000000000000000000000000000000000..a9790a373ad0be5008e3dfa7f5ead55cf4b23471 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/default.rs @@ -0,0 +1,93 @@ +//! The default garbage collector. +//! +//! For each thread, a participant is lazily initialized on its first use, when the current thread +//! is registered in the default collector. If initialized, the thread's participant will get +//! destructed on thread exit, which in turn unregisters the thread. + +use crate::collector::{Collector, LocalHandle}; +use crate::guard::Guard; +use crate::primitive::thread_local; +#[cfg(not(crossbeam_loom))] +use crate::sync::once_lock::OnceLock; + +fn collector() -> &'static Collector { + #[cfg(not(crossbeam_loom))] + { + /// The global data for the default garbage collector. + static COLLECTOR: OnceLock = OnceLock::new(); + COLLECTOR.get_or_init(Collector::new) + } + // FIXME: loom does not currently provide the equivalent of Lazy: + // https://github.com/tokio-rs/loom/issues/263 + #[cfg(crossbeam_loom)] + { + loom::lazy_static! { + /// The global data for the default garbage collector. + static ref COLLECTOR: Collector = Collector::new(); + } + &COLLECTOR + } +} + +thread_local! { + /// The per-thread participant for the default garbage collector. + static HANDLE: LocalHandle = collector().register(); +} + +/// Pins the current thread. +#[inline] +pub fn pin() -> Guard { + with_handle(|handle| handle.pin()) +} + +/// Returns `true` if the current thread is pinned. +#[inline] +pub fn is_pinned() -> bool { + with_handle(|handle| handle.is_pinned()) +} + +/// Returns the default global collector. +pub fn default_collector() -> &'static Collector { + collector() +} + +#[inline] +fn with_handle(mut f: F) -> R +where + F: FnMut(&LocalHandle) -> R, +{ + HANDLE + .try_with(|h| f(h)) + .unwrap_or_else(|_| f(&collector().register())) +} + +#[cfg(all(test, not(crossbeam_loom)))] +mod tests { + use crossbeam_utils::thread; + + #[test] + fn pin_while_exiting() { + struct Foo; + + impl Drop for Foo { + fn drop(&mut self) { + // Pin after `HANDLE` has been dropped. This must not panic. + super::pin(); + } + } + + thread_local! { + static FOO: Foo = const { Foo }; + } + + thread::scope(|scope| { + scope.spawn(|_| { + // Initialize `FOO` and then `HANDLE`. + FOO.with(|_| ()); + super::pin(); + // At thread exit, `HANDLE` gets dropped first and `FOO` second. + }); + }) + .unwrap(); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/deferred.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/deferred.rs new file mode 100644 index 0000000000000000000000000000000000000000..041955f52bdd249a62e5dd9a3af800a5084a4ac1 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/deferred.rs @@ -0,0 +1,146 @@ +use alloc::boxed::Box; +use core::fmt; +use core::marker::PhantomData; +use core::mem::{self, MaybeUninit}; +use core::ptr; + +/// Number of words a piece of `Data` can hold. +/// +/// Three words should be enough for the majority of cases. For example, you can fit inside it the +/// function pointer together with a fat pointer representing an object that needs to be destroyed. +const DATA_WORDS: usize = 3; + +/// Some space to keep a `FnOnce()` object on the stack. +type Data = [usize; DATA_WORDS]; + +/// A `FnOnce()` that is stored inline if small, or otherwise boxed on the heap. +/// +/// This is a handy way of keeping an unsized `FnOnce()` within a sized structure. +pub(crate) struct Deferred { + call: unsafe fn(*mut u8), + data: MaybeUninit, + _marker: PhantomData<*mut ()>, // !Send + !Sync +} + +impl fmt::Debug for Deferred { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { + f.pad("Deferred { .. }") + } +} + +impl Deferred { + pub(crate) const NO_OP: Self = { + fn no_op_call(_raw: *mut u8) {} + Self { + call: no_op_call, + data: MaybeUninit::uninit(), + _marker: PhantomData, + } + }; + + /// Constructs a new `Deferred` from a `FnOnce()`. + pub(crate) fn new(f: F) -> Self { + let size = mem::size_of::(); + let align = mem::align_of::(); + + unsafe { + if size <= mem::size_of::() && align <= mem::align_of::() { + let mut data = MaybeUninit::::uninit(); + ptr::write(data.as_mut_ptr().cast::(), f); + + unsafe fn call(raw: *mut u8) { + let f: F = ptr::read(raw.cast::()); + f(); + } + + Deferred { + call: call::, + data, + _marker: PhantomData, + } + } else { + let b: Box = Box::new(f); + let mut data = MaybeUninit::::uninit(); + ptr::write(data.as_mut_ptr().cast::>(), b); + + unsafe fn call(raw: *mut u8) { + // It's safe to cast `raw` from `*mut u8` to `*mut Box`, because `raw` is + // originally derived from `*mut Box`. + let b: Box = ptr::read(raw.cast::>()); + (*b)(); + } + + Deferred { + call: call::, + data, + _marker: PhantomData, + } + } + } + } + + /// Calls the function. + #[inline] + pub(crate) fn call(mut self) { + let call = self.call; + unsafe { call(self.data.as_mut_ptr().cast::()) }; + } +} + +#[cfg(all(test, not(crossbeam_loom)))] +mod tests { + use super::Deferred; + use std::cell::Cell; + use std::convert::identity; + + #[test] + fn on_stack() { + let fired = &Cell::new(false); + let a = [0usize; 1]; + + let d = Deferred::new(move || { + let _ = identity(a); + fired.set(true); + }); + + assert!(!fired.get()); + d.call(); + assert!(fired.get()); + } + + #[test] + fn on_heap() { + let fired = &Cell::new(false); + let a = [0usize; 10]; + + let d = Deferred::new(move || { + let _ = identity(a); + fired.set(true); + }); + + assert!(!fired.get()); + d.call(); + assert!(fired.get()); + } + + #[test] + fn string() { + let a = "hello".to_string(); + let d = Deferred::new(move || assert_eq!(a, "hello")); + d.call(); + } + + #[test] + fn boxed_slice_i32() { + let a: Box<[i32]> = vec![2, 3, 5, 7].into_boxed_slice(); + let d = Deferred::new(move || assert_eq!(*a, [2, 3, 5, 7])); + d.call(); + } + + #[test] + fn long_slice_usize() { + let a: [usize; 5] = [2, 3, 5, 7, 11]; + let d = Deferred::new(move || assert_eq!(a, [2, 3, 5, 7, 11])); + d.call(); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/epoch.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/epoch.rs new file mode 100644 index 0000000000000000000000000000000000000000..18d7418a1000cd1c069957f0fee8695ede986e6e --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/epoch.rs @@ -0,0 +1,132 @@ +//! The global epoch +//! +//! The last bit in this number is unused and is always zero. Every so often the global epoch is +//! incremented, i.e. we say it "advances". A pinned participant may advance the global epoch only +//! if all currently pinned participants have been pinned in the current epoch. +//! +//! If an object became garbage in some epoch, then we can be sure that after two advancements no +//! participant will hold a reference to it. That is the crux of safe memory reclamation. + +use crate::primitive::sync::atomic::{AtomicUsize, Ordering}; + +/// An epoch that can be marked as pinned or unpinned. +/// +/// Internally, the epoch is represented as an integer that wraps around at some unspecified point +/// and a flag that represents whether it is pinned or unpinned. +#[derive(Copy, Clone, Default, Debug, Eq, PartialEq)] +pub(crate) struct Epoch { + /// The least significant bit is set if pinned. The rest of the bits hold the epoch. + data: usize, +} + +impl Epoch { + /// Returns the starting epoch in unpinned state. + #[inline] + pub(crate) fn starting() -> Self { + Self::default() + } + + /// Returns the number of epochs `self` is ahead of `rhs`. + /// + /// Internally, epochs are represented as numbers in the range `(isize::MIN / 2) .. (isize::MAX + /// / 2)`, so the returned distance will be in the same interval. + pub(crate) fn wrapping_sub(self, rhs: Self) -> isize { + // The result is the same with `(self.data & !1).wrapping_sub(rhs.data & !1) as isize >> 1`, + // because the possible difference of LSB in `(self.data & !1).wrapping_sub(rhs.data & !1)` + // will be ignored in the shift operation. + self.data.wrapping_sub(rhs.data & !1) as isize >> 1 + } + + /// Returns `true` if the epoch is marked as pinned. + #[inline] + pub(crate) fn is_pinned(self) -> bool { + (self.data & 1) == 1 + } + + /// Returns the same epoch, but marked as pinned. + #[inline] + pub(crate) fn pinned(self) -> Epoch { + Epoch { + data: self.data | 1, + } + } + + /// Returns the same epoch, but marked as unpinned. + #[inline] + pub(crate) fn unpinned(self) -> Epoch { + Epoch { + data: self.data & !1, + } + } + + /// Returns the successor epoch. + /// + /// The returned epoch will be marked as pinned only if the previous one was as well. + #[inline] + pub(crate) fn successor(self) -> Epoch { + Epoch { + data: self.data.wrapping_add(2), + } + } +} + +/// An atomic value that holds an `Epoch`. +#[derive(Default, Debug)] +pub(crate) struct AtomicEpoch { + /// Since `Epoch` is just a wrapper around `usize`, an `AtomicEpoch` is similarly represented + /// using an `AtomicUsize`. + data: AtomicUsize, +} + +impl AtomicEpoch { + /// Creates a new atomic epoch. + #[inline] + pub(crate) fn new(epoch: Epoch) -> Self { + let data = AtomicUsize::new(epoch.data); + AtomicEpoch { data } + } + + /// Loads a value from the atomic epoch. + #[inline] + pub(crate) fn load(&self, ord: Ordering) -> Epoch { + Epoch { + data: self.data.load(ord), + } + } + + /// Stores a value into the atomic epoch. + #[inline] + pub(crate) fn store(&self, epoch: Epoch, ord: Ordering) { + self.data.store(epoch.data, ord); + } + + /// Stores a value into the atomic epoch if the current value is the same as `current`. + /// + /// The return value is a result indicating whether the new value was written and containing + /// the previous value. On success this value is guaranteed to be equal to `current`. + /// + /// This method takes two `Ordering` arguments to describe the memory + /// ordering of this operation. `success` describes the required ordering for the + /// read-modify-write operation that takes place if the comparison with `current` succeeds. + /// `failure` describes the required ordering for the load operation that takes place when + /// the comparison fails. Using `Acquire` as success ordering makes the store part + /// of this operation `Relaxed`, and using `Release` makes the successful load + /// `Relaxed`. The failure ordering can only be `SeqCst`, `Acquire` or `Relaxed` + /// and must be equivalent to or weaker than the success ordering. + #[inline] + pub(crate) fn compare_exchange( + &self, + current: Epoch, + new: Epoch, + success: Ordering, + failure: Ordering, + ) -> Result { + match self + .data + .compare_exchange(current.data, new.data, success, failure) + { + Ok(data) => Ok(Epoch { data }), + Err(data) => Err(Epoch { data }), + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/guard.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/guard.rs new file mode 100644 index 0000000000000000000000000000000000000000..5fe33807c538231d882e40e6cf252203d70fe33e --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/guard.rs @@ -0,0 +1,523 @@ +use core::fmt; +use core::mem; + +use crate::atomic::Shared; +use crate::collector::Collector; +use crate::deferred::Deferred; +use crate::internal::Local; + +/// A guard that keeps the current thread pinned. +/// +/// # Pinning +/// +/// The current thread is pinned by calling [`pin`], which returns a new guard: +/// +/// ``` +/// use crossbeam_epoch as epoch; +/// +/// // It is often convenient to prefix a call to `pin` with a `&` in order to create a reference. +/// // This is not really necessary, but makes passing references to the guard a bit easier. +/// let guard = &epoch::pin(); +/// ``` +/// +/// When a guard gets dropped, the current thread is automatically unpinned. +/// +/// # Pointers on the stack +/// +/// Having a guard allows us to create pointers on the stack to heap-allocated objects. +/// For example: +/// +/// ``` +/// use crossbeam_epoch::{self as epoch, Atomic}; +/// use std::sync::atomic::Ordering::SeqCst; +/// +/// // Create a heap-allocated number. +/// let a = Atomic::new(777); +/// +/// // Pin the current thread. +/// let guard = &epoch::pin(); +/// +/// // Load the heap-allocated object and create pointer `p` on the stack. +/// let p = a.load(SeqCst, guard); +/// +/// // Dereference the pointer and print the value: +/// if let Some(num) = unsafe { p.as_ref() } { +/// println!("The number is {}.", num); +/// } +/// # unsafe { drop(a.into_owned()); } // avoid leak +/// ``` +/// +/// # Multiple guards +/// +/// Pinning is reentrant and it is perfectly legal to create multiple guards. In that case, the +/// thread will actually be pinned only when the first guard is created and unpinned when the last +/// one is dropped: +/// +/// ``` +/// use crossbeam_epoch as epoch; +/// +/// let guard1 = epoch::pin(); +/// let guard2 = epoch::pin(); +/// assert!(epoch::is_pinned()); +/// drop(guard1); +/// assert!(epoch::is_pinned()); +/// drop(guard2); +/// assert!(!epoch::is_pinned()); +/// ``` +/// +/// [`pin`]: super::pin +pub struct Guard { + pub(crate) local: *const Local, +} + +impl Guard { + /// Stores a function so that it can be executed at some point after all currently pinned + /// threads get unpinned. + /// + /// This method first stores `f` into the thread-local (or handle-local) cache. If this cache + /// becomes full, some functions are moved into the global cache. At the same time, some + /// functions from both local and global caches may get executed in order to incrementally + /// clean up the caches as they fill up. + /// + /// There is no guarantee when exactly `f` will be executed. The only guarantee is that it + /// won't be executed until all currently pinned threads get unpinned. In theory, `f` might + /// never run, but the epoch-based garbage collection will make an effort to execute it + /// reasonably soon. + /// + /// If this method is called from an [`unprotected`] guard, the function will simply be + /// executed immediately. + pub fn defer(&self, f: F) + where + F: FnOnce() -> R, + F: Send + 'static, + { + unsafe { + self.defer_unchecked(f); + } + } + + /// Stores a function so that it can be executed at some point after all currently pinned + /// threads get unpinned. + /// + /// This method first stores `f` into the thread-local (or handle-local) cache. If this cache + /// becomes full, some functions are moved into the global cache. At the same time, some + /// functions from both local and global caches may get executed in order to incrementally + /// clean up the caches as they fill up. + /// + /// There is no guarantee when exactly `f` will be executed. The only guarantee is that it + /// won't be executed until all currently pinned threads get unpinned. In theory, `f` might + /// never run, but the epoch-based garbage collection will make an effort to execute it + /// reasonably soon. + /// + /// If this method is called from an [`unprotected`] guard, the function will simply be + /// executed immediately. + /// + /// # Safety + /// + /// The given function must not hold reference onto the stack. It is highly recommended that + /// the passed function is **always** marked with `move` in order to prevent accidental + /// borrows. + /// + /// ``` + /// use crossbeam_epoch as epoch; + /// + /// let guard = &epoch::pin(); + /// let message = "Hello!"; + /// unsafe { + /// // ALWAYS use `move` when sending a closure into `defer_unchecked`. + /// guard.defer_unchecked(move || { + /// println!("{}", message); + /// }); + /// } + /// ``` + /// + /// Apart from that, keep in mind that another thread may execute `f`, so anything accessed by + /// the closure must be `Send`. + /// + /// We intentionally didn't require `F: Send`, because Rust's type systems usually cannot prove + /// `F: Send` for typical use cases. For example, consider the following code snippet, which + /// exemplifies the typical use case of deferring the deallocation of a shared reference: + /// + /// ```ignore + /// let shared = Owned::new(7i32).into_shared(guard); + /// guard.defer_unchecked(move || shared.into_owned()); // `Shared` is not `Send`! + /// ``` + /// + /// While `Shared` is not `Send`, it's safe for another thread to call the deferred function, + /// because it's called only after the grace period and `shared` is no longer shared with other + /// threads. But we don't expect type systems to prove this. + /// + /// # Examples + /// + /// When a heap-allocated object in a data structure becomes unreachable, it has to be + /// deallocated. However, the current thread and other threads may be still holding references + /// on the stack to that same object. Therefore it cannot be deallocated before those references + /// get dropped. This method can defer deallocation until all those threads get unpinned and + /// consequently drop all their references on the stack. + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Owned}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new("foo"); + /// + /// // Now suppose that `a` is shared among multiple threads and concurrently + /// // accessed and modified... + /// + /// // Pin the current thread. + /// let guard = &epoch::pin(); + /// + /// // Steal the object currently stored in `a` and swap it with another one. + /// let p = a.swap(Owned::new("bar").into_shared(guard), SeqCst, guard); + /// + /// if !p.is_null() { + /// // The object `p` is pointing to is now unreachable. + /// // Defer its deallocation until all currently pinned threads get unpinned. + /// unsafe { + /// // ALWAYS use `move` when sending a closure into `defer_unchecked`. + /// guard.defer_unchecked(move || { + /// println!("{} is now being deallocated.", p.deref()); + /// // Now we have unique access to the object pointed to by `p` and can turn it + /// // into an `Owned`. Dropping the `Owned` will deallocate the object. + /// drop(p.into_owned()); + /// }); + /// } + /// } + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub unsafe fn defer_unchecked(&self, f: F) + where + F: FnOnce() -> R, + { + if let Some(local) = self.local.as_ref() { + local.defer(Deferred::new(move || drop(f())), self); + } else { + drop(f()); + } + } + + /// Stores a destructor for an object so that it can be deallocated and dropped at some point + /// after all currently pinned threads get unpinned. + /// + /// This method first stores the destructor into the thread-local (or handle-local) cache. If + /// this cache becomes full, some destructors are moved into the global cache. At the same + /// time, some destructors from both local and global caches may get executed in order to + /// incrementally clean up the caches as they fill up. + /// + /// There is no guarantee when exactly the destructor will be executed. The only guarantee is + /// that it won't be executed until all currently pinned threads get unpinned. In theory, the + /// destructor might never run, but the epoch-based garbage collection will make an effort to + /// execute it reasonably soon. + /// + /// If this method is called from an [`unprotected`] guard, the destructor will simply be + /// executed immediately. + /// + /// # Safety + /// + /// The object must not be reachable by other threads anymore, otherwise it might be still in + /// use when the destructor runs. + /// + /// Apart from that, keep in mind that another thread may execute the destructor, so the object + /// must be sendable to other threads. + /// + /// We intentionally didn't require `T: Send`, because Rust's type systems usually cannot prove + /// `T: Send` for typical use cases. For example, consider the following code snippet, which + /// exemplifies the typical use case of deferring the deallocation of a shared reference: + /// + /// ```ignore + /// let shared = Owned::new(7i32).into_shared(guard); + /// guard.defer_destroy(shared); // `Shared` is not `Send`! + /// ``` + /// + /// While `Shared` is not `Send`, it's safe for another thread to call the destructor, because + /// it's called only after the grace period and `shared` is no longer shared with other + /// threads. But we don't expect type systems to prove this. + /// + /// # Examples + /// + /// When a heap-allocated object in a data structure becomes unreachable, it has to be + /// deallocated. However, the current thread and other threads may be still holding references + /// on the stack to that same object. Therefore it cannot be deallocated before those references + /// get dropped. This method can defer deallocation until all those threads get unpinned and + /// consequently drop all their references on the stack. + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic, Owned}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new("foo"); + /// + /// // Now suppose that `a` is shared among multiple threads and concurrently + /// // accessed and modified... + /// + /// // Pin the current thread. + /// let guard = &epoch::pin(); + /// + /// // Steal the object currently stored in `a` and swap it with another one. + /// let p = a.swap(Owned::new("bar").into_shared(guard), SeqCst, guard); + /// + /// if !p.is_null() { + /// // The object `p` is pointing to is now unreachable. + /// // Defer its deallocation until all currently pinned threads get unpinned. + /// unsafe { + /// guard.defer_destroy(p); + /// } + /// } + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub unsafe fn defer_destroy(&self, ptr: Shared<'_, T>) { + self.defer_unchecked(move || ptr.into_owned()); + } + + /// Clears up the thread-local cache of deferred functions by executing them or moving into the + /// global cache. + /// + /// Call this method after deferring execution of a function if you want to get it executed as + /// soon as possible. Flushing will make sure it is residing in in the global cache, so that + /// any thread has a chance of taking the function and executing it. + /// + /// If this method is called from an [`unprotected`] guard, it is a no-op (nothing happens). + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch as epoch; + /// + /// let guard = &epoch::pin(); + /// guard.defer(move || { + /// println!("This better be printed as soon as possible!"); + /// }); + /// guard.flush(); + /// ``` + pub fn flush(&self) { + if let Some(local) = unsafe { self.local.as_ref() } { + local.flush(self); + } + } + + /// Unpins and then immediately re-pins the thread. + /// + /// This method is useful when you don't want delay the advancement of the global epoch by + /// holding an old epoch. For safety, you should not maintain any guard-based reference across + /// the call (the latter is enforced by `&mut self`). The thread will only be repinned if this + /// is the only active guard for the current thread. + /// + /// If this method is called from an [`unprotected`] guard, then the call will be just no-op. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// + /// let a = Atomic::new(777); + /// let mut guard = epoch::pin(); + /// { + /// let p = a.load(SeqCst, &guard); + /// assert_eq!(unsafe { p.as_ref() }, Some(&777)); + /// } + /// guard.repin(); + /// { + /// let p = a.load(SeqCst, &guard); + /// assert_eq!(unsafe { p.as_ref() }, Some(&777)); + /// } + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn repin(&mut self) { + if let Some(local) = unsafe { self.local.as_ref() } { + local.repin(); + } + } + + /// Temporarily unpins the thread, executes the given function and then re-pins the thread. + /// + /// This method is useful when you need to perform a long-running operation (e.g. sleeping) + /// and don't need to maintain any guard-based reference across the call (the latter is enforced + /// by `&mut self`). The thread will only be unpinned if this is the only active guard for the + /// current thread. + /// + /// If this method is called from an [`unprotected`] guard, then the passed function is called + /// directly without unpinning the thread. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch::{self as epoch, Atomic}; + /// use std::sync::atomic::Ordering::SeqCst; + /// use std::thread; + /// use std::time::Duration; + /// + /// let a = Atomic::new(777); + /// let mut guard = epoch::pin(); + /// { + /// let p = a.load(SeqCst, &guard); + /// assert_eq!(unsafe { p.as_ref() }, Some(&777)); + /// } + /// guard.repin_after(|| thread::sleep(Duration::from_millis(50))); + /// { + /// let p = a.load(SeqCst, &guard); + /// assert_eq!(unsafe { p.as_ref() }, Some(&777)); + /// } + /// # unsafe { drop(a.into_owned()); } // avoid leak + /// ``` + pub fn repin_after(&mut self, f: F) -> R + where + F: FnOnce() -> R, + { + // Ensure the Guard is re-pinned even if the function panics + struct ScopeGuard(*const Local); + impl Drop for ScopeGuard { + fn drop(&mut self) { + if let Some(local) = unsafe { self.0.as_ref() } { + mem::forget(local.pin()); + local.release_handle(); + } + } + } + + if let Some(local) = unsafe { self.local.as_ref() } { + // We need to acquire a handle here to ensure the Local doesn't + // disappear from under us. + local.acquire_handle(); + local.unpin(); + } + + let _guard = ScopeGuard(self.local); + + f() + } + + /// Returns the `Collector` associated with this guard. + /// + /// This method is useful when you need to ensure that all guards used with + /// a data structure come from the same collector. + /// + /// If this method is called from an [`unprotected`] guard, then `None` is returned. + /// + /// # Examples + /// + /// ``` + /// use crossbeam_epoch as epoch; + /// + /// let guard1 = epoch::pin(); + /// let guard2 = epoch::pin(); + /// assert!(guard1.collector() == guard2.collector()); + /// ``` + pub fn collector(&self) -> Option<&Collector> { + unsafe { self.local.as_ref().map(|local| local.collector()) } + } +} + +impl Drop for Guard { + #[inline] + fn drop(&mut self) { + if let Some(local) = unsafe { self.local.as_ref() } { + local.unpin(); + } + } +} + +impl fmt::Debug for Guard { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.pad("Guard { .. }") + } +} + +/// Returns a reference to a dummy guard that allows unprotected access to [`Atomic`]s. +/// +/// This guard should be used in special occasions only. Note that it doesn't actually keep any +/// thread pinned - it's just a fake guard that allows loading from [`Atomic`]s unsafely. +/// +/// Note that calling [`defer`] with a dummy guard will not defer the function - it will just +/// execute the function immediately. +/// +/// If necessary, it's possible to create more dummy guards by cloning: `unprotected().clone()`. +/// +/// # Safety +/// +/// Loading and dereferencing data from an [`Atomic`] using this guard is safe only if the +/// [`Atomic`] is not being concurrently modified by other threads. +/// +/// # Examples +/// +/// ``` +/// use crossbeam_epoch::{self as epoch, Atomic}; +/// use std::sync::atomic::Ordering::Relaxed; +/// +/// let a = Atomic::new(7); +/// +/// unsafe { +/// // Load `a` without pinning the current thread. +/// a.load(Relaxed, epoch::unprotected()); +/// +/// // It's possible to create more dummy guards. +/// let dummy = epoch::unprotected(); +/// +/// dummy.defer(move || { +/// println!("This gets executed immediately."); +/// }); +/// +/// // Dropping `dummy` doesn't affect the current thread - it's just a noop. +/// } +/// # unsafe { drop(a.into_owned()); } // avoid leak +/// ``` +/// +/// The most common use of this function is when constructing or destructing a data structure. +/// +/// For example, we can use a dummy guard in the destructor of a Treiber stack because at that +/// point no other thread could concurrently modify the [`Atomic`]s we are accessing. +/// +/// If we were to actually pin the current thread during destruction, that would just unnecessarily +/// delay garbage collection and incur some performance cost, so in cases like these `unprotected` +/// is very helpful. +/// +/// ``` +/// use crossbeam_epoch::{self as epoch, Atomic}; +/// use std::mem::ManuallyDrop; +/// use std::sync::atomic::Ordering::Relaxed; +/// +/// struct Stack { +/// head: Atomic>, +/// } +/// +/// struct Node { +/// data: ManuallyDrop, +/// next: Atomic>, +/// } +/// +/// impl Drop for Stack { +/// fn drop(&mut self) { +/// unsafe { +/// // Unprotected load. +/// let mut node = self.head.load(Relaxed, epoch::unprotected()); +/// +/// while let Some(n) = node.as_ref() { +/// // Unprotected load. +/// let next = n.next.load(Relaxed, epoch::unprotected()); +/// +/// // Take ownership of the node, then drop its data and deallocate it. +/// let mut o = node.into_owned(); +/// ManuallyDrop::drop(&mut o.data); +/// drop(o); +/// +/// node = next; +/// } +/// } +/// } +/// } +/// ``` +/// +/// [`Atomic`]: super::Atomic +/// [`defer`]: Guard::defer +#[inline] +pub unsafe fn unprotected() -> &'static Guard { + // An unprotected guard is just a `Guard` with its field `local` set to null. + // We make a newtype over `Guard` because `Guard` isn't `Sync`, so can't be directly stored in + // a `static` + struct GuardWrapper(Guard); + unsafe impl Sync for GuardWrapper {} + static UNPROTECTED: GuardWrapper = GuardWrapper(Guard { + local: core::ptr::null(), + }); + &UNPROTECTED.0 +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/internal.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/internal.rs new file mode 100644 index 0000000000000000000000000000000000000000..b2e9e71bcb4ae9e08d6536c33bf2f2b0117b9214 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/internal.rs @@ -0,0 +1,600 @@ +//! The global data and participant for garbage collection. +//! +//! # Registration +//! +//! In order to track all participants in one place, we need some form of participant +//! registration. When a participant is created, it is registered to a global lock-free +//! singly-linked list of registries; and when a participant is leaving, it is unregistered from the +//! list. +//! +//! # Pinning +//! +//! Every participant contains an integer that tells whether the participant is pinned and if so, +//! what was the global epoch at the time it was pinned. Participants also hold a pin counter that +//! aids in periodic global epoch advancement. +//! +//! When a participant is pinned, a `Guard` is returned as a witness that the participant is pinned. +//! Guards are necessary for performing atomic operations, and for freeing/dropping locations. +//! +//! # Thread-local bag +//! +//! Objects that get unlinked from concurrent data structures must be stashed away until the global +//! epoch sufficiently advances so that they become safe for destruction. Pointers to such objects +//! are pushed into a thread-local bag, and when it becomes full, the bag is marked with the current +//! global epoch and pushed into the global queue of bags. We store objects in thread-local storages +//! for amortizing the synchronization cost of pushing the garbages to a global queue. +//! +//! # Global queue +//! +//! Whenever a bag is pushed into a queue, the objects in some bags in the queue are collected and +//! destroyed along the way. This design reduces contention on data structures. The global queue +//! cannot be explicitly accessed: the only way to interact with it is by calling functions +//! `defer()` that adds an object to the thread-local bag, or `collect()` that manually triggers +//! garbage collection. +//! +//! Ideally each instance of concurrent data structure may have its own queue that gets fully +//! destroyed as soon as the data structure gets dropped. + +use crate::primitive::cell::UnsafeCell; +use crate::primitive::sync::atomic::{self, Ordering}; +use core::cell::Cell; +use core::mem::{self, ManuallyDrop}; +use core::num::Wrapping; +use core::{fmt, ptr}; + +use crossbeam_utils::CachePadded; + +use crate::atomic::{Owned, Shared}; +use crate::collector::{Collector, LocalHandle}; +use crate::deferred::Deferred; +use crate::epoch::{AtomicEpoch, Epoch}; +use crate::guard::{unprotected, Guard}; +use crate::sync::list::{Entry, IsElement, IterError, List}; +use crate::sync::queue::Queue; + +/// Maximum number of objects a bag can contain. +#[cfg(not(any(crossbeam_sanitize, miri)))] +const MAX_OBJECTS: usize = 64; +// Makes it more likely to trigger any potential data races. +#[cfg(any(crossbeam_sanitize, miri))] +const MAX_OBJECTS: usize = 4; + +/// A bag of deferred functions. +pub(crate) struct Bag { + /// Stashed objects. + deferreds: [Deferred; MAX_OBJECTS], + len: usize, +} + +/// `Bag::try_push()` requires that it is safe for another thread to execute the given functions. +unsafe impl Send for Bag {} + +impl Bag { + /// Returns a new, empty bag. + pub(crate) fn new() -> Self { + Self::default() + } + + /// Returns `true` if the bag is empty. + pub(crate) fn is_empty(&self) -> bool { + self.len == 0 + } + + /// Attempts to insert a deferred function into the bag. + /// + /// Returns `Ok(())` if successful, and `Err(deferred)` for the given `deferred` if the bag is + /// full. + /// + /// # Safety + /// + /// It should be safe for another thread to execute the given function. + pub(crate) unsafe fn try_push(&mut self, deferred: Deferred) -> Result<(), Deferred> { + if self.len < MAX_OBJECTS { + self.deferreds[self.len] = deferred; + self.len += 1; + Ok(()) + } else { + Err(deferred) + } + } + + /// Seals the bag with the given epoch. + fn seal(self, epoch: Epoch) -> SealedBag { + SealedBag { epoch, _bag: self } + } +} + +impl Default for Bag { + fn default() -> Self { + Bag { + len: 0, + deferreds: [Deferred::NO_OP; MAX_OBJECTS], + } + } +} + +impl Drop for Bag { + fn drop(&mut self) { + // Call all deferred functions. + for deferred in &mut self.deferreds[..self.len] { + let no_op = Deferred::NO_OP; + let owned_deferred = mem::replace(deferred, no_op); + owned_deferred.call(); + } + } +} + +// can't #[derive(Debug)] because Debug is not implemented for arrays 64 items long +impl fmt::Debug for Bag { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("Bag") + .field("deferreds", &&self.deferreds[..self.len]) + .finish() + } +} + +/// A pair of an epoch and a bag. +#[derive(Default, Debug)] +struct SealedBag { + epoch: Epoch, + _bag: Bag, +} + +/// It is safe to share `SealedBag` because `is_expired` only inspects the epoch. +unsafe impl Sync for SealedBag {} + +impl SealedBag { + /// Checks if it is safe to drop the bag w.r.t. the given global epoch. + fn is_expired(&self, global_epoch: Epoch) -> bool { + // A pinned participant can witness at most one epoch advancement. Therefore, any bag that + // is within one epoch of the current one cannot be destroyed yet. + global_epoch.wrapping_sub(self.epoch) >= 2 + } +} + +/// The global data for a garbage collector. +pub(crate) struct Global { + /// The intrusive linked list of `Local`s. + locals: List, + + /// The global queue of bags of deferred functions. + queue: Queue, + + /// The global epoch. + pub(crate) epoch: CachePadded, +} + +impl Global { + /// Number of bags to destroy. + const COLLECT_STEPS: usize = 8; + + /// Creates a new global data for garbage collection. + #[inline] + pub(crate) fn new() -> Self { + Self { + locals: List::new(), + queue: Queue::new(), + epoch: CachePadded::new(AtomicEpoch::new(Epoch::starting())), + } + } + + /// Pushes the bag into the global queue and replaces the bag with a new empty bag. + pub(crate) fn push_bag(&self, bag: &mut Bag, guard: &Guard) { + let bag = mem::replace(bag, Bag::new()); + + atomic::fence(Ordering::SeqCst); + + let epoch = self.epoch.load(Ordering::Relaxed); + self.queue.push(bag.seal(epoch), guard); + } + + /// Collects several bags from the global queue and executes deferred functions in them. + /// + /// Note: This may itself produce garbage and in turn allocate new bags. + /// + /// `pin()` rarely calls `collect()`, so we want the compiler to place that call on a cold + /// path. In other words, we want the compiler to optimize branching for the case when + /// `collect()` is not called. + #[cold] + pub(crate) fn collect(&self, guard: &Guard) { + let global_epoch = self.try_advance(guard); + + let steps = if cfg!(crossbeam_sanitize) { + usize::max_value() + } else { + Self::COLLECT_STEPS + }; + + for _ in 0..steps { + match self.queue.try_pop_if( + &|sealed_bag: &SealedBag| sealed_bag.is_expired(global_epoch), + guard, + ) { + None => break, + Some(sealed_bag) => drop(sealed_bag), + } + } + } + + /// Attempts to advance the global epoch. + /// + /// The global epoch can advance only if all currently pinned participants have been pinned in + /// the current epoch. + /// + /// Returns the current global epoch. + /// + /// `try_advance()` is annotated `#[cold]` because it is rarely called. + #[cold] + pub(crate) fn try_advance(&self, guard: &Guard) -> Epoch { + let global_epoch = self.epoch.load(Ordering::Relaxed); + atomic::fence(Ordering::SeqCst); + + // TODO(stjepang): `Local`s are stored in a linked list because linked lists are fairly + // easy to implement in a lock-free manner. However, traversal can be slow due to cache + // misses and data dependencies. We should experiment with other data structures as well. + for local in self.locals.iter(guard) { + match local { + Err(IterError::Stalled) => { + // A concurrent thread stalled this iteration. That thread might also try to + // advance the epoch, in which case we leave the job to it. Otherwise, the + // epoch will not be advanced. + return global_epoch; + } + Ok(local) => { + let local_epoch = local.epoch.load(Ordering::Relaxed); + + // If the participant was pinned in a different epoch, we cannot advance the + // global epoch just yet. + if local_epoch.is_pinned() && local_epoch.unpinned() != global_epoch { + return global_epoch; + } + } + } + } + atomic::fence(Ordering::Acquire); + + // All pinned participants were pinned in the current global epoch. + // Now let's advance the global epoch... + // + // Note that if another thread already advanced it before us, this store will simply + // overwrite the global epoch with the same value. This is true because `try_advance` was + // called from a thread that was pinned in `global_epoch`, and the global epoch cannot be + // advanced two steps ahead of it. + let new_epoch = global_epoch.successor(); + self.epoch.store(new_epoch, Ordering::Release); + new_epoch + } +} + +/// Participant for garbage collection. +#[repr(C)] // Note: `entry` must be the first field +pub(crate) struct Local { + /// A node in the intrusive linked list of `Local`s. + entry: Entry, + + /// A reference to the global data. + /// + /// When all guards and handles get dropped, this reference is destroyed. + collector: UnsafeCell>, + + /// The local bag of deferred functions. + pub(crate) bag: UnsafeCell, + + /// The number of guards keeping this participant pinned. + guard_count: Cell, + + /// The number of active handles. + handle_count: Cell, + + /// Total number of pinnings performed. + /// + /// This is just an auxiliary counter that sometimes kicks off collection. + pin_count: Cell>, + + /// The local epoch. + epoch: CachePadded, +} + +// Make sure `Local` is less than or equal to 2048 bytes. +// https://github.com/crossbeam-rs/crossbeam/issues/551 +#[cfg(not(any(crossbeam_sanitize, miri)))] // `crossbeam_sanitize` and `miri` reduce the size of `Local` +#[test] +fn local_size() { + // TODO: https://github.com/crossbeam-rs/crossbeam/issues/869 + // assert!( + // core::mem::size_of::() <= 2048, + // "An allocation of `Local` should be <= 2048 bytes." + // ); +} + +impl Local { + /// Number of pinnings after which a participant will execute some deferred functions from the + /// global queue. + const PINNINGS_BETWEEN_COLLECT: usize = 128; + + /// Registers a new `Local` in the provided `Global`. + pub(crate) fn register(collector: &Collector) -> LocalHandle { + unsafe { + // Since we dereference no pointers in this block, it is safe to use `unprotected`. + + let local = Owned::new(Local { + entry: Entry::default(), + collector: UnsafeCell::new(ManuallyDrop::new(collector.clone())), + bag: UnsafeCell::new(Bag::new()), + guard_count: Cell::new(0), + handle_count: Cell::new(1), + pin_count: Cell::new(Wrapping(0)), + epoch: CachePadded::new(AtomicEpoch::new(Epoch::starting())), + }) + .into_shared(unprotected()); + collector.global.locals.insert(local, unprotected()); + LocalHandle { + local: local.as_raw(), + } + } + } + + /// Returns a reference to the `Global` in which this `Local` resides. + #[inline] + pub(crate) fn global(&self) -> &Global { + &self.collector().global + } + + /// Returns a reference to the `Collector` in which this `Local` resides. + #[inline] + pub(crate) fn collector(&self) -> &Collector { + self.collector.with(|c| unsafe { &**c }) + } + + /// Returns `true` if the current participant is pinned. + #[inline] + pub(crate) fn is_pinned(&self) -> bool { + self.guard_count.get() > 0 + } + + /// Adds `deferred` to the thread-local bag. + /// + /// # Safety + /// + /// It should be safe for another thread to execute the given function. + pub(crate) unsafe fn defer(&self, mut deferred: Deferred, guard: &Guard) { + let bag = self.bag.with_mut(|b| &mut *b); + + while let Err(d) = bag.try_push(deferred) { + self.global().push_bag(bag, guard); + deferred = d; + } + } + + pub(crate) fn flush(&self, guard: &Guard) { + let bag = self.bag.with_mut(|b| unsafe { &mut *b }); + + if !bag.is_empty() { + self.global().push_bag(bag, guard); + } + + self.global().collect(guard); + } + + /// Pins the `Local`. + #[inline] + pub(crate) fn pin(&self) -> Guard { + let guard = Guard { local: self }; + + let guard_count = self.guard_count.get(); + self.guard_count.set(guard_count.checked_add(1).unwrap()); + + if guard_count == 0 { + let global_epoch = self.global().epoch.load(Ordering::Relaxed); + let new_epoch = global_epoch.pinned(); + + // Now we must store `new_epoch` into `self.epoch` and execute a `SeqCst` fence. + // The fence makes sure that any future loads from `Atomic`s will not happen before + // this store. + if cfg!(all( + any(target_arch = "x86", target_arch = "x86_64"), + not(miri) + )) { + // HACK(stjepang): On x86 architectures there are two different ways of executing + // a `SeqCst` fence. + // + // 1. `atomic::fence(SeqCst)`, which compiles into a `mfence` instruction. + // 2. `_.compare_exchange(_, _, SeqCst, SeqCst)`, which compiles into a `lock cmpxchg` + // instruction. + // + // Both instructions have the effect of a full barrier, but benchmarks have shown + // that the second one makes pinning faster in this particular case. It is not + // clear that this is permitted by the C++ memory model (SC fences work very + // differently from SC accesses), but experimental evidence suggests that this + // works fine. Using inline assembly would be a viable (and correct) alternative, + // but alas, that is not possible on stable Rust. + let current = Epoch::starting(); + let res = self.epoch.compare_exchange( + current, + new_epoch, + Ordering::SeqCst, + Ordering::SeqCst, + ); + debug_assert!(res.is_ok(), "participant was expected to be unpinned"); + // We add a compiler fence to make it less likely for LLVM to do something wrong + // here. Formally, this is not enough to get rid of data races; practically, + // it should go a long way. + atomic::compiler_fence(Ordering::SeqCst); + } else { + self.epoch.store(new_epoch, Ordering::Relaxed); + atomic::fence(Ordering::SeqCst); + } + + // Increment the pin counter. + let count = self.pin_count.get(); + self.pin_count.set(count + Wrapping(1)); + + // After every `PINNINGS_BETWEEN_COLLECT` try advancing the epoch and collecting + // some garbage. + if count.0 % Self::PINNINGS_BETWEEN_COLLECT == 0 { + self.global().collect(&guard); + } + } + + guard + } + + /// Unpins the `Local`. + #[inline] + pub(crate) fn unpin(&self) { + let guard_count = self.guard_count.get(); + self.guard_count.set(guard_count - 1); + + if guard_count == 1 { + self.epoch.store(Epoch::starting(), Ordering::Release); + + if self.handle_count.get() == 0 { + self.finalize(); + } + } + } + + /// Unpins and then pins the `Local`. + #[inline] + pub(crate) fn repin(&self) { + let guard_count = self.guard_count.get(); + + // Update the local epoch only if there's only one guard. + if guard_count == 1 { + let epoch = self.epoch.load(Ordering::Relaxed); + let global_epoch = self.global().epoch.load(Ordering::Relaxed).pinned(); + + // Update the local epoch only if the global epoch is greater than the local epoch. + if epoch != global_epoch { + // We store the new epoch with `Release` because we need to ensure any memory + // accesses from the previous epoch do not leak into the new one. + self.epoch.store(global_epoch, Ordering::Release); + + // However, we don't need a following `SeqCst` fence, because it is safe for memory + // accesses from the new epoch to be executed before updating the local epoch. At + // worse, other threads will see the new epoch late and delay GC slightly. + } + } + } + + /// Increments the handle count. + #[inline] + pub(crate) fn acquire_handle(&self) { + let handle_count = self.handle_count.get(); + debug_assert!(handle_count >= 1); + self.handle_count.set(handle_count + 1); + } + + /// Decrements the handle count. + #[inline] + pub(crate) fn release_handle(&self) { + let guard_count = self.guard_count.get(); + let handle_count = self.handle_count.get(); + debug_assert!(handle_count >= 1); + self.handle_count.set(handle_count - 1); + + if guard_count == 0 && handle_count == 1 { + self.finalize(); + } + } + + /// Removes the `Local` from the global linked list. + #[cold] + fn finalize(&self) { + debug_assert_eq!(self.guard_count.get(), 0); + debug_assert_eq!(self.handle_count.get(), 0); + + // Temporarily increment handle count. This is required so that the following call to `pin` + // doesn't call `finalize` again. + self.handle_count.set(1); + unsafe { + // Pin and move the local bag into the global queue. It's important that `push_bag` + // doesn't defer destruction on any new garbage. + let guard = &self.pin(); + self.global() + .push_bag(self.bag.with_mut(|b| &mut *b), guard); + } + // Revert the handle count back to zero. + self.handle_count.set(0); + + unsafe { + // Take the reference to the `Global` out of this `Local`. Since we're not protected + // by a guard at this time, it's crucial that the reference is read before marking the + // `Local` as deleted. + let collector: Collector = ptr::read(self.collector.with(|c| &*(*c))); + + // Mark this node in the linked list as deleted. + self.entry.delete(unprotected()); + + // Finally, drop the reference to the global. Note that this might be the last reference + // to the `Global`. If so, the global data will be destroyed and all deferred functions + // in its queue will be executed. + drop(collector); + } + } +} + +impl IsElement for Local { + fn entry_of(local: &Self) -> &Entry { + // SAFETY: `Local` is `repr(C)` and `entry` is the first field of it. + unsafe { + let entry_ptr = (local as *const Self).cast::(); + &*entry_ptr + } + } + + unsafe fn element_of(entry: &Entry) -> &Self { + // SAFETY: `Local` is `repr(C)` and `entry` is the first field of it. + let local_ptr = (entry as *const Entry).cast::(); + &*local_ptr + } + + unsafe fn finalize(entry: &Entry, guard: &Guard) { + guard.defer_destroy(Shared::from(Self::element_of(entry) as *const _)); + } +} + +#[cfg(all(test, not(crossbeam_loom)))] +mod tests { + use std::sync::atomic::{AtomicUsize, Ordering}; + + use super::*; + + #[test] + fn check_defer() { + static FLAG: AtomicUsize = AtomicUsize::new(0); + fn set() { + FLAG.store(42, Ordering::Relaxed); + } + + let d = Deferred::new(set); + assert_eq!(FLAG.load(Ordering::Relaxed), 0); + d.call(); + assert_eq!(FLAG.load(Ordering::Relaxed), 42); + } + + #[test] + fn check_bag() { + static FLAG: AtomicUsize = AtomicUsize::new(0); + fn incr() { + FLAG.fetch_add(1, Ordering::Relaxed); + } + + let mut bag = Bag::new(); + assert!(bag.is_empty()); + + for _ in 0..MAX_OBJECTS { + assert!(unsafe { bag.try_push(Deferred::new(incr)).is_ok() }); + assert!(!bag.is_empty()); + assert_eq!(FLAG.load(Ordering::Relaxed), 0); + } + + let result = unsafe { bag.try_push(Deferred::new(incr)) }; + assert!(result.is_err()); + assert!(!bag.is_empty()); + assert_eq!(FLAG.load(Ordering::Relaxed), 0); + + drop(bag); + assert_eq!(FLAG.load(Ordering::Relaxed), MAX_OBJECTS); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/lib.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..fd4d74bedb80283974b1f5c1c60a06e5a3e2d1a4 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/lib.rs @@ -0,0 +1,166 @@ +//! Epoch-based memory reclamation. +//! +//! An interesting problem concurrent collections deal with comes from the remove operation. +//! Suppose that a thread removes an element from a lock-free map, while another thread is reading +//! that same element at the same time. The first thread must wait until the second thread stops +//! reading the element. Only then it is safe to destruct it. +//! +//! Programming languages that come with garbage collectors solve this problem trivially. The +//! garbage collector will destruct the removed element when no thread can hold a reference to it +//! anymore. +//! +//! This crate implements a basic memory reclamation mechanism, which is based on epochs. When an +//! element gets removed from a concurrent collection, it is inserted into a pile of garbage and +//! marked with the current epoch. Every time a thread accesses a collection, it checks the current +//! epoch, attempts to increment it, and destructs some garbage that became so old that no thread +//! can be referencing it anymore. +//! +//! That is the general mechanism behind epoch-based memory reclamation, but the details are a bit +//! more complicated. Anyhow, memory reclamation is designed to be fully automatic and something +//! users of concurrent collections don't have to worry much about. +//! +//! # Pointers +//! +//! Concurrent collections are built using atomic pointers. This module provides [`Atomic`], which +//! is just a shared atomic pointer to a heap-allocated object. Loading an [`Atomic`] yields a +//! [`Shared`], which is an epoch-protected pointer through which the loaded object can be safely +//! read. +//! +//! # Pinning +//! +//! Before an [`Atomic`] can be loaded, a participant must be [`pin`]ned. By pinning a participant +//! we declare that any object that gets removed from now on must not be destructed just +//! yet. Garbage collection of newly removed objects is suspended until the participant gets +//! unpinned. +//! +//! # Garbage +//! +//! Objects that get removed from concurrent collections must be stashed away until all currently +//! pinned participants get unpinned. Such objects can be stored into a thread-local or global +//! storage, where they are kept until the right time for their destruction comes. +//! +//! There is a global shared instance of garbage queue. You can [`defer`](Guard::defer) the execution of an +//! arbitrary function until the global epoch is advanced enough. Most notably, concurrent data +//! structures may defer the deallocation of an object. +//! +//! # APIs +//! +//! For majority of use cases, just use the default garbage collector by invoking [`pin`]. If you +//! want to create your own garbage collector, use the [`Collector`] API. + +#![doc(test( + no_crate_inject, + attr( + deny(warnings, rust_2018_idioms), + allow(dead_code, unused_assignments, unused_variables) + ) +))] +#![warn( + missing_docs, + missing_debug_implementations, + rust_2018_idioms, + unreachable_pub +)] +#![cfg_attr(not(feature = "std"), no_std)] + +#[cfg(crossbeam_loom)] +extern crate loom_crate as loom; + +#[cfg(crossbeam_loom)] +#[allow(unused_imports, dead_code)] +mod primitive { + pub(crate) mod cell { + pub(crate) use loom::cell::UnsafeCell; + } + pub(crate) mod sync { + pub(crate) mod atomic { + pub(crate) use loom::sync::atomic::{fence, AtomicPtr, AtomicUsize, Ordering}; + + // FIXME: loom does not support compiler_fence at the moment. + // https://github.com/tokio-rs/loom/issues/117 + // we use fence as a stand-in for compiler_fence for the time being. + // this may miss some races since fence is stronger than compiler_fence, + // but it's the best we can do for the time being. + pub(crate) use self::fence as compiler_fence; + } + pub(crate) use loom::sync::Arc; + } + pub(crate) use loom::thread_local; +} +#[cfg(target_has_atomic = "ptr")] +#[cfg(not(crossbeam_loom))] +#[allow(unused_imports, dead_code)] +mod primitive { + pub(crate) mod cell { + #[derive(Debug)] + #[repr(transparent)] + pub(crate) struct UnsafeCell(::core::cell::UnsafeCell); + + // loom's UnsafeCell has a slightly different API than the standard library UnsafeCell. + // Since we want the rest of the code to be agnostic to whether it's running under loom or + // not, we write this small wrapper that provides the loom-supported API for the standard + // library UnsafeCell. This is also what the loom documentation recommends: + // https://github.com/tokio-rs/loom#handling-loom-api-differences + impl UnsafeCell { + #[inline] + pub(crate) const fn new(data: T) -> UnsafeCell { + UnsafeCell(::core::cell::UnsafeCell::new(data)) + } + + #[inline] + pub(crate) fn with(&self, f: impl FnOnce(*const T) -> R) -> R { + f(self.0.get()) + } + + #[inline] + pub(crate) fn with_mut(&self, f: impl FnOnce(*mut T) -> R) -> R { + f(self.0.get()) + } + } + } + pub(crate) mod sync { + pub(crate) mod atomic { + pub(crate) use core::sync::atomic::{ + compiler_fence, fence, AtomicPtr, AtomicUsize, Ordering, + }; + } + #[cfg(feature = "alloc")] + pub(crate) use alloc::sync::Arc; + } + + #[cfg(feature = "std")] + pub(crate) use std::thread_local; +} + +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +extern crate alloc; + +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +mod atomic; +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +mod collector; +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +mod deferred; +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +mod epoch; +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +mod guard; +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +mod internal; +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +mod sync; + +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +#[allow(deprecated)] +pub use crate::atomic::{CompareAndSetError, CompareAndSetOrdering}; +#[cfg(all(feature = "alloc", target_has_atomic = "ptr"))] +pub use crate::{ + atomic::{Atomic, CompareExchangeError, Owned, Pointable, Pointer, Shared}, + collector::{Collector, LocalHandle}, + guard::{unprotected, Guard}, +}; + +#[cfg(feature = "std")] +mod default; +#[cfg(feature = "std")] +pub use crate::default::{default_collector, is_pinned, pin}; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/list.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/list.rs new file mode 100644 index 0000000000000000000000000000000000000000..52ffd6fca458257debe2b2e7e1ec4604c41dc033 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/list.rs @@ -0,0 +1,487 @@ +//! Lock-free intrusive linked list. +//! +//! Ideas from Michael. High Performance Dynamic Lock-Free Hash Tables and List-Based Sets. SPAA +//! 2002. + +use core::marker::PhantomData; +use core::sync::atomic::Ordering::{Acquire, Relaxed, Release}; + +use crate::{unprotected, Atomic, Guard, Shared}; + +/// An entry in a linked list. +/// +/// An Entry is accessed from multiple threads, so it would be beneficial to put it in a different +/// cache-line than thread-local data in terms of performance. +#[derive(Debug)] +pub(crate) struct Entry { + /// The next entry in the linked list. + /// If the tag is 1, this entry is marked as deleted. + next: Atomic, +} + +/// Implementing this trait asserts that the type `T` can be used as an element in the intrusive +/// linked list defined in this module. `T` has to contain (or otherwise be linked to) an instance +/// of `Entry`. +/// +/// # Example +/// +/// ```ignore +/// struct A { +/// entry: Entry, +/// data: usize, +/// } +/// +/// impl IsElement for A { +/// fn entry_of(a: &A) -> &Entry { +/// let entry_ptr = ((a as usize) + offset_of!(A, entry)) as *const Entry; +/// unsafe { &*entry_ptr } +/// } +/// +/// unsafe fn element_of(entry: &Entry) -> &T { +/// let elem_ptr = ((entry as usize) - offset_of!(A, entry)) as *const T; +/// &*elem_ptr +/// } +/// +/// unsafe fn finalize(entry: &Entry, guard: &Guard) { +/// guard.defer_destroy(Shared::from(Self::element_of(entry) as *const _)); +/// } +/// } +/// ``` +/// +/// This trait is implemented on a type separate from `T` (although it can be just `T`), because +/// one type might be placeable into multiple lists, in which case it would require multiple +/// implementations of `IsElement`. In such cases, each struct implementing `IsElement` +/// represents a distinct `Entry` in `T`. +/// +/// For example, we can insert the following struct into two lists using `entry1` for one +/// and `entry2` for the other: +/// +/// ```ignore +/// struct B { +/// entry1: Entry, +/// entry2: Entry, +/// data: usize, +/// } +/// ``` +/// +pub(crate) trait IsElement { + /// Returns a reference to this element's `Entry`. + fn entry_of(_: &T) -> &Entry; + + /// Given a reference to an element's entry, returns that element. + /// + /// ```ignore + /// let elem = ListElement::new(); + /// assert_eq!(elem.entry_of(), + /// unsafe { ListElement::element_of(elem.entry_of()) } ); + /// ``` + /// + /// # Safety + /// + /// The caller has to guarantee that the `Entry` is called with was retrieved from an instance + /// of the element type (`T`). + unsafe fn element_of(_: &Entry) -> &T; + + /// The function that is called when an entry is unlinked from list. + /// + /// # Safety + /// + /// The caller has to guarantee that the `Entry` is called with was retrieved from an instance + /// of the element type (`T`). + unsafe fn finalize(_: &Entry, _: &Guard); +} + +/// A lock-free, intrusive linked list of type `T`. +#[derive(Debug)] +pub(crate) struct List = T> { + /// The head of the linked list. + head: Atomic, + + /// The phantom data for using `T` and `C`. + _marker: PhantomData<(T, C)>, +} + +/// An iterator used for retrieving values from the list. +pub(crate) struct Iter<'g, T, C: IsElement> { + /// The guard that protects the iteration. + guard: &'g Guard, + + /// Pointer from the predecessor to the current entry. + pred: &'g Atomic, + + /// The current entry. + curr: Shared<'g, Entry>, + + /// The list head, needed for restarting iteration. + head: &'g Atomic, + + /// Logically, we store a borrow of an instance of `T` and + /// use the type information from `C`. + _marker: PhantomData<(&'g T, C)>, +} + +/// An error that occurs during iteration over the list. +#[derive(PartialEq, Debug)] +pub(crate) enum IterError { + /// A concurrent thread modified the state of the list at the same place that this iterator + /// was inspecting. Subsequent iteration will restart from the beginning of the list. + Stalled, +} + +impl Default for Entry { + /// Returns the empty entry. + fn default() -> Self { + Self { + next: Atomic::null(), + } + } +} + +impl Entry { + /// Marks this entry as deleted, deferring the actual deallocation to a later iteration. + /// + /// # Safety + /// + /// The entry should be a member of a linked list, and it should not have been deleted. + /// It should be safe to call `C::finalize` on the entry after the `guard` is dropped, where `C` + /// is the associated helper for the linked list. + pub(crate) unsafe fn delete(&self, guard: &Guard) { + self.next.fetch_or(1, Release, guard); + } +} + +impl> List { + /// Returns a new, empty linked list. + pub(crate) fn new() -> Self { + Self { + head: Atomic::null(), + _marker: PhantomData, + } + } + + /// Inserts `entry` into the head of the list. + /// + /// # Safety + /// + /// You should guarantee that: + /// + /// - `container` is not null + /// - `container` is immovable, e.g. inside an `Owned` + /// - the same `Entry` is not inserted more than once + /// - the inserted object will be removed before the list is dropped + pub(crate) unsafe fn insert<'g>(&'g self, container: Shared<'g, T>, guard: &'g Guard) { + // Insert right after head, i.e. at the beginning of the list. + let to = &self.head; + // Get the intrusively stored Entry of the new element to insert. + let entry: &Entry = C::entry_of(container.deref()); + // Make a Shared ptr to that Entry. + let entry_ptr = Shared::from(entry as *const _); + // Read the current successor of where we want to insert. + let mut next = to.load(Relaxed, guard); + + loop { + // Set the Entry of the to-be-inserted element to point to the previous successor of + // `to`. + entry.next.store(next, Relaxed); + match to.compare_exchange_weak(next, entry_ptr, Release, Relaxed, guard) { + Ok(_) => break, + // We lost the race or weak CAS failed spuriously. Update the successor and try + // again. + Err(err) => next = err.current, + } + } + } + + /// Returns an iterator over all objects. + /// + /// # Caveat + /// + /// Every object that is inserted at the moment this function is called and persists at least + /// until the end of iteration will be returned. Since this iterator traverses a lock-free + /// linked list that may be concurrently modified, some additional caveats apply: + /// + /// 1. If a new object is inserted during iteration, it may or may not be returned. + /// 2. If an object is deleted during iteration, it may or may not be returned. + /// 3. The iteration may be aborted when it lost in a race condition. In this case, the winning + /// thread will continue to iterate over the same list. + pub(crate) fn iter<'g>(&'g self, guard: &'g Guard) -> Iter<'g, T, C> { + Iter { + guard, + pred: &self.head, + curr: self.head.load(Acquire, guard), + head: &self.head, + _marker: PhantomData, + } + } +} + +impl> Drop for List { + fn drop(&mut self) { + unsafe { + let guard = unprotected(); + let mut curr = self.head.load(Relaxed, guard); + while let Some(c) = curr.as_ref() { + let succ = c.next.load(Relaxed, guard); + // Verify that all elements have been removed from the list. + assert_eq!(succ.tag(), 1); + + C::finalize(curr.deref(), guard); + curr = succ; + } + } + } +} + +impl<'g, T: 'g, C: IsElement> Iterator for Iter<'g, T, C> { + type Item = Result<&'g T, IterError>; + + fn next(&mut self) -> Option { + while let Some(c) = unsafe { self.curr.as_ref() } { + let succ = c.next.load(Acquire, self.guard); + + if succ.tag() == 1 { + // This entry was removed. Try unlinking it from the list. + let succ = succ.with_tag(0); + + // The tag should always be zero, because removing a node after a logically deleted + // node leaves the list in an invalid state. + debug_assert!(self.curr.tag() == 0); + + // Try to unlink `curr` from the list, and get the new value of `self.pred`. + let succ = match self + .pred + .compare_exchange(self.curr, succ, Acquire, Acquire, self.guard) + { + Ok(_) => { + // We succeeded in unlinking `curr`, so we have to schedule + // deallocation. Deferred drop is okay, because `list.delete()` can only be + // called if `T: 'static`. + unsafe { + C::finalize(self.curr.deref(), self.guard); + } + + // `succ` is the new value of `self.pred`. + succ + } + Err(e) => { + // `e.current` is the current value of `self.pred`. + e.current + } + }; + + // If the predecessor node is already marked as deleted, we need to restart from + // `head`. + if succ.tag() != 0 { + self.pred = self.head; + self.curr = self.head.load(Acquire, self.guard); + + return Some(Err(IterError::Stalled)); + } + + // Move over the removed by only advancing `curr`, not `pred`. + self.curr = succ; + continue; + } + + // Move one step forward. + self.pred = &c.next; + self.curr = succ; + + return Some(Ok(unsafe { C::element_of(c) })); + } + + // We reached the end of the list. + None + } +} + +#[cfg(all(test, not(crossbeam_loom)))] +mod tests { + use super::*; + use crate::{Collector, Owned}; + use crossbeam_utils::thread; + use std::sync::Barrier; + + impl IsElement for Entry { + fn entry_of(entry: &Entry) -> &Entry { + entry + } + + unsafe fn element_of(entry: &Entry) -> &Entry { + entry + } + + unsafe fn finalize(entry: &Entry, guard: &Guard) { + guard.defer_destroy(Shared::from(Self::element_of(entry) as *const _)); + } + } + + /// Checks whether the list retains inserted elements + /// and returns them in the correct order. + #[test] + fn insert() { + let collector = Collector::new(); + let handle = collector.register(); + let guard = handle.pin(); + + let l: List = List::new(); + + let e1 = Owned::new(Entry::default()).into_shared(&guard); + let e2 = Owned::new(Entry::default()).into_shared(&guard); + let e3 = Owned::new(Entry::default()).into_shared(&guard); + + unsafe { + l.insert(e1, &guard); + l.insert(e2, &guard); + l.insert(e3, &guard); + } + + let mut iter = l.iter(&guard); + let maybe_e3 = iter.next(); + assert!(maybe_e3.is_some()); + assert!(maybe_e3.unwrap().unwrap() as *const Entry == e3.as_raw()); + let maybe_e2 = iter.next(); + assert!(maybe_e2.is_some()); + assert!(maybe_e2.unwrap().unwrap() as *const Entry == e2.as_raw()); + let maybe_e1 = iter.next(); + assert!(maybe_e1.is_some()); + assert!(maybe_e1.unwrap().unwrap() as *const Entry == e1.as_raw()); + assert!(iter.next().is_none()); + + unsafe { + e1.as_ref().unwrap().delete(&guard); + e2.as_ref().unwrap().delete(&guard); + e3.as_ref().unwrap().delete(&guard); + } + } + + /// Checks whether elements can be removed from the list and whether + /// the correct elements are removed. + #[test] + fn delete() { + let collector = Collector::new(); + let handle = collector.register(); + let guard = handle.pin(); + + let l: List = List::new(); + + let e1 = Owned::new(Entry::default()).into_shared(&guard); + let e2 = Owned::new(Entry::default()).into_shared(&guard); + let e3 = Owned::new(Entry::default()).into_shared(&guard); + unsafe { + l.insert(e1, &guard); + l.insert(e2, &guard); + l.insert(e3, &guard); + e2.as_ref().unwrap().delete(&guard); + } + + let mut iter = l.iter(&guard); + let maybe_e3 = iter.next(); + assert!(maybe_e3.is_some()); + assert!(maybe_e3.unwrap().unwrap() as *const Entry == e3.as_raw()); + let maybe_e1 = iter.next(); + assert!(maybe_e1.is_some()); + assert!(maybe_e1.unwrap().unwrap() as *const Entry == e1.as_raw()); + assert!(iter.next().is_none()); + + unsafe { + e1.as_ref().unwrap().delete(&guard); + e3.as_ref().unwrap().delete(&guard); + } + + let mut iter = l.iter(&guard); + assert!(iter.next().is_none()); + } + + const THREADS: usize = 8; + const ITERS: usize = 512; + + /// Contends the list on insert and delete operations to make sure they can run concurrently. + #[test] + fn insert_delete_multi() { + let collector = Collector::new(); + + let l: List = List::new(); + let b = Barrier::new(THREADS); + + thread::scope(|s| { + for _ in 0..THREADS { + s.spawn(|_| { + b.wait(); + + let handle = collector.register(); + let guard: Guard = handle.pin(); + let mut v = Vec::with_capacity(ITERS); + + for _ in 0..ITERS { + let e = Owned::new(Entry::default()).into_shared(&guard); + v.push(e); + unsafe { + l.insert(e, &guard); + } + } + + for e in v { + unsafe { + e.as_ref().unwrap().delete(&guard); + } + } + }); + } + }) + .unwrap(); + + let handle = collector.register(); + let guard = handle.pin(); + + let mut iter = l.iter(&guard); + assert!(iter.next().is_none()); + } + + /// Contends the list on iteration to make sure that it can be iterated over concurrently. + #[test] + fn iter_multi() { + let collector = Collector::new(); + + let l: List = List::new(); + let b = Barrier::new(THREADS); + + thread::scope(|s| { + for _ in 0..THREADS { + s.spawn(|_| { + b.wait(); + + let handle = collector.register(); + let guard: Guard = handle.pin(); + let mut v = Vec::with_capacity(ITERS); + + for _ in 0..ITERS { + let e = Owned::new(Entry::default()).into_shared(&guard); + v.push(e); + unsafe { + l.insert(e, &guard); + } + } + + let mut iter = l.iter(&guard); + for _ in 0..ITERS { + assert!(iter.next().is_some()); + } + + for e in v { + unsafe { + e.as_ref().unwrap().delete(&guard); + } + } + }); + } + }) + .unwrap(); + + let handle = collector.register(); + let guard = handle.pin(); + + let mut iter = l.iter(&guard); + assert!(iter.next().is_none()); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..08981be25759522367c48ce5cddeefefbf9370a2 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/mod.rs @@ -0,0 +1,7 @@ +//! Synchronization primitives. + +pub(crate) mod list; +#[cfg(feature = "std")] +#[cfg(not(crossbeam_loom))] +pub(crate) mod once_lock; +pub(crate) mod queue; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/once_lock.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/once_lock.rs new file mode 100644 index 0000000000000000000000000000000000000000..e057aca7d5d26c2e29d84797bc95945fc9bd7b3b --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/once_lock.rs @@ -0,0 +1,88 @@ +// Based on unstable std::sync::OnceLock. +// +// Source: https://github.com/rust-lang/rust/blob/8e9c93df464b7ada3fc7a1c8ccddd9dcb24ee0a0/library/std/src/sync/once_lock.rs + +use core::cell::UnsafeCell; +use core::mem::MaybeUninit; +use std::sync::Once; + +pub(crate) struct OnceLock { + once: Once, + value: UnsafeCell>, + // Unlike std::sync::OnceLock, we don't need PhantomData here because + // we don't use #[may_dangle]. +} + +unsafe impl Sync for OnceLock {} +unsafe impl Send for OnceLock {} + +impl OnceLock { + /// Creates a new empty cell. + #[must_use] + pub(crate) const fn new() -> Self { + Self { + once: Once::new(), + value: UnsafeCell::new(MaybeUninit::uninit()), + } + } + + /// Gets the contents of the cell, initializing it with `f` if the cell + /// was empty. + /// + /// Many threads may call `get_or_init` concurrently with different + /// initializing functions, but it is guaranteed that only one function + /// will be executed. + /// + /// # Panics + /// + /// If `f` panics, the panic is propagated to the caller, and the cell + /// remains uninitialized. + /// + /// It is an error to reentrantly initialize the cell from `f`. The + /// exact outcome is unspecified. Current implementation deadlocks, but + /// this may be changed to a panic in the future. + pub(crate) fn get_or_init(&self, f: F) -> &T + where + F: FnOnce() -> T, + { + // Fast path check + if self.once.is_completed() { + // SAFETY: The inner value has been initialized + return unsafe { self.get_unchecked() }; + } + self.initialize(f); + + // SAFETY: The inner value has been initialized + unsafe { self.get_unchecked() } + } + + #[cold] + fn initialize(&self, f: F) + where + F: FnOnce() -> T, + { + let slot = self.value.get(); + + self.once.call_once(|| { + let value = f(); + unsafe { slot.write(MaybeUninit::new(value)) } + }); + } + + /// # Safety + /// + /// The value must be initialized + unsafe fn get_unchecked(&self) -> &T { + debug_assert!(self.once.is_completed()); + &*self.value.get().cast::() + } +} + +impl Drop for OnceLock { + fn drop(&mut self) { + if self.once.is_completed() { + // SAFETY: The inner value has been initialized + unsafe { (*self.value.get()).assume_init_drop() }; + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/queue.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/queue.rs new file mode 100644 index 0000000000000000000000000000000000000000..76c326beb311f2b90ab623e44823ca19c96b56b4 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/src/sync/queue.rs @@ -0,0 +1,468 @@ +//! Michael-Scott lock-free queue. +//! +//! Usable with any number of producers and consumers. +//! +//! Michael and Scott. Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue +//! Algorithms. PODC 1996. +//! +//! Simon Doherty, Lindsay Groves, Victor Luchangco, and Mark Moir. 2004b. Formal Verification of a +//! Practical Lock-Free Queue Algorithm. + +use core::mem::MaybeUninit; +use core::sync::atomic::Ordering::{Acquire, Relaxed, Release}; + +use crossbeam_utils::CachePadded; + +use crate::{unprotected, Atomic, Guard, Owned, Shared}; + +// The representation here is a singly-linked list, with a sentinel node at the front. In general +// the `tail` pointer may lag behind the actual tail. Non-sentinel nodes are either all `Data` or +// all `Blocked` (requests for data from blocked threads). +#[derive(Debug)] +pub(crate) struct Queue { + head: CachePadded>>, + tail: CachePadded>>, +} + +struct Node { + /// The slot in which a value of type `T` can be stored. + /// + /// The type of `data` is `MaybeUninit` because a `Node` doesn't always contain a `T`. + /// For example, the sentinel node in a queue never contains a value: its slot is always empty. + /// Other nodes start their life with a push operation and contain a value until it gets popped + /// out. After that such empty nodes get added to the collector for destruction. + data: MaybeUninit, + + next: Atomic>, +} + +// Any particular `T` should never be accessed concurrently, so no need for `Sync`. +unsafe impl Sync for Queue {} +unsafe impl Send for Queue {} + +impl Queue { + /// Create a new, empty queue. + pub(crate) fn new() -> Queue { + let q = Queue { + head: CachePadded::new(Atomic::null()), + tail: CachePadded::new(Atomic::null()), + }; + let sentinel = Owned::new(Node { + data: MaybeUninit::uninit(), + next: Atomic::null(), + }); + unsafe { + let guard = unprotected(); + let sentinel = sentinel.into_shared(guard); + q.head.store(sentinel, Relaxed); + q.tail.store(sentinel, Relaxed); + q + } + } + + /// Attempts to atomically place `n` into the `next` pointer of `onto`, and returns `true` on + /// success. The queue's `tail` pointer may be updated. + #[inline(always)] + fn push_internal( + &self, + onto: Shared<'_, Node>, + new: Shared<'_, Node>, + guard: &Guard, + ) -> bool { + // is `onto` the actual tail? + let o = unsafe { onto.deref() }; + let next = o.next.load(Acquire, guard); + if unsafe { next.as_ref().is_some() } { + // if not, try to "help" by moving the tail pointer forward + let _ = self + .tail + .compare_exchange(onto, next, Release, Relaxed, guard); + false + } else { + // looks like the actual tail; attempt to link in `n` + let result = o + .next + .compare_exchange(Shared::null(), new, Release, Relaxed, guard) + .is_ok(); + if result { + // try to move the tail pointer forward + let _ = self + .tail + .compare_exchange(onto, new, Release, Relaxed, guard); + } + result + } + } + + /// Adds `t` to the back of the queue, possibly waking up threads blocked on `pop`. + pub(crate) fn push(&self, t: T, guard: &Guard) { + let new = Owned::new(Node { + data: MaybeUninit::new(t), + next: Atomic::null(), + }); + let new = Owned::into_shared(new, guard); + + loop { + // We push onto the tail, so we'll start optimistically by looking there first. + let tail = self.tail.load(Acquire, guard); + + // Attempt to push onto the `tail` snapshot; fails if `tail.next` has changed. + if self.push_internal(tail, new, guard) { + break; + } + } + } + + /// Attempts to pop a data node. `Ok(None)` if queue is empty; `Err(())` if lost race to pop. + #[inline(always)] + fn pop_internal(&self, guard: &Guard) -> Result, ()> { + let head = self.head.load(Acquire, guard); + let h = unsafe { head.deref() }; + let next = h.next.load(Acquire, guard); + match unsafe { next.as_ref() } { + Some(n) => unsafe { + self.head + .compare_exchange(head, next, Release, Relaxed, guard) + .map(|_| { + let tail = self.tail.load(Relaxed, guard); + // Advance the tail so that we don't retire a pointer to a reachable node. + if head == tail { + let _ = self + .tail + .compare_exchange(tail, next, Release, Relaxed, guard); + } + guard.defer_destroy(head); + Some(n.data.assume_init_read()) + }) + .map_err(|_| ()) + }, + None => Ok(None), + } + } + + /// Attempts to pop a data node, if the data satisfies the given condition. `Ok(None)` if queue + /// is empty or the data does not satisfy the condition; `Err(())` if lost race to pop. + #[inline(always)] + fn pop_if_internal(&self, condition: F, guard: &Guard) -> Result, ()> + where + T: Sync, + F: Fn(&T) -> bool, + { + let head = self.head.load(Acquire, guard); + let h = unsafe { head.deref() }; + let next = h.next.load(Acquire, guard); + match unsafe { next.as_ref() } { + Some(n) if condition(unsafe { &*n.data.as_ptr() }) => unsafe { + self.head + .compare_exchange(head, next, Release, Relaxed, guard) + .map(|_| { + let tail = self.tail.load(Relaxed, guard); + // Advance the tail so that we don't retire a pointer to a reachable node. + if head == tail { + let _ = self + .tail + .compare_exchange(tail, next, Release, Relaxed, guard); + } + guard.defer_destroy(head); + Some(n.data.assume_init_read()) + }) + .map_err(|_| ()) + }, + None | Some(_) => Ok(None), + } + } + + /// Attempts to dequeue from the front. + /// + /// Returns `None` if the queue is observed to be empty. + pub(crate) fn try_pop(&self, guard: &Guard) -> Option { + loop { + if let Ok(head) = self.pop_internal(guard) { + return head; + } + } + } + + /// Attempts to dequeue from the front, if the item satisfies the given condition. + /// + /// Returns `None` if the queue is observed to be empty, or the head does not satisfy the given + /// condition. + pub(crate) fn try_pop_if(&self, condition: F, guard: &Guard) -> Option + where + T: Sync, + F: Fn(&T) -> bool, + { + loop { + if let Ok(head) = self.pop_if_internal(&condition, guard) { + return head; + } + } + } +} + +impl Drop for Queue { + fn drop(&mut self) { + unsafe { + let guard = unprotected(); + + while self.try_pop(guard).is_some() {} + + // Destroy the remaining sentinel node. + let sentinel = self.head.load(Relaxed, guard); + drop(sentinel.into_owned()); + } + } +} + +#[cfg(all(test, not(crossbeam_loom)))] +mod test { + use super::*; + use crate::pin; + use crossbeam_utils::thread; + + struct Queue { + queue: super::Queue, + } + + impl Queue { + pub(crate) fn new() -> Queue { + Queue { + queue: super::Queue::new(), + } + } + + pub(crate) fn push(&self, t: T) { + let guard = &pin(); + self.queue.push(t, guard); + } + + pub(crate) fn is_empty(&self) -> bool { + let guard = &pin(); + let head = self.queue.head.load(Acquire, guard); + let h = unsafe { head.deref() }; + h.next.load(Acquire, guard).is_null() + } + + pub(crate) fn try_pop(&self) -> Option { + let guard = &pin(); + self.queue.try_pop(guard) + } + + pub(crate) fn pop(&self) -> T { + loop { + match self.try_pop() { + None => continue, + Some(t) => return t, + } + } + } + } + + #[cfg(miri)] + const CONC_COUNT: i64 = 1000; + #[cfg(not(miri))] + const CONC_COUNT: i64 = 1000000; + + #[test] + fn push_try_pop_1() { + let q: Queue = Queue::new(); + assert!(q.is_empty()); + q.push(37); + assert!(!q.is_empty()); + assert_eq!(q.try_pop(), Some(37)); + assert!(q.is_empty()); + } + + #[test] + fn push_try_pop_2() { + let q: Queue = Queue::new(); + assert!(q.is_empty()); + q.push(37); + q.push(48); + assert_eq!(q.try_pop(), Some(37)); + assert!(!q.is_empty()); + assert_eq!(q.try_pop(), Some(48)); + assert!(q.is_empty()); + } + + #[test] + fn push_try_pop_many_seq() { + let q: Queue = Queue::new(); + assert!(q.is_empty()); + for i in 0..200 { + q.push(i) + } + assert!(!q.is_empty()); + for i in 0..200 { + assert_eq!(q.try_pop(), Some(i)); + } + assert!(q.is_empty()); + } + + #[test] + fn push_pop_1() { + let q: Queue = Queue::new(); + assert!(q.is_empty()); + q.push(37); + assert!(!q.is_empty()); + assert_eq!(q.pop(), 37); + assert!(q.is_empty()); + } + + #[test] + fn push_pop_2() { + let q: Queue = Queue::new(); + q.push(37); + q.push(48); + assert_eq!(q.pop(), 37); + assert_eq!(q.pop(), 48); + } + + #[test] + fn push_pop_many_seq() { + let q: Queue = Queue::new(); + assert!(q.is_empty()); + for i in 0..200 { + q.push(i) + } + assert!(!q.is_empty()); + for i in 0..200 { + assert_eq!(q.pop(), i); + } + assert!(q.is_empty()); + } + + #[test] + fn push_try_pop_many_spsc() { + let q: Queue = Queue::new(); + assert!(q.is_empty()); + + thread::scope(|scope| { + scope.spawn(|_| { + let mut next = 0; + + while next < CONC_COUNT { + if let Some(elem) = q.try_pop() { + assert_eq!(elem, next); + next += 1; + } + } + }); + + for i in 0..CONC_COUNT { + q.push(i) + } + }) + .unwrap(); + } + + #[test] + fn push_try_pop_many_spmc() { + fn recv(_t: i32, q: &Queue) { + let mut cur = -1; + for _i in 0..CONC_COUNT { + if let Some(elem) = q.try_pop() { + assert!(elem > cur); + cur = elem; + + if cur == CONC_COUNT - 1 { + break; + } + } + } + } + + let q: Queue = Queue::new(); + assert!(q.is_empty()); + thread::scope(|scope| { + for i in 0..3 { + let q = &q; + scope.spawn(move |_| recv(i, q)); + } + + scope.spawn(|_| { + for i in 0..CONC_COUNT { + q.push(i); + } + }); + }) + .unwrap(); + } + + #[test] + fn push_try_pop_many_mpmc() { + enum LR { + Left(i64), + Right(i64), + } + + let q: Queue = Queue::new(); + assert!(q.is_empty()); + + thread::scope(|scope| { + for _t in 0..2 { + scope.spawn(|_| { + for i in CONC_COUNT - 1..CONC_COUNT { + q.push(LR::Left(i)) + } + }); + scope.spawn(|_| { + for i in CONC_COUNT - 1..CONC_COUNT { + q.push(LR::Right(i)) + } + }); + scope.spawn(|_| { + let mut vl = vec![]; + let mut vr = vec![]; + for _i in 0..CONC_COUNT { + match q.try_pop() { + Some(LR::Left(x)) => vl.push(x), + Some(LR::Right(x)) => vr.push(x), + _ => {} + } + } + + let mut vl2 = vl.clone(); + let mut vr2 = vr.clone(); + vl2.sort_unstable(); + vr2.sort_unstable(); + + assert_eq!(vl, vl2); + assert_eq!(vr, vr2); + }); + } + }) + .unwrap(); + } + + #[test] + fn push_pop_many_spsc() { + let q: Queue = Queue::new(); + + thread::scope(|scope| { + scope.spawn(|_| { + let mut next = 0; + while next < CONC_COUNT { + assert_eq!(q.pop(), next); + next += 1; + } + }); + + for i in 0..CONC_COUNT { + q.push(i) + } + }) + .unwrap(); + assert!(q.is_empty()); + } + + #[test] + fn is_empty_dont_pop() { + let q: Queue = Queue::new(); + q.push(20); + q.push(20); + assert!(!q.is_empty()); + assert!(!q.is_empty()); + assert!(q.try_pop().is_some()); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/tests/loom.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/tests/loom.rs new file mode 100644 index 0000000000000000000000000000000000000000..4e56acdbca425b6fe9ba611f4a63c19094b25e86 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crossbeam-epoch-0.9.18/tests/loom.rs @@ -0,0 +1,157 @@ +#![cfg(crossbeam_loom)] + +use crossbeam_epoch as epoch; +use loom_crate as loom; + +use epoch::*; +use epoch::{Atomic, Owned}; +use loom::sync::atomic::Ordering::{self, Acquire, Relaxed, Release}; +use loom::sync::Arc; +use loom::thread::spawn; +use std::mem::ManuallyDrop; +use std::ptr; + +#[test] +fn it_works() { + loom::model(|| { + let collector = Collector::new(); + let item: Atomic = Atomic::from(Owned::new(String::from("boom"))); + let item2 = item.clone(); + let collector2 = collector.clone(); + let guard = collector.register().pin(); + + let jh = loom::thread::spawn(move || { + let guard = collector2.register().pin(); + guard.defer(move || { + // this isn't really safe, since other threads may still have pointers to the + // value, but in this limited test scenario it's okay, since we know the test won't + // access item after all the pins are released. + let mut item = unsafe { item2.into_owned() }; + // mutate it as a second measure to make sure the assert_eq below would fail + item.retain(|c| c == 'o'); + drop(item); + }); + }); + + let item = item.load(Ordering::SeqCst, &guard); + // we pinned strictly before the call to defer_destroy, + // so item cannot have been dropped yet + assert_eq!(*unsafe { item.deref() }, "boom"); + drop(guard); + + jh.join().unwrap(); + + drop(collector); + }) +} + +#[test] +fn treiber_stack() { + /// Treiber's lock-free stack. + /// + /// Usable with any number of producers and consumers. + #[derive(Debug)] + pub struct TreiberStack { + head: Atomic>, + } + + #[derive(Debug)] + struct Node { + data: ManuallyDrop, + next: Atomic>, + } + + impl TreiberStack { + /// Creates a new, empty stack. + pub fn new() -> TreiberStack { + TreiberStack { + head: Atomic::null(), + } + } + + /// Pushes a value on top of the stack. + pub fn push(&self, t: T) { + let mut n = Owned::new(Node { + data: ManuallyDrop::new(t), + next: Atomic::null(), + }); + + let guard = epoch::pin(); + + loop { + let head = self.head.load(Relaxed, &guard); + n.next.store(head, Relaxed); + + match self + .head + .compare_exchange(head, n, Release, Relaxed, &guard) + { + Ok(_) => break, + Err(e) => n = e.new, + } + } + } + + /// Attempts to pop the top element from the stack. + /// + /// Returns `None` if the stack is empty. + pub fn pop(&self) -> Option { + let guard = epoch::pin(); + loop { + let head = self.head.load(Acquire, &guard); + + match unsafe { head.as_ref() } { + Some(h) => { + let next = h.next.load(Relaxed, &guard); + + if self + .head + .compare_exchange(head, next, Relaxed, Relaxed, &guard) + .is_ok() + { + unsafe { + guard.defer_destroy(head); + return Some(ManuallyDrop::into_inner(ptr::read(&(*h).data))); + } + } + } + None => return None, + } + } + } + + /// Returns `true` if the stack is empty. + pub fn is_empty(&self) -> bool { + let guard = epoch::pin(); + self.head.load(Acquire, &guard).is_null() + } + } + + impl Drop for TreiberStack { + fn drop(&mut self) { + while self.pop().is_some() {} + } + } + + loom::model(|| { + let stack1 = Arc::new(TreiberStack::new()); + let stack2 = Arc::clone(&stack1); + + // use 5 since it's greater than the 4 used for the sanitize feature + let jh = spawn(move || { + for i in 0..5 { + stack2.push(i); + assert!(stack2.pop().is_some()); + } + }); + + for i in 0..5 { + stack1.push(i); + assert!(stack1.pop().is_some()); + } + + jh.join().unwrap(); + assert!(stack1.pop().is_none()); + assert!(stack1.is_empty()); + }); +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/hex.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/hex.rs new file mode 100644 index 0000000000000000000000000000000000000000..4052286c098d6881527e4d545244de57d52eadad --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/hex.rs @@ -0,0 +1,87 @@ +//! Hexadecimal encoding support +// TODO(tarcieri): use `base16ct`? + +use crate::{ComponentBytes, Error, Signature}; +use core::{fmt, str}; + +/// Format a signature component as hex. +pub(crate) struct ComponentFormatter<'a>(pub(crate) &'a ComponentBytes); + +impl fmt::Debug for ComponentFormatter<'_> { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "0x")?; + + for byte in self.0 { + write!(f, "{:02x}", byte)?; + } + + Ok(()) + } +} + +impl fmt::LowerHex for Signature { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + for component in [&self.R, &self.s] { + for byte in component { + write!(f, "{:02x}", byte)?; + } + } + Ok(()) + } +} + +impl fmt::UpperHex for Signature { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + for component in [&self.R, &self.s] { + for byte in component { + write!(f, "{:02X}", byte)?; + } + } + Ok(()) + } +} + +/// Decode a signature from hexadecimal. +/// +/// Upper and lower case hexadecimal are both accepted, however mixed case is +/// rejected. +// TODO(tarcieri): use `base16ct`? +impl str::FromStr for Signature { + type Err = Error; + + fn from_str(hex: &str) -> signature::Result { + if hex.as_bytes().len() != Signature::BYTE_SIZE * 2 { + return Err(Error::new()); + } + + let mut upper_case = None; + + // Ensure all characters are valid and case is not mixed + for &byte in hex.as_bytes() { + match byte { + b'0'..=b'9' => (), + b'a'..=b'z' => match upper_case { + Some(true) => return Err(Error::new()), + Some(false) => (), + None => upper_case = Some(false), + }, + b'A'..=b'Z' => match upper_case { + Some(true) => (), + Some(false) => return Err(Error::new()), + None => upper_case = Some(true), + }, + _ => return Err(Error::new()), + } + } + + let mut result = [0u8; Self::BYTE_SIZE]; + for (digit, byte) in hex.as_bytes().chunks_exact(2).zip(result.iter_mut()) { + *byte = str::from_utf8(digit) + .ok() + .and_then(|s| u8::from_str_radix(s, 16).ok()) + .ok_or_else(Error::new)?; + } + + Self::try_from(&result[..]) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/lib.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..2e8cb45b408eddeb5d118675c874349c2de8f505 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/lib.rs @@ -0,0 +1,419 @@ +#![no_std] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![doc = include_str!("../README.md")] +#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")] +#![allow(non_snake_case)] +#![forbid(unsafe_code)] +#![warn( + clippy::unwrap_used, + missing_docs, + rust_2018_idioms, + unused_lifetimes, + unused_qualifications +)] + +//! # Using Ed25519 generically over algorithm implementations/providers +//! +//! By using the `ed25519` crate, you can write code which signs and verifies +//! messages using the Ed25519 signature algorithm generically over any +//! supported Ed25519 implementation (see the next section for available +//! providers). +//! +//! This allows consumers of your code to plug in whatever implementation they +//! want to use without having to add all potential Ed25519 libraries you'd +//! like to support as optional dependencies. +//! +//! ## Example +//! +//! ``` +//! use ed25519::signature::{Signer, Verifier}; +//! +//! pub struct HelloSigner +//! where +//! S: Signer +//! { +//! pub signing_key: S +//! } +//! +//! impl HelloSigner +//! where +//! S: Signer +//! { +//! pub fn sign(&self, person: &str) -> ed25519::Signature { +//! // NOTE: use `try_sign` if you'd like to be able to handle +//! // errors from external signing services/devices (e.g. HSM/KMS) +//! // +//! self.signing_key.sign(format_message(person).as_bytes()) +//! } +//! } +//! +//! pub struct HelloVerifier { +//! pub verifying_key: V +//! } +//! +//! impl HelloVerifier +//! where +//! V: Verifier +//! { +//! pub fn verify( +//! &self, +//! person: &str, +//! signature: &ed25519::Signature +//! ) -> Result<(), ed25519::Error> { +//! self.verifying_key.verify(format_message(person).as_bytes(), signature) +//! } +//! } +//! +//! fn format_message(person: &str) -> String { +//! format!("Hello, {}!", person) +//! } +//! ``` +//! +//! ## Using above example with `ed25519-dalek` +//! +//! The [`ed25519-dalek`] crate natively supports the [`ed25519::Signature`][`Signature`] +//! type defined in this crate along with the [`signature::Signer`] and +//! [`signature::Verifier`] traits. +//! +//! Below is an example of how a hypothetical consumer of the code above can +//! instantiate and use the previously defined `HelloSigner` and `HelloVerifier` +//! types with [`ed25519-dalek`] as the signing/verification provider: +//! +//! *NOTE: requires [`ed25519-dalek`] v2 or newer for compatibility with +//! `ed25519` v2.2+*. +//! +//! ``` +//! use ed25519_dalek::{Signer, Verifier, Signature}; +//! # +//! # pub struct HelloSigner +//! # where +//! # S: Signer +//! # { +//! # pub signing_key: S +//! # } +//! # +//! # impl HelloSigner +//! # where +//! # S: Signer +//! # { +//! # pub fn sign(&self, person: &str) -> Signature { +//! # // NOTE: use `try_sign` if you'd like to be able to handle +//! # // errors from external signing services/devices (e.g. HSM/KMS) +//! # // +//! # self.signing_key.sign(format_message(person).as_bytes()) +//! # } +//! # } +//! # +//! # pub struct HelloVerifier { +//! # pub verifying_key: V +//! # } +//! # +//! # impl HelloVerifier +//! # where +//! # V: Verifier +//! # { +//! # pub fn verify( +//! # &self, +//! # person: &str, +//! # signature: &Signature +//! # ) -> Result<(), ed25519::Error> { +//! # self.verifying_key.verify(format_message(person).as_bytes(), signature) +//! # } +//! # } +//! # +//! # fn format_message(person: &str) -> String { +//! # format!("Hello, {}!", person) +//! # } +//! use rand_core::OsRng; // Requires the `std` feature of `rand_core` +//! +//! /// `HelloSigner` defined above instantiated with `ed25519-dalek` as +//! /// the signing provider. +//! pub type DalekHelloSigner = HelloSigner; +//! +//! let signing_key = ed25519_dalek::SigningKey::generate(&mut OsRng); +//! let signer = DalekHelloSigner { signing_key }; +//! let person = "Joe"; // Message to sign +//! let signature = signer.sign(person); +//! +//! /// `HelloVerifier` defined above instantiated with `ed25519-dalek` +//! /// as the signature verification provider. +//! pub type DalekHelloVerifier = HelloVerifier; +//! +//! let verifying_key: ed25519_dalek::VerifyingKey = signer.signing_key.verifying_key(); +//! let verifier = DalekHelloVerifier { verifying_key }; +//! assert!(verifier.verify(person, &signature).is_ok()); +//! ``` +//! +//! ## Using above example with `ring-compat` +//! +//! The [`ring-compat`] crate provides wrappers for [*ring*] which implement +//! the [`signature::Signer`] and [`signature::Verifier`] traits for +//! [`ed25519::Signature`][`Signature`]. +//! +//! Below is an example of how a hypothetical consumer of the code above can +//! instantiate and use the previously defined `HelloSigner` and `HelloVerifier` +//! types with [`ring-compat`] as the signing/verification provider: +//! +//! ``` +//! use ring_compat::signature::{ +//! ed25519::{Signature, SigningKey, VerifyingKey}, +//! Signer, Verifier +//! }; +//! # +//! # pub struct HelloSigner +//! # where +//! # S: Signer +//! # { +//! # pub signing_key: S +//! # } +//! # +//! # impl HelloSigner +//! # where +//! # S: Signer +//! # { +//! # pub fn sign(&self, person: &str) -> Signature { +//! # // NOTE: use `try_sign` if you'd like to be able to handle +//! # // errors from external signing services/devices (e.g. HSM/KMS) +//! # // +//! # self.signing_key.sign(format_message(person).as_bytes()) +//! # } +//! # } +//! # +//! # pub struct HelloVerifier { +//! # pub verifying_key: V +//! # } +//! # +//! # impl HelloVerifier +//! # where +//! # V: Verifier +//! # { +//! # pub fn verify( +//! # &self, +//! # person: &str, +//! # signature: &Signature +//! # ) -> Result<(), ed25519::Error> { +//! # self.verifying_key.verify(format_message(person).as_bytes(), signature) +//! # } +//! # } +//! # +//! # fn format_message(person: &str) -> String { +//! # format!("Hello, {}!", person) +//! # } +//! use rand_core::{OsRng, RngCore}; // Requires the `std` feature of `rand_core` +//! +//! /// `HelloSigner` defined above instantiated with *ring* as +//! /// the signing provider. +//! pub type RingHelloSigner = HelloSigner; +//! +//! let mut ed25519_seed = [0u8; 32]; +//! OsRng.fill_bytes(&mut ed25519_seed); +//! +//! let signing_key = SigningKey::from_bytes(&ed25519_seed); +//! let verifying_key = signing_key.verifying_key(); +//! +//! let signer = RingHelloSigner { signing_key }; +//! let person = "Joe"; // Message to sign +//! let signature = signer.sign(person); +//! +//! /// `HelloVerifier` defined above instantiated with *ring* +//! /// as the signature verification provider. +//! pub type RingHelloVerifier = HelloVerifier; +//! +//! let verifier = RingHelloVerifier { verifying_key }; +//! assert!(verifier.verify(person, &signature).is_ok()); +//! ``` +//! +//! # Available Ed25519 providers +//! +//! The following libraries support the types/traits from the `ed25519` crate: +//! +//! - [`ed25519-dalek`] - mature pure Rust implementation of Ed25519 +//! - [`ring-compat`] - compatibility wrapper for [*ring*] +//! - [`yubihsm`] - host-side client library for YubiHSM2 devices from Yubico +//! +//! [`ed25519-dalek`]: https://docs.rs/ed25519-dalek +//! [`ring-compat`]: https://docs.rs/ring-compat +//! [*ring*]: https://github.com/briansmith/ring +//! [`yubihsm`]: https://github.com/iqlusioninc/yubihsm.rs/blob/develop/README.md +//! +//! # Features +//! +//! The following features are presently supported: +//! +//! - `pkcs8`: support for decoding/encoding PKCS#8-formatted private keys using the +//! [`KeypairBytes`] type. +//! - `std` *(default)*: Enable `std` support in [`signature`], which currently only affects whether +//! [`signature::Error`] implements `std::error::Error`. +//! - `serde`: Implement `serde::Deserialize` and `serde::Serialize` for [`Signature`]. Signatures +//! are serialized as their bytes. +//! - `serde_bytes`: Implement `serde_bytes::Deserialize` and `serde_bytes::Serialize` for +//! [`Signature`]. This enables more compact representations for formats with an efficient byte +//! array representation. As per the `serde_bytes` documentation, this can most easily be realised +//! using the `#[serde(with = "serde_bytes")]` annotation, e.g.: +//! +//! ```ignore +//! # use ed25519::Signature; +//! # use serde::{Deserialize, Serialize}; +//! #[derive(Deserialize, Serialize)] +//! #[serde(transparent)] +//! struct SignatureAsBytes(#[serde(with = "serde_bytes")] Signature); +//! ``` + +#[cfg(feature = "alloc")] +extern crate alloc; + +mod hex; + +#[cfg(feature = "pkcs8")] +pub mod pkcs8; + +#[cfg(feature = "serde")] +mod serde; + +pub use signature::{self, Error, SignatureEncoding}; + +#[cfg(feature = "pkcs8")] +pub use crate::pkcs8::{KeypairBytes, PublicKeyBytes}; + +use core::fmt; + +#[cfg(feature = "alloc")] +use alloc::vec::Vec; + +/// Size of a single component of an Ed25519 signature. +const COMPONENT_SIZE: usize = 32; + +/// Size of an `R` or `s` component of an Ed25519 signature when serialized +/// as bytes. +pub type ComponentBytes = [u8; COMPONENT_SIZE]; + +/// Ed25519 signature serialized as a byte array. +pub type SignatureBytes = [u8; Signature::BYTE_SIZE]; + +/// Ed25519 signature. +/// +/// This type represents a container for the byte serialization of an Ed25519 +/// signature, and does not necessarily represent well-formed field or curve +/// elements. +/// +/// Signature verification libraries are expected to reject invalid field +/// elements at the time a signature is verified. +#[derive(Copy, Clone, Eq, PartialEq)] +#[repr(C)] +pub struct Signature { + R: ComponentBytes, + s: ComponentBytes, +} + +impl Signature { + /// Size of an encoded Ed25519 signature in bytes. + pub const BYTE_SIZE: usize = COMPONENT_SIZE * 2; + + /// Parse an Ed25519 signature from a byte slice. + pub fn from_bytes(bytes: &SignatureBytes) -> Self { + let mut R = ComponentBytes::default(); + let mut s = ComponentBytes::default(); + + let components = bytes.split_at(COMPONENT_SIZE); + R.copy_from_slice(components.0); + s.copy_from_slice(components.1); + + Self { R, s } + } + + /// Parse an Ed25519 signature from its `R` and `s` components. + pub fn from_components(R: ComponentBytes, s: ComponentBytes) -> Self { + Self { R, s } + } + + /// Parse an Ed25519 signature from a byte slice. + /// + /// # Returns + /// - `Ok` on success + /// - `Err` if the input byte slice is not 64-bytes + pub fn from_slice(bytes: &[u8]) -> signature::Result { + SignatureBytes::try_from(bytes) + .map(Into::into) + .map_err(|_| Error::new()) + } + + /// Bytes for the `R` component of a signature. + pub fn r_bytes(&self) -> &ComponentBytes { + &self.R + } + + /// Bytes for the `s` component of a signature. + pub fn s_bytes(&self) -> &ComponentBytes { + &self.s + } + + /// Return the inner byte array. + pub fn to_bytes(&self) -> SignatureBytes { + let mut ret = [0u8; Self::BYTE_SIZE]; + let (R, s) = ret.split_at_mut(COMPONENT_SIZE); + R.copy_from_slice(&self.R); + s.copy_from_slice(&self.s); + ret + } + + /// Convert this signature into a byte vector. + #[cfg(feature = "alloc")] + pub fn to_vec(&self) -> Vec { + self.to_bytes().to_vec() + } +} + +impl SignatureEncoding for Signature { + type Repr = SignatureBytes; + + fn to_bytes(&self) -> SignatureBytes { + self.to_bytes() + } +} + +impl From for SignatureBytes { + fn from(sig: Signature) -> SignatureBytes { + sig.to_bytes() + } +} + +impl From<&Signature> for SignatureBytes { + fn from(sig: &Signature) -> SignatureBytes { + sig.to_bytes() + } +} + +impl From for Signature { + fn from(bytes: SignatureBytes) -> Self { + Signature::from_bytes(&bytes) + } +} + +impl From<&SignatureBytes> for Signature { + fn from(bytes: &SignatureBytes) -> Self { + Signature::from_bytes(bytes) + } +} + +impl TryFrom<&[u8]> for Signature { + type Error = Error; + + fn try_from(bytes: &[u8]) -> signature::Result { + Self::from_slice(bytes) + } +} + +impl fmt::Debug for Signature { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("ed25519::Signature") + .field("R", &hex::ComponentFormatter(self.r_bytes())) + .field("s", &hex::ComponentFormatter(self.s_bytes())) + .finish() + } +} + +impl fmt::Display for Signature { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{:X}", self) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/pkcs8.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/pkcs8.rs new file mode 100644 index 0000000000000000000000000000000000000000..92039aec97bb94d511c0283bc91c928cc9503023 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/pkcs8.rs @@ -0,0 +1,356 @@ +//! PKCS#8 private key support. +//! +//! Implements Ed25519 PKCS#8 private keys as described in RFC8410 Section 7: +//! +//! +//! ## SemVer Notes +//! +//! The `pkcs8` module of this crate is exempted from SemVer as it uses a +//! pre-1.0 dependency (the `pkcs8` crate). +//! +//! However, breaking changes to this module will be accompanied by a minor +//! version bump. +//! +//! Please lock to a specific minor version of the `ed25519` crate to avoid +//! breaking changes when using this module. + +pub use pkcs8::{ + spki, DecodePrivateKey, DecodePublicKey, Error, ObjectIdentifier, PrivateKeyInfo, Result, +}; + +#[cfg(feature = "alloc")] +pub use pkcs8::{spki::EncodePublicKey, EncodePrivateKey}; + +#[cfg(feature = "alloc")] +pub use pkcs8::der::{asn1::BitStringRef, Document, SecretDocument}; + +use core::fmt; + +#[cfg(feature = "pem")] +use { + alloc::string::{String, ToString}, + core::str, +}; + +#[cfg(feature = "zeroize")] +use zeroize::Zeroize; + +/// Algorithm [`ObjectIdentifier`] for the Ed25519 digital signature algorithm +/// (`id-Ed25519`). +/// +/// +pub const ALGORITHM_OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.101.112"); + +/// Ed25519 Algorithm Identifier. +pub const ALGORITHM_ID: pkcs8::AlgorithmIdentifierRef<'static> = pkcs8::AlgorithmIdentifierRef { + oid: ALGORITHM_OID, + parameters: None, +}; + +/// Ed25519 keypair serialized as bytes. +/// +/// This type is primarily useful for decoding/encoding PKCS#8 private key +/// files (either DER or PEM) encoded using the following traits: +/// +/// - [`DecodePrivateKey`]: decode DER or PEM encoded PKCS#8 private key. +/// - [`EncodePrivateKey`]: encode DER or PEM encoded PKCS#8 private key. +/// +/// PKCS#8 private key files encoded with PEM begin with: +/// +/// ```text +/// -----BEGIN PRIVATE KEY----- +/// ``` +/// +/// Note that this type operates on raw bytes and performs no validation that +/// keys represent valid Ed25519 field elements. +pub struct KeypairBytes { + /// Ed25519 secret key. + /// + /// Little endian serialization of an element of the Curve25519 scalar + /// field, prior to "clamping" (i.e. setting/clearing bits to ensure the + /// scalar is actually a valid field element) + pub secret_key: [u8; Self::BYTE_SIZE / 2], + + /// Ed25519 public key (if available). + /// + /// Compressed Edwards-y encoded curve point. + pub public_key: Option, +} + +impl KeypairBytes { + /// Size of an Ed25519 keypair when serialized as bytes. + const BYTE_SIZE: usize = 64; + + /// Parse raw keypair from a 64-byte input. + pub fn from_bytes(bytes: &[u8; Self::BYTE_SIZE]) -> Self { + let (sk, pk) = bytes.split_at(Self::BYTE_SIZE / 2); + + Self { + secret_key: sk.try_into().expect("secret key size error"), + public_key: Some(PublicKeyBytes( + pk.try_into().expect("public key size error"), + )), + } + } + + /// Serialize as a 64-byte keypair. + /// + /// # Returns + /// + /// - `Some(bytes)` if the `public_key` is present. + /// - `None` if the `public_key` is absent (i.e. `None`). + pub fn to_bytes(&self) -> Option<[u8; Self::BYTE_SIZE]> { + if let Some(public_key) = &self.public_key { + let mut result = [0u8; Self::BYTE_SIZE]; + let (sk, pk) = result.split_at_mut(Self::BYTE_SIZE / 2); + sk.copy_from_slice(&self.secret_key); + pk.copy_from_slice(public_key.as_ref()); + Some(result) + } else { + None + } + } +} + +impl Drop for KeypairBytes { + fn drop(&mut self) { + #[cfg(feature = "zeroize")] + self.secret_key.zeroize() + } +} + +#[cfg(feature = "alloc")] +impl EncodePrivateKey for KeypairBytes { + fn to_pkcs8_der(&self) -> Result { + // Serialize private key as nested OCTET STRING + let mut private_key = [0u8; 2 + (Self::BYTE_SIZE / 2)]; + private_key[0] = 0x04; + private_key[1] = 0x20; + private_key[2..].copy_from_slice(&self.secret_key); + + let private_key_info = PrivateKeyInfo { + algorithm: ALGORITHM_ID, + private_key: &private_key, + public_key: self.public_key.as_ref().map(|pk| pk.0.as_slice()), + }; + + let result = SecretDocument::encode_msg(&private_key_info)?; + + #[cfg(feature = "zeroize")] + private_key.zeroize(); + + Ok(result) + } +} + +impl TryFrom> for KeypairBytes { + type Error = Error; + + fn try_from(private_key: PrivateKeyInfo<'_>) -> Result { + private_key.algorithm.assert_algorithm_oid(ALGORITHM_OID)?; + + if private_key.algorithm.parameters.is_some() { + return Err(Error::ParametersMalformed); + } + + // Ed25519 PKCS#8 keys are represented as a nested OCTET STRING + // (i.e. an OCTET STRING within an OCTET STRING). + // + // This match statement checks and removes the inner OCTET STRING + // header value: + // + // - 0x04: OCTET STRING tag + // - 0x20: 32-byte length + let secret_key = match private_key.private_key { + [0x04, 0x20, rest @ ..] => rest.try_into().map_err(|_| Error::KeyMalformed), + _ => Err(Error::KeyMalformed), + }?; + + let public_key = private_key + .public_key + .map(|bytes| bytes.try_into().map_err(|_| Error::KeyMalformed)) + .transpose()? + .map(PublicKeyBytes); + + Ok(Self { + secret_key, + public_key, + }) + } +} + +impl TryFrom<&[u8]> for KeypairBytes { + type Error = Error; + + fn try_from(der_bytes: &[u8]) -> Result { + Self::from_pkcs8_der(der_bytes) + } +} + +impl fmt::Debug for KeypairBytes { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("KeypairBytes") + .field("public_key", &self.public_key) + .finish_non_exhaustive() + } +} + +#[cfg(feature = "pem")] +impl str::FromStr for KeypairBytes { + type Err = Error; + + fn from_str(pem: &str) -> Result { + Self::from_pkcs8_pem(pem) + } +} + +/// Ed25519 public key serialized as bytes. +/// +/// This type is primarily useful for decoding/encoding SPKI public key +/// files (either DER or PEM) encoded using the following traits: +/// +/// - [`DecodePublicKey`]: decode DER or PEM encoded PKCS#8 private key. +/// - [`EncodePublicKey`]: encode DER or PEM encoded PKCS#8 private key. +/// +/// SPKI public key files encoded with PEM begin with: +/// +/// ```text +/// -----BEGIN PUBLIC KEY----- +/// ``` +/// +/// Note that this type operates on raw bytes and performs no validation that +/// public keys represent valid compressed Ed25519 y-coordinates. +#[derive(Clone, Copy, Eq, PartialEq)] +pub struct PublicKeyBytes(pub [u8; Self::BYTE_SIZE]); + +impl PublicKeyBytes { + /// Size of an Ed25519 public key when serialized as bytes. + const BYTE_SIZE: usize = 32; + + /// Returns the raw bytes of the public key. + pub fn to_bytes(&self) -> [u8; Self::BYTE_SIZE] { + self.0 + } +} + +impl AsRef<[u8; Self::BYTE_SIZE]> for PublicKeyBytes { + fn as_ref(&self) -> &[u8; Self::BYTE_SIZE] { + &self.0 + } +} + +#[cfg(feature = "alloc")] +impl EncodePublicKey for PublicKeyBytes { + fn to_public_key_der(&self) -> spki::Result { + pkcs8::SubjectPublicKeyInfoRef { + algorithm: ALGORITHM_ID, + subject_public_key: BitStringRef::new(0, &self.0)?, + } + .try_into() + } +} + +impl TryFrom> for PublicKeyBytes { + type Error = spki::Error; + + fn try_from(spki: spki::SubjectPublicKeyInfoRef<'_>) -> spki::Result { + spki.algorithm.assert_algorithm_oid(ALGORITHM_OID)?; + + if spki.algorithm.parameters.is_some() { + return Err(spki::Error::KeyMalformed); + } + + spki.subject_public_key + .as_bytes() + .ok_or(spki::Error::KeyMalformed)? + .try_into() + .map(Self) + .map_err(|_| spki::Error::KeyMalformed) + } +} + +impl TryFrom<&[u8]> for PublicKeyBytes { + type Error = spki::Error; + + fn try_from(der_bytes: &[u8]) -> spki::Result { + Self::from_public_key_der(der_bytes) + } +} + +impl TryFrom for PublicKeyBytes { + type Error = spki::Error; + + fn try_from(keypair: KeypairBytes) -> spki::Result { + PublicKeyBytes::try_from(&keypair) + } +} + +impl TryFrom<&KeypairBytes> for PublicKeyBytes { + type Error = spki::Error; + + fn try_from(keypair: &KeypairBytes) -> spki::Result { + keypair.public_key.ok_or(spki::Error::KeyMalformed) + } +} + +impl fmt::Debug for PublicKeyBytes { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.write_str("PublicKeyBytes(")?; + + for &byte in self.as_ref() { + write!(f, "{:02X}", byte)?; + } + + f.write_str(")") + } +} + +#[cfg(feature = "pem")] +impl str::FromStr for PublicKeyBytes { + type Err = spki::Error; + + fn from_str(pem: &str) -> spki::Result { + Self::from_public_key_pem(pem) + } +} + +#[cfg(feature = "pem")] +impl ToString for PublicKeyBytes { + fn to_string(&self) -> String { + self.to_public_key_pem(Default::default()) + .expect("PEM serialization error") + } +} + +#[cfg(feature = "pem")] +#[cfg(test)] +mod tests { + use super::{KeypairBytes, PublicKeyBytes}; + use hex_literal::hex; + + const SECRET_KEY_BYTES: [u8; 32] = + hex!("D4EE72DBF913584AD5B6D8F1F769F8AD3AFE7C28CBF1D4FBE097A88F44755842"); + + const PUBLIC_KEY_BYTES: [u8; 32] = + hex!("19BF44096984CDFE8541BAC167DC3B96C85086AA30B6B6CB0C5C38AD703166E1"); + + #[test] + fn to_bytes() { + let valid_keypair = KeypairBytes { + secret_key: SECRET_KEY_BYTES, + public_key: Some(PublicKeyBytes(PUBLIC_KEY_BYTES)), + }; + + assert_eq!( + valid_keypair.to_bytes().unwrap(), + hex!("D4EE72DBF913584AD5B6D8F1F769F8AD3AFE7C28CBF1D4FBE097A88F4475584219BF44096984CDFE8541BAC167DC3B96C85086AA30B6B6CB0C5C38AD703166E1") + ); + + let invalid_keypair = KeypairBytes { + secret_key: SECRET_KEY_BYTES, + public_key: None, + }; + + assert_eq!(invalid_keypair.to_bytes(), None); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/serde.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/serde.rs new file mode 100644 index 0000000000000000000000000000000000000000..d7a7022ce602c8d9275fe9436da96fba26fda39e --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/src/serde.rs @@ -0,0 +1,121 @@ +//! `serde` support. + +use crate::{Signature, SignatureBytes}; +use ::serde::{de, ser, Deserialize, Serialize}; +use core::fmt; + +impl Serialize for Signature { + fn serialize(&self, serializer: S) -> Result { + use ser::SerializeTuple; + + let mut seq = serializer.serialize_tuple(Signature::BYTE_SIZE)?; + + for byte in self.to_bytes() { + seq.serialize_element(&byte)?; + } + + seq.end() + } +} + +// serde lacks support for deserializing arrays larger than 32-bytes +// see: +impl<'de> Deserialize<'de> for Signature { + fn deserialize>(deserializer: D) -> Result { + struct ByteArrayVisitor; + + impl<'de> de::Visitor<'de> for ByteArrayVisitor { + type Value = [u8; Signature::BYTE_SIZE]; + + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str("bytestring of length 64") + } + + fn visit_seq(self, mut seq: A) -> Result<[u8; Signature::BYTE_SIZE], A::Error> + where + A: de::SeqAccess<'de>, + { + use de::Error; + let mut arr = [0u8; Signature::BYTE_SIZE]; + + for (i, byte) in arr.iter_mut().enumerate() { + *byte = seq + .next_element()? + .ok_or_else(|| Error::invalid_length(i, &self))?; + } + + Ok(arr) + } + } + + deserializer + .deserialize_tuple(Signature::BYTE_SIZE, ByteArrayVisitor) + .map(Into::into) + } +} + +#[cfg(feature = "serde_bytes")] +impl serde_bytes::Serialize for Signature { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_bytes(&self.to_bytes()) + } +} + +#[cfg(feature = "serde_bytes")] +impl<'de> serde_bytes::Deserialize<'de> for Signature { + fn deserialize(deserializer: D) -> Result + where + D: de::Deserializer<'de>, + { + struct ByteArrayVisitor; + + impl<'de> de::Visitor<'de> for ByteArrayVisitor { + type Value = SignatureBytes; + + fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + formatter.write_str("bytestring of length 64") + } + + fn visit_bytes(self, bytes: &[u8]) -> Result + where + E: de::Error, + { + use de::Error; + + bytes + .try_into() + .map_err(|_| Error::invalid_length(bytes.len(), &self)) + } + } + + deserializer + .deserialize_bytes(ByteArrayVisitor) + .map(Into::into) + } +} + +#[cfg(test)] +mod tests { + use crate::{Signature, SignatureBytes}; + use hex_literal::hex; + + const SIGNATURE_BYTES: SignatureBytes = hex!( + " + e5564300c360ac729086e2cc806e828a + 84877f1eb8e5d974d873e06522490155 + 5fb8821590a33bacc61e39701cf9b46b + d25bf5f0595bbe24655141438e7a100b + " + ); + + #[test] + fn round_trip() { + let signature = Signature::from_bytes(&SIGNATURE_BYTES); + let serialized = bincode::serialize(&signature).unwrap(); + let deserialized = bincode::deserialize(&serialized).unwrap(); + assert_eq!(signature, deserialized); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v1.der b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v1.der new file mode 100644 index 0000000000000000000000000000000000000000..cb780b362c9dbb7e62b9159ac40c45b1242bec2f Binary files /dev/null and b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v1.der differ diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v1.pem b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v1.pem new file mode 100644 index 0000000000000000000000000000000000000000..e447080ae285928f6d49718a50f81f0af98cd4da --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v1.pem @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEINTuctv5E1hK1bbY8fdp+K06/nwoy/HU++CXqI9EdVhC +-----END PRIVATE KEY----- diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v2.der b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v2.der new file mode 100644 index 0000000000000000000000000000000000000000..3358e8a730ac3daf865b6eab869bb9a921ab9ef4 Binary files /dev/null and b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v2.der differ diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v2.pem b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v2.pem new file mode 100644 index 0000000000000000000000000000000000000000..e56a7d96d3029f7d09e30664bb0d65f833557d5e --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pkcs8-v2.pem @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MHICAQEwBQYDK2VwBCIEINTuctv5E1hK1bbY8fdp+K06/nwoy/HU++CXqI9EdVhC +oB8wHQYKKoZIhvcNAQkJFDEPDA1DdXJkbGUgQ2hhaXJzgSEAGb9ECWmEzf6FQbrB +Z9w7lshQhqowtrbLDFw4rXAxZuE= +-----END PRIVATE KEY------ diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pubkey.der b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pubkey.der new file mode 100644 index 0000000000000000000000000000000000000000..d1002c4a4e624c322cc71015e6685a25808df374 Binary files /dev/null and b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pubkey.der differ diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pubkey.pem b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pubkey.pem new file mode 100644 index 0000000000000000000000000000000000000000..41b0218e948a3afc96f79cfbafe8f3865486a855 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/examples/pubkey.pem @@ -0,0 +1,3 @@ +-----BEGIN PUBLIC KEY----- +MCowBQYDK2VwAyEAGb9ECWmEzf6FQbrBZ9w7lshQhqowtrbLDFw4rXAxZuE= +-----END PUBLIC KEY----- diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/hex.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/hex.rs new file mode 100644 index 0000000000000000000000000000000000000000..99214343d3a2c412b3cedcb8f457352d31238e65 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/hex.rs @@ -0,0 +1,50 @@ +//! Hexadecimal display/serialization tests. + +use ed25519::Signature; +use hex_literal::hex; +use std::str::FromStr; + +/// Test 1 signature from RFC 8032 § 7.1 +/// +const TEST_1_SIGNATURE: [u8; Signature::BYTE_SIZE] = hex!( + "e5564300c360ac729086e2cc806e828a + 84877f1eb8e5d974d873e06522490155 + 5fb8821590a33bacc61e39701cf9b46b + d25bf5f0595bbe24655141438e7a100b" +); + +#[test] +fn display() { + let sig = Signature::from_bytes(&TEST_1_SIGNATURE); + assert_eq!(sig.to_string(), "E5564300C360AC729086E2CC806E828A84877F1EB8E5D974D873E065224901555FB8821590A33BACC61E39701CF9B46BD25BF5F0595BBE24655141438E7A100B") +} + +#[test] +fn lower_hex() { + let sig = Signature::from_bytes(&TEST_1_SIGNATURE); + assert_eq!(format!("{:x}", sig), "e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b") +} + +#[test] +fn upper_hex() { + let sig = Signature::from_bytes(&TEST_1_SIGNATURE); + assert_eq!(format!("{:X}", sig), "E5564300C360AC729086E2CC806E828A84877F1EB8E5D974D873E065224901555FB8821590A33BACC61E39701CF9B46BD25BF5F0595BBE24655141438E7A100B") +} + +#[test] +fn from_str_lower() { + let sig = Signature::from_str("e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b").unwrap(); + assert_eq!(sig.to_bytes(), TEST_1_SIGNATURE); +} + +#[test] +fn from_str_upper() { + let sig = Signature::from_str("E5564300C360AC729086E2CC806E828A84877F1EB8E5D974D873E065224901555FB8821590A33BACC61E39701CF9B46BD25BF5F0595BBE24655141438E7A100B").unwrap(); + assert_eq!(sig.to_bytes(), TEST_1_SIGNATURE); +} + +#[test] +fn from_str_rejects_mixed_case() { + let result = Signature::from_str("E5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b"); + assert!(result.is_err()); +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/pkcs8.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/pkcs8.rs new file mode 100644 index 0000000000000000000000000000000000000000..729131180129eb2cfe41cb49733e9b3e2ec08e1b --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/pkcs8.rs @@ -0,0 +1,86 @@ +//! PKCS#8 private key tests + +#![cfg(feature = "pkcs8")] + +use ed25519::pkcs8::{DecodePrivateKey, DecodePublicKey, KeypairBytes, PublicKeyBytes}; +use hex_literal::hex; + +#[cfg(feature = "alloc")] +use ed25519::pkcs8::{EncodePrivateKey, EncodePublicKey}; + +/// Ed25519 PKCS#8 v1 private key encoded as ASN.1 DER. +const PKCS8_V1_DER: &[u8] = include_bytes!("examples/pkcs8-v1.der"); + +/// Ed25519 PKCS#8 v2 private key + public key encoded as ASN.1 DER. +const PKCS8_V2_DER: &[u8] = include_bytes!("examples/pkcs8-v2.der"); + +/// Ed25519 SubjectPublicKeyInfo encoded as ASN.1 DER. +const PUBLIC_KEY_DER: &[u8] = include_bytes!("examples/pubkey.der"); + +#[test] +fn decode_pkcs8_v1() { + let keypair = KeypairBytes::from_pkcs8_der(PKCS8_V1_DER).unwrap(); + + // Extracted with: + // $ openssl asn1parse -inform der -in tests/examples/pkcs8-v1.der + assert_eq!( + keypair.secret_key, + &hex!("D4EE72DBF913584AD5B6D8F1F769F8AD3AFE7C28CBF1D4FBE097A88F44755842")[..] + ); + + assert_eq!(keypair.public_key, None); +} + +#[test] +fn decode_pkcs8_v2() { + let keypair = KeypairBytes::from_pkcs8_der(PKCS8_V2_DER).unwrap(); + + // Extracted with: + // $ openssl asn1parse -inform der -in tests/examples/pkcs8-v2.der + assert_eq!( + keypair.secret_key, + &hex!("D4EE72DBF913584AD5B6D8F1F769F8AD3AFE7C28CBF1D4FBE097A88F44755842")[..] + ); + + assert_eq!( + keypair.public_key.unwrap().0, + hex!("19BF44096984CDFE8541BAC167DC3B96C85086AA30B6B6CB0C5C38AD703166E1") + ); +} + +#[test] +fn decode_public_key() { + let public_key = PublicKeyBytes::from_public_key_der(PUBLIC_KEY_DER).unwrap(); + + // Extracted with: + // $ openssl pkey -inform der -in tests/examples/pkcs8-v1.der -pubout -text + assert_eq!( + public_key.as_ref(), + &hex!("19BF44096984CDFE8541BAC167DC3B96C85086AA30B6B6CB0C5C38AD703166E1") + ); +} + +#[cfg(feature = "alloc")] +#[test] +fn encode_pkcs8_v1() { + let pk = KeypairBytes::from_pkcs8_der(PKCS8_V1_DER).unwrap(); + let pk_der = pk.to_pkcs8_der().unwrap(); + assert_eq!(pk_der.as_bytes(), PKCS8_V1_DER); +} + +#[cfg(feature = "alloc")] +#[test] +fn encode_pkcs8_v2() { + let pk = KeypairBytes::from_pkcs8_der(PKCS8_V2_DER).unwrap(); + let pk2 = KeypairBytes::from_pkcs8_der(pk.to_pkcs8_der().unwrap().as_bytes()).unwrap(); + assert_eq!(pk.secret_key, pk2.secret_key); + assert_eq!(pk.public_key, pk2.public_key); +} + +#[cfg(feature = "alloc")] +#[test] +fn encode_public_key() { + let pk = PublicKeyBytes::from_public_key_der(PUBLIC_KEY_DER).unwrap(); + let pk_der = pk.to_public_key_der().unwrap(); + assert_eq!(pk_der.as_ref(), PUBLIC_KEY_DER); +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/serde.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/serde.rs new file mode 100644 index 0000000000000000000000000000000000000000..93f0ebcea6ff299904dc2aadc1a74d331176265d --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ed25519-2.2.3/tests/serde.rs @@ -0,0 +1,62 @@ +//! Tests for serde serializers/deserializers + +#![cfg(feature = "serde")] + +use ed25519::{Signature, SignatureBytes}; +use hex_literal::hex; + +const EXAMPLE_SIGNATURE: SignatureBytes = hex!( + "3f3e3d3c3b3a393837363534333231302f2e2d2c2b2a29282726252423222120" + "1f1e1d1c1b1a191817161514131211100f0e0d0c0b0a09080706050403020100" +); + +#[test] +fn test_serialize() { + let signature = Signature::try_from(&EXAMPLE_SIGNATURE[..]).unwrap(); + dbg!(&signature); + let encoded_signature: Vec = bincode::serialize(&signature).unwrap(); + assert_eq!(&EXAMPLE_SIGNATURE[..], &encoded_signature[..]); +} + +#[test] +fn test_deserialize() { + let signature = bincode::deserialize::(&EXAMPLE_SIGNATURE).unwrap(); + assert_eq!(EXAMPLE_SIGNATURE, signature.to_bytes()); +} + +#[cfg(feature = "serde_bytes")] +#[test] +fn test_serialize_bytes() { + use bincode::Options; + + let signature = Signature::try_from(&EXAMPLE_SIGNATURE[..]).unwrap(); + + let mut encoded_signature = Vec::new(); + let options = bincode::DefaultOptions::new() + .with_fixint_encoding() + .allow_trailing_bytes(); + let mut serializer = bincode::Serializer::new(&mut encoded_signature, options); + serde_bytes::serialize(&signature, &mut serializer).unwrap(); + + let mut expected = Vec::from(Signature::BYTE_SIZE.to_le_bytes()); + expected.extend(&EXAMPLE_SIGNATURE[..]); + assert_eq!(&expected[..], &encoded_signature[..]); +} + +#[cfg(feature = "serde_bytes")] +#[test] +fn test_deserialize_bytes() { + use bincode::Options; + + let mut encoded_signature = Vec::from(Signature::BYTE_SIZE.to_le_bytes()); + encoded_signature.extend(&EXAMPLE_SIGNATURE[..]); + + let options = bincode::DefaultOptions::new() + .with_fixint_encoding() + .allow_trailing_bytes(); + let mut deserializer = bincode::de::Deserializer::from_slice(&encoded_signature[..], options); + + let signature: Signature = serde_bytes::deserialize(&mut deserializer).unwrap(); + + assert_eq!(EXAMPLE_SIGNATURE, signature.to_bytes()); +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/env_logger-0.11.9/src/writer/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/env_logger-0.11.9/src/writer/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..61e9255c6414da502a136cb2ec427a8c72ac7052 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/env_logger-0.11.9/src/writer/mod.rs @@ -0,0 +1,190 @@ +mod buffer; +mod target; + +use std::{io, mem, sync::Mutex}; + +use buffer::BufferWriter; + +pub(crate) use buffer::Buffer; + +pub use target::Target; + +/// Whether or not to print styles to the target. +#[allow(clippy::exhaustive_enums)] // By definition don't need more +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, Default)] +pub enum WriteStyle { + /// Try to print styles, but don't force the issue. + #[default] + Auto, + /// Try very hard to print styles. + Always, + /// Never print styles. + Never, +} + +#[cfg(feature = "color")] +impl From for WriteStyle { + fn from(choice: anstream::ColorChoice) -> Self { + match choice { + anstream::ColorChoice::Auto => Self::Auto, + anstream::ColorChoice::Always => Self::Always, + anstream::ColorChoice::AlwaysAnsi => Self::Always, + anstream::ColorChoice::Never => Self::Never, + } + } +} + +#[cfg(feature = "color")] +impl From for anstream::ColorChoice { + fn from(choice: WriteStyle) -> Self { + match choice { + WriteStyle::Auto => anstream::ColorChoice::Auto, + WriteStyle::Always => anstream::ColorChoice::Always, + WriteStyle::Never => anstream::ColorChoice::Never, + } + } +} + +/// A terminal target with color awareness. +#[derive(Debug)] +pub(crate) struct Writer { + inner: BufferWriter, +} + +impl Writer { + pub(crate) fn write_style(&self) -> WriteStyle { + self.inner.write_style() + } + + pub(crate) fn buffer(&self) -> Buffer { + self.inner.buffer() + } + + pub(crate) fn print(&self, buf: &Buffer) -> io::Result<()> { + self.inner.print(buf) + } +} + +/// A builder for a terminal writer. +/// +/// The target and style choice can be configured before building. +#[derive(Debug)] +pub(crate) struct Builder { + target: Target, + write_style: WriteStyle, + is_test: bool, + built: bool, +} + +impl Builder { + /// Initialize the writer builder with defaults. + pub(crate) fn new() -> Self { + Builder { + target: Default::default(), + write_style: Default::default(), + is_test: false, + built: false, + } + } + + /// Set the target to write to. + pub(crate) fn target(&mut self, target: Target) -> &mut Self { + self.target = target; + self + } + + /// Parses a style choice string. + /// + /// See the [Disabling colors] section for more details. + /// + /// [Disabling colors]: ../index.html#disabling-colors + pub(crate) fn parse_write_style(&mut self, write_style: &str) -> &mut Self { + self.write_style(parse_write_style(write_style)) + } + + /// Whether or not to print style characters when writing. + pub(crate) fn write_style(&mut self, write_style: WriteStyle) -> &mut Self { + self.write_style = write_style; + self + } + + /// Whether or not to capture logs for `cargo test`. + #[allow(clippy::wrong_self_convention)] + pub(crate) fn is_test(&mut self, is_test: bool) -> &mut Self { + self.is_test = is_test; + self + } + + /// Build a terminal writer. + pub(crate) fn build(&mut self) -> Writer { + assert!(!self.built, "attempt to re-use consumed builder"); + self.built = true; + + let color_choice = self.write_style; + #[cfg(feature = "auto-color")] + let color_choice = if color_choice == WriteStyle::Auto { + match &self.target { + Target::Stdout => anstream::AutoStream::choice(&io::stdout()).into(), + Target::Stderr => anstream::AutoStream::choice(&io::stderr()).into(), + Target::Pipe(_) => color_choice, + } + } else { + color_choice + }; + let color_choice = if color_choice == WriteStyle::Auto { + WriteStyle::Never + } else { + color_choice + }; + + let writer = match mem::take(&mut self.target) { + Target::Stdout => BufferWriter::stdout(self.is_test, color_choice), + Target::Stderr => BufferWriter::stderr(self.is_test, color_choice), + Target::Pipe(pipe) => BufferWriter::pipe(Box::new(Mutex::new(pipe)), color_choice), + }; + + Writer { inner: writer } + } +} + +impl Default for Builder { + fn default() -> Self { + Builder::new() + } +} + +fn parse_write_style(spec: &str) -> WriteStyle { + match spec { + "auto" => WriteStyle::Auto, + "always" => WriteStyle::Always, + "never" => WriteStyle::Never, + _ => Default::default(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse_write_style_valid() { + let inputs = vec![ + ("auto", WriteStyle::Auto), + ("always", WriteStyle::Always), + ("never", WriteStyle::Never), + ]; + + for (input, expected) in inputs { + assert_eq!(expected, parse_write_style(input)); + } + } + + #[test] + fn parse_write_style_invalid() { + let inputs = vec!["", "true", "false", "NEVER!!"]; + + for input in inputs { + assert_eq!(WriteStyle::Auto, parse_write_style(input)); + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/env_logger-0.11.9/src/writer/target.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/env_logger-0.11.9/src/writer/target.rs new file mode 100644 index 0000000000000000000000000000000000000000..a1220ffeee3e366c2b207eadbbd3cf11a8a5fab2 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/env_logger-0.11.9/src/writer/target.rs @@ -0,0 +1,26 @@ +/// Log target, either `stdout`, `stderr` or a custom pipe. +#[non_exhaustive] +#[derive(Default)] +pub enum Target { + /// Logs will be sent to standard output. + Stdout, + /// Logs will be sent to standard error. + #[default] + Stderr, + /// Logs will be sent to a custom pipe. + Pipe(Box), +} + +impl std::fmt::Debug for Target { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!( + f, + "{}", + match self { + Self::Stdout => "stdout", + Self::Stderr => "stderr", + Self::Pipe(_) => "pipe", + } + ) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/date.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/date.rs new file mode 100644 index 0000000000000000000000000000000000000000..fc90f0ebcab46d9484aa1dd8e114ddd24962485c --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/date.rs @@ -0,0 +1,3975 @@ +use core::time::Duration as UnsignedDuration; + +use crate::{ + civil::{DateTime, Era, ISOWeekDate, Time, Weekday}, + duration::{Duration, SDuration}, + error::{civil::Error as E, unit::UnitConfigError, Error, ErrorContext}, + fmt::{ + self, + temporal::{DEFAULT_DATETIME_PARSER, DEFAULT_DATETIME_PRINTER}, + }, + shared::util::itime::{self, IDate, IEpochDay}, + tz::TimeZone, + util::{b, constant}, + RoundMode, SignedDuration, Span, SpanRound, Unit, Zoned, +}; + +/// A representation of a civil date in the Gregorian calendar. +/// +/// A `Date` value corresponds to a triple of year, month and day. Every `Date` +/// value is guaranteed to be a valid Gregorian calendar date. For example, +/// both `2023-02-29` and `2023-11-31` are invalid and cannot be represented by +/// a `Date`. +/// +/// # Civil dates +/// +/// A `Date` value behaves without regard to daylight saving time or time +/// zones in general. When doing arithmetic on dates with spans defined in +/// units of time (such as with [`Date::checked_add`]), days are considered to +/// always be precisely `86,400` seconds long. +/// +/// # Parsing and printing +/// +/// The `Date` type provides convenient trait implementations of +/// [`std::str::FromStr`] and [`std::fmt::Display`]: +/// +/// ``` +/// use jiff::civil::Date; +/// +/// let date: Date = "2024-06-19".parse()?; +/// assert_eq!(date.to_string(), "2024-06-19"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// A civil `Date` can also be parsed from something that _contains_ a date, +/// but with perhaps other data (such as an offset or time zone): +/// +/// ``` +/// use jiff::civil::Date; +/// +/// let date: Date = "2024-06-19T15:22:45-04[America/New_York]".parse()?; +/// assert_eq!(date.to_string(), "2024-06-19"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// For more information on the specific format supported, see the +/// [`fmt::temporal`](crate::fmt::temporal) module documentation. +/// +/// # Default value +/// +/// For convenience, this type implements the `Default` trait. Its default +/// value corresponds to `0000-01-01`. One can also access this value via the +/// `Date::ZERO` constant. +/// +/// # Comparisons +/// +/// The `Date` type provides both `Eq` and `Ord` trait implementations to +/// facilitate easy comparisons. When a date `d1` occurs before a date `d2`, +/// then `d1 < d2`. For example: +/// +/// ``` +/// use jiff::civil::date; +/// +/// let d1 = date(2024, 3, 11); +/// let d2 = date(2025, 1, 31); +/// assert!(d1 < d2); +/// ``` +/// +/// # Arithmetic +/// +/// This type provides routines for adding and subtracting spans of time, as +/// well as computing the span of time between two `Date` values. +/// +/// For adding or subtracting spans of time, one can use any of the following +/// routines: +/// +/// * [`Date::checked_add`] or [`Date::checked_sub`] for checked arithmetic. +/// * [`Date::saturating_add`] or [`Date::saturating_sub`] for saturating +/// arithmetic. +/// +/// Additionally, checked arithmetic is available via the `Add` and `Sub` +/// trait implementations. When the result overflows, a panic occurs. +/// +/// ``` +/// use jiff::{civil::date, ToSpan}; +/// +/// let start = date(2024, 2, 25); +/// let one_week_later = start + 1.weeks(); +/// assert_eq!(one_week_later, date(2024, 3, 3)); +/// ``` +/// +/// One can compute the span of time between two dates using either +/// [`Date::until`] or [`Date::since`]. It's also possible to subtract two +/// `Date` values directly via a `Sub` trait implementation: +/// +/// ``` +/// use jiff::{civil::date, ToSpan}; +/// +/// let date1 = date(2024, 3, 3); +/// let date2 = date(2024, 2, 25); +/// assert_eq!(date1 - date2, 7.days().fieldwise()); +/// ``` +/// +/// The `until` and `since` APIs are polymorphic and allow re-balancing and +/// rounding the span returned. For example, the default largest unit is days +/// (as exemplified above), but we can ask for bigger units: +/// +/// ``` +/// use jiff::{civil::date, ToSpan, Unit}; +/// +/// let date1 = date(2024, 5, 3); +/// let date2 = date(2024, 2, 25); +/// assert_eq!( +/// date1.since((Unit::Year, date2))?, +/// 2.months().days(7).fieldwise(), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// Or even round the span returned: +/// +/// ``` +/// use jiff::{civil::{DateDifference, date}, RoundMode, ToSpan, Unit}; +/// +/// let date1 = date(2024, 5, 15); +/// let date2 = date(2024, 2, 25); +/// assert_eq!( +/// date1.since( +/// DateDifference::new(date2) +/// .smallest(Unit::Month) +/// .largest(Unit::Year), +/// )?, +/// 2.months().fieldwise(), +/// ); +/// // `DateDifference` uses truncation as a rounding mode by default, +/// // but you can set the rounding mode to break ties away from zero: +/// assert_eq!( +/// date1.since( +/// DateDifference::new(date2) +/// .smallest(Unit::Month) +/// .largest(Unit::Year) +/// .mode(RoundMode::HalfExpand), +/// )?, +/// // Rounds up to 8 days. +/// 3.months().fieldwise(), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// # Rounding +/// +/// Rounding dates is currently not supported. If you want this functionality, +/// please participate in the [issue tracking its support][add-date-rounding]. +/// +/// [add-date-rounding]: https://github.com/BurntSushi/jiff/issues/1 +#[derive(Clone, Copy, Eq, Hash, PartialEq, PartialOrd, Ord)] +pub struct Date { + year: i16, + month: i8, + day: i8, +} + +impl Date { + /// The minimum representable Gregorian date. + /// + /// The minimum is chosen such that any [`Timestamp`](crate::Timestamp) + /// combined with any valid time zone offset can be infallibly converted to + /// this type. This means that the minimum `Timestamp` is guaranteed to be + /// bigger than the minimum `Date`. + pub const MIN: Date = Date::constant(-9999, 1, 1); + + /// The maximum representable Gregorian date. + /// + /// The maximum is chosen such that any [`Timestamp`](crate::Timestamp) + /// combined with any valid time zone offset can be infallibly converted to + /// this type. This means that the maximum `Timestamp` is guaranteed to be + /// smaller than the maximum `Date`. + pub const MAX: Date = Date::constant(9999, 12, 31); + + /// The first day of the zeroth year. + /// + /// This is guaranteed to be equivalent to `Date::default()`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::Date; + /// + /// assert_eq!(Date::ZERO, Date::default()); + /// ``` + pub const ZERO: Date = Date::constant(0, 1, 1); + + /// Creates a new `Date` value from its component year, month and day + /// values. + /// + /// To set the component values of a date after creating it, use + /// [`DateWith`] via [`Date::with`] to build a new [`Date`] from the fields + /// of an existing date. + /// + /// # Errors + /// + /// This returns an error when the given year-month-day does not + /// correspond to a valid date. Namely, all of the following must be + /// true: + /// + /// * The year must be in the range `-9999..=9999`. + /// * The month must be in the range `1..=12`. + /// * The day must be at least `1` and must be at most the number of days + /// in the corresponding month. So for example, `2024-02-29` is valid but + /// `2023-02-29` is not. + /// + /// # Example + /// + /// This shows an example of a valid date: + /// + /// ``` + /// use jiff::civil::Date; + /// + /// let d = Date::new(2024, 2, 29).unwrap(); + /// assert_eq!(d.year(), 2024); + /// assert_eq!(d.month(), 2); + /// assert_eq!(d.day(), 29); + /// ``` + /// + /// This shows an example of an invalid date: + /// + /// ``` + /// use jiff::civil::Date; + /// + /// assert!(Date::new(2023, 2, 29).is_err()); + /// ``` + #[inline] + pub fn new(year: i16, month: i8, day: i8) -> Result { + let year = b::Year::check(year)?; + let month = b::Month::check(month)?; + if day > 28 && day > itime::days_in_month(year, month) { + return Err(Error::itime_range( + crate::shared::util::itime::RangeError::DateInvalidDays { + year, + month, + }, + )); + } + Ok(Date::new_unchecked(year, month, day)) + } + + /// Like `Date::new`, but constrains the day value to the last day of + /// `month`. + /// + /// This still returns an error when `day < 1` or when `year` or `month` + /// are invalid. + #[inline] + fn new_constrain(year: i16, month: i8, day: i8) -> Result { + let year = b::Year::check(year)?; + let month = b::Month::check(month)?; + let day = if day < 1 { + return Err(b::Day::error().into()); + } else if day > 28 { + day.min(itime::days_in_month(year, month)) + } else { + day + }; + Ok(Date::new_unchecked(year, month, day)) + } + + /// Like `Date::new`, but does not checking on the values given when + /// `debug_assertions` aren't enabled. + /// + /// This is useful in contexts where the values are known to be valid. + /// + /// NOTE: It's important that this is not made public without careful + /// consideration. In particular, if it's public, it probably shouldn't + /// be safe to call so that callers can rely on the ranges of methods + /// like `Date::{year,month,day}`. + #[inline] + const fn new_unchecked(year: i16, month: i8, day: i8) -> Date { + debug_assert!(b::Year::checkc(year as i64).is_ok()); + debug_assert!(b::Month::checkc(month as i64).is_ok()); + debug_assert!(b::Day::checkc(day as i64).is_ok()); + debug_assert!(day <= itime::days_in_month(year, month)); + Date { year, month, day } + } + + /// Creates a new `Date` value in a `const` context. + /// + /// # Panics + /// + /// This routine panics when [`Date::new`] would return an error. That is, + /// when the given year-month-day does not correspond to a valid date. + /// Namely, all of the following must be true: + /// + /// * The year must be in the range `-9999..=9999`. + /// * The month must be in the range `1..=12`. + /// * The day must be at least `1` and must be at most the number of days + /// in the corresponding month. So for example, `2024-02-29` is valid but + /// `2023-02-29` is not. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::Date; + /// + /// let d = Date::constant(2024, 2, 29); + /// assert_eq!(d.year(), 2024); + /// assert_eq!(d.month(), 2); + /// assert_eq!(d.day(), 29); + /// ``` + #[inline] + pub const fn constant(year: i16, month: i8, day: i8) -> Date { + let year = + constant::unwrapr!(b::Year::checkc(year as i64), "invalid year"); + let month = constant::unwrapr!( + b::Month::checkc(month as i64), + "invalid month" + ); + if day > itime::days_in_month(year, month) { + panic!("invalid month/day combination"); + } + Date::new_unchecked(year, month, day) + } + + /// Construct a Gregorian date from an [ISO 8601 week date]. + /// + /// The [`ISOWeekDate`] type describes itself in more detail, but in + /// brief, the ISO week date calendar system eschews months in favor of + /// weeks. + /// + /// The minimum and maximum values of an `ISOWeekDate` correspond + /// precisely to the minimum and maximum values of a `Date`. Therefore, + /// converting between them is lossless and infallible. + /// + /// This routine is equivalent to [`ISOWeekDate::date`]. It is also + /// available via a `From` trait implementation for `Date`. + /// + /// [ISO 8601 week date]: https://en.wikipedia.org/wiki/ISO_week_date + /// + /// # Example + /// + /// This shows a number of examples demonstrating the conversion from an + /// ISO 8601 week date to a Gregorian date. + /// + /// ``` + /// use jiff::civil::{Date, ISOWeekDate, Weekday, date}; + /// + /// let weekdate = ISOWeekDate::new(1994, 52, Weekday::Sunday).unwrap(); + /// let d = Date::from_iso_week_date(weekdate); + /// assert_eq!(d, date(1995, 1, 1)); + /// + /// let weekdate = ISOWeekDate::new(1997, 1, Weekday::Tuesday).unwrap(); + /// let d = Date::from_iso_week_date(weekdate); + /// assert_eq!(d, date(1996, 12, 31)); + /// + /// let weekdate = ISOWeekDate::new(2020, 1, Weekday::Monday).unwrap(); + /// let d = Date::from_iso_week_date(weekdate); + /// assert_eq!(d, date(2019, 12, 30)); + /// + /// let weekdate = ISOWeekDate::new(2024, 10, Weekday::Saturday).unwrap(); + /// let d = Date::from_iso_week_date(weekdate); + /// assert_eq!(d, date(2024, 3, 9)); + /// + /// let weekdate = ISOWeekDate::new(9999, 52, Weekday::Friday).unwrap(); + /// let d = Date::from_iso_week_date(weekdate); + /// assert_eq!(d, date(9999, 12, 31)); + /// ``` + #[inline] + pub fn from_iso_week_date(weekdate: ISOWeekDate) -> Date { + let mut days = iso_week_start_from_year(weekdate.year()); + let week = i32::from(weekdate.week()); + let weekday = i32::from(weekdate.weekday().to_monday_zero_offset()); + + days += (week - 1) * 7; + days += weekday; + Date::from_unix_epoch_day(days) + } + + /// Create a builder for constructing a `Date` from the fields of this + /// date. + /// + /// See the methods on [`DateWith`] for the different ways one can set the + /// fields of a new `Date`. + /// + /// # Example + /// + /// The builder ensures one can chain together the individual components + /// of a date without it failing at an intermediate step. For example, + /// if you had a date of `2024-10-31` and wanted to change both the day + /// and the month, and each setting was validated independent of the other, + /// you would need to be careful to set the day first and then the month. + /// In some cases, you would need to set the month first and then the day! + /// + /// But with the builder, you can set values in any order: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2024, 10, 31); + /// let d2 = d1.with().month(11).day(30).build()?; + /// assert_eq!(d2, date(2024, 11, 30)); + /// + /// let d1 = date(2024, 4, 30); + /// let d2 = d1.with().day(31).month(7).build()?; + /// assert_eq!(d2, date(2024, 7, 31)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn with(self) -> DateWith { + DateWith::new(self) + } + + /// Returns the year for this date. + /// + /// The value returned is guaranteed to be in the range `-9999..=9999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2024, 3, 9); + /// assert_eq!(d1.year(), 2024); + /// + /// let d2 = date(-2024, 3, 9); + /// assert_eq!(d2.year(), -2024); + /// + /// let d3 = date(0, 3, 9); + /// assert_eq!(d3.year(), 0); + /// ``` + #[inline] + pub fn year(self) -> i16 { + self.year + } + + /// Returns the year and its era. + /// + /// This crate specifically allows years to be negative or `0`, where as + /// years written for the Gregorian calendar are always positive and + /// greater than `0`. In the Gregorian calendar, the era labels `BCE` and + /// `CE` are used to disambiguate between years less than or equal to `0` + /// and years greater than `0`, respectively. + /// + /// The crate is designed this way so that years in the latest era (that + /// is, `CE`) are aligned with years in this crate. + /// + /// The year returned is guaranteed to be in the range `1..=10000`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let d = date(2024, 10, 3); + /// assert_eq!(d.era_year(), (2024, Era::CE)); + /// + /// let d = date(1, 10, 3); + /// assert_eq!(d.era_year(), (1, Era::CE)); + /// + /// let d = date(0, 10, 3); + /// assert_eq!(d.era_year(), (1, Era::BCE)); + /// + /// let d = date(-1, 10, 3); + /// assert_eq!(d.era_year(), (2, Era::BCE)); + /// + /// let d = date(-10, 10, 3); + /// assert_eq!(d.era_year(), (11, Era::BCE)); + /// + /// let d = date(-9_999, 10, 3); + /// assert_eq!(d.era_year(), (10_000, Era::BCE)); + /// ``` + #[inline] + pub fn era_year(self) -> (i16, Era) { + let year = self.year(); + if year >= 1 { + (year, Era::CE) + } else { + // We specifically ensure our min/max bounds on `Year` always leave + // room in its representation to add or subtract 1, so this will + // never fail. + let era_year = -year + 1; + (era_year, Era::BCE) + } + } + + /// Returns the month for this date. + /// + /// The value returned is guaranteed to be in the range `1..=12`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2024, 3, 9); + /// assert_eq!(d1.month(), 3); + /// ``` + #[inline] + pub fn month(self) -> i8 { + self.month + } + + /// Returns the day for this date. + /// + /// The value returned is guaranteed to be in the range `1..=31`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2024, 2, 29); + /// assert_eq!(d1.day(), 29); + /// ``` + #[inline] + pub fn day(self) -> i8 { + self.day + } + + /// Returns the weekday corresponding to this date. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// // The Unix epoch was on a Thursday. + /// let d1 = date(1970, 1, 1); + /// assert_eq!(d1.weekday(), Weekday::Thursday); + /// // One can also get the weekday as an offset in a variety of schemes. + /// assert_eq!(d1.weekday().to_monday_zero_offset(), 3); + /// assert_eq!(d1.weekday().to_monday_one_offset(), 4); + /// assert_eq!(d1.weekday().to_sunday_zero_offset(), 4); + /// assert_eq!(d1.weekday().to_sunday_one_offset(), 5); + /// ``` + #[inline] + pub fn weekday(self) -> Weekday { + Weekday::from_iweekday(self.to_idate_const().weekday()) + } + + /// Returns the ordinal day of the year that this date resides in. + /// + /// For leap years, this always returns a value in the range `1..=366`. + /// Otherwise, the value is in the range `1..=365`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2006, 8, 24); + /// assert_eq!(d.day_of_year(), 236); + /// + /// let d = date(2023, 12, 31); + /// assert_eq!(d.day_of_year(), 365); + /// + /// let d = date(2024, 12, 31); + /// assert_eq!(d.day_of_year(), 366); + /// ``` + #[inline] + pub fn day_of_year(self) -> i16 { + static DAYS_BY_MONTH_NO_LEAP: [i16; 14] = + [0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + static DAYS_BY_MONTH_LEAP: [i16; 14] = + [0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]; + static TABLES: [[i16; 14]; 2] = + [DAYS_BY_MONTH_NO_LEAP, DAYS_BY_MONTH_LEAP]; + TABLES[self.in_leap_year() as usize][self.month() as usize] + + i16::from(self.day()) + } + + /// Returns the ordinal day of the year that this date resides in, but + /// ignores leap years. + /// + /// That is, the range of possible values returned by this routine is + /// `1..=365`, even if this date resides in a leap year. If this date is + /// February 29, then this routine returns `None`. + /// + /// The value `365` always corresponds to the last day in the year, + /// December 31, even for leap years. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2006, 8, 24); + /// assert_eq!(d.day_of_year_no_leap(), Some(236)); + /// + /// let d = date(2023, 12, 31); + /// assert_eq!(d.day_of_year_no_leap(), Some(365)); + /// + /// let d = date(2024, 12, 31); + /// assert_eq!(d.day_of_year_no_leap(), Some(365)); + /// + /// let d = date(2024, 2, 29); + /// assert_eq!(d.day_of_year_no_leap(), None); + /// ``` + #[inline] + pub fn day_of_year_no_leap(self) -> Option { + let mut days = self.day_of_year(); + if self.in_leap_year() { + // day=60 is Feb 29 + if days == 60 { + return None; + } else if days > 60 { + days -= 1; + } + } + Some(days) + } + + /// Returns the first date of the month that this date resides in. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 2, 29); + /// assert_eq!(d.first_of_month(), date(2024, 2, 1)); + /// ``` + #[inline] + pub fn first_of_month(self) -> Date { + // OK because the first day of the month is always valid. + Date::new_unchecked(self.year(), self.month(), 1) + } + + /// Returns the last date of the month that this date resides in. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 2, 5); + /// assert_eq!(d.last_of_month(), date(2024, 2, 29)); + /// ``` + #[inline] + pub fn last_of_month(self) -> Date { + // OK because the last day of the month is always valid. + Date::new_unchecked(self.year(), self.month(), self.days_in_month()) + } + + /// Returns the total number of days in the the month in which this date + /// resides. + /// + /// This is guaranteed to always return one of the following values, + /// depending on the year and the month: 28, 29, 30 or 31. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 2, 10); + /// assert_eq!(d.days_in_month(), 29); + /// + /// let d = date(2023, 2, 10); + /// assert_eq!(d.days_in_month(), 28); + /// + /// let d = date(2024, 8, 15); + /// assert_eq!(d.days_in_month(), 31); + /// ``` + #[inline] + pub fn days_in_month(self) -> i8 { + itime::days_in_month(self.year(), self.month()) + } + + /// Returns the first date of the year that this date resides in. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 2, 29); + /// assert_eq!(d.first_of_year(), date(2024, 1, 1)); + /// ``` + #[inline] + pub fn first_of_year(self) -> Date { + // OK because Jan 1 for all years is valid. + Date::new_unchecked(self.year(), 1, 1) + } + + /// Returns the last date of the year that this date resides in. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 2, 5); + /// assert_eq!(d.last_of_year(), date(2024, 12, 31)); + /// ``` + #[inline] + pub fn last_of_year(self) -> Date { + // OK because Dec 31 for all years is valid. + Date::new_unchecked(self.year(), 12, 31) + } + + /// Returns the total number of days in the the year in which this date + /// resides. + /// + /// This is guaranteed to always return either `365` or `366`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 7, 10); + /// assert_eq!(d.days_in_year(), 366); + /// + /// let d = date(2023, 7, 10); + /// assert_eq!(d.days_in_year(), 365); + /// ``` + #[inline] + pub fn days_in_year(self) -> i16 { + if self.in_leap_year() { + 366 + } else { + 365 + } + } + + /// Returns true if and only if the year in which this date resides is a + /// leap year. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// assert!(date(2024, 1, 1).in_leap_year()); + /// assert!(!date(2023, 12, 31).in_leap_year()); + /// ``` + #[inline] + pub fn in_leap_year(self) -> bool { + itime::is_leap_year(self.year()) + } + + /// Returns the date immediately following this one. + /// + /// # Errors + /// + /// This returns an error when this date is the maximum value. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{Date, date}; + /// + /// let d = date(2024, 2, 28); + /// assert_eq!(d.tomorrow()?, date(2024, 2, 29)); + /// + /// // The max doesn't have a tomorrow. + /// assert!(Date::MAX.tomorrow().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn tomorrow(self) -> Result { + if self.day() >= 28 && self.day() == self.days_in_month() { + if self.month() == 12 { + let year = b::Year::checked_add(self.year(), 1)?; + // OK because Jan 1 is valid for all valid years. + return Ok(Date::new_unchecked(year, 1, 1)); + } + // OK because the first of every month for a valid year is valid. + // Also, `month + 1` is OK because we know `month` must be less + // than `12`. + return Ok(Date::new_unchecked(self.year(), self.month() + 1, 1)); + } + // OK because we know `self.day() + 1 <= 28` because of the condition + // checked above. Moreover, `28` is a valid day for all valid years + // and months. + Ok(Date::new_unchecked(self.year(), self.month(), self.day() + 1)) + } + + /// Returns the date immediately preceding this one. + /// + /// # Errors + /// + /// This returns an error when this date is the minimum value. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{Date, date}; + /// + /// let d = date(2024, 3, 1); + /// assert_eq!(d.yesterday()?, date(2024, 2, 29)); + /// + /// // The min doesn't have a yesterday. + /// assert!(Date::MIN.yesterday().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn yesterday(self) -> Result { + if self.day() == 1 { + if self.month() == 1 { + let year = b::Year::checked_sub(self.year(), 1)?; + // OK because Dec 31 is valid for all valid years. + return Ok(Date::new_unchecked(year, 12, 31)); + } + let month = self.month() - 1; + // OK because the last of every month for a valid year is valid. + // Also, `month - 1` is OK because we know `month` must be greater + // than `1`. + return Ok(Date::new_unchecked( + self.year(), + month, + itime::days_in_month(self.year(), month), + )); + } + // OK because we know `self.day() - 1 >= 1` because of the condition + // checked above. Moreover, since the year/month don't change (since + // `self.day() > 1`), subtracting 1 always leads to a valid day for + // this month. + Ok(Date::new_unchecked(self.year(), self.month(), self.day() - 1)) + } + + /// Returns the "nth" weekday from the beginning or end of the month in + /// which this date resides. + /// + /// The `nth` parameter can be positive or negative. A positive value + /// computes the "nth" weekday from the beginning of the month. A negative + /// value computes the "nth" weekday from the end of the month. So for + /// example, use `-1` to "find the last weekday" in this date's month. + /// + /// # Errors + /// + /// This returns an error when `nth` is `0`, or if it is `5` or `-5` and + /// there is no 5th weekday from the beginning or end of the month. + /// + /// # Example + /// + /// This shows how to get the nth weekday in a month, starting from the + /// beginning of the month: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let month = date(2017, 3, 1); + /// let second_friday = month.nth_weekday_of_month(2, Weekday::Friday)?; + /// assert_eq!(second_friday, date(2017, 3, 10)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This shows how to do the reverse of the above. That is, the nth _last_ + /// weekday in a month: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let month = date(2024, 3, 1); + /// let last_thursday = month.nth_weekday_of_month(-1, Weekday::Thursday)?; + /// assert_eq!(last_thursday, date(2024, 3, 28)); + /// let second_last_thursday = month.nth_weekday_of_month( + /// -2, + /// Weekday::Thursday, + /// )?; + /// assert_eq!(second_last_thursday, date(2024, 3, 21)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This routine can return an error if there isn't an `nth` weekday + /// for this month. For example, March 2024 only has 4 Mondays: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let month = date(2024, 3, 25); + /// let fourth_monday = month.nth_weekday_of_month(4, Weekday::Monday)?; + /// assert_eq!(fourth_monday, date(2024, 3, 25)); + /// // There is no 5th Monday. + /// assert!(month.nth_weekday_of_month(5, Weekday::Monday).is_err()); + /// // Same goes for counting backwards. + /// assert!(month.nth_weekday_of_month(-5, Weekday::Monday).is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn nth_weekday_of_month( + self, + nth: i8, + weekday: Weekday, + ) -> Result { + let weekday = weekday.to_iweekday(); + let idate = self.to_idate_const(); + Ok(Date::from_idate_const( + idate + .nth_weekday_of_month(nth, weekday) + .map_err(Error::itime_range)?, + )) + } + + /// Returns the "nth" weekday from this date, not including itself. + /// + /// The `nth` parameter can be positive or negative. A positive value + /// computes the "nth" weekday starting at the day after this date and + /// going forwards in time. A negative value computes the "nth" weekday + /// starting at the day before this date and going backwards in time. + /// + /// For example, if this date's weekday is a Sunday and the first Sunday is + /// asked for (that is, `date.nth_weekday(1, Weekday::Sunday)`), then the + /// result is a week from this date corresponding to the following Sunday. + /// + /// # Errors + /// + /// This returns an error when `nth` is `0`, or if it would otherwise + /// result in a date that overflows the minimum/maximum values of `Date`. + /// + /// # Example + /// + /// This example shows how to find the "nth" weekday going forwards in + /// time: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// // Use a Sunday in March as our start date. + /// let d = date(2024, 3, 10); + /// assert_eq!(d.weekday(), Weekday::Sunday); + /// + /// // The first next Monday is tomorrow! + /// let next_monday = d.nth_weekday(1, Weekday::Monday)?; + /// assert_eq!(next_monday, date(2024, 3, 11)); + /// + /// // But the next Sunday is a week away, because this doesn't + /// // include the current weekday. + /// let next_sunday = d.nth_weekday(1, Weekday::Sunday)?; + /// assert_eq!(next_sunday, date(2024, 3, 17)); + /// + /// // "not this Thursday, but next Thursday" + /// let next_next_thursday = d.nth_weekday(2, Weekday::Thursday)?; + /// assert_eq!(next_next_thursday, date(2024, 3, 21)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This example shows how to find the "nth" weekday going backwards in + /// time: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// // Use a Sunday in March as our start date. + /// let d = date(2024, 3, 10); + /// assert_eq!(d.weekday(), Weekday::Sunday); + /// + /// // "last Saturday" was yesterday! + /// let last_saturday = d.nth_weekday(-1, Weekday::Saturday)?; + /// assert_eq!(last_saturday, date(2024, 3, 9)); + /// + /// // "last Sunday" was a week ago. + /// let last_sunday = d.nth_weekday(-1, Weekday::Sunday)?; + /// assert_eq!(last_sunday, date(2024, 3, 3)); + /// + /// // "not last Thursday, but the one before" + /// let prev_prev_thursday = d.nth_weekday(-2, Weekday::Thursday)?; + /// assert_eq!(prev_prev_thursday, date(2024, 2, 29)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This example shows that overflow results in an error in either + /// direction: + /// + /// ``` + /// use jiff::civil::{Date, Weekday}; + /// + /// let d = Date::MAX; + /// assert_eq!(d.weekday(), Weekday::Friday); + /// assert!(d.nth_weekday(1, Weekday::Saturday).is_err()); + /// + /// let d = Date::MIN; + /// assert_eq!(d.weekday(), Weekday::Monday); + /// assert!(d.nth_weekday(-1, Weekday::Sunday).is_err()); + /// ``` + /// + /// # Example: the start of Israeli summer time + /// + /// Israeli law says (at present, as of 2024-03-11) that DST or "summer + /// time" starts on the Friday before the last Sunday in March. We can find + /// that date using both `nth_weekday` and [`Date::nth_weekday_of_month`]: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let march = date(2024, 3, 1); + /// let last_sunday = march.nth_weekday_of_month(-1, Weekday::Sunday)?; + /// let dst_starts_on = last_sunday.nth_weekday(-1, Weekday::Friday)?; + /// assert_eq!(dst_starts_on, date(2024, 3, 29)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: getting the start of the week + /// + /// Given a date, one can use `nth_weekday` to determine the start of the + /// week in which the date resides in. This might vary based on whether + /// the weeks start on Sunday or Monday. This example shows how to handle + /// both. + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let d = date(2024, 3, 15); + /// // For weeks starting with Sunday. + /// let start_of_week = d.tomorrow()?.nth_weekday(-1, Weekday::Sunday)?; + /// assert_eq!(start_of_week, date(2024, 3, 10)); + /// // For weeks starting with Monday. + /// let start_of_week = d.tomorrow()?.nth_weekday(-1, Weekday::Monday)?; + /// assert_eq!(start_of_week, date(2024, 3, 11)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// In the above example, we first get the date after the current one + /// because `nth_weekday` does not consider itself when counting. This + /// works as expected even at the boundaries of a week: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// // The start of the week. + /// let d = date(2024, 3, 10); + /// let start_of_week = d.tomorrow()?.nth_weekday(-1, Weekday::Sunday)?; + /// assert_eq!(start_of_week, date(2024, 3, 10)); + /// // The end of the week. + /// let d = date(2024, 3, 16); + /// let start_of_week = d.tomorrow()?.nth_weekday(-1, Weekday::Sunday)?; + /// assert_eq!(start_of_week, date(2024, 3, 10)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn nth_weekday( + self, + nth: i32, + weekday: Weekday, + ) -> Result { + // ref: http://howardhinnant.github.io/date_algorithms.html#next_weekday + + let nth = b::NthWeekday::check(nth)?; + if nth == 0 { + Err(b::NthWeekday::error().into()) + } else if nth > 0 { + let weekday_diff = i32::from(weekday.since(self.weekday().next())); + let diff = (nth - 1) * 7 + weekday_diff; + let start = self.tomorrow()?.to_unix_epoch_day(); + let end = b::UnixEpochDays::checked_add(start, diff)?; + Ok(Date::from_unix_epoch_day(end)) + } else { + let weekday_diff = + i32::from(self.weekday().previous().since(weekday)); + // OK because of the range on `NthWeekday`. + let nth = nth.abs(); + let diff = (nth - 1) * 7 + weekday_diff; + let start = self.yesterday()?.to_unix_epoch_day(); + let end = b::UnixEpochDays::checked_sub(start, diff)?; + Ok(Date::from_unix_epoch_day(end)) + } + } + + /// Construct an [ISO 8601 week date] from this Gregorian date. + /// + /// The [`ISOWeekDate`] type describes itself in more detail, but in + /// brief, the ISO week date calendar system eschews months in favor of + /// weeks. + /// + /// The minimum and maximum values of an `ISOWeekDate` correspond + /// precisely to the minimum and maximum values of a `Date`. Therefore, + /// converting between them is lossless and infallible. + /// + /// This routine is equivalent to [`ISOWeekDate::from_date`]. + /// + /// [ISO 8601 week date]: https://en.wikipedia.org/wiki/ISO_week_date + /// + /// # Example + /// + /// This shows a number of examples demonstrating the conversion from a + /// Gregorian date to an ISO 8601 week date: + /// + /// ``` + /// use jiff::civil::{Date, Weekday, date}; + /// + /// let weekdate = date(1995, 1, 1).iso_week_date(); + /// assert_eq!(weekdate.year(), 1994); + /// assert_eq!(weekdate.week(), 52); + /// assert_eq!(weekdate.weekday(), Weekday::Sunday); + /// + /// let weekdate = date(1996, 12, 31).iso_week_date(); + /// assert_eq!(weekdate.year(), 1997); + /// assert_eq!(weekdate.week(), 1); + /// assert_eq!(weekdate.weekday(), Weekday::Tuesday); + /// + /// let weekdate = date(2019, 12, 30).iso_week_date(); + /// assert_eq!(weekdate.year(), 2020); + /// assert_eq!(weekdate.week(), 1); + /// assert_eq!(weekdate.weekday(), Weekday::Monday); + /// + /// let weekdate = date(2024, 3, 9).iso_week_date(); + /// assert_eq!(weekdate.year(), 2024); + /// assert_eq!(weekdate.week(), 10); + /// assert_eq!(weekdate.weekday(), Weekday::Saturday); + /// + /// let weekdate = Date::MIN.iso_week_date(); + /// assert_eq!(weekdate.year(), -9999); + /// assert_eq!(weekdate.week(), 1); + /// assert_eq!(weekdate.weekday(), Weekday::Monday); + /// + /// let weekdate = Date::MAX.iso_week_date(); + /// assert_eq!(weekdate.year(), 9999); + /// assert_eq!(weekdate.week(), 52); + /// assert_eq!(weekdate.weekday(), Weekday::Friday); + /// ``` + #[inline] + pub fn iso_week_date(self) -> ISOWeekDate { + let days = self.to_unix_epoch_day(); + let year = self.year(); + let mut week_start = iso_week_start_from_year(year); + if days < week_start { + week_start = iso_week_start_from_year(year - 1); + } else if year < b::Year::MAX { + let next_year_week_start = iso_week_start_from_year(year + 1); + if days >= next_year_week_start { + week_start = next_year_week_start; + } + } + + let weekday = + Weekday::from_iweekday(IEpochDay { epoch_day: days }.weekday()); + let week = i8::try_from(((days - week_start) / 7) + 1).unwrap(); + + let unix_epoch_day = + week_start + i32::from(Weekday::Thursday.since(Weekday::Monday)); + let year = Date::from_unix_epoch_day(unix_epoch_day).year(); + ISOWeekDate::new(year, week, weekday) + .expect("all Dates infallibly convert to ISOWeekDates") + } + + /// Converts a civil date to a [`Zoned`] datetime by adding the given + /// time zone and setting the clock time to midnight. + /// + /// This is a convenience function for + /// `date.to_datetime(midnight).in_tz(name)`. See [`DateTime::to_zoned`] + /// for more details. Note that ambiguous datetimes are handled in the + /// same way as `DateTime::to_zoned`. + /// + /// # Errors + /// + /// This returns an error when the given time zone name could not be found + /// in the default time zone database. + /// + /// This also returns an error if this date could not be represented as + /// a timestamp. This can occur in some cases near the minimum and maximum + /// boundaries of a `Date`. + /// + /// # Example + /// + /// This is a simple example of converting a civil date (a "wall" or + /// "local" or "naive" date) to a precise instant in time that is aware of + /// its time zone: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let zdt = date(2024, 6, 20).in_tz("America/New_York")?; + /// assert_eq!(zdt.to_string(), "2024-06-20T00:00:00-04:00[America/New_York]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: dealing with ambiguity + /// + /// Since a [`Zoned`] corresponds to a precise instant in time (to + /// nanosecond precision) and a `Date` can be many possible such instants, + /// this routine chooses one for this date: the first one, or midnight. + /// + /// Interestingly, some regions implement their daylight saving time + /// transitions at midnight. This means there are some places in the world + /// where, once a year, midnight does not exist on their clocks. As a + /// result, it's possible for the datetime string representing a [`Zoned`] + /// to be something other than midnight. For example: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let zdt = date(2024, 3, 10).in_tz("Cuba")?; + /// assert_eq!(zdt.to_string(), "2024-03-10T01:00:00-04:00[Cuba]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// Since this uses + /// [`Disambiguation::Compatible`](crate::tz::Disambiguation::Compatible), + /// and since that also chooses the "later" time in a forward transition, + /// it follows that the date of the returned `Zoned` will always match + /// this civil date. (Unless there is a pathological time zone with a 24+ + /// hour transition forward.) + /// + /// But if a different disambiguation strategy is used, even when only + /// dealing with standard one hour transitions, the date returned can be + /// different: + /// + /// ``` + /// use jiff::{civil::date, tz::TimeZone}; + /// + /// let tz = TimeZone::get("Cuba")?; + /// let dt = date(2024, 3, 10).at(0, 0, 0, 0); + /// let zdt = tz.to_ambiguous_zoned(dt).earlier()?; + /// assert_eq!(zdt.to_string(), "2024-03-09T23:00:00-05:00[Cuba]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn in_tz(self, time_zone_name: &str) -> Result { + let tz = crate::tz::db().get(time_zone_name)?; + self.to_zoned(tz) + } + + /// Converts a civil datetime to a [`Zoned`] datetime by adding the given + /// [`TimeZone`] and setting the clock time to midnight. + /// + /// This is a convenience function for + /// `date.to_datetime(midnight).to_zoned(tz)`. See [`DateTime::to_zoned`] + /// for more details. Note that ambiguous datetimes are handled in the same + /// way as `DateTime::to_zoned`. + /// + /// In the common case of a time zone being represented as a name string, + /// like `Australia/Tasmania`, consider using [`Date::in_tz`] + /// instead. + /// + /// # Errors + /// + /// This returns an error if this date could not be represented as a + /// timestamp. This can occur in some cases near the minimum and maximum + /// boundaries of a `Date`. + /// + /// # Example + /// + /// This example shows how to create a zoned value with a fixed time zone + /// offset: + /// + /// ``` + /// use jiff::{civil::date, tz}; + /// + /// let tz = tz::offset(-4).to_time_zone(); + /// let zdt = date(2024, 6, 20).to_zoned(tz)?; + /// // A time zone annotation is still included in the printable version + /// // of the Zoned value, but it is fixed to a particular offset. + /// assert_eq!(zdt.to_string(), "2024-06-20T00:00:00-04:00[-04:00]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn to_zoned(self, tz: TimeZone) -> Result { + DateTime::from(self).to_zoned(tz) + } + + /// Given a [`Time`], this constructs a [`DateTime`] value with its time + /// component equal to this time. + /// + /// This is a convenience function for [`DateTime::from_parts`]. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{DateTime, date, time}; + /// + /// let date = date(2010, 3, 14); + /// let time = time(2, 30, 0, 0); + /// assert_eq!(DateTime::from_parts(date, time), date.to_datetime(time)); + /// ``` + #[inline] + pub const fn to_datetime(self, time: Time) -> DateTime { + DateTime::from_parts(self, time) + } + + /// A convenience function for constructing a [`DateTime`] from this date + /// at the time given by its components. + /// + /// # Panics + /// + /// This panics if the provided values do not correspond to a valid `Time`. + /// All of the following conditions must be true: + /// + /// * `0 <= hour <= 23` + /// * `0 <= minute <= 59` + /// * `0 <= second <= 59` + /// * `0 <= subsec_nanosecond <= 999,999,999` + /// + /// Similarly, when used in a const context, invalid parameters will + /// prevent your Rust program from compiling. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// assert_eq!( + /// date(2010, 3, 14).at(2, 30, 0, 0).to_string(), + /// "2010-03-14T02:30:00", + /// ); + /// ``` + /// + /// One can also flip the order by making use of [`Time::on`]: + /// + /// ``` + /// use jiff::civil::time; + /// + /// assert_eq!( + /// time(2, 30, 0, 0).on(2010, 3, 14).to_string(), + /// "2010-03-14T02:30:00", + /// ); + /// ``` + #[inline] + pub const fn at( + self, + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, + ) -> DateTime { + DateTime::from_parts( + self, + Time::constant(hour, minute, second, subsec_nanosecond), + ) + } + + /// Add the given span of time to this date. If the sum would overflow the + /// minimum or maximum date values, then an error is returned. + /// + /// This operation accepts three different duration types: [`Span`], + /// [`SignedDuration`] or [`std::time::Duration`]. This is achieved via + /// `From` trait implementations for the [`DateArithmetic`] type. + /// + /// # Properties + /// + /// When adding a [`Span`] duration, this routine is _not_ reversible + /// because some additions may be ambiguous. For example, adding `1 month` + /// to the date `2024-03-31` will produce `2024-04-30` since April has only + /// 30 days in a month. Conversely, subtracting `1 month` from `2024-04-30` + /// will produce `2024-03-30`, which is not the date we started with. + /// + /// If spans of time are limited to units of days (or less), then this + /// routine _is_ reversible. This also implies that all operations with + /// a [`SignedDuration`] or a [`std::time::Duration`] are reversible. + /// + /// # Errors + /// + /// If the span added to this date would result in a date that exceeds the + /// range of a `Date`, then this will return an error. + /// + /// # Examples + /// + /// This shows a few examples of adding spans of time to various dates. + /// We make use of the [`ToSpan`](crate::ToSpan) trait for convenient + /// creation of spans. + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let d = date(2024, 3, 31); + /// assert_eq!(d.checked_add(1.months())?, date(2024, 4, 30)); + /// // Adding two months gives us May 31, not May 30. + /// let d = date(2024, 3, 31); + /// assert_eq!(d.checked_add(2.months())?, date(2024, 5, 31)); + /// // Any time in the span that does not exceed a day is ignored. + /// let d = date(2024, 3, 31); + /// assert_eq!(d.checked_add(23.hours())?, date(2024, 3, 31)); + /// // But if the time exceeds a day, that is accounted for! + /// let d = date(2024, 3, 31); + /// assert_eq!(d.checked_add(28.hours())?, date(2024, 4, 1)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: available via addition operator + /// + /// This routine can be used via the `+` operator. Note though that if it + /// fails, it will result in a panic. + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let d = date(2024, 3, 31); + /// assert_eq!(d + 1.months(), date(2024, 4, 30)); + /// ``` + /// + /// # Example: negative spans are supported + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let d = date(2024, 3, 31); + /// assert_eq!( + /// d.checked_add(-1.months())?, + /// date(2024, 2, 29), + /// ); + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: error on overflow + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let d = date(2024, 3, 31); + /// assert!(d.checked_add(9000.years()).is_err()); + /// assert!(d.checked_add(-19000.years()).is_err()); + /// ``` + /// + /// # Example: adding absolute durations + /// + /// This shows how to add signed and unsigned absolute durations to a + /// `Date`. Only whole numbers of days are considered. Since this is a + /// civil date unaware of time zones, days are always 24 hours. + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::date, SignedDuration}; + /// + /// let d = date(2024, 2, 29); + /// + /// let dur = SignedDuration::from_hours(24); + /// assert_eq!(d.checked_add(dur)?, date(2024, 3, 1)); + /// assert_eq!(d.checked_add(-dur)?, date(2024, 2, 28)); + /// + /// // Any leftover time is truncated. That is, only + /// // whole days from the duration are considered. + /// let dur = Duration::from_secs((24 * 60 * 60) + (23 * 60 * 60)); + /// assert_eq!(d.checked_add(dur)?, date(2024, 3, 1)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn checked_add>( + self, + duration: A, + ) -> Result { + let duration: DateArithmetic = duration.into(); + duration.checked_add(self) + } + + #[inline] + fn checked_add_span(self, span: &Span) -> Result { + if span.is_zero() { + return Ok(self); + } + if span.units().contains_only(Unit::Day) { + let days = span.get_days(); + return if days == -1 { + self.yesterday() + } else if days == 1 { + self.tomorrow() + } else { + let epoch_days = self.to_unix_epoch_day(); + let days = b::UnixEpochDays::checked_add(epoch_days, days)?; + Ok(Date::from_unix_epoch_day(days)) + }; + } + + let (month, years) = + month_add_overflowing(self.month(), span.get_months()); + let year = b::Year::checked_add(self.year(), years) + .and_then(|years| b::Year::checked_add(years, span.get_years()))?; + let date = Date::new_constrain(year, month, self.day())?; + let epoch_days = date.to_unix_epoch_day(); + let mut days = + b::UnixEpochDays::checked_add(epoch_days, 7 * span.get_weeks()) + .and_then(|days| { + b::UnixEpochDays::checked_add(days, span.get_days()) + })?; + if !span.units().only_time().is_empty() { + let time_days = b::UnixEpochDays::check( + span.to_invariant_duration_time_only().as_civil_days(), + )?; + days = b::UnixEpochDays::checked_add(days, time_days)?; + } + Ok(Date::from_unix_epoch_day(days)) + } + + #[inline] + fn checked_add_duration( + self, + duration: SignedDuration, + ) -> Result { + match duration.as_civil_days() { + 0 => Ok(self), + -1 => self.yesterday(), + 1 => self.tomorrow(), + days => { + let days = b::UnixEpochDays::check(days) + .context(E::OverflowDaysDuration)?; + let days = b::UnixEpochDays::checked_add( + days, + self.to_unix_epoch_day(), + )?; + Ok(Date::from_unix_epoch_day(days)) + } + } + } + + /// This routine is identical to [`Date::checked_add`] with the duration + /// negated. + /// + /// # Errors + /// + /// This has the same error conditions as [`Date::checked_add`]. + /// + /// # Example + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::date, SignedDuration, ToSpan}; + /// + /// let d = date(2024, 2, 29); + /// assert_eq!(d.checked_sub(1.year())?, date(2023, 2, 28)); + /// + /// let dur = SignedDuration::from_hours(24); + /// assert_eq!(d.checked_sub(dur)?, date(2024, 2, 28)); + /// + /// let dur = Duration::from_secs(24 * 60 * 60); + /// assert_eq!(d.checked_sub(dur)?, date(2024, 2, 28)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn checked_sub>( + self, + duration: A, + ) -> Result { + let duration: DateArithmetic = duration.into(); + duration.checked_neg().and_then(|da| da.checked_add(self)) + } + + /// This routine is identical to [`Date::checked_add`], except the + /// result saturates on overflow. That is, instead of overflow, either + /// [`Date::MIN`] or [`Date::MAX`] is returned. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::{Date, date}, SignedDuration, ToSpan}; + /// + /// let d = date(2024, 3, 31); + /// assert_eq!(Date::MAX, d.saturating_add(9000.years())); + /// assert_eq!(Date::MIN, d.saturating_add(-19000.years())); + /// assert_eq!(Date::MAX, d.saturating_add(SignedDuration::MAX)); + /// assert_eq!(Date::MIN, d.saturating_add(SignedDuration::MIN)); + /// assert_eq!(Date::MAX, d.saturating_add(std::time::Duration::MAX)); + /// ``` + #[inline] + pub fn saturating_add>(self, duration: A) -> Date { + let duration: DateArithmetic = duration.into(); + self.checked_add(duration).unwrap_or_else(|_| { + if duration.is_negative() { + Date::MIN + } else { + Date::MAX + } + }) + } + + /// This routine is identical to [`Date::saturating_add`] with the span + /// parameter negated. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::{Date, date}, SignedDuration, ToSpan}; + /// + /// let d = date(2024, 3, 31); + /// assert_eq!(Date::MIN, d.saturating_sub(19000.years())); + /// assert_eq!(Date::MAX, d.saturating_sub(-9000.years())); + /// assert_eq!(Date::MIN, d.saturating_sub(SignedDuration::MAX)); + /// assert_eq!(Date::MAX, d.saturating_sub(SignedDuration::MIN)); + /// assert_eq!(Date::MIN, d.saturating_sub(std::time::Duration::MAX)); + /// ``` + #[inline] + pub fn saturating_sub>(self, duration: A) -> Date { + let duration: DateArithmetic = duration.into(); + let Ok(duration) = duration.checked_neg() else { return Date::MIN }; + self.saturating_add(duration) + } + + /// Returns a span representing the elapsed time from this date until + /// the given `other` date. + /// + /// When `other` occurs before this date, then the span returned will be + /// negative. + /// + /// Depending on the input provided, the span returned is rounded. It may + /// also be balanced up to bigger units than the default. By default, the + /// span returned is balanced such that the biggest and smallest possible + /// unit is days. + /// + /// This operation is configured by providing a [`DateDifference`] + /// value. Since this routine accepts anything that implements + /// `Into`, once can pass a `Date` directly. One + /// can also pass a `(Unit, Date)`, where `Unit` is treated as + /// [`DateDifference::largest`]. + /// + /// # Properties + /// + /// It is guaranteed that if the returned span is subtracted from `other`, + /// and if no rounding is requested, and if the largest unit request is at + /// most `Unit::Day`, then the original date will be returned. + /// + /// This routine is equivalent to `self.since(other).map(|span| -span)` + /// if no rounding options are set. If rounding options are set, then + /// it's equivalent to + /// `self.since(other_without_rounding_options).map(|span| -span)`, + /// followed by a call to [`Span::round`] with the appropriate rounding + /// options set. This is because the negation of a span can result in + /// different rounding results depending on the rounding mode. + /// + /// # Errors + /// + /// An error can occur if `DateDifference` is misconfigured. For example, + /// if the smallest unit provided is bigger than the largest unit. + /// + /// It is guaranteed that if one provides a date with the default + /// [`DateDifference`] configuration, then this routine will never fail. + /// + /// # Examples + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let earlier = date(2006, 8, 24); + /// let later = date(2019, 1, 31); + /// assert_eq!(earlier.until(later)?, 4543.days().fieldwise()); + /// + /// // Flipping the dates is fine, but you'll get a negative span. + /// let earlier = date(2006, 8, 24); + /// let later = date(2019, 1, 31); + /// assert_eq!(later.until(earlier)?, -4543.days().fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: using bigger units + /// + /// This example shows how to expand the span returned to bigger units. + /// This makes use of a `From<(Unit, Date)> for DateDifference` trait + /// implementation. + /// + /// ``` + /// use jiff::{civil::date, Unit, ToSpan}; + /// + /// let d1 = date(1995, 12, 07); + /// let d2 = date(2019, 01, 31); + /// + /// // The default limits durations to using "days" as the biggest unit. + /// let span = d1.until(d2)?; + /// assert_eq!(span.to_string(), "P8456D"); + /// + /// // But we can ask for units all the way up to years. + /// let span = d1.until((Unit::Year, d2))?; + /// assert_eq!(span.to_string(), "P23Y1M24D"); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: rounding the result + /// + /// This shows how one might find the difference between two dates and + /// have the result rounded to the nearest month. + /// + /// In this case, we need to hand-construct a [`DateDifference`] + /// in order to gain full configurability. + /// + /// ``` + /// use jiff::{civil::{date, DateDifference}, Unit, ToSpan}; + /// + /// let d1 = date(1995, 12, 07); + /// let d2 = date(2019, 02, 06); + /// + /// let span = d1.until(DateDifference::from(d2).smallest(Unit::Month))?; + /// assert_eq!(span, 277.months().fieldwise()); + /// + /// // Or even include years to make the span a bit more comprehensible. + /// let span = d1.until( + /// DateDifference::from(d2) + /// .smallest(Unit::Month) + /// .largest(Unit::Year), + /// )?; + /// // Notice that we are one day shy of 23y2m. Rounding spans computed + /// // between dates uses truncation by default. + /// assert_eq!(span, 23.years().months(1).fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: units biggers than days inhibit reversibility + /// + /// If you ask for units bigger than days, then adding the span + /// returned to the `other` date is not guaranteed to result in the + /// original date. For example: + /// + /// ``` + /// use jiff::{civil::date, Unit, ToSpan}; + /// + /// let d1 = date(2024, 3, 2); + /// let d2 = date(2024, 5, 1); + /// + /// let span = d1.until((Unit::Month, d2))?; + /// assert_eq!(span, 1.month().days(29).fieldwise()); + /// let maybe_original = d2.checked_sub(span)?; + /// // Not the same as the original datetime! + /// assert_eq!(maybe_original, date(2024, 3, 3)); + /// + /// // But in the default configuration, days are always the biggest unit + /// // and reversibility is guaranteed. + /// let span = d1.until(d2)?; + /// assert_eq!(span, 60.days().fieldwise()); + /// let is_original = d2.checked_sub(span)?; + /// assert_eq!(is_original, d1); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This occurs because spans are added as if by adding the biggest units + /// first, and then the smaller units. Because months vary in length, + /// their meaning can change depending on how the span is added. In this + /// case, adding one month to `2024-03-02` corresponds to 31 days, but + /// subtracting one month from `2024-05-01` corresponds to 30 days. + #[inline] + pub fn until>( + self, + other: A, + ) -> Result { + let args: DateDifference = other.into(); + let span = args.since_with_largest_unit(self)?; + if args.rounding_may_change_span() { + span.round(args.round.relative(self)) + } else { + Ok(span) + } + } + + /// This routine is identical to [`Date::until`], but the order of the + /// parameters is flipped. + /// + /// # Errors + /// + /// This has the same error conditions as [`Date::until`]. + /// + /// # Example + /// + /// This routine can be used via the `-` operator. Since the default + /// configuration is used and because a `Span` can represent the difference + /// between any two possible dates, it will never panic. + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let earlier = date(2006, 8, 24); + /// let later = date(2019, 1, 31); + /// assert_eq!(later - earlier, 4543.days().fieldwise()); + /// // Equivalent to: + /// assert_eq!(later.since(earlier).unwrap(), 4543.days().fieldwise()); + /// ``` + #[inline] + pub fn since>( + self, + other: A, + ) -> Result { + let args: DateDifference = other.into(); + let span = -args.since_with_largest_unit(self)?; + if args.rounding_may_change_span() { + span.round(args.round.relative(self)) + } else { + Ok(span) + } + } + + /// Returns an absolute duration representing the elapsed time from this + /// date until the given `other` date. + /// + /// When `other` occurs before this date, then the duration returned will + /// be negative. + /// + /// Unlike [`Date::until`], this returns a duration corresponding to a + /// 96-bit integer of nanoseconds between two dates. In this case of + /// computing durations between civil dates where all days are assumed to + /// be 24 hours long, the duration returned will always be divisible by + /// 24 hours. (That is, `24 * 60 * 60 * 1_000_000_000` nanoseconds.) + /// + /// # Fallibility + /// + /// This routine never panics or returns an error. Since there are no + /// configuration options that can be incorrectly provided, no error is + /// possible when calling this routine. In contrast, [`Date::until`] can + /// return an error in some cases due to misconfiguration. But like this + /// routine, [`Date::until`] never panics or returns an error in its + /// default configuration. + /// + /// # When should I use this versus [`Date::until`]? + /// + /// See the type documentation for [`SignedDuration`] for the section on + /// when one should use [`Span`] and when one should use `SignedDuration`. + /// In short, use `Span` (and therefore `Date::until`) unless you have a + /// specific reason to do otherwise. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::date, SignedDuration}; + /// + /// let earlier = date(2006, 8, 24); + /// let later = date(2019, 1, 31); + /// assert_eq!( + /// earlier.duration_until(later), + /// SignedDuration::from_hours(4543 * 24), + /// ); + /// ``` + /// + /// # Example: difference with [`Date::until`] + /// + /// The main difference between this routine and `Date::until` is that the + /// latter can return units other than a 96-bit integer of nanoseconds. + /// While a 96-bit integer of nanoseconds can be converted into other + /// units like hours, this can only be done for uniform units. (Uniform + /// units are units for which each individual unit always corresponds to + /// the same elapsed time regardless of the datetime it is relative to.) + /// This can't be done for units like years, months or days without a + /// relative date. + /// + /// ``` + /// use jiff::{civil::date, SignedDuration, Span, SpanRound, ToSpan, Unit}; + /// + /// let d1 = date(2024, 1, 1); + /// let d2 = date(2025, 4, 1); + /// + /// let span = d1.until((Unit::Year, d2))?; + /// assert_eq!(span, 1.year().months(3).fieldwise()); + /// + /// let duration = d1.duration_until(d2); + /// assert_eq!(duration, SignedDuration::from_hours(456 * 24)); + /// // There's no way to extract years or months from the signed + /// // duration like one might extract hours (because every hour + /// // is the same length). Instead, you actually have to convert + /// // it to a span and then balance it by providing a relative date! + /// let options = SpanRound::new().largest(Unit::Year).relative(d1); + /// let span = Span::try_from(duration)?.round(options)?; + /// assert_eq!(span, 1.year().months(3).fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: getting an unsigned duration + /// + /// If you're looking to find the duration between two dates as a + /// [`std::time::Duration`], you'll need to use this method to get a + /// [`SignedDuration`] and then convert it to a `std::time::Duration`: + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::date, SignedDuration}; + /// + /// let d1 = date(2024, 7, 1); + /// let d2 = date(2024, 8, 1); + /// let duration = Duration::try_from(d1.duration_until(d2))?; + /// assert_eq!(duration, Duration::from_secs(31 * 24 * 60 * 60)); + /// + /// // Note that unsigned durations cannot represent all + /// // possible differences! If the duration would be negative, + /// // then the conversion fails: + /// assert!(Duration::try_from(d2.duration_until(d1)).is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn duration_until(self, other: Date) -> SignedDuration { + SignedDuration::date_until(self, other) + } + + /// This routine is identical to [`Date::duration_until`], but the order of + /// the parameters is flipped. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::date, SignedDuration}; + /// + /// let earlier = date(2006, 8, 24); + /// let later = date(2019, 1, 31); + /// assert_eq!( + /// later.duration_since(earlier), + /// SignedDuration::from_hours(4543 * 24), + /// ); + /// ``` + #[inline] + pub fn duration_since(self, other: Date) -> SignedDuration { + SignedDuration::date_until(other, self) + } + + /// Return an iterator of periodic dates determined by the given span. + /// + /// The given span may be negative, in which case, the iterator will move + /// backwards through time. The iterator won't stop until either the span + /// itself overflows, or it would otherwise exceed the minimum or maximum + /// `Date` value. + /// + /// # Example: Halloween day of the week + /// + /// As a kid, I always hoped for Halloween to fall on a weekend. With this + /// program, we can print the day of the week for all Halloweens in the + /// 2020s. + /// + /// ``` + /// use jiff::{civil::{Weekday, date}, ToSpan}; + /// + /// let start = date(2020, 10, 31); + /// let mut halloween_days_of_week = vec![]; + /// for halloween in start.series(1.years()).take(10) { + /// halloween_days_of_week.push( + /// (halloween.year(), halloween.weekday()), + /// ); + /// } + /// assert_eq!(halloween_days_of_week, vec![ + /// (2020, Weekday::Saturday), + /// (2021, Weekday::Sunday), + /// (2022, Weekday::Monday), + /// (2023, Weekday::Tuesday), + /// (2024, Weekday::Thursday), + /// (2025, Weekday::Friday), + /// (2026, Weekday::Saturday), + /// (2027, Weekday::Sunday), + /// (2028, Weekday::Tuesday), + /// (2029, Weekday::Wednesday), + /// ]); + /// ``` + /// + /// # Example: how many times do I mow the lawn in a year? + /// + /// I mow the lawn about every week and a half from the beginning of May + /// to the end of October. About how many times will I mow the lawn in + /// 2024? + /// + /// ``` + /// use jiff::{ToSpan, civil::date}; + /// + /// let start = date(2024, 5, 1); + /// let end = date(2024, 10, 31); + /// let mows = start + /// .series(1.weeks().days(3).hours(12)) + /// .take_while(|&d| d <= end) + /// .count(); + /// assert_eq!(mows, 18); + /// ``` + /// + /// # Example: a period less than a day + /// + /// Using a period less than a day works, but since this type exists at the + /// granularity of a day, some dates may be repeated. + /// + /// ``` + /// use jiff::{civil::{Date, date}, ToSpan}; + /// + /// let start = date(2024, 3, 11); + /// let every_five_hours: Vec = + /// start.series(15.hours()).take(7).collect(); + /// assert_eq!(every_five_hours, vec![ + /// date(2024, 3, 11), + /// date(2024, 3, 11), + /// date(2024, 3, 12), + /// date(2024, 3, 12), + /// date(2024, 3, 13), + /// date(2024, 3, 14), + /// date(2024, 3, 14), + /// ]); + /// ``` + /// + /// # Example: finding the most recent Friday the 13th + /// + /// When did the most recent Friday the 13th occur? + /// + /// ``` + /// use jiff::{civil::{Weekday, date}, ToSpan}; + /// + /// let start = date(2024, 3, 13); + /// let mut found = None; + /// for date in start.series(-1.months()) { + /// if date.weekday() == Weekday::Friday { + /// found = Some(date); + /// break; + /// } + /// } + /// assert_eq!(found, Some(date(2023, 10, 13))); + /// ``` + #[inline] + pub fn series(self, period: Span) -> DateSeries { + DateSeries { start: self, period, step: 0 } + } +} + +/// Parsing and formatting using a "printf"-style API. +impl Date { + /// Parses a civil date in `input` matching the given `format`. + /// + /// The format string uses a "printf"-style API where conversion + /// specifiers can be used as place holders to match components of + /// a datetime. For details on the specifiers supported, see the + /// [`fmt::strtime`] module documentation. + /// + /// # Errors + /// + /// This returns an error when parsing failed. This might happen because + /// the format string itself was invalid, or because the input didn't match + /// the format string. + /// + /// This also returns an error if there wasn't sufficient information to + /// construct a civil date. For example, if an offset wasn't parsed. + /// + /// # Example + /// + /// This example shows how to parse a civil date: + /// + /// ``` + /// use jiff::civil::Date; + /// + /// // Parse an American date with a two-digit year. + /// let date = Date::strptime("%m/%d/%y", "7/14/24")?; + /// assert_eq!(date.to_string(), "2024-07-14"); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn strptime( + format: impl AsRef<[u8]>, + input: impl AsRef<[u8]>, + ) -> Result { + fmt::strtime::parse(format, input).and_then(|tm| tm.to_date()) + } + + /// Formats this civil date according to the given `format`. + /// + /// The format string uses a "printf"-style API where conversion + /// specifiers can be used as place holders to format components of + /// a datetime. For details on the specifiers supported, see the + /// [`fmt::strtime`] module documentation. + /// + /// # Errors and panics + /// + /// While this routine itself does not error or panic, using the value + /// returned may result in a panic if formatting fails. See the + /// documentation on [`fmt::strtime::Display`] for more information. + /// + /// To format in a way that surfaces errors without panicking, use either + /// [`fmt::strtime::format`] or [`fmt::strtime::BrokenDownTime::format`]. + /// + /// # Example + /// + /// This example shows how to format a civil date: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let date = date(2024, 7, 15); + /// let string = date.strftime("%Y-%m-%d is a %A").to_string(); + /// assert_eq!(string, "2024-07-15 is a Monday"); + /// ``` + #[inline] + pub fn strftime<'f, F: 'f + ?Sized + AsRef<[u8]>>( + &self, + format: &'f F, + ) -> fmt::strtime::Display<'f> { + fmt::strtime::Display { fmt: format.as_ref(), tm: (*self).into() } + } +} + +/// Internal APIs. +impl Date { + #[inline] + pub(crate) fn until_days(self, other: Date) -> i32 { + if self == other { + return 0; + } + let start = self.to_unix_epoch_day(); + let end = other.to_unix_epoch_day(); + end - start + } + + #[cfg_attr(feature = "perf-inline", inline(always))] + pub(crate) fn to_unix_epoch_day(self) -> i32 { + self.to_idate_const().to_epoch_day().epoch_day + } + + #[cfg_attr(feature = "perf-inline", inline(always))] + pub(crate) fn from_unix_epoch_day(epoch_day: i32) -> Date { + Date::from_idate_const(IEpochDay { epoch_day }.to_date()) + } + + #[inline] + pub(crate) const fn to_idate_const(self) -> IDate { + IDate { year: self.year, month: self.month, day: self.day } + } + + #[inline] + pub(crate) const fn from_idate_const(idate: IDate) -> Date { + Date { year: idate.year, month: idate.month, day: idate.day } + } +} + +impl Default for Date { + fn default() -> Date { + Date::ZERO + } +} + +impl core::fmt::Debug for Date { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + core::fmt::Display::fmt(self, f) + } +} + +impl core::fmt::Display for Date { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + use crate::fmt::StdFmtWrite; + + DEFAULT_DATETIME_PRINTER + .print_date(self, StdFmtWrite(f)) + .map_err(|_| core::fmt::Error) + } +} + +impl core::str::FromStr for Date { + type Err = Error; + + fn from_str(string: &str) -> Result { + DEFAULT_DATETIME_PARSER.parse_date(string) + } +} + +impl From for Date { + #[inline] + fn from(weekdate: ISOWeekDate) -> Date { + Date::from_iso_week_date(weekdate) + } +} + +impl From for Date { + #[inline] + fn from(dt: DateTime) -> Date { + dt.date() + } +} + +impl From for Date { + #[inline] + fn from(zdt: Zoned) -> Date { + zdt.datetime().date() + } +} + +impl<'a> From<&'a Zoned> for Date { + #[inline] + fn from(zdt: &'a Zoned) -> Date { + zdt.datetime().date() + } +} + +/// Adds a span of time to a date. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_add`]. +impl core::ops::Add for Date { + type Output = Date; + + #[inline] + fn add(self, rhs: Span) -> Date { + self.checked_add(rhs).expect("adding span to date overflowed") + } +} + +/// Adds a span of time to a date in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_add`]. +impl core::ops::AddAssign for Date { + #[inline] + fn add_assign(&mut self, rhs: Span) { + *self = *self + rhs; + } +} + +/// Subtracts a span of time from a date. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_sub`]. +impl core::ops::Sub for Date { + type Output = Date; + + #[inline] + fn sub(self, rhs: Span) -> Date { + self.checked_sub(rhs).expect("subing span to date overflowed") + } +} + +/// Subtracts a span of time from a date in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_sub`]. +impl core::ops::SubAssign for Date { + #[inline] + fn sub_assign(&mut self, rhs: Span) { + *self = *self - rhs; + } +} + +/// Computes the span of time between two dates. +/// +/// This will return a negative span when the date being subtracted is greater. +/// +/// Since this uses the default configuration for calculating a span between +/// two date (no rounding and largest units is days), this will never panic or +/// fail in any way. +/// +/// To configure the largest unit or enable rounding, use [`Date::since`]. +impl core::ops::Sub for Date { + type Output = Span; + + #[inline] + fn sub(self, rhs: Date) -> Span { + self.since(rhs).expect("since never fails when given Date") + } +} + +/// Adds a signed duration of time to a date. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_add`]. +impl core::ops::Add for Date { + type Output = Date; + + #[inline] + fn add(self, rhs: SignedDuration) -> Date { + self.checked_add(rhs) + .expect("adding signed duration to date overflowed") + } +} + +/// Adds a signed duration of time to a date in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_add`]. +impl core::ops::AddAssign for Date { + #[inline] + fn add_assign(&mut self, rhs: SignedDuration) { + *self = *self + rhs; + } +} + +/// Subtracts a signed duration of time from a date. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_sub`]. +impl core::ops::Sub for Date { + type Output = Date; + + #[inline] + fn sub(self, rhs: SignedDuration) -> Date { + self.checked_sub(rhs) + .expect("subing signed duration to date overflowed") + } +} + +/// Subtracts a signed duration of time from a date in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_sub`]. +impl core::ops::SubAssign for Date { + #[inline] + fn sub_assign(&mut self, rhs: SignedDuration) { + *self = *self - rhs; + } +} + +/// Adds an unsigned duration of time to a date. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_add`]. +impl core::ops::Add for Date { + type Output = Date; + + #[inline] + fn add(self, rhs: UnsignedDuration) -> Date { + self.checked_add(rhs) + .expect("adding unsigned duration to date overflowed") + } +} + +/// Adds an unsigned duration of time to a date in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_add`]. +impl core::ops::AddAssign for Date { + #[inline] + fn add_assign(&mut self, rhs: UnsignedDuration) { + *self = *self + rhs; + } +} + +/// Subtracts an unsigned duration of time from a date. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_sub`]. +impl core::ops::Sub for Date { + type Output = Date; + + #[inline] + fn sub(self, rhs: UnsignedDuration) -> Date { + self.checked_sub(rhs) + .expect("subing unsigned duration to date overflowed") + } +} + +/// Subtracts an unsigned duration of time from a date in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`Date::checked_sub`]. +impl core::ops::SubAssign for Date { + #[inline] + fn sub_assign(&mut self, rhs: UnsignedDuration) { + *self = *self - rhs; + } +} + +#[cfg(feature = "serde")] +impl serde_core::Serialize for Date { + #[inline] + fn serialize( + &self, + serializer: S, + ) -> Result { + serializer.collect_str(self) + } +} + +#[cfg(feature = "serde")] +impl<'de> serde_core::Deserialize<'de> for Date { + #[inline] + fn deserialize>( + deserializer: D, + ) -> Result { + use serde_core::de; + + struct DateVisitor; + + impl<'de> de::Visitor<'de> for DateVisitor { + type Value = Date; + + fn expecting( + &self, + f: &mut core::fmt::Formatter, + ) -> core::fmt::Result { + f.write_str("a date string") + } + + #[inline] + fn visit_bytes( + self, + value: &[u8], + ) -> Result { + DEFAULT_DATETIME_PARSER + .parse_date(value) + .map_err(de::Error::custom) + } + + #[inline] + fn visit_str(self, value: &str) -> Result { + self.visit_bytes(value.as_bytes()) + } + } + + deserializer.deserialize_str(DateVisitor) + } +} + +#[cfg(test)] +impl quickcheck::Arbitrary for Date { + fn arbitrary(g: &mut quickcheck::Gen) -> Date { + let year = b::Year::arbitrary(g); + let month = b::Month::arbitrary(g); + let day = b::Day::arbitrary(g); + Date::new_constrain(year, month, day).unwrap() + } + + fn shrink(&self) -> alloc::boxed::Box> { + alloc::boxed::Box::new( + (self.year(), self.month(), self.day()).shrink().filter_map( + |(year, month, day)| { + Date::new_constrain(year, month, day).ok() + }, + ), + ) + } +} + +/// An iterator over periodic dates, created by [`Date::series`]. +/// +/// It is exhausted when the next value would exceed the limits of a [`Span`] +/// or [`Date`] value. +/// +/// This iterator is created by [`Date::series`]. +#[derive(Clone, Debug)] +pub struct DateSeries { + start: Date, + period: Span, + step: i64, +} + +impl Iterator for DateSeries { + type Item = Date; + + #[inline] + fn next(&mut self) -> Option { + let span = self.period.checked_mul(self.step).ok()?; + self.step = self.step.checked_add(1)?; + let date = self.start.checked_add(span).ok()?; + Some(date) + } +} + +impl core::iter::FusedIterator for DateSeries {} + +/// Options for [`Date::checked_add`] and [`Date::checked_sub`]. +/// +/// This type provides a way to ergonomically add one of a few different +/// duration types to a [`Date`]. +/// +/// The main way to construct values of this type is with its `From` trait +/// implementations: +/// +/// * `From for DateArithmetic` adds (or subtracts) the given span to the +/// receiver date. +/// * `From for DateArithmetic` adds (or subtracts) +/// the given signed duration to the receiver date. +/// * `From for DateArithmetic` adds (or subtracts) +/// the given unsigned duration to the receiver date. +/// +/// # Example +/// +/// ``` +/// use std::time::Duration; +/// +/// use jiff::{civil::date, SignedDuration, ToSpan}; +/// +/// let d = date(2024, 2, 29); +/// assert_eq!(d.checked_add(1.year())?, date(2025, 2, 28)); +/// assert_eq!(d.checked_add(SignedDuration::from_hours(24))?, date(2024, 3, 1)); +/// assert_eq!(d.checked_add(Duration::from_secs(24 * 60 * 60))?, date(2024, 3, 1)); +/// +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug)] +pub struct DateArithmetic { + duration: Duration, +} + +impl DateArithmetic { + #[inline] + fn checked_add(self, date: Date) -> Result { + match self.duration.to_signed()? { + SDuration::Span(span) => date.checked_add_span(span), + SDuration::Absolute(sdur) => date.checked_add_duration(sdur), + } + } + + #[inline] + fn checked_neg(self) -> Result { + let duration = self.duration.checked_neg()?; + Ok(DateArithmetic { duration }) + } + + #[inline] + fn is_negative(&self) -> bool { + self.duration.is_negative() + } +} + +impl From for DateArithmetic { + fn from(span: Span) -> DateArithmetic { + let duration = Duration::from(span); + DateArithmetic { duration } + } +} + +impl From for DateArithmetic { + fn from(sdur: SignedDuration) -> DateArithmetic { + let duration = Duration::from(sdur); + DateArithmetic { duration } + } +} + +impl From for DateArithmetic { + fn from(udur: UnsignedDuration) -> DateArithmetic { + let duration = Duration::from(udur); + DateArithmetic { duration } + } +} + +impl<'a> From<&'a Span> for DateArithmetic { + fn from(span: &'a Span) -> DateArithmetic { + DateArithmetic::from(*span) + } +} + +impl<'a> From<&'a SignedDuration> for DateArithmetic { + fn from(sdur: &'a SignedDuration) -> DateArithmetic { + DateArithmetic::from(*sdur) + } +} + +impl<'a> From<&'a UnsignedDuration> for DateArithmetic { + fn from(udur: &'a UnsignedDuration) -> DateArithmetic { + DateArithmetic::from(*udur) + } +} + +/// Options for [`Date::since`] and [`Date::until`]. +/// +/// This type provides a way to configure the calculation of spans between two +/// [`Date`] values. In particular, both `Date::since` and `Date::until` accept +/// anything that implements `Into`. There are a few key trait +/// implementations that make this convenient: +/// +/// * `From for DateDifference` will construct a configuration consisting +/// of just the date. So for example, `date1.until(date2)` will return the span +/// from `date1` to `date2`. +/// * `From for DateDifference` will construct a configuration +/// consisting of just the date from the given datetime. So for example, +/// `date.since(datetime)` returns the span from `datetime.date()` to `date`. +/// * `From<(Unit, Date)>` is a convenient way to specify the largest units +/// that should be present on the span returned. By default, the largest units +/// are days. Using this trait implementation is equivalent to +/// `DateDifference::new(date).largest(unit)`. +/// * `From<(Unit, DateTime)>` is like the one above, but with the date from +/// the given datetime. +/// +/// One can also provide a `DateDifference` value directly. Doing so is +/// necessary to use the rounding features of calculating a span. For example, +/// setting the smallest unit (defaults to [`Unit::Day`]), the rounding mode +/// (defaults to [`RoundMode::Trunc`]) and the rounding increment (defaults to +/// `1`). The defaults are selected such that no rounding occurs. +/// +/// Rounding a span as part of calculating it is provided as a convenience. +/// Callers may choose to round the span as a distinct step via +/// [`Span::round`], but callers may need to provide a reference date +/// for rounding larger units. By coupling rounding with routines like +/// [`Date::since`], the reference date can be set automatically based on +/// the input to `Date::since`. +/// +/// # Example +/// +/// This example shows how to round a span between two date to the nearest +/// year, with ties breaking away from zero. +/// +/// ``` +/// use jiff::{civil::{Date, DateDifference}, RoundMode, ToSpan, Unit}; +/// +/// let d1 = "2024-03-15".parse::()?; +/// let d2 = "2030-09-13".parse::()?; +/// let span = d1.until( +/// DateDifference::new(d2) +/// .smallest(Unit::Year) +/// .mode(RoundMode::HalfExpand), +/// )?; +/// assert_eq!(span, 6.years().fieldwise()); +/// +/// // If the span were one day longer, it would round up to 7 years. +/// let d2 = "2030-09-14".parse::()?; +/// let span = d1.until( +/// DateDifference::new(d2) +/// .smallest(Unit::Year) +/// .mode(RoundMode::HalfExpand), +/// )?; +/// assert_eq!(span, 7.years().fieldwise()); +/// +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug)] +pub struct DateDifference { + date: Date, + round: SpanRound<'static>, +} + +impl DateDifference { + /// Create a new default configuration for computing the span between + /// the given date and some other date (specified as the receiver in + /// [`Date::since`] or [`Date::until`]). + #[inline] + pub fn new(date: Date) -> DateDifference { + // We use truncation rounding by default since it seems that's + // what is generally expected when computing the difference between + // datetimes. + // + // See: https://github.com/tc39/proposal-temporal/issues/1122 + let round = + SpanRound::new().mode(RoundMode::Trunc).smallest(Unit::Day); + DateDifference { date, round } + } + + /// Set the smallest units allowed in the span returned. + /// + /// When a largest unit is not specified, then the largest unit is + /// automatically set to be equal to the smallest unit. + /// + /// This defaults to `Unit::Day`. + /// + /// # Errors + /// + /// The smallest units must be no greater than the largest units. If this + /// is violated, then computing a span with this configuration will result + /// in an error. + /// + /// The unit set must also be a calendar unit. Using a time unit will + /// result in an error. + /// + /// # Example + /// + /// This shows how to round a span between two date to the nearest + /// number of weeks. + /// + /// ``` + /// use jiff::{civil::{Date, DateDifference}, RoundMode, ToSpan, Unit}; + /// + /// let d1 = "2024-03-15".parse::()?; + /// let d2 = "2030-11-22".parse::()?; + /// let span = d1.until( + /// DateDifference::new(d2) + /// .smallest(Unit::Week) + /// .largest(Unit::Week) + /// .mode(RoundMode::HalfExpand), + /// )?; + /// assert_eq!(span, 349.weeks().fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn smallest(self, unit: Unit) -> DateDifference { + DateDifference { round: self.round.smallest(unit), ..self } + } + + /// Set the largest units allowed in the span returned. + /// + /// When a largest unit is not specified, then the largest unit is + /// automatically set to be equal to the smallest unit or `Unit::Day`, + /// whichever is greater. Otherwise, when the largest unit is not + /// specified, it is set to days. + /// + /// Once a largest unit is set, there is no way to change this rounding + /// configuration back to using the "automatic" default. Instead, callers + /// must create a new configuration. + /// + /// # Errors + /// + /// The largest units, when set, must be at least as big as the smallest + /// units (which defaults to [`Unit::Day`]). If this is violated, then + /// computing a span with this configuration will result in an error. + /// + /// The unit set must also be a calendar unit. Using a time unit will + /// result in an error. + /// + /// # Example + /// + /// This shows how to round a span between two date to units no + /// bigger than months. + /// + /// ``` + /// use jiff::{civil::{Date, DateDifference}, ToSpan, Unit}; + /// + /// let d1 = "2024-03-15".parse::()?; + /// let d2 = "2030-11-22".parse::()?; + /// let span = d1.until( + /// DateDifference::new(d2).largest(Unit::Month), + /// )?; + /// assert_eq!(span, 80.months().days(7).fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn largest(self, unit: Unit) -> DateDifference { + DateDifference { round: self.round.largest(unit), ..self } + } + + /// Set the rounding mode. + /// + /// This defaults to [`RoundMode::Trunc`] since it's plausible that + /// rounding "up" in the context of computing the span between two date + /// could be surprising in a number of cases. The [`RoundMode::HalfExpand`] + /// mode corresponds to typical rounding you might have learned about in + /// school. But a variety of other rounding modes exist. + /// + /// # Example + /// + /// This shows how to always round "up" towards positive infinity. + /// + /// ``` + /// use jiff::{civil::{Date, DateDifference}, RoundMode, ToSpan, Unit}; + /// + /// let d1 = "2024-01-15".parse::()?; + /// let d2 = "2024-08-16".parse::()?; + /// let span = d1.until( + /// DateDifference::new(d2) + /// .smallest(Unit::Month) + /// .mode(RoundMode::Ceil), + /// )?; + /// // Only 7 months and 1 day elapsed, but we asked to always round up! + /// assert_eq!(span, 8.months().fieldwise()); + /// + /// // Since `Ceil` always rounds toward positive infinity, the behavior + /// // flips for a negative span. + /// let span = d1.since( + /// DateDifference::new(d2) + /// .smallest(Unit::Month) + /// .mode(RoundMode::Ceil), + /// )?; + /// assert_eq!(span, -7.months().fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn mode(self, mode: RoundMode) -> DateDifference { + DateDifference { round: self.round.mode(mode), ..self } + } + + /// Set the rounding increment for the smallest unit. + /// + /// The default value is `1`. Other values permit rounding the smallest + /// unit to the nearest integer increment specified. For example, if the + /// smallest unit is set to [`Unit::Month`], then a rounding increment of + /// `2` would result in rounding in increments of every other month. + /// + /// # Errors + /// + /// The increment must be greater than zero and less than or equal to + /// `1_000_000_000`. + /// + /// The error will occur when computing the span, and not when setting + /// the increment here. + /// + /// # Example + /// + /// This shows how to round the span between two date to the nearest even + /// month. + /// + /// ``` + /// use jiff::{civil::{Date, DateDifference}, RoundMode, ToSpan, Unit}; + /// + /// let d1 = "2024-01-15".parse::()?; + /// let d2 = "2024-08-15".parse::()?; + /// let span = d1.until( + /// DateDifference::new(d2) + /// .smallest(Unit::Month) + /// .increment(2) + /// .mode(RoundMode::HalfExpand), + /// )?; + /// assert_eq!(span, 8.months().fieldwise()); + /// + /// // If our second date was just one day less, rounding would truncate + /// // down to 6 months! + /// let d2 = "2024-08-14".parse::()?; + /// let span = d1.until( + /// DateDifference::new(d2) + /// .smallest(Unit::Month) + /// .increment(2) + /// .mode(RoundMode::HalfExpand), + /// )?; + /// assert_eq!(span, 6.months().fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn increment(self, increment: i64) -> DateDifference { + DateDifference { round: self.round.increment(increment), ..self } + } + + /// Returns true if and only if this configuration could change the span + /// via rounding. + #[inline] + fn rounding_may_change_span(&self) -> bool { + self.round.rounding_calendar_only_may_change_span() + } + + /// Returns the span of time since `d1` to the date in this configuration. + /// The biggest units allowed are determined by the `smallest` and + /// `largest` settings, but defaults to `Unit::Day`. + #[inline] + fn since_with_largest_unit(&self, d1: Date) -> Result { + // N.B. A logical (but inefficient yet easier to understand) + // description of the behavior here can be found in the Temporal spec: + // https://tc39.es/proposal-temporal/#sec-temporal-calendardateuntil + // + // Immense discussion discussing and justifying this behavior: + // https://github.com/tc39/proposal-temporal/issues/2535 + + let smallest = self.round.get_smallest(); + if smallest < Unit::Day { + return Err(Error::from(UnitConfigError::CivilDate { + given: smallest, + })); + } + + let largest = self.round.get_largest().unwrap_or(smallest); + if largest < Unit::Day { + return Err(Error::from(UnitConfigError::CivilDate { + given: largest, + })); + } + + let d2 = self.date; + if d1 == d2 { + return Ok(Span::new()); + } + if largest <= Unit::Week { + let mut weeks: i32 = 0; + let mut days = d1.until_days(d2); + if largest == Unit::Week { + weeks = days / 7; + days %= 7; + } + return Ok(Span::new().weeks(weeks).days(days)); + } + + let year1 = d1.year(); + let month1 = d1.month(); + let day1 = d1.day(); + let mut year2 = d2.year(); + let mut month2 = d2.month(); + let day2 = d2.day(); + + let mut years = year2 - year1; + let mut months = i32::from(month2 - month1); + let mut days = i32::from(day2 - day1); + if years != 0 || months != 0 { + let sign = if years != 0 { + b::Sign::from(years) + } else { + b::Sign::from(months) + }; + let mut days_in_month2 = d2.days_in_month(); + let mut day_correct = 0; + if b::Sign::from(days) == -sign { + // Justifying this operation as infallible is quite tricky. + // It can only fail in two cases: year2=9999, month2=12 and + // sign=Negative or year2=-9999, month2=1 and sign=Positive. In + // both of those cases, year will overflow its boundaries. + // + // However, neither case is possible. Namely, whenever + // sign=Negative, it follows that either `year1 > year2` or + // `month1 > month2`. But there are no such values of `year1` + // or `month1` that satisfy `year1 > 9999 or month1 > 12` + // because `9999` is the maximum legal year value. + // + // A similar argument follows for sign=Positive and + // `year2=-9999` and `month2=1`. Therefore, this `unwrap()` is + // okay. + let (y, m) = month_add_one(year2, month2, -sign).unwrap(); + year2 = y; + month2 = m; + + years = year2 - year1; + months = i32::from(month2 - month1); + let original_days_in_month1 = days_in_month2; + days_in_month2 = itime::days_in_month(year2, month2); + day_correct = if sign.is_negative() { + -original_days_in_month1 + } else { + days_in_month2 + }; + } + + let day0_trunc = i32::from(day1.min(days_in_month2)); + days = i32::from(day2) - day0_trunc + i32::from(day_correct); + + if years != 0 { + months = i32::from(month2 - month1); + if b::Sign::from(months) == -sign { + let month_correct = sign * 12; + year2 -= sign.as_i16(); + years = year2 - year1; + + months = i32::from(month2 - month1) + month_correct; + } + } + } + if largest == Unit::Month && years != 0 { + months = + b::SpanMonths::checked_add(months, i32::from(years) * 12)?; + years = 0; + } + Ok(Span::new().years(years).months(months).days(days)) + } +} + +impl From for DateDifference { + #[inline] + fn from(date: Date) -> DateDifference { + DateDifference::new(date) + } +} + +impl From for DateDifference { + #[inline] + fn from(dt: DateTime) -> DateDifference { + DateDifference::from(Date::from(dt)) + } +} + +impl From for DateDifference { + #[inline] + fn from(zdt: Zoned) -> DateDifference { + DateDifference::from(Date::from(zdt)) + } +} + +impl<'a> From<&'a Zoned> for DateDifference { + #[inline] + fn from(zdt: &'a Zoned) -> DateDifference { + DateDifference::from(zdt.datetime()) + } +} + +impl From<(Unit, Date)> for DateDifference { + #[inline] + fn from((largest, date): (Unit, Date)) -> DateDifference { + DateDifference::from(date).largest(largest) + } +} + +impl From<(Unit, DateTime)> for DateDifference { + #[inline] + fn from((largest, dt): (Unit, DateTime)) -> DateDifference { + DateDifference::from((largest, Date::from(dt))) + } +} + +impl From<(Unit, Zoned)> for DateDifference { + #[inline] + fn from((largest, zdt): (Unit, Zoned)) -> DateDifference { + DateDifference::from((largest, Date::from(zdt))) + } +} + +impl<'a> From<(Unit, &'a Zoned)> for DateDifference { + #[inline] + fn from((largest, zdt): (Unit, &'a Zoned)) -> DateDifference { + DateDifference::from((largest, zdt.datetime())) + } +} + +/// A builder for setting the fields on a [`Date`]. +/// +/// This builder is constructed via [`Date::with`]. +/// +/// # Example +/// +/// The builder ensures one can chain together the individual components +/// of a date without it failing at an intermediate step. For example, +/// if you had a date of `2024-10-31` and wanted to change both the day +/// and the month, and each setting was validated independent of the other, +/// you would need to be careful to set the day first and then the month. +/// In some cases, you would need to set the month first and then the day! +/// +/// But with the builder, you can set values in any order: +/// +/// ``` +/// use jiff::civil::date; +/// +/// let d1 = date(2024, 10, 31); +/// let d2 = d1.with().month(11).day(30).build()?; +/// assert_eq!(d2, date(2024, 11, 30)); +/// +/// let d1 = date(2024, 4, 30); +/// let d2 = d1.with().day(31).month(7).build()?; +/// assert_eq!(d2, date(2024, 7, 31)); +/// +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug)] +pub struct DateWith { + original: Date, + year: Option, + month: Option, + day: Option, +} + +impl DateWith { + #[inline] + fn new(original: Date) -> DateWith { + DateWith { original, year: None, month: None, day: None } + } + + /// Create a new `Date` from the fields set on this configuration. + /// + /// An error occurs when the fields combine to an invalid date. + /// + /// For any fields not set on this configuration, the values are taken from + /// the [`Date`] that originally created this configuration. When no values + /// are set, this routine is guaranteed to succeed and will always return + /// the original date without modification. + /// + /// # Example + /// + /// This creates a date corresponding to the last day in the year: + /// + /// ``` + /// use jiff::civil::date; + /// + /// assert_eq!( + /// date(2023, 1, 1).with().day_of_year_no_leap(365).build()?, + /// date(2023, 12, 31), + /// ); + /// // It also works with leap years for the same input: + /// assert_eq!( + /// date(2024, 1, 1).with().day_of_year_no_leap(365).build()?, + /// date(2024, 12, 31), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: error for invalid date + /// + /// If the fields combine to form an invalid date, then an error is + /// returned: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 11, 30); + /// assert!(d.with().day(31).build().is_err()); + /// + /// let d = date(2024, 2, 29); + /// assert!(d.with().year(2023).build().is_err()); + /// ``` + #[inline] + pub fn build(self) -> Result { + let year = match self.year { + None => self.original.year(), + Some(DateWithYear::Jiff(year)) => b::Year::check(year)?, + Some(DateWithYear::EraYear(year, Era::CE)) => { + b::YearCE::check(year)? + } + Some(DateWithYear::EraYear(year, Era::BCE)) => { + let year_bce = b::YearBCE::check(year)?; + -year_bce + 1 + } + }; + let month = match self.month { + None => self.original.month(), + Some(month) => b::Month::check(month)?, + }; + let day = match self.day { + None => self.original.day(), + Some(DateWithDay::OfMonth(day)) => b::Day::check(day)?, + Some(DateWithDay::OfYear(day)) => { + let idate = IDate::from_day_of_year(year, day) + .map_err(Error::itime_range)?; + return Ok(Date::from_idate_const(idate)); + } + Some(DateWithDay::OfYearNoLeap(day)) => { + let idate = IDate::from_day_of_year_no_leap(year, day) + .map_err(Error::itime_range)?; + return Ok(Date::from_idate_const(idate)); + } + }; + Date::new(year, month, day) + } + + /// Set the year field on a [`Date`]. + /// + /// One can access this value via [`Date::year`]. + /// + /// This overrides any previous year settings. + /// + /// # Errors + /// + /// This returns an error when [`DateWith::build`] is called if the given + /// year is outside the range `-9999..=9999`. This can also return an error + /// if the resulting date is otherwise invalid. + /// + /// # Example + /// + /// This shows how to create a new date with a different year: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2005, 11, 5); + /// assert_eq!(d1.year(), 2005); + /// let d2 = d1.with().year(2007).build()?; + /// assert_eq!(d2.year(), 2007); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: only changing the year can fail + /// + /// For example, while `2024-02-29` is valid, `2023-02-29` is not: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2024, 2, 29); + /// assert!(d1.with().year(2023).build().is_err()); + /// ``` + #[inline] + pub fn year(self, year: i16) -> DateWith { + DateWith { year: Some(DateWithYear::Jiff(year)), ..self } + } + + /// Set year of a date via its era and its non-negative numeric component. + /// + /// One can access this value via [`Date::era_year`]. + /// + /// # Errors + /// + /// This returns an error when [`DateWith::build`] is called if the year is + /// outside the range for the era specified. For [`Era::BCE`], the range is + /// `1..=10000`. For [`Era::CE`], the range is `1..=9999`. + /// + /// # Example + /// + /// This shows that `CE` years are equivalent to the years used by this + /// crate: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let d1 = date(2005, 11, 5); + /// assert_eq!(d1.year(), 2005); + /// let d2 = d1.with().era_year(2007, Era::CE).build()?; + /// assert_eq!(d2.year(), 2007); + /// + /// // CE years are always positive and can be at most 9999: + /// assert!(d1.with().era_year(-5, Era::CE).build().is_err()); + /// assert!(d1.with().era_year(10_000, Era::CE).build().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// But `BCE` years always correspond to years less than or equal to `0` + /// in this crate: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let d1 = date(-27, 7, 1); + /// assert_eq!(d1.year(), -27); + /// assert_eq!(d1.era_year(), (28, Era::BCE)); + /// + /// let d2 = d1.with().era_year(509, Era::BCE).build()?; + /// assert_eq!(d2.year(), -508); + /// assert_eq!(d2.era_year(), (509, Era::BCE)); + /// + /// let d2 = d1.with().era_year(10_000, Era::BCE).build()?; + /// assert_eq!(d2.year(), -9_999); + /// assert_eq!(d2.era_year(), (10_000, Era::BCE)); + /// + /// // BCE years are always positive and can be at most 10000: + /// assert!(d1.with().era_year(-5, Era::BCE).build().is_err()); + /// assert!(d1.with().era_year(10_001, Era::BCE).build().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: overrides `DateWith::year` + /// + /// Setting this option will override any previous `DateWith::year` + /// option: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let d1 = date(2024, 7, 2); + /// let d2 = d1.with().year(2000).era_year(1900, Era::CE).build()?; + /// assert_eq!(d2, date(1900, 7, 2)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// Similarly, `DateWith::year` will override any previous call to + /// `DateWith::era_year`: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let d1 = date(2024, 7, 2); + /// let d2 = d1.with().era_year(1900, Era::CE).year(2000).build()?; + /// assert_eq!(d2, date(2000, 7, 2)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn era_year(self, year: i16, era: Era) -> DateWith { + DateWith { year: Some(DateWithYear::EraYear(year, era)), ..self } + } + + /// Set the month field on a [`Date`]. + /// + /// One can access this value via [`Date::month`]. + /// + /// This overrides any previous month settings. + /// + /// # Errors + /// + /// This returns an error when [`DateWith::build`] is called if the given + /// month is outside the range `1..=12`. This can also return an error if + /// the resulting date is otherwise invalid. + /// + /// # Example + /// + /// This shows how to create a new date with a different month: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2005, 11, 5); + /// assert_eq!(d1.month(), 11); + /// let d2 = d1.with().month(6).build()?; + /// assert_eq!(d2.month(), 6); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: only changing the month can fail + /// + /// For example, while `2024-10-31` is valid, `2024-11-31` is not: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 10, 31); + /// assert!(d.with().month(11).build().is_err()); + /// ``` + #[inline] + pub fn month(self, month: i8) -> DateWith { + DateWith { month: Some(month), ..self } + } + + /// Set the day field on a [`Date`]. + /// + /// One can access this value via [`Date::day`]. + /// + /// This overrides any previous day settings. + /// + /// # Errors + /// + /// This returns an error when [`DateWith::build`] is called if the given + /// given day is outside of allowable days for the corresponding year and + /// month fields. + /// + /// # Example + /// + /// This shows some examples of setting the day, including a leap day: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2024, 2, 5); + /// assert_eq!(d1.day(), 5); + /// let d2 = d1.with().day(10).build()?; + /// assert_eq!(d2.day(), 10); + /// let d3 = d1.with().day(29).build()?; + /// assert_eq!(d3.day(), 29); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: changing only the day can fail + /// + /// This shows some examples that will fail: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d1 = date(2023, 2, 5); + /// // 2023 is not a leap year + /// assert!(d1.with().day(29).build().is_err()); + /// + /// // September has 30 days, not 31. + /// let d1 = date(2023, 9, 5); + /// assert!(d1.with().day(31).build().is_err()); + /// ``` + #[inline] + pub fn day(self, day: i8) -> DateWith { + DateWith { day: Some(DateWithDay::OfMonth(day)), ..self } + } + + /// Set the day field on a [`Date`] via the ordinal number of a day within + /// a year. + /// + /// When used, any settings for month are ignored since the month is + /// determined by the day of the year. + /// + /// The valid values for `day` are `1..=366`. Note though that `366` is + /// only valid for leap years. + /// + /// This overrides any previous day settings. + /// + /// # Errors + /// + /// This returns an error when [`DateWith::build`] is called if the given + /// day is outside the allowed range of `1..=366`, or when a value of `366` + /// is given for a non-leap year. + /// + /// # Example + /// + /// This demonstrates that if a year is a leap year, then `60` corresponds + /// to February 29: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 1, 1); + /// assert_eq!(d.with().day_of_year(60).build()?, date(2024, 2, 29)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// But for non-leap years, day 60 is March 1: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2023, 1, 1); + /// assert_eq!(d.with().day_of_year(60).build()?, date(2023, 3, 1)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// And using `366` for a non-leap year will result in an error, since + /// non-leap years only have 365 days: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2023, 1, 1); + /// assert!(d.with().day_of_year(366).build().is_err()); + /// // The maximal year is not a leap year, so it returns an error too. + /// let d = date(9999, 1, 1); + /// assert!(d.with().day_of_year(366).build().is_err()); + /// ``` + #[inline] + pub fn day_of_year(self, day: i16) -> DateWith { + DateWith { day: Some(DateWithDay::OfYear(day)), ..self } + } + + /// Set the day field on a [`Date`] via the ordinal number of a day within + /// a year, but ignoring leap years. + /// + /// When used, any settings for month are ignored since the month is + /// determined by the day of the year. + /// + /// The valid values for `day` are `1..=365`. The value `365` always + /// corresponds to the last day of the year, even for leap years. It is + /// impossible for this routine to return a date corresponding to February + /// 29. + /// + /// This overrides any previous day settings. + /// + /// # Errors + /// + /// This returns an error when [`DateWith::build`] is called if the given + /// day is outside the allowed range of `1..=365`. + /// + /// # Example + /// + /// This demonstrates that `60` corresponds to March 1, regardless of + /// whether the year is a leap year or not: + /// + /// ``` + /// use jiff::civil::date; + /// + /// assert_eq!( + /// date(2023, 1, 1).with().day_of_year_no_leap(60).build()?, + /// date(2023, 3, 1), + /// ); + /// + /// assert_eq!( + /// date(2024, 1, 1).with().day_of_year_no_leap(60).build()?, + /// date(2024, 3, 1), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// And using `365` for any year will always yield the last day of the + /// year: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2023, 1, 1); + /// assert_eq!( + /// d.with().day_of_year_no_leap(365).build()?, + /// d.last_of_year(), + /// ); + /// + /// let d = date(2024, 1, 1); + /// assert_eq!( + /// d.with().day_of_year_no_leap(365).build()?, + /// d.last_of_year(), + /// ); + /// + /// let d = date(9999, 1, 1); + /// assert_eq!( + /// d.with().day_of_year_no_leap(365).build()?, + /// d.last_of_year(), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// A value of `366` is out of bounds, even for leap years: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let d = date(2024, 1, 1); + /// assert!(d.with().day_of_year_no_leap(366).build().is_err()); + /// ``` + #[inline] + pub fn day_of_year_no_leap(self, day: i16) -> DateWith { + DateWith { day: Some(DateWithDay::OfYearNoLeap(day)), ..self } + } +} + +/// Encodes the "with year" option of [`DateWith`]. +/// +/// This encodes the invariant that `DateWith::year` and `DateWith::era_year` +/// are mutually exclusive and override each other. +#[derive(Clone, Copy, Debug)] +enum DateWithYear { + Jiff(i16), + EraYear(i16, Era), +} + +/// Encodes the "with day" option of [`DateWith`]. +/// +/// This encodes the invariant that `DateWith::day`, `DateWith::day_of_year` +/// and `DateWith::day_of_year_no_leap` are all mutually exclusive and override +/// each other. +/// +/// Note that when "day of year" or "day of year no leap" are used, then if a +/// day of month is set, it is ignored. +#[derive(Clone, Copy, Debug)] +enum DateWithDay { + OfMonth(i8), + OfYear(i16), + OfYearNoLeap(i16), +} + +/// Returns the Unix epoch day corresponding to the first day in the ISO 8601 +/// week year given. +/// +/// Ref: http://howardhinnant.github.io/date_algorithms.html +fn iso_week_start_from_year(year: i16) -> i32 { + // A week's year always corresponds to the Gregorian year in which the + // Thursday of that week falls. Therefore, Jan 4 is *always* in the first + // week of any ISO week year. + let date_in_first_week = Date::new_unchecked(year, 1, 4); + // The start of the first week is a Monday, so find the number of days + // since Monday from a date that we know is in the first ISO week of + // `year`. + let diff_from_monday = date_in_first_week.weekday().since(Weekday::Monday); + date_in_first_week.to_unix_epoch_day() - i32::from(diff_from_monday) +} + +/// Adds or subtracts `sign` from the given `year`/`month`. +/// +/// If month overflows in either direction, then the `year` returned is +/// adjusted as appropriate. +fn month_add_one( + mut year: i16, + mut month: i8, + delta: b::Sign, +) -> Result<(i16, i8), Error> { + month += delta.as_i8(); + if month < 1 { + year -= 1; + month += 12; + } else if month > 12 { + year += 1; + month -= 12; + } + let year = b::Year::check(year)?; + Ok((year, month)) +} + +/// Adds the given span of months to the `month` given. +/// +/// If adding (or subtracting) would result in overflowing the `month` value, +/// then the amount by which it overflowed, in units of years, is returned. For +/// example, adding 14 months to the month `3` (March) will result in returning +/// the month `5` (May) with `1` year of overflow. +/// +/// # Preconditions +/// +/// Callers must ensure that `span` is in bounds for `b::SpanMonths`. +fn month_add_overflowing(month: i8, span: i32) -> (i8, i16) { + debug_assert!(b::SpanMonths::check(span).is_ok()); + let month = i32::from(month); + let total = month - 1 + span; + let years = total.div_euclid(12); + let month = total.rem_euclid(12) + 1; + // OK because `month` is derived from `% 12`, so must fit into an `i8`. And + // becuase `years` is derived from `([1-12] - 1 + SpanMonths) / 12` where + // the maximum `SpanMonths` is `239976`. Thus, the result is guaranteed to + // fit into an `i16`. + (month as i8, years as i16) +} + +#[cfg(test)] +mod tests { + use std::io::Cursor; + + use crate::{civil::date, span::span_eq, tz::TimeZone, Timestamp, ToSpan}; + + use super::*; + + #[test] + fn t_from_unix() { + fn date_from_timestamp(timestamp: Timestamp) -> Date { + timestamp.to_zoned(TimeZone::UTC).datetime().date() + } + + assert_eq!( + date(1970, 1, 1), + date_from_timestamp(Timestamp::new(0, 0).unwrap()), + ); + assert_eq!( + date(1969, 12, 31), + date_from_timestamp(Timestamp::new(-1, 0).unwrap()), + ); + assert_eq!( + date(1969, 12, 31), + date_from_timestamp(Timestamp::new(-86_400, 0).unwrap()), + ); + assert_eq!( + date(1969, 12, 30), + date_from_timestamp(Timestamp::new(-86_401, 0).unwrap()), + ); + assert_eq!( + date(-9999, 1, 2), + date_from_timestamp( + Timestamp::new(b::UnixSeconds::MIN, 0).unwrap() + ), + ); + assert_eq!( + date(9999, 12, 30), + date_from_timestamp( + Timestamp::new(b::UnixSeconds::MAX, 0).unwrap() + ), + ); + } + + #[test] + #[cfg(not(miri))] + fn all_days_to_date_roundtrip() { + for rd in -100_000..=100_000 { + let date = Date::from_unix_epoch_day(rd); + let got = date.to_unix_epoch_day(); + assert_eq!(rd, got, "for date {date:?}"); + } + } + + #[test] + #[cfg(not(miri))] + fn all_date_to_days_roundtrip() { + let year_range = 2000..=2500; + // let year_range = -9999..=9999; + for year in year_range { + for month in b::Month::MIN..=b::Month::MAX { + for day in 1..=itime::days_in_month(year, month) { + let date = date(year, month, day); + let rd = date.to_unix_epoch_day(); + let got = Date::from_unix_epoch_day(rd); + assert_eq!(date, got, "for date {date:?}"); + } + } + } + } + + #[test] + #[cfg(not(miri))] + fn all_date_to_iso_week_date_roundtrip() { + let year_range = 2000..=2500; + for year in year_range { + for month in [1, 2, 4] { + for day in 20..=itime::days_in_month(year, month) { + let date = date(year, month, day); + let wd = date.iso_week_date(); + let got = wd.date(); + assert_eq!( + date, got, + "for date {date:?}, and ISO week date {wd:?}" + ); + } + } + } + + let year_range = -9999..=-9500; + for year in year_range { + for month in [1, 2, 4] { + for day in 20..=itime::days_in_month(year, month) { + let date = date(year, month, day); + let wd = date.iso_week_date(); + let got = wd.date(); + assert_eq!( + date, got, + "for date {date:?}, and ISO week date {wd:?}" + ); + } + } + } + } + + #[test] + fn add_constrained() { + use crate::ToSpan; + + let d1 = date(2023, 3, 31); + let d2 = d1.checked_add(1.months().days(1)).unwrap(); + assert_eq!(d2, date(2023, 5, 1)); + } + + #[test] + fn since_years() { + let d1 = date(2023, 4, 15); + let d2 = date(2019, 2, 22); + let span = d1.since((Unit::Year, d2)).unwrap(); + span_eq!(span, 4.years().months(1).days(21)); + let span = d2.since((Unit::Year, d1)).unwrap(); + span_eq!(span, -4.years().months(1).days(24)); + + let d1 = date(2023, 2, 22); + let d2 = date(2019, 4, 15); + let span = d1.since((Unit::Year, d2)).unwrap(); + span_eq!(span, 3.years().months(10).days(7)); + let span = d2.since((Unit::Year, d1)).unwrap(); + span_eq!(span, -3.years().months(10).days(7)); + + let d1 = date(9999, 12, 31); + let d2 = date(-9999, 1, 1); + let span = d1.since((Unit::Year, d2)).unwrap(); + span_eq!(span, 19998.years().months(11).days(30)); + let span = d2.since((Unit::Year, d1)).unwrap(); + span_eq!(span, -19998.years().months(11).days(30)); + } + + #[test] + fn since_months() { + let d1 = date(2024, 7, 24); + let d2 = date(2024, 2, 22); + let span = d1.since((Unit::Month, d2)).unwrap(); + span_eq!(span, 5.months().days(2)); + let span = d2.since((Unit::Month, d1)).unwrap(); + span_eq!(span, -5.months().days(2)); + assert_eq!(d2, d1.checked_sub(5.months().days(2)).unwrap()); + assert_eq!(d1, d2.checked_sub(-5.months().days(2)).unwrap()); + + let d1 = date(2024, 7, 15); + let d2 = date(2024, 2, 22); + let span = d1.since((Unit::Month, d2)).unwrap(); + span_eq!(span, 4.months().days(22)); + let span = d2.since((Unit::Month, d1)).unwrap(); + span_eq!(span, -4.months().days(23)); + assert_eq!(d2, d1.checked_sub(4.months().days(22)).unwrap()); + assert_eq!(d1, d2.checked_sub(-4.months().days(23)).unwrap()); + + let d1 = date(2023, 4, 15); + let d2 = date(2023, 2, 22); + let span = d1.since((Unit::Month, d2)).unwrap(); + span_eq!(span, 1.month().days(21)); + let span = d2.since((Unit::Month, d1)).unwrap(); + span_eq!(span, -1.month().days(24)); + assert_eq!(d2, d1.checked_sub(1.month().days(21)).unwrap()); + assert_eq!(d1, d2.checked_sub(-1.month().days(24)).unwrap()); + + let d1 = date(2023, 4, 15); + let d2 = date(2019, 2, 22); + let span = d1.since((Unit::Month, d2)).unwrap(); + span_eq!(span, 49.months().days(21)); + let span = d2.since((Unit::Month, d1)).unwrap(); + span_eq!(span, -49.months().days(24)); + } + + #[test] + fn since_weeks() { + let d1 = date(2024, 7, 15); + let d2 = date(2024, 6, 22); + let span = d1.since((Unit::Week, d2)).unwrap(); + span_eq!(span, 3.weeks().days(2)); + let span = d2.since((Unit::Week, d1)).unwrap(); + span_eq!(span, -3.weeks().days(2)); + } + + #[test] + fn since_days() { + let d1 = date(2024, 7, 15); + let d2 = date(2024, 2, 22); + let span = d1.since((Unit::Day, d2)).unwrap(); + span_eq!(span, 144.days()); + let span = d2.since((Unit::Day, d1)).unwrap(); + span_eq!(span, -144.days()); + } + + #[test] + fn until_month_lengths() { + let jan1 = date(2020, 1, 1); + let feb1 = date(2020, 2, 1); + let mar1 = date(2020, 3, 1); + + span_eq!(jan1.until(feb1).unwrap(), 31.days()); + span_eq!(jan1.until((Unit::Month, feb1)).unwrap(), 1.month()); + span_eq!(feb1.until(mar1).unwrap(), 29.days()); + span_eq!(feb1.until((Unit::Month, mar1)).unwrap(), 1.month()); + span_eq!(jan1.until(mar1).unwrap(), 60.days()); + span_eq!(jan1.until((Unit::Month, mar1)).unwrap(), 2.months()); + } + + // Ref: https://github.com/tc39/proposal-temporal/issues/2845#issuecomment-2121057896 + #[test] + fn since_until_not_commutative() { + // Temporal.PlainDate.from("2020-04-30").since("2020-02-29", {largestUnit: "months"}) + // // => P2M + // Temporal.PlainDate.from("2020-02-29").until("2020-04-30", {largestUnit: "months"}) + // // => P2M1D + let d1 = date(2020, 4, 30); + let d2 = date(2020, 2, 29); + + let since = d1.since((Unit::Month, d2)).unwrap(); + span_eq!(since, 2.months()); + + let until = d2.until((Unit::Month, d1)).unwrap(); + span_eq!(until, 2.months().days(1)); + } + + // Ref: https://github.com/tc39/proposal-temporal/issues/2893 + #[test] + fn until_weeks_round() { + use crate::{RoundMode, SpanRound}; + + let earlier = date(2019, 1, 8); + let later = date(2021, 9, 7); + let span = earlier.until((Unit::Week, later)).unwrap(); + span_eq!(span, 139.weeks()); + + let options = SpanRound::new() + .smallest(Unit::Week) + .mode(RoundMode::HalfExpand) + .relative(earlier.to_datetime(Time::midnight())); + let rounded = span.round(options).unwrap(); + span_eq!(rounded, 139.weeks()); + } + + // This test checks current behavior, but I think it's wrong. I think the + // results below should be 11 months and 1 month. + // + // 2026-02-01: No, actually, the results here match what Temporal does: + // + // >> date = Temporal.PlainDate.from("2023-05-31") + // >> date.until("2024-04-30", {largestUnit: 'month'}).toString() + // "P10M30D" + // >> date.until("2023-06-30", {largestUnit: 'month'}).toString() + // "P30D" + // + // The specific reasoning here has to do with a trade-off where alternative + // algorithms result in even less intuitive results. See 2535 linked below. + // + // Ref: https://github.com/tc39/proposal-temporal/issues/2919 + // Ref: https://github.com/tc39/proposal-temporal/issues/2535 + #[test] + fn until_months_no_balance() { + let sp = + date(2023, 5, 31).until((Unit::Month, date(2024, 4, 30))).unwrap(); + span_eq!(sp, 10.months().days(30)); + + let sp = + date(2023, 5, 31).until((Unit::Month, date(2023, 6, 30))).unwrap(); + span_eq!(sp, 30.days()); + } + + #[test] + fn until_extremes() { + let d1 = date(-9999, 12, 1); + let d2 = date(-9999, 1, 2); + span_eq!(d1.until((Unit::Month, d2)).unwrap(), -10.months().days(30)); + + let d1 = date(9999, 1, 2); + let d2 = date(9999, 12, 1); + span_eq!(d1.until((Unit::Month, d2)).unwrap(), 10.months().days(29)); + } + + #[test] + fn test_month_add() { + let add = + |year: i16, month: i8, delta: i8| -> Result<(i16, i8), Error> { + month_add_one(year, month, b::Sign::from(delta)) + }; + + assert_eq!(add(2024, 1, 1).unwrap(), (2024, 2)); + assert_eq!(add(2024, 1, -1).unwrap(), (2023, 12)); + assert_eq!(add(2024, 12, 1).unwrap(), (2025, 1)); + assert_eq!(add(9999, 12, -1).unwrap(), (9999, 11)); + assert_eq!(add(-9999, 1, 1).unwrap(), (-9999, 2)); + + assert!(add(9999, 12, 1).is_err()); + assert!(add(-9999, 1, -1).is_err()); + } + + #[test] + fn test_month_add_overflowing() { + let month_add = |month, span| month_add_overflowing(month, span); + + assert_eq!((1, 0), month_add(1, 0)); + assert_eq!((12, 0), month_add(1, 11)); + assert_eq!((1, 1), month_add(1, 12)); + assert_eq!((2, 1), month_add(1, 13)); + assert_eq!((9, 1), month_add(1, 20)); + assert_eq!((12, 19998), month_add(12, b::SpanMonths::MAX)); + + assert_eq!((12, -1), month_add(1, -1)); + assert_eq!((11, -1), month_add(1, -2)); + assert_eq!((1, -1), month_add(1, -12)); + assert_eq!((12, -2), month_add(1, -13)); + } + + #[test] + fn date_size() { + #[cfg(debug_assertions)] + { + assert_eq!(4, core::mem::size_of::()); + } + #[cfg(not(debug_assertions))] + { + assert_eq!(4, core::mem::size_of::()); + } + } + + #[cfg(not(miri))] + quickcheck::quickcheck! { + fn prop_checked_add_then_sub( + d1: Date, + span: Span + ) -> quickcheck::TestResult { + // Force our span to have no units greater than days. + let span = if span.largest_unit() <= Unit::Day { + span + } else { + let round = SpanRound::new().largest(Unit::Day).relative(d1); + let Ok(span) = span.round(round) else { + return quickcheck::TestResult::discard(); + }; + span + }; + let Ok(d2) = d1.checked_add(span) else { + return quickcheck::TestResult::discard(); + }; + let got = d2.checked_sub(span).unwrap(); + quickcheck::TestResult::from_bool(d1 == got) + } + + fn prop_checked_sub_then_add( + d1: Date, + span: Span + ) -> quickcheck::TestResult { + // Force our span to have no units greater than days. + let span = if span.largest_unit() <= Unit::Day { + span + } else { + let round = SpanRound::new().largest(Unit::Day).relative(d1); + let Ok(span) = span.round(round) else { + return quickcheck::TestResult::discard(); + }; + span + }; + let Ok(d2) = d1.checked_sub(span) else { + return quickcheck::TestResult::discard(); + }; + let got = d2.checked_add(span).unwrap(); + quickcheck::TestResult::from_bool(d1 == got) + } + + fn prop_since_then_add(d1: Date, d2: Date) -> bool { + let span = d1.since(d2).unwrap(); + let got = d2.checked_add(span).unwrap(); + d1 == got + } + + fn prop_until_then_sub(d1: Date, d2: Date) -> bool { + let span = d1.until(d2).unwrap(); + let got = d2.checked_sub(span).unwrap(); + d1 == got + } + } + + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, + /// as deserializing from bytes is not supported by the deserializer. + /// + /// - + /// - + #[test] + fn civil_date_deserialize_yaml() { + let expected = date(2024, 10, 31); + + let deserialized: Date = serde_yaml::from_str("2024-10-31").unwrap(); + + assert_eq!(deserialized, expected); + + let deserialized: Date = + serde_yaml::from_slice("2024-10-31".as_bytes()).unwrap(); + + assert_eq!(deserialized, expected); + + let cursor = Cursor::new(b"2024-10-31"); + let deserialized: Date = serde_yaml::from_reader(cursor).unwrap(); + + assert_eq!(deserialized, expected); + } + + /// Regression test where converting to `IDate` and back to do the + /// calculation was FUBAR. + #[test] + fn nth_weekday_of_month() { + let d1 = date(1998, 1, 1); + let d2 = d1.nth_weekday_of_month(5, Weekday::Saturday).unwrap(); + assert_eq!(d2, date(1998, 1, 31)); + } + + /// Tests some extreme values for `Date::nth_weekday`. + #[test] + fn nth_weekday_extreme() { + let weeks = 1043497; + + let d1 = date(-9999, 1, 1); + let d2 = d1.nth_weekday(weeks, Weekday::Monday).unwrap(); + assert_eq!(d2, date(9999, 12, 27)); + assert!(d1.nth_weekday(weeks + 1, Weekday::Monday).is_err()); + + let d1 = date(9999, 12, 31); + let d2 = d1.nth_weekday(-weeks, Weekday::Friday).unwrap(); + assert_eq!(d2, date(-9999, 1, 5)); + assert!(d1.nth_weekday(weeks - 1, Weekday::Friday).is_err()); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/datetime.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/datetime.rs new file mode 100644 index 0000000000000000000000000000000000000000..348ca9d9442234e84bb8746bebb82839c4a6b338 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/datetime.rs @@ -0,0 +1,4538 @@ +use core::time::Duration as UnsignedDuration; + +use crate::{ + civil::{ + datetime, Date, DateWith, Era, ISOWeekDate, Time, TimeWith, Weekday, + }, + duration::{Duration, SDuration}, + error::{civil::Error as E, Error, ErrorContext}, + fmt::{ + self, + temporal::{self, DEFAULT_DATETIME_PARSER}, + }, + shared::util::itime::IDateTime, + tz::TimeZone, + util::{b, round::Increment}, + zoned::Zoned, + RoundMode, SignedDuration, Span, SpanRound, Unit, +}; + +/// A representation of a civil datetime in the Gregorian calendar. +/// +/// A `DateTime` value corresponds to a pair of a [`Date`] and a [`Time`]. +/// That is, a datetime contains a year, month, day, hour, minute, second and +/// the fractional number of nanoseconds. +/// +/// A `DateTime` value is guaranteed to contain a valid date and time. For +/// example, neither `2023-02-29T00:00:00` nor `2015-06-30T23:59:60` are +/// valid `DateTime` values. +/// +/// # Civil datetimes +/// +/// A `DateTime` value behaves without regard to daylight saving time or time +/// zones in general. When doing arithmetic on datetimes with spans defined in +/// units of time (such as with [`DateTime::checked_add`]), days are considered +/// to always be precisely `86,400` seconds long. +/// +/// # Parsing and printing +/// +/// The `DateTime` type provides convenient trait implementations of +/// [`std::str::FromStr`] and [`std::fmt::Display`]: +/// +/// ``` +/// use jiff::civil::DateTime; +/// +/// let dt: DateTime = "2024-06-19 15:22:45".parse()?; +/// assert_eq!(dt.to_string(), "2024-06-19T15:22:45"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// A civil `DateTime` can also be parsed from something that _contains_ a +/// datetime, but with perhaps other data (such as an offset or time zone): +/// +/// ``` +/// use jiff::civil::DateTime; +/// +/// let dt: DateTime = "2024-06-19T15:22:45-04[America/New_York]".parse()?; +/// assert_eq!(dt.to_string(), "2024-06-19T15:22:45"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// For more information on the specific format supported, see the +/// [`fmt::temporal`](crate::fmt::temporal) module documentation. +/// +/// # Default value +/// +/// For convenience, this type implements the `Default` trait. Its default +/// value corresponds to `0000-01-01T00:00:00.000000000`. That is, it is +/// the datetime corresponding to `DateTime::from_parts(Date::default(), +/// Time::default())`. One can also access this value via the `DateTime::ZERO` +/// constant. +/// +/// # Leap seconds +/// +/// Jiff does not support leap seconds. Jiff behaves as if they don't exist. +/// The only exception is that if one parses a datetime with a second component +/// of `60`, then it is automatically constrained to `59`: +/// +/// ``` +/// use jiff::civil::{DateTime, date}; +/// +/// let dt: DateTime = "2016-12-31 23:59:60".parse()?; +/// assert_eq!(dt, date(2016, 12, 31).at(23, 59, 59, 0)); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// # Comparisons +/// +/// The `DateTime` type provides both `Eq` and `Ord` trait implementations to +/// facilitate easy comparisons. When a datetime `dt1` occurs before a datetime +/// `dt2`, then `dt1 < dt2`. For example: +/// +/// ``` +/// use jiff::civil::date; +/// +/// let dt1 = date(2024, 3, 11).at(1, 25, 15, 0); +/// let dt2 = date(2025, 1, 31).at(0, 30, 0, 0); +/// assert!(dt1 < dt2); +/// ``` +/// +/// # Arithmetic +/// +/// This type provides routines for adding and subtracting spans of time, as +/// well as computing the span of time between two `DateTime` values. +/// +/// For adding or subtracting spans of time, one can use any of the following +/// routines: +/// +/// * [`DateTime::checked_add`] or [`DateTime::checked_sub`] for checked +/// arithmetic. +/// * [`DateTime::saturating_add`] or [`DateTime::saturating_sub`] for +/// saturating arithmetic. +/// +/// Additionally, checked arithmetic is available via the `Add` and `Sub` +/// trait implementations. When the result overflows, a panic occurs. +/// +/// ``` +/// use jiff::{civil::date, ToSpan}; +/// +/// let start = date(2024, 2, 25).at(15, 45, 0, 0); +/// let one_week_later = start + 1.weeks(); +/// assert_eq!(one_week_later, date(2024, 3, 3).at(15, 45, 0, 0)); +/// ``` +/// +/// One can compute the span of time between two datetimes using either +/// [`DateTime::until`] or [`DateTime::since`]. It's also possible to subtract +/// two `DateTime` values directly via a `Sub` trait implementation: +/// +/// ``` +/// use jiff::{civil::date, ToSpan}; +/// +/// let datetime1 = date(2024, 5, 3).at(23, 30, 0, 0); +/// let datetime2 = date(2024, 2, 25).at(7, 0, 0, 0); +/// assert_eq!( +/// datetime1 - datetime2, +/// 68.days().hours(16).minutes(30).fieldwise(), +/// ); +/// ``` +/// +/// The `until` and `since` APIs are polymorphic and allow re-balancing and +/// rounding the span returned. For example, the default largest unit is days +/// (as exemplified above), but we can ask for bigger units: +/// +/// ``` +/// use jiff::{civil::date, ToSpan, Unit}; +/// +/// let datetime1 = date(2024, 5, 3).at(23, 30, 0, 0); +/// let datetime2 = date(2024, 2, 25).at(7, 0, 0, 0); +/// assert_eq!( +/// datetime1.since((Unit::Year, datetime2))?, +/// 2.months().days(7).hours(16).minutes(30).fieldwise(), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// Or even round the span returned: +/// +/// ``` +/// use jiff::{civil::{DateTimeDifference, date}, RoundMode, ToSpan, Unit}; +/// +/// let datetime1 = date(2024, 5, 3).at(23, 30, 0, 0); +/// let datetime2 = date(2024, 2, 25).at(7, 0, 0, 0); +/// assert_eq!( +/// datetime1.since( +/// DateTimeDifference::new(datetime2) +/// .smallest(Unit::Day) +/// .largest(Unit::Year), +/// )?, +/// 2.months().days(7).fieldwise(), +/// ); +/// // `DateTimeDifference` uses truncation as a rounding mode by default, +/// // but you can set the rounding mode to break ties away from zero: +/// assert_eq!( +/// datetime1.since( +/// DateTimeDifference::new(datetime2) +/// .smallest(Unit::Day) +/// .largest(Unit::Year) +/// .mode(RoundMode::HalfExpand), +/// )?, +/// // Rounds up to 8 days. +/// 2.months().days(8).fieldwise(), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// # Rounding +/// +/// A `DateTime` can be rounded based on a [`DateTimeRound`] configuration of +/// smallest units, rounding increment and rounding mode. Here's an example +/// showing how to round to the nearest third hour: +/// +/// ``` +/// use jiff::{civil::{DateTimeRound, date}, Unit}; +/// +/// let dt = date(2024, 6, 19).at(16, 27, 29, 999_999_999); +/// assert_eq!( +/// dt.round(DateTimeRound::new().smallest(Unit::Hour).increment(3))?, +/// date(2024, 6, 19).at(15, 0, 0, 0), +/// ); +/// // Or alternatively, make use of the `From<(Unit, i64)> for DateTimeRound` +/// // trait implementation: +/// assert_eq!( +/// dt.round((Unit::Hour, 3))?, +/// date(2024, 6, 19).at(15, 0, 0, 0), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// See [`DateTime::round`] for more details. +#[derive(Clone, Copy, Eq, Hash, PartialEq, PartialOrd, Ord)] +pub struct DateTime { + date: Date, + time: Time, +} + +impl DateTime { + /// The minimum representable Gregorian datetime. + /// + /// The minimum is chosen such that any [`Timestamp`](crate::Timestamp) + /// combined with any valid time zone offset can be infallibly converted to + /// this type. + pub const MIN: DateTime = datetime(-9999, 1, 1, 0, 0, 0, 0); + + /// The maximum representable Gregorian datetime. + /// + /// The maximum is chosen such that any [`Timestamp`](crate::Timestamp) + /// combined with any valid time zone offset can be infallibly converted to + /// this type. + pub const MAX: DateTime = datetime(9999, 12, 31, 23, 59, 59, 999_999_999); + + /// The first day of the zeroth year. + /// + /// This is guaranteed to be equivalent to `DateTime::default()`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::DateTime; + /// + /// assert_eq!(DateTime::ZERO, DateTime::default()); + /// ``` + pub const ZERO: DateTime = DateTime::from_parts(Date::ZERO, Time::MIN); + + /// Creates a new `DateTime` value from its component year, month, day, + /// hour, minute, second and fractional subsecond (up to nanosecond + /// precision) values. + /// + /// To create a new datetime from another with a particular component, use + /// the methods on [`DateTimeWith`] via [`DateTime::with`]. + /// + /// # Errors + /// + /// This returns an error when the given components do not correspond to a + /// valid datetime. Namely, all of the following must be true: + /// + /// * The year must be in the range `-9999..=9999`. + /// * The month must be in the range `1..=12`. + /// * The day must be at least `1` and must be at most the number of days + /// in the corresponding month. So for example, `2024-02-29` is valid but + /// `2023-02-29` is not. + /// * `0 <= hour <= 23` + /// * `0 <= minute <= 59` + /// * `0 <= second <= 59` + /// * `0 <= subsec_nanosecond <= 999,999,999` + /// + /// # Example + /// + /// This shows an example of a valid datetime: + /// + /// ``` + /// use jiff::civil::DateTime; + /// + /// let d = DateTime::new(2024, 2, 29, 21, 30, 5, 123_456_789).unwrap(); + /// assert_eq!(d.year(), 2024); + /// assert_eq!(d.month(), 2); + /// assert_eq!(d.day(), 29); + /// assert_eq!(d.hour(), 21); + /// assert_eq!(d.minute(), 30); + /// assert_eq!(d.second(), 5); + /// assert_eq!(d.millisecond(), 123); + /// assert_eq!(d.microsecond(), 456); + /// assert_eq!(d.nanosecond(), 789); + /// ``` + /// + /// This shows some examples of invalid datetimes: + /// + /// ``` + /// use jiff::civil::DateTime; + /// + /// assert!(DateTime::new(2023, 2, 29, 21, 30, 5, 0).is_err()); + /// assert!(DateTime::new(2015, 6, 30, 23, 59, 60, 0).is_err()); + /// assert!(DateTime::new(2024, 6, 20, 19, 58, 0, 1_000_000_000).is_err()); + /// ``` + #[inline] + pub fn new( + year: i16, + month: i8, + day: i8, + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, + ) -> Result { + let date = Date::new(year, month, day)?; + let time = Time::new(hour, minute, second, subsec_nanosecond)?; + Ok(DateTime { date, time }) + } + + /// Creates a new `DateTime` value in a `const` context. + /// + /// Note that an alternative syntax that is terser and perhaps easier to + /// read for the same operation is to combine + /// [`civil::date`](crate::civil::date()) with [`Date::at`]. + /// + /// # Panics + /// + /// This routine panics when [`DateTime::new`] would return an error. That + /// is, when the given components do not correspond to a valid datetime. + /// Namely, all of the following must be true: + /// + /// * The year must be in the range `-9999..=9999`. + /// * The month must be in the range `1..=12`. + /// * The day must be at least `1` and must be at most the number of days + /// in the corresponding month. So for example, `2024-02-29` is valid but + /// `2023-02-29` is not. + /// * `0 <= hour <= 23` + /// * `0 <= minute <= 59` + /// * `0 <= second <= 59` + /// * `0 <= subsec_nanosecond <= 999,999,999` + /// + /// Similarly, when used in a const context, invalid parameters will + /// prevent your Rust program from compiling. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::DateTime; + /// + /// let dt = DateTime::constant(2024, 2, 29, 21, 30, 5, 123_456_789); + /// assert_eq!(dt.year(), 2024); + /// assert_eq!(dt.month(), 2); + /// assert_eq!(dt.day(), 29); + /// assert_eq!(dt.hour(), 21); + /// assert_eq!(dt.minute(), 30); + /// assert_eq!(dt.second(), 5); + /// assert_eq!(dt.millisecond(), 123); + /// assert_eq!(dt.microsecond(), 456); + /// assert_eq!(dt.nanosecond(), 789); + /// ``` + /// + /// Or alternatively: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 2, 29).at(21, 30, 5, 123_456_789); + /// assert_eq!(dt.year(), 2024); + /// assert_eq!(dt.month(), 2); + /// assert_eq!(dt.day(), 29); + /// assert_eq!(dt.hour(), 21); + /// assert_eq!(dt.minute(), 30); + /// assert_eq!(dt.second(), 5); + /// assert_eq!(dt.millisecond(), 123); + /// assert_eq!(dt.microsecond(), 456); + /// assert_eq!(dt.nanosecond(), 789); + /// ``` + #[inline] + pub const fn constant( + year: i16, + month: i8, + day: i8, + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, + ) -> DateTime { + let date = Date::constant(year, month, day); + let time = Time::constant(hour, minute, second, subsec_nanosecond); + DateTime { date, time } + } + + /// Creates a `DateTime` from its constituent parts. + /// + /// Any combination of a valid `Date` and a valid `Time` results in a valid + /// `DateTime`. + /// + /// # Example + /// + /// This example shows how to build a datetime from its parts: + /// + /// ``` + /// use jiff::civil::{DateTime, date, time}; + /// + /// let dt = DateTime::from_parts(date(2024, 6, 6), time(6, 0, 0, 0)); + /// assert_eq!(dt, date(2024, 6, 6).at(6, 0, 0, 0)); + /// ``` + #[inline] + pub const fn from_parts(date: Date, time: Time) -> DateTime { + DateTime { date, time } + } + + /// Create a builder for constructing a new `DateTime` from the fields of + /// this datetime. + /// + /// See the methods on [`DateTimeWith`] for the different ways one can set + /// the fields of a new `DateTime`. + /// + /// # Example + /// + /// The builder ensures one can chain together the individual components of + /// a datetime without it failing at an intermediate step. For example, if + /// you had a date of `2024-10-31T00:00:00` and wanted to change both the + /// day and the month, and each setting was validated independent of the + /// other, you would need to be careful to set the day first and then the + /// month. In some cases, you would need to set the month first and then + /// the day! + /// + /// But with the builder, you can set values in any order: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2024, 10, 31).at(0, 0, 0, 0); + /// let dt2 = dt1.with().month(11).day(30).build()?; + /// assert_eq!(dt2, date(2024, 11, 30).at(0, 0, 0, 0)); + /// + /// let dt1 = date(2024, 4, 30).at(0, 0, 0, 0); + /// let dt2 = dt1.with().day(31).month(7).build()?; + /// assert_eq!(dt2, date(2024, 7, 31).at(0, 0, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn with(self) -> DateTimeWith { + DateTimeWith::new(self) + } + + /// Returns the year for this datetime. + /// + /// The value returned is guaranteed to be in the range `-9999..=9999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2024, 3, 9).at(7, 30, 0, 0); + /// assert_eq!(dt1.year(), 2024); + /// + /// let dt2 = date(-2024, 3, 9).at(7, 30, 0, 0); + /// assert_eq!(dt2.year(), -2024); + /// + /// let dt3 = date(0, 3, 9).at(7, 30, 0, 0); + /// assert_eq!(dt3.year(), 0); + /// ``` + #[inline] + pub fn year(self) -> i16 { + self.date().year() + } + + /// Returns the year and its era. + /// + /// This crate specifically allows years to be negative or `0`, where as + /// years written for the Gregorian calendar are always positive and + /// greater than `0`. In the Gregorian calendar, the era labels `BCE` and + /// `CE` are used to disambiguate between years less than or equal to `0` + /// and years greater than `0`, respectively. + /// + /// The crate is designed this way so that years in the latest era (that + /// is, `CE`) are aligned with years in this crate. + /// + /// The year returned is guaranteed to be in the range `1..=10000`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let dt = date(2024, 10, 3).at(7, 30, 0, 0); + /// assert_eq!(dt.era_year(), (2024, Era::CE)); + /// + /// let dt = date(1, 10, 3).at(7, 30, 0, 0); + /// assert_eq!(dt.era_year(), (1, Era::CE)); + /// + /// let dt = date(0, 10, 3).at(7, 30, 0, 0); + /// assert_eq!(dt.era_year(), (1, Era::BCE)); + /// + /// let dt = date(-1, 10, 3).at(7, 30, 0, 0); + /// assert_eq!(dt.era_year(), (2, Era::BCE)); + /// + /// let dt = date(-10, 10, 3).at(7, 30, 0, 0); + /// assert_eq!(dt.era_year(), (11, Era::BCE)); + /// + /// let dt = date(-9_999, 10, 3).at(7, 30, 0, 0); + /// assert_eq!(dt.era_year(), (10_000, Era::BCE)); + /// ``` + #[inline] + pub fn era_year(self) -> (i16, Era) { + self.date().era_year() + } + + /// Returns the month for this datetime. + /// + /// The value returned is guaranteed to be in the range `1..=12`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2024, 3, 9).at(7, 30, 0, 0); + /// assert_eq!(dt1.month(), 3); + /// ``` + #[inline] + pub fn month(self) -> i8 { + self.date().month() + } + + /// Returns the day for this datetime. + /// + /// The value returned is guaranteed to be in the range `1..=31`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2024, 2, 29).at(7, 30, 0, 0); + /// assert_eq!(dt1.day(), 29); + /// ``` + #[inline] + pub fn day(self) -> i8 { + self.date().day() + } + + /// Returns the "hour" component of this datetime. + /// + /// The value returned is guaranteed to be in the range `0..=23`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2000, 1, 2).at(3, 4, 5, 123_456_789); + /// assert_eq!(dt.hour(), 3); + /// ``` + #[inline] + pub fn hour(self) -> i8 { + self.time().hour() + } + + /// Returns the "minute" component of this datetime. + /// + /// The value returned is guaranteed to be in the range `0..=59`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2000, 1, 2).at(3, 4, 5, 123_456_789); + /// assert_eq!(dt.minute(), 4); + /// ``` + #[inline] + pub fn minute(self) -> i8 { + self.time().minute() + } + + /// Returns the "second" component of this datetime. + /// + /// The value returned is guaranteed to be in the range `0..=59`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2000, 1, 2).at(3, 4, 5, 123_456_789); + /// assert_eq!(dt.second(), 5); + /// ``` + #[inline] + pub fn second(self) -> i8 { + self.time().second() + } + + /// Returns the "millisecond" component of this datetime. + /// + /// The value returned is guaranteed to be in the range `0..=999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2000, 1, 2).at(3, 4, 5, 123_456_789); + /// assert_eq!(dt.millisecond(), 123); + /// ``` + #[inline] + pub fn millisecond(self) -> i16 { + self.time().millisecond() + } + + /// Returns the "microsecond" component of this datetime. + /// + /// The value returned is guaranteed to be in the range `0..=999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2000, 1, 2).at(3, 4, 5, 123_456_789); + /// assert_eq!(dt.microsecond(), 456); + /// ``` + #[inline] + pub fn microsecond(self) -> i16 { + self.time().microsecond() + } + + /// Returns the "nanosecond" component of this datetime. + /// + /// The value returned is guaranteed to be in the range `0..=999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2000, 1, 2).at(3, 4, 5, 123_456_789); + /// assert_eq!(dt.nanosecond(), 789); + /// ``` + #[inline] + pub fn nanosecond(self) -> i16 { + self.time().nanosecond() + } + + /// Returns the fractional nanosecond for this `DateTime` value. + /// + /// If you want to set this value on `DateTime`, then use + /// [`DateTimeWith::subsec_nanosecond`] via [`DateTime::with`]. + /// + /// The value returned is guaranteed to be in the range `0..=999_999_999`. + /// + /// # Example + /// + /// This shows the relationship between constructing a `DateTime` value + /// with routines like `with().millisecond()` and accessing the entire + /// fractional part as a nanosecond: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2000, 1, 2).at(3, 4, 5, 123_456_789); + /// assert_eq!(dt1.subsec_nanosecond(), 123_456_789); + /// let dt2 = dt1.with().millisecond(333).build()?; + /// assert_eq!(dt2.subsec_nanosecond(), 333_456_789); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: nanoseconds from a timestamp + /// + /// This shows how the fractional nanosecond part of a `DateTime` value + /// manifests from a specific timestamp. + /// + /// ``` + /// use jiff::Timestamp; + /// + /// // 1,234 nanoseconds after the Unix epoch. + /// let zdt = Timestamp::new(0, 1_234)?.in_tz("UTC")?; + /// let dt = zdt.datetime(); + /// assert_eq!(dt.subsec_nanosecond(), 1_234); + /// + /// // 1,234 nanoseconds before the Unix epoch. + /// let zdt = Timestamp::new(0, -1_234)?.in_tz("UTC")?; + /// let dt = zdt.datetime(); + /// // The nanosecond is equal to `1_000_000_000 - 1_234`. + /// assert_eq!(dt.subsec_nanosecond(), 999998766); + /// // Looking at the other components of the time value might help. + /// assert_eq!(dt.hour(), 23); + /// assert_eq!(dt.minute(), 59); + /// assert_eq!(dt.second(), 59); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn subsec_nanosecond(self) -> i32 { + self.time().subsec_nanosecond() + } + + /// Returns the weekday corresponding to this datetime. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// // The Unix epoch was on a Thursday. + /// let dt = date(1970, 1, 1).at(7, 30, 0, 0); + /// assert_eq!(dt.weekday(), Weekday::Thursday); + /// // One can also get the weekday as an offset in a variety of schemes. + /// assert_eq!(dt.weekday().to_monday_zero_offset(), 3); + /// assert_eq!(dt.weekday().to_monday_one_offset(), 4); + /// assert_eq!(dt.weekday().to_sunday_zero_offset(), 4); + /// assert_eq!(dt.weekday().to_sunday_one_offset(), 5); + /// ``` + #[inline] + pub fn weekday(self) -> Weekday { + self.date().weekday() + } + + /// Returns the ordinal day of the year that this datetime resides in. + /// + /// For leap years, this always returns a value in the range `1..=366`. + /// Otherwise, the value is in the range `1..=365`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2006, 8, 24).at(7, 30, 0, 0); + /// assert_eq!(dt.day_of_year(), 236); + /// + /// let dt = date(2023, 12, 31).at(7, 30, 0, 0); + /// assert_eq!(dt.day_of_year(), 365); + /// + /// let dt = date(2024, 12, 31).at(7, 30, 0, 0); + /// assert_eq!(dt.day_of_year(), 366); + /// ``` + #[inline] + pub fn day_of_year(self) -> i16 { + self.date().day_of_year() + } + + /// Returns the ordinal day of the year that this datetime resides in, but + /// ignores leap years. + /// + /// That is, the range of possible values returned by this routine is + /// `1..=365`, even if this date resides in a leap year. If this date is + /// February 29, then this routine returns `None`. + /// + /// The value `365` always corresponds to the last day in the year, + /// December 31, even for leap years. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2006, 8, 24).at(7, 30, 0, 0); + /// assert_eq!(dt.day_of_year_no_leap(), Some(236)); + /// + /// let dt = date(2023, 12, 31).at(7, 30, 0, 0); + /// assert_eq!(dt.day_of_year_no_leap(), Some(365)); + /// + /// let dt = date(2024, 12, 31).at(7, 30, 0, 0); + /// assert_eq!(dt.day_of_year_no_leap(), Some(365)); + /// + /// let dt = date(2024, 2, 29).at(7, 30, 0, 0); + /// assert_eq!(dt.day_of_year_no_leap(), None); + /// ``` + #[inline] + pub fn day_of_year_no_leap(self) -> Option { + self.date().day_of_year_no_leap() + } + + /// Returns the beginning of the day that this datetime resides in. + /// + /// That is, the datetime returned always keeps the same date, but its + /// time is always `00:00:00` (midnight). + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 7, 3).at(7, 30, 10, 123_456_789); + /// assert_eq!(dt.start_of_day(), date(2024, 7, 3).at(0, 0, 0, 0)); + /// ``` + #[inline] + pub fn start_of_day(&self) -> DateTime { + DateTime::from_parts(self.date(), Time::MIN) + } + + /// Returns the end of the day that this datetime resides in. + /// + /// That is, the datetime returned always keeps the same date, but its + /// time is always `23:59:59.999999999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 7, 3).at(7, 30, 10, 123_456_789); + /// assert_eq!( + /// dt.end_of_day(), + /// date(2024, 7, 3).at(23, 59, 59, 999_999_999), + /// ); + /// ``` + #[inline] + pub fn end_of_day(&self) -> DateTime { + DateTime::from_parts(self.date(), Time::MAX) + } + + /// Returns the first date of the month that this datetime resides in. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 2, 29).at(7, 30, 0, 0); + /// assert_eq!(dt.first_of_month(), date(2024, 2, 1).at(7, 30, 0, 0)); + /// ``` + #[inline] + pub fn first_of_month(self) -> DateTime { + DateTime::from_parts(self.date().first_of_month(), self.time()) + } + + /// Returns the last date of the month that this datetime resides in. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 2, 5).at(7, 30, 0, 0); + /// assert_eq!(dt.last_of_month(), date(2024, 2, 29).at(7, 30, 0, 0)); + /// ``` + #[inline] + pub fn last_of_month(self) -> DateTime { + DateTime::from_parts(self.date().last_of_month(), self.time()) + } + + /// Returns the total number of days in the the month in which this + /// datetime resides. + /// + /// This is guaranteed to always return one of the following values, + /// depending on the year and the month: 28, 29, 30 or 31. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 2, 10).at(7, 30, 0, 0); + /// assert_eq!(dt.days_in_month(), 29); + /// + /// let dt = date(2023, 2, 10).at(7, 30, 0, 0); + /// assert_eq!(dt.days_in_month(), 28); + /// + /// let dt = date(2024, 8, 15).at(7, 30, 0, 0); + /// assert_eq!(dt.days_in_month(), 31); + /// ``` + #[inline] + pub fn days_in_month(self) -> i8 { + self.date().days_in_month() + } + + /// Returns the first date of the year that this datetime resides in. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 2, 29).at(7, 30, 0, 0); + /// assert_eq!(dt.first_of_year(), date(2024, 1, 1).at(7, 30, 0, 0)); + /// ``` + #[inline] + pub fn first_of_year(self) -> DateTime { + DateTime::from_parts(self.date().first_of_year(), self.time()) + } + + /// Returns the last date of the year that this datetime resides in. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 2, 5).at(7, 30, 0, 0); + /// assert_eq!(dt.last_of_year(), date(2024, 12, 31).at(7, 30, 0, 0)); + /// ``` + #[inline] + pub fn last_of_year(self) -> DateTime { + DateTime::from_parts(self.date().last_of_year(), self.time()) + } + + /// Returns the total number of days in the the year in which this datetime + /// resides. + /// + /// This is guaranteed to always return either `365` or `366`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 7, 10).at(7, 30, 0, 0); + /// assert_eq!(dt.days_in_year(), 366); + /// + /// let dt = date(2023, 7, 10).at(7, 30, 0, 0); + /// assert_eq!(dt.days_in_year(), 365); + /// ``` + #[inline] + pub fn days_in_year(self) -> i16 { + self.date().days_in_year() + } + + /// Returns true if and only if the year in which this datetime resides is + /// a leap year. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// assert!(date(2024, 1, 1).at(7, 30, 0, 0).in_leap_year()); + /// assert!(!date(2023, 12, 31).at(7, 30, 0, 0).in_leap_year()); + /// ``` + #[inline] + pub fn in_leap_year(self) -> bool { + self.date().in_leap_year() + } + + /// Returns the datetime with a date immediately following this one. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Errors + /// + /// This returns an error when this datetime's date is the maximum value. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{DateTime, date}; + /// + /// let dt = date(2024, 2, 28).at(7, 30, 0, 0); + /// assert_eq!(dt.tomorrow()?, date(2024, 2, 29).at(7, 30, 0, 0)); + /// + /// // The max doesn't have a tomorrow. + /// assert!(DateTime::MAX.tomorrow().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn tomorrow(self) -> Result { + Ok(DateTime::from_parts(self.date().tomorrow()?, self.time())) + } + + /// Returns the datetime with a date immediately preceding this one. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Errors + /// + /// This returns an error when this datetime's date is the minimum value. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{DateTime, date}; + /// + /// let dt = date(2024, 3, 1).at(7, 30, 0, 0); + /// assert_eq!(dt.yesterday()?, date(2024, 2, 29).at(7, 30, 0, 0)); + /// + /// // The min doesn't have a yesterday. + /// assert!(DateTime::MIN.yesterday().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn yesterday(self) -> Result { + Ok(DateTime::from_parts(self.date().yesterday()?, self.time())) + } + + /// Returns the "nth" weekday from the beginning or end of the month in + /// which this datetime resides. + /// + /// The `nth` parameter can be positive or negative. A positive value + /// computes the "nth" weekday from the beginning of the month. A negative + /// value computes the "nth" weekday from the end of the month. So for + /// example, use `-1` to "find the last weekday" in this date's month. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Errors + /// + /// This returns an error when `nth` is `0`, or if it is `5` or `-5` and + /// there is no 5th weekday from the beginning or end of the month. + /// + /// # Example + /// + /// This shows how to get the nth weekday in a month, starting from the + /// beginning of the month: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let dt = date(2017, 3, 1).at(7, 30, 0, 0); + /// let second_friday = dt.nth_weekday_of_month(2, Weekday::Friday)?; + /// assert_eq!(second_friday, date(2017, 3, 10).at(7, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This shows how to do the reverse of the above. That is, the nth _last_ + /// weekday in a month: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let dt = date(2024, 3, 1).at(7, 30, 0, 0); + /// let last_thursday = dt.nth_weekday_of_month(-1, Weekday::Thursday)?; + /// assert_eq!(last_thursday, date(2024, 3, 28).at(7, 30, 0, 0)); + /// let second_last_thursday = dt.nth_weekday_of_month( + /// -2, + /// Weekday::Thursday, + /// )?; + /// assert_eq!(second_last_thursday, date(2024, 3, 21).at(7, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This routine can return an error if there isn't an `nth` weekday + /// for this month. For example, March 2024 only has 4 Mondays: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let dt = date(2024, 3, 25).at(7, 30, 0, 0); + /// let fourth_monday = dt.nth_weekday_of_month(4, Weekday::Monday)?; + /// assert_eq!(fourth_monday, date(2024, 3, 25).at(7, 30, 0, 0)); + /// // There is no 5th Monday. + /// assert!(dt.nth_weekday_of_month(5, Weekday::Monday).is_err()); + /// // Same goes for counting backwards. + /// assert!(dt.nth_weekday_of_month(-5, Weekday::Monday).is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn nth_weekday_of_month( + self, + nth: i8, + weekday: Weekday, + ) -> Result { + let date = self.date().nth_weekday_of_month(nth, weekday)?; + Ok(DateTime::from_parts(date, self.time())) + } + + /// Returns the "nth" weekday from this datetime, not including itself. + /// + /// The `nth` parameter can be positive or negative. A positive value + /// computes the "nth" weekday starting at the day after this date and + /// going forwards in time. A negative value computes the "nth" weekday + /// starting at the day before this date and going backwards in time. + /// + /// For example, if this datetime's weekday is a Sunday and the first + /// Sunday is asked for (that is, `dt.nth_weekday(1, Weekday::Sunday)`), + /// then the result is a week from this datetime corresponding to the + /// following Sunday. + /// + /// The time in the datetime returned remains unchanged. + /// + /// # Errors + /// + /// This returns an error when `nth` is `0`, or if it would otherwise + /// result in a date that overflows the minimum/maximum values of + /// `DateTime`. + /// + /// # Example + /// + /// This example shows how to find the "nth" weekday going forwards in + /// time: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// // Use a Sunday in March as our start date. + /// let dt = date(2024, 3, 10).at(7, 30, 0, 0); + /// assert_eq!(dt.weekday(), Weekday::Sunday); + /// + /// // The first next Monday is tomorrow! + /// let next_monday = dt.nth_weekday(1, Weekday::Monday)?; + /// assert_eq!(next_monday, date(2024, 3, 11).at(7, 30, 0, 0)); + /// + /// // But the next Sunday is a week away, because this doesn't + /// // include the current weekday. + /// let next_sunday = dt.nth_weekday(1, Weekday::Sunday)?; + /// assert_eq!(next_sunday, date(2024, 3, 17).at(7, 30, 0, 0)); + /// + /// // "not this Thursday, but next Thursday" + /// let next_next_thursday = dt.nth_weekday(2, Weekday::Thursday)?; + /// assert_eq!(next_next_thursday, date(2024, 3, 21).at(7, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This example shows how to find the "nth" weekday going backwards in + /// time: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// // Use a Sunday in March as our start date. + /// let dt = date(2024, 3, 10).at(7, 30, 0, 0); + /// assert_eq!(dt.weekday(), Weekday::Sunday); + /// + /// // "last Saturday" was yesterday! + /// let last_saturday = dt.nth_weekday(-1, Weekday::Saturday)?; + /// assert_eq!(last_saturday, date(2024, 3, 9).at(7, 30, 0, 0)); + /// + /// // "last Sunday" was a week ago. + /// let last_sunday = dt.nth_weekday(-1, Weekday::Sunday)?; + /// assert_eq!(last_sunday, date(2024, 3, 3).at(7, 30, 0, 0)); + /// + /// // "not last Thursday, but the one before" + /// let prev_prev_thursday = dt.nth_weekday(-2, Weekday::Thursday)?; + /// assert_eq!(prev_prev_thursday, date(2024, 2, 29).at(7, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This example shows that overflow results in an error in either + /// direction: + /// + /// ``` + /// use jiff::civil::{DateTime, Weekday}; + /// + /// let dt = DateTime::MAX; + /// assert_eq!(dt.weekday(), Weekday::Friday); + /// assert!(dt.nth_weekday(1, Weekday::Saturday).is_err()); + /// + /// let dt = DateTime::MIN; + /// assert_eq!(dt.weekday(), Weekday::Monday); + /// assert!(dt.nth_weekday(-1, Weekday::Sunday).is_err()); + /// ``` + /// + /// # Example: the start of Israeli summer time + /// + /// Israeli law says (at present, as of 2024-03-11) that DST or + /// "summer time" starts on the Friday before the last Sunday in + /// March. We can find that date using both `nth_weekday` and + /// [`DateTime::nth_weekday_of_month`]: + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let march = date(2024, 3, 1).at(0, 0, 0, 0); + /// let last_sunday = march.nth_weekday_of_month(-1, Weekday::Sunday)?; + /// let dst_starts_on = last_sunday.nth_weekday(-1, Weekday::Friday)?; + /// assert_eq!(dst_starts_on, date(2024, 3, 29).at(0, 0, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: getting the start of the week + /// + /// Given a date, one can use `nth_weekday` to determine the start of the + /// week in which the date resides in. This might vary based on whether + /// the weeks start on Sunday or Monday. This example shows how to handle + /// both. + /// + /// ``` + /// use jiff::civil::{Weekday, date}; + /// + /// let dt = date(2024, 3, 15).at(7, 30, 0, 0); + /// // For weeks starting with Sunday. + /// let start_of_week = dt.tomorrow()?.nth_weekday(-1, Weekday::Sunday)?; + /// assert_eq!(start_of_week, date(2024, 3, 10).at(7, 30, 0, 0)); + /// // For weeks starting with Monday. + /// let start_of_week = dt.tomorrow()?.nth_weekday(-1, Weekday::Monday)?; + /// assert_eq!(start_of_week, date(2024, 3, 11).at(7, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// In the above example, we first get the date after the current one + /// because `nth_weekday` does not consider itself when counting. This + /// works as expected even at the boundaries of a week: + /// + /// ``` + /// use jiff::civil::{Time, Weekday, date}; + /// + /// // The start of the week. + /// let dt = date(2024, 3, 10).at(0, 0, 0, 0); + /// let start_of_week = dt.tomorrow()?.nth_weekday(-1, Weekday::Sunday)?; + /// assert_eq!(start_of_week, date(2024, 3, 10).at(0, 0, 0, 0)); + /// // The end of the week. + /// let dt = date(2024, 3, 16).at(23, 59, 59, 999_999_999); + /// let start_of_week = dt + /// .tomorrow()? + /// .nth_weekday(-1, Weekday::Sunday)? + /// .with().time(Time::midnight()).build()?; + /// assert_eq!(start_of_week, date(2024, 3, 10).at(0, 0, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn nth_weekday( + self, + nth: i32, + weekday: Weekday, + ) -> Result { + let date = self.date().nth_weekday(nth, weekday)?; + Ok(DateTime::from_parts(date, self.time())) + } + + /// Returns the date component of this datetime. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 3, 14).at(18, 45, 0, 0); + /// assert_eq!(dt.date(), date(2024, 3, 14)); + /// ``` + #[inline] + pub fn date(self) -> Date { + self.date + } + + /// Returns the time component of this datetime. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{date, time}; + /// + /// let dt = date(2024, 3, 14).at(18, 45, 0, 0); + /// assert_eq!(dt.time(), time(18, 45, 0, 0)); + /// ``` + #[inline] + pub fn time(self) -> Time { + self.time + } + + /// Construct an [ISO 8601 week date] from this datetime. + /// + /// The [`ISOWeekDate`] type describes itself in more detail, but in + /// brief, the ISO week date calendar system eschews months in favor of + /// weeks. + /// + /// This routine is equivalent to + /// [`ISOWeekDate::from_date(dt.date())`](ISOWeekDate::from_date). + /// + /// [ISO 8601 week date]: https://en.wikipedia.org/wiki/ISO_week_date + /// + /// # Example + /// + /// This shows a number of examples demonstrating the conversion from a + /// Gregorian date to an ISO 8601 week date: + /// + /// ``` + /// use jiff::civil::{Date, Time, Weekday, date}; + /// + /// let dt = date(1995, 1, 1).at(18, 45, 0, 0); + /// let weekdate = dt.iso_week_date(); + /// assert_eq!(weekdate.year(), 1994); + /// assert_eq!(weekdate.week(), 52); + /// assert_eq!(weekdate.weekday(), Weekday::Sunday); + /// + /// let dt = date(1996, 12, 31).at(18, 45, 0, 0); + /// let weekdate = dt.iso_week_date(); + /// assert_eq!(weekdate.year(), 1997); + /// assert_eq!(weekdate.week(), 1); + /// assert_eq!(weekdate.weekday(), Weekday::Tuesday); + /// + /// let dt = date(2019, 12, 30).at(18, 45, 0, 0); + /// let weekdate = dt.iso_week_date(); + /// assert_eq!(weekdate.year(), 2020); + /// assert_eq!(weekdate.week(), 1); + /// assert_eq!(weekdate.weekday(), Weekday::Monday); + /// + /// let dt = date(2024, 3, 9).at(18, 45, 0, 0); + /// let weekdate = dt.iso_week_date(); + /// assert_eq!(weekdate.year(), 2024); + /// assert_eq!(weekdate.week(), 10); + /// assert_eq!(weekdate.weekday(), Weekday::Saturday); + /// + /// let dt = Date::MIN.to_datetime(Time::MIN); + /// let weekdate = dt.iso_week_date(); + /// assert_eq!(weekdate.year(), -9999); + /// assert_eq!(weekdate.week(), 1); + /// assert_eq!(weekdate.weekday(), Weekday::Monday); + /// + /// let dt = Date::MAX.to_datetime(Time::MAX); + /// let weekdate = dt.iso_week_date(); + /// assert_eq!(weekdate.year(), 9999); + /// assert_eq!(weekdate.week(), 52); + /// assert_eq!(weekdate.weekday(), Weekday::Friday); + /// ``` + #[inline] + pub fn iso_week_date(self) -> ISOWeekDate { + self.date().iso_week_date() + } + + /// Converts a civil datetime to a [`Zoned`] datetime by adding the given + /// time zone. + /// + /// The name given is resolved to a [`TimeZone`] by using the default + /// [`TimeZoneDatabase`](crate::tz::TimeZoneDatabase) created by + /// [`tz::db`](crate::tz::db). Indeed, this is a convenience function for + /// [`DateTime::to_zoned`] where the time zone database lookup is done + /// automatically. + /// + /// In some cases, a civil datetime may be ambiguous in a + /// particular time zone. This routine automatically utilizes the + /// [`Disambiguation::Compatible`](crate::tz::Disambiguation) strategy + /// for resolving ambiguities. That is, if a civil datetime occurs in a + /// backward transition (called a fold), then the earlier time is selected. + /// Or if a civil datetime occurs in a forward transition (called a gap), + /// then the later time is selected. + /// + /// To convert a datetime to a `Zoned` using a different disambiguation + /// strategy, use [`TimeZone::to_ambiguous_zoned`]. + /// + /// # Errors + /// + /// This returns an error when the given time zone name could not be found + /// in the default time zone database. + /// + /// This also returns an error if this datetime could not be represented as + /// an instant. This can occur in some cases near the minimum and maximum + /// boundaries of a `DateTime`. + /// + /// # Example + /// + /// This is a simple example of converting a civil datetime (a "wall" or + /// "local" or "naive" datetime) to a datetime that is aware of its time + /// zone: + /// + /// ``` + /// use jiff::civil::DateTime; + /// + /// let dt: DateTime = "2024-06-20 15:06".parse()?; + /// let zdt = dt.in_tz("America/New_York")?; + /// assert_eq!(zdt.to_string(), "2024-06-20T15:06:00-04:00[America/New_York]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: dealing with ambiguity + /// + /// In the `America/New_York` time zone, there was a forward transition + /// at `2024-03-10 02:00:00` civil time, and a backward transition at + /// `2024-11-03 01:00:00` civil time. In the former case, a gap was + /// created such that the 2 o'clock hour never appeared on clocks for folks + /// in the `America/New_York` time zone. In the latter case, a fold was + /// created such that the 1 o'clock hour was repeated. Thus, March 10, 2024 + /// in New York was 23 hours long, while November 3, 2024 in New York was + /// 25 hours long. + /// + /// This example shows how datetimes in these gaps and folds are resolved + /// by default: + /// + /// ``` + /// use jiff::civil::DateTime; + /// + /// // This is the gap, where by default we select the later time. + /// let dt: DateTime = "2024-03-10 02:30".parse()?; + /// let zdt = dt.in_tz("America/New_York")?; + /// assert_eq!(zdt.to_string(), "2024-03-10T03:30:00-04:00[America/New_York]"); + /// + /// // This is the fold, where by default we select the earlier time. + /// let dt: DateTime = "2024-11-03 01:30".parse()?; + /// let zdt = dt.in_tz("America/New_York")?; + /// // Since this is a fold, the wall clock time is repeated. It might be + /// // hard to see that this is the earlier time, but notice the offset: + /// // it is the offset for DST time in New York. The later time, or the + /// // repetition of the 1 o'clock hour, would occur in standard time, + /// // which is an offset of -05 for New York. + /// assert_eq!(zdt.to_string(), "2024-11-03T01:30:00-04:00[America/New_York]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: errors + /// + /// This routine can return an error when the time zone is unrecognized: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 6, 20).at(15, 6, 0, 0); + /// assert!(dt.in_tz("does not exist").is_err()); + /// ``` + /// + /// Note that even if a time zone exists in, say, the IANA database, there + /// may have been a problem reading it from your system's installation of + /// that database. To see what wrong, enable Jiff's `logging` crate feature + /// and install a logger. If there was a failure, then a `WARN` level log + /// message should be emitted. + /// + /// This routine can also fail if this datetime cannot be represented + /// within the allowable timestamp limits: + /// + /// ``` + /// use jiff::{civil::DateTime, tz::{Offset, TimeZone}}; + /// + /// let dt = DateTime::MAX; + /// // All errors because the combination of the offset and the datetime + /// // isn't enough to fit into timestamp limits. + /// assert!(dt.in_tz("UTC").is_err()); + /// assert!(dt.in_tz("America/New_York").is_err()); + /// assert!(dt.in_tz("Australia/Tasmania").is_err()); + /// // In fact, the only valid offset one can use to turn the maximum civil + /// // datetime into a Zoned value is the maximum offset: + /// let tz = Offset::from_seconds(93_599).unwrap().to_time_zone(); + /// assert!(dt.to_zoned(tz).is_ok()); + /// // One second less than the maximum offset results in a failure at the + /// // maximum datetime boundary. + /// let tz = Offset::from_seconds(93_598).unwrap().to_time_zone(); + /// assert!(dt.to_zoned(tz).is_err()); + /// ``` + /// + /// This behavior exists because it guarantees that every possible `Zoned` + /// value can be converted into a civil datetime, but not every possible + /// combination of civil datetime and offset can be converted into a + /// `Zoned` value. There isn't a way to make every possible roundtrip + /// lossless in both directions, so Jiff chooses to ensure that there is + /// always a way to convert a `Zoned` instant to a human readable wall + /// clock time. + #[inline] + pub fn in_tz(self, time_zone_name: &str) -> Result { + let tz = crate::tz::db().get(time_zone_name)?; + self.to_zoned(tz) + } + + /// Converts a civil datetime to a [`Zoned`] datetime by adding the given + /// [`TimeZone`]. + /// + /// In some cases, a civil datetime may be ambiguous in a + /// particular time zone. This routine automatically utilizes the + /// [`Disambiguation::Compatible`](crate::tz::Disambiguation) strategy + /// for resolving ambiguities. That is, if a civil datetime occurs in a + /// backward transition (called a fold), then the earlier time is selected. + /// Or if a civil datetime occurs in a forward transition (called a gap), + /// then the later time is selected. + /// + /// To convert a datetime to a `Zoned` using a different disambiguation + /// strategy, use [`TimeZone::to_ambiguous_zoned`]. + /// + /// In the common case of a time zone being represented as a name string, + /// like `Australia/Tasmania`, consider using [`DateTime::in_tz`] + /// instead. + /// + /// # Errors + /// + /// This returns an error if this datetime could not be represented as an + /// instant. This can occur in some cases near the minimum and maximum + /// boundaries of a `DateTime`. + /// + /// # Example + /// + /// This example shows how to create a zoned value with a fixed time zone + /// offset: + /// + /// ``` + /// use jiff::{civil::date, tz::{self, TimeZone}}; + /// + /// let tz = TimeZone::fixed(tz::offset(-4)); + /// let zdt = date(2024, 6, 20).at(17, 3, 0, 0).to_zoned(tz)?; + /// // A time zone annotation is still included in the printable version + /// // of the Zoned value, but it is fixed to a particular offset. + /// assert_eq!(zdt.to_string(), "2024-06-20T17:03:00-04:00[-04:00]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: POSIX time zone strings + /// + /// And this example shows how to create a time zone from a POSIX time + /// zone string that describes the transition to and from daylight saving + /// time for `America/St_Johns`. In particular, this rule uses non-zero + /// minutes, which is atypical. + /// + /// ``` + /// use jiff::{civil::date, tz::TimeZone}; + /// + /// let tz = TimeZone::posix("NST3:30NDT,M3.2.0,M11.1.0")?; + /// let zdt = date(2024, 6, 20).at(17, 3, 0, 0).to_zoned(tz)?; + /// // There isn't any agreed upon mechanism for transmitting a POSIX time + /// // zone string within an RFC 9557 TZ annotation, so Jiff just emits the + /// // offset. In practice, POSIX TZ strings are rarely user facing anyway. + /// // (They are still in widespread use as an implementation detail of the + /// // IANA Time Zone Database however.) + /// assert_eq!(zdt.to_string(), "2024-06-20T17:03:00-02:30[-02:30]"); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn to_zoned(self, tz: TimeZone) -> Result { + use crate::tz::AmbiguousOffset; + + // It's pretty disappointing that we do this instead of the + // simpler: + // + // tz.into_ambiguous_zoned(self).compatible() + // + // Below, in the common case of an unambiguous datetime, + // we avoid doing the work to re-derive the datetime *and* + // offset from the timestamp we find from tzdb. In particular, + // `Zoned::new` does this work given a timestamp and a time + // zone. But we circumvent `Zoned::new` and use a special + // `Zoned::from_parts` crate-internal constructor to handle + // this case. + // + // Ideally we could do this in `AmbiguousZoned::compatible` + // itself, but it turns out that it doesn't always work. + // Namely, that API supports providing an unambiguous + // offset even when the civil datetime is within a + // DST transition. In that case, once the timestamp + // is resolved, the offset given might actually + // change. See `2024-03-11T02:02[America/New_York]` + // example for `AlwaysOffset` conflict resolution on + // `ZonedWith::disambiguation`. + // + // But the optimization works here because if we get an + // unambiguous offset from tzdb, then we know it isn't in a DST + // transition and that it won't change with the timestamp. + // + // This ends up saving a fair bit of cycles re-computing + // the offset (which requires another tzdb lookup) and + // re-generating the civil datetime from the timestamp for the + // re-computed offset. This helps the + // `civil_datetime_to_timestamp_tzdb_lookup/zoneinfo/jiff` + // micro-benchmark quite a bit. + let dt = self; + let amb_ts = tz.to_ambiguous_timestamp(dt); + let (offset, ts, dt) = match amb_ts.offset() { + AmbiguousOffset::Unambiguous { offset } => { + let ts = offset.to_timestamp(dt)?; + (offset, ts, dt) + } + AmbiguousOffset::Gap { before, .. } => { + let ts = before.to_timestamp(dt)?; + let offset = tz.to_offset(ts); + let dt = offset.to_datetime(ts); + (offset, ts, dt) + } + AmbiguousOffset::Fold { before, .. } => { + let ts = before.to_timestamp(dt)?; + let offset = tz.to_offset(ts); + let dt = offset.to_datetime(ts); + (offset, ts, dt) + } + }; + Ok(Zoned::from_parts(ts, tz, offset, dt)) + } + + /// Add the given span of time to this datetime. If the sum would overflow + /// the minimum or maximum datetime values, then an error is returned. + /// + /// This operation accepts three different duration types: [`Span`], + /// [`SignedDuration`] or [`std::time::Duration`]. This is achieved via + /// `From` trait implementations for the [`DateTimeArithmetic`] type. + /// + /// # Properties + /// + /// This routine is _not_ reversible because some additions may + /// be ambiguous. For example, adding `1 month` to the datetime + /// `2024-03-31T00:00:00` will produce `2024-04-30T00:00:00` since April + /// has only 30 days in a month. Moreover, subtracting `1 month` from + /// `2024-04-30T00:00:00` will produce `2024-03-30T00:00:00`, which is not + /// the date we started with. + /// + /// If spans of time are limited to units of days (or less), then this + /// routine _is_ reversible. This also implies that all operations with a + /// [`SignedDuration`] or a [`std::time::Duration`] are reversible. + /// + /// # Errors + /// + /// If the span added to this datetime would result in a datetime that + /// exceeds the range of a `DateTime`, then this will return an error. + /// + /// # Example + /// + /// This shows a few examples of adding spans of time to various dates. + /// We make use of the [`ToSpan`](crate::ToSpan) trait for convenient + /// creation of spans. + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let dt = date(1995, 12, 7).at(3, 24, 30, 3_500); + /// let got = dt.checked_add(20.years().months(4).nanoseconds(500))?; + /// assert_eq!(got, date(2016, 4, 7).at(3, 24, 30, 4_000)); + /// + /// let dt = date(2019, 1, 31).at(15, 30, 0, 0); + /// let got = dt.checked_add(1.months())?; + /// assert_eq!(got, date(2019, 2, 28).at(15, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: available via addition operator + /// + /// This routine can be used via the `+` operator. Note though that if it + /// fails, it will result in a panic. + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let dt = date(1995, 12, 7).at(3, 24, 30, 3_500); + /// let got = dt + 20.years().months(4).nanoseconds(500); + /// assert_eq!(got, date(2016, 4, 7).at(3, 24, 30, 4_000)); + /// ``` + /// + /// # Example: negative spans are supported + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let dt = date(2024, 3, 31).at(19, 5, 59, 999_999_999); + /// assert_eq!( + /// dt.checked_add(-1.months())?, + /// date(2024, 2, 29).at(19, 5, 59, 999_999_999), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: error on overflow + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let dt = date(2024, 3, 31).at(13, 13, 13, 13); + /// assert!(dt.checked_add(9000.years()).is_err()); + /// assert!(dt.checked_add(-19000.years()).is_err()); + /// ``` + /// + /// # Example: adding absolute durations + /// + /// This shows how to add signed and unsigned absolute durations to a + /// `DateTime`. + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::date, SignedDuration}; + /// + /// let dt = date(2024, 2, 29).at(0, 0, 0, 0); + /// + /// let dur = SignedDuration::from_hours(25); + /// assert_eq!(dt.checked_add(dur)?, date(2024, 3, 1).at(1, 0, 0, 0)); + /// assert_eq!(dt.checked_add(-dur)?, date(2024, 2, 27).at(23, 0, 0, 0)); + /// + /// let dur = Duration::from_secs(25 * 60 * 60); + /// assert_eq!(dt.checked_add(dur)?, date(2024, 3, 1).at(1, 0, 0, 0)); + /// // One cannot negate an unsigned duration, + /// // but you can subtract it! + /// assert_eq!(dt.checked_sub(dur)?, date(2024, 2, 27).at(23, 0, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn checked_add>( + self, + duration: A, + ) -> Result { + let duration: DateTimeArithmetic = duration.into(); + duration.checked_add(self) + } + + #[inline] + fn checked_add_span(self, span: &Span) -> Result { + let (old_date, old_time) = (self.date(), self.time()); + let units = span.units(); + match (units.only_calendar().is_empty(), units.only_time().is_empty()) + { + (true, true) => Ok(self), + (false, true) => { + let new_date = old_date + .checked_add(span) + .context(E::FailedAddSpanDate)?; + Ok(DateTime::from_parts(new_date, old_time)) + } + (true, false) => { + let (new_time, leftovers) = old_time + .overflowing_add(span) + .context(E::FailedAddSpanTime)?; + let new_date = old_date + .checked_add(leftovers) + .context(E::FailedAddSpanOverflowing)?; + Ok(DateTime::from_parts(new_date, new_time)) + } + (false, false) => self.checked_add_span_general(span), + } + } + + #[inline(never)] + #[cold] + fn checked_add_span_general(self, span: &Span) -> Result { + let (old_date, old_time) = (self.date(), self.time()); + let span_date = span.without_lower(Unit::Day); + let span_time = span.only_lower(Unit::Day); + + let (new_time, leftovers) = old_time + .overflowing_add(&span_time) + .context(E::FailedAddSpanTime)?; + let new_date = + old_date.checked_add(span_date).context(E::FailedAddSpanDate)?; + let new_date = new_date + .checked_add(leftovers) + .context(E::FailedAddSpanOverflowing)?; + Ok(DateTime::from_parts(new_date, new_time)) + } + + #[inline] + fn checked_add_duration( + self, + duration: SignedDuration, + ) -> Result { + let (date, time) = (self.date(), self.time()); + let (new_time, leftovers) = time.overflowing_add_duration(duration)?; + let new_date = date + .checked_add(leftovers) + .context(E::FailedAddDurationOverflowing)?; + Ok(DateTime::from_parts(new_date, new_time)) + } + + /// This routine is identical to [`DateTime::checked_add`] with the + /// duration negated. + /// + /// # Errors + /// + /// This has the same error conditions as [`DateTime::checked_add`]. + /// + /// # Example + /// + /// This routine can be used via the `-` operator. Note though that if it + /// fails, it will result in a panic. + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::date, SignedDuration, ToSpan}; + /// + /// let dt = date(1995, 12, 7).at(3, 24, 30, 3_500); + /// assert_eq!( + /// dt - 20.years().months(4).nanoseconds(500), + /// date(1975, 8, 7).at(3, 24, 30, 3_000), + /// ); + /// + /// let dur = SignedDuration::new(24 * 60 * 60, 3_500); + /// assert_eq!(dt - dur, date(1995, 12, 6).at(3, 24, 30, 0)); + /// + /// let dur = Duration::new(24 * 60 * 60, 3_500); + /// assert_eq!(dt - dur, date(1995, 12, 6).at(3, 24, 30, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn checked_sub>( + self, + duration: A, + ) -> Result { + let duration: DateTimeArithmetic = duration.into(); + duration.checked_neg().and_then(|dta| dta.checked_add(self)) + } + + /// This routine is identical to [`DateTime::checked_add`], except the + /// result saturates on overflow. That is, instead of overflow, either + /// [`DateTime::MIN`] or [`DateTime::MAX`] is returned. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::{DateTime, date}, SignedDuration, ToSpan}; + /// + /// let dt = date(2024, 3, 31).at(13, 13, 13, 13); + /// assert_eq!(DateTime::MAX, dt.saturating_add(9000.years())); + /// assert_eq!(DateTime::MIN, dt.saturating_add(-19000.years())); + /// assert_eq!(DateTime::MAX, dt.saturating_add(SignedDuration::MAX)); + /// assert_eq!(DateTime::MIN, dt.saturating_add(SignedDuration::MIN)); + /// assert_eq!(DateTime::MAX, dt.saturating_add(std::time::Duration::MAX)); + /// ``` + #[inline] + pub fn saturating_add>( + self, + duration: A, + ) -> DateTime { + let duration: DateTimeArithmetic = duration.into(); + self.checked_add(duration).unwrap_or_else(|_| { + if duration.is_negative() { + DateTime::MIN + } else { + DateTime::MAX + } + }) + } + + /// This routine is identical to [`DateTime::saturating_add`] with the span + /// parameter negated. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::{DateTime, date}, SignedDuration, ToSpan}; + /// + /// let dt = date(2024, 3, 31).at(13, 13, 13, 13); + /// assert_eq!(DateTime::MIN, dt.saturating_sub(19000.years())); + /// assert_eq!(DateTime::MAX, dt.saturating_sub(-9000.years())); + /// assert_eq!(DateTime::MIN, dt.saturating_sub(SignedDuration::MAX)); + /// assert_eq!(DateTime::MAX, dt.saturating_sub(SignedDuration::MIN)); + /// assert_eq!(DateTime::MIN, dt.saturating_sub(std::time::Duration::MAX)); + /// ``` + #[inline] + pub fn saturating_sub>( + self, + duration: A, + ) -> DateTime { + let duration: DateTimeArithmetic = duration.into(); + let Ok(duration) = duration.checked_neg() else { + return DateTime::MIN; + }; + self.saturating_add(duration) + } + + /// Returns a span representing the elapsed time from this datetime until + /// the given `other` datetime. + /// + /// When `other` occurs before this datetime, then the span returned will + /// be negative. + /// + /// Depending on the input provided, the span returned is rounded. It may + /// also be balanced up to bigger units than the default. By default, the + /// span returned is balanced such that the biggest possible unit is days. + /// This default is an API guarantee. Users can rely on the default not + /// returning any calendar units bigger than days in the default + /// configuration. + /// + /// This operation is configured by providing a [`DateTimeDifference`] + /// value. Since this routine accepts anything that implements + /// `Into`, once can pass a `DateTime` directly. + /// One can also pass a `(Unit, DateTime)`, where `Unit` is treated as + /// [`DateTimeDifference::largest`]. + /// + /// # Properties + /// + /// It is guaranteed that if the returned span is subtracted from `other`, + /// and if no rounding is requested, and if the largest unit requested is + /// at most `Unit::Day`, then the original datetime will be returned. + /// + /// This routine is equivalent to `self.since(other).map(|span| -span)` + /// if no rounding options are set. If rounding options are set, then + /// it's equivalent to + /// `self.since(other_without_rounding_options).map(|span| -span)`, + /// followed by a call to [`Span::round`] with the appropriate rounding + /// options set. This is because the negation of a span can result in + /// different rounding results depending on the rounding mode. + /// + /// # Errors + /// + /// An error can occur in some cases when the requested configuration would + /// result in a span that is beyond allowable limits. For example, the + /// nanosecond component of a span cannot the span of time between the + /// minimum and maximum datetime supported by Jiff. Therefore, if one + /// requests a span with its largest unit set to [`Unit::Nanosecond`], then + /// it's possible for this routine to fail. + /// + /// It is guaranteed that if one provides a datetime with the default + /// [`DateTimeDifference`] configuration, then this routine will never + /// fail. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let earlier = date(2006, 8, 24).at(22, 30, 0, 0); + /// let later = date(2019, 1, 31).at(21, 0, 0, 0); + /// assert_eq!( + /// earlier.until(later)?, + /// 4542.days().hours(22).minutes(30).fieldwise(), + /// ); + /// + /// // Flipping the dates is fine, but you'll get a negative span. + /// assert_eq!( + /// later.until(earlier)?, + /// -4542.days().hours(22).minutes(30).fieldwise(), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: using bigger units + /// + /// This example shows how to expand the span returned to bigger units. + /// This makes use of a `From<(Unit, DateTime)> for DateTimeDifference` + /// trait implementation. + /// + /// ``` + /// use jiff::{civil::date, Unit, ToSpan}; + /// + /// let dt1 = date(1995, 12, 07).at(3, 24, 30, 3500); + /// let dt2 = date(2019, 01, 31).at(15, 30, 0, 0); + /// + /// // The default limits durations to using "days" as the biggest unit. + /// let span = dt1.until(dt2)?; + /// assert_eq!(span.to_string(), "P8456DT12H5M29.9999965S"); + /// + /// // But we can ask for units all the way up to years. + /// let span = dt1.until((Unit::Year, dt2))?; + /// assert_eq!(span.to_string(), "P23Y1M24DT12H5M29.9999965S"); + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: rounding the result + /// + /// This shows how one might find the difference between two datetimes and + /// have the result rounded such that sub-seconds are removed. + /// + /// In this case, we need to hand-construct a [`DateTimeDifference`] + /// in order to gain full configurability. + /// + /// ``` + /// use jiff::{civil::{DateTimeDifference, date}, Unit, ToSpan}; + /// + /// let dt1 = date(1995, 12, 07).at(3, 24, 30, 3500); + /// let dt2 = date(2019, 01, 31).at(15, 30, 0, 0); + /// + /// let span = dt1.until( + /// DateTimeDifference::from(dt2).smallest(Unit::Second), + /// )?; + /// assert_eq!(format!("{span:#}"), "8456d 12h 5m 29s"); + /// + /// // We can combine smallest and largest units too! + /// let span = dt1.until( + /// DateTimeDifference::from(dt2) + /// .smallest(Unit::Second) + /// .largest(Unit::Year), + /// )?; + /// assert_eq!(span.to_string(), "P23Y1M24DT12H5M29S"); + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: units biggers than days inhibit reversibility + /// + /// If you ask for units bigger than days, then subtracting the span + /// returned from the `other` datetime is not guaranteed to result in the + /// original datetime. For example: + /// + /// ``` + /// use jiff::{civil::date, Unit, ToSpan}; + /// + /// let dt1 = date(2024, 3, 2).at(0, 0, 0, 0); + /// let dt2 = date(2024, 5, 1).at(0, 0, 0, 0); + /// + /// let span = dt1.until((Unit::Month, dt2))?; + /// assert_eq!(span, 1.month().days(29).fieldwise()); + /// let maybe_original = dt2.checked_sub(span)?; + /// // Not the same as the original datetime! + /// assert_eq!(maybe_original, date(2024, 3, 3).at(0, 0, 0, 0)); + /// + /// // But in the default configuration, days are always the biggest unit + /// // and reversibility is guaranteed. + /// let span = dt1.until(dt2)?; + /// assert_eq!(span, 60.days().fieldwise()); + /// let is_original = dt2.checked_sub(span)?; + /// assert_eq!(is_original, dt1); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// This occurs because span are added as if by adding the biggest units + /// first, and then the smaller units. Because months vary in length, + /// their meaning can change depending on how the span is added. In this + /// case, adding one month to `2024-03-02` corresponds to 31 days, but + /// subtracting one month from `2024-05-01` corresponds to 30 days. + #[inline] + pub fn until>( + self, + other: A, + ) -> Result { + let args: DateTimeDifference = other.into(); + let span = args.until_with_largest_unit(self)?; + if args.rounding_may_change_span() { + span.round(args.round.relative(self)) + } else { + Ok(span) + } + } + + /// This routine is identical to [`DateTime::until`], but the order of the + /// parameters is flipped. + /// + /// # Errors + /// + /// This has the same error conditions as [`DateTime::until`]. + /// + /// # Example + /// + /// This routine can be used via the `-` operator. Since the default + /// configuration is used and because a `Span` can represent the difference + /// between any two possible datetimes, it will never panic. + /// + /// ``` + /// use jiff::{civil::date, ToSpan}; + /// + /// let earlier = date(2006, 8, 24).at(22, 30, 0, 0); + /// let later = date(2019, 1, 31).at(21, 0, 0, 0); + /// assert_eq!( + /// later - earlier, + /// 4542.days().hours(22).minutes(30).fieldwise(), + /// ); + /// ``` + #[inline] + pub fn since>( + self, + other: A, + ) -> Result { + let args: DateTimeDifference = other.into(); + let span = -args.until_with_largest_unit(self)?; + if args.rounding_may_change_span() { + span.round(args.round.relative(self)) + } else { + Ok(span) + } + } + + /// Returns an absolute duration representing the elapsed time from this + /// datetime until the given `other` datetime. + /// + /// When `other` occurs before this datetime, then the duration returned + /// will be negative. + /// + /// Unlike [`DateTime::until`], this returns a duration corresponding to a + /// 96-bit integer of nanoseconds between two datetimes. + /// + /// # Fallibility + /// + /// This routine never panics or returns an error. Since there are no + /// configuration options that can be incorrectly provided, no error is + /// possible when calling this routine. In contrast, [`DateTime::until`] + /// can return an error in some cases due to misconfiguration. But like + /// this routine, [`DateTime::until`] never panics or returns an error in + /// its default configuration. + /// + /// # When should I use this versus [`DateTime::until`]? + /// + /// See the type documentation for [`SignedDuration`] for the section on + /// when one should use [`Span`] and when one should use `SignedDuration`. + /// In short, use `Span` (and therefore `DateTime::until`) unless you have + /// a specific reason to do otherwise. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::date, SignedDuration}; + /// + /// let earlier = date(2006, 8, 24).at(22, 30, 0, 0); + /// let later = date(2019, 1, 31).at(21, 0, 0, 0); + /// assert_eq!( + /// earlier.duration_until(later), + /// SignedDuration::from_hours(4542 * 24) + /// + SignedDuration::from_hours(22) + /// + SignedDuration::from_mins(30), + /// ); + /// // Flipping the datetimes is fine, but you'll get a negative duration. + /// assert_eq!( + /// later.duration_until(earlier), + /// -SignedDuration::from_hours(4542 * 24) + /// - SignedDuration::from_hours(22) + /// - SignedDuration::from_mins(30), + /// ); + /// ``` + /// + /// # Example: difference with [`DateTime::until`] + /// + /// The main difference between this routine and `DateTime::until` is that + /// the latter can return units other than a 96-bit integer of nanoseconds. + /// While a 96-bit integer of nanoseconds can be converted into other units + /// like hours, this can only be done for uniform units. (Uniform units are + /// units for which each individual unit always corresponds to the same + /// elapsed time regardless of the datetime it is relative to.) This can't + /// be done for units like years or months. + /// + /// ``` + /// use jiff::{civil::date, SignedDuration, Span, SpanRound, ToSpan, Unit}; + /// + /// let dt1 = date(2024, 1, 1).at(0, 0, 0, 0); + /// let dt2 = date(2025, 4, 1).at(0, 0, 0, 0); + /// + /// let span = dt1.until((Unit::Year, dt2))?; + /// assert_eq!(span, 1.year().months(3).fieldwise()); + /// + /// let duration = dt1.duration_until(dt2); + /// assert_eq!(duration, SignedDuration::from_hours(456 * 24)); + /// // There's no way to extract years or months from the signed + /// // duration like one might extract hours (because every hour + /// // is the same length). Instead, you actually have to convert + /// // it to a span and then balance it by providing a relative date! + /// let options = SpanRound::new().largest(Unit::Year).relative(dt1); + /// let span = Span::try_from(duration)?.round(options)?; + /// assert_eq!(span, 1.year().months(3).fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: getting an unsigned duration + /// + /// If you're looking to find the duration between two datetimes as a + /// [`std::time::Duration`], you'll need to use this method to get a + /// [`SignedDuration`] and then convert it to a `std::time::Duration`: + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::civil::date; + /// + /// let dt1 = date(2024, 7, 1).at(0, 0, 0, 0); + /// let dt2 = date(2024, 8, 1).at(0, 0, 0, 0); + /// let duration = Duration::try_from(dt1.duration_until(dt2))?; + /// assert_eq!(duration, Duration::from_secs(31 * 24 * 60 * 60)); + /// + /// // Note that unsigned durations cannot represent all + /// // possible differences! If the duration would be negative, + /// // then the conversion fails: + /// assert!(Duration::try_from(dt2.duration_until(dt1)).is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn duration_until(self, other: DateTime) -> SignedDuration { + SignedDuration::datetime_until(self, other) + } + + /// This routine is identical to [`DateTime::duration_until`], but the + /// order of the parameters is flipped. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::date, SignedDuration}; + /// + /// let earlier = date(2006, 8, 24).at(22, 30, 0, 0); + /// let later = date(2019, 1, 31).at(21, 0, 0, 0); + /// assert_eq!( + /// later.duration_since(earlier), + /// SignedDuration::from_hours(4542 * 24) + /// + SignedDuration::from_hours(22) + /// + SignedDuration::from_mins(30), + /// ); + /// ``` + #[inline] + pub fn duration_since(self, other: DateTime) -> SignedDuration { + SignedDuration::datetime_until(other, self) + } + + /// Rounds this datetime according to the [`DateTimeRound`] configuration + /// given. + /// + /// The principal option is [`DateTimeRound::smallest`], which allows one + /// to configure the smallest units in the returned datetime. Rounding + /// is what determines whether that unit should keep its current value + /// or whether it should be incremented. Moreover, the amount it should + /// be incremented can be configured via [`DateTimeRound::increment`]. + /// Finally, the rounding strategy itself can be configured via + /// [`DateTimeRound::mode`]. + /// + /// Note that this routine is generic and accepts anything that + /// implements `Into`. Some notable implementations are: + /// + /// * `From for DateTimeRound`, which will automatically create a + /// `DateTimeRound::new().smallest(unit)` from the unit provided. + /// * `From<(Unit, i64)> for DateTimeRound`, which will automatically + /// create a `DateTimeRound::new().smallest(unit).increment(number)` from + /// the unit and increment provided. + /// + /// # Errors + /// + /// This returns an error if the smallest unit configured on the given + /// [`DateTimeRound`] is bigger than days. An error is also returned if + /// the rounding increment is greater than 1 when the units are days. + /// (Currently, rounding to the nearest week, month or year is not + /// supported.) + /// + /// When the smallest unit is less than days, the rounding increment must + /// divide evenly into the next highest unit after the smallest unit + /// configured (and must not be equivalent to it). For example, if the + /// smallest unit is [`Unit::Nanosecond`], then *some* of the valid values + /// for the rounding increment are `1`, `2`, `4`, `5`, `100` and `500`. + /// Namely, any integer that divides evenly into `1,000` nanoseconds since + /// there are `1,000` nanoseconds in the next highest unit (microseconds). + /// + /// This can also return an error in some cases where rounding would + /// require arithmetic that exceeds the maximum datetime value. + /// + /// # Example + /// + /// This is a basic example that demonstrates rounding a datetime to the + /// nearest day. This also demonstrates calling this method with the + /// smallest unit directly, instead of constructing a `DateTimeRound` + /// manually. + /// + /// ``` + /// use jiff::{civil::date, Unit}; + /// + /// let dt = date(2024, 6, 19).at(15, 0, 0, 0); + /// assert_eq!(dt.round(Unit::Day)?, date(2024, 6, 20).at(0, 0, 0, 0)); + /// let dt = date(2024, 6, 19).at(10, 0, 0, 0); + /// assert_eq!(dt.round(Unit::Day)?, date(2024, 6, 19).at(0, 0, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: changing the rounding mode + /// + /// The default rounding mode is [`RoundMode::HalfExpand`], which + /// breaks ties by rounding away from zero. But other modes like + /// [`RoundMode::Trunc`] can be used too: + /// + /// ``` + /// use jiff::{civil::{DateTimeRound, date}, RoundMode, Unit}; + /// + /// let dt = date(2024, 6, 19).at(15, 0, 0, 0); + /// assert_eq!(dt.round(Unit::Day)?, date(2024, 6, 20).at(0, 0, 0, 0)); + /// // The default will round up to the next day for any time past noon, + /// // but using truncation rounding will always round down. + /// assert_eq!( + /// dt.round( + /// DateTimeRound::new().smallest(Unit::Day).mode(RoundMode::Trunc), + /// )?, + /// date(2024, 6, 19).at(0, 0, 0, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: rounding to the nearest 5 minute increment + /// + /// ``` + /// use jiff::{civil::date, Unit}; + /// + /// // rounds down + /// let dt = date(2024, 6, 19).at(15, 27, 29, 999_999_999); + /// assert_eq!( + /// dt.round((Unit::Minute, 5))?, + /// date(2024, 6, 19).at(15, 25, 0, 0), + /// ); + /// // rounds up + /// let dt = date(2024, 6, 19).at(15, 27, 30, 0); + /// assert_eq!( + /// dt.round((Unit::Minute, 5))?, + /// date(2024, 6, 19).at(15, 30, 0, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: overflow error + /// + /// This example demonstrates that it's possible for this operation to + /// result in an error from datetime arithmetic overflow. + /// + /// ``` + /// use jiff::{civil::DateTime, Unit}; + /// + /// let dt = DateTime::MAX; + /// assert!(dt.round(Unit::Day).is_err()); + /// ``` + /// + /// This occurs because rounding to the nearest day for the maximum + /// datetime would result in rounding up to the next day. But the next day + /// is greater than the maximum, and so this returns an error. + /// + /// If one were to use a rounding mode like [`RoundMode::Trunc`] (which + /// will never round up), always set a correct increment and always used + /// units less than or equal to days, then this routine is guaranteed to + /// never fail: + /// + /// ``` + /// use jiff::{civil::{DateTime, DateTimeRound, date}, RoundMode, Unit}; + /// + /// let round = DateTimeRound::new() + /// .smallest(Unit::Day) + /// .mode(RoundMode::Trunc); + /// assert_eq!( + /// DateTime::MAX.round(round)?, + /// date(9999, 12, 31).at(0, 0, 0, 0), + /// ); + /// assert_eq!( + /// DateTime::MIN.round(round)?, + /// date(-9999, 1, 1).at(0, 0, 0, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn round>( + self, + options: R, + ) -> Result { + let options: DateTimeRound = options.into(); + options.round(self) + } + + /// Return an iterator of periodic datetimes determined by the given span. + /// + /// The given span may be negative, in which case, the iterator will move + /// backwards through time. The iterator won't stop until either the span + /// itself overflows, or it would otherwise exceed the minimum or maximum + /// `DateTime` value. + /// + /// # Example: when to check a glucose monitor + /// + /// When my cat had diabetes, my veterinarian installed a glucose monitor + /// and instructed me to scan it about every 5 hours. This example lists + /// all of the times I need to scan it for the 2 days following its + /// installation: + /// + /// ``` + /// use jiff::{civil::datetime, ToSpan}; + /// + /// let start = datetime(2023, 7, 15, 16, 30, 0, 0); + /// let end = start.checked_add(2.days())?; + /// let mut scan_times = vec![]; + /// for dt in start.series(5.hours()).take_while(|&dt| dt <= end) { + /// scan_times.push(dt); + /// } + /// assert_eq!(scan_times, vec![ + /// datetime(2023, 7, 15, 16, 30, 0, 0), + /// datetime(2023, 7, 15, 21, 30, 0, 0), + /// datetime(2023, 7, 16, 2, 30, 0, 0), + /// datetime(2023, 7, 16, 7, 30, 0, 0), + /// datetime(2023, 7, 16, 12, 30, 0, 0), + /// datetime(2023, 7, 16, 17, 30, 0, 0), + /// datetime(2023, 7, 16, 22, 30, 0, 0), + /// datetime(2023, 7, 17, 3, 30, 0, 0), + /// datetime(2023, 7, 17, 8, 30, 0, 0), + /// datetime(2023, 7, 17, 13, 30, 0, 0), + /// ]); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn series(self, period: Span) -> DateTimeSeries { + DateTimeSeries { start: self, period, step: 0 } + } + + /// Converts this datetime to a nanosecond timestamp assuming a Zulu time + /// zone offset and where all days are exactly 24 hours long. + #[inline] + fn to_duration(self) -> SignedDuration { + let mut dur = + SignedDuration::from_civil_days32(self.date().to_unix_epoch_day()); + dur += self.time().to_duration(); + dur + } + + #[inline] + pub(crate) const fn to_idatetime_const(&self) -> IDateTime { + IDateTime { + date: self.date.to_idate_const(), + time: self.time.to_itime_const(), + } + } + + #[inline] + pub(crate) const fn from_idatetime_const(idt: IDateTime) -> DateTime { + DateTime::from_parts( + Date::from_idate_const(idt.date), + Time::from_itime_const(idt.time), + ) + } +} + +/// Parsing and formatting using a "printf"-style API. +impl DateTime { + /// Parses a civil datetime in `input` matching the given `format`. + /// + /// The format string uses a "printf"-style API where conversion + /// specifiers can be used as place holders to match components of + /// a datetime. For details on the specifiers supported, see the + /// [`fmt::strtime`] module documentation. + /// + /// # Errors + /// + /// This returns an error when parsing failed. This might happen because + /// the format string itself was invalid, or because the input didn't match + /// the format string. + /// + /// This also returns an error if there wasn't sufficient information to + /// construct a civil datetime. For example, if an offset wasn't parsed. + /// + /// # Example + /// + /// This example shows how to parse a civil datetime: + /// + /// ``` + /// use jiff::civil::DateTime; + /// + /// let dt = DateTime::strptime("%F %H:%M", "2024-07-14 21:14")?; + /// assert_eq!(dt.to_string(), "2024-07-14T21:14:00"); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn strptime( + format: impl AsRef<[u8]>, + input: impl AsRef<[u8]>, + ) -> Result { + fmt::strtime::parse(format, input).and_then(|tm| tm.to_datetime()) + } + + /// Formats this civil datetime according to the given `format`. + /// + /// The format string uses a "printf"-style API where conversion + /// specifiers can be used as place holders to format components of + /// a datetime. For details on the specifiers supported, see the + /// [`fmt::strtime`] module documentation. + /// + /// # Errors and panics + /// + /// While this routine itself does not error or panic, using the value + /// returned may result in a panic if formatting fails. See the + /// documentation on [`fmt::strtime::Display`] for more information. + /// + /// To format in a way that surfaces errors without panicking, use either + /// [`fmt::strtime::format`] or [`fmt::strtime::BrokenDownTime::format`]. + /// + /// # Example + /// + /// This example shows how to format a civil datetime: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 7, 15).at(16, 24, 59, 0); + /// let string = dt.strftime("%A, %B %e, %Y at %H:%M:%S").to_string(); + /// assert_eq!(string, "Monday, July 15, 2024 at 16:24:59"); + /// ``` + #[inline] + pub fn strftime<'f, F: 'f + ?Sized + AsRef<[u8]>>( + &self, + format: &'f F, + ) -> fmt::strtime::Display<'f> { + fmt::strtime::Display { fmt: format.as_ref(), tm: (*self).into() } + } +} + +impl Default for DateTime { + #[inline] + fn default() -> DateTime { + DateTime::ZERO + } +} + +/// Converts a `DateTime` into a human readable datetime string. +/// +/// (This `Debug` representation currently emits the same string as the +/// `Display` representation, but this is not a guarantee.) +/// +/// Options currently supported: +/// +/// * [`std::fmt::Formatter::precision`] can be set to control the precision +/// of the fractional second component. +/// +/// # Example +/// +/// ``` +/// use jiff::civil::date; +/// +/// let dt = date(2024, 6, 15).at(7, 0, 0, 123_000_000); +/// assert_eq!(format!("{dt:.6?}"), "2024-06-15T07:00:00.123000"); +/// // Precision values greater than 9 are clamped to 9. +/// assert_eq!(format!("{dt:.300?}"), "2024-06-15T07:00:00.123000000"); +/// // A precision of 0 implies the entire fractional +/// // component is always truncated. +/// assert_eq!(format!("{dt:.0?}"), "2024-06-15T07:00:00"); +/// +/// # Ok::<(), Box>(()) +/// ``` +impl core::fmt::Debug for DateTime { + #[inline] + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + core::fmt::Display::fmt(self, f) + } +} + +/// Converts a `DateTime` into an ISO 8601 compliant string. +/// +/// # Formatting options supported +/// +/// * [`std::fmt::Formatter::precision`] can be set to control the precision +/// of the fractional second component. When not set, the minimum precision +/// required to losslessly render the value is used. +/// +/// # Example +/// +/// This shows the default rendering: +/// +/// ``` +/// use jiff::civil::date; +/// +/// // No fractional seconds: +/// let dt = date(2024, 6, 15).at(7, 0, 0, 0); +/// assert_eq!(format!("{dt}"), "2024-06-15T07:00:00"); +/// +/// // With fractional seconds: +/// let dt = date(2024, 6, 15).at(7, 0, 0, 123_000_000); +/// assert_eq!(format!("{dt}"), "2024-06-15T07:00:00.123"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// # Example: setting the precision +/// +/// ``` +/// use jiff::civil::date; +/// +/// let dt = date(2024, 6, 15).at(7, 0, 0, 123_000_000); +/// assert_eq!(format!("{dt:.6}"), "2024-06-15T07:00:00.123000"); +/// // Precision values greater than 9 are clamped to 9. +/// assert_eq!(format!("{dt:.300}"), "2024-06-15T07:00:00.123000000"); +/// // A precision of 0 implies the entire fractional +/// // component is always truncated. +/// assert_eq!(format!("{dt:.0}"), "2024-06-15T07:00:00"); +/// +/// # Ok::<(), Box>(()) +/// ``` +impl core::fmt::Display for DateTime { + #[inline] + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + use crate::fmt::StdFmtWrite; + + let precision = + f.precision().map(|p| u8::try_from(p).unwrap_or(u8::MAX)); + temporal::DateTimePrinter::new() + .precision(precision) + .print_datetime(self, StdFmtWrite(f)) + .map_err(|_| core::fmt::Error) + } +} + +impl core::str::FromStr for DateTime { + type Err = Error; + + #[inline] + fn from_str(string: &str) -> Result { + DEFAULT_DATETIME_PARSER.parse_datetime(string) + } +} + +/// Converts a [`Date`] to a [`DateTime`] with the time set to midnight. +impl From for DateTime { + #[inline] + fn from(date: Date) -> DateTime { + date.to_datetime(Time::midnight()) + } +} + +/// Converts a [`Zoned`] to a [`DateTime`]. +impl From for DateTime { + #[inline] + fn from(zdt: Zoned) -> DateTime { + zdt.datetime() + } +} + +/// Converts a [`&Zoned`](Zoned) to a [`DateTime`]. +impl<'a> From<&'a Zoned> for DateTime { + #[inline] + fn from(zdt: &'a Zoned) -> DateTime { + zdt.datetime() + } +} + +/// Adds a span of time to a datetime. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_add`]. +impl core::ops::Add for DateTime { + type Output = DateTime; + + #[inline] + fn add(self, rhs: Span) -> DateTime { + self.checked_add(rhs).expect("adding span to datetime overflowed") + } +} + +/// Adds a span of time to a datetime in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_add`]. +impl core::ops::AddAssign for DateTime { + #[inline] + fn add_assign(&mut self, rhs: Span) { + *self = *self + rhs + } +} + +/// Subtracts a span of time from a datetime. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_sub`]. +impl core::ops::Sub for DateTime { + type Output = DateTime; + + #[inline] + fn sub(self, rhs: Span) -> DateTime { + self.checked_sub(rhs) + .expect("subtracting span from datetime overflowed") + } +} + +/// Subtracts a span of time from a datetime in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_sub`]. +impl core::ops::SubAssign for DateTime { + #[inline] + fn sub_assign(&mut self, rhs: Span) { + *self = *self - rhs + } +} + +/// Computes the span of time between two datetimes. +/// +/// This will return a negative span when the datetime being subtracted is +/// greater. +/// +/// Since this uses the default configuration for calculating a span between +/// two datetimes (no rounding and largest units is days), this will never +/// panic or fail in any way. It is guaranteed that the largest non-zero +/// unit in the `Span` returned will be days. +/// +/// To configure the largest unit or enable rounding, use [`DateTime::since`]. +/// +/// If you need a [`SignedDuration`] representing the span between two civil +/// datetimes, then use [`DateTime::duration_since`]. +impl core::ops::Sub for DateTime { + type Output = Span; + + #[inline] + fn sub(self, rhs: DateTime) -> Span { + self.since(rhs).expect("since never fails when given DateTime") + } +} + +/// Adds a signed duration of time to a datetime. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_add`]. +impl core::ops::Add for DateTime { + type Output = DateTime; + + #[inline] + fn add(self, rhs: SignedDuration) -> DateTime { + self.checked_add(rhs) + .expect("adding signed duration to datetime overflowed") + } +} + +/// Adds a signed duration of time to a datetime in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_add`]. +impl core::ops::AddAssign for DateTime { + #[inline] + fn add_assign(&mut self, rhs: SignedDuration) { + *self = *self + rhs + } +} + +/// Subtracts a signed duration of time from a datetime. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_sub`]. +impl core::ops::Sub for DateTime { + type Output = DateTime; + + #[inline] + fn sub(self, rhs: SignedDuration) -> DateTime { + self.checked_sub(rhs) + .expect("subtracting signed duration from datetime overflowed") + } +} + +/// Subtracts a signed duration of time from a datetime in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_sub`]. +impl core::ops::SubAssign for DateTime { + #[inline] + fn sub_assign(&mut self, rhs: SignedDuration) { + *self = *self - rhs + } +} + +/// Adds an unsigned duration of time to a datetime. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_add`]. +impl core::ops::Add for DateTime { + type Output = DateTime; + + #[inline] + fn add(self, rhs: UnsignedDuration) -> DateTime { + self.checked_add(rhs) + .expect("adding unsigned duration to datetime overflowed") + } +} + +/// Adds an unsigned duration of time to a datetime in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_add`]. +impl core::ops::AddAssign for DateTime { + #[inline] + fn add_assign(&mut self, rhs: UnsignedDuration) { + *self = *self + rhs + } +} + +/// Subtracts an unsigned duration of time from a datetime. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_sub`]. +impl core::ops::Sub for DateTime { + type Output = DateTime; + + #[inline] + fn sub(self, rhs: UnsignedDuration) -> DateTime { + self.checked_sub(rhs) + .expect("subtracting unsigned duration from datetime overflowed") + } +} + +/// Subtracts an unsigned duration of time from a datetime in place. +/// +/// This uses checked arithmetic and panics on overflow. To handle overflow +/// without panics, use [`DateTime::checked_sub`]. +impl core::ops::SubAssign for DateTime { + #[inline] + fn sub_assign(&mut self, rhs: UnsignedDuration) { + *self = *self - rhs + } +} + +#[cfg(feature = "serde")] +impl serde_core::Serialize for DateTime { + #[inline] + fn serialize( + &self, + serializer: S, + ) -> Result { + serializer.collect_str(self) + } +} + +#[cfg(feature = "serde")] +impl<'de> serde_core::Deserialize<'de> for DateTime { + #[inline] + fn deserialize>( + deserializer: D, + ) -> Result { + use serde_core::de; + + struct DateTimeVisitor; + + impl<'de> de::Visitor<'de> for DateTimeVisitor { + type Value = DateTime; + + fn expecting( + &self, + f: &mut core::fmt::Formatter, + ) -> core::fmt::Result { + f.write_str("a datetime string") + } + + #[inline] + fn visit_bytes( + self, + value: &[u8], + ) -> Result { + DEFAULT_DATETIME_PARSER + .parse_datetime(value) + .map_err(de::Error::custom) + } + + #[inline] + fn visit_str( + self, + value: &str, + ) -> Result { + self.visit_bytes(value.as_bytes()) + } + } + + deserializer.deserialize_str(DateTimeVisitor) + } +} + +#[cfg(test)] +impl quickcheck::Arbitrary for DateTime { + fn arbitrary(g: &mut quickcheck::Gen) -> DateTime { + let date = Date::arbitrary(g); + let time = Time::arbitrary(g); + DateTime::from_parts(date, time) + } + + fn shrink(&self) -> alloc::boxed::Box> { + alloc::boxed::Box::new( + (self.date(), self.time()) + .shrink() + .map(|(date, time)| DateTime::from_parts(date, time)), + ) + } +} + +/// An iterator over periodic datetimes, created by [`DateTime::series`]. +/// +/// It is exhausted when the next value would exceed the limits of a [`Span`] +/// or [`DateTime`] value. +/// +/// This iterator is created by [`DateTime::series`]. +#[derive(Clone, Debug)] +pub struct DateTimeSeries { + start: DateTime, + period: Span, + step: i64, +} + +impl Iterator for DateTimeSeries { + type Item = DateTime; + + #[inline] + fn next(&mut self) -> Option { + let span = self.period.checked_mul(self.step).ok()?; + self.step = self.step.checked_add(1)?; + let date = self.start.checked_add(span).ok()?; + Some(date) + } +} + +impl core::iter::FusedIterator for DateTimeSeries {} + +/// Options for [`DateTime::checked_add`] and [`DateTime::checked_sub`]. +/// +/// This type provides a way to ergonomically add one of a few different +/// duration types to a [`DateTime`]. +/// +/// The main way to construct values of this type is with its `From` trait +/// implementations: +/// +/// * `From for DateTimeArithmetic` adds (or subtracts) the given span to +/// the receiver datetime. +/// * `From for DateTimeArithmetic` adds (or subtracts) +/// the given signed duration to the receiver datetime. +/// * `From for DateTimeArithmetic` adds (or subtracts) +/// the given unsigned duration to the receiver datetime. +/// +/// # Example +/// +/// ``` +/// use std::time::Duration; +/// +/// use jiff::{civil::date, SignedDuration, ToSpan}; +/// +/// let dt = date(2024, 2, 29).at(0, 0, 0, 0); +/// assert_eq!( +/// dt.checked_add(1.year())?, +/// date(2025, 2, 28).at(0, 0, 0, 0), +/// ); +/// assert_eq!( +/// dt.checked_add(SignedDuration::from_hours(24))?, +/// date(2024, 3, 1).at(0, 0, 0, 0), +/// ); +/// assert_eq!( +/// dt.checked_add(Duration::from_secs(24 * 60 * 60))?, +/// date(2024, 3, 1).at(0, 0, 0, 0), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug)] +pub struct DateTimeArithmetic { + duration: Duration, +} + +impl DateTimeArithmetic { + #[inline] + fn checked_add(self, dt: DateTime) -> Result { + match self.duration.to_signed()? { + SDuration::Span(span) => dt.checked_add_span(span), + SDuration::Absolute(sdur) => dt.checked_add_duration(sdur), + } + } + + #[inline] + fn checked_neg(self) -> Result { + let duration = self.duration.checked_neg()?; + Ok(DateTimeArithmetic { duration }) + } + + #[inline] + fn is_negative(&self) -> bool { + self.duration.is_negative() + } +} + +impl From for DateTimeArithmetic { + fn from(span: Span) -> DateTimeArithmetic { + let duration = Duration::from(span); + DateTimeArithmetic { duration } + } +} + +impl From for DateTimeArithmetic { + fn from(sdur: SignedDuration) -> DateTimeArithmetic { + let duration = Duration::from(sdur); + DateTimeArithmetic { duration } + } +} + +impl From for DateTimeArithmetic { + fn from(udur: UnsignedDuration) -> DateTimeArithmetic { + let duration = Duration::from(udur); + DateTimeArithmetic { duration } + } +} + +impl<'a> From<&'a Span> for DateTimeArithmetic { + fn from(span: &'a Span) -> DateTimeArithmetic { + DateTimeArithmetic::from(*span) + } +} + +impl<'a> From<&'a SignedDuration> for DateTimeArithmetic { + fn from(sdur: &'a SignedDuration) -> DateTimeArithmetic { + DateTimeArithmetic::from(*sdur) + } +} + +impl<'a> From<&'a UnsignedDuration> for DateTimeArithmetic { + fn from(udur: &'a UnsignedDuration) -> DateTimeArithmetic { + DateTimeArithmetic::from(*udur) + } +} + +/// Options for [`DateTime::since`] and [`DateTime::until`]. +/// +/// This type provides a way to configure the calculation of +/// spans between two [`DateTime`] values. In particular, both +/// `DateTime::since` and `DateTime::until` accept anything that implements +/// `Into`. There are a few key trait implementations that +/// make this convenient: +/// +/// * `From for DateTimeDifference` will construct a configuration +/// consisting of just the datetime. So for example, `dt1.since(dt2)` returns +/// the span from `dt2` to `dt1`. +/// * `From for DateTimeDifference` will construct a configuration +/// consisting of just the datetime built from the date given at midnight on +/// that day. +/// * `From<(Unit, DateTime)>` is a convenient way to specify the largest units +/// that should be present on the span returned. By default, the largest units +/// are days. Using this trait implementation is equivalent to +/// `DateTimeDifference::new(datetime).largest(unit)`. +/// * `From<(Unit, Date)>` is like the one above, but with the time component +/// fixed to midnight. +/// +/// One can also provide a `DateTimeDifference` value directly. Doing so +/// is necessary to use the rounding features of calculating a span. For +/// example, setting the smallest unit (defaults to [`Unit::Nanosecond`]), the +/// rounding mode (defaults to [`RoundMode::Trunc`]) and the rounding increment +/// (defaults to `1`). The defaults are selected such that no rounding occurs. +/// +/// Rounding a span as part of calculating it is provided as a convenience. +/// Callers may choose to round the span as a distinct step via +/// [`Span::round`], but callers may need to provide a reference date +/// for rounding larger units. By coupling rounding with routines like +/// [`DateTime::since`], the reference date can be set automatically based on +/// the input to `DateTime::since`. +/// +/// # Example +/// +/// This example shows how to round a span between two datetimes to the nearest +/// half-hour, with ties breaking away from zero. +/// +/// ``` +/// use jiff::{civil::{DateTime, DateTimeDifference}, RoundMode, ToSpan, Unit}; +/// +/// let dt1 = "2024-03-15 08:14:00.123456789".parse::()?; +/// let dt2 = "2030-03-22 15:00".parse::()?; +/// let span = dt1.until( +/// DateTimeDifference::new(dt2) +/// .smallest(Unit::Minute) +/// .largest(Unit::Year) +/// .mode(RoundMode::HalfExpand) +/// .increment(30), +/// )?; +/// assert_eq!(span, 6.years().days(7).hours(7).fieldwise()); +/// +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug)] +pub struct DateTimeDifference { + datetime: DateTime, + round: SpanRound<'static>, +} + +impl DateTimeDifference { + /// Create a new default configuration for computing the span between the + /// given datetime and some other datetime (specified as the receiver in + /// [`DateTime::since`] or [`DateTime::until`]). + #[inline] + pub fn new(datetime: DateTime) -> DateTimeDifference { + // We use truncation rounding by default since it seems that's + // what is generally expected when computing the difference between + // datetimes. + // + // See: https://github.com/tc39/proposal-temporal/issues/1122 + let round = SpanRound::new().mode(RoundMode::Trunc); + DateTimeDifference { datetime, round } + } + + /// Set the smallest units allowed in the span returned. + /// + /// When a largest unit is not specified and the smallest unit is days + /// or greater, then the largest unit is automatically set to be equal to + /// the smallest unit. + /// + /// # Errors + /// + /// The smallest units must be no greater than the largest units. If this + /// is violated, then computing a span with this configuration will result + /// in an error. + /// + /// # Example + /// + /// This shows how to round a span between two datetimes to the nearest + /// number of weeks. + /// + /// ``` + /// use jiff::{ + /// civil::{DateTime, DateTimeDifference}, + /// RoundMode, ToSpan, Unit, + /// }; + /// + /// let dt1 = "2024-03-15 08:14".parse::()?; + /// let dt2 = "2030-11-22 08:30".parse::()?; + /// let span = dt1.until( + /// DateTimeDifference::new(dt2) + /// .smallest(Unit::Week) + /// .largest(Unit::Week) + /// .mode(RoundMode::HalfExpand), + /// )?; + /// assert_eq!(span, 349.weeks().fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn smallest(self, unit: Unit) -> DateTimeDifference { + DateTimeDifference { round: self.round.smallest(unit), ..self } + } + + /// Set the largest units allowed in the span returned. + /// + /// When a largest unit is not specified and the smallest unit is days + /// or greater, then the largest unit is automatically set to be equal to + /// the smallest unit. Otherwise, when the largest unit is not specified, + /// it is set to days. + /// + /// Once a largest unit is set, there is no way to change this rounding + /// configuration back to using the "automatic" default. Instead, callers + /// must create a new configuration. + /// + /// # Errors + /// + /// The largest units, when set, must be at least as big as the smallest + /// units (which defaults to [`Unit::Nanosecond`]). If this is violated, + /// then computing a span with this configuration will result in an error. + /// + /// # Example + /// + /// This shows how to round a span between two datetimes to units no + /// bigger than seconds. + /// + /// ``` + /// use jiff::{civil::{DateTime, DateTimeDifference}, ToSpan, Unit}; + /// + /// let dt1 = "2024-03-15 08:14".parse::()?; + /// let dt2 = "2030-11-22 08:30".parse::()?; + /// let span = dt1.until( + /// DateTimeDifference::new(dt2).largest(Unit::Second), + /// )?; + /// assert_eq!(span, 211076160.seconds().fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn largest(self, unit: Unit) -> DateTimeDifference { + DateTimeDifference { round: self.round.largest(unit), ..self } + } + + /// Set the rounding mode. + /// + /// This defaults to [`RoundMode::Trunc`] since it's plausible that + /// rounding "up" in the context of computing the span between + /// two datetimes could be surprising in a number of cases. The + /// [`RoundMode::HalfExpand`] mode corresponds to typical rounding you + /// might have learned about in school. But a variety of other rounding + /// modes exist. + /// + /// # Example + /// + /// This shows how to always round "up" towards positive infinity. + /// + /// ``` + /// use jiff::{ + /// civil::{DateTime, DateTimeDifference}, + /// RoundMode, ToSpan, Unit, + /// }; + /// + /// let dt1 = "2024-03-15 08:10".parse::()?; + /// let dt2 = "2024-03-15 08:11".parse::()?; + /// let span = dt1.until( + /// DateTimeDifference::new(dt2) + /// .smallest(Unit::Hour) + /// .mode(RoundMode::Ceil), + /// )?; + /// // Only one minute elapsed, but we asked to always round up! + /// assert_eq!(span, 1.hour().fieldwise()); + /// + /// // Since `Ceil` always rounds toward positive infinity, the behavior + /// // flips for a negative span. + /// let span = dt1.since( + /// DateTimeDifference::new(dt2) + /// .smallest(Unit::Hour) + /// .mode(RoundMode::Ceil), + /// )?; + /// assert_eq!(span, 0.hour().fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn mode(self, mode: RoundMode) -> DateTimeDifference { + DateTimeDifference { round: self.round.mode(mode), ..self } + } + + /// Set the rounding increment for the smallest unit. + /// + /// The default value is `1`. Other values permit rounding the smallest + /// unit to the nearest integer increment specified. For example, if the + /// smallest unit is set to [`Unit::Minute`], then a rounding increment of + /// `30` would result in rounding in increments of a half hour. That is, + /// the only minute value that could result would be `0` or `30`. + /// + /// # Errors + /// + /// When the smallest unit is less than days, the rounding increment must + /// divide evenly into the next highest unit after the smallest unit + /// configured (and must not be equivalent to it). For example, if the + /// smallest unit is [`Unit::Nanosecond`], then *some* of the valid values + /// for the rounding increment are `1`, `2`, `4`, `5`, `100` and `500`. + /// Namely, any integer that divides evenly into `1,000` nanoseconds since + /// there are `1,000` nanoseconds in the next highest unit (microseconds). + /// + /// In all cases, the increment must be greater than zero and less than + /// or equal to `1_000_000_000`. + /// + /// The error will occur when computing the span, and not when setting + /// the increment here. + /// + /// # Example + /// + /// This shows how to round the span between two datetimes to the nearest + /// 5 minute increment. + /// + /// ``` + /// use jiff::{ + /// civil::{DateTime, DateTimeDifference}, + /// RoundMode, ToSpan, Unit, + /// }; + /// + /// let dt1 = "2024-03-15 08:19".parse::()?; + /// let dt2 = "2024-03-15 12:52".parse::()?; + /// let span = dt1.until( + /// DateTimeDifference::new(dt2) + /// .smallest(Unit::Minute) + /// .increment(5) + /// .mode(RoundMode::HalfExpand), + /// )?; + /// assert_eq!(span, 4.hour().minutes(35).fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn increment(self, increment: i64) -> DateTimeDifference { + DateTimeDifference { round: self.round.increment(increment), ..self } + } + + /// Returns true if and only if this configuration could change the span + /// via rounding. + #[inline] + fn rounding_may_change_span(&self) -> bool { + self.round.rounding_may_change_span() + } + + /// Returns the span of time from `dt1` to the datetime in this + /// configuration. The biggest units allowed are determined by the + /// `smallest` and `largest` settings, but defaults to `Unit::Day`. + #[inline] + fn until_with_largest_unit(&self, dt1: DateTime) -> Result { + let dt2 = self.datetime; + let largest = self + .round + .get_largest() + .unwrap_or_else(|| self.round.get_smallest().max(Unit::Day)); + if largest <= Unit::Day { + let diff = dt2.to_duration() - dt1.to_duration(); + // Note that this can fail! If largest unit is nanoseconds and the + // datetimes are far enough apart, a single i64 won't be able to + // represent the time difference. + // + // This is only true for nanoseconds. A single i64 in units of + // microseconds can represent the interval between all valid + // datetimes. + return Span::from_invariant_duration(largest, diff); + } + + let (d1, mut d2) = (dt1.date(), dt2.date()); + let (t1, t2) = (dt1.time(), dt2.time()); + let sign = b::Sign::from_ordinals(d2, d1); + let mut time_diff = t1.until_nanoseconds(t2); + if b::Sign::from(time_diff) == -sign { + // These unwraps will always succeed, but the argument for why is + // subtle. The key here is that the only way, e.g., d2.tomorrow() + // can fail is when d2 is the max date. But, if d2 is the max date, + // then it's impossible for `sign < 0` since the max date is at + // least as big as every other date. And thus, d2.tomorrow() is + // never reached in cases where it would fail. + if sign.is_positive() { + d2 = d2.yesterday().unwrap(); + } else if sign.is_negative() { + d2 = d2.tomorrow().unwrap(); + } + time_diff += b::NANOS_PER_CIVIL_DAY * sign; + } + let date_span = d1.until((largest, d2))?; + // Unlike in the <=Unit::Day case, this always succeeds because + // every unit except for nanoseconds (which is not used here) can + // represent all possible spans of time between any two civil + // datetimes. + let time_span = Span::from_invariant_duration( + largest, + SignedDuration::from_nanos(time_diff), + ) + .expect("difference between time always fits in span"); + Ok(time_span + .years(date_span.get_years()) + .months(date_span.get_months()) + .weeks(date_span.get_weeks()) + .days(date_span.get_days())) + } +} + +impl From for DateTimeDifference { + #[inline] + fn from(dt: DateTime) -> DateTimeDifference { + DateTimeDifference::new(dt) + } +} + +impl From for DateTimeDifference { + #[inline] + fn from(date: Date) -> DateTimeDifference { + DateTimeDifference::from(DateTime::from(date)) + } +} + +impl From for DateTimeDifference { + #[inline] + fn from(zdt: Zoned) -> DateTimeDifference { + DateTimeDifference::from(DateTime::from(zdt)) + } +} + +impl<'a> From<&'a Zoned> for DateTimeDifference { + #[inline] + fn from(zdt: &'a Zoned) -> DateTimeDifference { + DateTimeDifference::from(zdt.datetime()) + } +} + +impl From<(Unit, DateTime)> for DateTimeDifference { + #[inline] + fn from((largest, dt): (Unit, DateTime)) -> DateTimeDifference { + DateTimeDifference::from(dt).largest(largest) + } +} + +impl From<(Unit, Date)> for DateTimeDifference { + #[inline] + fn from((largest, date): (Unit, Date)) -> DateTimeDifference { + DateTimeDifference::from(date).largest(largest) + } +} + +impl From<(Unit, Zoned)> for DateTimeDifference { + #[inline] + fn from((largest, zdt): (Unit, Zoned)) -> DateTimeDifference { + DateTimeDifference::from((largest, DateTime::from(zdt))) + } +} + +impl<'a> From<(Unit, &'a Zoned)> for DateTimeDifference { + #[inline] + fn from((largest, zdt): (Unit, &'a Zoned)) -> DateTimeDifference { + DateTimeDifference::from((largest, zdt.datetime())) + } +} + +/// Options for [`DateTime::round`]. +/// +/// This type provides a way to configure the rounding of a civil datetime. In +/// particular, `DateTime::round` accepts anything that implements the +/// `Into` trait. There are some trait implementations that +/// therefore make calling `DateTime::round` in some common cases more +/// ergonomic: +/// +/// * `From for DateTimeRound` will construct a rounding +/// configuration that rounds to the unit given. Specifically, +/// `DateTimeRound::new().smallest(unit)`. +/// * `From<(Unit, i64)> for DateTimeRound` is like the one above, but also +/// specifies the rounding increment for [`DateTimeRound::increment`]. +/// +/// Note that in the default configuration, no rounding occurs. +/// +/// # Example +/// +/// This example shows how to round a datetime to the nearest second: +/// +/// ``` +/// use jiff::{civil::{DateTime, date}, Unit}; +/// +/// let dt: DateTime = "2024-06-20 16:24:59.5".parse()?; +/// assert_eq!( +/// dt.round(Unit::Second)?, +/// // The second rounds up and causes minutes to increase. +/// date(2024, 6, 20).at(16, 25, 0, 0), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// The above makes use of the fact that `Unit` implements +/// `Into`. If you want to change the rounding mode to, say, +/// truncation, then you'll need to construct a `DateTimeRound` explicitly +/// since there are no convenience `Into` trait implementations for +/// [`RoundMode`]. +/// +/// ``` +/// use jiff::{civil::{DateTime, DateTimeRound, date}, RoundMode, Unit}; +/// +/// let dt: DateTime = "2024-06-20 16:24:59.5".parse()?; +/// assert_eq!( +/// dt.round( +/// DateTimeRound::new().smallest(Unit::Second).mode(RoundMode::Trunc), +/// )?, +/// // The second just gets truncated as if it wasn't there. +/// date(2024, 6, 20).at(16, 24, 59, 0), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug)] +pub struct DateTimeRound { + smallest: Unit, + mode: RoundMode, + increment: i64, +} + +impl DateTimeRound { + /// Create a new default configuration for rounding a [`DateTime`]. + #[inline] + pub fn new() -> DateTimeRound { + DateTimeRound { + smallest: Unit::Nanosecond, + mode: RoundMode::HalfExpand, + increment: 1, + } + } + + /// Set the smallest units allowed in the datetime returned after rounding. + /// + /// Any units below the smallest configured unit will be used, along with + /// the rounding increment and rounding mode, to determine the value of the + /// smallest unit. For example, when rounding `2024-06-20T03:25:30` to the + /// nearest minute, the `30` second unit will result in rounding the minute + /// unit of `25` up to `26` and zeroing out everything below minutes. + /// + /// This defaults to [`Unit::Nanosecond`]. + /// + /// # Errors + /// + /// The smallest units must be no greater than [`Unit::Day`]. And when the + /// smallest unit is `Unit::Day`, the rounding increment must be equal to + /// `1`. Otherwise an error will be returned from [`DateTime::round`]. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::{DateTimeRound, date}, Unit}; + /// + /// let dt = date(2024, 6, 20).at(3, 25, 30, 0); + /// assert_eq!( + /// dt.round(DateTimeRound::new().smallest(Unit::Minute))?, + /// date(2024, 6, 20).at(3, 26, 0, 0), + /// ); + /// // Or, utilize the `From for DateTimeRound` impl: + /// assert_eq!( + /// dt.round(Unit::Minute)?, + /// date(2024, 6, 20).at(3, 26, 0, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn smallest(self, unit: Unit) -> DateTimeRound { + DateTimeRound { smallest: unit, ..self } + } + + /// Set the rounding mode. + /// + /// This defaults to [`RoundMode::HalfExpand`], which rounds away from + /// zero. It matches the kind of rounding you might have been taught in + /// school. + /// + /// # Example + /// + /// This shows how to always round datetimes up towards positive infinity. + /// + /// ``` + /// use jiff::{civil::{DateTime, DateTimeRound, date}, RoundMode, Unit}; + /// + /// let dt: DateTime = "2024-06-20 03:25:01".parse()?; + /// assert_eq!( + /// dt.round( + /// DateTimeRound::new() + /// .smallest(Unit::Minute) + /// .mode(RoundMode::Ceil), + /// )?, + /// date(2024, 6, 20).at(3, 26, 0, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn mode(self, mode: RoundMode) -> DateTimeRound { + DateTimeRound { mode, ..self } + } + + /// Set the rounding increment for the smallest unit. + /// + /// The default value is `1`. Other values permit rounding the smallest + /// unit to the nearest integer increment specified. For example, if the + /// smallest unit is set to [`Unit::Minute`], then a rounding increment of + /// `30` would result in rounding in increments of a half hour. That is, + /// the only minute value that could result would be `0` or `30`. + /// + /// # Errors + /// + /// When the smallest unit is `Unit::Day`, then the rounding increment must + /// be `1` or else [`DateTime::round`] will return an error. + /// + /// For other units, the rounding increment must divide evenly into the + /// next highest unit above the smallest unit set. The rounding increment + /// must also not be equal to the next highest unit. For example, if the + /// smallest unit is [`Unit::Nanosecond`], then *some* of the valid values + /// for the rounding increment are `1`, `2`, `4`, `5`, `100` and `500`. + /// Namely, any integer that divides evenly into `1,000` nanoseconds since + /// there are `1,000` nanoseconds in the next highest unit (microseconds). + /// + /// In all cases, the increment must be greater than zero and less than or + /// equal to `1_000_000_000`. + /// + /// # Example + /// + /// This example shows how to round a datetime to the nearest 10 minute + /// increment. + /// + /// ``` + /// use jiff::{civil::{DateTime, DateTimeRound, date}, RoundMode, Unit}; + /// + /// let dt: DateTime = "2024-06-20 03:24:59".parse()?; + /// assert_eq!( + /// dt.round((Unit::Minute, 10))?, + /// date(2024, 6, 20).at(3, 20, 0, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn increment(self, increment: i64) -> DateTimeRound { + DateTimeRound { increment, ..self } + } + + /// Does the actual rounding. + /// + /// A non-public configuration here is the length of a day. For civil + /// datetimes, this should always be `NANOS_PER_CIVIL_DAY`. But this + /// rounding routine is also used for `Zoned` rounding, and in that + /// context, the length of a day can vary based on the time zone. + pub(crate) fn round(&self, dt: DateTime) -> Result { + // ref: https://tc39.es/proposal-temporal/#sec-temporal.plaindatetime.prototype.round + + // We don't do any rounding in this case and there are no possible + // error conditions under this configuration. So just bail. + if self.smallest == Unit::Nanosecond && self.increment == 1 { + return Ok(dt); + } + + let increment = + Increment::for_datetime(self.smallest, self.increment)?; + let time_nanos = dt.time().to_duration(); + let sign = b::Sign::from(dt.date().year()); + let time_rounded = increment.round(self.mode, time_nanos)?; + let (days, time_nanos) = time_rounded.as_civil_days_with_remainder(); + // OK because `abs(days)` here can never be greater than 1. Namely, + // rounding time increments are limited to values that divide evenly + // into the corresponding maximal value. And a `day` increment is + // limited to `1`. So even starting with the maximal `dt.time()` value + // (the last nanosecond in a civil day), we can never round past 1 day. + let days = sign * days; + let time = Time::from_duration_unchecked(time_nanos); + + // OK because `abs(days) <= 1` (see above comment) and + // `dt.date().day()` can never exceed `31`. So the result always fits + // into an `i64`. + let days_len = (i64::from(dt.date().day()) - 1) + days; + let start = dt.date().first_of_month(); + // `abs(days)` is always <= 1, and so `days_len` should + // always be at most 1 greater (or less) than where we started. If we + // started at, e.g., `DateTime::MAX`, then this could overflow. + let date = start + .checked_add(Span::new().days(days_len)) + .context(E::FailedAddDays)?; + Ok(DateTime::from_parts(date, time)) + } + + pub(crate) fn get_smallest(&self) -> Unit { + self.smallest + } + + pub(crate) fn get_mode(&self) -> RoundMode { + self.mode + } + + pub(crate) fn get_increment(&self) -> i64 { + self.increment + } +} + +impl Default for DateTimeRound { + #[inline] + fn default() -> DateTimeRound { + DateTimeRound::new() + } +} + +impl From for DateTimeRound { + #[inline] + fn from(unit: Unit) -> DateTimeRound { + DateTimeRound::default().smallest(unit) + } +} + +impl From<(Unit, i64)> for DateTimeRound { + #[inline] + fn from((unit, increment): (Unit, i64)) -> DateTimeRound { + DateTimeRound::from(unit).increment(increment) + } +} + +/// A builder for setting the fields on a [`DateTime`]. +/// +/// This builder is constructed via [`DateTime::with`]. +/// +/// # Example +/// +/// The builder ensures one can chain together the individual components of a +/// datetime without it failing at an intermediate step. For example, if you +/// had a date of `2024-10-31T00:00:00` and wanted to change both the day and +/// the month, and each setting was validated independent of the other, you +/// would need to be careful to set the day first and then the month. In some +/// cases, you would need to set the month first and then the day! +/// +/// But with the builder, you can set values in any order: +/// +/// ``` +/// use jiff::civil::date; +/// +/// let dt1 = date(2024, 10, 31).at(0, 0, 0, 0); +/// let dt2 = dt1.with().month(11).day(30).build()?; +/// assert_eq!(dt2, date(2024, 11, 30).at(0, 0, 0, 0)); +/// +/// let dt1 = date(2024, 4, 30).at(0, 0, 0, 0); +/// let dt2 = dt1.with().day(31).month(7).build()?; +/// assert_eq!(dt2, date(2024, 7, 31).at(0, 0, 0, 0)); +/// +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug)] +pub struct DateTimeWith { + date_with: DateWith, + time_with: TimeWith, +} + +impl DateTimeWith { + #[inline] + fn new(original: DateTime) -> DateTimeWith { + DateTimeWith { + date_with: original.date().with(), + time_with: original.time().with(), + } + } + + /// Create a new `DateTime` from the fields set on this configuration. + /// + /// An error occurs when the fields combine to an invalid datetime. + /// + /// For any fields not set on this configuration, the values are taken from + /// the [`DateTime`] that originally created this configuration. When no + /// values are set, this routine is guaranteed to succeed and will always + /// return the original datetime without modification. + /// + /// # Example + /// + /// This creates a datetime corresponding to the last day in the year at + /// noon: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2023, 1, 1).at(12, 0, 0, 0); + /// assert_eq!( + /// dt.with().day_of_year_no_leap(365).build()?, + /// date(2023, 12, 31).at(12, 0, 0, 0), + /// ); + /// + /// // It also works with leap years for the same input: + /// let dt = date(2024, 1, 1).at(12, 0, 0, 0); + /// assert_eq!( + /// dt.with().day_of_year_no_leap(365).build()?, + /// date(2024, 12, 31).at(12, 0, 0, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: error for invalid datetime + /// + /// If the fields combine to form an invalid date, then an error is + /// returned: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 11, 30).at(15, 30, 0, 0); + /// assert!(dt.with().day(31).build().is_err()); + /// + /// let dt = date(2024, 2, 29).at(15, 30, 0, 0); + /// assert!(dt.with().year(2023).build().is_err()); + /// ``` + #[inline] + pub fn build(self) -> Result { + let date = self.date_with.build()?; + let time = self.time_with.build()?; + Ok(DateTime::from_parts(date, time)) + } + + /// Set the year, month and day fields via the `Date` given. + /// + /// This overrides any previous year, month or day settings. + /// + /// # Example + /// + /// This shows how to create a new datetime with a different date: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2005, 11, 5).at(15, 30, 0, 0); + /// let dt2 = dt1.with().date(date(2017, 10, 31)).build()?; + /// // The date changes but the time remains the same. + /// assert_eq!(dt2, date(2017, 10, 31).at(15, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn date(self, date: Date) -> DateTimeWith { + DateTimeWith { date_with: date.with(), ..self } + } + + /// Set the hour, minute, second, millisecond, microsecond and nanosecond + /// fields via the `Time` given. + /// + /// This overrides any previous hour, minute, second, millisecond, + /// microsecond, nanosecond or subsecond nanosecond settings. + /// + /// # Example + /// + /// This shows how to create a new datetime with a different time: + /// + /// ``` + /// use jiff::civil::{date, time}; + /// + /// let dt1 = date(2005, 11, 5).at(15, 30, 0, 0); + /// let dt2 = dt1.with().time(time(23, 59, 59, 123_456_789)).build()?; + /// // The time changes but the date remains the same. + /// assert_eq!(dt2, date(2005, 11, 5).at(23, 59, 59, 123_456_789)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn time(self, time: Time) -> DateTimeWith { + DateTimeWith { time_with: time.with(), ..self } + } + + /// Set the year field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::year`]. + /// + /// This overrides any previous year settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given year is outside the range `-9999..=9999`. This can also return an + /// error if the resulting date is otherwise invalid. + /// + /// # Example + /// + /// This shows how to create a new datetime with a different year: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2005, 11, 5).at(15, 30, 0, 0); + /// assert_eq!(dt1.year(), 2005); + /// let dt2 = dt1.with().year(2007).build()?; + /// assert_eq!(dt2.year(), 2007); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: only changing the year can fail + /// + /// For example, while `2024-02-29T01:30:00` is valid, + /// `2023-02-29T01:30:00` is not: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 2, 29).at(1, 30, 0, 0); + /// assert!(dt.with().year(2023).build().is_err()); + /// ``` + #[inline] + pub fn year(self, year: i16) -> DateTimeWith { + DateTimeWith { date_with: self.date_with.year(year), ..self } + } + + /// Set year of a datetime via its era and its non-negative numeric + /// component. + /// + /// One can access this value via [`DateTime::era_year`]. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// year is outside the range for the era specified. For [`Era::BCE`], the + /// range is `1..=10000`. For [`Era::CE`], the range is `1..=9999`. + /// + /// # Example + /// + /// This shows that `CE` years are equivalent to the years used by this + /// crate: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let dt1 = date(2005, 11, 5).at(8, 0, 0, 0); + /// assert_eq!(dt1.year(), 2005); + /// let dt2 = dt1.with().era_year(2007, Era::CE).build()?; + /// assert_eq!(dt2.year(), 2007); + /// + /// // CE years are always positive and can be at most 9999: + /// assert!(dt1.with().era_year(-5, Era::CE).build().is_err()); + /// assert!(dt1.with().era_year(10_000, Era::CE).build().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// But `BCE` years always correspond to years less than or equal to `0` + /// in this crate: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let dt1 = date(-27, 7, 1).at(8, 22, 30, 0); + /// assert_eq!(dt1.year(), -27); + /// assert_eq!(dt1.era_year(), (28, Era::BCE)); + /// + /// let dt2 = dt1.with().era_year(509, Era::BCE).build()?; + /// assert_eq!(dt2.year(), -508); + /// assert_eq!(dt2.era_year(), (509, Era::BCE)); + /// + /// let dt2 = dt1.with().era_year(10_000, Era::BCE).build()?; + /// assert_eq!(dt2.year(), -9_999); + /// assert_eq!(dt2.era_year(), (10_000, Era::BCE)); + /// + /// // BCE years are always positive and can be at most 10000: + /// assert!(dt1.with().era_year(-5, Era::BCE).build().is_err()); + /// assert!(dt1.with().era_year(10_001, Era::BCE).build().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: overrides `DateTimeWith::year` + /// + /// Setting this option will override any previous `DateTimeWith::year` + /// option: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let dt1 = date(2024, 7, 2).at(10, 27, 10, 123); + /// let dt2 = dt1.with().year(2000).era_year(1900, Era::CE).build()?; + /// assert_eq!(dt2, date(1900, 7, 2).at(10, 27, 10, 123)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// Similarly, `DateTimeWith::year` will override any previous call to + /// `DateTimeWith::era_year`: + /// + /// ``` + /// use jiff::civil::{Era, date}; + /// + /// let dt1 = date(2024, 7, 2).at(19, 0, 1, 1); + /// let dt2 = dt1.with().era_year(1900, Era::CE).year(2000).build()?; + /// assert_eq!(dt2, date(2000, 7, 2).at(19, 0, 1, 1)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn era_year(self, year: i16, era: Era) -> DateTimeWith { + DateTimeWith { date_with: self.date_with.era_year(year, era), ..self } + } + + /// Set the month field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::month`]. + /// + /// This overrides any previous month settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given month is outside the range `1..=12`. This can also return an + /// error if the resulting date is otherwise invalid. + /// + /// # Example + /// + /// This shows how to create a new datetime with a different month: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2005, 11, 5).at(18, 3, 59, 123_456_789); + /// assert_eq!(dt1.month(), 11); + /// let dt2 = dt1.with().month(6).build()?; + /// assert_eq!(dt2.month(), 6); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: only changing the month can fail + /// + /// For example, while `2024-10-31T00:00:00` is valid, + /// `2024-11-31T00:00:00` is not: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 10, 31).at(0, 0, 0, 0); + /// assert!(dt.with().month(11).build().is_err()); + /// ``` + #[inline] + pub fn month(self, month: i8) -> DateTimeWith { + DateTimeWith { date_with: self.date_with.month(month), ..self } + } + + /// Set the day field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::day`]. + /// + /// This overrides any previous day settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given given day is outside of allowable days for the corresponding year + /// and month fields. + /// + /// # Example + /// + /// This shows some examples of setting the day, including a leap day: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2024, 2, 5).at(21, 59, 1, 999); + /// assert_eq!(dt1.day(), 5); + /// let dt2 = dt1.with().day(10).build()?; + /// assert_eq!(dt2.day(), 10); + /// let dt3 = dt1.with().day(29).build()?; + /// assert_eq!(dt3.day(), 29); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: changing only the day can fail + /// + /// This shows some examples that will fail: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt1 = date(2023, 2, 5).at(22, 58, 58, 9_999); + /// // 2023 is not a leap year + /// assert!(dt1.with().day(29).build().is_err()); + /// + /// // September has 30 days, not 31. + /// let dt1 = date(2023, 9, 5).at(22, 58, 58, 9_999); + /// assert!(dt1.with().day(31).build().is_err()); + /// ``` + #[inline] + pub fn day(self, day: i8) -> DateTimeWith { + DateTimeWith { date_with: self.date_with.day(day), ..self } + } + + /// Set the day field on a [`DateTime`] via the ordinal number of a day + /// within a year. + /// + /// When used, any settings for month are ignored since the month is + /// determined by the day of the year. + /// + /// The valid values for `day` are `1..=366`. Note though that `366` is + /// only valid for leap years. + /// + /// This overrides any previous day settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given day is outside the allowed range of `1..=366`, or when a value of + /// `366` is given for a non-leap year. + /// + /// # Example + /// + /// This demonstrates that if a year is a leap year, then `60` corresponds + /// to February 29: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 1, 1).at(23, 59, 59, 999_999_999); + /// assert_eq!( + /// dt.with().day_of_year(60).build()?, + /// date(2024, 2, 29).at(23, 59, 59, 999_999_999), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// But for non-leap years, day 60 is March 1: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2023, 1, 1).at(23, 59, 59, 999_999_999); + /// assert_eq!( + /// dt.with().day_of_year(60).build()?, + /// date(2023, 3, 1).at(23, 59, 59, 999_999_999), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// And using `366` for a non-leap year will result in an error, since + /// non-leap years only have 365 days: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2023, 1, 1).at(0, 0, 0, 0); + /// assert!(dt.with().day_of_year(366).build().is_err()); + /// // The maximal year is not a leap year, so it returns an error too. + /// let dt = date(9999, 1, 1).at(0, 0, 0, 0); + /// assert!(dt.with().day_of_year(366).build().is_err()); + /// ``` + #[inline] + pub fn day_of_year(self, day: i16) -> DateTimeWith { + DateTimeWith { date_with: self.date_with.day_of_year(day), ..self } + } + + /// Set the day field on a [`DateTime`] via the ordinal number of a day + /// within a year, but ignoring leap years. + /// + /// When used, any settings for month are ignored since the month is + /// determined by the day of the year. + /// + /// The valid values for `day` are `1..=365`. The value `365` always + /// corresponds to the last day of the year, even for leap years. It is + /// impossible for this routine to return a datetime corresponding to + /// February 29. + /// + /// This overrides any previous day settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given day is outside the allowed range of `1..=365`. + /// + /// # Example + /// + /// This demonstrates that `60` corresponds to March 1, regardless of + /// whether the year is a leap year or not: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2023, 1, 1).at(23, 59, 59, 999_999_999); + /// assert_eq!( + /// dt.with().day_of_year_no_leap(60).build()?, + /// date(2023, 3, 1).at(23, 59, 59, 999_999_999), + /// ); + /// + /// let dt = date(2024, 1, 1).at(23, 59, 59, 999_999_999); + /// assert_eq!( + /// dt.with().day_of_year_no_leap(60).build()?, + /// date(2024, 3, 1).at(23, 59, 59, 999_999_999), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// And using `365` for any year will always yield the last day of the + /// year: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2023, 1, 1).at(23, 59, 59, 999_999_999); + /// assert_eq!( + /// dt.with().day_of_year_no_leap(365).build()?, + /// dt.last_of_year(), + /// ); + /// + /// let dt = date(2024, 1, 1).at(23, 59, 59, 999_999_999); + /// assert_eq!( + /// dt.with().day_of_year_no_leap(365).build()?, + /// dt.last_of_year(), + /// ); + /// + /// let dt = date(9999, 1, 1).at(23, 59, 59, 999_999_999); + /// assert_eq!( + /// dt.with().day_of_year_no_leap(365).build()?, + /// dt.last_of_year(), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// A value of `366` is out of bounds, even for leap years: + /// + /// ``` + /// use jiff::civil::date; + /// + /// let dt = date(2024, 1, 1).at(5, 30, 0, 0); + /// assert!(dt.with().day_of_year_no_leap(366).build().is_err()); + /// ``` + #[inline] + pub fn day_of_year_no_leap(self, day: i16) -> DateTimeWith { + DateTimeWith { + date_with: self.date_with.day_of_year_no_leap(day), + ..self + } + } + + /// Set the hour field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::hour`]. + /// + /// This overrides any previous hour settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given hour is outside the range `0..=23`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let dt1 = time(15, 21, 59, 0).on(2010, 6, 1); + /// assert_eq!(dt1.hour(), 15); + /// let dt2 = dt1.with().hour(3).build()?; + /// assert_eq!(dt2.hour(), 3); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn hour(self, hour: i8) -> DateTimeWith { + DateTimeWith { time_with: self.time_with.hour(hour), ..self } + } + + /// Set the minute field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::minute`]. + /// + /// This overrides any previous minute settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given minute is outside the range `0..=59`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let dt1 = time(15, 21, 59, 0).on(2010, 6, 1); + /// assert_eq!(dt1.minute(), 21); + /// let dt2 = dt1.with().minute(3).build()?; + /// assert_eq!(dt2.minute(), 3); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn minute(self, minute: i8) -> DateTimeWith { + DateTimeWith { time_with: self.time_with.minute(minute), ..self } + } + + /// Set the second field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::second`]. + /// + /// This overrides any previous second settings. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given second is outside the range `0..=59`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let dt1 = time(15, 21, 59, 0).on(2010, 6, 1); + /// assert_eq!(dt1.second(), 59); + /// let dt2 = dt1.with().second(3).build()?; + /// assert_eq!(dt2.second(), 3); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn second(self, second: i8) -> DateTimeWith { + DateTimeWith { time_with: self.time_with.second(second), ..self } + } + + /// Set the millisecond field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::millisecond`]. + /// + /// This overrides any previous millisecond settings. + /// + /// Note that this only sets the millisecond component. It does + /// not change the microsecond or nanosecond components. To set + /// the fractional second component to nanosecond precision, use + /// [`DateTimeWith::subsec_nanosecond`]. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given millisecond is outside the range `0..=999`, or if both this and + /// [`DateTimeWith::subsec_nanosecond`] are set. + /// + /// # Example + /// + /// This shows the relationship between [`DateTime::millisecond`] and + /// [`DateTime::subsec_nanosecond`]: + /// + /// ``` + /// use jiff::civil::time; + /// + /// let dt1 = time(15, 21, 35, 0).on(2010, 6, 1); + /// let dt2 = dt1.with().millisecond(123).build()?; + /// assert_eq!(dt2.subsec_nanosecond(), 123_000_000); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn millisecond(self, millisecond: i16) -> DateTimeWith { + DateTimeWith { + time_with: self.time_with.millisecond(millisecond), + ..self + } + } + + /// Set the microsecond field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::microsecond`]. + /// + /// This overrides any previous microsecond settings. + /// + /// Note that this only sets the microsecond component. It does + /// not change the millisecond or nanosecond components. To set + /// the fractional second component to nanosecond precision, use + /// [`DateTimeWith::subsec_nanosecond`]. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given microsecond is outside the range `0..=999`, or if both this and + /// [`DateTimeWith::subsec_nanosecond`] are set. + /// + /// # Example + /// + /// This shows the relationship between [`DateTime::microsecond`] and + /// [`DateTime::subsec_nanosecond`]: + /// + /// ``` + /// use jiff::civil::time; + /// + /// let dt1 = time(15, 21, 35, 0).on(2010, 6, 1); + /// let dt2 = dt1.with().microsecond(123).build()?; + /// assert_eq!(dt2.subsec_nanosecond(), 123_000); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn microsecond(self, microsecond: i16) -> DateTimeWith { + DateTimeWith { + time_with: self.time_with.microsecond(microsecond), + ..self + } + } + + /// Set the nanosecond field on a [`DateTime`]. + /// + /// One can access this value via [`DateTime::nanosecond`]. + /// + /// This overrides any previous nanosecond settings. + /// + /// Note that this only sets the nanosecond component. It does + /// not change the millisecond or microsecond components. To set + /// the fractional second component to nanosecond precision, use + /// [`DateTimeWith::subsec_nanosecond`]. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given nanosecond is outside the range `0..=999`, or if both this and + /// [`DateTimeWith::subsec_nanosecond`] are set. + /// + /// # Example + /// + /// This shows the relationship between [`DateTime::nanosecond`] and + /// [`DateTime::subsec_nanosecond`]: + /// + /// ``` + /// use jiff::civil::time; + /// + /// let dt1 = time(15, 21, 35, 0).on(2010, 6, 1); + /// let dt2 = dt1.with().nanosecond(123).build()?; + /// assert_eq!(dt2.subsec_nanosecond(), 123); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn nanosecond(self, nanosecond: i16) -> DateTimeWith { + DateTimeWith { + time_with: self.time_with.nanosecond(nanosecond), + ..self + } + } + + /// Set the subsecond nanosecond field on a [`DateTime`]. + /// + /// If you want to access this value on `DateTime`, then use + /// [`DateTime::subsec_nanosecond`]. + /// + /// This overrides any previous subsecond nanosecond settings. + /// + /// Note that this sets the entire fractional second component to + /// nanosecond precision, and overrides any individual millisecond, + /// microsecond or nanosecond settings. To set individual components, + /// use [`DateTimeWith::millisecond`], [`DateTimeWith::microsecond`] or + /// [`DateTimeWith::nanosecond`]. + /// + /// # Errors + /// + /// This returns an error when [`DateTimeWith::build`] is called if the + /// given subsecond nanosecond is outside the range `0..=999,999,999`, + /// or if both this and one of [`DateTimeWith::millisecond`], + /// [`DateTimeWith::microsecond`] or [`DateTimeWith::nanosecond`] are set. + /// + /// # Example + /// + /// This shows the relationship between constructing a `DateTime` value + /// with subsecond nanoseconds and its individual subsecond fields: + /// + /// ``` + /// use jiff::civil::time; + /// + /// let dt1 = time(15, 21, 35, 0).on(2010, 6, 1); + /// let dt2 = dt1.with().subsec_nanosecond(123_456_789).build()?; + /// assert_eq!(dt2.millisecond(), 123); + /// assert_eq!(dt2.microsecond(), 456); + /// assert_eq!(dt2.nanosecond(), 789); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn subsec_nanosecond(self, subsec_nanosecond: i32) -> DateTimeWith { + DateTimeWith { + time_with: self.time_with.subsec_nanosecond(subsec_nanosecond), + ..self + } + } +} + +#[cfg(test)] +mod tests { + use std::io::Cursor; + + use crate::{ + civil::{date, time}, + span::span_eq, + RoundMode, ToSpan, Unit, + }; + + use super::*; + + #[test] + fn from_temporal_docs() { + let dt = DateTime::from_parts( + date(1995, 12, 7), + time(3, 24, 30, 000_003_500), + ); + + let got = dt.round(Unit::Hour).unwrap(); + let expected = + DateTime::from_parts(date(1995, 12, 7), time(3, 0, 0, 0)); + assert_eq!(got, expected); + + let got = dt.round((Unit::Minute, 30)).unwrap(); + let expected = + DateTime::from_parts(date(1995, 12, 7), time(3, 30, 0, 0)); + assert_eq!(got, expected); + + let got = dt + .round( + DateTimeRound::new() + .smallest(Unit::Minute) + .increment(30) + .mode(RoundMode::Floor), + ) + .unwrap(); + let expected = + DateTime::from_parts(date(1995, 12, 7), time(3, 0, 0, 0)); + assert_eq!(got, expected); + } + + #[test] + fn since() { + let later = date(2024, 5, 9).at(2, 0, 0, 0); + let earlier = date(2024, 5, 8).at(3, 0, 0, 0); + span_eq!(later.since(earlier).unwrap(), 23.hours()); + + let later = date(2024, 5, 9).at(3, 0, 0, 0); + let earlier = date(2024, 5, 8).at(2, 0, 0, 0); + span_eq!(later.since(earlier).unwrap(), 1.days().hours(1)); + + let later = date(2024, 5, 9).at(2, 0, 0, 0); + let earlier = date(2024, 5, 10).at(3, 0, 0, 0); + span_eq!(later.since(earlier).unwrap(), -1.days().hours(1)); + + let later = date(2024, 5, 9).at(3, 0, 0, 0); + let earlier = date(2024, 5, 10).at(2, 0, 0, 0); + span_eq!(later.since(earlier).unwrap(), -23.hours()); + } + + #[test] + fn until() { + let a = date(9999, 12, 30).at(3, 0, 0, 0); + let b = date(9999, 12, 31).at(2, 0, 0, 0); + span_eq!(a.until(b).unwrap(), 23.hours()); + + let a = date(-9999, 1, 2).at(2, 0, 0, 0); + let b = date(-9999, 1, 1).at(3, 0, 0, 0); + span_eq!(a.until(b).unwrap(), -23.hours()); + + let a = date(1995, 12, 7).at(3, 24, 30, 3500); + let b = date(2019, 1, 31).at(15, 30, 0, 0); + span_eq!( + a.until(b).unwrap(), + 8456.days() + .hours(12) + .minutes(5) + .seconds(29) + .milliseconds(999) + .microseconds(996) + .nanoseconds(500) + ); + span_eq!( + a.until((Unit::Year, b)).unwrap(), + 23.years() + .months(1) + .days(24) + .hours(12) + .minutes(5) + .seconds(29) + .milliseconds(999) + .microseconds(996) + .nanoseconds(500) + ); + span_eq!( + b.until((Unit::Year, a)).unwrap(), + -23.years() + .months(1) + .days(24) + .hours(12) + .minutes(5) + .seconds(29) + .milliseconds(999) + .microseconds(996) + .nanoseconds(500) + ); + span_eq!( + a.until((Unit::Nanosecond, b)).unwrap(), + 730641929999996500i64.nanoseconds(), + ); + + let a = date(-9999, 1, 1).at(0, 0, 0, 0); + let b = date(9999, 12, 31).at(23, 59, 59, 999_999_999); + assert!(a.until((Unit::Nanosecond, b)).is_err()); + span_eq!( + a.until((Unit::Microsecond, b)).unwrap(), + Span::new() + .microseconds(631_107_417_600_000_000i64 - 1) + .nanoseconds(999), + ); + } + + #[test] + fn until_month_lengths() { + let jan1 = date(2020, 1, 1).at(0, 0, 0, 0); + let feb1 = date(2020, 2, 1).at(0, 0, 0, 0); + let mar1 = date(2020, 3, 1).at(0, 0, 0, 0); + + span_eq!(jan1.until(feb1).unwrap(), 31.days()); + span_eq!(jan1.until((Unit::Month, feb1)).unwrap(), 1.month()); + span_eq!(feb1.until(mar1).unwrap(), 29.days()); + span_eq!(feb1.until((Unit::Month, mar1)).unwrap(), 1.month()); + span_eq!(jan1.until(mar1).unwrap(), 60.days()); + span_eq!(jan1.until((Unit::Month, mar1)).unwrap(), 2.months()); + } + + #[test] + fn datetime_size() { + #[cfg(debug_assertions)] + { + assert_eq!(12, core::mem::size_of::()); + } + #[cfg(not(debug_assertions))] + { + assert_eq!(12, core::mem::size_of::()); + } + } + + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, + /// as deserializing from bytes is not supported by the deserializer. + /// + /// - + /// - + #[test] + fn civil_datetime_deserialize_yaml() { + let expected = datetime(2024, 10, 31, 16, 33, 53, 123456789); + + let deserialized: DateTime = + serde_yaml::from_str("2024-10-31 16:33:53.123456789").unwrap(); + + assert_eq!(deserialized, expected); + + let deserialized: DateTime = + serde_yaml::from_slice("2024-10-31 16:33:53.123456789".as_bytes()) + .unwrap(); + + assert_eq!(deserialized, expected); + + let cursor = Cursor::new(b"2024-10-31 16:33:53.123456789"); + let deserialized: DateTime = serde_yaml::from_reader(cursor).unwrap(); + + assert_eq!(deserialized, expected); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/iso_week_date.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/iso_week_date.rs new file mode 100644 index 0000000000000000000000000000000000000000..7dd669fa4180a862a9755228ef250abba0647ea1 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/iso_week_date.rs @@ -0,0 +1,919 @@ +use crate::{ + civil::{Date, DateTime, Weekday}, + error::Error, + fmt::temporal::{DEFAULT_DATETIME_PARSER, DEFAULT_DATETIME_PRINTER}, + util::b, + Zoned, +}; + +/// A type representing an [ISO 8601 week date]. +/// +/// The ISO 8601 week date scheme devises a calendar where days are identified +/// by their year, week number and weekday. All years have either precisely +/// 52 or 53 weeks. +/// +/// The first week of an ISO 8601 year corresponds to the week containing the +/// first Thursday of the year. For this reason, an ISO 8601 week year can be +/// mismatched with the day's corresponding Gregorian year. For example, the +/// ISO 8601 week date for `1995-01-01` is `1994-W52-7` (with `7` corresponding +/// to Sunday). +/// +/// ISO 8601 also considers Monday to be the start of the week, and uses +/// a 1-based numbering system. That is, Monday corresponds to `1` while +/// Sunday corresponds to `7` and is the last day of the week. Weekdays are +/// encapsulated by the [`Weekday`] type, which provides routines for easily +/// converting between different schemes (such as weeks where Sunday is the +/// beginning). +/// +/// [ISO 8601 week date]: https://en.wikipedia.org/wiki/ISO_week_date +/// +/// # Use case +/// +/// Some domains use this method of timekeeping. Otherwise, unless you +/// specifically want a week oriented calendar, it's likely that you'll never +/// need to care about this type. +/// +/// # Parsing and printing +/// +/// The `ISOWeekDate` type provides convenient trait implementations of +/// [`std::str::FromStr`] and [`std::fmt::Display`]. These use the format +/// specified by ISO 8601 for week dates: +/// +/// ``` +/// use jiff::civil::ISOWeekDate; +/// +/// let week_date: ISOWeekDate = "2024-W24-7".parse()?; +/// assert_eq!(week_date.to_string(), "2024-W24-7"); +/// assert_eq!(week_date.date().to_string(), "2024-06-16"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// ISO 8601 allows the `-` separator to be absent: +/// +/// ``` +/// use jiff::civil::ISOWeekDate; +/// +/// let week_date: ISOWeekDate = "2024W241".parse()?; +/// assert_eq!(week_date.to_string(), "2024-W24-1"); +/// assert_eq!(week_date.date().to_string(), "2024-06-10"); +/// +/// // But you cannot mix and match. Either `-` separates +/// // both the year and week, or neither. +/// assert!("2024W24-1".parse::().is_err()); +/// assert!("2024-W241".parse::().is_err()); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// And the `W` may also be lowercase: +/// +/// ``` +/// use jiff::civil::ISOWeekDate; +/// +/// let week_date: ISOWeekDate = "2024-w24-2".parse()?; +/// assert_eq!(week_date.to_string(), "2024-W24-2"); +/// assert_eq!(week_date.date().to_string(), "2024-06-11"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// # Default value +/// +/// For convenience, this type implements the `Default` trait. Its default +/// value is the first day of the zeroth year. i.e., `0000-W1-1`. +/// +/// # Example: sample dates +/// +/// This example shows a couple ISO 8601 week dates and their corresponding +/// Gregorian equivalents: +/// +/// ``` +/// use jiff::civil::{ISOWeekDate, Weekday, date}; +/// +/// let d = date(2019, 12, 30); +/// let weekdate = ISOWeekDate::new(2020, 1, Weekday::Monday).unwrap(); +/// assert_eq!(d.iso_week_date(), weekdate); +/// +/// let d = date(2024, 3, 9); +/// let weekdate = ISOWeekDate::new(2024, 10, Weekday::Saturday).unwrap(); +/// assert_eq!(d.iso_week_date(), weekdate); +/// ``` +/// +/// # Example: overlapping leap and long years +/// +/// A "long" ISO 8601 week year is a year with 53 weeks. That is, it is a year +/// that includes a leap week. This example shows all years in the 20th +/// century that are both Gregorian leap years and long years. +/// +/// ``` +/// use jiff::civil::date; +/// +/// let mut overlapping = vec![]; +/// for year in 1900..=1999 { +/// let date = date(year, 1, 1); +/// if date.in_leap_year() && date.iso_week_date().in_long_year() { +/// overlapping.push(year); +/// } +/// } +/// assert_eq!(overlapping, vec![ +/// 1904, 1908, 1920, 1932, 1936, 1948, 1960, 1964, 1976, 1988, 1992, +/// ]); +/// ``` +/// +/// # Example: printing all weeks in a year +/// +/// The ISO 8601 week calendar can be useful when you want to categorize +/// things into buckets of weeks where all weeks are exactly 7 days, _and_ +/// you don't care as much about the precise Gregorian year. Here's an example +/// that prints all of the ISO 8601 weeks in one ISO 8601 week year: +/// +/// ``` +/// use jiff::{civil::{ISOWeekDate, Weekday}, ToSpan}; +/// +/// let target_year = 2024; +/// let iso_week_date = ISOWeekDate::new(target_year, 1, Weekday::Monday)?; +/// // Create a series of dates via the Gregorian calendar. But since a +/// // Gregorian week and an ISO 8601 week calendar week are both 7 days, +/// // this works fine. +/// let weeks = iso_week_date +/// .date() +/// .series(1.week()) +/// .map(|d| d.iso_week_date()) +/// .take_while(|wd| wd.year() == target_year); +/// for start_of_week in weeks { +/// let end_of_week = start_of_week.last_of_week()?; +/// println!( +/// "ISO week {}: {} - {}", +/// start_of_week.week(), +/// start_of_week.date(), +/// end_of_week.date() +/// ); +/// } +/// # Ok::<(), Box>(()) +/// ``` +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] +pub struct ISOWeekDate { + year: i16, + week: i8, + weekday: Weekday, +} + +impl ISOWeekDate { + /// The maximum representable ISO week date. + /// + /// The maximum corresponds to the ISO week date of the maximum [`Date`] + /// value. That is, `-9999-01-01`. + pub const MIN: ISOWeekDate = ISOWeekDate { + year: b::ISOYear::MIN, + week: b::ISOWeek::MIN, + weekday: Weekday::Monday, + }; + + /// The minimum representable ISO week date. + /// + /// The minimum corresponds to the ISO week date of the minimum [`Date`] + /// value. That is, `9999-12-31`. + pub const MAX: ISOWeekDate = ISOWeekDate { + year: b::ISOYear::MAX, + // Technical max is 52, but 9999 is not a leap year. + week: 52, + weekday: Weekday::Friday, + }; + + /// The first day of the zeroth year. + /// + /// This is guaranteed to be equivalent to `ISOWeekDate::default()`. Note + /// that this is not equivalent to `Date::default()`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, date}; + /// + /// assert_eq!(ISOWeekDate::ZERO, ISOWeekDate::default()); + /// // The first day of the 0th year in the ISO week calendar is actually + /// // the third day of the 0th year in the proleptic Gregorian calendar! + /// assert_eq!(ISOWeekDate::default().date(), date(0, 1, 3)); + /// ``` + pub const ZERO: ISOWeekDate = + ISOWeekDate { year: 0, week: 1, weekday: Weekday::Monday }; + + /// Create a new ISO week date from it constituent parts. + /// + /// If the given values are out of range (based on what is representable + /// as a [`Date`]), then this returns an error. This will also return an + /// error if a leap week is given (week number `53`) for a year that does + /// not contain a leap week. + /// + /// # Example + /// + /// This example shows some the boundary conditions involving minimum + /// and maximum dates: + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday, date}; + /// + /// // The year 1949 does not contain a leap week. + /// assert!(ISOWeekDate::new(1949, 53, Weekday::Monday).is_err()); + /// + /// // Examples of dates at or exceeding the maximum. + /// let max = ISOWeekDate::new(9999, 52, Weekday::Friday).unwrap(); + /// assert_eq!(max, ISOWeekDate::MAX); + /// assert_eq!(max.date(), date(9999, 12, 31)); + /// assert!(ISOWeekDate::new(9999, 52, Weekday::Saturday).is_err()); + /// assert!(ISOWeekDate::new(9999, 53, Weekday::Monday).is_err()); + /// + /// // Examples of dates at or exceeding the minimum. + /// let min = ISOWeekDate::new(-9999, 1, Weekday::Monday).unwrap(); + /// assert_eq!(min, ISOWeekDate::MIN); + /// assert_eq!(min.date(), date(-9999, 1, 1)); + /// assert!(ISOWeekDate::new(-10000, 52, Weekday::Sunday).is_err()); + /// ``` + #[inline] + pub fn new( + year: i16, + week: i8, + weekday: Weekday, + ) -> Result { + let year = b::ISOYear::check(year)?; + let week = b::ISOWeek::check(week)?; + + // All combinations of years, weeks and weekdays allowed by our + // range types are valid ISO week dates with one exception: a week + // number of 53 is only valid for "long" years. Or years with an ISO + // leap week. It turns out this only happens when the last day of the + // year is a Thursday. + // + // Note that if the ranges in this crate are changed, this could be + // a little trickier if the range of ISOYear is different from Year. + debug_assert_eq!(b::Year::MIN, b::ISOYear::MIN); + debug_assert_eq!(b::Year::MAX, b::ISOYear::MAX); + if week == 53 && !is_long_year(year) { + return Err(b::ISOWeek::error().into()); + } + // And also, the maximum Date constrains what we can utter with + // ISOWeekDate so that we can preserve infallible conversions between + // them. So since 9999-12-31 maps to 9999 W52 Friday, it follows that + // Saturday and Sunday are not allowed when the year is at the maximum + // value. So reject them. + // + // We don't need to worry about the minimum because the minimum date + // (-9999-01-01) corresponds also to the minimum possible combination + // of an ISO week date's fields: -9999 W01 Monday. Nice. + if year == b::ISOYear::MAX + && week == 52 + && weekday.to_monday_zero_offset() + > Weekday::Friday.to_monday_zero_offset() + { + return Err(b::WeekdayMondayOne::error().into()); + } + Ok(ISOWeekDate { year, week, weekday }) + } + + /// Like `ISOWeekDate::new`, but constrains out-of-bounds values + /// to their closest valid equivalent. + /// + /// For example, given `9999 W52 Saturday`, this will return + /// `9999 W52 Friday`. + #[cfg(test)] + #[inline] + fn new_constrain( + year: i16, + mut week: i8, + mut weekday: Weekday, + ) -> ISOWeekDate { + debug_assert_eq!(b::Year::MIN, b::ISOYear::MIN); + debug_assert_eq!(b::Year::MAX, b::ISOYear::MAX); + if week == 53 && !is_long_year(year) { + week = 52; + } + if year == b::ISOYear::MAX + && week == 52 + && weekday.to_monday_zero_offset() + > Weekday::Friday.to_monday_zero_offset() + { + weekday = Weekday::Friday; + } + ISOWeekDate { year, week, weekday } + } + + /// Converts a Gregorian date to an ISO week date. + /// + /// The minimum and maximum allowed values of an ISO week date are + /// set based on the minimum and maximum values of a `Date`. Therefore, + /// converting to and from `Date` values is non-lossy and infallible. + /// + /// This routine is equivalent to [`Date::iso_week_date`]. This routine + /// is also available via a `From` trait implementation for + /// `ISOWeekDate`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday, date}; + /// + /// let weekdate = ISOWeekDate::from_date(date(1948, 2, 10)); + /// assert_eq!( + /// weekdate, + /// ISOWeekDate::new(1948, 7, Weekday::Tuesday).unwrap(), + /// ); + /// ``` + #[inline] + pub fn from_date(date: Date) -> ISOWeekDate { + date.iso_week_date() + } + + // N.B. I tried defining a `ISOWeekDate::constant` for defining ISO week + // dates as constants, but it was too annoying to do. We could do it if + // there was a compelling reason for it though. + + /// Returns the year component of this ISO 8601 week date. + /// + /// The value returned is guaranteed to be in the range `-9999..=9999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let weekdate = date(2019, 12, 30).iso_week_date(); + /// assert_eq!(weekdate.year(), 2020); + /// ``` + #[inline] + pub fn year(self) -> i16 { + self.year + } + + /// Returns the week component of this ISO 8601 week date. + /// + /// The value returned is guaranteed to be in the range `1..=53`. A + /// value of `53` can only occur for "long" years. That is, years + /// with a leap week. This occurs precisely in cases for which + /// [`ISOWeekDate::in_long_year`] returns `true`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::date; + /// + /// let weekdate = date(2019, 12, 30).iso_week_date(); + /// assert_eq!(weekdate.year(), 2020); + /// assert_eq!(weekdate.week(), 1); + /// + /// let weekdate = date(1948, 12, 31).iso_week_date(); + /// assert_eq!(weekdate.year(), 1948); + /// assert_eq!(weekdate.week(), 53); + /// ``` + #[inline] + pub fn week(self) -> i8 { + self.week + } + + /// Returns the day component of this ISO 8601 week date. + /// + /// One can use methods on `Weekday` such as + /// [`Weekday::to_monday_one_offset`] + /// and + /// [`Weekday::to_sunday_zero_offset`] + /// to convert the weekday to a number. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{date, Weekday}; + /// + /// let weekdate = date(1948, 12, 31).iso_week_date(); + /// assert_eq!(weekdate.year(), 1948); + /// assert_eq!(weekdate.week(), 53); + /// assert_eq!(weekdate.weekday(), Weekday::Friday); + /// assert_eq!(weekdate.weekday().to_monday_zero_offset(), 4); + /// assert_eq!(weekdate.weekday().to_monday_one_offset(), 5); + /// assert_eq!(weekdate.weekday().to_sunday_zero_offset(), 5); + /// assert_eq!(weekdate.weekday().to_sunday_one_offset(), 6); + /// ``` + #[inline] + pub fn weekday(self) -> Weekday { + self.weekday + } + + /// Returns the ISO 8601 week date corresponding to the first day in the + /// week of this week date. The date returned is guaranteed to have a + /// weekday of [`Weekday::Monday`]. + /// + /// # Errors + /// + /// Since `-9999-01-01` falls on a Monday, it follows that the minimum + /// support Gregorian date is exactly equivalent to the minimum supported + /// ISO 8601 week date. This means that this routine can never actually + /// fail, but only insomuch as the minimums line up. For that reason, and + /// for consistency with [`ISOWeekDate::last_of_week`], the API is + /// fallible. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday, date}; + /// + /// let wd = ISOWeekDate::new(2025, 5, Weekday::Wednesday).unwrap(); + /// assert_eq!(wd.date(), date(2025, 1, 29)); + /// assert_eq!( + /// wd.first_of_week()?, + /// ISOWeekDate::new(2025, 5, Weekday::Monday).unwrap(), + /// ); + /// + /// // Works even for the minimum date. + /// assert_eq!( + /// ISOWeekDate::MIN.first_of_week()?, + /// ISOWeekDate::new(-9999, 1, Weekday::Monday).unwrap(), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn first_of_week(self) -> Result { + // I believe this can never return an error because `Monday` is in + // bounds for all possible year-and-week combinations. This is *only* + // because -9999-01-01 corresponds to -9999-W01-Monday. Which is kinda + // lucky. And I guess if we ever change the ranges, this could become + // fallible. + ISOWeekDate::new(self.year(), self.week(), Weekday::Monday) + } + + /// Returns the ISO 8601 week date corresponding to the last day in the + /// week of this week date. The date returned is guaranteed to have a + /// weekday of [`Weekday::Sunday`]. + /// + /// # Errors + /// + /// This can return an error if the last day of the week exceeds Jiff's + /// maximum Gregorian date of `9999-12-31`. It turns out this can happen + /// since `9999-12-31` falls on a Friday. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday, date}; + /// + /// let wd = ISOWeekDate::new(2025, 5, Weekday::Wednesday).unwrap(); + /// assert_eq!(wd.date(), date(2025, 1, 29)); + /// assert_eq!( + /// wd.last_of_week()?, + /// ISOWeekDate::new(2025, 5, Weekday::Sunday).unwrap(), + /// ); + /// + /// // Unlike `first_of_week`, this routine can actually fail on real + /// // values, although, only when close to the maximum supported date. + /// assert_eq!( + /// ISOWeekDate::MAX.last_of_week().unwrap_err().to_string(), + /// "parameter 'weekday (Monday 1-indexed)' \ + /// is not in the required range of 1..=7", + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn last_of_week(self) -> Result { + // This can return an error when in the last week of the maximum year + // supported by Jiff. That's because the Saturday and Sunday of that + // week are actually in Gregorian year 10,000. + ISOWeekDate::new(self.year(), self.week(), Weekday::Sunday) + } + + /// Returns the ISO 8601 week date corresponding to the first day in the + /// year of this week date. The date returned is guaranteed to have a + /// weekday of [`Weekday::Monday`]. + /// + /// # Errors + /// + /// Since `-9999-01-01` falls on a Monday, it follows that the minimum + /// support Gregorian date is exactly equivalent to the minimum supported + /// ISO 8601 week date. This means that this routine can never actually + /// fail, but only insomuch as the minimums line up. For that reason, and + /// for consistency with [`ISOWeekDate::last_of_year`], the API is + /// fallible. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday, date}; + /// + /// let wd = ISOWeekDate::new(2025, 5, Weekday::Wednesday).unwrap(); + /// assert_eq!(wd.date(), date(2025, 1, 29)); + /// assert_eq!( + /// wd.first_of_year()?, + /// ISOWeekDate::new(2025, 1, Weekday::Monday).unwrap(), + /// ); + /// + /// // Works even for the minimum date. + /// assert_eq!( + /// ISOWeekDate::MIN.first_of_year()?, + /// ISOWeekDate::new(-9999, 1, Weekday::Monday).unwrap(), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn first_of_year(self) -> Result { + // I believe this can never return an error because `Monday` is in + // bounds for all possible years. This is *only* because -9999-01-01 + // corresponds to -9999-W01-Monday. Which is kinda lucky. And I guess + // if we ever change the ranges, this could become fallible. + ISOWeekDate::new(self.year(), 1, Weekday::Monday) + } + + /// Returns the ISO 8601 week date corresponding to the last day in the + /// year of this week date. The date returned is guaranteed to have a + /// weekday of [`Weekday::Sunday`]. + /// + /// # Errors + /// + /// This can return an error if the last day of the year exceeds Jiff's + /// maximum Gregorian date of `9999-12-31`. It turns out this can happen + /// since `9999-12-31` falls on a Friday. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday, date}; + /// + /// let wd = ISOWeekDate::new(2025, 5, Weekday::Wednesday).unwrap(); + /// assert_eq!(wd.date(), date(2025, 1, 29)); + /// assert_eq!( + /// wd.last_of_year()?, + /// ISOWeekDate::new(2025, 52, Weekday::Sunday).unwrap(), + /// ); + /// + /// // Works correctly for "long" years. + /// let wd = ISOWeekDate::new(2026, 5, Weekday::Wednesday).unwrap(); + /// assert_eq!(wd.date(), date(2026, 1, 28)); + /// assert_eq!( + /// wd.last_of_year()?, + /// ISOWeekDate::new(2026, 53, Weekday::Sunday).unwrap(), + /// ); + /// + /// // Unlike `first_of_year`, this routine can actually fail on real + /// // values, although, only when close to the maximum supported date. + /// assert_eq!( + /// ISOWeekDate::MAX.last_of_year().unwrap_err().to_string(), + /// "parameter 'weekday (Monday 1-indexed)' \ + /// is not in the required range of 1..=7", + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn last_of_year(self) -> Result { + // This can return an error when in the maximum year supported by + // Jiff. That's because the last Saturday and Sunday of that year are + // actually in Gregorian year 10,000. + ISOWeekDate::new(self.year(), self.weeks_in_year(), Weekday::Sunday) + } + + /// Returns the total number of days in the year of this ISO 8601 week + /// date. + /// + /// It is guaranteed that the value returned is either 364 or 371. The + /// latter case occurs precisely when [`ISOWeekDate::in_long_year`] + /// returns `true`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday}; + /// + /// let weekdate = ISOWeekDate::new(2025, 7, Weekday::Monday).unwrap(); + /// assert_eq!(weekdate.days_in_year(), 364); + /// let weekdate = ISOWeekDate::new(2026, 7, Weekday::Monday).unwrap(); + /// assert_eq!(weekdate.days_in_year(), 371); + /// ``` + #[inline] + pub fn days_in_year(self) -> i16 { + if self.in_long_year() { + 371 + } else { + 364 + } + } + + /// Returns the total number of weeks in the year of this ISO 8601 week + /// date. + /// + /// It is guaranteed that the value returned is either 52 or 53. The + /// latter case occurs precisely when [`ISOWeekDate::in_long_year`] + /// returns `true`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday}; + /// + /// let weekdate = ISOWeekDate::new(2025, 7, Weekday::Monday).unwrap(); + /// assert_eq!(weekdate.weeks_in_year(), 52); + /// let weekdate = ISOWeekDate::new(2026, 7, Weekday::Monday).unwrap(); + /// assert_eq!(weekdate.weeks_in_year(), 53); + /// ``` + #[inline] + pub fn weeks_in_year(self) -> i8 { + if self.in_long_year() { + 53 + } else { + 52 + } + } + + /// Returns true if and only if the year of this week date is a "long" + /// year. + /// + /// A long year is one that contains precisely 53 weeks. All other years + /// contain precisely 52 weeks. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday}; + /// + /// let weekdate = ISOWeekDate::new(1948, 7, Weekday::Monday).unwrap(); + /// assert!(weekdate.in_long_year()); + /// let weekdate = ISOWeekDate::new(1949, 7, Weekday::Monday).unwrap(); + /// assert!(!weekdate.in_long_year()); + /// ``` + #[inline] + pub fn in_long_year(self) -> bool { + is_long_year(self.year()) + } + + /// Returns the ISO 8601 date immediately following this one. + /// + /// # Errors + /// + /// This returns an error when this date is the maximum value. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday}; + /// + /// let wd = ISOWeekDate::new(2025, 5, Weekday::Wednesday).unwrap(); + /// assert_eq!( + /// wd.tomorrow()?, + /// ISOWeekDate::new(2025, 5, Weekday::Thursday).unwrap(), + /// ); + /// + /// // The max doesn't have a tomorrow. + /// assert!(ISOWeekDate::MAX.tomorrow().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn tomorrow(self) -> Result { + // I suppose we could probably implement this in a more efficient + // manner but avoiding the roundtrip through Gregorian dates. + self.date().tomorrow().map(|d| d.iso_week_date()) + } + + /// Returns the ISO 8601 week date immediately preceding this one. + /// + /// # Errors + /// + /// This returns an error when this date is the minimum value. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday}; + /// + /// let wd = ISOWeekDate::new(2025, 5, Weekday::Wednesday).unwrap(); + /// assert_eq!( + /// wd.yesterday()?, + /// ISOWeekDate::new(2025, 5, Weekday::Tuesday).unwrap(), + /// ); + /// + /// // The min doesn't have a yesterday. + /// assert!(ISOWeekDate::MIN.yesterday().is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn yesterday(self) -> Result { + // I suppose we could probably implement this in a more efficient + // manner but avoiding the roundtrip through Gregorian dates. + self.date().yesterday().map(|d| d.iso_week_date()) + } + + /// Converts this ISO week date to a Gregorian [`Date`]. + /// + /// The minimum and maximum allowed values of an ISO week date are + /// set based on the minimum and maximum values of a `Date`. Therefore, + /// converting to and from `Date` values is non-lossy and infallible. + /// + /// This routine is equivalent to [`Date::from_iso_week_date`]. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{ISOWeekDate, Weekday, date}; + /// + /// let weekdate = ISOWeekDate::new(1948, 7, Weekday::Tuesday).unwrap(); + /// assert_eq!(weekdate.date(), date(1948, 2, 10)); + /// ``` + #[inline] + pub fn date(self) -> Date { + Date::from_iso_week_date(self) + } +} + +impl Default for ISOWeekDate { + fn default() -> ISOWeekDate { + ISOWeekDate::ZERO + } +} + +impl core::fmt::Display for ISOWeekDate { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + use crate::fmt::StdFmtWrite; + + DEFAULT_DATETIME_PRINTER + .print_iso_week_date(self, StdFmtWrite(f)) + .map_err(|_| core::fmt::Error) + } +} + +impl core::str::FromStr for ISOWeekDate { + type Err = Error; + + fn from_str(string: &str) -> Result { + DEFAULT_DATETIME_PARSER.parse_iso_week_date(string) + } +} + +impl Ord for ISOWeekDate { + #[inline] + fn cmp(&self, other: &ISOWeekDate) -> core::cmp::Ordering { + (self.year(), self.week(), self.weekday().to_monday_one_offset()).cmp( + &( + other.year(), + other.week(), + other.weekday().to_monday_one_offset(), + ), + ) + } +} + +impl PartialOrd for ISOWeekDate { + #[inline] + fn partial_cmp(&self, other: &ISOWeekDate) -> Option { + Some(self.cmp(other)) + } +} + +impl From for ISOWeekDate { + #[inline] + fn from(date: Date) -> ISOWeekDate { + ISOWeekDate::from_date(date) + } +} + +impl From for ISOWeekDate { + #[inline] + fn from(dt: DateTime) -> ISOWeekDate { + ISOWeekDate::from(dt.date()) + } +} + +impl From for ISOWeekDate { + #[inline] + fn from(zdt: Zoned) -> ISOWeekDate { + ISOWeekDate::from(zdt.date()) + } +} + +impl<'a> From<&'a Zoned> for ISOWeekDate { + #[inline] + fn from(zdt: &'a Zoned) -> ISOWeekDate { + ISOWeekDate::from(zdt.date()) + } +} + +#[cfg(feature = "serde")] +impl serde_core::Serialize for ISOWeekDate { + #[inline] + fn serialize( + &self, + serializer: S, + ) -> Result { + serializer.collect_str(self) + } +} + +#[cfg(feature = "serde")] +impl<'de> serde_core::Deserialize<'de> for ISOWeekDate { + #[inline] + fn deserialize>( + deserializer: D, + ) -> Result { + use serde_core::de; + + struct ISOWeekDateVisitor; + + impl<'de> de::Visitor<'de> for ISOWeekDateVisitor { + type Value = ISOWeekDate; + + fn expecting( + &self, + f: &mut core::fmt::Formatter, + ) -> core::fmt::Result { + f.write_str("an ISO 8601 week date string") + } + + #[inline] + fn visit_bytes( + self, + value: &[u8], + ) -> Result { + DEFAULT_DATETIME_PARSER + .parse_iso_week_date(value) + .map_err(de::Error::custom) + } + + #[inline] + fn visit_str( + self, + value: &str, + ) -> Result { + self.visit_bytes(value.as_bytes()) + } + } + + deserializer.deserialize_str(ISOWeekDateVisitor) + } +} + +#[cfg(test)] +impl quickcheck::Arbitrary for ISOWeekDate { + fn arbitrary(g: &mut quickcheck::Gen) -> ISOWeekDate { + let year = b::ISOYear::arbitrary(g); + let week = b::ISOWeek::arbitrary(g); + let weekday = Weekday::arbitrary(g); + ISOWeekDate::new_constrain(year, week, weekday) + } + + fn shrink(&self) -> alloc::boxed::Box> { + alloc::boxed::Box::new( + (self.year(), self.week(), self.weekday()).shrink().map( + |(year, week, weekday)| { + ISOWeekDate::new_constrain(year, week, weekday) + }, + ), + ) + } +} + +/// Returns true if the given ISO year is a "long" year or not. +/// +/// A "long" year is a year with 53 weeks. Otherwise, it's a "short" year +/// with 52 weeks. +fn is_long_year(year: i16) -> bool { + // Inspired by: https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year + let last = + Date::new(year, 12, 31).expect("last day of year is always valid"); + let weekday = last.weekday(); + weekday == Weekday::Thursday + || (last.in_leap_year() && weekday == Weekday::Friday) +} + +#[cfg(not(miri))] +#[cfg(test)] +mod tests { + use super::*; + + quickcheck::quickcheck! { + fn prop_all_long_years_have_53rd_week(year: i16) -> quickcheck::TestResult { + if b::Year::check(year).is_err() { + return quickcheck::TestResult::discard(); + } + quickcheck::TestResult::from_bool(!is_long_year(year) + || ISOWeekDate::new(year, 53, Weekday::Sunday).is_ok()) + } + + fn prop_prev_day_is_less(wd: ISOWeekDate) -> quickcheck::TestResult { + use crate::ToSpan; + + if wd == ISOWeekDate::MIN { + return quickcheck::TestResult::discard(); + } + let prev_date = wd.date().checked_add(-1.days()).unwrap(); + quickcheck::TestResult::from_bool(prev_date.iso_week_date() < wd) + } + + fn prop_next_day_is_greater(wd: ISOWeekDate) -> quickcheck::TestResult { + use crate::ToSpan; + + if wd == ISOWeekDate::MAX { + return quickcheck::TestResult::discard(); + } + let next_date = wd.date().checked_add(1.days()).unwrap(); + quickcheck::TestResult::from_bool(wd < next_date.iso_week_date()) + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..468793d02553ce30408bc43aa234cf70bfaf617d --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/mod.rs @@ -0,0 +1,290 @@ +/*! +Facilities for dealing with inexact dates and times. + +# Overview + +The essential types in this module are: + +* [`Date`] is a specific day in the Gregorian calendar. +* [`Time`] is a specific wall clock time. +* [`DateTime`] is a combination of a day and a time. + +Moreover, the [`date`](date()) and [`time`](time()) free functions can be used +to conveniently create values of any of three types above: + +``` +use jiff::civil::{date, time}; + +assert_eq!(date(2024, 7, 31).to_string(), "2024-07-31"); +assert_eq!(time(15, 20, 0, 123).to_string(), "15:20:00.000000123"); +assert_eq!( + date(2024, 7, 31).at(15, 20, 0, 123).to_string(), + "2024-07-31T15:20:00.000000123", +); +assert_eq!( + time(15, 20, 0, 123).on(2024, 7, 31).to_string(), + "2024-07-31T15:20:00.000000123", +); +``` + +# What is "civil" time? + +A civil datetime is a calendar date and a clock time. It also goes by the +names "naive," "local" or "plain." The most important thing to understand +about civil time is that it does not correspond to a precise instant in +time. This is in contrast to types like [`Timestamp`](crate::Timestamp) and +[`Zoned`](crate::Zoned), which _do_ correspond to a precise instant in time (to +nanosecond precision). + +Because a civil datetime _never_ has a time zone associated with it, and +because some time zones have transitions that skip or repeat clock times, it +follows that not all civil datetimes precisely map to a single instant in time. +For example, `2024-03-10 02:30` never existed on a clock in `America/New_York` +because the 2 o'clock hour was skipped when the clocks were "moved forward" +for daylight saving time. Conversely, `2024-11-03 01:30` occurred twice in +`America/New_York` because the 1 o'clock hour was repeated when clocks were +"moved backward" for daylight saving time. (When time is skipped, it's called a +"gap." When time is repeated, it's called a "fold.") + +In contrast, an instant in time (that is, `Timestamp` or `Zoned`) can _always_ +be converted to a civil datetime. And, when a civil datetime is combined +with its time zone identifier _and_ its offset, the resulting machine readable +string is unambiguous 100% of the time: + +``` +use jiff::{civil::date, tz::TimeZone}; + +let tz = TimeZone::get("America/New_York")?; +let dt = date(2024, 11, 3).at(1, 30, 0, 0); +// It's ambiguous, so asking for an unambiguous instant presents an error! +assert!(tz.to_ambiguous_zoned(dt).unambiguous().is_err()); +// Gives you the earlier time in a fold, i.e., before DST ends: +assert_eq!( + tz.to_ambiguous_zoned(dt).earlier()?.to_string(), + "2024-11-03T01:30:00-04:00[America/New_York]", +); +// Gives you the later time in a fold, i.e., after DST ends. +// Notice the offset change from the previous example! +assert_eq!( + tz.to_ambiguous_zoned(dt).later()?.to_string(), + "2024-11-03T01:30:00-05:00[America/New_York]", +); +// "Just give me something reasonable" +assert_eq!( + tz.to_ambiguous_zoned(dt).compatible()?.to_string(), + "2024-11-03T01:30:00-04:00[America/New_York]", +); + +# Ok::<(), Box>(()) +``` + +# When should I use civil time? + +Here is a likely non-exhaustive list of reasons why you might want to use +civil time: + +* When you want or need to deal with calendar and clock units as an +intermediate step before and/or after associating it with a time zone. For +example, perhaps you need to parse strings like `2000-01-01T00:00:00` from a +CSV file that have no time zone or offset information, but the time zone is +implied through some out-of-band mechanism. +* When time zone is actually irrelevant. For example, a fitness tracking app +that reminds you to work-out at 6am local time, regardless of which time zone +you're in. +* When you need to perform arithmetic that deliberately ignores daylight +saving time. +* When interacting with legacy systems or systems that specifically do not +support time zones. +*/ + +pub use self::{ + date::{Date, DateArithmetic, DateDifference, DateSeries, DateWith}, + datetime::{ + DateTime, DateTimeArithmetic, DateTimeDifference, DateTimeRound, + DateTimeSeries, DateTimeWith, + }, + iso_week_date::ISOWeekDate, + time::{ + Time, TimeArithmetic, TimeDifference, TimeRound, TimeSeries, TimeWith, + }, + weekday::{Weekday, WeekdaysForward, WeekdaysReverse}, +}; + +mod date; +mod datetime; +mod iso_week_date; +mod time; +mod weekday; + +/// The era corresponding to a particular year. +/// +/// The BCE era corresponds to years less than or equal to `0`, while the CE +/// era corresponds to years greater than `0`. +/// +/// In particular, this crate allows years to be negative and also to be `0`, +/// which is contrary to the common practice of excluding the year `0` when +/// writing dates for the Gregorian calendar. Moreover, common practice eschews +/// negative years in favor of labeling a year with an era notation. That is, +/// the year `1 BCE` is year `0` in this crate. The year `2 BCE` is the year +/// `-1` in this crate. +/// +/// To get the year in its era format, use [`Date::era_year`]. +#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] +pub enum Era { + /// The "before common era" era. + /// + /// This corresponds to all years less than or equal to `0`. + /// + /// This is precisely equivalent to the "BC" or "before Christ" era. + BCE, + /// The "common era" era. + /// + /// This corresponds to all years greater than `0`. + /// + /// This is precisely equivalent to the "AD" or "anno Domini" or "in the + /// year of the Lord" era. + CE, +} + +/// Creates a new `DateTime` value in a `const` context. +/// +/// This is a convenience free function for [`DateTime::constant`]. It is +/// intended to provide a terse syntax for constructing `DateTime` values from +/// parameters that are known to be valid. +/// +/// # Panics +/// +/// This routine panics when [`DateTime::new`] would return an error. That +/// is, when the given components do not correspond to a valid datetime. +/// Namely, all of the following must be true: +/// +/// * The year must be in the range `-9999..=9999`. +/// * The month must be in the range `1..=12`. +/// * The day must be at least `1` and must be at most the number of days +/// in the corresponding month. So for example, `2024-02-29` is valid but +/// `2023-02-29` is not. +/// * `0 <= hour <= 23` +/// * `0 <= minute <= 59` +/// * `0 <= second <= 59` +/// * `0 <= subsec_nanosecond <= 999,999,999` +/// +/// Similarly, when used in a const context, invalid parameters will prevent +/// your Rust program from compiling. +/// +/// # Example +/// +/// ``` +/// use jiff::civil::DateTime; +/// +/// let d = DateTime::constant(2024, 2, 29, 21, 30, 5, 123_456_789); +/// assert_eq!(d.date().year(), 2024); +/// assert_eq!(d.date().month(), 2); +/// assert_eq!(d.date().day(), 29); +/// assert_eq!(d.time().hour(), 21); +/// assert_eq!(d.time().minute(), 30); +/// assert_eq!(d.time().second(), 5); +/// assert_eq!(d.time().millisecond(), 123); +/// assert_eq!(d.time().microsecond(), 456); +/// assert_eq!(d.time().nanosecond(), 789); +/// ``` +#[inline] +pub const fn datetime( + year: i16, + month: i8, + day: i8, + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, +) -> DateTime { + DateTime::constant( + year, + month, + day, + hour, + minute, + second, + subsec_nanosecond, + ) +} + +/// Creates a new `Date` value in a `const` context. +/// +/// This is a convenience free function for [`Date::constant`]. It is intended +/// to provide a terse syntax for constructing `Date` values from parameters +/// that are known to be valid. +/// +/// # Panics +/// +/// This routine panics when [`Date::new`] would return an error. That is, +/// when the given year-month-day does not correspond to a valid date. +/// Namely, all of the following must be true: +/// +/// * The year must be in the range `-9999..=9999`. +/// * The month must be in the range `1..=12`. +/// * The day must be at least `1` and must be at most the number of days +/// in the corresponding month. So for example, `2024-02-29` is valid but +/// `2023-02-29` is not. +/// +/// Similarly, when used in a const context, invalid parameters will prevent +/// your Rust program from compiling. +/// +/// # Example +/// +/// ``` +/// use jiff::civil::date; +/// +/// let d = date(2024, 2, 29); +/// assert_eq!(d.year(), 2024); +/// assert_eq!(d.month(), 2); +/// assert_eq!(d.day(), 29); +/// ``` +#[inline] +pub const fn date(year: i16, month: i8, day: i8) -> Date { + Date::constant(year, month, day) +} + +/// Creates a new `Time` value in a `const` context. +/// +/// This is a convenience free function for [`Time::constant`]. It is intended +/// to provide a terse syntax for constructing `Time` values from parameters +/// that are known to be valid. +/// +/// # Panics +/// +/// This panics if the given values do not correspond to a valid `Time`. +/// All of the following conditions must be true: +/// +/// * `0 <= hour <= 23` +/// * `0 <= minute <= 59` +/// * `0 <= second <= 59` +/// * `0 <= subsec_nanosecond <= 999,999,999` +/// +/// Similarly, when used in a const context, invalid parameters will +/// prevent your Rust program from compiling. +/// +/// # Example +/// +/// This shows an example of a valid time in a `const` context: +/// +/// ``` +/// use jiff::civil::Time; +/// +/// const BEDTIME: Time = Time::constant(21, 30, 5, 123_456_789); +/// assert_eq!(BEDTIME.hour(), 21); +/// assert_eq!(BEDTIME.minute(), 30); +/// assert_eq!(BEDTIME.second(), 5); +/// assert_eq!(BEDTIME.millisecond(), 123); +/// assert_eq!(BEDTIME.microsecond(), 456); +/// assert_eq!(BEDTIME.nanosecond(), 789); +/// assert_eq!(BEDTIME.subsec_nanosecond(), 123_456_789); +/// ``` +#[inline] +pub const fn time( + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, +) -> Time { + Time::constant(hour, minute, second, subsec_nanosecond) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/time.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/time.rs new file mode 100644 index 0000000000000000000000000000000000000000..1b03c3b556607625e92aceda9b64c1ad1c268b6e --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jiff-0.2.20/src/civil/time.rs @@ -0,0 +1,3550 @@ +use core::time::Duration as UnsignedDuration; + +use crate::{ + civil::{Date, DateTime}, + duration::{Duration, SDuration}, + error::{civil::Error as E, unit::UnitConfigError, Error}, + fmt::{ + self, + temporal::{self, DEFAULT_DATETIME_PARSER}, + }, + shared::util::itime::{ITime, ITimeNanosecond, ITimeSecond}, + util::{b, constant, round::Increment}, + RoundMode, SignedDuration, Span, SpanRound, Unit, Zoned, +}; + +/// A representation of civil "wall clock" time. +/// +/// Conceptually, a `Time` value corresponds to the typical hours and minutes +/// that you might see on a clock. This type also contains the second and +/// fractional subsecond (to nanosecond precision) associated with a time. +/// +/// # Civil time +/// +/// A `Time` value behaves as if it corresponds precisely to a single +/// nanosecond within a day, where all days have `86,400` seconds. That is, +/// any given `Time` value corresponds to a nanosecond in the inclusive range +/// `[0, 86399999999999]`, where `0` corresponds to `00:00:00.000000000` +/// ([`Time::MIN`]) and `86399999999999` corresponds to `23:59:59.999999999` +/// ([`Time::MAX`]). Moreover, in civil time, all hours have the same number of +/// minutes, all minutes have the same number of seconds and all seconds have +/// the same number of nanoseconds. +/// +/// # Parsing and printing +/// +/// The `Time` type provides convenient trait implementations of +/// [`std::str::FromStr`] and [`std::fmt::Display`]: +/// +/// ``` +/// use jiff::civil::Time; +/// +/// let t: Time = "15:22:45".parse()?; +/// assert_eq!(t.to_string(), "15:22:45"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// A civil `Time` can also be parsed from something that _contains_ a +/// time, but with perhaps other data (such as an offset or time zone): +/// +/// ``` +/// use jiff::civil::Time; +/// +/// let t: Time = "2024-06-19T15:22:45-04[America/New_York]".parse()?; +/// assert_eq!(t.to_string(), "15:22:45"); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// For more information on the specific format supported, see the +/// [`fmt::temporal`](crate::fmt::temporal) module documentation. +/// +/// # Default value +/// +/// For convenience, this type implements the `Default` trait. Its default +/// value is midnight. i.e., `00:00:00.000000000`. +/// +/// # Leap seconds +/// +/// Jiff does not support leap seconds. Jiff behaves as if they don't exist. +/// The only exception is that if one parses a time with a second component +/// of `60`, then it is automatically constrained to `59`: +/// +/// ``` +/// use jiff::civil::{Time, time}; +/// +/// let t: Time = "23:59:60".parse()?; +/// assert_eq!(t, time(23, 59, 59, 0)); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// # Comparisons +/// +/// The `Time` type provides both `Eq` and `Ord` trait implementations to +/// facilitate easy comparisons. When a time `t1` occurs before a time `t2`, +/// then `t1 < t2`. For example: +/// +/// ``` +/// use jiff::civil::time; +/// +/// let t1 = time(7, 30, 1, 0); +/// let t2 = time(8, 10, 0, 0); +/// assert!(t1 < t2); +/// ``` +/// +/// As mentioned above, `Time` values are not associated with timezones, and +/// thus transitions such as DST are not taken into account when comparing +/// `Time` values. +/// +/// # Arithmetic +/// +/// This type provides routines for adding and subtracting spans of time, as +/// well as computing the span of time between two `Time` values. +/// +/// For adding or subtracting spans of time, one can use any of the following +/// routines: +/// +/// * [`Time::wrapping_add`] or [`Time::wrapping_sub`] for wrapping arithmetic. +/// * [`Time::checked_add`] or [`Time::checked_sub`] for checked arithmetic. +/// * [`Time::saturating_add`] or [`Time::saturating_sub`] for saturating +/// arithmetic. +/// +/// Additionally, wrapping arithmetic is available via the `Add` and `Sub` +/// trait implementations: +/// +/// ``` +/// use jiff::{civil::time, ToSpan}; +/// +/// let t = time(20, 10, 1, 0); +/// let span = 1.hours().minutes(49).seconds(59); +/// assert_eq!(t + span, time(22, 0, 0, 0)); +/// +/// // Overflow will result in wrap-around unless using checked +/// // arithmetic explicitly. +/// let t = time(23, 59, 59, 999_999_999); +/// assert_eq!(time(0, 0, 0, 0), t + 1.nanoseconds()); +/// ``` +/// +/// Wrapping arithmetic is used by default because it corresponds to how clocks +/// showing the time of day behave in practice. +/// +/// One can compute the span of time between two times using either +/// [`Time::until`] or [`Time::since`]. It's also possible to subtract two +/// `Time` values directly via a `Sub` trait implementation: +/// +/// ``` +/// use jiff::{civil::time, ToSpan}; +/// +/// let time1 = time(22, 0, 0, 0); +/// let time2 = time(20, 10, 1, 0); +/// assert_eq!( +/// time1 - time2, +/// 1.hours().minutes(49).seconds(59).fieldwise(), +/// ); +/// ``` +/// +/// The `until` and `since` APIs are polymorphic and allow re-balancing and +/// rounding the span returned. For example, the default largest unit is hours +/// (as exemplified above), but we can ask for smaller units: +/// +/// ``` +/// use jiff::{civil::time, ToSpan, Unit}; +/// +/// let time1 = time(23, 30, 0, 0); +/// let time2 = time(7, 0, 0, 0); +/// assert_eq!( +/// time1.since((Unit::Minute, time2))?, +/// 990.minutes().fieldwise(), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// Or even round the span returned: +/// +/// ``` +/// use jiff::{civil::{TimeDifference, time}, RoundMode, ToSpan, Unit}; +/// +/// let time1 = time(23, 30, 0, 0); +/// let time2 = time(23, 35, 59, 0); +/// assert_eq!( +/// time1.until( +/// TimeDifference::new(time2).smallest(Unit::Minute), +/// )?, +/// 5.minutes().fieldwise(), +/// ); +/// // `TimeDifference` uses truncation as a rounding mode by default, +/// // but you can set the rounding mode to break ties away from zero: +/// assert_eq!( +/// time1.until( +/// TimeDifference::new(time2) +/// .smallest(Unit::Minute) +/// .mode(RoundMode::HalfExpand), +/// )?, +/// // Rounds up to 6 minutes. +/// 6.minutes().fieldwise(), +/// ); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// # Rounding +/// +/// A `Time` can be rounded based on a [`TimeRound`] configuration of smallest +/// units, rounding increment and rounding mode. Here's an example showing how +/// to round to the nearest third hour: +/// +/// ``` +/// use jiff::{civil::{TimeRound, time}, Unit}; +/// +/// let t = time(16, 27, 29, 999_999_999); +/// assert_eq!( +/// t.round(TimeRound::new().smallest(Unit::Hour).increment(3))?, +/// time(15, 0, 0, 0), +/// ); +/// // Or alternatively, make use of the `From<(Unit, i64)> for TimeRound` +/// // trait implementation: +/// assert_eq!(t.round((Unit::Hour, 3))?, time(15, 0, 0, 0)); +/// +/// # Ok::<(), Box>(()) +/// ``` +/// +/// See [`Time::round`] for more details. +#[derive(Clone, Copy, Eq, Hash, PartialEq, PartialOrd, Ord)] +pub struct Time { + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, +} + +impl Time { + /// The minimum representable time value. + /// + /// This corresponds to `00:00:00.000000000`. + pub const MIN: Time = Time::midnight(); + + /// The maximum representable time value. + /// + /// This corresponds to `23:59:59.999999999`. + pub const MAX: Time = Time::constant(23, 59, 59, 999_999_999); + + /// Creates a new `Time` value from its component hour, minute, second and + /// fractional subsecond (up to nanosecond precision) values. + /// + /// To set the component values of a time after creating it, use + /// [`TimeWith`] via [`Time::with`] to build a new [`Time`] from the fields + /// of an existing time. + /// + /// # Errors + /// + /// This returns an error unless *all* of the following conditions are + /// true: + /// + /// * `0 <= hour <= 23` + /// * `0 <= minute <= 59` + /// * `0 <= second <= 59` + /// * `0 <= subsec_nanosecond <= 999,999,999` + /// + /// # Example + /// + /// This shows an example of a valid time: + /// + /// ``` + /// use jiff::civil::Time; + /// + /// let t = Time::new(21, 30, 5, 123_456_789).unwrap(); + /// assert_eq!(t.hour(), 21); + /// assert_eq!(t.minute(), 30); + /// assert_eq!(t.second(), 5); + /// assert_eq!(t.millisecond(), 123); + /// assert_eq!(t.microsecond(), 456); + /// assert_eq!(t.nanosecond(), 789); + /// ``` + /// + /// This shows an example of an invalid time: + /// + /// ``` + /// use jiff::civil::Time; + /// + /// assert!(Time::new(21, 30, 60, 0).is_err()); + /// ``` + #[inline] + pub fn new( + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, + ) -> Result { + let hour = b::Hour::check(hour)?; + let minute = b::Minute::check(minute)?; + let second = b::Second::check(second)?; + let subsec_nanosecond = b::SubsecNanosecond::check(subsec_nanosecond)?; + Ok(Time::new_unchecked(hour, minute, second, subsec_nanosecond)) + } + + #[inline] + const fn new_unchecked( + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, + ) -> Time { + Time { hour, minute, second, subsec_nanosecond } + } + + /// Creates a new `Time` value in a `const` context. + /// + /// # Panics + /// + /// This panics if the given values do not correspond to a valid `Time`. + /// All of the following conditions must be true: + /// + /// * `0 <= hour <= 23` + /// * `0 <= minute <= 59` + /// * `0 <= second <= 59` + /// * `0 <= subsec_nanosecond <= 999,999,999` + /// + /// Similarly, when used in a const context, invalid parameters will + /// prevent your Rust program from compiling. + /// + /// # Example + /// + /// This shows an example of a valid time in a `const` context: + /// + /// ``` + /// use jiff::civil::Time; + /// + /// const BEDTIME: Time = Time::constant(21, 30, 5, 123_456_789); + /// assert_eq!(BEDTIME.hour(), 21); + /// assert_eq!(BEDTIME.minute(), 30); + /// assert_eq!(BEDTIME.second(), 5); + /// assert_eq!(BEDTIME.millisecond(), 123); + /// assert_eq!(BEDTIME.microsecond(), 456); + /// assert_eq!(BEDTIME.nanosecond(), 789); + /// assert_eq!(BEDTIME.subsec_nanosecond(), 123_456_789); + /// ``` + #[inline] + pub const fn constant( + hour: i8, + minute: i8, + second: i8, + subsec_nanosecond: i32, + ) -> Time { + let hour = + constant::unwrapr!(b::Hour::checkc(hour as i64), "invalid hour",); + let minute = constant::unwrapr!( + b::Minute::checkc(minute as i64), + "invalid minute", + ); + let second = constant::unwrapr!( + b::Second::checkc(second as i64), + "invalid second", + ); + let subsec = constant::unwrapr!( + b::SubsecNanosecond::checkc(subsec_nanosecond as i64), + "invalid nanosecond", + ); + Time::new_unchecked(hour, minute, second, subsec) + } + + /// Returns the first moment of time in a day. + /// + /// Specifically, this has the `hour`, `minute`, `second`, `millisecond`, + /// `microsecond` and `nanosecond` fields all set to `0`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::Time; + /// + /// let t = Time::midnight(); + /// assert_eq!(t.hour(), 0); + /// assert_eq!(t.minute(), 0); + /// assert_eq!(t.second(), 0); + /// assert_eq!(t.millisecond(), 0); + /// assert_eq!(t.microsecond(), 0); + /// assert_eq!(t.nanosecond(), 0); + /// ``` + #[inline] + pub const fn midnight() -> Time { + Time::constant(0, 0, 0, 0) + } + + /// Create a builder for constructing a `Time` from the fields of this + /// time. + /// + /// See the methods on [`TimeWith`] for the different ways one can set the + /// fields of a new `Time`. + /// + /// # Example + /// + /// Unlike [`Date`], a [`Time`] is valid for all possible valid values + /// of its fields. That is, there is no way for two valid field values + /// to combine into an invalid `Time`. So, for `Time`, this builder does + /// have as much of a benefit versus an API design with methods like + /// `Time::with_hour` and `Time::with_minute`. Nevertheless, this builder + /// permits settings multiple fields at the same time and performing only + /// one validity check. Moreover, this provides a consistent API with other + /// date and time types in this crate. + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t1 = time(0, 0, 24, 0); + /// let t2 = t1.with().hour(15).minute(30).millisecond(10).build()?; + /// assert_eq!(t2, time(15, 30, 24, 10_000_000)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn with(self) -> TimeWith { + TimeWith::new(self) + } + + /// Returns the "hour" component of this time. + /// + /// The value returned is guaranteed to be in the range `0..=23`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t = time(13, 35, 56, 123_456_789); + /// assert_eq!(t.hour(), 13); + /// ``` + #[inline] + pub fn hour(self) -> i8 { + self.hour + } + + /// Returns the "minute" component of this time. + /// + /// The value returned is guaranteed to be in the range `0..=59`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t = time(13, 35, 56, 123_456_789); + /// assert_eq!(t.minute(), 35); + /// ``` + #[inline] + pub fn minute(self) -> i8 { + self.minute + } + + /// Returns the "second" component of this time. + /// + /// The value returned is guaranteed to be in the range `0..=59`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t = time(13, 35, 56, 123_456_789); + /// assert_eq!(t.second(), 56); + /// ``` + #[inline] + pub fn second(self) -> i8 { + self.second + } + + /// Returns the "millisecond" component of this time. + /// + /// The value returned is guaranteed to be in the range `0..=999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t = time(13, 35, 56, 123_456_789); + /// assert_eq!(t.millisecond(), 123); + /// ``` + #[inline] + pub fn millisecond(self) -> i16 { + (self.subsec_nanosecond() / b::NANOS_PER_MILLI_32) as i16 + } + + /// Returns the "microsecond" component of this time. + /// + /// The value returned is guaranteed to be in the range `0..=999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t = time(13, 35, 56, 123_456_789); + /// assert_eq!(t.microsecond(), 456); + /// ``` + #[inline] + pub fn microsecond(self) -> i16 { + ((self.subsec_nanosecond() / b::NANOS_PER_MICRO_32) + % b::MICROS_PER_MILLI_32) as i16 + } + + /// Returns the "nanosecond" component of this time. + /// + /// The value returned is guaranteed to be in the range `0..=999`. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t = time(13, 35, 56, 123_456_789); + /// assert_eq!(t.nanosecond(), 789); + /// ``` + #[inline] + pub fn nanosecond(self) -> i16 { + (self.subsec_nanosecond() % b::NANOS_PER_MICRO_32) as i16 + } + + /// Returns the fractional nanosecond for this `Time` value. + /// + /// If you want to set this value on `Time`, then use + /// [`TimeWith::subsec_nanosecond`] via [`Time::with`]. + /// + /// The value returned is guaranteed to be in the range `0..=999_999_999`. + /// + /// # Example + /// + /// This shows the relationship between constructing a `Time` value + /// with routines like `with().millisecond()` and accessing the entire + /// fractional part as a nanosecond: + /// + /// ``` + /// use jiff::civil::time; + /// + /// let t = time(15, 21, 35, 0).with().millisecond(987).build()?; + /// assert_eq!(t.subsec_nanosecond(), 987_000_000); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: nanoseconds from a timestamp + /// + /// This shows how the fractional nanosecond part of a `Time` value + /// manifests from a specific timestamp. + /// + /// ``` + /// use jiff::Timestamp; + /// + /// // 1,234 nanoseconds after the Unix epoch. + /// let zdt = Timestamp::new(0, 1_234)?.in_tz("UTC")?; + /// let time = zdt.datetime().time(); + /// assert_eq!(time.subsec_nanosecond(), 1_234); + /// + /// // 1,234 nanoseconds before the Unix epoch. + /// let zdt = Timestamp::new(0, -1_234)?.in_tz("UTC")?; + /// let time = zdt.datetime().time(); + /// // The nanosecond is equal to `1_000_000_000 - 1_234`. + /// assert_eq!(time.subsec_nanosecond(), 999998766); + /// // Looking at the other components of the time value might help. + /// assert_eq!(time.hour(), 23); + /// assert_eq!(time.minute(), 59); + /// assert_eq!(time.second(), 59); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn subsec_nanosecond(self) -> i32 { + self.subsec_nanosecond + } + + /// Given a [`Date`], this constructs a [`DateTime`] value with its time + /// component equal to this time. + /// + /// This is a convenience function for [`DateTime::from_parts`]. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::{DateTime, date, time}; + /// + /// let d = date(2010, 3, 14); + /// let t = time(2, 30, 0, 0); + /// assert_eq!(DateTime::from_parts(d, t), t.to_datetime(d)); + /// ``` + #[inline] + pub const fn to_datetime(self, date: Date) -> DateTime { + DateTime::from_parts(date, self) + } + + /// A convenience function for constructing a [`DateTime`] from this time + /// on the date given by its components. + /// + /// # Panics + /// + /// This routine panics when [`Date::new`] with the given inputs would + /// return an error. That is, when the given year-month-day does not + /// correspond to a valid date. Namely, all of the following must be true: + /// + /// * The year must be in the range `-9999..=9999`. + /// * The month must be in the range `1..=12`. + /// * The day must be at least `1` and must be at most the number of days + /// in the corresponding month. So for example, `2024-02-29` is valid but + /// `2023-02-29` is not. + /// + /// Similarly, when used in a const context, invalid parameters will + /// prevent your Rust program from compiling. + /// + /// # Example + /// + /// ``` + /// use jiff::civil::time; + /// + /// assert_eq!( + /// time(2, 30, 0, 0).on(2010, 3, 14).to_string(), + /// "2010-03-14T02:30:00", + /// ); + /// ``` + /// + /// One can also flip the order by making use of [`Date::at`]: + /// + /// ``` + /// use jiff::civil::date; + /// + /// assert_eq!( + /// date(2010, 3, 14).at(2, 30, 0, 0).to_string(), + /// "2010-03-14T02:30:00", + /// ); + /// ``` + #[inline] + pub const fn on(self, year: i16, month: i8, day: i8) -> DateTime { + DateTime::from_parts(Date::constant(year, month, day), self) + } + + /// Add the given span to this time and wrap around on overflow. + /// + /// This operation accepts three different duration types: [`Span`], + /// [`SignedDuration`] or [`std::time::Duration`]. This is achieved via + /// `From` trait implementations for the [`TimeArithmetic`] type. + /// + /// # Properties + /// + /// Given times `t1` and `t2`, and a span `s`, with `t2 = t1 + s`, it + /// follows then that `t1 = t2 - s` for all values of `t1` and `s` that sum + /// to `t2`. + /// + /// In short, subtracting the given span from the sum returned by this + /// function is guaranteed to result in precisely the original time. + /// + /// # Example: available via addition operator + /// + /// This routine can be used via the `+` operator. + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// let t = time(20, 10, 1, 0); + /// assert_eq!( + /// t + 1.hours().minutes(49).seconds(59), + /// time(22, 0, 0, 0), + /// ); + /// ``` + /// + /// # Example: add nanoseconds to a `Time` + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// let t = time(22, 35, 1, 0); + /// assert_eq!( + /// time(22, 35, 3, 500_000_000), + /// t.wrapping_add(2_500_000_000i64.nanoseconds()), + /// ); + /// ``` + /// + /// # Example: add span with multiple units + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// let t = time(20, 10, 1, 0); + /// assert_eq!( + /// time(22, 0, 0, 0), + /// t.wrapping_add(1.hours().minutes(49).seconds(59)), + /// ); + /// ``` + /// + /// # Example: adding an empty span is a no-op + /// + /// ``` + /// use jiff::{civil::time, Span}; + /// + /// let t = time(20, 10, 1, 0); + /// assert_eq!(t, t.wrapping_add(Span::new())); + /// ``` + /// + /// # Example: addition wraps on overflow + /// + /// ``` + /// use jiff::{civil::time, SignedDuration, ToSpan}; + /// + /// let t = time(23, 59, 59, 999_999_999); + /// assert_eq!( + /// t.wrapping_add(1.nanoseconds()), + /// time(0, 0, 0, 0), + /// ); + /// assert_eq!( + /// t.wrapping_add(SignedDuration::from_nanos(1)), + /// time(0, 0, 0, 0), + /// ); + /// assert_eq!( + /// t.wrapping_add(std::time::Duration::from_nanos(1)), + /// time(0, 0, 0, 0), + /// ); + /// ``` + /// + /// Similarly, if there are any non-zero units greater than hours in the + /// given span, then they also result in wrapping behavior (i.e., they are + /// ignored): + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// // doesn't matter what our time value is in this example + /// let t = time(0, 0, 0, 0); + /// assert_eq!(t, t.wrapping_add(1.days())); + /// ``` + #[inline] + pub fn wrapping_add>(self, duration: A) -> Time { + let duration: TimeArithmetic = duration.into(); + duration.wrapping_add(self) + } + + #[inline] + fn wrapping_add_span(self, span: Span) -> Time { + let sum = self + .to_nanosecond() + .wrapping_add( + i64::from(span.get_hours()).wrapping_mul(b::NANOS_PER_HOUR), + ) + .wrapping_add(span.get_minutes().wrapping_mul(b::NANOS_PER_MIN)) + .wrapping_add(span.get_seconds().wrapping_mul(b::NANOS_PER_SEC)) + .wrapping_add( + span.get_milliseconds().wrapping_mul(b::NANOS_PER_MILLI), + ) + .wrapping_add( + span.get_microseconds().wrapping_mul(b::NANOS_PER_MICRO), + ) + .wrapping_add(span.get_nanoseconds()); + let civil_day_nanosecond = sum.rem_euclid(b::NANOS_PER_CIVIL_DAY); + Time::from_nanosecond_unchecked(civil_day_nanosecond) + } + + #[inline] + fn wrapping_add_signed_duration(self, duration: SignedDuration) -> Time { + let start = i128::from(self.to_nanosecond()); + let duration = duration.as_nanos(); + let end = start + .wrapping_add(duration) + .rem_euclid(b::NANOS_PER_CIVIL_DAY as i128) + as i64; + Time::from_nanosecond_unchecked(end) + } + + #[inline] + fn wrapping_add_unsigned_duration( + self, + duration: UnsignedDuration, + ) -> Time { + let start = i128::from(self.to_nanosecond()); + // OK because 96-bit unsigned integer can't overflow i128. + let duration = i128::try_from(duration.as_nanos()).unwrap(); + let end = (start.wrapping_add(duration) + % (b::NANOS_PER_CIVIL_DAY as i128)) as i64; + Time::from_nanosecond_unchecked(end) + } + + /// This routine is identical to [`Time::wrapping_add`] with the duration + /// negated. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::time, SignedDuration, ToSpan}; + /// + /// let t = time(0, 0, 0, 0); + /// assert_eq!( + /// t.wrapping_sub(1.nanoseconds()), + /// time(23, 59, 59, 999_999_999), + /// ); + /// assert_eq!( + /// t.wrapping_sub(SignedDuration::from_nanos(1)), + /// time(23, 59, 59, 999_999_999), + /// ); + /// assert_eq!( + /// t.wrapping_sub(std::time::Duration::from_nanos(1)), + /// time(23, 59, 59, 999_999_999), + /// ); + /// + /// assert_eq!( + /// t.wrapping_sub(SignedDuration::MIN), + /// time(15, 30, 8, 999_999_999), + /// ); + /// assert_eq!( + /// t.wrapping_sub(SignedDuration::MAX), + /// time(8, 29, 52, 1), + /// ); + /// assert_eq!( + /// t.wrapping_sub(std::time::Duration::MAX), + /// time(16, 59, 44, 1), + /// ); + /// ``` + #[inline] + pub fn wrapping_sub>(self, duration: A) -> Time { + let duration: TimeArithmetic = duration.into(); + duration.wrapping_sub(self) + } + + #[inline] + fn wrapping_sub_unsigned_duration( + self, + duration: UnsignedDuration, + ) -> Time { + let start = self.to_nanosecond(); + // OK because 96-bit unsigned integer can't overflow i128. + let duration = i128::try_from(duration.as_nanos()).unwrap(); + let duration = (duration % b::NANOS_PER_CIVIL_DAY as i128) as i64; + let end = + start.wrapping_sub(duration).rem_euclid(b::NANOS_PER_CIVIL_DAY); + Time::from_nanosecond_unchecked(end) + } + + /// Add the given span to this time and return an error if the result would + /// otherwise overflow. + /// + /// This operation accepts three different duration types: [`Span`], + /// [`SignedDuration`] or [`std::time::Duration`]. This is achieved via + /// `From` trait implementations for the [`TimeArithmetic`] type. + /// + /// # Properties + /// + /// Given a time `t1` and a span `s`, and assuming `t2 = t1 + s` exists, it + /// follows then that `t1 = t2 - s` for all values of `t1` and `s` that sum + /// to a valid `t2`. + /// + /// In short, subtracting the given span from the sum returned by this + /// function is guaranteed to result in precisely the original time. + /// + /// # Errors + /// + /// If the sum would overflow the minimum or maximum timestamp values, then + /// an error is returned. + /// + /// If the given span has any non-zero units greater than hours, then an + /// error is returned. + /// + /// # Example: add nanoseconds to a `Time` + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// let t = time(22, 35, 1, 0); + /// assert_eq!( + /// time(22, 35, 3, 500_000_000), + /// t.checked_add(2_500_000_000i64.nanoseconds())?, + /// ); + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: add span with multiple units + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// let t = time(20, 10, 1, 0); + /// assert_eq!( + /// time(22, 0, 0, 0), + /// t.checked_add(1.hours().minutes(49).seconds(59))?, + /// ); + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: adding an empty span is a no-op + /// + /// ``` + /// use jiff::{civil::time, Span}; + /// + /// let t = time(20, 10, 1, 0); + /// assert_eq!(t, t.checked_add(Span::new())?); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: error on overflow + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// // okay + /// let t = time(23, 59, 59, 999_999_998); + /// assert_eq!( + /// t.with().nanosecond(999).build()?, + /// t.checked_add(1.nanoseconds())?, + /// ); + /// + /// // not okay + /// let t = time(23, 59, 59, 999_999_999); + /// assert!(t.checked_add(1.nanoseconds()).is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// Similarly, if there are any non-zero units greater than hours in the + /// given span, then they also result in overflow (and thus an error): + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// // doesn't matter what our time value is in this example + /// let t = time(0, 0, 0, 0); + /// assert!(t.checked_add(1.days()).is_err()); + /// ``` + /// + /// # Example: adding absolute durations + /// + /// This shows how to add signed and unsigned absolute durations to a + /// `Time`. As with adding a `Span`, any overflow that occurs results in + /// an error. + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::time, SignedDuration}; + /// + /// let t = time(23, 0, 0, 0); + /// + /// let dur = SignedDuration::from_mins(30); + /// assert_eq!(t.checked_add(dur)?, time(23, 30, 0, 0)); + /// assert_eq!(t.checked_add(-dur)?, time(22, 30, 0, 0)); + /// + /// let dur = Duration::new(0, 1); + /// assert_eq!(t.checked_add(dur)?, time(23, 0, 0, 1)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn checked_add>( + self, + duration: A, + ) -> Result { + let duration: TimeArithmetic = duration.into(); + duration.checked_add(self) + } + + #[inline] + fn checked_add_span(self, span: &Span) -> Result { + let (time, span) = self.overflowing_add(span)?; + if span.smallest_non_time_non_zero_unit_error().is_some() { + return Err(Error::from(E::OverflowTimeNanoseconds)); + } + Ok(time) + } + + #[inline] + fn checked_add_duration( + self, + duration: SignedDuration, + ) -> Result { + // NOTE: Every approach here just seems so circuitous... + // Checking when we convert to the same primitive representation. + // Checking when we add. + // Checking that the result is in bounds. + // Just seems very wateful and annoying. + let start = self.to_nanosecond(); + let duration = + duration.as_nanos64().ok_or(E::OverflowTimeNanoseconds)?; + let end = + start.checked_add(duration).ok_or(E::OverflowTimeNanoseconds)?; + let end = b::CivilDayNanosecond::check(end)?; + // NOTE: Should this constructor be fallible? I don't think + // so. I think this is the only place we want to check the bounds? + Ok(Time::from_nanosecond_unchecked(end)) + } + + /// This routine is identical to [`Time::checked_add`] with the duration + /// negated. + /// + /// # Errors + /// + /// This has the same error conditions as [`Time::checked_add`]. + /// + /// # Example + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::time, SignedDuration, ToSpan}; + /// + /// let t = time(22, 0, 0, 0); + /// assert_eq!( + /// t.checked_sub(1.hours().minutes(49).seconds(59))?, + /// time(20, 10, 1, 0), + /// ); + /// assert_eq!( + /// t.checked_sub(SignedDuration::from_hours(1))?, + /// time(21, 0, 0, 0), + /// ); + /// assert_eq!( + /// t.checked_sub(Duration::from_secs(60 * 60))?, + /// time(21, 0, 0, 0), + /// ); + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn checked_sub>( + self, + duration: A, + ) -> Result { + let duration: TimeArithmetic = duration.into(); + duration.checked_neg().and_then(|ta| ta.checked_add(self)) + } + + /// This routine is identical to [`Time::checked_add`], except the + /// result saturates on overflow. That is, instead of overflow, either + /// [`Time::MIN`] or [`Time::MAX`] is returned. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::{Time, time}, SignedDuration, ToSpan}; + /// + /// // no saturation + /// let t = time(23, 59, 59, 999_999_998); + /// assert_eq!( + /// t.with().nanosecond(999).build()?, + /// t.saturating_add(1.nanoseconds()), + /// ); + /// + /// // saturates + /// let t = time(23, 59, 59, 999_999_999); + /// assert_eq!(Time::MAX, t.saturating_add(1.nanoseconds())); + /// assert_eq!(Time::MAX, t.saturating_add(SignedDuration::MAX)); + /// assert_eq!(Time::MIN, t.saturating_add(SignedDuration::MIN)); + /// assert_eq!(Time::MAX, t.saturating_add(std::time::Duration::MAX)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// Similarly, if there are any non-zero units greater than hours in the + /// given span, then they also result in overflow (and thus saturation): + /// + /// ``` + /// use jiff::{civil::{Time, time}, ToSpan}; + /// + /// // doesn't matter what our time value is in this example + /// let t = time(0, 0, 0, 0); + /// assert_eq!(Time::MAX, t.saturating_add(1.days())); + /// ``` + #[inline] + pub fn saturating_add>(self, duration: A) -> Time { + let duration: TimeArithmetic = duration.into(); + self.checked_add(duration).unwrap_or_else(|_| { + if duration.is_negative() { + Time::MIN + } else { + Time::MAX + } + }) + } + + /// This routine is identical to [`Time::saturating_add`] with the duration + /// negated. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::{Time, time}, SignedDuration, ToSpan}; + /// + /// // no saturation + /// //let t = time(0, 0, 0, 1); + /// //assert_eq!( + /// // t.with().nanosecond(0).build()?, + /// // t.saturating_sub(1.nanoseconds()), + /// //); + /// + /// // saturates + /// let t = time(0, 0, 0, 0); + /// assert_eq!(Time::MIN, t.saturating_sub(1.nanoseconds())); + /// //assert_eq!(Time::MIN, t.saturating_sub(SignedDuration::MAX)); + /// //assert_eq!(Time::MAX, t.saturating_sub(SignedDuration::MIN)); + /// //assert_eq!(Time::MIN, t.saturating_sub(std::time::Duration::MAX)); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn saturating_sub>(self, duration: A) -> Time { + let duration: TimeArithmetic = duration.into(); + let Ok(duration) = duration.checked_neg() else { return Time::MIN }; + self.saturating_add(duration) + } + + /// Adds the given span to the this time value, and returns the resulting + /// time with any overflowing amount in the span returned. + /// + /// This isn't part of the public API because it seems a little odd, and + /// I'm unsure of its use case. Overall this routine is a bit specialized + /// and I'm not sure how generally useful it is. But it is used in crucial + /// points in other parts of this crate. + /// + /// If you want this public, please file an issue and discuss your use + /// case: https://github.com/BurntSushi/jiff/issues/new + #[inline] + pub(crate) fn overflowing_add( + self, + span: &Span, + ) -> Result<(Time, Span), Error> { + if let Some(err) = span.smallest_non_time_non_zero_unit_error() { + return Err(err); + } + + let span = span.to_invariant_duration().as_nanos(); + let time = i128::from(self.to_nanosecond()); + let sum = span + time; + let days = sum.div_euclid(i128::from(b::NANOS_PER_CIVIL_DAY)) as i64; + let rem = sum.rem_euclid(i128::from(b::NANOS_PER_CIVIL_DAY)) as i64; + let span = Span::new().try_days(days)?; + Ok((Time::from_nanosecond_unchecked(rem), span)) + } + + /// Like `overflowing_add`, but with `SignedDuration`. + /// + /// This is used for datetime arithmetic, when adding to the time + /// component overflows into days (always 24 hours). + #[inline] + pub(crate) fn overflowing_add_duration( + self, + duration: SignedDuration, + ) -> Result<(Time, SignedDuration), Error> { + if self.subsec_nanosecond() != 0 || duration.subsec_nanos() != 0 { + return self.overflowing_add_duration_general(duration); + } + let start = i64::from(self.to_second()); + let duration_secs = duration.as_secs(); + // This can fail if the duration is near its min or max values, and + // thus we fall back to the more general (but slower) implementation + // that uses 128-bit integers. + let Some(sum) = start.checked_add(duration_secs) else { + return self.overflowing_add_duration_general(duration); + }; + let days = b::SpanDays::check(sum.div_euclid(b::SECS_PER_CIVIL_DAY))?; + + let rem = sum.rem_euclid(b::SECS_PER_CIVIL_DAY) as i32; + let time = Time::from_second_unchecked(rem); + Ok((time, SignedDuration::from_civil_days32(days))) + } + + /// Like `overflowing_add`, but with `SignedDuration`. + /// + /// This is used for datetime arithmetic, when adding to the time + /// component overflows into days (always 24 hours). + #[inline(never)] + #[cold] + fn overflowing_add_duration_general( + self, + duration: SignedDuration, + ) -> Result<(Time, SignedDuration), Error> { + let start = i128::from(self.to_nanosecond()); + let duration = duration.as_nanos(); + // This can never fail because the maximum duration fits into a + // 96-bit integer, and adding any 96-bit integer to any 64-bit + // integer can never overflow a 128-bit integer. + let sum = start + duration; + let days = b::SpanDays::check128( + sum.div_euclid(i128::from(b::NANOS_PER_CIVIL_DAY)), + )?; + let rem = sum.rem_euclid(i128::from(b::NANOS_PER_CIVIL_DAY)) as i64; + let time = Time::from_nanosecond_unchecked(rem); + Ok((time, SignedDuration::from_civil_days32(days))) + } + + /// Returns a span representing the elapsed time from this time until + /// the given `other` time. + /// + /// When `other` is earlier than this time, the span returned will be + /// negative. + /// + /// Depending on the input provided, the span returned is rounded. It may + /// also be balanced down to smaller units than the default. By default, + /// the span returned is balanced such that the biggest possible unit is + /// hours. + /// + /// This operation is configured by providing a [`TimeDifference`] + /// value. Since this routine accepts anything that implements + /// `Into`, once can pass a `Time` directly. One + /// can also pass a `(Unit, Time)`, where `Unit` is treated as + /// [`TimeDifference::largest`]. + /// + /// # Properties + /// + /// As long as no rounding is requested, it is guaranteed that adding the + /// span returned to the `other` time will always equal this time. + /// + /// # Errors + /// + /// An error can occur if `TimeDifference` is misconfigured. For example, + /// if the smallest unit provided is bigger than the largest unit, or if + /// the largest unit is bigger than [`Unit::Hour`]. + /// + /// It is guaranteed that if one provides a time with the default + /// [`TimeDifference`] configuration, then this routine will never fail. + /// + /// # Examples + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// let t1 = time(22, 35, 1, 0); + /// let t2 = time(22, 35, 3, 500_000_000); + /// assert_eq!(t1.until(t2)?, 2.seconds().milliseconds(500).fieldwise()); + /// // Flipping the dates is fine, but you'll get a negative span. + /// assert_eq!(t2.until(t1)?, -2.seconds().milliseconds(500).fieldwise()); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: using smaller units + /// + /// This example shows how to contract the span returned to smaller units. + /// This makes use of a `From<(Unit, Time)> for TimeDifference` + /// trait implementation. + /// + /// ``` + /// use jiff::{civil::time, Unit, ToSpan}; + /// + /// let t1 = time(3, 24, 30, 3500); + /// let t2 = time(15, 30, 0, 0); + /// + /// // The default limits spans to using "hours" as the biggest unit. + /// let span = t1.until(t2)?; + /// assert_eq!(span.to_string(), "PT12H5M29.9999965S"); + /// + /// // But we can ask for smaller units, like capping the biggest unit + /// // to minutes instead of hours. + /// let span = t1.until((Unit::Minute, t2))?; + /// assert_eq!(span.to_string(), "PT725M29.9999965S"); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn until>( + self, + other: A, + ) -> Result { + let args: TimeDifference = other.into(); + let span = args.until_with_largest_unit(self)?; + if args.rounding_may_change_span() { + span.round(args.round) + } else { + Ok(span) + } + } + + /// This routine is identical to [`Time::until`], but the order of the + /// parameters is flipped. + /// + /// # Errors + /// + /// This has the same error conditions as [`Time::until`]. + /// + /// # Example + /// + /// This routine can be used via the `-` operator. Since the default + /// configuration is used and because a `Span` can represent the difference + /// between any two possible times, it will never panic. + /// + /// ``` + /// use jiff::{civil::time, ToSpan}; + /// + /// let earlier = time(1, 0, 0, 0); + /// let later = time(22, 30, 0, 0); + /// assert_eq!(later - earlier, 21.hours().minutes(30).fieldwise()); + /// ``` + #[inline] + pub fn since>( + self, + other: A, + ) -> Result { + let args: TimeDifference = other.into(); + let span = -args.until_with_largest_unit(self)?; + if args.rounding_may_change_span() { + span.round(args.round) + } else { + Ok(span) + } + } + + /// Returns an absolute duration representing the elapsed time from this + /// time until the given `other` time. + /// + /// When `other` occurs before this time, then the duration returned will + /// be negative. + /// + /// Unlike [`Time::until`], this returns a duration corresponding to a + /// 96-bit integer of nanoseconds between two times. In this case of + /// computing durations between civil times where all days are assumed to + /// be 24 hours long, the duration returned will always be less than 24 + /// hours. + /// + /// # Fallibility + /// + /// This routine never panics or returns an error. Since there are no + /// configuration options that can be incorrectly provided, no error is + /// possible when calling this routine. In contrast, [`Time::until`] can + /// return an error in some cases due to misconfiguration. But like this + /// routine, [`Time::until`] never panics or returns an error in its + /// default configuration. + /// + /// # When should I use this versus [`Time::until`]? + /// + /// See the type documentation for [`SignedDuration`] for the section on + /// when one should use [`Span`] and when one should use `SignedDuration`. + /// In short, use `Span` (and therefore `Time::until`) unless you have a + /// specific reason to do otherwise. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::time, SignedDuration}; + /// + /// let t1 = time(22, 35, 1, 0); + /// let t2 = time(22, 35, 3, 500_000_000); + /// assert_eq!(t1.duration_until(t2), SignedDuration::new(2, 500_000_000)); + /// // Flipping the time is fine, but you'll get a negative duration. + /// assert_eq!(t2.duration_until(t1), -SignedDuration::new(2, 500_000_000)); + /// ``` + /// + /// # Example: difference with [`Time::until`] + /// + /// Since the difference between two civil times is always expressed in + /// units of hours or smaller, and units of hours or smaller are always + /// uniform, there is no "expressive" difference between this routine and + /// `Time::until`. The only difference is that this routine returns a + /// `SignedDuration` and `Time::until` returns a [`Span`]. Moreover, since + /// the difference is always less than 24 hours, the return values can + /// always be infallibly and losslessly converted between each other: + /// + /// ``` + /// use jiff::{civil::time, SignedDuration, Span}; + /// + /// let t1 = time(22, 35, 1, 0); + /// let t2 = time(22, 35, 3, 500_000_000); + /// let dur = t1.duration_until(t2); + /// // Guaranteed to never fail because the duration + /// // between two civil times never exceeds the limits + /// // of a `Span`. + /// let span = Span::try_from(dur).unwrap(); + /// assert_eq!(span, Span::new().seconds(2).milliseconds(500).fieldwise()); + /// // Guaranteed to succeed and always return the original + /// // duration because the units are always hours or smaller, + /// // and thus uniform. This means a relative datetime is + /// // never required to do this conversion. + /// let dur = SignedDuration::try_from(span).unwrap(); + /// assert_eq!(dur, SignedDuration::new(2, 500_000_000)); + /// ``` + /// + /// This conversion guarantee also applies to [`Time::until`] since it + /// always returns a balanced span. That is, it never returns spans like + /// `1 second 1000 milliseconds`. (Those cannot be losslessly converted to + /// a `SignedDuration` since a `SignedDuration` is only represented as a + /// single 96-bit integer of nanoseconds.) + /// + /// # Example: getting an unsigned duration + /// + /// If you're looking to find the duration between two times as a + /// [`std::time::Duration`], you'll need to use this method to get a + /// [`SignedDuration`] and then convert it to a `std::time::Duration`: + /// + /// ``` + /// use std::time::Duration; + /// + /// use jiff::{civil::time, SignedDuration, Span}; + /// + /// let t1 = time(22, 35, 1, 0); + /// let t2 = time(22, 35, 3, 500_000_000); + /// let dur = Duration::try_from(t1.duration_until(t2))?;; + /// assert_eq!(dur, Duration::new(2, 500_000_000)); + /// + /// // Note that unsigned durations cannot represent all + /// // possible differences! If the duration would be negative, + /// // then the conversion fails: + /// assert!(Duration::try_from(t2.duration_until(t1)).is_err()); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn duration_until(self, other: Time) -> SignedDuration { + SignedDuration::time_until(self, other) + } + + /// This routine is identical to [`Time::duration_until`], but the order of + /// the parameters is flipped. + /// + /// # Example + /// + /// ``` + /// use jiff::{civil::time, SignedDuration}; + /// + /// let earlier = time(1, 0, 0, 0); + /// let later = time(22, 30, 0, 0); + /// assert_eq!( + /// later.duration_since(earlier), + /// SignedDuration::from_secs((21 * 60 * 60) + (30 * 60)), + /// ); + /// ``` + #[inline] + pub fn duration_since(self, other: Time) -> SignedDuration { + SignedDuration::time_until(other, self) + } + + /// Rounds this time according to the [`TimeRound`] configuration given. + /// + /// The principal option is [`TimeRound::smallest`], which allows one + /// to configure the smallest units in the returned time. Rounding + /// is what determines whether that unit should keep its current value + /// or whether it should be incremented. Moreover, the amount it should + /// be incremented can be configured via [`TimeRound::increment`]. + /// Finally, the rounding strategy itself can be configured via + /// [`TimeRound::mode`]. + /// + /// Note that this routine is generic and accepts anything that + /// implements `Into`. Some notable implementations are: + /// + /// * `From for Round`, which will automatically create a + /// `TimeRound::new().smallest(unit)` from the unit provided. + /// * `From<(Unit, i64)> for Round`, which will automatically create a + /// `TimeRound::new().smallest(unit).increment(number)` from the unit + /// and increment provided. + /// + /// # Errors + /// + /// This returns an error if the smallest unit configured on the given + /// [`TimeRound`] is bigger than hours. + /// + /// The rounding increment must divide evenly into the next highest unit + /// after the smallest unit configured (and must not be equivalent to it). + /// For example, if the smallest unit is [`Unit::Nanosecond`], then *some* + /// of the valid values for the rounding increment are `1`, `2`, `4`, `5`, + /// `100` and `500`. Namely, any integer that divides evenly into `1,000` + /// nanoseconds since there are `1,000` nanoseconds in the next highest + /// unit (microseconds). + /// + /// This can never fail because of overflow for any input. The only + /// possible errors are "configuration" errors. + /// + /// # Example + /// + /// This is a basic example that demonstrates rounding a datetime to the + /// nearest second. This also demonstrates calling this method with the + /// smallest unit directly, instead of constructing a `TimeRound` manually. + /// + /// ``` + /// use jiff::{civil::time, Unit}; + /// + /// let t = time(15, 45, 10, 123_456_789); + /// assert_eq!( + /// t.round(Unit::Second)?, + /// time(15, 45, 10, 0), + /// ); + /// let t = time(15, 45, 10, 500_000_001); + /// assert_eq!( + /// t.round(Unit::Second)?, + /// time(15, 45, 11, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: changing the rounding mode + /// + /// The default rounding mode is [`RoundMode::HalfExpand`], which + /// breaks ties by rounding away from zero. But other modes like + /// [`RoundMode::Trunc`] can be used too: + /// + /// ``` + /// use jiff::{civil::{TimeRound, time}, RoundMode, Unit}; + /// + /// let t = time(15, 45, 10, 999_999_999); + /// assert_eq!( + /// t.round(Unit::Second)?, + /// time(15, 45, 11, 0), + /// ); + /// // The default will round up to the next second for any fraction + /// // greater than or equal to 0.5. But truncation will always round + /// // toward zero. + /// assert_eq!( + /// t.round( + /// TimeRound::new().smallest(Unit::Second).mode(RoundMode::Trunc), + /// )?, + /// time(15, 45, 10, 0), + /// ); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: rounding to the nearest 5 minute increment + /// + /// ``` + /// use jiff::{civil::time, Unit}; + /// + /// // rounds down + /// let t = time(15, 27, 29, 999_999_999); + /// assert_eq!(t.round((Unit::Minute, 5))?, time(15, 25, 0, 0)); + /// // rounds up + /// let t = time(15, 27, 30, 0); + /// assert_eq!(t.round((Unit::Minute, 5))?, time(15, 30, 0, 0)); + /// + /// # Ok::<(), Box>(()) + /// ``` + /// + /// # Example: rounding wraps around on overflow + /// + /// This example demonstrates that it's possible for this operation to + /// overflow, and as a result, have the time wrap around. + /// + /// ``` + /// use jiff::{civil::Time, Unit}; + /// + /// let t = Time::MAX; + /// assert_eq!(t.round(Unit::Hour)?, Time::MIN); + /// + /// # Ok::<(), Box>(()) + /// ``` + #[inline] + pub fn round>(self, options: R) -> Result { + let options: TimeRound = options.into(); + options.round(self) + } + + /// Return an iterator of periodic times determined by the given span. + /// + /// The given span may be negative, in which case, the iterator will move + /// backwards through time. The iterator won't stop until either the span + /// itself overflows, or it would otherwise exceed the minimum or maximum + /// `Time` value. + /// + /// # Example: visiting every third hour + /// + /// This shows how to visit each third hour of a 24 hour time interval: + /// + /// ``` + /// use jiff::{civil::{Time, time}, ToSpan}; + /// + /// let start = Time::MIN; + /// let mut every_third_hour = vec![]; + /// for t in start.series(3.hours()) { + /// every_third_hour.push(t); + /// } + /// assert_eq!(every_third_hour, vec![ + /// time(0, 0, 0, 0), + /// time(3, 0, 0, 0), + /// time(6, 0, 0, 0), + /// time(9, 0, 0, 0), + /// time(12, 0, 0, 0), + /// time(15, 0, 0, 0), + /// time(18, 0, 0, 0), + /// time(21, 0, 0, 0), + /// ]); + /// ``` + /// + /// Or go backwards every 6.5 hours: + /// + /// ``` + /// use jiff::{civil::{Time, time}, ToSpan}; + /// + /// let start = time(23, 0, 0, 0); + /// let times: Vec() as SocketAddrLen; + f(ptr, len) +} + +// SAFETY: This just forwards to the inner `SocketAddrArg` implementations. +unsafe impl SocketAddrArg for SocketAddr { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + match self { + Self::V4(v4) => v4.with_sockaddr(f), + Self::V6(v6) => v6.with_sockaddr(f), + } + } +} + +// SAFETY: `with_sockaddr` calls `f` using `call_with_sockaddr`, which handles +// calling `f` with the needed preconditions. +unsafe impl SocketAddrArg for SocketAddrV4 { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + call_with_sockaddr(&encode_sockaddr_v4(self), f) + } +} + +// SAFETY: `with_sockaddr` calls `f` using `call_with_sockaddr`, which handles +// calling `f` with the needed preconditions. +unsafe impl SocketAddrArg for SocketAddrV6 { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + call_with_sockaddr(&encode_sockaddr_v6(self), f) + } +} + +#[cfg(unix)] +// SAFETY: `with_sockaddr` calls `f` using `call_with_sockaddr`, which handles +// calling `f` with the needed preconditions. +unsafe impl SocketAddrArg for SocketAddrUnix { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + f(as_ptr(&self.unix).cast(), self.addr_len()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::backend::c; + + #[test] + fn test_layouts() { + assert_eq_size!(SocketAddrLen, c::socklen_t); + + #[cfg(not(any(windows, target_os = "redox")))] + assert_eq!( + memoffset::span_of!(c::msghdr, msg_namelen).len(), + size_of::() + ); + + assert!(size_of::() <= size_of::()); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..e556090533ec233d8a3cefc62b60e0185d31a509 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/mod.rs @@ -0,0 +1,35 @@ +//! Network-related operations. +//! +//! On Windows, one must call [`wsa_startup`] in the process before calling any +//! of these APIs. [`wsa_cleanup`] may be used in the process if these APIs are +//! no longer needed. +//! +//! [`wsa_startup`]: https://docs.rs/rustix/*/x86_64-pc-windows-msvc/rustix/net/fn.wsa_startup.html +//! [`wsa_cleanup`]: https://docs.rs/rustix/*/x86_64-pc-windows-msvc/rustix/net/fn.wsa_cleanup.html + +pub mod addr; +mod send_recv; +mod socket; +mod socket_addr_any; +#[cfg(not(any(windows, target_os = "wasi")))] +mod socketpair; +mod types; +#[cfg(windows)] +mod wsa; + +#[cfg(linux_kernel)] +pub mod netdevice; +pub mod sockopt; + +pub use crate::maybe_polyfill::net::{ + IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, +}; +pub use send_recv::*; +pub use socket::*; +pub use socket_addr_any::SocketAddrAny; +pub(crate) use socket_addr_any::SocketAddrBuf; +#[cfg(not(any(windows, target_os = "wasi")))] +pub use socketpair::socketpair; +pub use types::*; +#[cfg(windows)] +pub use wsa::{wsa_cleanup, wsa_startup}; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/netdevice.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/netdevice.rs new file mode 100644 index 0000000000000000000000000000000000000000..54872f52aa3027d6898363720d299cff2f0c0edb --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/netdevice.rs @@ -0,0 +1,206 @@ +//! Low-level Linux network device access +//! +//! The methods in this module take a socket's file descriptor to communicate +//! with the kernel in their ioctl call: +//! - glibc uses an `AF_UNIX`, `AF_INET`, or `AF_INET6` socket. The address +//! family itself does not matter and glibc tries the next address family if +//! socket creation with one fails. +//! - Android (bionic) uses an `AF_INET` socket. +//! - Both create the socket with `SOCK_DGRAM|SOCK_CLOEXEC` type/flag. +//! - The [manual pages] specify that the ioctl calls “can be used on any +//! socket's file descriptor regardless of the family or type”. +//! +//! # References +//! - [Linux] +//! +//! [manual pages]: https://man7.org/linux/man-pages/man7/netdevice.7.html +//! [Linux]: https://man7.org/linux/man-pages/man7/netdevice.7.html + +use crate::fd::AsFd; +use crate::io; +#[cfg(feature = "alloc")] +use alloc::{borrow::ToOwned, string::String}; + +/// `ioctl(fd, SIOCGIFINDEX, ifreq)`—Returns the interface index for a given +/// name. +/// +/// See the [module-level documentation] for information about `fd` usage. +/// +/// # References +/// - [Linux] +/// +/// [module-level documentation]: self +/// [Linux]: https://man7.org/linux/man-pages/man7/netdevice.7.html +#[inline] +#[doc(alias = "SIOCGIFINDEX")] +pub fn name_to_index(fd: Fd, if_name: &str) -> io::Result { + crate::backend::net::netdevice::name_to_index(fd.as_fd(), if_name) +} + +/// `ioctl(fd, SIOCGIFNAME, ifreq)`—Returns the interface name for a given +/// index. +/// +/// See the [module-level documentation] for information about `fd` usage. +/// +/// See also [`index_to_name_inlined`] which does not require `alloc` feature. +/// +/// # References +/// - [Linux] +/// +/// [module-level documentation]: self +/// [Linux]: https://man7.org/linux/man-pages/man7/netdevice.7.html +#[inline] +#[doc(alias = "SIOCGIFNAME")] +#[cfg(feature = "alloc")] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +pub fn index_to_name(fd: Fd, index: u32) -> io::Result { + let (len, ifrn_name) = crate::backend::net::netdevice::index_to_name(fd.as_fd(), index)?; + + core::str::from_utf8(&ifrn_name[..len]) + .map_err(|_| io::Errno::ILSEQ) + .map(ToOwned::to_owned) +} + +/// `ioctl(fd, SIOCGIFNAME, ifreq)`—Returns the interface name for a given +/// index. +/// +/// See the [module-level documentation] for information about `fd` usage. +/// +/// # References +/// - [Linux] +/// +/// [module-level documentation]: self +/// [Linux]: https://man7.org/linux/man-pages/man7/netdevice.7.html +#[inline] +#[doc(alias = "SIOCGIFNAME")] +pub fn index_to_name_inlined(fd: Fd, index: u32) -> io::Result { + let (len, ifrn_name) = crate::backend::net::netdevice::index_to_name(fd.as_fd(), index)?; + + // Check if the name is valid UTF-8. + core::str::from_utf8(&ifrn_name[..len]) + .map_err(|_| io::Errno::ILSEQ) + .map(|_| InlinedName { + len, + name: ifrn_name, + }) +} + +/// The inlined interface name. +#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)] +pub struct InlinedName { + len: usize, + name: [u8; 16], +} + +impl InlinedName { + /// Returns the str representation of the inlined name. + pub fn as_str(&self) -> &str { + self.as_ref() + } + + /// Returns the bytes representation of the inlined name. + pub fn as_bytes(&self) -> &[u8] { + self.as_ref() + } +} + +impl AsRef<[u8]> for InlinedName { + fn as_ref(&self) -> &[u8] { + &self.name[..self.len] + } +} + +impl AsRef for InlinedName { + fn as_ref(&self) -> &str { + // SAFETY: `InlinedName` is constructed with valid UTF-8. + core::str::from_utf8(&self.name[..self.len]).unwrap() + } +} + +impl core::borrow::Borrow for InlinedName { + fn borrow(&self) -> &str { + self.as_ref() + } +} + +impl core::fmt::Display for InlinedName { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + self.as_str().fmt(f) + } +} + +#[cfg(test)] +mod tests { + use super::{index_to_name, index_to_name_inlined, name_to_index}; + use crate::fd::AsFd; + use crate::net::{AddressFamily, SocketFlags, SocketType}; + + #[test] + fn test_name_to_index() { + let fd = crate::net::socket_with( + AddressFamily::INET, + SocketType::DGRAM, + SocketFlags::CLOEXEC, + None, + ) + .unwrap(); + + let loopback_index = std::fs::read_to_string("/sys/class/net/lo/ifindex") + .unwrap() + .as_str() + .split_at(1) + .0 + .parse::() + .unwrap(); + assert_eq!(Ok(loopback_index), name_to_index(fd.as_fd(), "lo")); + } + + #[test] + fn test_index_to_name_inlined() { + let fd = crate::net::socket_with( + AddressFamily::INET, + SocketType::DGRAM, + SocketFlags::CLOEXEC, + None, + ) + .unwrap(); + + let loopback_index = std::fs::read_to_string("/sys/class/net/lo/ifindex") + .unwrap() + .as_str() + .split_at(1) + .0 + .parse::() + .unwrap(); + assert_eq!( + "lo", + index_to_name_inlined(fd.as_fd(), loopback_index) + .unwrap() + .as_str(), + ); + } + + #[test] + #[cfg(feature = "alloc")] + fn test_index_to_name() { + let fd = crate::net::socket_with( + AddressFamily::INET, + SocketType::DGRAM, + SocketFlags::CLOEXEC, + None, + ) + .unwrap(); + + let loopback_index = std::fs::read_to_string("/sys/class/net/lo/ifindex") + .unwrap() + .as_str() + .split_at(1) + .0 + .parse::() + .unwrap(); + assert_eq!( + Ok("lo".to_owned()), + index_to_name(fd.as_fd(), loopback_index) + ); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/send_recv/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/send_recv/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..a7056cb3e9539ba01935c36a20377ead906cd9e4 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/send_recv/mod.rs @@ -0,0 +1,190 @@ +//! `recv`, `send`, and variants. + +#![allow(unsafe_code)] + +use crate::buffer::Buffer; +use crate::net::addr::SocketAddrArg; +use crate::net::SocketAddrAny; +use crate::{backend, io}; +use backend::fd::AsFd; +use core::cmp::min; + +pub use backend::net::send_recv::{RecvFlags, ReturnFlags, SendFlags}; + +#[cfg(not(any( + windows, + target_os = "espidf", + target_os = "horizon", + target_os = "vita" +)))] +mod msg; + +#[cfg(not(any( + windows, + target_os = "espidf", + target_os = "horizon", + target_os = "vita" +)))] +pub use msg::*; + +/// `recv(fd, buf, flags)`—Reads data from a socket. +/// +/// In addition to the `Buffer::Output` return value, this also returns the +/// number of bytes received before any truncation due to the +/// [`RecvFlags::TRUNC`] flag. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#sendrecv +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/recv.html +/// [Linux]: https://man7.org/linux/man-pages/man2/recv.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/recv.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-recv +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=recv&sektion=2 +/// [NetBSD]: https://man.netbsd.org/recv.2 +/// [OpenBSD]: https://man.openbsd.org/recv.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=recv§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/recv +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Receiving-Data.html +#[inline] +#[allow(clippy::type_complexity)] +pub fn recv>( + fd: Fd, + mut buf: Buf, + flags: RecvFlags, +) -> io::Result<(Buf::Output, usize)> { + let (ptr, len) = buf.parts_mut(); + // SAFETY: `recv` behaves. + let recv_len = unsafe { backend::net::syscalls::recv(fd.as_fd(), (ptr, len), flags)? }; + // If the `TRUNC` flag is set, the returned `length` may be longer than the + // buffer length. + let min_len = min(len, recv_len); + // SAFETY: `recv` behaves. + unsafe { Ok((buf.assume_init(min_len), recv_len)) } +} + +/// `send(fd, buf, flags)`—Writes data to a socket. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#sendrecv +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/send.html +/// [Linux]: https://man7.org/linux/man-pages/man2/send.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/send.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-send +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=send&sektion=2 +/// [NetBSD]: https://man.netbsd.org/send.2 +/// [OpenBSD]: https://man.openbsd.org/send.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=send§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/send +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Sending-Data.html +#[inline] +pub fn send(fd: Fd, buf: &[u8], flags: SendFlags) -> io::Result { + backend::net::syscalls::send(fd.as_fd(), buf, flags) +} + +/// `recvfrom(fd, buf, flags, addr, len)`—Reads data from a socket and +/// returns the sender address. +/// +/// In addition to the `Buffer::Output` return value, this also returns the +/// number of bytes received before any truncation due to the +/// [`RecvFlags::TRUNC`] flag. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#sendtorecv +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/recvfrom.html +/// [Linux]: https://man7.org/linux/man-pages/man2/recvfrom.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/recvfrom.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-recvfrom +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=recvfrom&sektion=2 +/// [NetBSD]: https://man.netbsd.org/recvfrom.2 +/// [OpenBSD]: https://man.openbsd.org/recvfrom.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=recvfrom§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/recvfrom +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Receiving-Datagrams.html +#[inline] +pub fn recvfrom>( + fd: Fd, + mut buf: Buf, + flags: RecvFlags, +) -> io::Result<(Buf::Output, usize, Option)> { + let (ptr, len) = buf.parts_mut(); + // SAFETY: `recvfrom` behaves. + let (recv_len, addr) = + unsafe { backend::net::syscalls::recvfrom(fd.as_fd(), (ptr, len), flags)? }; + // If the `TRUNC` flag is set, the returned `length` may be longer than the + // buffer length. + let min_len = min(len, recv_len); + // SAFETY: `recvfrom` behaves. + unsafe { Ok((buf.assume_init(min_len), recv_len, addr)) } +} + +/// `sendto(fd, buf, flags, addr)`—Writes data to a socket to a specific IP +/// address. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#sendtorecv +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sendto.html +/// [Linux]: https://man7.org/linux/man-pages/man2/sendto.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/sendto.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-sendto +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=sendto&sektion=2 +/// [NetBSD]: https://man.netbsd.org/sendto.2 +/// [OpenBSD]: https://man.openbsd.org/sendto.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=sendto§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/sendto +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Sending-Datagrams.html +pub fn sendto( + fd: Fd, + buf: &[u8], + flags: SendFlags, + addr: &impl SocketAddrArg, +) -> io::Result { + backend::net::syscalls::sendto(fd.as_fd(), buf, flags, addr) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/send_recv/msg.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/send_recv/msg.rs new file mode 100644 index 0000000000000000000000000000000000000000..234e9933a3568716a226d5206b730354085d1788 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/send_recv/msg.rs @@ -0,0 +1,1026 @@ +//! [`recvmsg`], [`sendmsg`], and related functions. + +#![allow(unsafe_code)] + +#[cfg(target_os = "linux")] +use crate::backend::net::msghdr::noaddr_msghdr; +use crate::backend::{self, c}; +use crate::fd::{AsFd, BorrowedFd, OwnedFd}; +use crate::io::{self, IoSlice, IoSliceMut}; +use crate::net::addr::SocketAddrArg; +#[cfg(linux_kernel)] +use crate::net::UCred; +use core::iter::FusedIterator; +use core::marker::PhantomData; +use core::mem::{align_of, size_of, size_of_val, take, MaybeUninit}; +#[cfg(linux_kernel)] +use core::ptr::addr_of; +use core::{ptr, slice}; + +use super::{RecvFlags, ReturnFlags, SendFlags, SocketAddrAny}; + +/// Macro for defining the amount of space to allocate in a buffer for use with +/// [`RecvAncillaryBuffer::new`] and [`SendAncillaryBuffer::new`]. +/// +/// # Examples +/// +/// Allocate a buffer for a single file descriptor: +/// ``` +/// # use std::mem::MaybeUninit; +/// # use rustix::cmsg_space; +/// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmRights(1))]; +/// # let _: &[MaybeUninit] = space.as_slice(); +/// ``` +/// +/// Allocate a buffer for credentials: +/// ``` +/// # #[cfg(linux_kernel)] +/// # { +/// # use std::mem::MaybeUninit; +/// # use rustix::cmsg_space; +/// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmCredentials(1))]; +/// # let _: &[MaybeUninit] = space.as_slice(); +/// # } +/// ``` +/// +/// Allocate a buffer for two file descriptors and credentials: +/// ``` +/// # #[cfg(linux_kernel)] +/// # { +/// # use std::mem::MaybeUninit; +/// # use rustix::cmsg_space; +/// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmRights(2), ScmCredentials(1))]; +/// # let _: &[MaybeUninit] = space.as_slice(); +/// # } +/// ``` +#[macro_export] +macro_rules! cmsg_space { + // Base Rules + (ScmRights($len:expr)) => { + $crate::net::__cmsg_space( + $len * ::core::mem::size_of::<$crate::fd::BorrowedFd<'static>>(), + ) + }; + (ScmCredentials($len:expr)) => { + $crate::net::__cmsg_space( + $len * ::core::mem::size_of::<$crate::net::UCred>(), + ) + }; + (TxTime($len:expr)) => { + $crate::net::__cmsg_space( + $len * ::core::mem::size_of::<::core::primitive::u64>(), + ) + }; + + // Combo Rules + ($firstid:ident($firstex:expr), $($restid:ident($restex:expr)),*) => {{ + // We only have to add `cmsghdr` alignment once; all other times we can + // use `cmsg_aligned_space`. + let sum = $crate::cmsg_space!($firstid($firstex)); + $( + let sum = sum + $crate::cmsg_aligned_space!($restid($restex)); + )* + sum + }}; +} + +/// Like `cmsg_space`, but doesn't add padding for `cmsghdr` alignment. +#[doc(hidden)] +#[macro_export] +macro_rules! cmsg_aligned_space { + // Base Rules + (ScmRights($len:expr)) => { + $crate::net::__cmsg_aligned_space( + $len * ::core::mem::size_of::<$crate::fd::BorrowedFd<'static>>(), + ) + }; + (ScmCredentials($len:expr)) => { + $crate::net::__cmsg_aligned_space( + $len * ::core::mem::size_of::<$crate::net::UCred>(), + ) + }; + (TxTime($len:expr)) => { + $crate::net::__cmsg_aligned_space( + $len * ::core::mem::size_of::<::core::primitive::u64>(), + ) + }; + + // Combo Rules + ($firstid:ident($firstex:expr), $($restid:ident($restex:expr)),*) => {{ + let sum = $crate::cmsg_aligned_space!($firstid($firstex)); + $( + let sum = sum + $crate::cmsg_aligned_space!($restid($restex)); + )* + sum + }}; +} + +/// Helper function for [`cmsg_space`]. +#[doc(hidden)] +pub const fn __cmsg_space(len: usize) -> usize { + // Add `align_of::()` so that we can align the user-provided + // `&[u8]` to the required alignment boundary. + let len = len + align_of::(); + + __cmsg_aligned_space(len) +} + +/// Helper function for [`cmsg_aligned_space`]. +#[doc(hidden)] +pub const fn __cmsg_aligned_space(len: usize) -> usize { + // Convert `len` to `u32` for `CMSG_SPACE`. This would be `try_into()` if + // we could call that in a `const fn`. + let converted_len = len as u32; + if converted_len as usize != len { + unreachable!(); // `CMSG_SPACE` size overflow + } + + unsafe { c::CMSG_SPACE(converted_len) as usize } +} + +/// Ancillary message for [`sendmsg`] and [`sendmsg_addr`]. +#[non_exhaustive] +pub enum SendAncillaryMessage<'slice, 'fd> { + /// Send file descriptors. + #[doc(alias = "SCM_RIGHTS")] + ScmRights(&'slice [BorrowedFd<'fd>]), + /// Send process credentials. + #[cfg(linux_kernel)] + #[doc(alias = "SCM_CREDENTIAL")] + ScmCredentials(UCred), + /// Transmission time, in nanoseconds. The value will be interpreted by + /// whichever clock was configured on the socket with [`set_txtime`]. + /// + /// [`set_txtime`]: crate::net::sockopt::set_txtime + #[cfg(target_os = "linux")] + #[doc(alias = "SCM_TXTIME")] + TxTime(u64), +} + +impl SendAncillaryMessage<'_, '_> { + /// Get the maximum size of an ancillary message. + /// + /// This can be used to determine the size of the buffer to allocate for a + /// [`SendAncillaryBuffer::new`] with one message. + pub const fn size(&self) -> usize { + match self { + Self::ScmRights(slice) => cmsg_space!(ScmRights(slice.len())), + #[cfg(linux_kernel)] + Self::ScmCredentials(_) => cmsg_space!(ScmCredentials(1)), + #[cfg(target_os = "linux")] + Self::TxTime(_) => cmsg_space!(TxTime(1)), + } + } +} + +/// Ancillary message for [`recvmsg`]. +#[non_exhaustive] +pub enum RecvAncillaryMessage<'a> { + /// Received file descriptors. + #[doc(alias = "SCM_RIGHTS")] + ScmRights(AncillaryIter<'a, OwnedFd>), + /// Received process credentials. + #[cfg(linux_kernel)] + #[doc(alias = "SCM_CREDENTIALS")] + ScmCredentials(UCred), +} + +/// Buffer for sending ancillary messages with [`sendmsg`] and +/// [`sendmsg_addr`]. +/// +/// Use the [`push`] function to add messages to send. +/// +/// [`push`]: SendAncillaryBuffer::push +pub struct SendAncillaryBuffer<'buf, 'slice, 'fd> { + /// Raw byte buffer for messages. + buffer: &'buf mut [MaybeUninit], + + /// The amount of the buffer that is used. + length: usize, + + /// Phantom data for lifetime of `&'slice [BorrowedFd<'fd>]`. + _phantom: PhantomData<&'slice [BorrowedFd<'fd>]>, +} + +impl<'buf> From<&'buf mut [MaybeUninit]> for SendAncillaryBuffer<'buf, '_, '_> { + fn from(buffer: &'buf mut [MaybeUninit]) -> Self { + Self::new(buffer) + } +} + +impl Default for SendAncillaryBuffer<'_, '_, '_> { + fn default() -> Self { + Self { + buffer: &mut [], + length: 0, + _phantom: PhantomData, + } + } +} + +impl<'buf, 'slice, 'fd> SendAncillaryBuffer<'buf, 'slice, 'fd> { + /// Create a new, empty `SendAncillaryBuffer` from a raw byte buffer. + /// + /// The buffer size may be computed with [`cmsg_space`], or it may be + /// zero for an empty buffer, however in that case, consider `default()` + /// instead, or even using [`send`] instead of `sendmsg`. + /// + /// # Examples + /// + /// Allocate a buffer for a single file descriptor: + /// ``` + /// # use std::mem::MaybeUninit; + /// # use rustix::cmsg_space; + /// # use rustix::net::SendAncillaryBuffer; + /// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmRights(1))]; + /// let mut cmsg_buffer = SendAncillaryBuffer::new(&mut space); + /// ``` + /// + /// Allocate a buffer for credentials: + /// ``` + /// # #[cfg(linux_kernel)] + /// # { + /// # use std::mem::MaybeUninit; + /// # use rustix::cmsg_space; + /// # use rustix::net::SendAncillaryBuffer; + /// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmCredentials(1))]; + /// let mut cmsg_buffer = SendAncillaryBuffer::new(&mut space); + /// # } + /// ``` + /// + /// Allocate a buffer for two file descriptors and credentials: + /// ``` + /// # #[cfg(linux_kernel)] + /// # { + /// # use std::mem::MaybeUninit; + /// # use rustix::cmsg_space; + /// # use rustix::net::SendAncillaryBuffer; + /// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmRights(2), ScmCredentials(1))]; + /// let mut cmsg_buffer = SendAncillaryBuffer::new(&mut space); + /// # } + /// ``` + /// + /// [`send`]: crate::net::send + #[inline] + pub fn new(buffer: &'buf mut [MaybeUninit]) -> Self { + Self { + buffer: align_for_cmsghdr(buffer), + length: 0, + _phantom: PhantomData, + } + } + + /// Returns a pointer to the message data. + pub(crate) fn as_control_ptr(&mut self) -> *mut u8 { + // When the length is zero, we may be using a `&[]` address, which may + // be an invalid but non-null pointer, and on some platforms, that + // causes `sendmsg` to fail with `EFAULT` or `EINVAL` + #[cfg(not(linux_kernel))] + if self.length == 0 { + return core::ptr::null_mut(); + } + + self.buffer.as_mut_ptr().cast() + } + + /// Returns the length of the message data. + pub(crate) fn control_len(&self) -> usize { + self.length + } + + /// Delete all messages from the buffer. + pub fn clear(&mut self) { + self.length = 0; + } + + /// Add an ancillary message to the buffer. + /// + /// Returns `true` if the message was added successfully. + pub fn push(&mut self, msg: SendAncillaryMessage<'slice, 'fd>) -> bool { + match msg { + SendAncillaryMessage::ScmRights(fds) => { + let fds_bytes = + unsafe { slice::from_raw_parts(fds.as_ptr().cast::(), size_of_val(fds)) }; + self.push_ancillary(fds_bytes, c::SOL_SOCKET as _, c::SCM_RIGHTS as _) + } + #[cfg(linux_kernel)] + SendAncillaryMessage::ScmCredentials(ucred) => { + let ucred_bytes = unsafe { + slice::from_raw_parts(addr_of!(ucred).cast::(), size_of_val(&ucred)) + }; + self.push_ancillary(ucred_bytes, c::SOL_SOCKET as _, c::SCM_CREDENTIALS as _) + } + #[cfg(target_os = "linux")] + SendAncillaryMessage::TxTime(tx_time) => { + let tx_time_bytes = unsafe { + slice::from_raw_parts(addr_of!(tx_time).cast::(), size_of_val(&tx_time)) + }; + self.push_ancillary(tx_time_bytes, c::SOL_SOCKET as _, c::SO_TXTIME as _) + } + } + } + + /// Pushes an ancillary message to the buffer. + fn push_ancillary(&mut self, source: &[u8], cmsg_level: c::c_int, cmsg_type: c::c_int) -> bool { + macro_rules! leap { + ($e:expr) => {{ + match ($e) { + Some(x) => x, + None => return false, + } + }}; + } + + // Calculate the length of the message. + let source_len = leap!(u32::try_from(source.len()).ok()); + + // Calculate the new length of the buffer. + let additional_space = unsafe { c::CMSG_SPACE(source_len) }; + let new_length = leap!(self.length.checked_add(additional_space as usize)); + let buffer = leap!(self.buffer.get_mut(..new_length)); + + // Fill the new part of the buffer with zeroes. + buffer[self.length..new_length].fill(MaybeUninit::new(0)); + self.length = new_length; + + // Get the last header in the buffer. + let last_header = leap!(messages::Messages::new(buffer).last()); + + // Set the header fields. + last_header.cmsg_len = unsafe { c::CMSG_LEN(source_len) } as _; + last_header.cmsg_level = cmsg_level; + last_header.cmsg_type = cmsg_type; + + // Get the pointer to the payload and copy the data. + unsafe { + let payload = c::CMSG_DATA(last_header); + ptr::copy_nonoverlapping(source.as_ptr(), payload, source_len as usize); + } + + true + } +} + +impl<'slice, 'fd> Extend> + for SendAncillaryBuffer<'_, 'slice, 'fd> +{ + fn extend>>(&mut self, iter: T) { + // TODO: This could be optimized to add every message in one go. + iter.into_iter().all(|msg| self.push(msg)); + } +} + +/// Buffer for receiving ancillary messages with [`recvmsg`]. +/// +/// Use the [`drain`] function to iterate over the received messages. +/// +/// [`drain`]: RecvAncillaryBuffer::drain +#[derive(Default)] +pub struct RecvAncillaryBuffer<'buf> { + /// Raw byte buffer for messages. + buffer: &'buf mut [MaybeUninit], + + /// The portion of the buffer we've read from already. + read: usize, + + /// The amount of the buffer that is used. + length: usize, +} + +impl<'buf> From<&'buf mut [MaybeUninit]> for RecvAncillaryBuffer<'buf> { + fn from(buffer: &'buf mut [MaybeUninit]) -> Self { + Self::new(buffer) + } +} + +impl<'buf> RecvAncillaryBuffer<'buf> { + /// Create a new, empty `RecvAncillaryBuffer` from a raw byte buffer. + /// + /// The buffer size may be computed with [`cmsg_space`], or it may be + /// zero for an empty buffer, however in that case, consider `default()` + /// instead, or even using [`recv`] instead of `recvmsg`. + /// + /// # Examples + /// + /// Allocate a buffer for a single file descriptor: + /// ``` + /// # use std::mem::MaybeUninit; + /// # use rustix::cmsg_space; + /// # use rustix::net::RecvAncillaryBuffer; + /// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmRights(1))]; + /// let mut cmsg_buffer = RecvAncillaryBuffer::new(&mut space); + /// ``` + /// + /// Allocate a buffer for credentials: + /// ``` + /// # #[cfg(linux_kernel)] + /// # { + /// # use std::mem::MaybeUninit; + /// # use rustix::cmsg_space; + /// # use rustix::net::RecvAncillaryBuffer; + /// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmCredentials(1))]; + /// let mut cmsg_buffer = RecvAncillaryBuffer::new(&mut space); + /// # } + /// ``` + /// + /// Allocate a buffer for two file descriptors and credentials: + /// ``` + /// # #[cfg(linux_kernel)] + /// # { + /// # use std::mem::MaybeUninit; + /// # use rustix::cmsg_space; + /// # use rustix::net::RecvAncillaryBuffer; + /// let mut space = [MaybeUninit::uninit(); rustix::cmsg_space!(ScmRights(2), ScmCredentials(1))]; + /// let mut cmsg_buffer = RecvAncillaryBuffer::new(&mut space); + /// # } + /// ``` + /// + /// [`recv`]: crate::net::recv + #[inline] + pub fn new(buffer: &'buf mut [MaybeUninit]) -> Self { + Self { + buffer: align_for_cmsghdr(buffer), + read: 0, + length: 0, + } + } + + /// Returns a pointer to the message data. + pub(crate) fn as_control_ptr(&mut self) -> *mut u8 { + // When the length is zero, we may be using a `&[]` address, which may + // be an invalid but non-null pointer, and on some platforms, that + // causes `sendmsg` to fail with `EFAULT` or `EINVAL` + #[cfg(not(linux_kernel))] + if self.buffer.is_empty() { + return core::ptr::null_mut(); + } + + self.buffer.as_mut_ptr().cast() + } + + /// Returns the length of the message data. + pub(crate) fn control_len(&self) -> usize { + self.buffer.len() + } + + /// Set the length of the message data. + /// + /// # Safety + /// + /// The buffer must be filled with valid message data. + pub(crate) unsafe fn set_control_len(&mut self, len: usize) { + self.length = len; + self.read = 0; + } + + /// Delete all messages from the buffer. + pub(crate) fn clear(&mut self) { + self.drain().for_each(drop); + } + + /// Drain all messages from the buffer. + pub fn drain(&mut self) -> AncillaryDrain<'_> { + AncillaryDrain { + messages: messages::Messages::new(&mut self.buffer[self.read..][..self.length]), + read_and_length: Some((&mut self.read, &mut self.length)), + } + } +} + +impl Drop for RecvAncillaryBuffer<'_> { + fn drop(&mut self) { + self.clear(); + } +} + +/// Return a slice of `buffer` starting at the first `cmsghdr` alignment +/// boundary. +#[inline] +fn align_for_cmsghdr(buffer: &mut [MaybeUninit]) -> &mut [MaybeUninit] { + // If the buffer is empty, we won't be writing anything into it, so it + // doesn't need to be aligned. + if buffer.is_empty() { + return buffer; + } + + let align = align_of::(); + let addr = buffer.as_ptr() as usize; + let adjusted = (addr + (align - 1)) & align.wrapping_neg(); + &mut buffer[adjusted - addr..] +} + +/// An iterator that drains messages from a [`RecvAncillaryBuffer`]. +pub struct AncillaryDrain<'buf> { + /// Inner iterator over messages. + messages: messages::Messages<'buf>, + + /// Increment the number of messages we've read. + /// Decrement the total length. + read_and_length: Option<(&'buf mut usize, &'buf mut usize)>, +} + +impl<'buf> AncillaryDrain<'buf> { + /// Create an iterator for control messages that were received without + /// [`RecvAncillaryBuffer`]. + /// + /// # Safety + /// + /// The buffer must contain valid message data (or be empty). + pub unsafe fn parse(buffer: &'buf mut [u8]) -> Self { + Self { + messages: messages::Messages::new(buffer), + read_and_length: None, + } + } + + fn advance( + read_and_length: &mut Option<(&'buf mut usize, &'buf mut usize)>, + msg: &c::cmsghdr, + ) -> Option> { + // Advance the `read` pointer. + if let Some((read, length)) = read_and_length { + let msg_len = msg.cmsg_len as usize; + **read += msg_len; + **length -= msg_len; + } + + Self::cvt_msg(msg) + } + + /// A closure that converts a message into a [`RecvAncillaryMessage`]. + fn cvt_msg(msg: &c::cmsghdr) -> Option> { + unsafe { + // Get a pointer to the payload. + let payload = c::CMSG_DATA(msg); + let payload_len = msg.cmsg_len as usize - c::CMSG_LEN(0) as usize; + + // Get a mutable slice of the payload. + let payload: &'buf mut [u8] = slice::from_raw_parts_mut(payload, payload_len); + + // Determine what type it is. + let (level, msg_type) = (msg.cmsg_level, msg.cmsg_type); + match (level as _, msg_type as _) { + (c::SOL_SOCKET, c::SCM_RIGHTS) => { + // Create an iterator that reads out the file descriptors. + let fds = AncillaryIter::new(payload); + + Some(RecvAncillaryMessage::ScmRights(fds)) + } + #[cfg(linux_kernel)] + (c::SOL_SOCKET, c::SCM_CREDENTIALS) => { + if payload_len >= size_of::() { + let ucred = payload.as_ptr().cast::().read_unaligned(); + Some(RecvAncillaryMessage::ScmCredentials(ucred)) + } else { + None + } + } + _ => None, + } + } + } +} + +impl<'buf> Iterator for AncillaryDrain<'buf> { + type Item = RecvAncillaryMessage<'buf>; + + fn next(&mut self) -> Option { + self.messages + .find_map(|ev| Self::advance(&mut self.read_and_length, ev)) + } + + fn size_hint(&self) -> (usize, Option) { + let (_, max) = self.messages.size_hint(); + (0, max) + } + + fn fold(mut self, init: B, f: F) -> B + where + Self: Sized, + F: FnMut(B, Self::Item) -> B, + { + self.messages + .filter_map(|ev| Self::advance(&mut self.read_and_length, ev)) + .fold(init, f) + } + + fn count(mut self) -> usize { + self.messages + .filter_map(|ev| Self::advance(&mut self.read_and_length, ev)) + .count() + } + + fn last(mut self) -> Option + where + Self: Sized, + { + self.messages + .filter_map(|ev| Self::advance(&mut self.read_and_length, ev)) + .last() + } + + fn collect>(mut self) -> B + where + Self: Sized, + { + self.messages + .filter_map(|ev| Self::advance(&mut self.read_and_length, ev)) + .collect() + } +} + +impl FusedIterator for AncillaryDrain<'_> {} + +/// An ABI-compatible wrapper for `mmsghdr`, for sending multiple messages with +/// [sendmmsg]. +#[cfg(target_os = "linux")] +#[repr(transparent)] +pub struct MMsgHdr<'a> { + raw: c::mmsghdr, + _phantom: PhantomData<&'a mut ()>, +} + +#[cfg(target_os = "linux")] +impl<'a> MMsgHdr<'a> { + /// Constructs a new message with no destination address. + pub fn new(iov: &'a [IoSlice<'_>], control: &'a mut SendAncillaryBuffer<'_, '_, '_>) -> Self { + Self::wrap(noaddr_msghdr(iov, control)) + } + + /// Constructs a new message to a specific address. + /// + /// This requires a `SocketAddrAny` instead of using `impl SocketAddrArg`; + /// to obtain a `SocketAddrAny`, use [`SocketAddrArg::as_any`]. + pub fn new_with_addr( + addr: &'a SocketAddrAny, + iov: &'a [IoSlice<'_>], + control: &'a mut SendAncillaryBuffer<'_, '_, '_>, + ) -> Self { + // The reason we use `SocketAddrAny` instead of `SocketAddrArg` here, + // and avoid `use_msghdr`, is that we need a pointer that will remain + // valid for the duration of the `'a` lifetime. `SocketAddrAny` can + // give us a pointer directly, so we use that. + let mut msghdr = noaddr_msghdr(iov, control); + msghdr.msg_name = addr.as_ptr() as _; + msghdr.msg_namelen = bitcast!(addr.addr_len()); + + Self::wrap(msghdr) + } + + fn wrap(msg_hdr: c::msghdr) -> Self { + Self { + raw: c::mmsghdr { + msg_hdr, + msg_len: 0, + }, + _phantom: PhantomData, + } + } + + /// Returns the number of bytes sent. This will return 0 until after a + /// successful call to [sendmmsg]. + pub fn bytes_sent(&self) -> usize { + self.raw.msg_len as usize + } +} + +/// `sendmsg(msghdr)`—Sends a message on a socket. +/// +/// This function is for use on connected sockets, as it doesn't have a way to +/// specify an address. See [`sendmsg_addr`] to send messages on unconnected +/// sockets. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sendmsg.html +/// [Linux]: https://man7.org/linux/man-pages/man2/sendmsg.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/sendmsg.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=sendmsg&sektion=2 +/// [NetBSD]: https://man.netbsd.org/sendmsg.2 +/// [OpenBSD]: https://man.openbsd.org/sendmsg.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=sendmsg§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/sendmsg +#[inline] +pub fn sendmsg( + socket: Fd, + iov: &[IoSlice<'_>], + control: &mut SendAncillaryBuffer<'_, '_, '_>, + flags: SendFlags, +) -> io::Result { + backend::net::syscalls::sendmsg(socket.as_fd(), iov, control, flags) +} + +/// `sendmsg(msghdr)`—Sends a message on a socket to a specific address. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sendmsg.html +/// [Linux]: https://man7.org/linux/man-pages/man2/sendmsg.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/sendmsg.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=sendmsg&sektion=2 +/// [NetBSD]: https://man.netbsd.org/sendmsg.2 +/// [OpenBSD]: https://man.openbsd.org/sendmsg.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=sendmsg§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/sendmsg +#[inline] +pub fn sendmsg_addr( + socket: Fd, + addr: &impl SocketAddrArg, + iov: &[IoSlice<'_>], + control: &mut SendAncillaryBuffer<'_, '_, '_>, + flags: SendFlags, +) -> io::Result { + backend::net::syscalls::sendmsg_addr(socket.as_fd(), addr, iov, control, flags) +} + +/// `sendmmsg(msghdr)`—Sends multiple messages on a socket. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/sendmmsg.2.html +#[inline] +#[cfg(target_os = "linux")] +pub fn sendmmsg( + socket: Fd, + msgs: &mut [MMsgHdr<'_>], + flags: SendFlags, +) -> io::Result { + backend::net::syscalls::sendmmsg(socket.as_fd(), msgs, flags) +} + +/// `recvmsg(msghdr)`—Receives a message from a socket. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/recvmsg.html +/// [Linux]: https://man7.org/linux/man-pages/man2/recvmsg.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/recvmsg.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=recvmsg&sektion=2 +/// [NetBSD]: https://man.netbsd.org/recvmsg.2 +/// [OpenBSD]: https://man.openbsd.org/recvmsg.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=recvmsg§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/recvmsg +#[inline] +pub fn recvmsg( + socket: Fd, + iov: &mut [IoSliceMut<'_>], + control: &mut RecvAncillaryBuffer<'_>, + flags: RecvFlags, +) -> io::Result { + backend::net::syscalls::recvmsg(socket.as_fd(), iov, control, flags) +} + +/// The result of a successful [`recvmsg`] call. +#[derive(Debug, Clone)] +pub struct RecvMsg { + /// The number of bytes received. + /// + /// When `RecvFlags::TRUNC` is in use, this may be greater than the length + /// of the buffer, as it reflects the number of bytes received before + /// truncation into the buffer. + pub bytes: usize, + + /// The flags received. + pub flags: ReturnFlags, + + /// The address of the socket we received from, if any. + pub address: Option, +} + +/// An iterator over data in an ancillary buffer. +pub struct AncillaryIter<'data, T> { + /// The data we're iterating over. + data: &'data mut [u8], + + /// The raw data we're removing. + _marker: PhantomData, +} + +impl<'data, T> AncillaryIter<'data, T> { + /// Create a new iterator over data in an ancillary buffer. + /// + /// # Safety + /// + /// The buffer must contain valid ancillary data. + unsafe fn new(data: &'data mut [u8]) -> Self { + assert_eq!(data.len() % size_of::(), 0); + + Self { + data, + _marker: PhantomData, + } + } +} + +impl<'data, T> Drop for AncillaryIter<'data, T> { + fn drop(&mut self) { + self.for_each(drop); + } +} + +impl Iterator for AncillaryIter<'_, T> { + type Item = T; + + fn next(&mut self) -> Option { + // See if there is a next item. + if self.data.len() < size_of::() { + return None; + } + + // Get the next item. + let item = unsafe { self.data.as_ptr().cast::().read_unaligned() }; + + // Move forward. + let data = take(&mut self.data); + self.data = &mut data[size_of::()..]; + + Some(item) + } + + fn size_hint(&self) -> (usize, Option) { + let len = self.len(); + (len, Some(len)) + } + + fn count(self) -> usize { + self.len() + } + + fn last(mut self) -> Option { + self.next_back() + } +} + +impl FusedIterator for AncillaryIter<'_, T> {} + +impl ExactSizeIterator for AncillaryIter<'_, T> { + fn len(&self) -> usize { + self.data.len() / size_of::() + } +} + +impl DoubleEndedIterator for AncillaryIter<'_, T> { + fn next_back(&mut self) -> Option { + // See if there is a next item. + if self.data.len() < size_of::() { + return None; + } + + // Get the next item. + let item = unsafe { + let ptr = self.data.as_ptr().add(self.data.len() - size_of::()); + ptr.cast::().read_unaligned() + }; + + // Move forward. + let len = self.data.len(); + let data = take(&mut self.data); + self.data = &mut data[..len - size_of::()]; + + Some(item) + } +} + +mod messages { + use crate::backend::c; + use crate::backend::net::msghdr; + use core::iter::FusedIterator; + use core::marker::PhantomData; + use core::mem::MaybeUninit; + use core::ptr::NonNull; + + /// An iterator over the messages in an ancillary buffer. + pub(super) struct Messages<'buf> { + /// The message header we're using to iterate over the messages. + msghdr: c::msghdr, + + /// The current pointer to the next message header to return. + /// + /// This has a lifetime of `'buf`. + header: Option>, + + /// Capture the original lifetime of the buffer. + _buffer: PhantomData<&'buf mut [MaybeUninit]>, + } + + pub(super) trait AllowedMsgBufType {} + impl AllowedMsgBufType for u8 {} + impl AllowedMsgBufType for MaybeUninit {} + + impl<'buf> Messages<'buf> { + /// Create a new iterator over messages from a byte buffer. + pub(super) fn new(buf: &'buf mut [impl AllowedMsgBufType]) -> Self { + let mut msghdr = msghdr::zero_msghdr(); + msghdr.msg_control = buf.as_mut_ptr().cast(); + msghdr.msg_controllen = buf.len().try_into().expect("buffer too large for msghdr"); + + // Get the first header. + let header = NonNull::new(unsafe { c::CMSG_FIRSTHDR(&msghdr) }); + + Self { + msghdr, + header, + _buffer: PhantomData, + } + } + } + + impl<'a> Iterator for Messages<'a> { + type Item = &'a mut c::cmsghdr; + + #[inline] + fn next(&mut self) -> Option { + // Get the current header. + let header = self.header?; + + // Get the next header. + self.header = NonNull::new(unsafe { c::CMSG_NXTHDR(&self.msghdr, header.as_ptr()) }); + + // If the headers are equal, we're done. + if Some(header) == self.header { + self.header = None; + } + + // SAFETY: The lifetime of `header` is tied to this. + Some(unsafe { &mut *header.as_ptr() }) + } + + fn size_hint(&self) -> (usize, Option) { + if self.header.is_some() { + // The remaining buffer *could* be filled with zero-length + // messages. + let max_size = unsafe { c::CMSG_LEN(0) } as usize; + let remaining_count = self.msghdr.msg_controllen as usize / max_size; + (1, Some(remaining_count)) + } else { + (0, Some(0)) + } + } + } + + impl FusedIterator for Messages<'_> {} +} + +#[cfg(test)] +mod tests { + #[no_implicit_prelude] + mod hygiene { + #[allow(unused_macros)] + #[test] + fn macro_hygiene() { + // This `u64` is `!Sized`, so `cmsg_space!` will fail if it tries to get its size with + // `size_of()`. + #[allow(dead_code, non_camel_case_types)] + struct u64([u8]); + + // Ensure that when `cmsg*_space!` calls itself recursively, it really calls itself and + // not these macros. + macro_rules! cmsg_space { + ($($tt:tt)*) => {{ + let v: usize = ::core::panic!("Wrong cmsg_space! macro called"); + v + }}; + } + macro_rules! cmsg_aligned_space { + ($($tt:tt)*) => {{ + let v: usize = ::core::panic!("Wrong cmsg_aligned_space! macro called"); + v + }}; + } + + crate::cmsg_space!(ScmRights(1)); + crate::cmsg_space!(TxTime(1)); + #[cfg(linux_kernel)] + { + crate::cmsg_space!(ScmCredentials(1)); + crate::cmsg_space!(ScmRights(1), ScmCredentials(1), TxTime(1)); + crate::cmsg_aligned_space!(ScmRights(1), ScmCredentials(1), TxTime(1)); + } + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socket.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socket.rs new file mode 100644 index 0000000000000000000000000000000000000000..fff302ad9d1d77252b2cd4f6b04509088d249b35 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socket.rs @@ -0,0 +1,461 @@ +use crate::fd::OwnedFd; +use crate::net::addr::SocketAddrArg; +use crate::net::SocketAddrAny; +use crate::{backend, io}; +use backend::fd::AsFd; + +pub use crate::net::{AddressFamily, Protocol, Shutdown, SocketFlags, SocketType}; +#[cfg(unix)] +pub use backend::net::addr::SocketAddrUnix; + +/// `socket(domain, type_, protocol)`—Creates a socket. +/// +/// POSIX guarantees that `socket` will use the lowest unused file descriptor, +/// however it is not safe in general to rely on this, as file descriptors may +/// be unexpectedly allocated on other threads or in libraries. +/// +/// To pass extra flags such as [`SocketFlags::CLOEXEC`] or +/// [`SocketFlags::NONBLOCK`], use [`socket_with`]. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#socket +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/socket.html +/// [Linux]: https://man7.org/linux/man-pages/man2/socket.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/socket.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-socket +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=socket&sektion=2 +/// [NetBSD]: https://man.netbsd.org/socket.2 +/// [OpenBSD]: https://man.openbsd.org/socket.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=socket§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/socket +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Creating-a-Socket.html +#[inline] +pub fn socket( + domain: AddressFamily, + type_: SocketType, + protocol: Option, +) -> io::Result { + backend::net::syscalls::socket(domain, type_, protocol) +} + +/// `socket_with(domain, type_ | flags, protocol)`—Creates a socket, with +/// flags. +/// +/// POSIX guarantees that `socket` will use the lowest unused file descriptor, +/// however it is not safe in general to rely on this, as file descriptors may +/// be unexpectedly allocated on other threads or in libraries. +/// +/// `socket_with` is the same as [`socket`] but adds an additional flags +/// operand. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#socket +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/socket.html +/// [Linux]: https://man7.org/linux/man-pages/man2/socket.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/socket.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-socket +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=socket&sektion=2 +/// [NetBSD]: https://man.netbsd.org/socket.2 +/// [OpenBSD]: https://man.openbsd.org/socket.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=socket§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/socket +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Creating-a-Socket.html +#[doc(alias("socket"))] +#[inline] +pub fn socket_with( + domain: AddressFamily, + type_: SocketType, + flags: SocketFlags, + protocol: Option, +) -> io::Result { + backend::net::syscalls::socket_with(domain, type_, flags, protocol) +} + +/// `bind(sockfd, addr)`—Binds a socket to an IP address. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#bind +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/bind.html +/// [Linux]: https://man7.org/linux/man-pages/man2/bind.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/bind.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-bind +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=bind&sektion=2 +/// [NetBSD]: https://man.netbsd.org/bind.2 +/// [OpenBSD]: https://man.openbsd.org/bind.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=bind§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/bind +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Setting-Address.html +pub fn bind(sockfd: Fd, addr: &impl SocketAddrArg) -> io::Result<()> { + backend::net::syscalls::bind(sockfd.as_fd(), addr) +} + +/// `connect(sockfd, addr)`—Initiates a connection to an IP address. +/// +/// On Windows, a non-blocking socket returns [`Errno::WOULDBLOCK`] if the +/// connection cannot be completed immediately, rather than +/// `Errno::INPROGRESS`. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#connect +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/connect.html +/// [Linux]: https://man7.org/linux/man-pages/man2/connect.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/connect.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=connect&sektion=2 +/// [NetBSD]: https://man.netbsd.org/connect.2 +/// [OpenBSD]: https://man.openbsd.org/connect.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=connect§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/connect +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Connecting.html +/// [`Errno::WOULDBLOCK`]: io::Errno::WOULDBLOCK +pub fn connect(sockfd: Fd, addr: &impl SocketAddrArg) -> io::Result<()> { + backend::net::syscalls::connect(sockfd.as_fd(), addr) +} + +/// `connect(sockfd, {.sa_family = AF_UNSPEC}, sizeof(struct sockaddr))`— +/// Dissolve the socket's association. +/// +/// On UDP sockets, BSD platforms report [`Errno::AFNOSUPPORT`] or +/// [`Errno::INVAL`] even if the disconnect was successful. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#connect +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/connect.html +/// [Linux]: https://man7.org/linux/man-pages/man2/connect.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/connect.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-connect +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=connect&sektion=2 +/// [NetBSD]: https://man.netbsd.org/connect.2 +/// [OpenBSD]: https://man.openbsd.org/connect.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=connect§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/connect +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Connecting.html +/// [`Errno::AFNOSUPPORT`]: io::Errno::AFNOSUPPORT +/// [`Errno::INVAL`]: io::Errno::INVAL +#[inline] +#[doc(alias = "connect")] +pub fn connect_unspec(sockfd: Fd) -> io::Result<()> { + backend::net::syscalls::connect_unspec(sockfd.as_fd()) +} + +/// `listen(fd, backlog)`—Enables listening for incoming connections. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#listen +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/listen.html +/// [Linux]: https://man7.org/linux/man-pages/man2/listen.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/listen.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-listen +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=listen&sektion=2 +/// [NetBSD]: https://man.netbsd.org/listen.2 +/// [OpenBSD]: https://man.openbsd.org/listen.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=listen§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/listen +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Listening.html +#[inline] +pub fn listen(sockfd: Fd, backlog: i32) -> io::Result<()> { + backend::net::syscalls::listen(sockfd.as_fd(), backlog) +} + +/// `accept(fd, NULL, NULL)`—Accepts an incoming connection. +/// +/// Use [`acceptfrom`] to retrieve the peer address. +/// +/// POSIX guarantees that `accept` will use the lowest unused file descriptor, +/// however it is not safe in general to rely on this, as file descriptors may +/// be unexpectedly allocated on other threads or in libraries. +/// +/// See [`accept_with`] to pass additional flags. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#acceptthank-you-for-calling-port-3490. +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/accept.html +/// [Linux]: https://man7.org/linux/man-pages/man2/accept.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/accept.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-accept +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=accept&sektion=2 +/// [NetBSD]: https://man.netbsd.org/accept.2 +/// [OpenBSD]: https://man.openbsd.org/accept.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=accept§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/accept +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Accepting-Connections.html +#[inline] +pub fn accept(sockfd: Fd) -> io::Result { + backend::net::syscalls::accept(sockfd.as_fd()) +} + +/// `accept4(fd, NULL, NULL, flags)`—Accepts an incoming connection, with +/// flags. +/// +/// Use [`acceptfrom_with`] to retrieve the peer address. +/// +/// Even though POSIX guarantees that this will use the lowest unused file +/// descriptor, it is not safe in general to rely on this, as file descriptors +/// may be unexpectedly allocated on other threads or in libraries. +/// +/// `accept_with` is the same as [`accept`] but adds an additional flags +/// operand. +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/accept4.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=accept4&sektion=2 +/// [NetBSD]: https://man.netbsd.org/accept4.2 +/// [OpenBSD]: https://man.openbsd.org/accept4.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=accept4§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/accept4 +#[inline] +#[doc(alias = "accept4")] +pub fn accept_with(sockfd: Fd, flags: SocketFlags) -> io::Result { + backend::net::syscalls::accept_with(sockfd.as_fd(), flags) +} + +/// `accept(fd, &addr, &len)`—Accepts an incoming connection and returns the +/// peer address. +/// +/// Use [`accept`] if the peer address isn't needed. +/// +/// See [`acceptfrom_with`] to pass additional flags. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#acceptthank-you-for-calling-port-3490. +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/accept.html +/// [Linux]: https://man7.org/linux/man-pages/man2/accept.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/accept.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-accept +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=accept&sektion=2 +/// [NetBSD]: https://man.netbsd.org/accept.2 +/// [OpenBSD]: https://man.openbsd.org/accept.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=accept§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/accept +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Accepting-Connections.html +#[inline] +#[doc(alias = "accept")] +pub fn acceptfrom(sockfd: Fd) -> io::Result<(OwnedFd, Option)> { + backend::net::syscalls::acceptfrom(sockfd.as_fd()) +} + +/// `accept4(fd, &addr, &len, flags)`—Accepts an incoming connection and +/// returns the peer address, with flags. +/// +/// Use [`accept_with`] if the peer address isn't needed. +/// +/// `acceptfrom_with` is the same as [`acceptfrom`] but adds an additional +/// flags operand. +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/accept4.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=accept4&sektion=2 +/// [NetBSD]: https://man.netbsd.org/accept4.2 +/// [OpenBSD]: https://man.openbsd.org/accept4.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=accept4§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/accept4 +#[inline] +#[doc(alias = "accept4")] +pub fn acceptfrom_with( + sockfd: Fd, + flags: SocketFlags, +) -> io::Result<(OwnedFd, Option)> { + backend::net::syscalls::acceptfrom_with(sockfd.as_fd(), flags) +} + +/// `shutdown(fd, how)`—Closes the read and/or write sides of a stream. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#close-and-shutdownget-outta-my-face +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/shutdown.html +/// [Linux]: https://man7.org/linux/man-pages/man2/shutdown.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/shutdown.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-shutdown +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=shutdown&sektion=2 +/// [NetBSD]: https://man.netbsd.org/shutdown.2 +/// [OpenBSD]: https://man.openbsd.org/shutdown.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=shutdown§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/shutdown +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Closing-a-Socket.html +#[inline] +pub fn shutdown(sockfd: Fd, how: Shutdown) -> io::Result<()> { + backend::net::syscalls::shutdown(sockfd.as_fd(), how) +} + +/// `getsockname(fd, addr, len)`—Returns the address a socket is bound to. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getsockname.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getsockname.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getsockname.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-getsockname +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getsockname&sektion=2 +/// [NetBSD]: https://man.netbsd.org/getsockname.2 +/// [OpenBSD]: https://man.openbsd.org/getsockname.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=getsockname§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/getsockname +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Reading-Address.html +#[inline] +pub fn getsockname(sockfd: Fd) -> io::Result { + backend::net::syscalls::getsockname(sockfd.as_fd()) +} + +/// `getpeername(fd, addr, len)`—Returns the address a socket is connected +/// to. +/// +/// # References +/// - [Beej's Guide to Network Programming] +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [Winsock] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [Beej's Guide to Network Programming]: https://beej.us/guide/bgnet/html/split/system-calls-or-bust.html#getpeernamewho-are-you +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpeername.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getpeername.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getpeername.2.html +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-getpeername +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getpeername&sektion=2 +/// [NetBSD]: https://man.netbsd.org/getpeername.2 +/// [OpenBSD]: https://man.openbsd.org/getpeername.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=getpeername§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/getpeername +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Who-is-Connected.html +#[inline] +pub fn getpeername(sockfd: Fd) -> io::Result> { + backend::net::syscalls::getpeername(sockfd.as_fd()) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socket_addr_any.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socket_addr_any.rs new file mode 100644 index 0000000000000000000000000000000000000000..7a953044485322466867d9f6c954bf84a1187c85 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socket_addr_any.rs @@ -0,0 +1,344 @@ +//! The [`SocketAddrAny`] type and related utilities. + +#![allow(unsafe_code)] + +use crate::backend::c; +use crate::backend::net::read_sockaddr; +use crate::io::Errno; +use crate::net::addr::{SocketAddrArg, SocketAddrLen, SocketAddrOpaque, SocketAddrStorage}; +#[cfg(unix)] +use crate::net::SocketAddrUnix; +use crate::net::{AddressFamily, SocketAddr, SocketAddrV4, SocketAddrV6}; +use core::fmt; +use core::mem::{size_of, MaybeUninit}; +use core::num::NonZeroU32; + +/// Temporary buffer for creating a `SocketAddrAny` from a syscall that writes +/// to a `sockaddr_t` and `socklen_t` +/// +/// Unlike `SocketAddrAny`, this does not maintain the invariant that `len` +/// bytes are initialized. +pub(crate) struct SocketAddrBuf { + pub(crate) len: c::socklen_t, + pub(crate) storage: MaybeUninit, +} + +impl SocketAddrBuf { + #[inline] + pub(crate) const fn new() -> Self { + Self { + len: size_of::() as c::socklen_t, + storage: MaybeUninit::::uninit(), + } + } + + /// Convert the buffer into [`SocketAddrAny`]. + /// + /// # Safety + /// + /// A valid address must have been written into `self.storage` and its + /// length written into `self.len`. + #[inline] + pub(crate) unsafe fn into_any(self) -> SocketAddrAny { + SocketAddrAny::new(self.storage, bitcast!(self.len)) + } + + /// Convert the buffer into [`Option`]. + /// + /// This returns `None` if `len` is zero or other platform-specific + /// conditions define the address as empty. + /// + /// # Safety + /// + /// Either valid address must have been written into `self.storage` and its + /// length written into `self.len`, or `self.len` must have been set to 0. + #[inline] + pub(crate) unsafe fn into_any_option(self) -> Option { + let len = bitcast!(self.len); + if read_sockaddr::sockaddr_nonempty(self.storage.as_ptr().cast(), len) { + Some(SocketAddrAny::new(self.storage, len)) + } else { + None + } + } +} + +/// A type that can hold any kind of socket address, as a safe abstraction for +/// `sockaddr_storage`. +/// +/// Socket addresses can be converted to `SocketAddrAny` via the [`From`] and +/// [`Into`] traits. `SocketAddrAny` can be converted back to a specific socket +/// address type with [`TryFrom`] and [`TryInto`]. These implementations return +/// [`Errno::AFNOSUPPORT`] if the address family does not match the requested +/// type. +#[derive(Clone)] +#[doc(alias = "sockaddr_storage")] +pub struct SocketAddrAny { + // Invariants: + // - `len` is at least `size_of::()` + // - `len` is at most `size_of::()` + // - The first `len` bytes of `storage` are initialized. + pub(crate) len: NonZeroU32, + pub(crate) storage: MaybeUninit, +} + +impl SocketAddrAny { + /// Creates a socket address from `storage`, which is initialized for `len` + /// bytes. + /// + /// # Panics + /// + /// if `len` is smaller than the sockaddr header or larger than + /// `SocketAddrStorage`. + /// + /// # Safety + /// + /// - `storage` must contain a valid socket address. + /// - `len` bytes must be initialized. + #[inline] + pub const unsafe fn new(storage: MaybeUninit, len: SocketAddrLen) -> Self { + assert!(len as usize >= size_of::()); + assert!(len as usize <= size_of::()); + let len = NonZeroU32::new_unchecked(len); + Self { storage, len } + } + + /// Creates a socket address from reading from `ptr`, which points at `len` + /// initialized bytes. + /// + /// # Panics + /// + /// if `len` is smaller than the sockaddr header or larger than + /// `SocketAddrStorage`. + /// + /// # Safety + /// + /// - `ptr` must be a pointer to memory containing a valid socket address. + /// - `len` bytes must be initialized. + pub unsafe fn read(ptr: *const SocketAddrStorage, len: SocketAddrLen) -> Self { + assert!(len as usize >= size_of::()); + assert!(len as usize <= size_of::()); + let mut storage = MaybeUninit::::uninit(); + core::ptr::copy_nonoverlapping( + ptr.cast::(), + storage.as_mut_ptr().cast::(), + len as usize, + ); + let len = NonZeroU32::new_unchecked(len); + Self { storage, len } + } + + /// Gets the initialized part of the storage as bytes. + #[inline] + fn bytes(&self) -> &[u8] { + let len = self.len.get() as usize; + unsafe { core::slice::from_raw_parts(self.storage.as_ptr().cast(), len) } + } + + /// Gets the address family of this socket address. + #[inline] + pub fn address_family(&self) -> AddressFamily { + // SAFETY: Our invariants maintain that the `sa_family` field is + // initialized. + unsafe { + AddressFamily::from_raw(crate::backend::net::read_sockaddr::read_sa_family( + self.storage.as_ptr().cast(), + )) + } + } + + /// Returns a raw pointer to the sockaddr. + #[inline] + pub fn as_ptr(&self) -> *const SocketAddrStorage { + self.storage.as_ptr() + } + + /// Returns a raw mutable pointer to the sockaddr. + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut SocketAddrStorage { + self.storage.as_mut_ptr() + } + + /// Returns the length of the encoded sockaddr. + #[inline] + pub fn addr_len(&self) -> SocketAddrLen { + self.len.get() + } +} + +impl PartialEq for SocketAddrAny { + fn eq(&self, other: &Self) -> bool { + self.bytes() == other.bytes() + } +} + +impl Eq for SocketAddrAny {} + +// This just forwards to another `partial_cmp`. +#[allow(clippy::non_canonical_partial_ord_impl)] +impl PartialOrd for SocketAddrAny { + fn partial_cmp(&self, other: &Self) -> Option { + self.bytes().partial_cmp(other.bytes()) + } +} + +impl Ord for SocketAddrAny { + fn cmp(&self, other: &Self) -> core::cmp::Ordering { + self.bytes().cmp(other.bytes()) + } +} + +impl core::hash::Hash for SocketAddrAny { + fn hash(&self, state: &mut H) { + self.bytes().hash(state) + } +} + +impl fmt::Debug for SocketAddrAny { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self.address_family() { + AddressFamily::INET => { + if let Ok(addr) = SocketAddrV4::try_from(self.clone()) { + return addr.fmt(f); + } + } + AddressFamily::INET6 => { + if let Ok(addr) = SocketAddrV6::try_from(self.clone()) { + return addr.fmt(f); + } + } + #[cfg(unix)] + AddressFamily::UNIX => { + if let Ok(addr) = SocketAddrUnix::try_from(self.clone()) { + return addr.fmt(f); + } + } + #[cfg(target_os = "linux")] + AddressFamily::XDP => { + if let Ok(addr) = crate::net::xdp::SocketAddrXdp::try_from(self.clone()) { + return addr.fmt(f); + } + } + #[cfg(linux_kernel)] + AddressFamily::NETLINK => { + if let Ok(addr) = crate::net::netlink::SocketAddrNetlink::try_from(self.clone()) { + return addr.fmt(f); + } + } + _ => {} + } + + f.debug_struct("SocketAddrAny") + .field("address_family", &self.address_family()) + .field("namelen", &self.addr_len()) + .finish() + } +} + +// SAFETY: `with_sockaddr` calls `f` with a pointer to its own storage. +unsafe impl SocketAddrArg for SocketAddrAny { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + f(self.as_ptr().cast(), self.addr_len()) + } +} + +impl From for SocketAddrAny { + #[inline] + fn from(from: SocketAddr) -> Self { + from.as_any() + } +} + +impl TryFrom for SocketAddr { + type Error = Errno; + + /// Convert if the address is an IPv4 or IPv6 address. + /// + /// Returns `Err(Errno::AFNOSUPPORT)` if the address family is not IPv4 or + /// IPv6. + #[inline] + fn try_from(value: SocketAddrAny) -> Result { + match value.address_family() { + AddressFamily::INET => read_sockaddr::read_sockaddr_v4(&value).map(SocketAddr::V4), + AddressFamily::INET6 => read_sockaddr::read_sockaddr_v6(&value).map(SocketAddr::V6), + _ => Err(Errno::AFNOSUPPORT), + } + } +} + +impl From for SocketAddrAny { + #[inline] + fn from(from: SocketAddrV4) -> Self { + from.as_any() + } +} + +impl TryFrom for SocketAddrV4 { + type Error = Errno; + + /// Convert if the address is an IPv4 address. + /// + /// Returns `Err(Errno::AFNOSUPPORT)` if the address family is not IPv4. + #[inline] + fn try_from(value: SocketAddrAny) -> Result { + read_sockaddr::read_sockaddr_v4(&value) + } +} + +impl From for SocketAddrAny { + #[inline] + fn from(from: SocketAddrV6) -> Self { + from.as_any() + } +} + +impl TryFrom for SocketAddrV6 { + type Error = Errno; + + /// Convert if the address is an IPv6 address. + /// + /// Returns `Err(Errno::AFNOSUPPORT)` if the address family is not IPv6. + #[inline] + fn try_from(value: SocketAddrAny) -> Result { + read_sockaddr::read_sockaddr_v6(&value) + } +} + +#[cfg(unix)] +impl From for SocketAddrAny { + #[inline] + fn from(from: SocketAddrUnix) -> Self { + from.as_any() + } +} + +#[cfg(unix)] +impl TryFrom for SocketAddrUnix { + type Error = Errno; + + /// Convert if the address is a Unix socket address. + /// + /// Returns `Err(Errno::AFNOSUPPORT)` if the address family is not Unix. + #[inline] + fn try_from(value: SocketAddrAny) -> Result { + read_sockaddr::read_sockaddr_unix(&value) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn any_read() { + let localhost = std::net::Ipv6Addr::LOCALHOST; + let addr = SocketAddrAny::from(SocketAddrV6::new(localhost, 7, 8, 9)); + unsafe { + let same = SocketAddrAny::read(addr.as_ptr(), addr.addr_len()); + assert_eq!(addr, same); + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socketpair.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socketpair.rs new file mode 100644 index 0000000000000000000000000000000000000000..29227f969162ee84abda30e5d1eb20cd6fa5ba34 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/socketpair.rs @@ -0,0 +1,36 @@ +use crate::fd::OwnedFd; +use crate::net::{AddressFamily, Protocol, SocketFlags, SocketType}; +use crate::{backend, io}; + +/// `socketpair(domain, type_ | accept_flags, protocol)`—Create a pair of +/// sockets that are connected to each other. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// - [glibc] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/socketpair.html +/// [Linux]: https://man7.org/linux/man-pages/man2/socketpair.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/socketpair.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=socketpair&sektion=2 +/// [NetBSD]: https://man.netbsd.org/socketpair.2 +/// [OpenBSD]: https://man.openbsd.org/socketpair.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=socketpair§ion=2 +/// [illumos]: https://illumos.org/man/3SOCKET/socketpair +/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Socket-Pairs.html +#[inline] +pub fn socketpair( + domain: AddressFamily, + type_: SocketType, + flags: SocketFlags, + protocol: Option, +) -> io::Result<(OwnedFd, OwnedFd)> { + backend::net::syscalls::socketpair(domain, type_, flags, protocol) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/sockopt.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/sockopt.rs new file mode 100644 index 0000000000000000000000000000000000000000..796a114be6b64f7c9dd71708e8bde4c0b1145690 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/sockopt.rs @@ -0,0 +1,1819 @@ +//! `getsockopt` and `setsockopt` functions. +//! +//! In the rustix API, there is a separate function for each option, so that it +//! can be given an option-specific type signature. +//! +//! # References for all getter functions: +//! +//! - [POSIX `getsockopt`] +//! - [Linux `getsockopt`] +//! - [Winsock `getsockopt`] +//! - [Apple `getsockopt`] +//! - [FreeBSD `getsockopt`] +//! - [NetBSD `getsockopt`] +//! - [OpenBSD `getsockopt`] +//! - [DragonFly BSD `getsockopt`] +//! - [illumos `getsockopt`] +//! - [glibc `getsockopt`] +//! +//! [POSIX `getsockopt`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getsockopt.html +//! [Linux `getsockopt`]: https://man7.org/linux/man-pages/man2/getsockopt.2.html +//! [Winsock `getsockopt`]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-getsockopt +//! [Apple `getsockopt`]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getsockopt.2.html +//! [FreeBSD `getsockopt`]: https://man.freebsd.org/cgi/man.cgi?query=getsockopt&sektion=2 +//! [NetBSD `getsockopt`]: https://man.netbsd.org/getsockopt.2 +//! [OpenBSD `getsockopt`]: https://man.openbsd.org/getsockopt.2 +//! [DragonFly BSD `getsockopt`]: https://man.dragonflybsd.org/?command=getsockopt§ion=2 +//! [illumos `getsockopt`]: https://illumos.org/man/3SOCKET/getsockopt +//! [glibc `getsockopt`]: https://sourceware.org/glibc/manual/latest/html_node/Socket-Option-Functions.html +//! +//! # References for all `set_*` functions: +//! +//! - [POSIX `setsockopt`] +//! - [Linux `setsockopt`] +//! - [Winsock `setsockopt`] +//! - [Apple `setsockopt`] +//! - [FreeBSD `setsockopt`] +//! - [NetBSD `setsockopt`] +//! - [OpenBSD `setsockopt`] +//! - [DragonFly BSD `setsockopt`] +//! - [illumos `setsockopt`] +//! - [glibc `setsockopt`] +//! +//! [POSIX `setsockopt`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setsockopt.html +//! [Linux `setsockopt`]: https://man7.org/linux/man-pages/man2/setsockopt.2.html +//! [Winsock `setsockopt`]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-setsockopt +//! [Apple `setsockopt`]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setsockopt.2.html +//! [FreeBSD `setsockopt`]: https://man.freebsd.org/cgi/man.cgi?query=setsockopt&sektion=2 +//! [NetBSD `setsockopt`]: https://man.netbsd.org/setsockopt.2 +//! [OpenBSD `setsockopt`]: https://man.openbsd.org/setsockopt.2 +//! [DragonFly BSD `setsockopt`]: https://man.dragonflybsd.org/?command=setsockopt§ion=2 +//! [illumos `setsockopt`]: https://illumos.org/man/3SOCKET/setsockopt +//! [glibc `setsockopt`]: https://sourceware.org/glibc/manual/latest/html_node/Socket-Option-Functions.html +//! +//! # References for `get_socket_*` and `set_socket_*` functions: +//! +//! - [References for all getter functions] +//! - [References for all `set_*` functions] +//! - [POSIX `sys/socket.h`] +//! - [Linux `socket`] +//! - [Winsock `SOL_SOCKET` options] +//! - [glibc `SOL_SOCKET` Options] +//! +//! [POSIX `sys/socket.h`]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html +//! [Linux `socket`]: https://man7.org/linux/man-pages/man7/socket.7.html +//! [Winsock `SOL_SOCKET` options]: https://docs.microsoft.com/en-us/windows/win32/winsock/sol-socket-socket-options +//! [glibc `SOL_SOCKET` options]: https://sourceware.org/glibc/manual/latest/html_node/Socket_002dLevel-Options.html +//! +//! # References for `get_ip_*` and `set_ip_*` functions: +//! +//! - [References for all getter functions] +//! - [References for all `set_*` functions] +//! - [POSIX `netinet/in.h`] +//! - [Linux `ip`] +//! - [Winsock `IPPROTO_IP` options] +//! - [Apple `ip`] +//! - [FreeBSD `ip`] +//! - [NetBSD `ip`] +//! - [OpenBSD `ip`] +//! - [DragonFly BSD `ip`] +//! - [illumos `ip`] +//! +//! [POSIX `netinet/in.h`]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html +//! [Linux `ip`]: https://man7.org/linux/man-pages/man7/ip.7.html +//! [Winsock `IPPROTO_IP` options]: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options +//! [Apple `ip`]: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/man/man4/ip.4 +//! [FreeBSD `ip`]: https://man.freebsd.org/cgi/man.cgi?query=ip&sektion=4 +//! [NetBSD `ip`]: https://man.netbsd.org/ip.4 +//! [OpenBSD `ip`]: https://man.openbsd.org/ip.4 +//! [DragonFly BSD `ip`]: https://man.dragonflybsd.org/?command=ip§ion=4 +//! [illumos `ip`]: https://illumos.org/man/4P/ip +//! +//! # References for `get_ipv6_*` and `set_ipv6_*` functions: +//! +//! - [References for all getter functions] +//! - [References for all `set_*` functions] +//! - [POSIX `netinet/in.h`] +//! - [Linux `ipv6`] +//! - [Winsock `IPPROTO_IPV6` options] +//! - [Apple `ip6`] +//! - [FreeBSD `ip6`] +//! - [NetBSD `ip6`] +//! - [OpenBSD `ip6`] +//! - [DragonFly BSD `ip6`] +//! - [illumos `ip6`] +//! +//! [POSIX `netinet/in.h`]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html +//! [Linux `ipv6`]: https://man7.org/linux/man-pages/man7/ipv6.7.html +//! [Winsock `IPPROTO_IPV6` options]: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options +//! [Apple `ip6`]: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/man/man4/ip6.4 +//! [FreeBSD `ip6`]: https://man.freebsd.org/cgi/man.cgi?query=ip6&sektion=4 +//! [NetBSD `ip6`]: https://man.netbsd.org/ip6.4 +//! [OpenBSD `ip6`]: https://man.openbsd.org/ip6.4 +//! [DragonFly BSD `ip6`]: https://man.dragonflybsd.org/?command=ip6§ion=4 +//! [illumos `ip6`]: https://illumos.org/man/4P/ip6 +//! +//! # References for `get_tcp_*` and `set_tcp_*` functions: +//! +//! - [References for all getter functions] +//! - [References for all `set_*` functions] +//! - [POSIX `netinet/tcp.h`] +//! - [Linux `tcp`] +//! - [Winsock `IPPROTO_TCP` options] +//! - [Apple `tcp`] +//! - [FreeBSD `tcp`] +//! - [NetBSD `tcp`] +//! - [OpenBSD `tcp`] +//! - [DragonFly BSD `tcp`] +//! - [illumos `tcp`] +//! +//! [POSIX `netinet/tcp.h`]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_tcp.h.html +//! [Linux `tcp`]: https://man7.org/linux/man-pages/man7/tcp.7.html +//! [Winsock `IPPROTO_TCP` options]: https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-tcp-socket-options +//! [Apple `tcp`]: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/man/man4/tcp.4 +//! [FreeBSD `tcp`]: https://man.freebsd.org/cgi/man.cgi?query=tcp&sektion=4 +//! [NetBSD `tcp`]: https://man.netbsd.org/tcp.4 +//! [OpenBSD `tcp`]: https://man.openbsd.org/tcp.4 +//! [DragonFly BSD `tcp`]: https://man.dragonflybsd.org/?command=tcp§ion=4 +//! [illumos `tcp`]: https://illumos.org/man/4P/tcp +//! +//! [References for all getter functions]: #references-for-all-getter-functions +//! [References for all `set_*` functions]: #references-for-all-set_-functions + +#![doc(alias = "getsockopt")] +#![doc(alias = "setsockopt")] + +#[cfg(all(target_os = "linux", feature = "time"))] +use crate::clockid::ClockId; +#[cfg(target_os = "linux")] +use crate::net::xdp::{XdpMmapOffsets, XdpOptionsFlags, XdpStatistics, XdpUmemReg}; +#[cfg(not(any( + apple, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "dragonfly", + target_os = "emscripten", + target_os = "espidf", + target_os = "haiku", + target_os = "netbsd", + target_os = "nto", + target_os = "vita", +)))] +use crate::net::AddressFamily; +#[cfg(any( + linux_kernel, + target_os = "freebsd", + target_os = "fuchsia", + target_os = "openbsd", + target_os = "redox", + target_env = "newlib" +))] +use crate::net::Protocol; +#[cfg(any(linux_kernel, target_os = "fuchsia"))] +use crate::net::SocketAddrV4; +#[cfg(linux_kernel)] +use crate::net::SocketAddrV6; +#[cfg(all(target_os = "linux", feature = "time"))] +use crate::net::TxTimeFlags; +use crate::net::{Ipv4Addr, Ipv6Addr, SocketType}; +use crate::{backend, io}; +#[cfg(feature = "alloc")] +#[cfg(any( + linux_like, + target_os = "freebsd", + target_os = "fuchsia", + target_os = "illumos" +))] +use alloc::string::String; +use backend::c; +use backend::fd::AsFd; +use core::time::Duration; + +/// Timeout identifier for use with [`set_socket_timeout`] and +/// [`socket_timeout`]. +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(u32)] +pub enum Timeout { + /// `SO_RCVTIMEO`—Timeout for receiving. + Recv = c::SO_RCVTIMEO as _, + + /// `SO_SNDTIMEO`—Timeout for sending. + Send = c::SO_SNDTIMEO as _, +} + +/// A type for holding raw integer IPv4 Path MTU Discovery options. +#[cfg(linux_kernel)] +pub type RawIpv4PathMtuDiscovery = i32; + +/// IPv4 Path MTU Discovery option values (`IP_PMTUDISC_*`) for use with +/// [`set_ip_mtu_discover`] and [`ip_mtu_discover`]. +/// +/// # References +/// - [Linux] +/// - [Linux INET header] +/// +/// [Linux]: https://man7.org/linux/man-pages/man7/ip.7.html +/// [Linux INET header]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/in.h?h=v6.14#n135 +#[cfg(linux_kernel)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(transparent)] +pub struct Ipv4PathMtuDiscovery(RawIpv4PathMtuDiscovery); + +#[cfg(linux_kernel)] +impl Ipv4PathMtuDiscovery { + /// `IP_PMTUDISC_DONT` + #[doc(alias = "IP_PMTUDISC_DONT")] + pub const DONT: Self = Self(c::IP_PMTUDISC_DONT as _); + /// `IP_PMTUDISC_WANT` + #[doc(alias = "IP_PMTUDISC_WANT")] + pub const WANT: Self = Self(c::IP_PMTUDISC_WANT as _); + /// `IP_PMTUDISC_DO` + #[doc(alias = "IP_PMTUDISC_DO")] + pub const DO: Self = Self(c::IP_PMTUDISC_DO as _); + /// `IP_PMTUDISC_PROBE` + #[doc(alias = "IP_PMTUDISC_PROBE")] + pub const PROBE: Self = Self(c::IP_PMTUDISC_PROBE as _); + /// `IP_PMTUDISC_INTERFACE` + #[doc(alias = "IP_PMTUDISC_INTERFACE")] + pub const INTERFACE: Self = Self(c::IP_PMTUDISC_INTERFACE as _); + /// `IP_PMTUDISC_OMIT` + #[doc(alias = "IP_PMTUDISC_OMIT")] + pub const OMIT: Self = Self(c::IP_PMTUDISC_OMIT as _); + + /// Constructs an option from a raw integer. + #[inline] + pub const fn from_raw(raw: RawIpv4PathMtuDiscovery) -> Self { + Self(raw) + } + + /// Returns the raw integer for this option. + #[inline] + pub const fn as_raw(self) -> RawIpv4PathMtuDiscovery { + self.0 + } +} + +/// A type for holding raw integer IPv6 Path MTU Discovery options. +#[cfg(linux_kernel)] +pub type RawIpv6PathMtuDiscovery = i32; + +/// IPv6 Path MTU Discovery option values (`IPV6_PMTUDISC_*`) for use with +/// [`set_ipv6_mtu_discover`] and [`ipv6_mtu_discover`]. +/// +/// # References +/// - [Linux] +/// - [Linux INET6 header] +/// +/// [Linux]: https://man7.org/linux/man-pages/man7/ipv6.7.html +/// [Linux INET6 header]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/in6.h?h=v6.14#n185 +#[cfg(linux_kernel)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(transparent)] +pub struct Ipv6PathMtuDiscovery(RawIpv6PathMtuDiscovery); + +#[cfg(linux_kernel)] +impl Ipv6PathMtuDiscovery { + /// `IPV6_PMTUDISC_DONT` + #[doc(alias = "IPV6_PMTUDISC_DONT")] + pub const DONT: Self = Self(c::IPV6_PMTUDISC_DONT as _); + /// `IPV6_PMTUDISC_WANT` + #[doc(alias = "IPV6_PMTUDISC_WANT")] + pub const WANT: Self = Self(c::IPV6_PMTUDISC_WANT as _); + /// `IPV6_PMTUDISC_DO` + #[doc(alias = "IPV6_PMTUDISC_DO")] + pub const DO: Self = Self(c::IPV6_PMTUDISC_DO as _); + /// `IPV6_PMTUDISC_PROBE` + #[doc(alias = "IPV6_PMTUDISC_PROBE")] + pub const PROBE: Self = Self(c::IPV6_PMTUDISC_PROBE as _); + /// `IPV6_PMTUDISC_INTERFACE` + #[doc(alias = "IPV6_PMTUDISC_INTERFACE")] + pub const INTERFACE: Self = Self(c::IPV6_PMTUDISC_INTERFACE as _); + /// `IPV6_PMTUDISC_OMIT` + #[doc(alias = "IPV6_PMTUDISC_OMIT")] + pub const OMIT: Self = Self(c::IPV6_PMTUDISC_OMIT as _); + + /// Constructs an option from a raw integer. + #[inline] + pub const fn from_raw(raw: RawIpv6PathMtuDiscovery) -> Self { + Self(raw) + } + + /// Returns the raw integer for this option. + #[inline] + pub const fn as_raw(self) -> RawIpv6PathMtuDiscovery { + self.0 + } +} + +/// `getsockopt(fd, SOL_SOCKET, SO_TYPE)`—Returns the type of a socket. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_TYPE")] +pub fn socket_type(fd: Fd) -> io::Result { + backend::net::sockopt::socket_type(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, value)`—Set whether local +/// addresses may be reused in `bind`. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_REUSEADDR")] +pub fn set_socket_reuseaddr(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_reuseaddr(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_REUSEADDR)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_REUSEADDR")] +pub fn socket_reuseaddr(fd: Fd) -> io::Result { + backend::net::sockopt::socket_reuseaddr(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_BROADCAST, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_BROADCAST")] +pub fn set_socket_broadcast(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_broadcast(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_BROADCAST)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_BROADCAST")] +pub fn socket_broadcast(fd: Fd) -> io::Result { + backend::net::sockopt::socket_broadcast(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_LINGER, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_LINGER")] +pub fn set_socket_linger(fd: Fd, value: Option) -> io::Result<()> { + backend::net::sockopt::set_socket_linger(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_LINGER)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_LINGER")] +pub fn socket_linger(fd: Fd) -> io::Result> { + backend::net::sockopt::socket_linger(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_PASSCRED, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "SO_PASSCRED")] +pub fn set_socket_passcred(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_passcred(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_PASSCRED)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "SO_PASSCRED")] +pub fn socket_passcred(fd: Fd) -> io::Result { + backend::net::sockopt::socket_passcred(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, id, value)`—Set the sending or receiving +/// timeout. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_RCVTIMEO")] +#[doc(alias = "SO_SNDTIMEO")] +pub fn set_socket_timeout( + fd: Fd, + id: Timeout, + value: Option, +) -> io::Result<()> { + backend::net::sockopt::set_socket_timeout(fd.as_fd(), id, value) +} + +/// `getsockopt(fd, SOL_SOCKET, id)`—Get the sending or receiving timeout. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_RCVTIMEO")] +#[doc(alias = "SO_SNDTIMEO")] +pub fn socket_timeout(fd: Fd, id: Timeout) -> io::Result> { + backend::net::sockopt::socket_timeout(fd.as_fd(), id) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_ERROR)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_ERROR")] +pub fn socket_error(fd: Fd) -> io::Result> { + backend::net::sockopt::socket_error(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(any(apple, freebsdlike, target_os = "netbsd"))] +#[doc(alias = "SO_NOSIGPIPE")] +#[inline] +pub fn socket_nosigpipe(fd: Fd) -> io::Result { + backend::net::sockopt::socket_nosigpipe(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(any(apple, freebsdlike, target_os = "netbsd"))] +#[doc(alias = "SO_NOSIGPIPE")] +#[inline] +pub fn set_socket_nosigpipe(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_nosigpipe(fd.as_fd(), value) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_KEEPALIVE")] +pub fn set_socket_keepalive(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_keepalive(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_KEEPALIVE)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_KEEPALIVE")] +pub fn socket_keepalive(fd: Fd) -> io::Result { + backend::net::sockopt::socket_keepalive(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_RCVBUF, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_RCVBUF")] +pub fn set_socket_recv_buffer_size(fd: Fd, value: usize) -> io::Result<()> { + backend::net::sockopt::set_socket_recv_buffer_size(fd.as_fd(), value) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(any(linux_kernel, target_os = "fuchsia", target_os = "redox"))] +#[inline] +#[doc(alias = "SO_RCVBUFFORCE")] +pub fn set_socket_recv_buffer_size_force(fd: Fd, value: usize) -> io::Result<()> { + backend::net::sockopt::set_socket_recv_buffer_size_force(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_RCVBUF)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_RCVBUF")] +pub fn socket_recv_buffer_size(fd: Fd) -> io::Result { + backend::net::sockopt::socket_recv_buffer_size(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_SNDBUF, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_SNDBUF")] +pub fn set_socket_send_buffer_size(fd: Fd, value: usize) -> io::Result<()> { + backend::net::sockopt::set_socket_send_buffer_size(fd.as_fd(), value) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_SNDBUFFORCE, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(any(linux_kernel, target_os = "fuchsia", target_os = "redox"))] +#[inline] +#[doc(alias = "SO_SNDBUFFORCE")] +pub fn set_socket_send_buffer_size_force(fd: Fd, value: usize) -> io::Result<()> { + backend::net::sockopt::set_socket_send_buffer_size_force(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_SNDBUF)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_SNDBUF")] +pub fn socket_send_buffer_size(fd: Fd) -> io::Result { + backend::net::sockopt::socket_send_buffer_size(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_DOMAIN)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(not(any( + apple, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "dragonfly", + target_os = "emscripten", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "netbsd", + target_os = "nto", + target_os = "vita", +)))] +#[inline] +#[doc(alias = "SO_DOMAIN")] +pub fn socket_domain(fd: Fd) -> io::Result { + backend::net::sockopt::socket_domain(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_ACCEPTCONN)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(not(apple))] // Apple platforms declare the constant, but do not actually implement it. +#[inline] +#[doc(alias = "SO_ACCEPTCONN")] +pub fn socket_acceptconn(fd: Fd) -> io::Result { + backend::net::sockopt::socket_acceptconn(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_OOBINLINE")] +pub fn set_socket_oobinline(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_oobinline(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_OOBINLINE)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "SO_OOBINLINE")] +pub fn socket_oobinline(fd: Fd) -> io::Result { + backend::net::sockopt::socket_oobinline(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(not(any(solarish, windows, target_os = "cygwin")))] +#[cfg(not(windows))] +#[inline] +#[doc(alias = "SO_REUSEPORT")] +pub fn set_socket_reuseport(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_reuseport(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_REUSEPORT)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(not(any(solarish, windows, target_os = "cygwin")))] +#[inline] +#[doc(alias = "SO_REUSEPORT")] +pub fn socket_reuseport(fd: Fd) -> io::Result { + backend::net::sockopt::socket_reuseport(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(target_os = "freebsd")] +#[inline] +#[doc(alias = "SO_REUSEPORT_LB")] +pub fn set_socket_reuseport_lb(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_socket_reuseport_lb(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_REUSEPORT_LB)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(target_os = "freebsd")] +#[inline] +#[doc(alias = "SO_REUSEPORT_LB")] +pub fn socket_reuseport_lb(fd: Fd) -> io::Result { + backend::net::sockopt::socket_reuseport_lb(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_PROTOCOL)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(any( + linux_kernel, + target_os = "freebsd", + target_os = "fuchsia", + target_os = "openbsd", + target_os = "redox", + target_env = "newlib" +))] +#[inline] +#[doc(alias = "SO_PROTOCOL")] +pub fn socket_protocol(fd: Fd) -> io::Result> { + backend::net::sockopt::socket_protocol(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_COOKIE)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(target_os = "linux")] +#[inline] +#[doc(alias = "SO_COOKIE")] +pub fn socket_cookie(fd: Fd) -> io::Result { + backend::net::sockopt::socket_cookie(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(target_os = "linux")] +#[inline] +#[doc(alias = "SO_INCOMING_CPU")] +pub fn socket_incoming_cpu(fd: Fd) -> io::Result { + backend::net::sockopt::socket_incoming_cpu(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[cfg(target_os = "linux")] +#[inline] +#[doc(alias = "SO_INCOMING_CPU")] +pub fn set_socket_incoming_cpu(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_socket_incoming_cpu(fd.as_fd(), value) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_TTL, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_socket_-and-set_socket_-functions +#[inline] +#[doc(alias = "IP_TTL")] +pub fn set_ip_ttl(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_ip_ttl(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_TTL)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_TTL")] +pub fn ip_ttl(fd: Fd) -> io::Result { + backend::net::sockopt::ip_ttl(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_V6ONLY")] +pub fn set_ipv6_v6only(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_ipv6_v6only(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_V6ONLY")] +pub fn ipv6_v6only(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_v6only(fd.as_fd()) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_MTU)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[cfg(any(linux_kernel, target_os = "cygwin"))] +#[doc(alias = "IP_MTU")] +pub fn ip_mtu(fd: Fd) -> io::Result { + backend::net::sockopt::ip_mtu(fd.as_fd()) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_MTU)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[cfg(any(linux_kernel, target_os = "cygwin"))] +#[doc(alias = "IPV6_MTU")] +pub fn ipv6_mtu(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_mtu(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_MTU_DISCOVER, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "IP_MTU_DISCOVER")] +pub fn set_ip_mtu_discover(fd: Fd, value: Ipv4PathMtuDiscovery) -> io::Result<()> { + backend::net::sockopt::set_ip_mtu_discover(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_MTU_DISCOVER)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "IP_MTU_DISCOVER")] +pub fn ip_mtu_discover(fd: Fd) -> io::Result { + backend::net::sockopt::ip_mtu_discover(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_MTU_DISCOVER, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "IPV6_MTU_DISCOVER")] +pub fn set_ipv6_mtu_discover(fd: Fd, value: Ipv6PathMtuDiscovery) -> io::Result<()> { + backend::net::sockopt::set_ipv6_mtu_discover(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_MTU_DISCOVER)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "IPV6_MTU_DISCOVER")] +pub fn ipv6_mtu_discover(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_mtu_discover(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_MULTICAST_IF")] +pub fn set_ip_multicast_if(fd: Fd, value: &Ipv4Addr) -> io::Result<()> { + backend::net::sockopt::set_ip_multicast_if(fd.as_fd(), value) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, multiaddr, address, +/// ifindex)` +/// +/// This is similar to [`set_ip_multicast_if`] but additionally allows an +/// `ifindex` value to be given. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any( + apple, + freebsdlike, + linux_like, + target_os = "fuchsia", + target_os = "openbsd" +))] +#[inline] +#[doc(alias = "IP_MULTICAST_IF")] +pub fn set_ip_multicast_if_with_ifindex( + fd: Fd, + multiaddr: &Ipv4Addr, + address: &Ipv4Addr, + ifindex: u32, +) -> io::Result<()> { + backend::net::sockopt::set_ip_multicast_if_with_ifindex(fd.as_fd(), multiaddr, address, ifindex) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_MULTICAST_IF")] +pub fn ip_multicast_if(fd: Fd) -> io::Result { + backend::net::sockopt::ip_multicast_if(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IPV6_MULTICAST_IF")] +pub fn set_ipv6_multicast_if(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_ipv6_multicast_if(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IPV6_MULTICAST_IF")] +pub fn ipv6_multicast_if(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_multicast_if(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_MULTICAST_LOOP")] +pub fn set_ip_multicast_loop(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_ip_multicast_loop(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_MULTICAST_LOOP")] +pub fn ip_multicast_loop(fd: Fd) -> io::Result { + backend::net::sockopt::ip_multicast_loop(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_MULTICAST_TTL")] +pub fn set_ip_multicast_ttl(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_ip_multicast_ttl(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_MULTICAST_TTL")] +pub fn ip_multicast_ttl(fd: Fd) -> io::Result { + backend::net::sockopt::ip_multicast_ttl(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_MULTICAST_LOOP")] +pub fn set_ipv6_multicast_loop(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_ipv6_multicast_loop(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_MULTICAST_LOOP")] +pub fn ipv6_multicast_loop(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_multicast_loop(fd.as_fd()) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_UNICAST_HOPS")] +pub fn ipv6_unicast_hops(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_unicast_hops(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_UNICAST_HOPS")] +pub fn set_ipv6_unicast_hops(fd: Fd, value: Option) -> io::Result<()> { + backend::net::sockopt::set_ipv6_unicast_hops(fd.as_fd(), value) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_MULTICAST_HOPS")] +pub fn set_ipv6_multicast_hops(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_ipv6_multicast_hops(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_MULTICAST_HOPS")] +pub fn ipv6_multicast_hops(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_multicast_hops(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, multiaddr, interface)` +/// +/// This is similar to [`set_ip_add_membership`] but always sets the `ifindex` +/// value to zero. See [`set_ip_add_membership_with_ifindex`] instead to also +/// give the `ifindex` value. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_ADD_MEMBERSHIP")] +pub fn set_ip_add_membership( + fd: Fd, + multiaddr: &Ipv4Addr, + interface: &Ipv4Addr, +) -> io::Result<()> { + backend::net::sockopt::set_ip_add_membership(fd.as_fd(), multiaddr, interface) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, multiaddr, address, +/// ifindex)` +/// +/// This is similar to [`set_ip_add_membership`] but additionally allows an +/// `ifindex` value to be given. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any( + apple, + freebsdlike, + linux_like, + target_os = "fuchsia", + target_os = "openbsd" +))] +#[inline] +#[doc(alias = "IP_ADD_MEMBERSHIP")] +pub fn set_ip_add_membership_with_ifindex( + fd: Fd, + multiaddr: &Ipv4Addr, + address: &Ipv4Addr, + ifindex: u32, +) -> io::Result<()> { + backend::net::sockopt::set_ip_add_membership_with_ifindex( + fd.as_fd(), + multiaddr, + address, + ifindex, + ) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_ADD_SOURCE_MEMBERSHIP, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any(apple, freebsdlike, linux_like, solarish, target_os = "aix"))] +#[inline] +#[doc(alias = "IP_ADD_SOURCE_MEMBERSHIP")] +pub fn set_ip_add_source_membership( + fd: Fd, + multiaddr: &Ipv4Addr, + interface: &Ipv4Addr, + sourceaddr: &Ipv4Addr, +) -> io::Result<()> { + backend::net::sockopt::set_ip_add_source_membership( + fd.as_fd(), + multiaddr, + interface, + sourceaddr, + ) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_DROP_SOURCE_MEMBERSHIP, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any(apple, freebsdlike, linux_like, solarish, target_os = "aix"))] +#[inline] +#[doc(alias = "IP_DROP_SOURCE_MEMBERSHIP")] +pub fn set_ip_drop_source_membership( + fd: Fd, + multiaddr: &Ipv4Addr, + interface: &Ipv4Addr, + sourceaddr: &Ipv4Addr, +) -> io::Result<()> { + backend::net::sockopt::set_ip_drop_source_membership( + fd.as_fd(), + multiaddr, + interface, + sourceaddr, + ) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, multiaddr, interface)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_JOIN_GROUP")] +#[doc(alias = "IPV6_ADD_MEMBERSHIP")] +pub fn set_ipv6_add_membership( + fd: Fd, + multiaddr: &Ipv6Addr, + interface: u32, +) -> io::Result<()> { + backend::net::sockopt::set_ipv6_add_membership(fd.as_fd(), multiaddr, interface) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, multiaddr, interface)` +/// +/// This is similar to [`set_ip_drop_membership`] but always sets `ifindex` +/// value to zero. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[inline] +#[doc(alias = "IP_DROP_MEMBERSHIP")] +pub fn set_ip_drop_membership( + fd: Fd, + multiaddr: &Ipv4Addr, + interface: &Ipv4Addr, +) -> io::Result<()> { + backend::net::sockopt::set_ip_drop_membership(fd.as_fd(), multiaddr, interface) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, multiaddr, interface)` +/// +/// This is similar to [`set_ip_drop_membership_with_ifindex`] but additionally +/// allows a `ifindex` value to be given. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any( + apple, + freebsdlike, + linux_like, + target_os = "fuchsia", + target_os = "openbsd" +))] +#[inline] +#[doc(alias = "IP_DROP_MEMBERSHIP")] +pub fn set_ip_drop_membership_with_ifindex( + fd: Fd, + multiaddr: &Ipv4Addr, + address: &Ipv4Addr, + ifindex: u32, +) -> io::Result<()> { + backend::net::sockopt::set_ip_drop_membership_with_ifindex( + fd.as_fd(), + multiaddr, + address, + ifindex, + ) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, multiaddr, interface)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[inline] +#[doc(alias = "IPV6_LEAVE_GROUP")] +#[doc(alias = "IPV6_DROP_MEMBERSHIP")] +pub fn set_ipv6_drop_membership( + fd: Fd, + multiaddr: &Ipv6Addr, + interface: u32, +) -> io::Result<()> { + backend::net::sockopt::set_ipv6_drop_membership(fd.as_fd(), multiaddr, interface) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_TOS, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any( + bsd, + linux_like, + target_os = "aix", + target_os = "fuchsia", + target_os = "haiku", + target_os = "nto", + target_env = "newlib" +))] +#[inline] +#[doc(alias = "IP_TOS")] +pub fn set_ip_tos(fd: Fd, value: u8) -> io::Result<()> { + backend::net::sockopt::set_ip_tos(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_TOS)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any( + bsd, + linux_like, + target_os = "aix", + target_os = "fuchsia", + target_os = "haiku", + target_os = "nto", + target_env = "newlib" +))] +#[inline] +#[doc(alias = "IP_TOS")] +pub fn ip_tos(fd: Fd) -> io::Result { + backend::net::sockopt::ip_tos(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_RECVTOS, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any( + apple, + linux_like, + target_os = "cygwin", + target_os = "freebsd", + target_os = "fuchsia", +))] +#[inline] +#[doc(alias = "IP_RECVTOS")] +pub fn set_ip_recvtos(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_ip_recvtos(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_RECVTOS)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ip_-and-set_ip_-functions +#[cfg(any( + apple, + linux_like, + target_os = "cygwin", + target_os = "freebsd", + target_os = "fuchsia", +))] +#[inline] +#[doc(alias = "IP_RECVTOS")] +pub fn ip_recvtos(fd: Fd) -> io::Result { + backend::net::sockopt::ip_recvtos(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_RECVTCLASS, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(any( + bsd, + linux_like, + target_os = "aix", + target_os = "fuchsia", + target_os = "nto" +))] +#[inline] +#[doc(alias = "IPV6_RECVTCLASS")] +pub fn set_ipv6_recvtclass(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_ipv6_recvtclass(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_RECVTCLASS)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(any( + bsd, + linux_like, + target_os = "aix", + target_os = "fuchsia", + target_os = "nto" +))] +#[inline] +#[doc(alias = "IPV6_RECVTCLASS")] +pub fn ipv6_recvtclass(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_recvtclass(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IP, IP_FREEBIND, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(any(linux_kernel, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "IP_FREEBIND")] +pub fn set_ip_freebind(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_ip_freebind(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IP, IP_FREEBIND)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(any(linux_kernel, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "IP_FREEBIND")] +pub fn ip_freebind(fd: Fd) -> io::Result { + backend::net::sockopt::ip_freebind(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_FREEBIND, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "IPV6_FREEBIND")] +pub fn set_ipv6_freebind(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_ipv6_freebind(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_FREEBIND)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "IPV6_FREEBIND")] +pub fn ipv6_freebind(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_freebind(fd.as_fd()) +} + +/// `getsockopt(fd, IPPROTO_IP, SO_ORIGINAL_DST)` +/// +/// Even though this corresponds to a `SO_*` constant, it is an `IPPROTO_IP` +/// option. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(any(linux_kernel, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "SO_ORIGINAL_DST")] +pub fn ip_original_dst(fd: Fd) -> io::Result { + backend::net::sockopt::ip_original_dst(fd.as_fd()) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST)` +/// +/// Even though this corresponds to a `IP6T_*` constant, it is an +/// `IPPROTO_IPV6` option. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(linux_kernel)] +#[inline] +#[doc(alias = "IP6T_SO_ORIGINAL_DST")] +pub fn ipv6_original_dst(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_original_dst(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(not(any( + solarish, + windows, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" +)))] +#[inline] +#[doc(alias = "IPV6_TCLASS")] +pub fn set_ipv6_tclass(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_ipv6_tclass(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_ipv6_-and-set_ipv6_-functions +#[cfg(not(any( + solarish, + windows, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" +)))] +#[inline] +#[doc(alias = "IPV6_TCLASS")] +pub fn ipv6_tclass(fd: Fd) -> io::Result { + backend::net::sockopt::ipv6_tclass(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[inline] +#[doc(alias = "TCP_NODELAY")] +pub fn set_tcp_nodelay(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_tcp_nodelay(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_NODELAY)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[inline] +#[doc(alias = "TCP_NODELAY")] +pub fn tcp_nodelay(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_nodelay(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(not(any( + target_os = "haiku", + target_os = "nto", + target_os = "openbsd", + target_os = "redox" +)))] +#[inline] +#[doc(alias = "TCP_KEEPCNT")] +pub fn set_tcp_keepcnt(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_tcp_keepcnt(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(not(any( + target_os = "haiku", + target_os = "nto", + target_os = "openbsd", + target_os = "redox" +)))] +#[inline] +#[doc(alias = "TCP_KEEPCNT")] +pub fn tcp_keepcnt(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_keepcnt(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, value)` +/// +/// `TCP_KEEPALIVE` on Apple platforms. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(not(any(target_os = "haiku", target_os = "nto", target_os = "openbsd")))] +#[inline] +#[doc(alias = "TCP_KEEPIDLE")] +pub fn set_tcp_keepidle(fd: Fd, value: Duration) -> io::Result<()> { + backend::net::sockopt::set_tcp_keepidle(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE)` +/// +/// `TCP_KEEPALIVE` on Apple platforms. +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(not(any(target_os = "haiku", target_os = "nto", target_os = "openbsd")))] +#[inline] +#[doc(alias = "TCP_KEEPIDLE")] +pub fn tcp_keepidle(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_keepidle(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(not(any( + target_os = "haiku", + target_os = "nto", + target_os = "openbsd", + target_os = "redox" +)))] +#[inline] +#[doc(alias = "TCP_KEEPINTVL")] +pub fn set_tcp_keepintvl(fd: Fd, value: Duration) -> io::Result<()> { + backend::net::sockopt::set_tcp_keepintvl(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(not(any( + target_os = "haiku", + target_os = "nto", + target_os = "openbsd", + target_os = "redox" +)))] +#[inline] +#[doc(alias = "TCP_KEEPINTVL")] +pub fn tcp_keepintvl(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_keepintvl(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_USER_TIMEOUT")] +pub fn set_tcp_user_timeout(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_tcp_user_timeout(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_USER_TIMEOUT")] +pub fn tcp_user_timeout(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_user_timeout(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_QUICKACK, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_QUICKACK")] +pub fn set_tcp_quickack(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_tcp_quickack(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_QUICKACK)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_QUICKACK")] +pub fn tcp_quickack(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_quickack(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_CONGESTION, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any( + linux_like, + target_os = "freebsd", + target_os = "fuchsia", + target_os = "illumos" +))] +#[inline] +#[doc(alias = "TCP_CONGESTION")] +pub fn set_tcp_congestion(fd: Fd, value: &str) -> io::Result<()> { + backend::net::sockopt::set_tcp_congestion(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_CONGESTION)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(feature = "alloc")] +#[cfg(any( + linux_like, + target_os = "freebsd", + target_os = "fuchsia", + target_os = "illumos" +))] +#[inline] +#[doc(alias = "TCP_CONGESTION")] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +pub fn tcp_congestion(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_congestion(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_THIN_LINEAR_TIMEOUTS, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_THIN_LINEAR_TIMEOUTS")] +pub fn set_tcp_thin_linear_timeouts(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_tcp_thin_linear_timeouts(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_THIN_LINEAR_TIMEOUTS)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_THIN_LINEAR_TIMEOUTS")] +pub fn tcp_thin_linear_timeouts(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_thin_linear_timeouts(fd.as_fd()) +} + +/// `setsockopt(fd, IPPROTO_TCP, TCP_CORK, value)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, solarish, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_CORK")] +pub fn set_tcp_cork(fd: Fd, value: bool) -> io::Result<()> { + backend::net::sockopt::set_tcp_cork(fd.as_fd(), value) +} + +/// `getsockopt(fd, IPPROTO_TCP, TCP_CORK)` +/// +/// See the [module-level documentation] for more. +/// +/// [module-level documentation]: self#references-for-get_tcp_-and-set_tcp_-functions +#[cfg(any(linux_like, solarish, target_os = "fuchsia"))] +#[inline] +#[doc(alias = "TCP_CORK")] +pub fn tcp_cork(fd: Fd) -> io::Result { + backend::net::sockopt::tcp_cork(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_PEERCRED)`—Get credentials of Unix domain +/// socket peer process. +/// +/// # References +/// - [Linux `unix`] +/// +/// [Linux `unix`]: https://man7.org/linux/man-pages/man7/unix.7.html +#[cfg(linux_kernel)] +#[doc(alias = "SO_PEERCRED")] +pub fn socket_peercred(fd: Fd) -> io::Result { + backend::net::sockopt::socket_peercred(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_SOCKET, SO_TXTIME)` — Get transmission timing configuration. +#[cfg(all(target_os = "linux", feature = "time"))] +#[doc(alias = "SO_TXTIME")] +pub fn get_txtime(fd: Fd) -> io::Result<(ClockId, TxTimeFlags)> { + backend::net::sockopt::get_txtime(fd.as_fd()) +} + +/// `setsockopt(fd, SOL_SOCKET, SO_TXTIME)` — Configure transmission timing. +#[cfg(all(target_os = "linux", feature = "time"))] +#[doc(alias = "SO_TXTIME")] +pub fn set_txtime(fd: Fd, clockid: ClockId, flags: TxTimeFlags) -> io::Result<()> { + backend::net::sockopt::set_txtime(fd.as_fd(), clockid, flags) +} + +/// `setsockopt(fd, SOL_XDP, XDP_UMEM_REG, value)` +/// +/// On kernel versions only supporting v1, the flags are ignored. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html#xdp-umem-reg-setsockopt +#[cfg(target_os = "linux")] +#[doc(alias = "XDP_UMEM_REG")] +pub fn set_xdp_umem_reg(fd: Fd, value: XdpUmemReg) -> io::Result<()> { + backend::net::sockopt::set_xdp_umem_reg(fd.as_fd(), value) +} + +/// `setsockopt(fd, SOL_XDP, XDP_UMEM_FILL_RING, value)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html#xdp-rx-tx-umem-fill-umem-completion-ring-setsockopts +#[cfg(target_os = "linux")] +#[doc(alias = "XDP_UMEM_FILL_RING")] +pub fn set_xdp_umem_fill_ring_size(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_xdp_umem_fill_ring_size(fd.as_fd(), value) +} + +/// `setsockopt(fd, SOL_XDP, XDP_UMEM_COMPLETION_RING, value)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html#xdp-rx-tx-umem-fill-umem-completion-ring-setsockopts +#[cfg(target_os = "linux")] +#[doc(alias = "XDP_UMEM_COMPLETION_RING")] +pub fn set_xdp_umem_completion_ring_size(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_xdp_umem_completion_ring_size(fd.as_fd(), value) +} + +/// `setsockopt(fd, SOL_XDP, XDP_TX_RING, value)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html#xdp-rx-tx-umem-fill-umem-completion-ring-setsockopts +#[cfg(target_os = "linux")] +#[doc(alias = "XDP_TX_RING")] +pub fn set_xdp_tx_ring_size(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_xdp_tx_ring_size(fd.as_fd(), value) +} + +/// `setsockopt(fd, SOL_XDP, XDP_RX_RING, value)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html#xdp-rx-tx-umem-fill-umem-completion-ring-setsockopts +#[cfg(target_os = "linux")] +#[doc(alias = "XDP_RX_RING")] +pub fn set_xdp_rx_ring_size(fd: Fd, value: u32) -> io::Result<()> { + backend::net::sockopt::set_xdp_rx_ring_size(fd.as_fd(), value) +} + +/// `getsockopt(fd, SOL_XDP, XDP_MMAP_OFFSETS)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html +#[cfg(all(linux_raw_dep, target_os = "linux"))] +#[doc(alias = "XDP_MMAP_OFFSETS")] +pub fn xdp_mmap_offsets(fd: Fd) -> io::Result { + backend::net::sockopt::xdp_mmap_offsets(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_XDP, XDP_STATISTICS)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html#xdp-statistics-getsockopt +#[cfg(all(linux_raw_dep, target_os = "linux"))] +#[doc(alias = "XDP_STATISTICS")] +pub fn xdp_statistics(fd: Fd) -> io::Result { + backend::net::sockopt::xdp_statistics(fd.as_fd()) +} + +/// `getsockopt(fd, SOL_XDP, XDP_OPTIONS)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/next/networking/af_xdp.html#xdp-options-getsockopt +#[cfg(target_os = "linux")] +#[doc(alias = "XDP_OPTIONS")] +pub fn xdp_options(fd: Fd) -> io::Result { + backend::net::sockopt::xdp_options(fd.as_fd()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_sizes() { + use c::c_int; + + // Backend code needs to cast these to `c_int` so make sure that cast + // isn't lossy. + assert_eq_size!(Timeout, c_int); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/types.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/types.rs new file mode 100644 index 0000000000000000000000000000000000000000..370f2468fb8f79ec4e4b941b4bd21950bd43b5ab --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/types.rs @@ -0,0 +1,2147 @@ +//! Types and constants for `rustix::net`. + +use crate::backend::c; +use crate::ffi; +use bitflags::bitflags; + +/// A type for holding raw integer socket types. +pub type RawSocketType = u32; + +/// `SOCK_*` constants for use with [`socket`]. +/// +/// [`socket`]: crate::net::socket() +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(transparent)] +pub struct SocketType(pub(crate) RawSocketType); + +#[rustfmt::skip] +impl SocketType { + /// `SOCK_STREAM` + pub const STREAM: Self = Self(c::SOCK_STREAM as _); + + /// `SOCK_DGRAM` + pub const DGRAM: Self = Self(c::SOCK_DGRAM as _); + + /// `SOCK_SEQPACKET` + #[cfg(not(any(target_os = "espidf", target_os = "horizon")))] + pub const SEQPACKET: Self = Self(c::SOCK_SEQPACKET as _); + + /// `SOCK_RAW` + #[cfg(not(any(target_os = "espidf", target_os = "horizon")))] + pub const RAW: Self = Self(c::SOCK_RAW as _); + + /// `SOCK_RDM` + #[cfg(not(any( + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox" + )))] + pub const RDM: Self = Self(c::SOCK_RDM as _); + + /// Constructs a `SocketType` from a raw integer. + #[inline] + pub const fn from_raw(raw: RawSocketType) -> Self { + Self(raw) + } + + /// Returns the raw integer for this `SocketType`. + #[inline] + pub const fn as_raw(self) -> RawSocketType { + self.0 + } +} + +/// A type for holding raw integer address families. +pub type RawAddressFamily = crate::ffi::c_ushort; + +/// `AF_*` constants for use with [`socket`], [`socket_with`], and +/// [`socketpair`]. +/// +/// [`socket`]: crate::net::socket() +/// [`socket_with`]: crate::net::socket_with +/// [`socketpair`]: crate::net::socketpair() +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(transparent)] +pub struct AddressFamily(pub(crate) RawAddressFamily); + +#[rustfmt::skip] +#[allow(non_upper_case_globals)] +impl AddressFamily { + /// `AF_UNSPEC` + pub const UNSPEC: Self = Self(c::AF_UNSPEC as _); + /// `AF_INET` + /// + /// # References + /// - [Linux] + /// + /// [Linux]: https://man7.org/linux/man-pages/man7/ip.7.html + pub const INET: Self = Self(c::AF_INET as _); + /// `AF_INET6` + /// + /// # References + /// - [Linux] + /// + /// [Linux]: https://man7.org/linux/man-pages/man7/ipv6.7.html + pub const INET6: Self = Self(c::AF_INET6 as _); + /// `AF_NETLINK` + /// + /// # References + /// - [Linux] + /// + /// [Linux]: https://man7.org/linux/man-pages/man7/netlink.7.html + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const NETLINK: Self = Self(c::AF_NETLINK as _); + /// `AF_UNIX`, aka `AF_LOCAL` + #[doc(alias = "LOCAL")] + pub const UNIX: Self = Self(c::AF_UNIX as _); + /// `AF_AX25` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const AX25: Self = Self(c::AF_AX25 as _); + /// `AF_IPX` + #[cfg(not(any( + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + )))] + pub const IPX: Self = Self(c::AF_IPX as _); + /// `AF_APPLETALK` + #[cfg(not(any( + target_os = "espidf", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const APPLETALK: Self = Self(c::AF_APPLETALK as _); + /// `AF_NETROM` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const NETROM: Self = Self(c::AF_NETROM as _); + /// `AF_BRIDGE` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const BRIDGE: Self = Self(c::AF_BRIDGE as _); + /// `AF_ATMPVC` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const ATMPVC: Self = Self(c::AF_ATMPVC as _); + /// `AF_X25` + #[cfg(not(any( + bsd, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const X25: Self = Self(c::AF_X25 as _); + /// `AF_ROSE` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const ROSE: Self = Self(c::AF_ROSE as _); + /// `AF_DECnet` + #[cfg(not(any( + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const DECnet: Self = Self(c::AF_DECnet as _); + /// `AF_NETBEUI` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const NETBEUI: Self = Self(c::AF_NETBEUI as _); + /// `AF_SECURITY` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const SECURITY: Self = Self(c::AF_SECURITY as _); + /// `AF_KEY` + #[cfg(not(any( + bsd, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const KEY: Self = Self(c::AF_KEY as _); + /// `AF_PACKET` + /// + /// # References + /// - [Linux] + /// + /// [Linux]: https://man7.org/linux/man-pages/man7/packet.7.html + #[cfg(not(any( + bsd, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const PACKET: Self = Self(c::AF_PACKET as _); + /// `AF_ASH` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const ASH: Self = Self(c::AF_ASH as _); + /// `AF_ECONET` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const ECONET: Self = Self(c::AF_ECONET as _); + /// `AF_ATMSVC` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const ATMSVC: Self = Self(c::AF_ATMSVC as _); + /// `AF_RDS` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const RDS: Self = Self(c::AF_RDS as _); + /// `AF_SNA` + #[cfg(not(any( + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const SNA: Self = Self(c::AF_SNA as _); + /// `AF_IRDA` + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const IRDA: Self = Self(c::AF_IRDA as _); + /// `AF_PPPOX` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const PPPOX: Self = Self(c::AF_PPPOX as _); + /// `AF_WANPIPE` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const WANPIPE: Self = Self(c::AF_WANPIPE as _); + /// `AF_LLC` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const LLC: Self = Self(c::AF_LLC as _); + /// `AF_CAN` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const CAN: Self = Self(c::AF_CAN as _); + /// `AF_TIPC` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const TIPC: Self = Self(c::AF_TIPC as _); + /// `AF_BLUETOOTH` + #[cfg(not(any( + apple, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "horizon", + target_os = "hurd", + target_os = "redox", + target_os = "vita", + )))] + pub const BLUETOOTH: Self = Self(c::AF_BLUETOOTH as _); + /// `AF_IUCV` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const IUCV: Self = Self(c::AF_IUCV as _); + /// `AF_RXRPC` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const RXRPC: Self = Self(c::AF_RXRPC as _); + /// `AF_ISDN` + #[cfg(not(any( + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "redox", + target_os = "vita", + )))] + pub const ISDN: Self = Self(c::AF_ISDN as _); + /// `AF_PHONET` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const PHONET: Self = Self(c::AF_PHONET as _); + /// `AF_IEEE802154` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const IEEE802154: Self = Self(c::AF_IEEE802154 as _); + /// `AF_802` + #[cfg(solarish)] + pub const EIGHT_ZERO_TWO: Self = Self(c::AF_802 as _); + #[cfg(target_os = "fuchsia")] + /// `AF_ALG` + pub const ALG: Self = Self(c::AF_ALG as _); + #[cfg(any(target_os = "freebsd", target_os = "netbsd", target_os = "nto"))] + /// `AF_ARP` + pub const ARP: Self = Self(c::AF_ARP as _); + /// `AF_ATM` + #[cfg(freebsdlike)] + pub const ATM: Self = Self(c::AF_ATM as _); + /// `AF_CAIF` + #[cfg(any(target_os = "android", target_os = "emscripten", target_os = "fuchsia"))] + pub const CAIF: Self = Self(c::AF_CAIF as _); + /// `AF_CCITT` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const CCITT: Self = Self(c::AF_CCITT as _); + /// `AF_CHAOS` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const CHAOS: Self = Self(c::AF_CHAOS as _); + /// `AF_CNT` + #[cfg(any(bsd, target_os = "nto"))] + pub const CNT: Self = Self(c::AF_CNT as _); + /// `AF_COIP` + #[cfg(any(bsd, target_os = "nto"))] + pub const COIP: Self = Self(c::AF_COIP as _); + /// `AF_DATAKIT` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const DATAKIT: Self = Self(c::AF_DATAKIT as _); + /// `AF_DLI` + #[cfg(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "nto" + ))] + pub const DLI: Self = Self(c::AF_DLI as _); + /// `AF_E164` + #[cfg(any(bsd, target_os = "nto"))] + pub const E164: Self = Self(c::AF_E164 as _); + /// `AF_ECMA` + #[cfg(any( + apple, + freebsdlike, + solarish, + target_os = "aix", + target_os = "nto", + target_os = "openbsd" + ))] + pub const ECMA: Self = Self(c::AF_ECMA as _); + /// `AF_ENCAP` + #[cfg(target_os = "openbsd")] + pub const ENCAP: Self = Self(c::AF_ENCAP as _); + /// `AF_FILE` + #[cfg(solarish)] + pub const FILE: Self = Self(c::AF_FILE as _); + /// `AF_GOSIP` + #[cfg(solarish)] + pub const GOSIP: Self = Self(c::AF_GOSIP as _); + /// `AF_HYLINK` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const HYLINK: Self = Self(c::AF_HYLINK as _); + /// `AF_IB` + #[cfg(any(target_os = "emscripten", target_os = "fuchsia"))] + pub const IB: Self = Self(c::AF_IB as _); + /// `AF_IMPLINK` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const IMPLINK: Self = Self(c::AF_IMPLINK as _); + /// `AF_IEEE80211` + #[cfg(any(apple, freebsdlike, target_os = "netbsd"))] + pub const IEEE80211: Self = Self(c::AF_IEEE80211 as _); + /// `AF_INET6_SDP` + #[cfg(target_os = "freebsd")] + pub const INET6_SDP: Self = Self(c::AF_INET6_SDP as _); + /// `AF_INET_OFFLOAD` + #[cfg(solarish)] + pub const INET_OFFLOAD: Self = Self(c::AF_INET_OFFLOAD as _); + /// `AF_INET_SDP` + #[cfg(target_os = "freebsd")] + pub const INET_SDP: Self = Self(c::AF_INET_SDP as _); + /// `AF_INTF` + #[cfg(target_os = "aix")] + pub const INTF: Self = Self(c::AF_INTF as _); + /// `AF_ISO` + #[cfg(any(bsd, target_os = "aix", target_os = "nto"))] + pub const ISO: Self = Self(c::AF_ISO as _); + /// `AF_LAT` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const LAT: Self = Self(c::AF_LAT as _); + /// `AF_LINK` + #[cfg(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "nto" + ))] + pub const LINK: Self = Self(c::AF_LINK as _); + /// `AF_MPLS` + #[cfg(any( + netbsdlike, + target_os = "dragonfly", + target_os = "emscripten", + target_os = "fuchsia" + ))] + pub const MPLS: Self = Self(c::AF_MPLS as _); + /// `AF_NATM` + #[cfg(any(bsd, target_os = "nto"))] + pub const NATM: Self = Self(c::AF_NATM as _); + /// `AF_NBS` + #[cfg(solarish)] + pub const NBS: Self = Self(c::AF_NBS as _); + /// `AF_NCA` + #[cfg(target_os = "illumos")] + pub const NCA: Self = Self(c::AF_NCA as _); + /// `AF_NDD` + #[cfg(target_os = "aix")] + pub const NDD: Self = Self(c::AF_NDD as _); + /// `AF_NDRV` + #[cfg(apple)] + pub const NDRV: Self = Self(c::AF_NDRV as _); + /// `AF_NETBIOS` + #[cfg(any(apple, freebsdlike))] + pub const NETBIOS: Self = Self(c::AF_NETBIOS as _); + /// `AF_NETGRAPH` + #[cfg(freebsdlike)] + pub const NETGRAPH: Self = Self(c::AF_NETGRAPH as _); + /// `AF_NIT` + #[cfg(solarish)] + pub const NIT: Self = Self(c::AF_NIT as _); + /// `AF_NOTIFY` + #[cfg(target_os = "haiku")] + pub const NOTIFY: Self = Self(c::AF_NOTIFY as _); + /// `AF_NFC` + #[cfg(any(target_os = "emscripten", target_os = "fuchsia"))] + pub const NFC: Self = Self(c::AF_NFC as _); + /// `AF_NS` + #[cfg(any(apple, solarish, netbsdlike, target_os = "aix", target_os = "nto"))] + pub const NS: Self = Self(c::AF_NS as _); + /// `AF_OROUTE` + #[cfg(target_os = "netbsd")] + pub const OROUTE: Self = Self(c::AF_OROUTE as _); + /// `AF_OSI` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const OSI: Self = Self(c::AF_OSI as _); + /// `AF_OSINET` + #[cfg(solarish)] + pub const OSINET: Self = Self(c::AF_OSINET as _); + /// `AF_POLICY` + #[cfg(solarish)] + pub const POLICY: Self = Self(c::AF_POLICY as _); + /// `AF_PPP` + #[cfg(apple)] + pub const PPP: Self = Self(c::AF_PPP as _); + /// `AF_PUP` + #[cfg(any(bsd, solarish, target_os = "aix", target_os = "nto"))] + pub const PUP: Self = Self(c::AF_PUP as _); + /// `AF_RIF` + #[cfg(target_os = "aix")] + pub const RIF: Self = Self(c::AF_RIF as _); + /// `AF_ROUTE` + #[cfg(any( + bsd, + solarish, + target_os = "android", + target_os = "emscripten", + target_os = "fuchsia", + target_os = "haiku", + target_os = "nto" + ))] + pub const ROUTE: Self = Self(c::AF_ROUTE as _); + /// `AF_SCLUSTER` + #[cfg(target_os = "freebsd")] + pub const SCLUSTER: Self = Self(c::AF_SCLUSTER as _); + /// `AF_SIP` + #[cfg(any(apple, target_os = "freebsd", target_os = "openbsd"))] + pub const SIP: Self = Self(c::AF_SIP as _); + /// `AF_SLOW` + #[cfg(target_os = "freebsd")] + pub const SLOW: Self = Self(c::AF_SLOW as _); + /// `AF_SYS_CONTROL` + #[cfg(apple)] + pub const SYS_CONTROL: Self = Self(c::AF_SYS_CONTROL as _); + /// `AF_SYSTEM` + #[cfg(apple)] + pub const SYSTEM: Self = Self(c::AF_SYSTEM as _); + /// `AF_TRILL` + #[cfg(solarish)] + pub const TRILL: Self = Self(c::AF_TRILL as _); + /// `AF_UTUN` + #[cfg(apple)] + pub const UTUN: Self = Self(c::AF_UTUN as _); + /// `AF_VSOCK` + #[cfg(any(apple, linux_kernel, target_os = "emscripten", target_os = "fuchsia"))] + pub const VSOCK: Self = Self(c::AF_VSOCK as _); + /// `AF_XDP` + #[cfg(target_os = "linux")] + pub const XDP: Self = Self(c::AF_XDP as _); + + /// Constructs a `AddressFamily` from a raw integer. + #[inline] + pub const fn from_raw(raw: RawAddressFamily) -> Self { + Self(raw) + } + + /// Returns the raw integer for this `AddressFamily`. + #[inline] + pub const fn as_raw(self) -> RawAddressFamily { + self.0 + } +} + +/// A type for holding raw integer protocols. +pub type RawProtocol = core::num::NonZeroU32; + +const fn new_raw_protocol(u: u32) -> RawProtocol { + match RawProtocol::new(u) { + Some(p) => p, + None => panic!("new_raw_protocol: protocol must be non-zero"), + } +} + +/// `IPPROTO_*` and other constants for use with [`socket`], [`socket_with`], +/// and [`socketpair`] when a nondefault value is desired. +/// +/// See the [`ipproto`], [`sysproto`], and [`netlink`] modules for possible +/// values. +/// +/// For the default values, such as `IPPROTO_IP` or `NETLINK_ROUTE`, pass +/// `None` as the `protocol` argument in these functions. +/// +/// [`socket`]: crate::net::socket() +/// [`socket_with`]: crate::net::socket_with +/// [`socketpair`]: crate::net::socketpair() +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(transparent)] +#[doc(alias = "IPPROTO_IP")] +#[doc(alias = "NETLINK_ROUTE")] +pub struct Protocol(pub(crate) RawProtocol); + +/// `IPPROTO_*` constants. +/// +/// For `IPPROTO_IP`, pass `None` as the `protocol` argument. +pub mod ipproto { + use super::{new_raw_protocol, Protocol}; + use crate::backend::c; + + /// `IPPROTO_ICMP` + pub const ICMP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_ICMP as _)); + /// `IPPROTO_IGMP` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "vita" + )))] + pub const IGMP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_IGMP as _)); + /// `IPPROTO_IPIP` + #[cfg(not(any( + solarish, + windows, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const IPIP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_IPIP as _)); + /// `IPPROTO_TCP` + pub const TCP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_TCP as _)); + /// `IPPROTO_EGP` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const EGP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_EGP as _)); + /// `IPPROTO_PUP` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "vita" + )))] + pub const PUP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_PUP as _)); + /// `IPPROTO_UDP` + pub const UDP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_UDP as _)); + /// `IPPROTO_IDP` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "vita" + )))] + pub const IDP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_IDP as _)); + /// `IPPROTO_TP` + #[cfg(not(any( + solarish, + windows, + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + )))] + pub const TP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_TP as _)); + /// `IPPROTO_DCCP` + #[cfg(not(any( + apple, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "dragonfly", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "openbsd", + target_os = "redox", + target_os = "vita", + )))] + pub const DCCP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_DCCP as _)); + /// `IPPROTO_IPV6` + pub const IPV6: Protocol = Protocol(new_raw_protocol(c::IPPROTO_IPV6 as _)); + /// `IPPROTO_RSVP` + #[cfg(not(any( + solarish, + windows, + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + )))] + pub const RSVP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_RSVP as _)); + /// `IPPROTO_GRE` + #[cfg(not(any( + solarish, + windows, + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + )))] + pub const GRE: Protocol = Protocol(new_raw_protocol(c::IPPROTO_GRE as _)); + /// `IPPROTO_ESP` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const ESP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_ESP as _)); + /// `IPPROTO_AH` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const AH: Protocol = Protocol(new_raw_protocol(c::IPPROTO_AH as _)); + /// `IPPROTO_MTP` + #[cfg(not(any( + solarish, + netbsdlike, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const MTP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_MTP as _)); + /// `IPPROTO_BEETPH` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const BEETPH: Protocol = Protocol(new_raw_protocol(c::IPPROTO_BEETPH as _)); + /// `IPPROTO_ENCAP` + #[cfg(not(any( + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + )))] + pub const ENCAP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_ENCAP as _)); + /// `IPPROTO_PIM` + #[cfg(not(any( + solarish, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + )))] + pub const PIM: Protocol = Protocol(new_raw_protocol(c::IPPROTO_PIM as _)); + /// `IPPROTO_COMP` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const COMP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_COMP as _)); + /// `IPPROTO_SCTP` + #[cfg(not(any( + solarish, + target_os = "cygwin", + target_os = "dragonfly", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "vita", + )))] + pub const SCTP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_SCTP as _)); + /// `IPPROTO_UDPLITE` + #[cfg(not(any( + apple, + netbsdlike, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "dragonfly", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const UDPLITE: Protocol = Protocol(new_raw_protocol(c::IPPROTO_UDPLITE as _)); + /// `IPPROTO_MPLS` + #[cfg(not(any( + apple, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "dragonfly", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "netbsd", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const MPLS: Protocol = Protocol(new_raw_protocol(c::IPPROTO_MPLS as _)); + /// `IPPROTO_ETHERNET` + #[cfg(linux_kernel)] + pub const ETHERNET: Protocol = Protocol(new_raw_protocol(c::IPPROTO_ETHERNET as _)); + /// `IPPROTO_RAW` + #[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] + pub const RAW: Protocol = Protocol(new_raw_protocol(c::IPPROTO_RAW as _)); + /// `IPPROTO_MPTCP` + #[cfg(not(any( + bsd, + solarish, + windows, + target_os = "aix", + target_os = "cygwin", + target_os = "emscripten", + target_os = "espidf", + target_os = "fuchsia", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const MPTCP: Protocol = Protocol(new_raw_protocol(c::IPPROTO_MPTCP as _)); + /// `IPPROTO_FRAGMENT` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const FRAGMENT: Protocol = Protocol(new_raw_protocol(c::IPPROTO_FRAGMENT as _)); + /// `IPPROTO_ICMPV6` + pub const ICMPV6: Protocol = Protocol(new_raw_protocol(c::IPPROTO_ICMPV6 as _)); + /// `IPPROTO_MH` + #[cfg(not(any( + apple, + netbsdlike, + solarish, + windows, + target_os = "cygwin", + target_os = "dragonfly", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "redox", + target_os = "vita", + )))] + pub const MH: Protocol = Protocol(new_raw_protocol(c::IPPROTO_MH as _)); + /// `IPPROTO_ROUTING` + #[cfg(not(any( + solarish, + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "redox", + target_os = "vita" + )))] + pub const ROUTING: Protocol = Protocol(new_raw_protocol(c::IPPROTO_ROUTING as _)); +} + +/// `SYSPROTO_*` constants. +pub mod sysproto { + #[cfg(apple)] + use { + super::{new_raw_protocol, Protocol}, + crate::backend::c, + }; + + /// `SYSPROTO_EVENT` + #[cfg(apple)] + pub const EVENT: Protocol = Protocol(new_raw_protocol(c::SYSPROTO_EVENT as _)); + + /// `SYSPROTO_CONTROL` + #[cfg(apple)] + pub const CONTROL: Protocol = Protocol(new_raw_protocol(c::SYSPROTO_CONTROL as _)); +} + +/// `NETLINK_*` constants. +/// +/// For `NETLINK_ROUTE`, pass `None` as the `protocol` argument. +pub mod netlink { + #[cfg(linux_kernel)] + use { + super::{new_raw_protocol, Protocol}, + crate::backend::c, + crate::backend::net::read_sockaddr::read_sockaddr_netlink, + crate::net::{ + addr::{call_with_sockaddr, SocketAddrArg, SocketAddrLen, SocketAddrOpaque}, + SocketAddrAny, + }, + core::mem, + }; + + /// `NETLINK_UNUSED` + #[cfg(linux_kernel)] + pub const UNUSED: Protocol = Protocol(new_raw_protocol(c::NETLINK_UNUSED as _)); + /// `NETLINK_USERSOCK` + #[cfg(linux_kernel)] + pub const USERSOCK: Protocol = Protocol(new_raw_protocol(c::NETLINK_USERSOCK as _)); + /// `NETLINK_FIREWALL` + #[cfg(linux_kernel)] + pub const FIREWALL: Protocol = Protocol(new_raw_protocol(c::NETLINK_FIREWALL as _)); + /// `NETLINK_SOCK_DIAG` + #[cfg(linux_kernel)] + pub const SOCK_DIAG: Protocol = Protocol(new_raw_protocol(c::NETLINK_SOCK_DIAG as _)); + /// `NETLINK_NFLOG` + #[cfg(linux_kernel)] + pub const NFLOG: Protocol = Protocol(new_raw_protocol(c::NETLINK_NFLOG as _)); + /// `NETLINK_XFRM` + #[cfg(linux_kernel)] + pub const XFRM: Protocol = Protocol(new_raw_protocol(c::NETLINK_XFRM as _)); + /// `NETLINK_SELINUX` + #[cfg(linux_kernel)] + pub const SELINUX: Protocol = Protocol(new_raw_protocol(c::NETLINK_SELINUX as _)); + /// `NETLINK_ISCSI` + #[cfg(linux_kernel)] + pub const ISCSI: Protocol = Protocol(new_raw_protocol(c::NETLINK_ISCSI as _)); + /// `NETLINK_AUDIT` + #[cfg(linux_kernel)] + pub const AUDIT: Protocol = Protocol(new_raw_protocol(c::NETLINK_AUDIT as _)); + /// `NETLINK_FIB_LOOKUP` + #[cfg(linux_kernel)] + pub const FIB_LOOKUP: Protocol = Protocol(new_raw_protocol(c::NETLINK_FIB_LOOKUP as _)); + /// `NETLINK_CONNECTOR` + #[cfg(linux_kernel)] + pub const CONNECTOR: Protocol = Protocol(new_raw_protocol(c::NETLINK_CONNECTOR as _)); + /// `NETLINK_NETFILTER` + #[cfg(linux_kernel)] + pub const NETFILTER: Protocol = Protocol(new_raw_protocol(c::NETLINK_NETFILTER as _)); + /// `NETLINK_IP6_FW` + #[cfg(linux_kernel)] + pub const IP6_FW: Protocol = Protocol(new_raw_protocol(c::NETLINK_IP6_FW as _)); + /// `NETLINK_DNRTMSG` + #[cfg(linux_kernel)] + pub const DNRTMSG: Protocol = Protocol(new_raw_protocol(c::NETLINK_DNRTMSG as _)); + /// `NETLINK_KOBJECT_UEVENT` + #[cfg(linux_kernel)] + pub const KOBJECT_UEVENT: Protocol = Protocol(new_raw_protocol(c::NETLINK_KOBJECT_UEVENT as _)); + /// `NETLINK_GENERIC` + // This is defined on FreeBSD too, but it has the value 0, so it doesn't + // fit in or `NonZeroU32`. It's unclear whether FreeBSD intends + // `NETLINK_GENERIC` to be the default when Linux has `NETLINK_ROUTE` as + // the default. + #[cfg(linux_kernel)] + pub const GENERIC: Protocol = Protocol(new_raw_protocol(c::NETLINK_GENERIC as _)); + /// `NETLINK_SCSITRANSPORT` + #[cfg(linux_kernel)] + pub const SCSITRANSPORT: Protocol = Protocol(new_raw_protocol(c::NETLINK_SCSITRANSPORT as _)); + /// `NETLINK_ECRYPTFS` + #[cfg(linux_kernel)] + pub const ECRYPTFS: Protocol = Protocol(new_raw_protocol(c::NETLINK_ECRYPTFS as _)); + /// `NETLINK_RDMA` + #[cfg(linux_kernel)] + pub const RDMA: Protocol = Protocol(new_raw_protocol(c::NETLINK_RDMA as _)); + /// `NETLINK_CRYPTO` + #[cfg(linux_kernel)] + pub const CRYPTO: Protocol = Protocol(new_raw_protocol(c::NETLINK_CRYPTO as _)); + /// `NETLINK_INET_DIAG` + #[cfg(linux_kernel)] + pub const INET_DIAG: Protocol = Protocol(new_raw_protocol(c::NETLINK_INET_DIAG as _)); + + /// A Netlink socket address. + /// + /// Used to bind to a Netlink socket. + /// + /// Not ABI compatible with `struct sockaddr_nl` + #[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Hash, Debug)] + #[cfg(linux_kernel)] + pub struct SocketAddrNetlink { + /// Port ID + pid: u32, + + /// Multicast groups mask + groups: u32, + } + + #[cfg(linux_kernel)] + impl SocketAddrNetlink { + /// Construct a netlink address + #[inline] + pub const fn new(pid: u32, groups: u32) -> Self { + Self { pid, groups } + } + + /// Return port id. + #[inline] + pub const fn pid(&self) -> u32 { + self.pid + } + + /// Set port id. + #[inline] + pub fn set_pid(&mut self, pid: u32) { + self.pid = pid; + } + + /// Return multicast groups mask. + #[inline] + pub const fn groups(&self) -> u32 { + self.groups + } + + /// Set multicast groups mask. + #[inline] + pub fn set_groups(&mut self, groups: u32) { + self.groups = groups; + } + } + + #[cfg(linux_kernel)] + #[allow(unsafe_code)] + // SAFETY: `with_sockaddr` calls `f` using `call_with_sockaddr`, which + // handles calling `f` with the needed preconditions. + unsafe impl SocketAddrArg for SocketAddrNetlink { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + let mut addr: c::sockaddr_nl = mem::zeroed(); + addr.nl_family = c::AF_NETLINK as _; + addr.nl_pid = self.pid; + addr.nl_groups = self.groups; + call_with_sockaddr(&addr, f) + } + } + + #[cfg(linux_kernel)] + impl From for SocketAddrAny { + #[inline] + fn from(from: SocketAddrNetlink) -> Self { + from.as_any() + } + } + + #[cfg(linux_kernel)] + impl TryFrom for SocketAddrNetlink { + type Error = crate::io::Errno; + + fn try_from(addr: SocketAddrAny) -> Result { + read_sockaddr_netlink(&addr) + } + } +} + +/// `ETH_P_*` constants. +// These are translated into 16-bit big-endian form because that's what the +// [`AddressFamily::PACKET`] address family [expects]. +// +// [expects]: https://man7.org/linux/man-pages/man7/packet.7.html +pub mod eth { + #[cfg(linux_kernel)] + use { + super::{new_raw_protocol, Protocol}, + crate::backend::c, + }; + + /// `ETH_P_LOOP` + #[cfg(linux_kernel)] + pub const LOOP: Protocol = Protocol(new_raw_protocol((c::ETH_P_LOOP as u16).to_be() as u32)); + /// `ETH_P_PUP` + #[cfg(linux_kernel)] + pub const PUP: Protocol = Protocol(new_raw_protocol((c::ETH_P_PUP as u16).to_be() as u32)); + /// `ETH_P_PUPAT` + #[cfg(linux_kernel)] + pub const PUPAT: Protocol = Protocol(new_raw_protocol((c::ETH_P_PUPAT as u16).to_be() as u32)); + /// `ETH_P_TSN` + #[cfg(linux_raw_dep)] + pub const TSN: Protocol = Protocol(new_raw_protocol((c::ETH_P_TSN as u16).to_be() as u32)); + /// `ETH_P_ERSPAN2` + #[cfg(linux_raw_dep)] + pub const ERSPAN2: Protocol = + Protocol(new_raw_protocol((c::ETH_P_ERSPAN2 as u16).to_be() as u32)); + /// `ETH_P_IP` + #[cfg(linux_kernel)] + pub const IP: Protocol = Protocol(new_raw_protocol((c::ETH_P_IP as u16).to_be() as u32)); + /// `ETH_P_X25` + #[cfg(linux_kernel)] + pub const X25: Protocol = Protocol(new_raw_protocol((c::ETH_P_X25 as u16).to_be() as u32)); + /// `ETH_P_ARP` + #[cfg(linux_kernel)] + pub const ARP: Protocol = Protocol(new_raw_protocol((c::ETH_P_ARP as u16).to_be() as u32)); + /// `ETH_P_BPQ` + #[cfg(linux_kernel)] + pub const BPQ: Protocol = Protocol(new_raw_protocol((c::ETH_P_BPQ as u16).to_be() as u32)); + /// `ETH_P_IEEEPUP` + #[cfg(linux_kernel)] + pub const IEEEPUP: Protocol = + Protocol(new_raw_protocol((c::ETH_P_IEEEPUP as u16).to_be() as u32)); + /// `ETH_P_IEEEPUPAT` + #[cfg(linux_kernel)] + pub const IEEEPUPAT: Protocol = + Protocol(new_raw_protocol((c::ETH_P_IEEEPUPAT as u16).to_be() as u32)); + /// `ETH_P_BATMAN` + #[cfg(linux_kernel)] + pub const BATMAN: Protocol = + Protocol(new_raw_protocol((c::ETH_P_BATMAN as u16).to_be() as u32)); + /// `ETH_P_DEC` + #[cfg(linux_kernel)] + pub const DEC: Protocol = Protocol(new_raw_protocol((c::ETH_P_DEC as u16).to_be() as u32)); + /// `ETH_P_DNA_DL` + #[cfg(linux_kernel)] + pub const DNA_DL: Protocol = + Protocol(new_raw_protocol((c::ETH_P_DNA_DL as u16).to_be() as u32)); + /// `ETH_P_DNA_RC` + #[cfg(linux_kernel)] + pub const DNA_RC: Protocol = + Protocol(new_raw_protocol((c::ETH_P_DNA_RC as u16).to_be() as u32)); + /// `ETH_P_DNA_RT` + #[cfg(linux_kernel)] + pub const DNA_RT: Protocol = + Protocol(new_raw_protocol((c::ETH_P_DNA_RT as u16).to_be() as u32)); + /// `ETH_P_LAT` + #[cfg(linux_kernel)] + pub const LAT: Protocol = Protocol(new_raw_protocol((c::ETH_P_LAT as u16).to_be() as u32)); + /// `ETH_P_DIAG` + #[cfg(linux_kernel)] + pub const DIAG: Protocol = Protocol(new_raw_protocol((c::ETH_P_DIAG as u16).to_be() as u32)); + /// `ETH_P_CUST` + #[cfg(linux_kernel)] + pub const CUST: Protocol = Protocol(new_raw_protocol((c::ETH_P_CUST as u16).to_be() as u32)); + /// `ETH_P_SCA` + #[cfg(linux_kernel)] + pub const SCA: Protocol = Protocol(new_raw_protocol((c::ETH_P_SCA as u16).to_be() as u32)); + /// `ETH_P_TEB` + #[cfg(linux_kernel)] + pub const TEB: Protocol = Protocol(new_raw_protocol((c::ETH_P_TEB as u16).to_be() as u32)); + /// `ETH_P_RARP` + #[cfg(linux_kernel)] + pub const RARP: Protocol = Protocol(new_raw_protocol((c::ETH_P_RARP as u16).to_be() as u32)); + /// `ETH_P_ATALK` + #[cfg(linux_kernel)] + pub const ATALK: Protocol = Protocol(new_raw_protocol((c::ETH_P_ATALK as u16).to_be() as u32)); + /// `ETH_P_AARP` + #[cfg(linux_kernel)] + pub const AARP: Protocol = Protocol(new_raw_protocol((c::ETH_P_AARP as u16).to_be() as u32)); + /// `ETH_P_8021Q` + #[cfg(linux_kernel)] + pub const P_8021Q: Protocol = + Protocol(new_raw_protocol((c::ETH_P_8021Q as u16).to_be() as u32)); + /// `ETH_P_ERSPAN` + #[cfg(linux_raw_dep)] + pub const ERSPAN: Protocol = + Protocol(new_raw_protocol((c::ETH_P_ERSPAN as u16).to_be() as u32)); + /// `ETH_P_IPX` + #[cfg(linux_kernel)] + pub const IPX: Protocol = Protocol(new_raw_protocol((c::ETH_P_IPX as u16).to_be() as u32)); + /// `ETH_P_IPV6` + #[cfg(linux_kernel)] + pub const IPV6: Protocol = Protocol(new_raw_protocol((c::ETH_P_IPV6 as u16).to_be() as u32)); + /// `ETH_P_PAUSE` + #[cfg(linux_kernel)] + pub const PAUSE: Protocol = Protocol(new_raw_protocol((c::ETH_P_PAUSE as u16).to_be() as u32)); + /// `ETH_P_SLOW` + #[cfg(linux_kernel)] + pub const SLOW: Protocol = Protocol(new_raw_protocol((c::ETH_P_SLOW as u16).to_be() as u32)); + /// `ETH_P_WCCP` + #[cfg(linux_kernel)] + pub const WCCP: Protocol = Protocol(new_raw_protocol((c::ETH_P_WCCP as u16).to_be() as u32)); + /// `ETH_P_MPLS_UC` + #[cfg(linux_kernel)] + pub const MPLS_UC: Protocol = + Protocol(new_raw_protocol((c::ETH_P_MPLS_UC as u16).to_be() as u32)); + /// `ETH_P_MPLS_MC` + #[cfg(linux_kernel)] + pub const MPLS_MC: Protocol = + Protocol(new_raw_protocol((c::ETH_P_MPLS_MC as u16).to_be() as u32)); + /// `ETH_P_ATMMPOA` + #[cfg(linux_kernel)] + pub const ATMMPOA: Protocol = + Protocol(new_raw_protocol((c::ETH_P_ATMMPOA as u16).to_be() as u32)); + /// `ETH_P_PPP_DISC` + #[cfg(linux_kernel)] + pub const PPP_DISC: Protocol = + Protocol(new_raw_protocol((c::ETH_P_PPP_DISC as u16).to_be() as u32)); + /// `ETH_P_PPP_SES` + #[cfg(linux_kernel)] + pub const PPP_SES: Protocol = + Protocol(new_raw_protocol((c::ETH_P_PPP_SES as u16).to_be() as u32)); + /// `ETH_P_LINK_CTL` + #[cfg(linux_kernel)] + pub const LINK_CTL: Protocol = + Protocol(new_raw_protocol((c::ETH_P_LINK_CTL as u16).to_be() as u32)); + /// `ETH_P_ATMFATE` + #[cfg(linux_kernel)] + pub const ATMFATE: Protocol = + Protocol(new_raw_protocol((c::ETH_P_ATMFATE as u16).to_be() as u32)); + /// `ETH_P_PAE` + #[cfg(linux_kernel)] + pub const PAE: Protocol = Protocol(new_raw_protocol((c::ETH_P_PAE as u16).to_be() as u32)); + /// `ETH_P_PROFINET` + #[cfg(linux_raw_dep)] + pub const PROFINET: Protocol = + Protocol(new_raw_protocol((c::ETH_P_PROFINET as u16).to_be() as u32)); + /// `ETH_P_REALTEK` + #[cfg(linux_raw_dep)] + pub const REALTEK: Protocol = + Protocol(new_raw_protocol((c::ETH_P_REALTEK as u16).to_be() as u32)); + /// `ETH_P_AOE` + #[cfg(linux_kernel)] + pub const AOE: Protocol = Protocol(new_raw_protocol((c::ETH_P_AOE as u16).to_be() as u32)); + /// `ETH_P_ETHERCAT` + #[cfg(linux_raw_dep)] + pub const ETHERCAT: Protocol = + Protocol(new_raw_protocol((c::ETH_P_ETHERCAT as u16).to_be() as u32)); + /// `ETH_P_8021AD` + #[cfg(linux_kernel)] + pub const P_8021AD: Protocol = + Protocol(new_raw_protocol((c::ETH_P_8021AD as u16).to_be() as u32)); + /// `ETH_P_802_EX1` + #[cfg(linux_kernel)] + pub const P_802_EX1: Protocol = + Protocol(new_raw_protocol((c::ETH_P_802_EX1 as u16).to_be() as u32)); + /// `ETH_P_PREAUTH` + #[cfg(linux_raw_dep)] + pub const PREAUTH: Protocol = + Protocol(new_raw_protocol((c::ETH_P_PREAUTH as u16).to_be() as u32)); + /// `ETH_P_TIPC` + #[cfg(linux_kernel)] + pub const TIPC: Protocol = Protocol(new_raw_protocol((c::ETH_P_TIPC as u16).to_be() as u32)); + /// `ETH_P_LLDP` + #[cfg(linux_raw_dep)] + pub const LLDP: Protocol = Protocol(new_raw_protocol((c::ETH_P_LLDP as u16).to_be() as u32)); + /// `ETH_P_MRP` + #[cfg(linux_raw_dep)] + pub const MRP: Protocol = Protocol(new_raw_protocol((c::ETH_P_MRP as u16).to_be() as u32)); + /// `ETH_P_MACSEC` + #[cfg(linux_kernel)] + pub const MACSEC: Protocol = + Protocol(new_raw_protocol((c::ETH_P_MACSEC as u16).to_be() as u32)); + /// `ETH_P_8021AH` + #[cfg(linux_kernel)] + pub const P_8021AH: Protocol = + Protocol(new_raw_protocol((c::ETH_P_8021AH as u16).to_be() as u32)); + /// `ETH_P_MVRP` + #[cfg(linux_kernel)] + pub const MVRP: Protocol = Protocol(new_raw_protocol((c::ETH_P_MVRP as u16).to_be() as u32)); + /// `ETH_P_1588` + #[cfg(linux_kernel)] + pub const P_1588: Protocol = Protocol(new_raw_protocol((c::ETH_P_1588 as u16).to_be() as u32)); + /// `ETH_P_NCSI` + #[cfg(linux_raw_dep)] + pub const NCSI: Protocol = Protocol(new_raw_protocol((c::ETH_P_NCSI as u16).to_be() as u32)); + /// `ETH_P_PRP` + #[cfg(linux_kernel)] + pub const PRP: Protocol = Protocol(new_raw_protocol((c::ETH_P_PRP as u16).to_be() as u32)); + /// `ETH_P_CFM` + #[cfg(linux_raw_dep)] + pub const CFM: Protocol = Protocol(new_raw_protocol((c::ETH_P_CFM as u16).to_be() as u32)); + /// `ETH_P_FCOE` + #[cfg(linux_kernel)] + pub const FCOE: Protocol = Protocol(new_raw_protocol((c::ETH_P_FCOE as u16).to_be() as u32)); + /// `ETH_P_IBOE` + #[cfg(linux_raw_dep)] + pub const IBOE: Protocol = Protocol(new_raw_protocol((c::ETH_P_IBOE as u16).to_be() as u32)); + /// `ETH_P_TDLS` + #[cfg(linux_kernel)] + pub const TDLS: Protocol = Protocol(new_raw_protocol((c::ETH_P_TDLS as u16).to_be() as u32)); + /// `ETH_P_FIP` + #[cfg(linux_kernel)] + pub const FIP: Protocol = Protocol(new_raw_protocol((c::ETH_P_FIP as u16).to_be() as u32)); + /// `ETH_P_80221` + #[cfg(linux_kernel)] + pub const P_80221: Protocol = + Protocol(new_raw_protocol((c::ETH_P_80221 as u16).to_be() as u32)); + /// `ETH_P_HSR` + #[cfg(linux_raw_dep)] + pub const HSR: Protocol = Protocol(new_raw_protocol((c::ETH_P_HSR as u16).to_be() as u32)); + /// `ETH_P_NSH` + #[cfg(linux_raw_dep)] + pub const NSH: Protocol = Protocol(new_raw_protocol((c::ETH_P_NSH as u16).to_be() as u32)); + /// `ETH_P_LOOPBACK` + #[cfg(linux_kernel)] + pub const LOOPBACK: Protocol = + Protocol(new_raw_protocol((c::ETH_P_LOOPBACK as u16).to_be() as u32)); + /// `ETH_P_QINQ1` + #[cfg(linux_kernel)] + pub const QINQ1: Protocol = Protocol(new_raw_protocol((c::ETH_P_QINQ1 as u16).to_be() as u32)); + /// `ETH_P_QINQ2` + #[cfg(linux_kernel)] + pub const QINQ2: Protocol = Protocol(new_raw_protocol((c::ETH_P_QINQ2 as u16).to_be() as u32)); + /// `ETH_P_QINQ3` + #[cfg(linux_kernel)] + pub const QINQ3: Protocol = Protocol(new_raw_protocol((c::ETH_P_QINQ3 as u16).to_be() as u32)); + /// `ETH_P_EDSA` + #[cfg(linux_kernel)] + pub const EDSA: Protocol = Protocol(new_raw_protocol((c::ETH_P_EDSA as u16).to_be() as u32)); + /// `ETH_P_DSA_8021Q` + #[cfg(linux_raw_dep)] + pub const DSA_8021Q: Protocol = + Protocol(new_raw_protocol((c::ETH_P_DSA_8021Q as u16).to_be() as u32)); + /// `ETH_P_DSA_A5PSW` + #[cfg(linux_raw_dep)] + pub const DSA_A5PSW: Protocol = + Protocol(new_raw_protocol((c::ETH_P_DSA_A5PSW as u16).to_be() as u32)); + /// `ETH_P_IFE` + #[cfg(linux_raw_dep)] + pub const IFE: Protocol = Protocol(new_raw_protocol((c::ETH_P_IFE as u16).to_be() as u32)); + /// `ETH_P_AF_IUCV` + #[cfg(linux_kernel)] + pub const AF_IUCV: Protocol = + Protocol(new_raw_protocol((c::ETH_P_AF_IUCV as u16).to_be() as u32)); + /// `ETH_P_802_3_MIN` + #[cfg(linux_kernel)] + pub const P_802_3_MIN: Protocol = + Protocol(new_raw_protocol((c::ETH_P_802_3_MIN as u16).to_be() as u32)); + /// `ETH_P_802_3` + #[cfg(linux_kernel)] + pub const P_802_3: Protocol = + Protocol(new_raw_protocol((c::ETH_P_802_3 as u16).to_be() as u32)); + /// `ETH_P_AX25` + #[cfg(linux_kernel)] + pub const AX25: Protocol = Protocol(new_raw_protocol((c::ETH_P_AX25 as u16).to_be() as u32)); + /// `ETH_P_ALL` + #[cfg(linux_raw_dep)] + pub const ALL: Protocol = Protocol(new_raw_protocol((c::ETH_P_ALL as u16).to_be() as u32)); + /// `ETH_P_802_2` + #[cfg(linux_kernel)] + pub const P_802_2: Protocol = + Protocol(new_raw_protocol((c::ETH_P_802_2 as u16).to_be() as u32)); + /// `ETH_P_SNAP` + #[cfg(linux_kernel)] + pub const SNAP: Protocol = Protocol(new_raw_protocol((c::ETH_P_SNAP as u16).to_be() as u32)); + /// `ETH_P_DDCMP` + #[cfg(linux_kernel)] + pub const DDCMP: Protocol = Protocol(new_raw_protocol((c::ETH_P_DDCMP as u16).to_be() as u32)); + /// `ETH_P_WAN_PPP` + #[cfg(linux_kernel)] + pub const WAN_PPP: Protocol = + Protocol(new_raw_protocol((c::ETH_P_WAN_PPP as u16).to_be() as u32)); + /// `ETH_P_PPP_MP` + #[cfg(linux_kernel)] + pub const PPP_MP: Protocol = + Protocol(new_raw_protocol((c::ETH_P_PPP_MP as u16).to_be() as u32)); + /// `ETH_P_LOCALTALK` + #[cfg(linux_kernel)] + pub const LOCALTALK: Protocol = + Protocol(new_raw_protocol((c::ETH_P_LOCALTALK as u16).to_be() as u32)); + /// `ETH_P_CAN` + #[cfg(linux_raw_dep)] + pub const CAN: Protocol = Protocol(new_raw_protocol((c::ETH_P_CAN as u16).to_be() as u32)); + /// `ETH_P_CANFD` + #[cfg(linux_kernel)] + pub const CANFD: Protocol = Protocol(new_raw_protocol((c::ETH_P_CANFD as u16).to_be() as u32)); + /// `ETH_P_CANXL` + #[cfg(linux_raw_dep)] + pub const CANXL: Protocol = Protocol(new_raw_protocol((c::ETH_P_CANXL as u16).to_be() as u32)); + /// `ETH_P_PPPTALK` + #[cfg(linux_kernel)] + pub const PPPTALK: Protocol = + Protocol(new_raw_protocol((c::ETH_P_PPPTALK as u16).to_be() as u32)); + /// `ETH_P_TR_802_2` + #[cfg(linux_kernel)] + pub const TR_802_2: Protocol = + Protocol(new_raw_protocol((c::ETH_P_TR_802_2 as u16).to_be() as u32)); + /// `ETH_P_MOBITEX` + #[cfg(linux_kernel)] + pub const MOBITEX: Protocol = + Protocol(new_raw_protocol((c::ETH_P_MOBITEX as u16).to_be() as u32)); + /// `ETH_P_CONTROL` + #[cfg(linux_kernel)] + pub const CONTROL: Protocol = + Protocol(new_raw_protocol((c::ETH_P_CONTROL as u16).to_be() as u32)); + /// `ETH_P_IRDA` + #[cfg(linux_kernel)] + pub const IRDA: Protocol = Protocol(new_raw_protocol((c::ETH_P_IRDA as u16).to_be() as u32)); + /// `ETH_P_ECONET` + #[cfg(linux_kernel)] + pub const ECONET: Protocol = + Protocol(new_raw_protocol((c::ETH_P_ECONET as u16).to_be() as u32)); + /// `ETH_P_HDLC` + #[cfg(linux_kernel)] + pub const HDLC: Protocol = Protocol(new_raw_protocol((c::ETH_P_HDLC as u16).to_be() as u32)); + /// `ETH_P_ARCNET` + #[cfg(linux_kernel)] + pub const ARCNET: Protocol = + Protocol(new_raw_protocol((c::ETH_P_ARCNET as u16).to_be() as u32)); + /// `ETH_P_DSA` + #[cfg(linux_raw_dep)] + pub const DSA: Protocol = Protocol(new_raw_protocol((c::ETH_P_DSA as u16).to_be() as u32)); + /// `ETH_P_TRAILER` + #[cfg(linux_kernel)] + pub const TRAILER: Protocol = + Protocol(new_raw_protocol((c::ETH_P_TRAILER as u16).to_be() as u32)); + /// `ETH_P_PHONET` + #[cfg(linux_kernel)] + pub const PHONET: Protocol = + Protocol(new_raw_protocol((c::ETH_P_PHONET as u16).to_be() as u32)); + /// `ETH_P_IEEE802154` + #[cfg(linux_kernel)] + pub const IEEE802154: Protocol = + Protocol(new_raw_protocol((c::ETH_P_IEEE802154 as u16).to_be() as u32)); + /// `ETH_P_CAIF` + #[cfg(linux_kernel)] + pub const CAIF: Protocol = Protocol(new_raw_protocol((c::ETH_P_CAIF as u16).to_be() as u32)); + /// `ETH_P_XDSA` + #[cfg(linux_raw_dep)] + pub const XDSA: Protocol = Protocol(new_raw_protocol((c::ETH_P_XDSA as u16).to_be() as u32)); + /// `ETH_P_MAP` + #[cfg(linux_raw_dep)] + pub const MAP: Protocol = Protocol(new_raw_protocol((c::ETH_P_MAP as u16).to_be() as u32)); + /// `ETH_P_MCTP` + #[cfg(linux_raw_dep)] + pub const MCTP: Protocol = Protocol(new_raw_protocol((c::ETH_P_MCTP as u16).to_be() as u32)); +} + +#[rustfmt::skip] +impl Protocol { + /// Constructs a `Protocol` from a raw integer. + #[inline] + pub const fn from_raw(raw: RawProtocol) -> Self { + Self(raw) + } + + /// Returns the raw integer for this `Protocol`. + #[inline] + pub const fn as_raw(self) -> RawProtocol { + self.0 + } +} + +/// `SHUT_*` constants for use with [`shutdown`]. +/// +/// [`shutdown`]: crate::net::shutdown +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(u32)] +pub enum Shutdown { + /// `SHUT_RD`—Disable further read operations. + Read = c::SHUT_RD as _, + /// `SHUT_WR`—Disable further write operations. + Write = c::SHUT_WR as _, + /// `SHUT_RDWR`—Disable further read and write operations. + Both = c::SHUT_RDWR as _, +} + +bitflags! { + /// `SOCK_*` constants for use with [`socket_with`], [`accept_with`] and + /// [`acceptfrom_with`]. + /// + /// [`socket_with`]: crate::net::socket_with + /// [`accept_with`]: crate::net::accept_with + /// [`acceptfrom_with`]: crate::net::acceptfrom_with + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct SocketFlags: ffi::c_uint { + /// `SOCK_NONBLOCK` + #[cfg(not(any( + apple, + windows, + target_os = "aix", + target_os = "espidf", + target_os = "haiku", + target_os = "horizon", + target_os = "nto", + target_os = "vita", + )))] + const NONBLOCK = bitcast!(c::SOCK_NONBLOCK); + + /// `SOCK_CLOEXEC` + #[cfg(not(any(apple, windows, target_os = "aix", target_os = "haiku")))] + const CLOEXEC = bitcast!(c::SOCK_CLOEXEC); + + // This deliberately lacks a `const _ = !0`, so that users can use + // `from_bits_truncate` to extract the `SocketFlags` from a flags + // value that also includes a `SocketType`. + } +} + +#[cfg(all(target_os = "linux", feature = "time"))] +bitflags! { + /// Flags for use with [`set_txtime`]. + /// + /// [`set_txtime`]: crate::net::sockopt::set_txtime + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct TxTimeFlags: u32 { + /// `SOF_TXTIME_DEADLINE_MODE` + const DEADLINE_MODE = bitcast!(c::SOF_TXTIME_DEADLINE_MODE); + /// `SOF_TXTIME_REPORT_ERRORS` + const REPORT_ERRORS = bitcast!(c::SOF_TXTIME_REPORT_ERRORS); + } +} + +/// `AF_XDP` related types and constants. +#[cfg(target_os = "linux")] +pub mod xdp { + use crate::backend::net::read_sockaddr::read_sockaddr_xdp; + use crate::fd::{AsRawFd, BorrowedFd}; + use crate::net::addr::{call_with_sockaddr, SocketAddrArg, SocketAddrLen, SocketAddrOpaque}; + use crate::net::SocketAddrAny; + + use super::{bitflags, c}; + + bitflags! { + /// `XDP_OPTIONS_*` constants returned by [`get_xdp_options`]. + /// + /// [`get_xdp_options`]: crate::net::sockopt::get_xdp_options + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpOptionsFlags: u32 { + /// `XDP_OPTIONS_ZEROCOPY` + const XDP_OPTIONS_ZEROCOPY = bitcast!(c::XDP_OPTIONS_ZEROCOPY); + } + } + + // Constant needs to be cast because bindgen does generate a `u32` but the + // struct expects a `u16`. + // + bitflags! { + /// `XDP_*` constants for use in [`SocketAddrXdp`]. + #[repr(transparent)] + #[derive(Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, Debug)] + pub struct SocketAddrXdpFlags: u16 { + /// `XDP_SHARED_UMEM` + const XDP_SHARED_UMEM = bitcast!(c::XDP_SHARED_UMEM as u16); + /// `XDP_COPY` + const XDP_COPY = bitcast!(c::XDP_COPY as u16); + /// `XDP_COPY` + const XDP_ZEROCOPY = bitcast!(c::XDP_ZEROCOPY as u16); + /// `XDP_USE_NEED_WAKEUP` + const XDP_USE_NEED_WAKEUP = bitcast!(c::XDP_USE_NEED_WAKEUP as u16); + // requires kernel 6.6 + /// `XDP_USE_SG` + const XDP_USE_SG = bitcast!(c::XDP_USE_SG as u16); + } + } + + bitflags! { + /// `XDP_RING_*` constants for use in fill and/or Tx ring. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpRingFlags: u32 { + /// `XDP_RING_NEED_WAKEUP` + const XDP_RING_NEED_WAKEUP = bitcast!(c::XDP_RING_NEED_WAKEUP); + } + } + + bitflags! { + /// `XDP_UMEM_*` constants for use in [`XdpUmemReg`]. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpUmemRegFlags: u32 { + /// `XDP_UMEM_UNALIGNED_CHUNK_FLAG` + const XDP_UMEM_UNALIGNED_CHUNK_FLAG = bitcast!(c::XDP_UMEM_UNALIGNED_CHUNK_FLAG); + } + } + + /// A XDP socket address. + /// + /// Used to bind to XDP socket. + /// + /// Not ABI compatible with `struct sockaddr_xdp`. + /// + /// To add a shared UMEM file descriptor, use + /// [`SocketAddrXdpWithSharedUmem`]. + // + #[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash, Debug)] + pub struct SocketAddrXdp { + /// Flags. + sxdp_flags: SocketAddrXdpFlags, + /// Interface index. + sxdp_ifindex: u32, + /// Queue ID. + sxdp_queue_id: u32, + } + + impl SocketAddrXdp { + /// Construct a new XDP address. + #[inline] + pub const fn new(flags: SocketAddrXdpFlags, interface_index: u32, queue_id: u32) -> Self { + Self { + sxdp_flags: flags, + sxdp_ifindex: interface_index, + sxdp_queue_id: queue_id, + } + } + + /// Return flags. + #[inline] + pub fn flags(&self) -> SocketAddrXdpFlags { + self.sxdp_flags + } + + /// Set flags. + #[inline] + pub fn set_flags(&mut self, flags: SocketAddrXdpFlags) { + self.sxdp_flags = flags; + } + + /// Return interface index. + #[inline] + pub fn interface_index(&self) -> u32 { + self.sxdp_ifindex + } + + /// Set interface index. + #[inline] + pub fn set_interface_index(&mut self, interface_index: u32) { + self.sxdp_ifindex = interface_index; + } + + /// Return queue ID. + #[inline] + pub fn queue_id(&self) -> u32 { + self.sxdp_queue_id + } + + /// Set queue ID. + #[inline] + pub fn set_queue_id(&mut self, queue_id: u32) { + self.sxdp_queue_id = queue_id; + } + } + + #[allow(unsafe_code)] + // SAFETY: `with_sockaddr` calls `f` using `call_with_sockaddr`, which + // handles calling `f` with the needed preconditions. + unsafe impl SocketAddrArg for SocketAddrXdp { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + let addr = c::sockaddr_xdp { + sxdp_family: c::AF_XDP as _, + sxdp_flags: self.flags().bits(), + sxdp_ifindex: self.interface_index(), + sxdp_queue_id: self.queue_id(), + sxdp_shared_umem_fd: !0, + }; + + call_with_sockaddr(&addr, f) + } + } + + impl From for SocketAddrAny { + #[inline] + fn from(from: SocketAddrXdp) -> Self { + from.as_any() + } + } + + impl TryFrom for SocketAddrXdp { + type Error = crate::io::Errno; + + fn try_from(addr: SocketAddrAny) -> Result { + read_sockaddr_xdp(&addr) + } + } + + /// An XDP socket address with a shared UMEM file descriptor. + /// + /// This implements `SocketAddrArg` so that it can be passed to [`bind`]. + /// + /// [`bind`]: crate::net::bind + #[derive(Debug)] + pub struct SocketAddrXdpWithSharedUmem<'a> { + /// XDP address. + pub addr: SocketAddrXdp, + /// Shared UMEM file descriptor. + pub shared_umem_fd: BorrowedFd<'a>, + } + + #[allow(unsafe_code)] + // SAFETY: `with_sockaddr` calls `f` using `call_with_sockaddr`, which + // handles calling `f` with the needed preconditions. + unsafe impl<'a> SocketAddrArg for SocketAddrXdpWithSharedUmem<'a> { + unsafe fn with_sockaddr( + &self, + f: impl FnOnce(*const SocketAddrOpaque, SocketAddrLen) -> R, + ) -> R { + let addr = c::sockaddr_xdp { + sxdp_family: c::AF_XDP as _, + sxdp_flags: self.addr.flags().bits(), + sxdp_ifindex: self.addr.interface_index(), + sxdp_queue_id: self.addr.queue_id(), + sxdp_shared_umem_fd: self.shared_umem_fd.as_raw_fd() as u32, + }; + + call_with_sockaddr(&addr, f) + } + } + + /// XDP ring offset. + /// + /// Used to mmap rings from kernel. + /// + /// Not ABI compatible with `struct xdp_ring_offset`. + // + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpRingOffset { + /// Producer offset. + pub producer: u64, + /// Consumer offset. + pub consumer: u64, + /// Descriptors offset. + pub desc: u64, + /// Flags offset. + /// + /// Is `None` if the kernel version (<5.4) does not yet support flags. + pub flags: Option, + } + + /// XDP mmap offsets. + /// + /// Not ABI compatible with `struct xdp_mmap_offsets` + // + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpMmapOffsets { + /// Rx ring offsets. + pub rx: XdpRingOffset, + /// Tx ring offsets. + pub tx: XdpRingOffset, + /// Fill ring offsets. + pub fr: XdpRingOffset, + /// Completion ring offsets. + pub cr: XdpRingOffset, + } + + /// XDP umem registration. + /// + /// `struct xdp_umem_reg` + // + #[repr(C)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpUmemReg { + /// Start address of UMEM. + pub addr: u64, + /// Umem length in bytes. + pub len: u64, + /// Chunk size in bytes. + pub chunk_size: u32, + /// Headroom in bytes. + pub headroom: u32, + /// Flags. + /// + /// Requires kernel version 5.4. + pub flags: XdpUmemRegFlags, + /// `AF_XDP` TX metadata length + /// + /// Requires kernel version 6.8. + pub tx_metadata_len: u32, + } + + /// XDP statistics. + /// + /// Not ABI compatible with `struct xdp_statistics` + // + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpStatistics { + /// Rx dropped. + pub rx_dropped: u64, + /// Rx invalid descriptors. + pub rx_invalid_descs: u64, + /// Tx invalid descriptors. + pub tx_invalid_descs: u64, + /// Rx ring full. + /// + /// Is `None` if the kernel version (<5.9) does not yet support flags. + pub rx_ring_full: Option, + /// Rx fill ring empty descriptors. + /// + /// Is `None` if the kernel version (<5.9) does not yet support flags. + pub rx_fill_ring_empty_descs: Option, + /// Tx ring empty descriptors. + /// + /// Is `None` if the kernel version (<5.9) does not yet support flags. + pub tx_ring_empty_descs: Option, + } + + /// XDP options. + /// + /// Requires kernel version 5.3. + /// `struct xdp_options` + // + #[repr(C)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpOptions { + /// Flags. + pub flags: XdpOptionsFlags, + } + + /// XDP rx/tx frame descriptor. + /// + /// `struct xdp_desc` + // + #[repr(C)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpDesc { + /// Offset from the start of the UMEM. + pub addr: u64, + /// Length of packet in bytes. + pub len: u32, + /// Options. + pub options: XdpDescOptions, + } + + #[cfg(target_os = "linux")] + bitflags! { + /// `XDP_*` constants for use in [`XdpDesc`]. + /// + /// Requires kernel version 6.6. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct XdpDescOptions: u32 { + /// `XDP_PKT_CONTD` + const XDP_PKT_CONTD = bitcast!(c::XDP_PKT_CONTD); + } + } + + /// Offset for mmapping rx ring. + pub const XDP_PGOFF_RX_RING: u64 = c::XDP_PGOFF_RX_RING as u64; + /// Offset for mmapping tx ring. + pub const XDP_PGOFF_TX_RING: u64 = c::XDP_PGOFF_TX_RING as u64; + /// Offset for mmapping fill ring. + pub const XDP_UMEM_PGOFF_FILL_RING: u64 = c::XDP_UMEM_PGOFF_FILL_RING; + /// Offset for mmapping completion ring. + pub const XDP_UMEM_PGOFF_COMPLETION_RING: u64 = c::XDP_UMEM_PGOFF_COMPLETION_RING; + + /// Offset used to shift the [`XdpDesc`] addr to the right to extract the + /// address offset in unaligned mode. + pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: u64 = c::XSK_UNALIGNED_BUF_OFFSET_SHIFT as u64; + /// Mask used to binary `and` the [`XdpDesc`] addr to extract the address + /// without the offset carried in the upper 16 bits of the address in + /// unaligned mode. + pub const XSK_UNALIGNED_BUF_ADDR_MASK: u64 = c::XSK_UNALIGNED_BUF_ADDR_MASK; +} + +/// UNIX credentials of socket peer, for use with [`get_socket_peercred`] +/// [`SendAncillaryMessage::ScmCredentials`] and +/// [`RecvAncillaryMessage::ScmCredentials`]. +/// +/// [`get_socket_peercred`]: crate::net::sockopt::socket_peercred +/// [`SendAncillaryMessage::ScmCredentials`]: crate::net::SendAncillaryMessage::ScmCredentials +/// [`RecvAncillaryMessage::ScmCredentials`]: crate::net::RecvAncillaryMessage::ScmCredentials +#[cfg(linux_kernel)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(C)] +pub struct UCred { + /// Process ID of peer + pub pid: crate::pid::Pid, + /// User ID of peer + pub uid: crate::ugid::Uid, + /// Group ID of peer + pub gid: crate::ugid::Gid, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_sizes() { + #[cfg(target_os = "linux")] + use crate::backend::c; + use crate::ffi::c_int; + use crate::net::addr::SocketAddrStorage; + use core::mem::transmute; + + // Backend code needs to cast these to `c_int` so make sure that cast isn't + // lossy. + assert_eq_size!(RawProtocol, c_int); + assert_eq_size!(Protocol, c_int); + assert_eq_size!(Option, c_int); + assert_eq_size!(Option, c_int); + assert_eq_size!(RawSocketType, c_int); + assert_eq_size!(SocketType, c_int); + assert_eq_size!(SocketFlags, c_int); + assert_eq_size!(SocketAddrStorage, c::sockaddr_storage); + + // Rustix doesn't depend on `Option` matching the ABI of a raw + // integer for correctness, but it should work nonetheless. + #[allow(unsafe_code)] + unsafe { + let t: Option = None; + assert_eq!(0_u32, transmute::, u32>(t)); + + let t: Option = Some(Protocol::from_raw(RawProtocol::new(4567).unwrap())); + assert_eq!(4567_u32, transmute::, u32>(t)); + } + + #[cfg(linux_kernel)] + assert_eq_size!(UCred, libc::ucred); + + #[cfg(target_os = "linux")] + assert_eq_size!(super::xdp::XdpUmemReg, c::xdp_umem_reg); + #[cfg(target_os = "linux")] + assert_eq_size!(super::xdp::XdpOptions, c::xdp_options); + #[cfg(target_os = "linux")] + assert_eq_size!(super::xdp::XdpDesc, c::xdp_desc); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/wsa.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/wsa.rs new file mode 100644 index 0000000000000000000000000000000000000000..0ad4db5eb63803cefc572aa281e34e2ee7c02681 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/net/wsa.rs @@ -0,0 +1,49 @@ +use crate::io; +use core::mem::MaybeUninit; +use windows_sys::Win32::Networking::WinSock::{WSACleanup, WSAGetLastError, WSAStartup, WSADATA}; + +/// `WSAStartup()`—Initialize process-wide Windows support for sockets. +/// +/// On Windows, it's necessary to initialize the sockets subsystem before +/// using sockets APIs. The function performs the necessary initialization. +/// +/// # References +/// - [Winsock] +/// +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsastartup +pub fn wsa_startup() -> io::Result { + // Request version 2.2, which has been the latest version since far older + // versions of Windows than we support here. For more information about + // the version, see [here]. + // + // [here]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsastartup#remarks + let version = 0x202; + let mut data = MaybeUninit::uninit(); + unsafe { + let ret = WSAStartup(version, data.as_mut_ptr()); + if ret == 0 { + Ok(data.assume_init()) + } else { + Err(io::Errno::from_raw_os_error(WSAGetLastError())) + } + } +} + +/// `WSACleanup()`—Clean up process-wide Windows support for sockets. +/// +/// In a program where `init` is called, if sockets are no longer necessary, +/// this function releases associated resources. +/// +/// # References +/// - [Winsock] +/// +/// [Winsock]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsacleanup +pub fn wsa_cleanup() -> io::Result<()> { + unsafe { + if WSACleanup() == 0 { + Ok(()) + } else { + Err(io::Errno::from_raw_os_error(WSAGetLastError())) + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/auxv.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/auxv.rs new file mode 100644 index 0000000000000000000000000000000000000000..2e502fdb378797887f3a588d1588ab0b7fe8d481 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/auxv.rs @@ -0,0 +1,110 @@ +use crate::backend; +#[cfg(any( + linux_raw, + any( + all(target_os = "android", target_pointer_width = "64"), + target_os = "linux", + ) +))] +use crate::ffi::CStr; + +/// `sysconf(_SC_PAGESIZE)`—Returns the process' page size. +/// +/// Also known as `getpagesize`. +/// +/// # References +/// - [POSIX] +/// - [Linux `sysconf`] +/// - [Linux `getpagesize`] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sysconf.html +/// [Linux `sysconf`]: https://man7.org/linux/man-pages/man3/sysconf.3.html +/// [Linux `getpagesize`]: https://man7.org/linux/man-pages/man2/getpagesize.2.html +#[inline] +#[doc(alias = "PAGESIZE")] +#[doc(alias = "PAGE_SIZE")] +#[doc(alias = "_SC_PAGESIZE")] +#[doc(alias = "_SC_PAGE_SIZE")] +#[doc(alias = "getpagesize")] +pub fn page_size() -> usize { + backend::param::auxv::page_size() +} + +/// `sysconf(_SC_CLK_TCK)`—Returns the process' clock ticks per second. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sysconf.html +/// [Linux]: https://man7.org/linux/man-pages/man3/sysconf.3.html +#[cfg(not(any(target_os = "horizon", target_os = "vita", target_os = "wasi")))] +#[inline] +#[doc(alias = "_SC_CLK_TCK")] +pub fn clock_ticks_per_second() -> u64 { + backend::param::auxv::clock_ticks_per_second() +} + +/// `(getauxval(AT_HWCAP), getauxval(AT_HWCAP2)`—Returns the Linux "hwcap" +/// data. +/// +/// Return the Linux `AT_HWCAP` and `AT_HWCAP2` values passed to the +/// current process. Returns 0 for each value if it is not available. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/getauxval.3.html +#[cfg(any( + linux_raw, + any( + all(target_os = "android", target_pointer_width = "64"), + target_os = "linux", + ) +))] +#[inline] +pub fn linux_hwcap() -> (usize, usize) { + backend::param::auxv::linux_hwcap() +} + +/// `getauxval(AT_MINSIGSTKSZ)`—Returns the Linux "minsigstksz" data. +/// +/// Return the Linux `AT_MINSIGSTKSZ` value passed to the current process. +/// Returns 0 if it is not available. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/getauxval.3.html +#[cfg(any( + linux_raw, + any( + all(target_os = "android", target_pointer_width = "64"), + target_os = "linux", + ) +))] +#[inline] +pub fn linux_minsigstksz() -> usize { + backend::param::auxv::linux_minsigstksz() +} + +/// `getauxval(AT_EXECFN)`—Returns the Linux "execfn" string. +/// +/// Return the string that Linux has recorded as the filesystem path to the +/// executable. Returns an empty string if the string is not available. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/getauxval.3.html +#[cfg(any( + linux_raw, + any( + all(target_os = "android", target_pointer_width = "64"), + target_os = "linux", + ) +))] +#[inline] +pub fn linux_execfn() -> &'static CStr { + backend::param::auxv::linux_execfn() +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/init.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/init.rs new file mode 100644 index 0000000000000000000000000000000000000000..88b35f2a04c54fb657cc6479e94071a02fec2c33 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/init.rs @@ -0,0 +1,23 @@ +//! rustix's `init` function. +//! +//! # Safety +//! +//! When "use-explicitly-provided-auxv" is enabled, the `init` function must be +//! called before any other function in this module. It is unsafe because it +//! operates on raw pointers. +#![allow(unsafe_code)] + +use crate::backend; + +/// Initialize process-wide state. +/// +/// # Safety +/// +/// This must be passed a pointer to the original environment variable block +/// set up by the OS at process startup, and it must be called before any other +/// rustix functions are called. +#[inline] +#[doc(hidden)] +pub unsafe fn init(envp: *mut *mut u8) { + backend::param::auxv::init(envp) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..f0de9d41c02230cd304be541a35b802f6c170f1a --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/param/mod.rs @@ -0,0 +1,14 @@ +//! Process parameters. +//! +//! These values correspond to `sysconf` in POSIX, and the auxv array in Linux. +//! Despite the POSIX name “sysconf”, these aren't *system* configuration +//! parameters; they're *process* configuration parameters, as they may differ +//! between different processes on the same system. + +mod auxv; +#[cfg(all(feature = "use-explicitly-provided-auxv", not(libc)))] +mod init; + +pub use auxv::*; +#[cfg(all(feature = "use-explicitly-provided-auxv", not(libc)))] +pub use init::init; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/arg.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/arg.rs new file mode 100644 index 0000000000000000000000000000000000000000..851d3a69bdc46ef6f2f246163072c5eb7b5c8a06 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/arg.rs @@ -0,0 +1,1050 @@ +//! Convenient and efficient string argument passing. +//! +//! This module defines the `Arg` trait and implements it for several common +//! string types. This allows users to pass any of these string types directly +//! to rustix APIs with string arguments, and it allows rustix to implement +//! NUL-termination without the need for copying or dynamic allocation where +//! possible. + +use crate::ffi::CStr; +use crate::io; +use crate::path::{DecInt, SMALL_PATH_BUFFER_SIZE}; +#[cfg(feature = "alloc")] +use alloc::borrow::ToOwned as _; +use core::mem::MaybeUninit; +use core::{ptr, slice, str}; +#[cfg(feature = "std")] +use std::ffi::{OsStr, OsString}; +#[cfg(all(feature = "std", target_os = "hermit"))] +use std::os::hermit::ext::ffi::{OsStrExt, OsStringExt}; +#[cfg(all(feature = "std", unix))] +use std::os::unix::ffi::{OsStrExt as _, OsStringExt as _}; +#[cfg(all(feature = "std", target_os = "vxworks"))] +use std::os::vxworks::ext::ffi::{OsStrExt, OsStringExt}; +#[cfg(all( + feature = "std", + target_os = "wasi", + any(not(target_env = "p2"), wasip2) +))] +use std::os::wasi::ffi::{OsStrExt, OsStringExt}; +#[cfg(feature = "std")] +use std::path::{Component, Components, Iter, Path, PathBuf}; +#[cfg(feature = "alloc")] +use {crate::ffi::CString, alloc::borrow::Cow}; +#[cfg(feature = "alloc")] +use {alloc::string::String, alloc::vec::Vec}; + +/// A trait for passing path arguments. +/// +/// This is similar to [`AsRef`]`<`[`Path`]`>`, but is implemented for more +/// kinds of strings and can convert into more kinds of strings. +/// +/// # Examples +/// +/// ``` +/// # #[cfg(any(feature = "fs", feature = "net"))] +/// use rustix::ffi::CStr; +/// use rustix::io; +/// # #[cfg(any(feature = "fs", feature = "net"))] +/// use rustix::path::Arg; +/// +/// # #[cfg(any(feature = "fs", feature = "net"))] +/// pub fn touch(path: P) -> io::Result<()> { +/// let path = path.into_c_str()?; +/// _touch(&path) +/// } +/// +/// # #[cfg(any(feature = "fs", feature = "net"))] +/// fn _touch(path: &CStr) -> io::Result<()> { +/// // implementation goes here +/// Ok(()) +/// } +/// ``` +/// +/// Users can then call `touch("foo")`, `touch(cstr!("foo"))`, +/// `touch(Path::new("foo"))`, or many other things. +/// +/// [`AsRef`]: std::convert::AsRef +pub trait Arg { + /// Returns a view of this string as a string slice. + fn as_str(&self) -> io::Result<&str>; + + /// Returns a potentially-lossy rendering of this string as a + /// `Cow<'_, str>`. + #[cfg(feature = "alloc")] + fn to_string_lossy(&self) -> Cow<'_, str>; + + /// Returns a view of this string as a maybe-owned [`CStr`]. + #[cfg(feature = "alloc")] + fn as_cow_c_str(&self) -> io::Result>; + + /// Consumes `self` and returns a view of this string as a maybe-owned + /// [`CStr`]. + #[cfg(feature = "alloc")] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b; + + /// Runs a closure with `self` passed in as a `&CStr`. + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result; +} + +/// Runs a closure on `arg` where `A` is mapped to a `&CStr` +pub fn option_into_with_c_str(arg: Option, f: F) -> io::Result +where + A: Arg + Sized, + F: FnOnce(Option<&CStr>) -> io::Result, +{ + if let Some(arg) = arg { + arg.into_with_c_str(|p| f(Some(p))) + } else { + f(None) + } +} + +impl Arg for &str { + #[inline] + fn as_str(&self) -> io::Result<&str> { + Ok(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + Cow::Borrowed(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Owned( + CString::new(*self).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned( + CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + with_c_str(self.as_bytes(), f) + } +} + +#[cfg(feature = "alloc")] +impl Arg for &String { + #[inline] + fn as_str(&self) -> io::Result<&str> { + Ok(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + Cow::Borrowed(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Owned( + CString::new(String::as_str(self)).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.as_str().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + with_c_str(self.as_bytes(), f) + } +} + +#[cfg(feature = "alloc")] +impl Arg for String { + #[inline] + fn as_str(&self) -> io::Result<&str> { + Ok(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + Cow::Borrowed(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Owned( + CString::new(self.as_str()).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned( + CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(&CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?) + } +} + +#[cfg(feature = "std")] +impl Arg for &OsStr { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + OsStr::to_string_lossy(self) + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + #[cfg(all(target_os = "wasi", target_env = "p2", not(wasip2)))] + return self.to_str().ok_or(io::Errno::INVAL)?.into_c_str(); + #[cfg(any(wasip2, not(all(target_os = "wasi", target_env = "p2"))))] + return self.as_bytes().into_c_str(); + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + #[cfg(all(target_os = "wasi", target_env = "p2", not(wasip2)))] + return self.as_str()?.into_with_c_str(f); + + #[cfg(any(wasip2, not(all(target_os = "wasi", target_env = "p2"))))] + return self.as_bytes().into_with_c_str(f); + } +} + +#[cfg(feature = "std")] +impl Arg for &OsString { + #[inline] + fn as_str(&self) -> io::Result<&str> { + OsString::as_os_str(self).to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + self.as_os_str().to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + self.as_os_str().into_with_c_str(f) + } +} + +#[cfg(feature = "std")] +impl Arg for OsString { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.as_os_str().to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + self.as_os_str().to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + #[cfg(all(target_os = "wasi", target_env = "p2", not(wasip2)))] + return self + .into_string() + .map_err(|_strng_err| io::Errno::INVAL)? + .into_c_str(); + #[cfg(any(wasip2, not(all(target_os = "wasi", target_env = "p2"))))] + self.into_vec().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(&self.into_c_str()?) + } +} + +#[cfg(feature = "std")] +impl Arg for &Path { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.as_os_str().to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + Path::to_string_lossy(self) + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + self.as_os_str().into_with_c_str(f) + } +} + +#[cfg(feature = "std")] +impl Arg for &PathBuf { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.as_os_str().to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + self.as_path().to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.as_path().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + self.as_os_str().into_with_c_str(f) + } +} + +#[cfg(feature = "std")] +impl Arg for PathBuf { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.as_os_str().to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + self.as_os_str().to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.into_os_string().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + self.into_os_string().into_with_c_str(f) + } +} + +impl Arg for &CStr { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.to_str().map_err(|_utf8_err| io::Errno::INVAL) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + CStr::to_string_lossy(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Borrowed(self)) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Borrowed(self)) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(self) + } +} + +#[cfg(feature = "alloc")] +impl Arg for &CString { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.to_str().map_err(|_utf8_err| io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + CStr::to_string_lossy(self) + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Borrowed(self)) + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Borrowed(self)) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(self) + } +} + +#[cfg(feature = "alloc")] +impl Arg for CString { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.to_str().map_err(|_utf8_err| io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + CStr::to_string_lossy(self) + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Borrowed(self)) + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned(self)) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(&self) + } +} + +#[cfg(feature = "alloc")] +impl<'a> Arg for Cow<'a, str> { + #[inline] + fn as_str(&self) -> io::Result<&str> { + Ok(self) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + Cow::Borrowed(self) + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Owned( + CString::new(self.as_ref()).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned( + match self { + Cow::Owned(s) => CString::new(s), + Cow::Borrowed(s) => CString::new(s), + } + .map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + with_c_str(self.as_bytes(), f) + } +} + +#[cfg(feature = "std")] +impl<'a> Arg for Cow<'a, OsStr> { + #[inline] + fn as_str(&self) -> io::Result<&str> { + (**self).to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + (**self).to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + (&**self).into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + match self { + Cow::Owned(os) => os.into_c_str(), + Cow::Borrowed(os) => os.into_c_str(), + } + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + (&*self).into_with_c_str(f) + } +} + +#[cfg(feature = "alloc")] +impl<'a> Arg for Cow<'a, CStr> { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.to_str().map_err(|_utf8_err| io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + let borrow: &CStr = core::borrow::Borrow::borrow(self); + borrow.to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Borrowed(self)) + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(self) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(&self) + } +} + +#[cfg(feature = "std")] +impl<'a> Arg for Component<'a> { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.as_os_str().to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + self.as_os_str().to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.as_os_str().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + self.as_os_str().into_with_c_str(f) + } +} + +#[cfg(feature = "std")] +impl<'a> Arg for Components<'a> { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.as_path().to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + self.as_path().to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_path().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.as_path().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + self.as_path().into_with_c_str(f) + } +} + +#[cfg(feature = "std")] +impl<'a> Arg for Iter<'a> { + #[inline] + fn as_str(&self) -> io::Result<&str> { + self.as_path().to_str().ok_or(io::Errno::INVAL) + } + + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + self.as_path().to_string_lossy() + } + + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + self.as_path().into_c_str() + } + + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + self.as_path().into_c_str() + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + self.as_path().into_with_c_str(f) + } +} + +impl Arg for &[u8] { + #[inline] + fn as_str(&self) -> io::Result<&str> { + str::from_utf8(self).map_err(|_utf8_err| io::Errno::INVAL) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + String::from_utf8_lossy(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Owned( + CString::new(*self).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned( + CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + with_c_str(self, f) + } +} + +#[cfg(feature = "alloc")] +impl Arg for &Vec { + #[inline] + fn as_str(&self) -> io::Result<&str> { + str::from_utf8(self).map_err(|_utf8_err| io::Errno::INVAL) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + String::from_utf8_lossy(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Owned( + CString::new(self.as_slice()).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned( + CString::new(self.as_slice()).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + with_c_str(self, f) + } +} + +#[cfg(feature = "alloc")] +impl Arg for Vec { + #[inline] + fn as_str(&self) -> io::Result<&str> { + str::from_utf8(self).map_err(|_utf8_err| io::Errno::INVAL) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + String::from_utf8_lossy(self) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Owned( + CString::new(self.as_slice()).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned( + CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?, + )) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(&CString::new(self).map_err(|_cstr_err| io::Errno::INVAL)?) + } +} + +impl Arg for DecInt { + #[inline] + fn as_str(&self) -> io::Result<&str> { + Ok(self.as_str()) + } + + #[cfg(feature = "alloc")] + #[inline] + fn to_string_lossy(&self) -> Cow<'_, str> { + Cow::Borrowed(self.as_str()) + } + + #[cfg(feature = "alloc")] + #[inline] + fn as_cow_c_str(&self) -> io::Result> { + Ok(Cow::Borrowed(self.as_c_str())) + } + + #[cfg(feature = "alloc")] + #[inline] + fn into_c_str<'b>(self) -> io::Result> + where + Self: 'b, + { + Ok(Cow::Owned(self.as_c_str().to_owned())) + } + + #[inline] + fn into_with_c_str(self, f: F) -> io::Result + where + Self: Sized, + F: FnOnce(&CStr) -> io::Result, + { + f(self.as_c_str()) + } +} + +/// Runs a closure with `bytes` passed in as a `&CStr`. +#[allow(unsafe_code, clippy::int_plus_one)] +#[inline] +fn with_c_str(bytes: &[u8], f: F) -> io::Result +where + F: FnOnce(&CStr) -> io::Result, +{ + // Most paths are less than `SMALL_PATH_BUFFER_SIZE` long. The rest can go + // through the dynamic allocation path. If you're opening many files in a + // directory with a long path, consider opening the directory and using + // `openat` to open the files under it, which will avoid this, and is often + // faster in the OS as well. + + // Test with `>=` so that we have room for the trailing NUL. + if bytes.len() >= SMALL_PATH_BUFFER_SIZE { + return with_c_str_slow_path(bytes, f); + } + + // Taken from + // + let mut buf = MaybeUninit::<[u8; SMALL_PATH_BUFFER_SIZE]>::uninit(); + let buf_ptr = buf.as_mut_ptr().cast::(); + + // This helps test our safety condition below. + debug_assert!(bytes.len() + 1 <= SMALL_PATH_BUFFER_SIZE); + + // SAFETY: `bytes.len() < SMALL_PATH_BUFFER_SIZE` which means we have space + // for `bytes.len() + 1` `u8`s: + unsafe { + ptr::copy_nonoverlapping(bytes.as_ptr(), buf_ptr, bytes.len()); + buf_ptr.add(bytes.len()).write(b'\0'); + } + + // SAFETY: We just wrote the bytes above and they will remain valid for the + // duration of `f` because `buf` doesn't get dropped until the end of the + // function. + match CStr::from_bytes_with_nul(unsafe { slice::from_raw_parts(buf_ptr, bytes.len() + 1) }) { + Ok(s) => f(s), + Err(_) => Err(io::Errno::INVAL), + } +} + +/// The slow path which handles any length. In theory OS's only support up to +/// `PATH_MAX`, but we let the OS enforce that. +#[allow(unsafe_code, clippy::int_plus_one)] +#[cold] +fn with_c_str_slow_path(bytes: &[u8], f: F) -> io::Result +where + F: FnOnce(&CStr) -> io::Result, +{ + #[cfg(feature = "alloc")] + { + f(&CString::new(bytes).map_err(|_cstr_err| io::Errno::INVAL)?) + } + + #[cfg(not(feature = "alloc"))] + { + #[cfg(all( + libc, + not(any( + target_os = "espidf", + target_os = "horizon", + target_os = "hurd", + target_os = "vita", + target_os = "wasi" + )) + ))] + const LARGE_PATH_BUFFER_SIZE: usize = libc::PATH_MAX as usize; + #[cfg(linux_raw)] + const LARGE_PATH_BUFFER_SIZE: usize = linux_raw_sys::general::PATH_MAX as usize; + #[cfg(any( + target_os = "espidf", + target_os = "horizon", + target_os = "hurd", + target_os = "vita", + target_os = "wasi" + ))] + const LARGE_PATH_BUFFER_SIZE: usize = 4096 as usize; // TODO: upstream this + + // Taken from + // + let mut buf = MaybeUninit::<[u8; LARGE_PATH_BUFFER_SIZE]>::uninit(); + let buf_ptr = buf.as_mut_ptr().cast::(); + + // This helps test our safety condition below. + if bytes.len() + 1 > LARGE_PATH_BUFFER_SIZE { + return Err(io::Errno::NAMETOOLONG); + } + + // SAFETY: `bytes.len() < LARGE_PATH_BUFFER_SIZE` which means we have + // space for `bytes.len() + 1` `u8`s: + unsafe { + ptr::copy_nonoverlapping(bytes.as_ptr(), buf_ptr, bytes.len()); + buf_ptr.add(bytes.len()).write(b'\0'); + } + + // SAFETY: We just wrote the bytes above and they will remain valid for + // the duration of `f` because `buf` doesn't get dropped until the end + // of the function. + match CStr::from_bytes_with_nul(unsafe { slice::from_raw_parts(buf_ptr, bytes.len() + 1) }) + { + Ok(s) => f(s), + Err(_) => Err(io::Errno::INVAL), + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/dec_int.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/dec_int.rs new file mode 100644 index 0000000000000000000000000000000000000000..5b6e2f813d107010ab5b44ce29399ef4b5f9fd40 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/dec_int.rs @@ -0,0 +1,261 @@ +//! Efficient decimal integer formatting. +//! +//! # Safety +//! +//! This uses `CStr::from_bytes_with_nul_unchecked` and +//! `str::from_utf8_unchecked`on the buffer that it filled itself. +#![allow(unsafe_code)] + +use crate::backend::fd::{AsFd, AsRawFd as _}; +use crate::ffi::CStr; +use core::fmt; +use core::hint::unreachable_unchecked; +use core::mem::{self, MaybeUninit}; +use core::num::{NonZeroU8, NonZeroUsize}; +#[cfg(all(feature = "std", unix))] +use std::os::unix::ffi::OsStrExt; +#[cfg(all( + feature = "std", + target_os = "wasi", + any(not(target_env = "p2"), wasip2) +))] +use std::os::wasi::ffi::OsStrExt; +#[cfg(feature = "std")] +use {std::ffi::OsStr, std::path::Path}; + +/// Format an integer into a decimal `Path` component, without constructing a +/// temporary `PathBuf` or `String`. +/// +/// This is used for opening paths such as `/proc/self/fd/` on Linux. +/// +/// # Examples +/// +/// ``` +/// # #[cfg(any(feature = "fs", feature = "net"))] +/// use rustix::path::DecInt; +/// +/// # #[cfg(any(feature = "fs", feature = "net"))] +/// assert_eq!( +/// format!("hello {}", DecInt::new(9876).as_ref().display()), +/// "hello 9876" +/// ); +/// ``` +#[derive(Clone)] +pub struct DecInt { + buf: [MaybeUninit; BUF_LEN], + len: NonZeroU8, +} + +/// Enough to hold an {u,i}64 and NUL terminator. +const BUF_LEN: usize = U64_MAX_STR_LEN + 1; + +/// Maximum length of a formatted [`u64`]. +const U64_MAX_STR_LEN: usize = "18446744073709551615".len(); + +/// Maximum length of a formatted [`i64`]. +#[allow(dead_code)] +const I64_MAX_STR_LEN: usize = "-9223372036854775808".len(); + +const _: () = assert!(U64_MAX_STR_LEN == I64_MAX_STR_LEN); + +mod private { + pub trait Sealed: Copy { + type Unsigned: super::Integer; + + fn as_unsigned(self) -> (bool, Self::Unsigned); + fn eq_zero(self) -> bool; + fn div_mod_10(&mut self) -> u8; + } + + macro_rules! impl_unsigned { + ($($ty:ty)+) => { $( + impl Sealed for $ty { + type Unsigned = $ty; + + #[inline] + fn as_unsigned(self) -> (bool, $ty) { + (false, self) + } + + #[inline] + fn eq_zero(self) -> bool { + self == 0 + } + + #[inline] + fn div_mod_10(&mut self) -> u8 { + let result = (*self % 10) as u8; + *self /= 10; + result + } + } + )+ } + } + + macro_rules! impl_signed { + ($($signed:ty : $unsigned:ty)+) => { $( + impl Sealed for $signed { + type Unsigned = $unsigned; + + #[inline] + fn as_unsigned(self) -> (bool, $unsigned) { + if self >= 0 { + (false, self as $unsigned) + } else { + (true, !(self as $unsigned) + 1) + } + } + + #[inline] + fn eq_zero(self) -> bool { + unimplemented!() + } + + #[inline] + fn div_mod_10(&mut self) -> u8 { + unimplemented!() + } + } + )+ } + } + + impl_unsigned!(u8 u16 u32 u64); + impl_signed!(i8:u8 i16:u16 i32:u32 i64:u64); + + #[cfg(any( + target_pointer_width = "16", + target_pointer_width = "32", + target_pointer_width = "64" + ))] + const _: () = { + impl_unsigned!(usize); + impl_signed!(isize:usize); + }; +} + +/// An integer that can be used by [`DecInt::new`]. +pub trait Integer: private::Sealed {} + +impl Integer for i8 {} +impl Integer for i16 {} +impl Integer for i32 {} +impl Integer for i64 {} +impl Integer for u8 {} +impl Integer for u16 {} +impl Integer for u32 {} +impl Integer for u64 {} + +#[cfg(any( + target_pointer_width = "16", + target_pointer_width = "32", + target_pointer_width = "64" +))] +const _: () = { + impl Integer for isize {} + impl Integer for usize {} +}; + +impl DecInt { + /// Construct a new path component from an integer. + pub fn new(i: Int) -> Self { + use private::Sealed as _; + + let (is_neg, mut i) = i.as_unsigned(); + let mut len = 1; + let mut buf = [MaybeUninit::uninit(); BUF_LEN]; + buf[BUF_LEN - 1] = MaybeUninit::new(b'\0'); + + // We use `loop { …; if cond { break } }` instead of + // `while !cond { … }` so the loop is entered at least once. This way + // `0` does not need a special handling. + loop { + len += 1; + if len > BUF_LEN { + // SAFETY: A stringified `i64`/`u64` cannot be longer than + // `U64_MAX_STR_LEN` bytes. + unsafe { unreachable_unchecked() }; + } + buf[BUF_LEN - len] = MaybeUninit::new(b'0' + i.div_mod_10()); + if i.eq_zero() { + break; + } + } + + if is_neg { + len += 1; + if len > BUF_LEN { + // SAFETY: A stringified `i64`/`u64` cannot be longer than + // `U64_MAX_STR_LEN` bytes. + unsafe { unreachable_unchecked() }; + } + buf[BUF_LEN - len] = MaybeUninit::new(b'-'); + } + + Self { + buf, + len: NonZeroU8::new(len as u8).unwrap(), + } + } + + /// Construct a new path component from a file descriptor. + #[inline] + pub fn from_fd(fd: Fd) -> Self { + Self::new(fd.as_fd().as_raw_fd()) + } + + /// Return the raw byte buffer as a `&str`. + #[inline] + pub fn as_str(&self) -> &str { + // SAFETY: `DecInt` always holds a formatted decimal number, so it's + // always valid UTF-8. + unsafe { core::str::from_utf8_unchecked(self.as_bytes()) } + } + + /// Return the raw byte buffer as a `&CStr`. + #[inline] + pub fn as_c_str(&self) -> &CStr { + let bytes_with_nul = self.as_bytes_with_nul(); + debug_assert!(CStr::from_bytes_with_nul(bytes_with_nul).is_ok()); + + // SAFETY: `self.buf` holds a single decimal ASCII representation and + // at least one extra NUL byte. + unsafe { CStr::from_bytes_with_nul_unchecked(bytes_with_nul) } + } + + /// Return the raw byte buffer including the NUL byte. + #[inline] + pub fn as_bytes_with_nul(&self) -> &[u8] { + let len = NonZeroUsize::from(self.len).get(); + if len > BUF_LEN { + // SAFETY: A stringified `i64`/`u64` cannot be longer than + // `U64_MAX_STR_LEN` bytes. + unsafe { unreachable_unchecked() }; + } + let init = &self.buf[(self.buf.len() - len)..]; + // SAFETY: We're guaranteed to have initialized `len + 1` bytes. + unsafe { mem::transmute::<&[MaybeUninit], &[u8]>(init) } + } + + /// Return the raw byte buffer. + #[inline] + pub fn as_bytes(&self) -> &[u8] { + let bytes = self.as_bytes_with_nul(); + &bytes[..bytes.len() - 1] + } +} + +#[cfg(feature = "std")] +#[cfg(any(not(target_os = "wasi"), not(target_env = "p2"), wasip2))] +impl AsRef for DecInt { + #[inline] + fn as_ref(&self) -> &Path { + let as_os_str: &OsStr = OsStrExt::from_bytes(self.as_bytes()); + Path::new(as_os_str) + } +} + +impl fmt::Debug for DecInt { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.as_str().fmt(f) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..627716d858fedf4cc28a1f4390d4df92c6b606e7 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/path/mod.rs @@ -0,0 +1,9 @@ +//! Filesystem path operations. + +mod arg; +mod dec_int; + +pub use arg::{option_into_with_c_str, Arg}; +pub use dec_int::{DecInt, Integer}; + +pub(crate) const SMALL_PATH_BUFFER_SIZE: usize = 256; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/chdir.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/chdir.rs new file mode 100644 index 0000000000000000000000000000000000000000..8c37397996a51794ee9d46b7d4d14231a4220064 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/chdir.rs @@ -0,0 +1,98 @@ +#[cfg(not(target_os = "fuchsia"))] +use crate::backend::fd::AsFd; +#[cfg(feature = "fs")] +use crate::path; +#[cfg(any(feature = "fs", not(target_os = "fuchsia")))] +use crate::{backend, io}; +#[cfg(all(feature = "alloc", feature = "fs"))] +use { + crate::ffi::{CStr, CString}, + crate::path::SMALL_PATH_BUFFER_SIZE, + alloc::vec::Vec, +}; + +/// `chdir(path)`—Change the current working directory. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/chdir.html +/// [Linux]: https://man7.org/linux/man-pages/man2/chdir.2.html +#[inline] +#[cfg(feature = "fs")] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +pub fn chdir(path: P) -> io::Result<()> { + path.into_with_c_str(backend::process::syscalls::chdir) +} + +/// `fchdir(fd)`—Change the current working directory. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/fchdir.html +/// [Linux]: https://man7.org/linux/man-pages/man2/fchdir.2.html +#[cfg(not(target_os = "fuchsia"))] +#[inline] +pub fn fchdir(fd: Fd) -> io::Result<()> { + backend::process::syscalls::fchdir(fd.as_fd()) +} + +/// `getcwd`—Return the current working directory. +/// +/// If `reuse` already has available capacity, reuse it if possible. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getcwd.html +/// [Linux]: https://man7.org/linux/man-pages/man3/getcwd.3.html +#[cfg(all(feature = "alloc", feature = "fs"))] +#[cfg(not(target_os = "wasi"))] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +#[inline] +pub fn getcwd>>(reuse: B) -> io::Result { + _getcwd(reuse.into()) +} + +#[cfg(all(feature = "alloc", feature = "fs"))] +#[allow(unsafe_code)] +fn _getcwd(mut buffer: Vec) -> io::Result { + buffer.clear(); + buffer.reserve(SMALL_PATH_BUFFER_SIZE); + + loop { + match backend::process::syscalls::getcwd(buffer.spare_capacity_mut()) { + Err(io::Errno::RANGE) => { + // Use `Vec` reallocation strategy to grow capacity + // exponentially. + buffer.reserve(buffer.capacity() + 1); + } + Ok(_) => { + // SAFETY: + // - “These functions return a null-terminated string” + // - [POSIX definition 3.375: String]: “A contiguous sequence + // of bytes terminated by and including the first null byte.” + // + // Thus, there will be a single NUL byte at the end of the + // string. + // + // [POSIX definition 3.375: String]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html#tag_03_375 + unsafe { + buffer.set_len( + CStr::from_ptr(buffer.as_ptr().cast()) + .to_bytes_with_nul() + .len(), + ); + + return Ok(CString::from_vec_with_nul_unchecked(buffer)); + } + } + Err(errno) => return Err(errno), + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/chroot.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/chroot.rs new file mode 100644 index 0000000000000000000000000000000000000000..7c2476db399c4d767c61f51c18503a8454a610ef --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/chroot.rs @@ -0,0 +1,16 @@ +#[cfg(feature = "fs")] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +use crate::{backend, io, path}; + +/// `chroot(path)`—Change the process root directory. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/chroot.2.html +#[cfg(feature = "fs")] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +#[inline] +pub fn chroot(path: P) -> io::Result<()> { + path.into_with_c_str(backend::process::syscalls::chroot) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/exit.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/exit.rs new file mode 100644 index 0000000000000000000000000000000000000000..e882da14f9d756ee1bb6d5edffda785ef3c9dfed --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/exit.rs @@ -0,0 +1,36 @@ +use crate::backend; + +/// `EXIT_SUCCESS` for use with [`exit`]. +/// +/// [`exit`]: std::process::exit +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stdlib.h.html +/// [Linux]: https://man7.org/linux/man-pages/man3/exit.3.html +pub const EXIT_SUCCESS: i32 = backend::c::EXIT_SUCCESS; + +/// `EXIT_FAILURE` for use with [`exit`]. +/// +/// [`exit`]: std::process::exit +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stdlib.h.html +/// [Linux]: https://man7.org/linux/man-pages/man3/exit.3.html +pub const EXIT_FAILURE: i32 = backend::c::EXIT_FAILURE; + +/// The exit status used by a process terminated with a [`Signal::ABORT`] +/// signal. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://tldp.org/LDP/abs/html/exitcodes.html +/// [`Signal::ABORT`]: crate::process::Signal::ABORT +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] +pub const EXIT_SIGNALED_SIGABRT: i32 = backend::c::EXIT_SIGNALED_SIGABRT; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/fcntl_getlk.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/fcntl_getlk.rs new file mode 100644 index 0000000000000000000000000000000000000000..0dbdb945e4135d9a30f043dafe06cd94bfdfa41d --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/fcntl_getlk.rs @@ -0,0 +1,23 @@ +use super::Flock; +use crate::fd::AsFd; +use crate::{backend, io}; + +/// `fcntl(fd, F_GETLK)`—Get the first lock that blocks the lock description +/// pointed to by the argument `lock`. If no such lock is found, then `None` is +/// returned. +/// +/// If `lock.typ` is set to `FlockType::Unlocked`, the returned value/error is +/// not explicitly defined, as per POSIX, and will depend on the underlying +/// platform implementation. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/fcntl.html +/// [Linux]: https://man7.org/linux/man-pages/man2/fcntl.2.html +#[inline] +#[doc(alias = "F_GETLK")] +pub fn fcntl_getlk(fd: Fd, lock: &Flock) -> io::Result> { + backend::process::syscalls::fcntl_getlk(fd.as_fd(), lock) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/id.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/id.rs new file mode 100644 index 0000000000000000000000000000000000000000..2e9a228fac6798f90bc865f1a8b472b0e2d64a98 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/id.rs @@ -0,0 +1,260 @@ +//! Unix user, group, and process identifiers. +//! +//! # Safety +//! +//! The `Uid`, `Gid`, and `Pid` types can be constructed from raw integers, +//! which is marked unsafe because actual OS's assign special meaning to some +//! integer values. +#![allow(unsafe_code)] + +use crate::{backend, io}; +#[cfg(feature = "alloc")] +use alloc::vec::Vec; + +pub use crate::pid::{Pid, RawPid}; +pub use crate::ugid::{Gid, RawGid, RawUid, Uid}; + +/// `getuid()`—Returns the process' real user ID. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getuid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getuid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getuid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getuid +/// [NetBSD]: https://man.netbsd.org/getuid.2 +#[inline] +#[must_use] +pub fn getuid() -> Uid { + backend::ugid::syscalls::getuid() +} + +/// `geteuid()`—Returns the process' effective user ID. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/geteuid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/geteuid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=geteuid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/geteuid +/// [NetBSD]: https://man.netbsd.org/geteuid.2 +#[inline] +#[must_use] +pub fn geteuid() -> Uid { + backend::ugid::syscalls::geteuid() +} + +/// `getgid()`—Returns the process' real group ID. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getgid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getgid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getgid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getgid +/// [NetBSD]: https://man.netbsd.org/getgid.2 +#[inline] +#[must_use] +pub fn getgid() -> Gid { + backend::ugid::syscalls::getgid() +} + +/// `getegid()`—Returns the process' effective group ID. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getegid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getegid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getegid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getegid +/// [NetBSD]: https://man.netbsd.org/getegid.2 +#[inline] +#[must_use] +pub fn getegid() -> Gid { + backend::ugid::syscalls::getegid() +} + +/// `getpid()`—Returns the process' ID. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getpid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getpid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getpid +/// [NetBSD]: https://man.netbsd.org/getpid.2 +#[inline] +#[must_use] +pub fn getpid() -> Pid { + backend::pid::syscalls::getpid() +} + +/// `getppid()`—Returns the parent process' ID. +/// +/// This will return `None` if the current process has no parent (or no parent +/// accessible in the current PID namespace), such as if the current process is +/// the init process ([`Pid::INIT`]). +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getppid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getppid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getppid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getppid +/// [NetBSD]: https://man.netbsd.org/getppid.2 +#[inline] +#[must_use] +pub fn getppid() -> Option { + backend::process::syscalls::getppid() +} + +/// `getpgid(pid)`—Returns the process group ID of the given process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpgid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getpgid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getpgid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getpgid +/// [NetBSD]: https://man.netbsd.org/getpgid.2 +#[inline] +pub fn getpgid(pid: Option) -> io::Result { + backend::process::syscalls::getpgid(pid) +} + +/// `setpgid(pid, pgid)`—Sets the process group ID of the given process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setpgid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setpgid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=setpgid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/setpgid +/// [NetBSD]: https://man.netbsd.org/setpgid.2 +#[inline] +pub fn setpgid(pid: Option, pgid: Option) -> io::Result<()> { + backend::process::syscalls::setpgid(pid, pgid) +} + +/// `getpgrp()`—Returns the process' group ID. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpgrp.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getpgrp.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getpgrp&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getpgrp +/// [NetBSD]: https://man.netbsd.org/getpgrp.2 +#[inline] +#[must_use] +pub fn getpgrp() -> Pid { + backend::process::syscalls::getpgrp() +} + +/// `getsid(pid)`—Get the session ID of the given process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getsid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getsid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getsid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/getsid +/// [NetBSD]: https://man.netbsd.org/getsid.2 +#[cfg(not(target_os = "redox"))] +#[inline] +pub fn getsid(pid: Option) -> io::Result { + backend::process::syscalls::getsid(pid) +} + +/// `setsid()`—Create a new session. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setsid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setsid.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=setsid&sektion=2 +/// [illumos]: https://www.illumos.org/man/2/setsid +/// [NetBSD]: https://man.netbsd.org/setsid.2 +#[inline] +pub fn setsid() -> io::Result { + backend::process::syscalls::setsid() +} + +/// `getgroups()`—Return a list of the current user's groups. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getgroups.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getgroups.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=getgroups&sektion=2 +/// [NetBSD]: https://man.netbsd.org/getgroups.2 +#[cfg(feature = "alloc")] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +pub fn getgroups() -> io::Result> { + // This code would benefit from having a better way to read into + // uninitialized memory, but that requires `unsafe`. + let mut buffer = Vec::with_capacity(0); + let ngroups = backend::process::syscalls::getgroups(&mut buffer)?; + buffer.resize(ngroups, Gid::ROOT); + backend::process::syscalls::getgroups(&mut buffer)?; + Ok(buffer) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/ioctl.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/ioctl.rs new file mode 100644 index 0000000000000000000000000000000000000000..5362504ff2fb6e5a8da730bdf5d61556a15a62a7 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/ioctl.rs @@ -0,0 +1,73 @@ +//! Process-oriented `ioctl`s. +//! +//! # Safety +//! +//! This module invokes `ioctl`s. + +#![allow(unsafe_code)] + +use crate::{backend, io, ioctl}; +use backend::c; +use backend::fd::AsFd; + +/// `ioctl(fd, TIOCSCTTY, 0)`—Sets the controlling terminal for the process. +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// +/// [Linux]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=tty&sektion=4 +/// [NetBSD]: https://man.netbsd.org/tty.4 +/// [OpenBSD]: https://man.openbsd.org/tty.4 +#[cfg(not(any( + windows, + target_os = "aix", + target_os = "horizon", + target_os = "redox", + target_os = "wasi" +)))] +#[inline] +#[doc(alias = "TIOCSCTTY")] +pub fn ioctl_tiocsctty(fd: Fd) -> io::Result<()> { + unsafe { ioctl::ioctl(fd, Tiocsctty) } +} + +#[cfg(not(any( + windows, + target_os = "aix", + target_os = "horizon", + target_os = "redox", + target_os = "wasi" +)))] +struct Tiocsctty; + +#[cfg(not(any( + windows, + target_os = "aix", + target_os = "horizon", + target_os = "redox", + target_os = "wasi" +)))] +unsafe impl ioctl::Ioctl for Tiocsctty { + type Output = (); + + const IS_MUTATING: bool = false; + + fn opcode(&self) -> ioctl::Opcode { + c::TIOCSCTTY as ioctl::Opcode + } + + fn as_ptr(&mut self) -> *mut c::c_void { + crate::utils::as_ptr(&0_u32) as *mut c::c_void + } + + unsafe fn output_from_ptr( + _: ioctl::IoctlOutput, + _: *mut c::c_void, + ) -> io::Result { + Ok(()) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/kill.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/kill.rs new file mode 100644 index 0000000000000000000000000000000000000000..8299b8ee20c9831259534d6526b00c726b67ac2b --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/kill.rs @@ -0,0 +1,98 @@ +use crate::process::Pid; +use crate::{backend, io}; + +pub use crate::signal::Signal; + +/// `kill(pid, sig)`—Sends a signal to a process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/kill.html +/// [Linux]: https://man7.org/linux/man-pages/man2/kill.2.html +#[inline] +#[doc(alias = "kill")] +pub fn kill_process(pid: Pid, sig: Signal) -> io::Result<()> { + backend::process::syscalls::kill_process(pid, sig) +} + +/// `kill(-pid, sig)`—Sends a signal to all processes in a process group. +/// +/// If `pid` is [`Pid::INIT`], this sends a signal to all processes the current +/// process has permission to send signals to, except process `Pid::INIT`, +/// possibly other system-specific processes, and on some systems, the current +/// process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/kill.html +/// [Linux]: https://man7.org/linux/man-pages/man2/kill.2.html +#[inline] +#[doc(alias = "kill")] +pub fn kill_process_group(pid: Pid, sig: Signal) -> io::Result<()> { + backend::process::syscalls::kill_process_group(pid, sig) +} + +/// `kill(0, sig)`—Sends a signal to all processes in the current process +/// group. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/kill.html +/// [Linux]: https://man7.org/linux/man-pages/man2/kill.2.html +#[inline] +#[doc(alias = "kill")] +pub fn kill_current_process_group(sig: Signal) -> io::Result<()> { + backend::process::syscalls::kill_current_process_group(sig) +} + +/// `kill(pid, 0)`—Check validity of pid and permissions to send signals to +/// the process, without actually sending any signals. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/kill.html +/// [Linux]: https://man7.org/linux/man-pages/man2/kill.2.html +#[inline] +#[doc(alias = "kill")] +pub fn test_kill_process(pid: Pid) -> io::Result<()> { + backend::process::syscalls::test_kill_process(pid) +} + +/// `kill(-pid, 0)`—Check validity of pid and permissions to send signals to +/// all processes in the process group, without actually sending any signals. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/kill.html +/// [Linux]: https://man7.org/linux/man-pages/man2/kill.2.html +#[inline] +#[doc(alias = "kill")] +pub fn test_kill_process_group(pid: Pid) -> io::Result<()> { + backend::process::syscalls::test_kill_process_group(pid) +} + +/// `kill(0, 0)`—Check validity of pid and permissions to send signals to the +/// all processes in the current process group, without actually sending any +/// signals. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/kill.html +/// [Linux]: https://man7.org/linux/man-pages/man2/kill.2.html +#[inline] +#[doc(alias = "kill")] +pub fn test_kill_current_process_group() -> io::Result<()> { + backend::process::syscalls::test_kill_current_process_group() +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..7509b060e2992fa0a270140196f63852e05a2ff1 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/mod.rs @@ -0,0 +1,114 @@ +//! Process-associated operations. + +#[cfg(not(target_os = "wasi"))] +mod chdir; +#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] +mod chroot; +mod exit; +#[cfg(not(any( + target_os = "emscripten", + target_os = "espidf", + target_os = "fuchsia", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + target_os = "wasi" +)))] +mod fcntl_getlk; +#[cfg(not(target_os = "wasi"))] // WASI doesn't have get[gpu]id. +mod id; +#[cfg(not(any(target_os = "aix", target_os = "espidf", target_os = "vita")))] +mod ioctl; +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] +mod kill; +#[cfg(target_os = "linux")] +mod pidfd; +#[cfg(target_os = "linux")] +mod pidfd_getfd; +#[cfg(target_os = "linux")] +mod pivot_root; +#[cfg(linux_kernel)] +mod prctl; +#[cfg(not(any(target_os = "fuchsia", target_os = "vita", target_os = "wasi")))] +// WASI doesn't have [gs]etpriority. +mod priority; +#[cfg(freebsdlike)] +mod procctl; +#[cfg(not(any( + target_os = "espidf", + target_os = "fuchsia", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + target_os = "wasi" +)))] +mod rlimit; +#[cfg(not(any( + target_os = "emscripten", + target_os = "espidf", + target_os = "fuchsia", + target_os = "redox", + target_os = "vita", + target_os = "wasi" +)))] +mod types; +#[cfg(not(target_os = "wasi"))] // WASI doesn't have umask. +mod umask; +#[cfg(not(any(target_os = "espidf", target_os = "vita", target_os = "wasi")))] +mod wait; + +#[cfg(not(target_os = "wasi"))] +pub use chdir::*; +#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] +pub use chroot::*; +pub use exit::*; +#[cfg(not(any( + target_os = "emscripten", + target_os = "espidf", + target_os = "fuchsia", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + target_os = "wasi" +)))] +pub use fcntl_getlk::*; +#[cfg(not(target_os = "wasi"))] +pub use id::*; +#[cfg(not(any(target_os = "aix", target_os = "espidf", target_os = "vita")))] +pub use ioctl::*; +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] +pub use kill::*; +#[cfg(target_os = "linux")] +pub use pidfd::*; +#[cfg(target_os = "linux")] +pub use pidfd_getfd::*; +#[cfg(target_os = "linux")] +pub use pivot_root::*; +#[cfg(linux_kernel)] +pub use prctl::*; +#[cfg(not(any(target_os = "fuchsia", target_os = "vita", target_os = "wasi")))] +pub use priority::*; +#[cfg(freebsdlike)] +pub use procctl::*; +#[cfg(not(any( + target_os = "espidf", + target_os = "fuchsia", + target_os = "horizon", + target_os = "redox", + target_os = "vita", + target_os = "wasi" +)))] +pub use rlimit::*; +#[cfg(not(any( + target_os = "emscripten", + target_os = "espidf", + target_os = "fuchsia", + target_os = "redox", + target_os = "vita", + target_os = "wasi" +)))] +pub use types::*; +#[cfg(not(target_os = "wasi"))] +pub use umask::*; +#[cfg(not(any(target_os = "espidf", target_os = "vita", target_os = "wasi")))] +pub use wait::*; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pidfd.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pidfd.rs new file mode 100644 index 0000000000000000000000000000000000000000..f812a9f6139f1b88796ad038911c425c985b09ba --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pidfd.rs @@ -0,0 +1,43 @@ +use crate::fd::OwnedFd; +use crate::process::{Pid, Signal}; +use crate::{backend, ffi, io}; +use backend::fd::AsFd; + +bitflags::bitflags! { + /// `PIDFD_*` flags for use with [`pidfd_open`]. + /// + /// [`pidfd_open`]: crate::process::pidfd_open + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct PidfdFlags: ffi::c_uint { + /// `PIDFD_NONBLOCK` + const NONBLOCK = backend::c::PIDFD_NONBLOCK; + + /// + const _ = !0; + } +} + +/// `syscall(SYS_pidfd_open, pid, flags)`—Creates a file descriptor for a +/// process. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/pidfd_open.2.html +#[inline] +pub fn pidfd_open(pid: Pid, flags: PidfdFlags) -> io::Result { + backend::process::syscalls::pidfd_open(pid, flags) +} + +/// `syscall(SYS_pidfd_send_signal, pidfd, sig, NULL, 0)`—Send a signal to a +/// process specified by a file descriptor. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/pidfd_send_signal.2.html +#[inline] +pub fn pidfd_send_signal(pidfd: Fd, sig: Signal) -> io::Result<()> { + backend::process::syscalls::pidfd_send_signal(pidfd.as_fd(), sig) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pidfd_getfd.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pidfd_getfd.rs new file mode 100644 index 0000000000000000000000000000000000000000..1be215e0fb4a850a136db7d1c8a994ed4eb0e634 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pidfd_getfd.rs @@ -0,0 +1,56 @@ +//! The [`pidfd_getfd`] function and supporting types. + +#![allow(unsafe_code)] +use crate::fd::OwnedFd; +use crate::{backend, ffi, io}; +use backend::fd::{AsFd, RawFd}; + +/// Raw file descriptor in another process. +/// +/// A distinct type alias is used here to inform the user that normal file +/// descriptors from the calling process should not be used. The provided file +/// descriptor is used by the kernel as the index into the file descriptor +/// table of an entirely different process. +pub type ForeignRawFd = RawFd; + +bitflags::bitflags! { + /// All flags are reserved for future use. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct PidfdGetfdFlags: ffi::c_uint { + /// + const _ = !0; + } +} + +/// `syscall(SYS_pidfd_getfd, pidfd, flags)`—Obtain a duplicate of another +/// process' file descriptor. +/// +/// # References +/// - [Linux] +/// +/// # Warning +/// +/// This function is generally safe for the calling process, but it can impact +/// the target process in unexpected ways. If you want to ensure that Rust I/O +/// safety assumptions continue to hold in the target process, then the target +/// process must have communicated the file description number to the calling +/// process from a value of a type that implements `AsRawFd`, and the target +/// process must not drop that value until after the calling process has +/// returned from `pidfd_getfd`. +/// +/// When `pidfd_getfd` is used to debug the target, or the target is not a Rust +/// application, or `pidfd_getfd` is used in any other way, then extra care +/// should be taken to avoid unexpected behaviour or crashes. +/// +/// For further details, see the references above. +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/pidfd_getfd.2.html +#[inline] +pub fn pidfd_getfd( + pidfd: Fd, + targetfd: ForeignRawFd, + flags: PidfdGetfdFlags, +) -> io::Result { + backend::process::syscalls::pidfd_getfd(pidfd.as_fd(), targetfd, flags) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pivot_root.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pivot_root.rs new file mode 100644 index 0000000000000000000000000000000000000000..91672774d570771e6d7c21a20d3dd3ae311573b9 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/pivot_root.rs @@ -0,0 +1,18 @@ +#[cfg(feature = "fs")] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +use crate::{backend, io, path}; + +/// `pivot_root(new_root, put_old)`—Change the root mount. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/pivot_root.2.html +#[cfg(feature = "fs")] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +#[inline] +pub fn pivot_root(new_root: P, put_old: Q) -> io::Result<()> { + new_root.into_with_c_str(|new_root| { + put_old.into_with_c_str(|put_old| backend::process::syscalls::pivot_root(new_root, put_old)) + }) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/prctl.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/prctl.rs new file mode 100644 index 0000000000000000000000000000000000000000..7c56305c336845559e456fefdc97240094133276 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/prctl.rs @@ -0,0 +1,1167 @@ +//! Bindings for the Linux `prctl` system call. +//! +//! There are similarities (but also differences) with FreeBSD's `procctl` +//! system call, whose interface is located in the `procctl.rs` file. + +#![allow(unsafe_code)] + +use core::mem::size_of; +use core::num::NonZeroI32; +use core::ptr::{null, null_mut, NonNull}; + +use bitflags::bitflags; + +use crate::backend::prctl::syscalls; +use crate::fd::{AsRawFd as _, BorrowedFd, RawFd}; +use crate::ffi::{c_int, c_uint, c_void, CStr}; +use crate::io; +use crate::prctl::*; +use crate::process::{Pid, RawPid}; +use crate::signal::Signal; +use crate::utils::{as_mut_ptr, as_ptr}; + +// +// PR_GET_PDEATHSIG/PR_SET_PDEATHSIG +// + +const PR_GET_PDEATHSIG: c_int = 2; + +/// Get the current value of the parent process death signal. +/// +/// # References +/// - [Linux: `prctl(PR_GET_PDEATHSIG,…)`] +/// - [FreeBSD: `procctl(PROC_PDEATHSIG_STATUS,…)`] +/// +/// [Linux: `prctl(PR_GET_PDEATHSIG,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [FreeBSD: `procctl(PROC_PDEATHSIG_STATUS,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +#[doc(alias = "PR_GET_PDEATHSIG")] +pub fn parent_process_death_signal() -> io::Result> { + let raw = unsafe { prctl_get_at_arg2_optional::(PR_GET_PDEATHSIG)? }; + if let Some(non_zero) = NonZeroI32::new(raw) { + // SAFETY: The only way to get a libc-reserved signal number in + // here would be to do something equivalent to + // `set_parent_process_death_signal`, but that would have required + // using a `Signal` with a libc-reserved value. + Ok(Some(unsafe { + Signal::from_raw_nonzero_unchecked(non_zero) + })) + } else { + Ok(None) + } +} + +const PR_SET_PDEATHSIG: c_int = 1; + +/// Set the parent-death signal of the calling process. +/// +/// # References +/// - [Linux: `prctl(PR_SET_PDEATHSIG,…)`] +/// - [FreeBSD: `procctl(PROC_PDEATHSIG_CTL,…)`] +/// +/// [Linux: `prctl(PR_SET_PDEATHSIG,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [FreeBSD: `procctl(PROC_PDEATHSIG_CTL,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +#[doc(alias = "PR_SET_PDEATHSIG")] +pub fn set_parent_process_death_signal(signal: Option) -> io::Result<()> { + let signal = signal.map_or(0_usize, |signal| signal.as_raw() as usize); + unsafe { prctl_2args(PR_SET_PDEATHSIG, signal as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_DUMPABLE/PR_SET_DUMPABLE +// + +const PR_GET_DUMPABLE: c_int = 3; + +const SUID_DUMP_DISABLE: i32 = 0; +const SUID_DUMP_USER: i32 = 1; +const SUID_DUMP_ROOT: i32 = 2; + +/// `SUID_DUMP_*` values for use with [`dumpable_behavior`] and +/// [`set_dumpable_behavior`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(i32)] +pub enum DumpableBehavior { + /// Not dumpable. + #[doc(alias = "SUID_DUMP_DISABLE")] + NotDumpable = SUID_DUMP_DISABLE, + /// Dumpable. + #[doc(alias = "SUID_DUMP_USER")] + Dumpable = SUID_DUMP_USER, + /// Dumpable but only readable by root. + #[doc(alias = "SUID_DUMP_ROOT")] + DumpableReadableOnlyByRoot = SUID_DUMP_ROOT, +} + +impl TryFrom for DumpableBehavior { + type Error = io::Errno; + + fn try_from(value: i32) -> Result { + match value { + SUID_DUMP_DISABLE => Ok(Self::NotDumpable), + SUID_DUMP_USER => Ok(Self::Dumpable), + SUID_DUMP_ROOT => Ok(Self::DumpableReadableOnlyByRoot), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get the current state of the calling process' `dumpable` attribute. +/// +/// # References +/// - [`prctl(PR_GET_DUMPABLE,…)`] +/// +/// [`prctl(PR_GET_DUMPABLE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_DUMPABLE")] +pub fn dumpable_behavior() -> io::Result { + unsafe { prctl_1arg(PR_GET_DUMPABLE) }.and_then(TryInto::try_into) +} + +const PR_SET_DUMPABLE: c_int = 4; + +/// Set the state of the `dumpable` attribute. +/// +/// This attribute determines whether the process can be traced and whether +/// core dumps are produced for the calling process upon delivery of a signal +/// whose default behavior is to produce a core dump. +/// +/// A similar function with the same name is available on FreeBSD (as part of +/// the `procctl` interface), but it has an extra argument which allows to +/// select a process other then the current process. +/// +/// # References +/// - [`prctl(PR_SET_DUMPABLE,…)`] +/// +/// [`prctl(PR_SET_DUMPABLE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_DUMPABLE")] +pub fn set_dumpable_behavior(config: DumpableBehavior) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_DUMPABLE, config as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_UNALIGN/PR_SET_UNALIGN +// + +const PR_GET_UNALIGN: c_int = 5; + +bitflags! { + /// `PR_UNALIGN_*` flags for use with [`unaligned_access_control`] and + /// [`set_unaligned_access_control`]. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct UnalignedAccessControl: u32 { + /// Silently fix up unaligned user accesses. + #[doc(alias = "NOPRINT")] + #[doc(alias = "PR_UNALIGN_NOPRINT")] + const NO_PRINT = 1; + /// Generate a [`Signal::Bus`] signal on unaligned user access. + #[doc(alias = "PR_UNALIGN_SIGBUS")] + const SIGBUS = 2; + + /// + const _ = !0; + } +} + +/// Get unaligned access control bits. +/// +/// # References +/// - [`prctl(PR_GET_UNALIGN,…)`] +/// +/// [`prctl(PR_GET_UNALIGN,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_UNALIGN")] +pub fn unaligned_access_control() -> io::Result { + let r = unsafe { prctl_get_at_arg2_optional::(PR_GET_UNALIGN)? }; + UnalignedAccessControl::from_bits(r).ok_or(io::Errno::RANGE) +} + +const PR_SET_UNALIGN: c_int = 6; + +/// Set unaligned access control bits. +/// +/// # References +/// - [`prctl(PR_SET_UNALIGN,…)`] +/// +/// [`prctl(PR_SET_UNALIGN,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_UNALIGN")] +pub fn set_unaligned_access_control(config: UnalignedAccessControl) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_UNALIGN, config.bits() as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_FPEMU/PR_SET_FPEMU +// + +const PR_GET_FPEMU: c_int = 9; + +bitflags! { + /// `PR_FPEMU_*` flags for use with [`floating_point_emulation_control`] + /// and [`set_floating_point_emulation_control`]. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct FloatingPointEmulationControl: u32 { + /// Silently emulate floating point operations accesses. + #[doc(alias = "PR_UNALIGN_NOPRINT")] + const NO_PRINT = 1; + /// Don't emulate floating point operations, send a [`Signal::Fpe`] + /// signal instead. + #[doc(alias = "PR_UNALIGN_SIGFPE")] + const SIGFPE = 2; + } +} + +/// Get floating point emulation control bits. +/// +/// # References +/// - [`prctl(PR_GET_FPEMU,…)`] +/// +/// [`prctl(PR_GET_FPEMU,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_FPEMU")] +pub fn floating_point_emulation_control() -> io::Result { + let r = unsafe { prctl_get_at_arg2_optional::(PR_GET_FPEMU)? }; + FloatingPointEmulationControl::from_bits(r).ok_or(io::Errno::RANGE) +} + +const PR_SET_FPEMU: c_int = 10; + +/// Set floating point emulation control bits. +/// +/// # References +/// - [`prctl(PR_SET_FPEMU,…)`] +/// +/// [`prctl(PR_SET_FPEMU,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_FPEMU")] +pub fn set_floating_point_emulation_control( + config: FloatingPointEmulationControl, +) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_FPEMU, config.bits() as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_FPEXC/PR_SET_FPEXC +// + +const PR_GET_FPEXC: c_int = 11; + +bitflags! { + /// Zero means floating point exceptions are disabled. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct FloatingPointExceptionMode: u32 { + /// Async non-recoverable exception mode. + const NONRECOV = 1; + /// Async recoverable exception mode. + const ASYNC = 2; + /// Precise exception mode. + const PRECISE = 3; + + /// Use FPEXC for floating point exception enables. + const SW_ENABLE = 0x80; + /// Floating point divide by zero. + const DIV = 0x01_0000; + /// Floating point overflow. + const OVF = 0x02_0000; + /// Floating point underflow. + const UND = 0x04_0000; + /// Floating point inexact result. + const RES = 0x08_0000; + /// Floating point invalid operation. + const INV = 0x10_0000; + } +} + +/// Get floating point exception mode. +/// +/// # References +/// - [`prctl(PR_GET_FPEXC,…)`] +/// +/// [`prctl(PR_GET_FPEXC,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_FPEXEC")] +pub fn floating_point_exception_mode() -> io::Result> { + unsafe { prctl_get_at_arg2_optional::(PR_GET_FPEXC) } + .map(FloatingPointExceptionMode::from_bits) +} + +const PR_SET_FPEXC: c_int = 12; + +/// Set floating point exception mode. +/// +/// # References +/// - [`prctl(PR_SET_FPEXC,…)`] +/// +/// [`prctl(PR_SET_FPEXC,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_FPEXEC")] +pub fn set_floating_point_exception_mode( + config: Option, +) -> io::Result<()> { + let config = config.as_ref().map_or(0, FloatingPointExceptionMode::bits); + unsafe { prctl_2args(PR_SET_FPEXC, config as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_TIMING/PR_SET_TIMING +// + +const PR_GET_TIMING: c_int = 13; + +const PR_TIMING_STATISTICAL: i32 = 0; +const PR_TIMING_TIMESTAMP: i32 = 1; + +/// `PR_TIMING_*` values for use with [`timing_method`] and +/// [`set_timing_method`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(i32)] +pub enum TimingMethod { + /// Normal, traditional, statistical process timing. + Statistical = PR_TIMING_STATISTICAL, + /// Accurate timestamp based process timing. + TimeStamp = PR_TIMING_TIMESTAMP, +} + +impl TryFrom for TimingMethod { + type Error = io::Errno; + + fn try_from(value: i32) -> Result { + match value { + PR_TIMING_STATISTICAL => Ok(Self::Statistical), + PR_TIMING_TIMESTAMP => Ok(Self::TimeStamp), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get which process timing method is currently in use. +/// +/// # References +/// - [`prctl(PR_GET_TIMING,…)`] +/// +/// [`prctl(PR_GET_TIMING,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_TIMING")] +pub fn timing_method() -> io::Result { + unsafe { prctl_1arg(PR_GET_TIMING) }.and_then(TryInto::try_into) +} + +const PR_SET_TIMING: c_int = 14; + +/// Set whether to use (normal, traditional) statistical process timing or +/// accurate timestamp-based process timing. +/// +/// # References +/// - [`prctl(PR_SET_TIMING,…)`] +/// +/// [`prctl(PR_SET_TIMING,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_TIMING")] +pub fn set_timing_method(method: TimingMethod) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_TIMING, method as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_ENDIAN/PR_SET_ENDIAN +// + +const PR_GET_ENDIAN: c_int = 19; + +const PR_ENDIAN_BIG: u32 = 0; +const PR_ENDIAN_LITTLE: u32 = 1; +const PR_ENDIAN_PPC_LITTLE: u32 = 2; + +/// `PR_ENDIAN_*` values for use with [`endian_mode`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum EndianMode { + /// Big endian mode. + Big = PR_ENDIAN_BIG, + /// True little endian mode. + Little = PR_ENDIAN_LITTLE, + /// `PowerPC` pseudo little endian. + PowerPCLittle = PR_ENDIAN_PPC_LITTLE, +} + +impl TryFrom for EndianMode { + type Error = io::Errno; + + fn try_from(value: u32) -> Result { + match value { + PR_ENDIAN_BIG => Ok(Self::Big), + PR_ENDIAN_LITTLE => Ok(Self::Little), + PR_ENDIAN_PPC_LITTLE => Ok(Self::PowerPCLittle), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get the endianness of the calling process. +/// +/// # References +/// - [`prctl(PR_GET_ENDIAN,…)`] +/// +/// [`prctl(PR_GET_ENDIAN,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_ENDIAN")] +pub fn endian_mode() -> io::Result { + unsafe { prctl_get_at_arg2::(PR_GET_ENDIAN) } +} + +const PR_SET_ENDIAN: c_int = 20; + +/// Set the endianness of the calling process. +/// +/// # References +/// - [`prctl(PR_SET_ENDIAN,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_SET_ENDIAN,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_ENDIAN")] +pub unsafe fn set_endian_mode(mode: EndianMode) -> io::Result<()> { + prctl_2args(PR_SET_ENDIAN, mode as usize as *mut _).map(|_r| ()) +} + +// +// PR_GET_TSC/PR_SET_TSC +// + +const PR_GET_TSC: c_int = 25; + +const PR_TSC_ENABLE: u32 = 1; +const PR_TSC_SIGSEGV: u32 = 2; + +/// `PR_TSC_*` values for use with [`time_stamp_counter_readability`] and +/// [`set_time_stamp_counter_readability`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum TimeStampCounterReadability { + /// Allow the use of the timestamp counter. + Readable = PR_TSC_ENABLE, + /// Throw a [`Signal::SEGV`] signal instead of reading the TSC. + RaiseSIGSEGV = PR_TSC_SIGSEGV, +} + +impl TryFrom for TimeStampCounterReadability { + type Error = io::Errno; + + fn try_from(value: u32) -> Result { + match value { + PR_TSC_ENABLE => Ok(Self::Readable), + PR_TSC_SIGSEGV => Ok(Self::RaiseSIGSEGV), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get the state of the flag determining if the timestamp counter can be read. +/// +/// # References +/// - [`prctl(PR_GET_TSC,…)`] +/// +/// [`prctl(PR_GET_TSC,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_TSC")] +pub fn time_stamp_counter_readability() -> io::Result { + unsafe { prctl_get_at_arg2::(PR_GET_TSC) } +} + +const PR_SET_TSC: c_int = 26; + +/// Set the state of the flag determining if the timestamp counter can be read +/// by the process. +/// +/// # References +/// - [`prctl(PR_SET_TSC,…)`] +/// +/// [`prctl(PR_SET_TSC,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_TSC")] +pub fn set_time_stamp_counter_readability( + readability: TimeStampCounterReadability, +) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_TSC, readability as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_TASK_PERF_EVENTS_DISABLE/PR_TASK_PERF_EVENTS_ENABLE +// + +const PR_TASK_PERF_EVENTS_DISABLE: c_int = 31; +const PR_TASK_PERF_EVENTS_ENABLE: c_int = 32; + +/// Enable or disable all performance counters attached to the calling process. +/// +/// # References +/// - [`prctl(PR_TASK_PERF_EVENTS_ENABLE,…)`] +/// - [`prctl(PR_TASK_PERF_EVENTS_DISABLE,…)`] +/// +/// [`prctl(PR_TASK_PERF_EVENTS_ENABLE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [`prctl(PR_TASK_PERF_EVENTS_DISABLE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_TASK_PERF_EVENTS_ENABLE")] +#[doc(alias = "PR_TASK_PERF_EVENTS_DISABLE")] +pub fn configure_performance_counters(enable: bool) -> io::Result<()> { + let option = if enable { + PR_TASK_PERF_EVENTS_ENABLE + } else { + PR_TASK_PERF_EVENTS_DISABLE + }; + + unsafe { prctl_1arg(option) }.map(|_r| ()) +} + +// +// PR_MCE_KILL_GET/PR_MCE_KILL +// + +const PR_MCE_KILL_GET: c_int = 34; + +const PR_MCE_KILL_LATE: u32 = 0; +const PR_MCE_KILL_EARLY: u32 = 1; +const PR_MCE_KILL_DEFAULT: u32 = 2; + +/// `PR_MCE_KILL_*` values for use with +/// [`machine_check_memory_corruption_kill_policy`] and +/// [`set_machine_check_memory_corruption_kill_policy`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum MachineCheckMemoryCorruptionKillPolicy { + /// Late kill policy. + #[doc(alias = "PR_MCE_KILL_LATE")] + Late = PR_MCE_KILL_LATE, + /// Early kill policy. + #[doc(alias = "PR_MCE_KILL_EARLY")] + Early = PR_MCE_KILL_EARLY, + /// System-wide default policy. + #[doc(alias = "PR_MCE_KILL_DEFAULT")] + Default = PR_MCE_KILL_DEFAULT, +} + +impl TryFrom for MachineCheckMemoryCorruptionKillPolicy { + type Error = io::Errno; + + fn try_from(value: u32) -> Result { + match value { + PR_MCE_KILL_LATE => Ok(Self::Late), + PR_MCE_KILL_EARLY => Ok(Self::Early), + PR_MCE_KILL_DEFAULT => Ok(Self::Default), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get the current per-process machine check kill policy. +/// +/// # References +/// - [`prctl(PR_MCE_KILL_GET,…)`] +/// +/// [`prctl(PR_MCE_KILL_GET,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_MCE_KILL_GET")] +pub fn machine_check_memory_corruption_kill_policy( +) -> io::Result { + let r = unsafe { prctl_1arg(PR_MCE_KILL_GET)? } as c_uint; + MachineCheckMemoryCorruptionKillPolicy::try_from(r) +} + +const PR_MCE_KILL: c_int = 33; + +const PR_MCE_KILL_CLEAR: usize = 0; +const PR_MCE_KILL_SET: usize = 1; + +/// Set the machine check memory corruption kill policy for the calling thread. +/// +/// # References +/// - [`prctl(PR_MCE_KILL,…)`] +/// +/// [`prctl(PR_MCE_KILL,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_MCE_KILL")] +pub fn set_machine_check_memory_corruption_kill_policy( + policy: Option, +) -> io::Result<()> { + let (sub_operation, policy) = if let Some(policy) = policy { + (PR_MCE_KILL_SET, policy as usize as *mut _) + } else { + (PR_MCE_KILL_CLEAR, null_mut()) + }; + + unsafe { prctl_3args(PR_MCE_KILL, sub_operation as *mut _, policy) }.map(|_r| ()) +} + +// +// PR_SET_MM +// + +const PR_SET_MM: c_int = 35; + +const PR_SET_MM_START_CODE: u32 = 1; +const PR_SET_MM_END_CODE: u32 = 2; +const PR_SET_MM_START_DATA: u32 = 3; +const PR_SET_MM_END_DATA: u32 = 4; +const PR_SET_MM_START_STACK: u32 = 5; +const PR_SET_MM_START_BRK: u32 = 6; +const PR_SET_MM_BRK: u32 = 7; +const PR_SET_MM_ARG_START: u32 = 8; +const PR_SET_MM_ARG_END: u32 = 9; +const PR_SET_MM_ENV_START: u32 = 10; +const PR_SET_MM_ENV_END: u32 = 11; +const PR_SET_MM_AUXV: usize = 12; +const PR_SET_MM_EXE_FILE: usize = 13; +const PR_SET_MM_MAP: usize = 14; +const PR_SET_MM_MAP_SIZE: usize = 15; + +/// `PR_SET_MM_*` values for use with [`set_virtual_memory_map_address`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum VirtualMemoryMapAddress { + /// Set the address above which the program text can run. + CodeStart = PR_SET_MM_START_CODE, + /// Set the address below which the program text can run. + CodeEnd = PR_SET_MM_END_CODE, + /// Set the address above which initialized and uninitialized (bss) data + /// are placed. + DataStart = PR_SET_MM_START_DATA, + /// Set the address below which initialized and uninitialized (bss) data + /// are placed. + DataEnd = PR_SET_MM_END_DATA, + /// Set the start address of the stack. + StackStart = PR_SET_MM_START_STACK, + /// Set the address above which the program heap can be expanded with `brk` + /// call. + BrkStart = PR_SET_MM_START_BRK, + /// Set the current `brk` value. + BrkCurrent = PR_SET_MM_BRK, + /// Set the address above which the program command line is placed. + ArgStart = PR_SET_MM_ARG_START, + /// Set the address below which the program command line is placed. + ArgEnd = PR_SET_MM_ARG_END, + /// Set the address above which the program environment is placed. + EnvironmentStart = PR_SET_MM_ENV_START, + /// Set the address below which the program environment is placed. + EnvironmentEnd = PR_SET_MM_ENV_END, +} + +/// Modify certain kernel memory map descriptor addresses of the calling +/// process. +/// +/// # References +/// - [`prctl(PR_SET_MM,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_SET_MM,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_MM")] +pub unsafe fn set_virtual_memory_map_address( + option: VirtualMemoryMapAddress, + address: Option>, +) -> io::Result<()> { + let address = address.map_or_else(null_mut, NonNull::as_ptr); + prctl_3args(PR_SET_MM, option as usize as *mut _, address).map(|_r| ()) +} + +/// Supersede the `/proc/pid/exe` symbolic link with a new one pointing to a +/// new executable file. +/// +/// # References +/// - [`prctl(PR_SET_MM,PR_SET_MM_EXE_FILE,…)`] +/// +/// [`prctl(PR_SET_MM,PR_SET_MM_EXE_FILE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_MM")] +#[doc(alias = "PR_SET_MM_EXE_FILE")] +pub fn set_executable_file(fd: BorrowedFd<'_>) -> io::Result<()> { + let fd = usize::try_from(fd.as_raw_fd()).map_err(|_r| io::Errno::RANGE)?; + unsafe { prctl_3args(PR_SET_MM, PR_SET_MM_EXE_FILE as *mut _, fd as *mut _) }.map(|_r| ()) +} + +/// Set a new auxiliary vector. +/// +/// # References +/// - [`prctl(PR_SET_MM,PR_SET_MM_AUXV,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_SET_MM,PR_SET_MM_AUXV,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_MM")] +#[doc(alias = "PR_SET_MM_AUXV")] +pub unsafe fn set_auxiliary_vector(auxv: &[*const c_void]) -> io::Result<()> { + syscalls::prctl( + PR_SET_MM, + PR_SET_MM_AUXV as *mut _, + auxv.as_ptr() as *mut _, + auxv.len() as *mut _, + null_mut(), + ) + .map(|_r| ()) +} + +/// Get the size of the [`PrctlMmMap`] the kernel expects. +/// +/// # References +/// - [`prctl(PR_SET_MM,PR_SET_MM_MAP_SIZE,…)`] +/// +/// [`prctl(PR_SET_MM,PR_SET_MM_MAP_SIZE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_MM")] +#[doc(alias = "PR_SET_MM_MAP_SIZE")] +pub fn virtual_memory_map_config_struct_size() -> io::Result { + let mut value: c_uint = 0; + let value_ptr = as_mut_ptr(&mut value); + unsafe { prctl_3args(PR_SET_MM, PR_SET_MM_MAP_SIZE as *mut _, value_ptr.cast())? }; + Ok(value as usize) +} + +/// This structure provides new memory descriptor map which mostly modifies +/// `/proc/pid/stat[m]` output for a task. +/// This mostly done in a sake of checkpoint/restore functionality. +#[repr(C)] +#[derive(Debug, Clone)] +pub struct PrctlMmMap { + /// Code section start address. + pub start_code: u64, + /// Code section end address. + pub end_code: u64, + /// Data section start address. + pub start_data: u64, + /// Data section end address. + pub end_data: u64, + /// `brk` start address. + pub start_brk: u64, + /// `brk` current address. + pub brk: u64, + /// Stack start address. + pub start_stack: u64, + /// Program command line start address. + pub arg_start: u64, + /// Program command line end address. + pub arg_end: u64, + /// Program environment start address. + pub env_start: u64, + /// Program environment end address. + pub env_end: u64, + /// Auxiliary vector start address. + pub auxv: *mut u64, + /// Auxiliary vector size. + pub auxv_size: u32, + /// File descriptor of executable file that was used to create this + /// process. + pub exe_fd: RawFd, +} + +/// Provides one-shot access to all the addresses by passing in a +/// [`PrctlMmMap`]. +/// +/// # References +/// - [`prctl(PR_SET_MM,PR_SET_MM_MAP,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_SET_MM,PR_SET_MM_MAP,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_MM")] +#[doc(alias = "PR_SET_MM_MAP")] +pub unsafe fn configure_virtual_memory_map(config: &PrctlMmMap) -> io::Result<()> { + syscalls::prctl( + PR_SET_MM, + PR_SET_MM_MAP as *mut _, + as_ptr(config) as *mut _, + size_of::() as *mut _, + null_mut(), + ) + .map(|_r| ()) +} + +// +// PR_SET_PTRACER +// + +const PR_SET_PTRACER: c_int = 0x59_61_6d_61; + +const PR_SET_PTRACER_ANY: usize = usize::MAX; + +/// Process ptracer. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub enum PTracer { + /// None. + None, + /// Disable `ptrace` restrictions for the calling process. + Any, + /// Specific process. + ProcessID(Pid), +} + +/// Declare that the ptracer process can `ptrace` the calling process as if it +/// were a direct process ancestor. +/// +/// # References +/// - [`prctl(PR_SET_PTRACER,…)`] +/// +/// [`prctl(PR_SET_PTRACER,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_PTRACER")] +pub fn set_ptracer(tracer: PTracer) -> io::Result<()> { + let pid = match tracer { + PTracer::None => null_mut(), + PTracer::Any => PR_SET_PTRACER_ANY as *mut _, + PTracer::ProcessID(pid) => pid.as_raw_nonzero().get() as usize as *mut _, + }; + + unsafe { prctl_2args(PR_SET_PTRACER, pid) }.map(|_r| ()) +} + +// +// PR_GET_CHILD_SUBREAPER/PR_SET_CHILD_SUBREAPER +// + +const PR_GET_CHILD_SUBREAPER: c_int = 37; + +/// Get the `child subreaper` setting of the calling process. +/// +/// # References +/// - [`prctl(PR_GET_CHILD_SUBREAPER,…)`] +/// +/// [`prctl(PR_GET_CHILD_SUBREAPER,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_CHILD_SUBREAPER")] +pub fn child_subreaper() -> io::Result> { + unsafe { + let r = prctl_get_at_arg2_optional::(PR_GET_CHILD_SUBREAPER)?; + Ok(Pid::from_raw(r as RawPid)) + } +} + +const PR_SET_CHILD_SUBREAPER: c_int = 36; + +/// Set the `child subreaper` attribute of the calling process. +/// +/// # References +/// - [`prctl(PR_SET_CHILD_SUBREAPER,…)`] +/// +/// [`prctl(PR_SET_CHILD_SUBREAPER,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_CHILD_SUBREAPER")] +pub fn set_child_subreaper(pid: Option) -> io::Result<()> { + let pid = pid.map_or(0_usize, |pid| pid.as_raw_nonzero().get() as usize); + unsafe { prctl_2args(PR_SET_CHILD_SUBREAPER, pid as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_FP_MODE/PR_SET_FP_MODE +// + +const PR_GET_FP_MODE: c_int = 46; + +const PR_FP_MODE_FR: u32 = 1_u32 << 0; +const PR_FP_MODE_FRE: u32 = 1_u32 << 1; + +/// `PR_FP_MODE_*` values for use with [`floating_point_mode`] and +/// [`set_floating_point_mode`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum FloatingPointMode { + /// 64-bit floating point registers. + FloatingPointRegisters = PR_FP_MODE_FR, + /// Enable emulation of 32-bit floating-point mode. + FloatingPointEmulation = PR_FP_MODE_FRE, +} + +impl TryFrom for FloatingPointMode { + type Error = io::Errno; + + fn try_from(value: u32) -> Result { + match value { + PR_FP_MODE_FR => Ok(Self::FloatingPointRegisters), + PR_FP_MODE_FRE => Ok(Self::FloatingPointEmulation), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get the current floating point mode. +/// +/// # References +/// - [`prctl(PR_GET_FP_MODE,…)`] +/// +/// [`prctl(PR_GET_FP_MODE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_FP_MODE")] +pub fn floating_point_mode() -> io::Result { + let r = unsafe { prctl_1arg(PR_GET_FP_MODE)? } as c_uint; + FloatingPointMode::try_from(r) +} + +const PR_SET_FP_MODE: c_int = 45; + +/// Allow control of the floating point mode from user space. +/// +/// # References +/// - [`prctl(PR_SET_FP_MODE,…)`] +/// +/// [`prctl(PR_SET_FP_MODE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_FP_MODE")] +pub fn set_floating_point_mode(mode: FloatingPointMode) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_FP_MODE, mode as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_SPECULATION_CTRL/PR_SET_SPECULATION_CTRL +// + +const PR_GET_SPECULATION_CTRL: c_int = 52; + +const PR_SPEC_STORE_BYPASS: u32 = 0; +const PR_SPEC_INDIRECT_BRANCH: u32 = 1; +const PR_SPEC_L1D_FLUSH: u32 = 2; + +/// `PR_SPEC_*` values for use with [`speculative_feature_state`] and +/// [`control_speculative_feature`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum SpeculationFeature { + /// Set the state of the speculative store bypass misfeature. + SpeculativeStoreBypass = PR_SPEC_STORE_BYPASS, + /// Set the state of the indirect branch speculation misfeature. + IndirectBranchSpeculation = PR_SPEC_INDIRECT_BRANCH, + /// Flush L1D Cache on context switch out of the task. + FlushL1DCacheOnContextSwitchOutOfTask = PR_SPEC_L1D_FLUSH, +} + +impl TryFrom for SpeculationFeature { + type Error = io::Errno; + + fn try_from(value: u32) -> Result { + match value { + PR_SPEC_STORE_BYPASS => Ok(Self::SpeculativeStoreBypass), + PR_SPEC_INDIRECT_BRANCH => Ok(Self::IndirectBranchSpeculation), + PR_SPEC_L1D_FLUSH => Ok(Self::FlushL1DCacheOnContextSwitchOutOfTask), + _ => Err(io::Errno::RANGE), + } + } +} + +bitflags! { + /// `PR_SPEC_*` flags for use with [`control_speculative_feature`]. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct SpeculationFeatureControl: u32 { + /// The speculation feature is enabled, mitigation is disabled. + const ENABLE = 1_u32 << 1; + /// The speculation feature is disabled, mitigation is enabled. + const DISABLE = 1_u32 << 2; + /// The speculation feature is disabled, mitigation is enabled, and it + /// cannot be undone. + const FORCE_DISABLE = 1_u32 << 3; + /// The speculation feature is disabled, mitigation is enabled, and the + /// state will be cleared on `execve`. + const DISABLE_NOEXEC = 1_u32 << 4; + } +} + +bitflags! { + /// Zero means the processors are not vulnerable. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct SpeculationFeatureState: u32 { + /// Mitigation can be controlled per thread by + /// [`control_speculative_feature`]. + const PRCTL = 1_u32 << 0; + /// The speculation feature is enabled, mitigation is disabled. + const ENABLE = 1_u32 << 1; + /// The speculation feature is disabled, mitigation is enabled. + const DISABLE = 1_u32 << 2; + /// The speculation feature is disabled, mitigation is enabled, and it + /// cannot be undone. + const FORCE_DISABLE = 1_u32 << 3; + /// The speculation feature is disabled, mitigation is enabled, and the + /// state will be cleared on `execve`. + const DISABLE_NOEXEC = 1_u32 << 4; + } +} + +/// Get the state of the speculation misfeature. +/// +/// # References +/// - [`prctl(PR_GET_SPECULATION_CTRL,…)`] +/// +/// [`prctl(PR_GET_SPECULATION_CTRL,…)`]: https://www.kernel.org/doc/html/v6.13/userspace-api/spec_ctrl.html +#[inline] +#[doc(alias = "PR_GET_SPECULATION_CTRL")] +pub fn speculative_feature_state( + feature: SpeculationFeature, +) -> io::Result> { + let r = unsafe { prctl_2args(PR_GET_SPECULATION_CTRL, feature as usize as *mut _)? } as c_uint; + Ok(SpeculationFeatureState::from_bits(r)) +} + +const PR_SET_SPECULATION_CTRL: c_int = 53; + +/// Sets the state of the speculation misfeature. +/// +/// # References +/// - [`prctl(PR_SET_SPECULATION_CTRL,…)`] +/// +/// [`prctl(PR_SET_SPECULATION_CTRL,…)`]: https://www.kernel.org/doc/html/v6.13/userspace-api/spec_ctrl.html +#[inline] +#[doc(alias = "PR_SET_SPECULATION_CTRL")] +pub fn control_speculative_feature( + feature: SpeculationFeature, + config: SpeculationFeatureControl, +) -> io::Result<()> { + let feature = feature as usize as *mut _; + let config = config.bits() as usize as *mut _; + unsafe { prctl_3args(PR_SET_SPECULATION_CTRL, feature, config) }.map(|_r| ()) +} + +// +// PR_GET_IO_FLUSHER/PR_SET_IO_FLUSHER +// + +const PR_GET_IO_FLUSHER: c_int = 58; + +/// Get the `IO_FLUSHER` state of the caller. +/// +/// # References +/// - [`prctl(PR_GET_IO_FLUSHER,…)`] +/// +/// [`prctl(PR_GET_IO_FLUSHER,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_GET_IO_FLUSHER")] +pub fn is_io_flusher() -> io::Result { + unsafe { prctl_1arg(PR_GET_IO_FLUSHER) }.map(|r| r != 0) +} + +const PR_SET_IO_FLUSHER: c_int = 57; + +/// Put the process in the `IO_FLUSHER` state, allowing it to make progress +/// when allocating memory. +/// +/// # References +/// - [`prctl(PR_SET_IO_FLUSHER,…)`] +/// +/// [`prctl(PR_SET_IO_FLUSHER,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[doc(alias = "PR_SET_IO_FLUSHER")] +pub fn configure_io_flusher_behavior(enable: bool) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_IO_FLUSHER, usize::from(enable) as *mut _) }.map(|_r| ()) +} + +// +// PR_PAC_GET_ENABLED_KEYS/PR_PAC_SET_ENABLED_KEYS +// + +const PR_PAC_GET_ENABLED_KEYS: c_int = 61; + +/// Get enabled pointer authentication keys. +/// +/// # References +/// - [`prctl(PR_PAC_GET_ENABLED_KEYS,…)`] +/// +/// [`prctl(PR_PAC_GET_ENABLED_KEYS,…)`]: https://www.kernel.org/doc/html/v6.13/arch/arm64/pointer-authentication.html +#[inline] +#[doc(alias = "PR_PAC_GET_ENABLED_KEYS")] +#[cfg(linux_raw_dep)] +pub fn enabled_pointer_authentication_keys() -> io::Result { + let r = unsafe { prctl_1arg(PR_PAC_GET_ENABLED_KEYS)? } as c_uint; + PointerAuthenticationKeys::from_bits(r).ok_or(io::Errno::RANGE) +} + +const PR_PAC_SET_ENABLED_KEYS: c_int = 60; + +/// Set enabled pointer authentication keys. +/// +/// # References +/// - [`prctl(PR_PAC_SET_ENABLED_KEYS,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_PAC_SET_ENABLED_KEYS,…)`]: https://www.kernel.org/doc/html/v6.13/arch/arm64/pointer-authentication.html +#[inline] +#[doc(alias = "PR_PAC_SET_ENABLED_KEYS")] +#[cfg(linux_raw_dep)] +pub unsafe fn configure_pointer_authentication_keys< + Config: Iterator, +>( + config: Config, +) -> io::Result<()> { + let mut affected_keys: u32 = 0; + let mut enabled_keys: u32 = 0; + + for (key, enable) in config { + let key = key.bits(); + affected_keys |= key; + + if enable { + enabled_keys |= key; + } else { + enabled_keys &= !key; + } + } + + if affected_keys == 0 { + return Ok(()); // Nothing to do. + } + + prctl_3args( + PR_PAC_SET_ENABLED_KEYS, + affected_keys as usize as *mut _, + enabled_keys as usize as *mut _, + ) + .map(|_r| ()) +} + +// +// PR_SET_VMA +// + +const PR_SET_VMA: c_int = 0x53_56_4d_41; + +const PR_SET_VMA_ANON_NAME: usize = 0; + +/// Set the name for a virtual memory region. +/// +/// # References +/// - [`prctl(PR_SET_VMA,PR_SET_VMA_ANON_NAME,…)`] +/// +/// [`prctl(PR_SET_VMA,PR_SET_VMA_ANON_NAME,…)`]: https://lwn.net/Articles/867818/ +#[inline] +#[doc(alias = "PR_SET_VMA")] +#[doc(alias = "PR_SET_VMA_ANON_NAME")] +pub fn set_virtual_memory_region_name(region: &[u8], name: Option<&CStr>) -> io::Result<()> { + unsafe { + syscalls::prctl( + PR_SET_VMA, + PR_SET_VMA_ANON_NAME as *mut _, + region.as_ptr() as *mut _, + region.len() as *mut _, + name.map_or_else(null, CStr::as_ptr) as *mut _, + ) + .map(|_r| ()) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/priority.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/priority.rs new file mode 100644 index 0000000000000000000000000000000000000000..0051b068851a3ccd025c96bb8c43fd195f256a7c --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/priority.rs @@ -0,0 +1,132 @@ +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +use crate::process::{Pid, Uid}; +use crate::{backend, io}; + +/// `nice(inc)`—Adjust the scheduling priority of the current process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/nice.html +/// [Linux]: https://man7.org/linux/man-pages/man2/nice.2.html +#[inline] +pub fn nice(inc: i32) -> io::Result { + backend::process::syscalls::nice(inc) +} + +/// `getpriority(PRIO_USER, uid)`—Get the scheduling priority of the given +/// user. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpriority.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getpriority.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setpriority.2.html +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +#[inline] +#[doc(alias = "getpriority")] +pub fn getpriority_user(uid: Uid) -> io::Result { + backend::process::syscalls::getpriority_user(uid) +} + +/// `getpriority(PRIO_PGRP, gid)`—Get the scheduling priority of the given +/// process group. +/// +/// A `pgid` of `None` means the process group of the calling process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpriority.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getpriority.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setpriority.2.html +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +#[inline] +#[doc(alias = "getpriority")] +pub fn getpriority_pgrp(pgid: Option) -> io::Result { + backend::process::syscalls::getpriority_pgrp(pgid) +} + +/// `getpriority(PRIO_PROCESS, pid)`—Get the scheduling priority of the given +/// process. +/// +/// A `pid` of `None` means the calling process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getpriority.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getpriority.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setpriority.2.html +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +#[inline] +#[doc(alias = "getpriority")] +pub fn getpriority_process(pid: Option) -> io::Result { + backend::process::syscalls::getpriority_process(pid) +} + +/// `setpriority(PRIO_USER, uid)`—Get the scheduling priority of the given +/// user. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setpriority.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setpriority.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setpriority.2.html +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +#[inline] +#[doc(alias = "setpriority")] +pub fn setpriority_user(uid: Uid, priority: i32) -> io::Result<()> { + backend::process::syscalls::setpriority_user(uid, priority) +} + +/// `setpriority(PRIO_PGRP, pgid)`—Get the scheduling priority of the given +/// process group. +/// +/// A `pgid` of `None` means the process group of the calling process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setpriority.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setpriority.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setpriority.2.html +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +#[inline] +#[doc(alias = "setpriority")] +pub fn setpriority_pgrp(pgid: Option, priority: i32) -> io::Result<()> { + backend::process::syscalls::setpriority_pgrp(pgid, priority) +} + +/// `setpriority(PRIO_PROCESS, pid)`—Get the scheduling priority of the given +/// process. +/// +/// A `pid` of `None` means the calling process. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [Apple] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setpriority.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setpriority.2.html +/// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setpriority.2.html +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +#[inline] +#[doc(alias = "setpriority")] +pub fn setpriority_process(pid: Option, priority: i32) -> io::Result<()> { + backend::process::syscalls::setpriority_process(pid, priority) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/procctl.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/procctl.rs new file mode 100644 index 0000000000000000000000000000000000000000..24d55302754602f095107069f3f301bf2d04e68d --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/procctl.rs @@ -0,0 +1,547 @@ +//! Bindings for the FreeBSD `procctl` system call. +//! +//! There are similarities (but also differences) with Linux's `prctl` system +//! call, whose interface is located in the `prctl.rs` file. + +#![allow(unsafe_code)] + +#[cfg(feature = "alloc")] +use alloc::{vec, vec::Vec}; +use core::mem::MaybeUninit; +use core::num::NonZeroI32; +use core::ptr; + +use bitflags::bitflags; + +use crate::backend::process::syscalls; +use crate::backend::process::types::RawId; +use crate::ffi::{c_int, c_uint, c_void}; +use crate::io; +use crate::process::{Pid, RawPid}; +use crate::signal::Signal; +use crate::utils::{as_mut_ptr, as_ptr}; + +// +// Helper functions. +// + +/// Subset of `idtype_t` C enum, with only the values allowed by `procctl`. +#[repr(i32)] +pub enum IdType { + /// Process id. + Pid = 0, + /// Process group id. + Pgid = 2, +} + +/// A process selector for use with the `procctl` interface. +/// +/// `None` represents the current process. `Some((IdType::Pid, pid))` +/// represents the process with pid `pid`. `Some((IdType::Pgid, pgid))` +/// represents the control processes belonging to the process group with id +/// `pgid`. +pub type ProcSelector = Option<(IdType, Pid)>; +fn proc_selector_to_raw(selector: ProcSelector) -> (IdType, RawPid) { + match selector { + Some((idtype, id)) => (idtype, id.as_raw_nonzero().get()), + None => (IdType::Pid, 0), + } +} + +#[inline] +pub(crate) unsafe fn procctl( + option: c_int, + process: ProcSelector, + data: *mut c_void, +) -> io::Result<()> { + let (idtype, id) = proc_selector_to_raw(process); + syscalls::procctl(idtype as c_uint, id as RawId, option, data) +} + +#[inline] +pub(crate) unsafe fn procctl_set

( + option: c_int, + process: ProcSelector, + data: &P, +) -> io::Result<()> { + procctl(option, process, (as_ptr(data) as *mut P).cast()) +} + +#[inline] +pub(crate) unsafe fn procctl_get_optional

( + option: c_int, + process: ProcSelector, +) -> io::Result

{ + let mut value: MaybeUninit

= MaybeUninit::uninit(); + procctl(option, process, value.as_mut_ptr().cast())?; + Ok(value.assume_init()) +} + +// +// PROC_PDEATHSIG_STATUS/PROC_PDEATHSIG_CTL +// + +const PROC_PDEATHSIG_STATUS: c_int = 12; + +/// Get the current value of the parent process death signal. +/// +/// # References +/// - [Linux: `prctl(PR_GET_PDEATHSIG,…)`] +/// - [FreeBSD: `procctl(PROC_PDEATHSIG_STATUS,…)`] +/// +/// [Linux: `prctl(PR_GET_PDEATHSIG,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [FreeBSD: `procctl(PROC_PDEATHSIG_STATUS,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn parent_process_death_signal() -> io::Result> { + let raw = unsafe { procctl_get_optional::(PROC_PDEATHSIG_STATUS, None) }?; + if let Some(non_zero) = NonZeroI32::new(raw) { + // SAFETY: The only way to get a libc-reserved signal number in + // here would be to do something equivalent to + // `set_parent_process_death_signal`, but that would have required + // using a `Signal` with a libc-reserved value. + Ok(Some(unsafe { + Signal::from_raw_nonzero_unchecked(non_zero) + })) + } else { + Ok(None) + } +} + +const PROC_PDEATHSIG_CTL: c_int = 11; + +/// Set the parent-death signal of the calling process. +/// +/// # References +/// - [Linux: `prctl(PR_SET_PDEATHSIG,…)`] +/// - [FreeBSD: `procctl(PROC_PDEATHSIG_CTL,…)`] +/// +/// [Linux: `prctl(PR_SET_PDEATHSIG,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [FreeBSD: `procctl(PROC_PDEATHSIG_CTL,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn set_parent_process_death_signal(signal: Option) -> io::Result<()> { + let signal = signal.map_or(0, |signal| signal.as_raw()); + unsafe { procctl_set::(PROC_PDEATHSIG_CTL, None, &signal) } +} + +// +// PROC_TRACE_CTL +// + +const PROC_TRACE_CTL: c_int = 7; + +const PROC_TRACE_CTL_ENABLE: i32 = 1; +const PROC_TRACE_CTL_DISABLE: i32 = 2; +const PROC_TRACE_CTL_DISABLE_EXEC: i32 = 3; + +/// `PROC_TRACE_CTL_*` +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(i32)] +pub enum DumpableBehavior { + /// Not dumpable. + NotDumpable = PROC_TRACE_CTL_DISABLE, + /// Dumpable. + Dumpable = PROC_TRACE_CTL_ENABLE, + /// Not dumpable, and this behaviour is preserved across `execve` calls. + NotDumpableExecPreserved = PROC_TRACE_CTL_DISABLE_EXEC, +} + +/// Set the state of the `dumpable` attribute for the process indicated by +/// `idtype` and `id`. +/// +/// This determines whether the process can be traced and whether core dumps +/// are produced for the process upon delivery of a signal whose default +/// behavior is to produce a core dump. +/// +/// This is similar to `set_dumpable_behavior` on Linux, with the exception +/// that on FreeBSD there is an extra argument `process`. When `process` is set +/// to `None`, the operation is performed for the current process, like on +/// Linux. +/// +/// # References +/// - [FreeBSD `procctl(PROC_TRACE_CTL,…)`] +/// +/// [FreeBSD `procctl(PROC_TRACE_CTL,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn set_dumpable_behavior(process: ProcSelector, config: DumpableBehavior) -> io::Result<()> { + unsafe { procctl(PROC_TRACE_CTL, process, config as usize as *mut _) } +} + +// +// PROC_TRACE_STATUS +// + +const PROC_TRACE_STATUS: c_int = 8; + +/// Tracing status as returned by [`trace_status`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub enum TracingStatus { + /// Tracing is disabled for the process. + NotTraceble, + /// Tracing is not disabled for the process, but not debugger/tracer is + /// attached. + Tracable, + /// The process is being traced by the process whose pid is stored in the + /// first component of this variant. + BeingTraced(Pid), +} + +/// Get the tracing status of the process indicated by `idtype` and `id`. +/// +/// # References +/// - [FreeBSD `procctl(PROC_TRACE_STATUS,…)`] +/// +/// [FreeBSD `procctl(PROC_TRACE_STATUS,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn trace_status(process: ProcSelector) -> io::Result { + let val = unsafe { procctl_get_optional::(PROC_TRACE_STATUS, process) }?; + match val { + -1 => Ok(TracingStatus::NotTraceble), + 0 => Ok(TracingStatus::Tracable), + pid => { + let pid = Pid::from_raw(pid as RawPid).ok_or(io::Errno::RANGE)?; + Ok(TracingStatus::BeingTraced(pid)) + } + } +} + +// +// PROC_REAP_* +// + +const PROC_REAP_ACQUIRE: c_int = 2; +const PROC_REAP_RELEASE: c_int = 3; + +/// Acquire or release the reaper status of the calling process. +/// +/// # References +/// - [FreeBSD: `procctl(PROC_REAP_ACQUIRE/RELEASE,…)`] +/// +/// [FreeBSD: `procctl(PROC_REAP_ACQUIRE/RELEASE,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn set_reaper_status(reaper: bool) -> io::Result<()> { + unsafe { + procctl( + if reaper { + PROC_REAP_ACQUIRE + } else { + PROC_REAP_RELEASE + }, + None, + ptr::null_mut(), + ) + } +} + +const PROC_REAP_STATUS: c_int = 4; + +bitflags! { + /// `REAPER_STATUS_*` + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct ReaperStatusFlags: c_uint { + /// The process has acquired reaper status. + const OWNED = 1; + /// The process is the root of the reaper tree ([`Pid::INIT`]). + const REALINIT = 2; + + /// + const _ = !0; + } +} + +#[repr(C)] +struct procctl_reaper_status { + rs_flags: c_uint, + rs_children: c_uint, + rs_descendants: c_uint, + rs_reaper: RawPid, + rs_pid: RawPid, + rs_pad0: [c_uint; 15], +} + +/// Reaper status as returned by [`get_reaper_status`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub struct ReaperStatus { + /// The flags. + pub flags: ReaperStatusFlags, + /// The number of children of the reaper among the descendants. + pub children: usize, + /// The total number of descendants of the reaper(s), not counting + /// descendants of the reaper in the subtree. + pub descendants: usize, + /// The pid of the reaper for the specified process id. + pub reaper: Pid, + /// The pid of one reaper child if there are any descendants. + pub pid: Option, +} + +/// Get information about the reaper of the specified process (or the process +/// itself if it is a reaper). +/// +/// # References +/// - [FreeBSD: `procctl(PROC_REAP_STATUS,…)`] +/// +/// [FreeBSD: `procctl(PROC_REAP_STATUS,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn get_reaper_status(process: ProcSelector) -> io::Result { + let raw = unsafe { procctl_get_optional::(PROC_REAP_STATUS, process) }?; + Ok(ReaperStatus { + flags: ReaperStatusFlags::from_bits_retain(raw.rs_flags), + children: raw.rs_children as _, + descendants: raw.rs_descendants as _, + reaper: Pid::from_raw(raw.rs_reaper).ok_or(io::Errno::RANGE)?, + pid: if raw.rs_pid == -1 { + None + } else { + Some(Pid::from_raw(raw.rs_pid).ok_or(io::Errno::RANGE)?) + }, + }) +} + +#[cfg(feature = "alloc")] +const PROC_REAP_GETPIDS: c_int = 5; + +bitflags! { + /// `REAPER_PIDINFO_*` + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct PidInfoFlags: c_uint { + /// This structure was filled by the kernel. + const VALID = 1; + /// The pid field identifies a direct child of the reaper. + const CHILD = 2; + /// The reported process is itself a reaper. Descendants of a + /// subordinate reaper are not reported. + const REAPER = 4; + /// The reported process is in the zombie state. + const ZOMBIE = 8; + /// The reported process is stopped by + /// [`Signal::Stop`]/[`Signal::Tstp`]. + const STOPPED = 16; + /// The reported process is in the process of exiting. + const EXITING = 32; + } +} + +#[repr(C)] +#[derive(Default, Clone)] +struct procctl_reaper_pidinfo { + pi_pid: RawPid, + pi_subtree: RawPid, + pi_flags: c_uint, + pi_pad0: [c_uint; 15], +} + +#[repr(C)] +struct procctl_reaper_pids { + rp_count: c_uint, + rp_pad0: [c_uint; 15], + rp_pids: *mut procctl_reaper_pidinfo, +} + +/// A child process of a reaper. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub struct PidInfo { + /// The flags of the process. + pub flags: PidInfoFlags, + /// The pid of the process. + pub pid: Pid, + /// The pid of the child of the reaper which is the (grand-…)parent of the + /// process. + pub subtree: Pid, +} + +/// Get the list of descendants of the specified reaper process. +/// +/// # References +/// - [FreeBSD: `procctl(PROC_REAP_GETPIDS,…)`] +/// +/// [FreeBSD: `procctl(PROC_REAP_GETPIDS,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[cfg(feature = "alloc")] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +pub fn get_reaper_pids(process: ProcSelector) -> io::Result> { + // Sadly no better way to guarantee that we get all the results than to + // allocate ≈8MB of memory… + const PID_MAX: usize = 99999; + let mut pids: Vec = vec![Default::default(); PID_MAX]; + let mut pinfo = procctl_reaper_pids { + rp_count: PID_MAX as _, + rp_pad0: [0; 15], + rp_pids: pids.as_mut_slice().as_mut_ptr(), + }; + unsafe { procctl(PROC_REAP_GETPIDS, process, as_mut_ptr(&mut pinfo).cast())? }; + let mut result = Vec::new(); + for raw in pids.into_iter() { + let flags = PidInfoFlags::from_bits_retain(raw.pi_flags); + if !flags.contains(PidInfoFlags::VALID) { + break; + } + result.push(PidInfo { + flags, + subtree: Pid::from_raw(raw.pi_subtree).ok_or(io::Errno::RANGE)?, + pid: Pid::from_raw(raw.pi_pid).ok_or(io::Errno::RANGE)?, + }); + } + Ok(result) +} + +const PROC_REAP_KILL: c_int = 6; + +bitflags! { + /// `REAPER_KILL_*` + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + struct KillFlags: c_uint { + const CHILDREN = 1; + const SUBTREE = 2; + } +} + +#[repr(C)] +struct procctl_reaper_kill { + rk_sig: c_int, + rk_flags: c_uint, + rk_subtree: RawPid, + rk_killed: c_uint, + rk_fpid: RawPid, + rk_pad0: [c_uint; 15], +} + +/// Reaper status as returned by [`get_reaper_status`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub struct KillResult { + /// The number of processes that were signalled. + pub killed: usize, + /// The pid of the first process that wasn't successfully signalled. + pub first_failed: Option, +} + +/// Deliver a signal to some subset of the descendants of the reaper. +/// +/// # References +/// - [FreeBSD: `procctl(PROC_REAP_KILL,…)`] +/// +/// [FreeBSD: `procctl(PROC_REAP_KILL,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +pub fn reaper_kill( + process: ProcSelector, + signal: Signal, + direct_children: bool, + subtree: Option, +) -> io::Result { + let mut flags = KillFlags::empty(); + flags.set(KillFlags::CHILDREN, direct_children); + flags.set(KillFlags::SUBTREE, subtree.is_some()); + let mut req = procctl_reaper_kill { + rk_sig: signal.as_raw(), + rk_flags: flags.bits(), + rk_subtree: subtree.map(|p| p.as_raw_nonzero().into()).unwrap_or(0), + rk_killed: 0, + rk_fpid: 0, + rk_pad0: [0; 15], + }; + unsafe { procctl(PROC_REAP_KILL, process, as_mut_ptr(&mut req).cast())? }; + Ok(KillResult { + killed: req.rk_killed as _, + first_failed: Pid::from_raw(req.rk_fpid), + }) +} + +// +// PROC_TRAPCAP_STATUS/PROC_TRAPCAP_CTL +// + +const PROC_TRAPCAP_CTL: c_int = 9; + +const PROC_TRAPCAP_CTL_ENABLE: i32 = 1; +const PROC_TRAPCAP_CTL_DISABLE: i32 = 2; + +/// `PROC_TRAPCAP_CTL_*` +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(i32)] +pub enum TrapCapBehavior { + /// Disable the [`Signal::Trap`] signal delivery on capability mode access + /// violations. + Disable = PROC_TRAPCAP_CTL_DISABLE, + /// Enable the [`Signal::Trap`] signal delivery on capability mode access + /// violations. + Enable = PROC_TRAPCAP_CTL_ENABLE, +} + +/// Set the current value of the capability mode violation trapping behavior. +/// +/// If this behavior is enabled, the kernel would deliver a [`Signal::Trap`] +/// signal on any return from a system call that would result in a +/// [`io::Errno::NOTCAPABLE`] or [`io::Errno::CAPMODE`] error. +/// +/// This behavior is inherited by the children of the process and is kept +/// across `execve` calls. +/// +/// # References +/// - [FreeBSD: `procctl(PROC_TRAPCAP_CTL,…)`] +/// +/// [FreeBSD: `procctl(PROC_TRAPCAP_CTL,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn set_trap_cap_behavior(process: ProcSelector, config: TrapCapBehavior) -> io::Result<()> { + let config = config as c_int; + unsafe { procctl_set::(PROC_TRAPCAP_CTL, process, &config) } +} + +const PROC_TRAPCAP_STATUS: c_int = 10; + +/// Get the current value of the capability mode violation trapping behavior. +/// +/// # References +/// - [FreeBSD: `procctl(PROC_TRAPCAP_STATUS,…)`] +/// +/// [FreeBSD: `procctl(PROC_TRAPCAP_STATUS,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn trap_cap_behavior(process: ProcSelector) -> io::Result { + let val = unsafe { procctl_get_optional::(PROC_TRAPCAP_STATUS, process) }?; + match val { + PROC_TRAPCAP_CTL_DISABLE => Ok(TrapCapBehavior::Disable), + PROC_TRAPCAP_CTL_ENABLE => Ok(TrapCapBehavior::Enable), + _ => Err(io::Errno::RANGE), + } +} + +// +// PROC_NO_NEW_PRIVS_STATUS/PROC_NO_NEW_PRIVS_CTL +// + +const PROC_NO_NEW_PRIVS_CTL: c_int = 19; + +const PROC_NO_NEW_PRIVS_ENABLE: c_int = 1; + +/// Enable the `no_new_privs` mode that ignores SUID and SGID bits on `execve` +/// in the specified process and its future descendants. +/// +/// This is similar to `set_no_new_privs` on Linux, with the exception that on +/// FreeBSD there is no argument `no_new_privs` argument as it's only possible +/// to enable this mode and there's no going back. +/// +/// # References +/// - [Linux: `prctl(PR_SET_NO_NEW_PRIVS,…)`] +/// - [FreeBSD: `procctl(PROC_NO_NEW_PRIVS_CTL,…)`] +/// +/// [Linux: `prctl(PR_SET_NO_NEW_PRIVS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [FreeBSD: `procctl(PROC_NO_NEW_PRIVS_CTL,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn set_no_new_privs(process: ProcSelector) -> io::Result<()> { + unsafe { procctl_set::(PROC_NO_NEW_PRIVS_CTL, process, &PROC_NO_NEW_PRIVS_ENABLE) } +} + +const PROC_NO_NEW_PRIVS_STATUS: c_int = 20; + +/// Check the `no_new_privs` mode of the specified process. +/// +/// # References +/// - [Linux: `prctl(PR_GET_NO_NEW_PRIVS,…)`] +/// - [FreeBSD: `procctl(PROC_NO_NEW_PRIVS_STATUS,…)`] +/// +/// [Linux: `prctl(PR_GET_NO_NEW_PRIVS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [FreeBSD: `procctl(PROC_NO_NEW_PRIVS_STATUS,…)`]: https://man.freebsd.org/cgi/man.cgi?query=procctl&sektion=2 +#[inline] +pub fn no_new_privs(process: ProcSelector) -> io::Result { + unsafe { procctl_get_optional::(PROC_NO_NEW_PRIVS_STATUS, process) } + .map(|x| x == PROC_NO_NEW_PRIVS_ENABLE) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/rlimit.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/rlimit.rs new file mode 100644 index 0000000000000000000000000000000000000000..124ca51af742a4b945cceaffdf108e278b81447b --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/rlimit.rs @@ -0,0 +1,53 @@ +#[cfg(linux_kernel)] +use crate::process::Pid; +use crate::{backend, io}; + +pub use backend::process::types::Resource; + +/// `struct rlimit`—Current and maximum values used in [`getrlimit`], +/// [`setrlimit`], and [`prlimit`]. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct Rlimit { + /// Current effective, “soft”, limit. + pub current: Option, + /// Maximum, “hard”, value that `current` may be dynamically increased to. + pub maximum: Option, +} + +/// `getrlimit(resource)`—Get a process resource limit value. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getrlimit.html +/// [Linux]: https://man7.org/linux/man-pages/man2/getrlimit.2.html +#[inline] +pub fn getrlimit(resource: Resource) -> Rlimit { + backend::process::syscalls::getrlimit(resource) +} + +/// `setrlimit(resource, new)`—Set a process resource limit value. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setrlimit.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setrlimit.2.html +#[inline] +pub fn setrlimit(resource: Resource, new: Rlimit) -> io::Result<()> { + backend::process::syscalls::setrlimit(resource, new) +} + +/// `prlimit(pid, resource, new)`—Get and set a process resource limit value. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/prlimit.2.html +#[cfg(linux_kernel)] +#[inline] +pub fn prlimit(pid: Option, resource: Resource, new: Rlimit) -> io::Result { + backend::process::syscalls::prlimit(pid, resource, new) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/types.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/types.rs new file mode 100644 index 0000000000000000000000000000000000000000..0adb47ec6692574fd0bdbf7ae6d197194252a2f0 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/types.rs @@ -0,0 +1,94 @@ +//! Types for use with [`rustix::process`] functions. +//! +//! [`rustix::process`]: crate::process + +#![allow(unsafe_code)] + +use crate::backend::c; +use crate::pid::Pid; +use core::mem::transmute; + +/// File lock data structure used in [`fcntl_getlk`]. +/// +/// [`fcntl_getlk`]: crate::process::fcntl_getlk() +#[cfg(not(target_os = "horizon"))] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct Flock { + /// Starting offset for lock + pub start: u64, + /// Number of bytes to lock + pub length: u64, + /// PID of process blocking our lock. If set to `None`, it refers to the + /// current process + pub pid: Option, + /// Type of lock + pub typ: FlockType, + /// Offset type of lock + pub offset_type: FlockOffsetType, +} + +#[cfg(not(target_os = "horizon"))] +impl Flock { + pub(crate) const unsafe fn from_raw_unchecked(raw_fl: c::flock) -> Self { + Self { + start: raw_fl.l_start as _, + length: raw_fl.l_len as _, + pid: Pid::from_raw(raw_fl.l_pid), + typ: transmute::(raw_fl.l_type), + offset_type: transmute::(raw_fl.l_whence), + } + } + + pub(crate) fn as_raw(&self) -> c::flock { + let mut f: c::flock = unsafe { core::mem::zeroed() }; + f.l_start = self.start as _; + f.l_len = self.length as _; + f.l_pid = Pid::as_raw(self.pid); + f.l_type = self.typ as _; + f.l_whence = self.offset_type as _; + f + } +} + +#[cfg(not(target_os = "horizon"))] +impl From for Flock { + fn from(value: FlockType) -> Self { + Self { + start: 0, + length: 0, + pid: None, + typ: value, + offset_type: FlockOffsetType::Set, + } + } +} + +/// `F_*LCK` constants for use with [`fcntl_getlk`]. +/// +/// [`fcntl_getlk`]: crate::process::fcntl_getlk() +#[cfg(not(target_os = "horizon"))] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(i16)] +pub enum FlockType { + /// `F_RDLCK` + ReadLock = c::F_RDLCK as _, + /// `F_WRLCK` + WriteLock = c::F_WRLCK as _, + /// `F_UNLCK` + Unlocked = c::F_UNLCK as _, +} + +/// `F_SEEK*` constants for use with [`fcntl_getlk`]. +/// +/// [`fcntl_getlk`]: crate::process::fcntl_getlk() +#[cfg(not(target_os = "horizon"))] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[repr(i16)] +pub enum FlockOffsetType { + /// `F_SEEK_SET` + Set = c::SEEK_SET as _, + /// `F_SEEK_CUR` + Current = c::SEEK_CUR as _, + /// `F_SEEK_END` + End = c::SEEK_END as _, +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/umask.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/umask.rs new file mode 100644 index 0000000000000000000000000000000000000000..16bd550a6f7fb62e871e292be0fa7a32ec281449 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/umask.rs @@ -0,0 +1,21 @@ +//! Umask support. + +#[cfg(feature = "fs")] +use crate::backend; +#[cfg(feature = "fs")] +use crate::fs::Mode; + +/// `umask(mask)`—Set the process file creation mask. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/umask.html +/// [Linux]: https://man7.org/linux/man-pages/man2/umask.2.html +#[cfg(feature = "fs")] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +#[inline] +pub fn umask(mask: Mode) -> Mode { + backend::process::syscalls::umask(mask) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/wait.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/wait.rs new file mode 100644 index 0000000000000000000000000000000000000000..0e004f3d2565b16eb54af9cbaf3ef1c4bab7d85f --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/process/wait.rs @@ -0,0 +1,493 @@ +//! Wait for processes to change state. +//! +//! # Safety +//! +//! This code needs to implement `Send` and `Sync` for `WaitIdStatus` because +//! the linux-raw-sys bindings generate a type that doesn't do so +//! automatically. +#![allow(unsafe_code)] +use crate::process::Pid; +use crate::{backend, io}; +use bitflags::bitflags; +use core::fmt; + +#[cfg(target_os = "linux")] +use crate::fd::BorrowedFd; + +#[cfg(linux_raw)] +use crate::backend::process::wait::SiginfoExt as _; + +bitflags! { + /// Options for modifying the behavior of [`wait`]/[`waitpid`]. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct WaitOptions: u32 { + /// Return immediately if no child has exited. + const NOHANG = bitcast!(backend::process::wait::WNOHANG); + /// Return if a child has stopped (but not traced via [`ptrace`]). + /// + /// [`ptrace`]: https://man7.org/linux/man-pages/man2/ptrace.2.html + #[cfg(not(target_os = "horizon"))] + const UNTRACED = bitcast!(backend::process::wait::WUNTRACED); + /// Return if a stopped child has been resumed by delivery of + /// [`Signal::Cont`]. + /// + /// [`Signal::Cont`]: crate::process::Signal::Cont + #[cfg(not(target_os = "horizon"))] + const CONTINUED = bitcast!(backend::process::wait::WCONTINUED); + + /// + const _ = !0; + } +} + +#[cfg(not(any( + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "wasi" +)))] +bitflags! { + /// Options for modifying the behavior of [`waitid`]. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct WaitIdOptions: u32 { + /// Return immediately if no child has exited. + const NOHANG = bitcast!(backend::process::wait::WNOHANG); + /// Return if a stopped child has been resumed by delivery of + /// [`Signal::Cont`]. + /// + /// [`Signal::Cont`]: crate::process::Signal::Cont + const CONTINUED = bitcast!(backend::process::wait::WCONTINUED); + /// Wait for processed that have exited. + #[cfg(not(target_os = "cygwin"))] + const EXITED = bitcast!(backend::process::wait::WEXITED); + /// Keep processed in a waitable state. + #[cfg(not(target_os = "cygwin"))] + const NOWAIT = bitcast!(backend::process::wait::WNOWAIT); + /// Wait for processes that have been stopped. + #[cfg(not(target_os = "cygwin"))] + const STOPPED = bitcast!(backend::process::wait::WSTOPPED); + + /// + const _ = !0; + } +} + +/// The status of a child process after calling [`wait`]/[`waitpid`]. +#[derive(Clone, Copy)] +#[repr(transparent)] +pub struct WaitStatus(i32); + +impl WaitStatus { + /// Creates a `WaitStatus` out of an integer. + #[inline] + pub(crate) fn new(status: i32) -> Self { + Self(status) + } + + /// Converts a `WaitStatus` into its raw representation as an integer. + #[inline] + pub const fn as_raw(self) -> i32 { + self.0 + } + + /// Returns whether the process is currently stopped. + #[inline] + #[doc(alias = "WIFSTOPPED")] + pub fn stopped(self) -> bool { + backend::process::wait::WIFSTOPPED(self.0) + } + + /// Returns whether the process has exited normally. + #[inline] + #[doc(alias = "WIFEXITED")] + pub fn exited(self) -> bool { + backend::process::wait::WIFEXITED(self.0) + } + + /// Returns whether the process was terminated by a signal. + #[inline] + #[doc(alias = "WIFSIGNALED")] + pub fn signaled(self) -> bool { + backend::process::wait::WIFSIGNALED(self.0) + } + + /// Returns whether the process has continued from a job control stop. + #[inline] + #[doc(alias = "WIFCONTINUED")] + pub fn continued(self) -> bool { + backend::process::wait::WIFCONTINUED(self.0) + } + + /// Returns the number of the signal that stopped the process, if the + /// process was stopped by a signal. + #[inline] + #[doc(alias = "WSTOPSIG")] + pub fn stopping_signal(self) -> Option { + if self.stopped() { + Some(backend::process::wait::WSTOPSIG(self.0)) + } else { + None + } + } + + /// Returns the exit status number returned by the process, if it exited + /// normally. + #[inline] + #[doc(alias = "WEXITSTATUS")] + pub fn exit_status(self) -> Option { + if self.exited() { + Some(backend::process::wait::WEXITSTATUS(self.0)) + } else { + None + } + } + + /// Returns the number of the signal that terminated the process, if the + /// process was terminated by a signal. + #[inline] + #[doc(alias = "WTERMSIG")] + pub fn terminating_signal(self) -> Option { + if self.signaled() { + Some(backend::process::wait::WTERMSIG(self.0)) + } else { + None + } + } +} + +impl fmt::Debug for WaitStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut s = f.debug_struct("WaitStatus"); + s.field("stopped", &self.stopped()); + s.field("exited", &self.exited()); + s.field("signaled", &self.signaled()); + s.field("continued", &self.continued()); + if let Some(stopping_signal) = self.stopping_signal() { + s.field("stopping_signal", &stopping_signal); + } + if let Some(exit_status) = self.exit_status() { + s.field("exit_status", &exit_status); + } + if let Some(terminating_signal) = self.terminating_signal() { + s.field("terminating_signal", &terminating_signal); + } + s.finish() + } +} + +/// The status of a process after calling [`waitid`]. +#[derive(Clone, Copy)] +#[repr(transparent)] +#[cfg(not(any( + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "wasi" +)))] +pub struct WaitIdStatus(pub(crate) backend::c::siginfo_t); + +#[cfg(linux_raw)] +// SAFETY: `siginfo_t` does contain some raw pointers, such as the `si_ptr` +// and the `si_addr` fields, however it's up to users to use those correctly. +unsafe impl Send for WaitIdStatus {} + +#[cfg(linux_raw)] +// SAFETY: Same as with `Send`. +unsafe impl Sync for WaitIdStatus {} + +#[cfg(not(any( + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "wasi" +)))] +impl WaitIdStatus { + /// Returns whether the process is currently stopped. + #[inline] + pub fn stopped(&self) -> bool { + self.raw_code() == bitcast!(backend::c::CLD_STOPPED) + } + + /// Returns whether the process is currently trapped. + #[inline] + pub fn trapped(&self) -> bool { + self.raw_code() == bitcast!(backend::c::CLD_TRAPPED) + } + + /// Returns whether the process has exited normally. + #[inline] + pub fn exited(&self) -> bool { + self.raw_code() == bitcast!(backend::c::CLD_EXITED) + } + + /// Returns whether the process was terminated by a signal and did not + /// create a core file. + #[inline] + pub fn killed(&self) -> bool { + self.raw_code() == bitcast!(backend::c::CLD_KILLED) + } + + /// Returns whether the process was terminated by a signal and did create a + /// core file. + #[inline] + pub fn dumped(&self) -> bool { + self.raw_code() == bitcast!(backend::c::CLD_DUMPED) + } + + /// Returns whether the process has continued from a job control stop. + #[inline] + pub fn continued(&self) -> bool { + self.raw_code() == bitcast!(backend::c::CLD_CONTINUED) + } + + /// Returns the number of the signal that stopped the process, if the + /// process was stopped by a signal. + #[inline] + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + pub fn stopping_signal(&self) -> Option { + if self.stopped() { + Some(self.si_status()) + } else { + None + } + } + + /// Returns the number of the signal that trapped the process, if the + /// process was trapped by a signal. + #[inline] + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + pub fn trapping_signal(&self) -> Option { + if self.trapped() { + Some(self.si_status()) + } else { + None + } + } + + /// Returns the exit status number returned by the process, if it exited + /// normally. + #[inline] + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + pub fn exit_status(&self) -> Option { + if self.exited() { + Some(self.si_status()) + } else { + None + } + } + + /// Returns the number of the signal that terminated the process, if the + /// process was terminated by a signal. + #[inline] + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + pub fn terminating_signal(&self) -> Option { + if self.killed() || self.dumped() { + Some(self.si_status()) + } else { + None + } + } + + /// Return the raw `si_signo` value returned from `waitid`. + #[cfg(linux_raw)] + pub fn raw_signo(&self) -> crate::ffi::c_int { + self.0.si_signo() + } + + /// Return the raw `si_signo` value returned from `waitid`. + #[cfg(not(linux_raw))] + pub fn raw_signo(&self) -> crate::ffi::c_int { + self.0.si_signo + } + + /// Return the raw `si_errno` value returned from `waitid`. + #[cfg(linux_raw)] + pub fn raw_errno(&self) -> crate::ffi::c_int { + self.0.si_errno() + } + + /// Return the raw `si_errno` value returned from `waitid`. + #[cfg(not(linux_raw))] + pub fn raw_errno(&self) -> crate::ffi::c_int { + self.0.si_errno + } + + /// Return the raw `si_code` value returned from `waitid`. + #[cfg(linux_raw)] + pub fn raw_code(&self) -> crate::ffi::c_int { + self.0.si_code() + } + + /// Return the raw `si_code` value returned from `waitid`. + #[cfg(not(linux_raw))] + pub fn raw_code(&self) -> crate::ffi::c_int { + self.0.si_code + } + + // This is disabled on NetBSD because the libc crate's `si_status()` + // implementation doesn't appear to match what's in NetBSD's headers and we + // don't get a meaningful value returned. + // TODO: Report this upstream. + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + #[allow(unsafe_code)] + fn si_status(&self) -> crate::ffi::c_int { + // SAFETY: POSIX [specifies] that the `siginfo_t` returned by a + // `waitid` call always has a valid `si_status` value. + // + // [specifies]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/signal.h.html + unsafe { self.0.si_status() } + } +} + +#[cfg(not(any( + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "wasi" +)))] +impl fmt::Debug for WaitIdStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut s = f.debug_struct("WaitIdStatus"); + s.field("stopped", &self.stopped()); + s.field("exited", &self.exited()); + s.field("killed", &self.killed()); + s.field("trapped", &self.trapped()); + s.field("dumped", &self.dumped()); + s.field("continued", &self.continued()); + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + if let Some(stopping_signal) = self.stopping_signal() { + s.field("stopping_signal", &stopping_signal); + } + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + if let Some(trapping_signal) = self.trapping_signal() { + s.field("trapping_signal", &trapping_signal); + } + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + if let Some(exit_status) = self.exit_status() { + s.field("exit_status", &exit_status); + } + #[cfg(not(any(target_os = "emscripten", target_os = "fuchsia", target_os = "netbsd")))] + if let Some(terminating_signal) = self.terminating_signal() { + s.field("terminating_signal", &terminating_signal); + } + s.finish() + } +} + +/// The identifier to wait on in a call to [`waitid`]. +#[cfg(not(any(target_os = "openbsd", target_os = "redox", target_os = "wasi")))] +#[derive(Debug, Clone)] +#[non_exhaustive] +pub enum WaitId<'a> { + /// Wait on all processes. + #[doc(alias = "P_ALL")] + All, + + /// Wait for a specific process ID. + #[doc(alias = "P_PID")] + Pid(Pid), + + /// Wait for a specific process group ID, or the calling process' group ID. + #[doc(alias = "P_PGID")] + Pgid(Option), + + /// Wait for a specific process file descriptor. + #[cfg(target_os = "linux")] + #[doc(alias = "P_PIDFD")] + PidFd(BorrowedFd<'a>), + + /// Eat the lifetime for non-Linux platforms. + #[doc(hidden)] + #[cfg(not(target_os = "linux"))] + __EatLifetime(core::marker::PhantomData<&'a ()>), +} + +/// `waitpid(pid, waitopts)`—Wait for a specific process to change state. +/// +/// If the pid is `None`, the call will wait for any child process whose +/// process group id matches that of the calling process. Otherwise, the call +/// will wait for the child process with the given pid. +/// +/// On Success, returns the status of the selected process. +/// +/// If `NOHANG` was specified in the options, and the selected child process +/// didn't change state, returns `None`. +/// +/// To wait for a given process group (the `< -1` case of `waitpid`), use +/// [`waitpgid`] or [`waitid`]. To wait for any process (the `-1` case of +/// `waitpid`), use [`wait`]. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html +/// [Linux]: https://man7.org/linux/man-pages/man2/waitpid.2.html +#[doc(alias = "wait4")] +#[cfg(not(target_os = "wasi"))] +#[inline] +pub fn waitpid(pid: Option, waitopts: WaitOptions) -> io::Result> { + backend::process::syscalls::waitpid(pid, waitopts) +} + +/// `waitpid(-pgid, waitopts)`—Wait for a process in a specific process group +/// to change state. +/// +/// The call will wait for any child process with the given pgid. +/// +/// On Success, returns the status of the selected process. +/// +/// If `NOHANG` was specified in the options, and no selected child process +/// changed state, returns `None`. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html +/// [Linux]: https://man7.org/linux/man-pages/man2/waitpid.2.html +#[cfg(not(target_os = "wasi"))] +#[inline] +pub fn waitpgid(pgid: Pid, waitopts: WaitOptions) -> io::Result> { + backend::process::syscalls::waitpgid(pgid, waitopts) +} + +/// `wait(waitopts)`—Wait for any of the children of calling process to +/// change state. +/// +/// On success, returns the pid of the child process whose state changed, and +/// the status of said process. +/// +/// If `NOHANG` was specified in the options, and the selected child process +/// didn't change state, returns `None`. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html +/// [Linux]: https://man7.org/linux/man-pages/man2/waitpid.2.html +#[cfg(not(target_os = "wasi"))] +#[inline] +pub fn wait(waitopts: WaitOptions) -> io::Result> { + backend::process::syscalls::wait(waitopts) +} + +/// `waitid(_, _, _, opts)`—Wait for the specified child process to change +/// state. +#[cfg(not(any( + target_os = "cygwin", + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "wasi", +)))] +#[inline] +pub fn waitid<'a, Id: Into>>( + id: Id, + options: WaitIdOptions, +) -> io::Result> { + backend::process::syscalls::waitid(id.into(), options) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/rand/getrandom.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/rand/getrandom.rs new file mode 100644 index 0000000000000000000000000000000000000000..69af9a3d4056313c78876c94b82254f585a32ac4 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/rand/getrandom.rs @@ -0,0 +1,33 @@ +//! Wrappers for `getrandom`. + +#![allow(unsafe_code)] + +use crate::buffer::Buffer; +use crate::{backend, io}; + +pub use backend::rand::types::GetRandomFlags; + +/// `getrandom(buf, flags)`—Reads a sequence of random bytes. +/// +/// This is a very low-level API which may be difficult to use correctly. Most +/// users should prefer to use [`getrandom`] or [`rand`] APIs instead. +/// +/// This function is implemented using a system call, and not the +/// [vDSO mechanism] introduced in Linux 6.11. See [#1185] for details. +/// +/// [`getrandom`]: https://crates.io/crates/getrandom +/// [`rand`]: https://crates.io/crates/rand +/// [vDSO mechanism]: https://lwn.net/Articles/983186/ +/// [#1185]: https://github.com/bytecodealliance/rustix/issues/1185 +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/getrandom.2.html +#[inline] +pub fn getrandom>(mut buf: Buf, flags: GetRandomFlags) -> io::Result { + // SAFETY: `getrandom` behaves. + let len = unsafe { backend::rand::syscalls::getrandom(buf.parts_mut(), flags)? }; + // SAFETY: `getrandom` behaves. + unsafe { Ok(buf.assume_init(len)) } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/rand/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/rand/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..e767c590d29a03870ecdc407e0dd484dccce23dc --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/rand/mod.rs @@ -0,0 +1,7 @@ +//! Random-related operations. + +#[cfg(linux_kernel)] +mod getrandom; + +#[cfg(linux_kernel)] +pub use getrandom::{getrandom, GetRandomFlags}; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/ioctl.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/ioctl.rs new file mode 100644 index 0000000000000000000000000000000000000000..22945566ae97a72c5f876f17bcb78997c11c977b --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/ioctl.rs @@ -0,0 +1,66 @@ +//! Terminal-related `ioctl` functions. + +#![allow(unsafe_code)] + +use crate::fd::AsFd; +use crate::{backend, io, ioctl}; +use backend::c; + +/// `ioctl(fd, TIOCEXCL)`—Enables exclusive mode on a terminal. +/// +/// In exclusive mode, subsequent unprivileged `open` calls on the terminal +/// device fail with [`io::Errno::BUSY`]. +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// +/// [Linux]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=tty&sektion=4 +/// [NetBSD]: https://man.netbsd.org/tty.4 +/// [OpenBSD]: https://man.openbsd.org/tty.4 +#[cfg(not(any( + windows, + target_os = "horizon", + target_os = "redox", + target_os = "wasi" +)))] +#[inline] +#[doc(alias = "TIOCEXCL")] +pub fn ioctl_tiocexcl(fd: Fd) -> io::Result<()> { + // SAFETY: `TIOCEXCL` is a no-argument setter opcode. + unsafe { + let ctl = ioctl::NoArg::<{ c::TIOCEXCL as _ }>::new(); + ioctl::ioctl(fd, ctl) + } +} + +/// `ioctl(fd, TIOCNXCL)`—Disables exclusive mode on a terminal. +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// +/// [Linux]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=tty&sektion=4 +/// [NetBSD]: https://man.netbsd.org/tty.4 +/// [OpenBSD]: https://man.openbsd.org/tty.4 +#[cfg(not(any( + windows, + target_os = "horizon", + target_os = "redox", + target_os = "wasi" +)))] +#[inline] +#[doc(alias = "TIOCNXCL")] +pub fn ioctl_tiocnxcl(fd: Fd) -> io::Result<()> { + // SAFETY: `TIOCNXCL` is a no-argument setter opcode. + unsafe { + let ctl = ioctl::NoArg::<{ c::TIOCNXCL as _ }>::new(); + ioctl::ioctl(fd, ctl) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..98efb9b32de585a202e132ace148212f8db411d6 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/mod.rs @@ -0,0 +1,38 @@ +//! Terminal I/O stream operations. +//! +//! This API automatically supports setting arbitrary I/O speeds, on any +//! platform that supports them, including Linux and the BSDs. +//! +//! The [`speed`] module contains various predefined speed constants which are +//! more likely to be portable, however any `u32` value can be passed to +//! [`Termios::set_speed`], [`Termios::set_input_speed`], and +//! [`Termios::set_output_speed`], and they will simply fail if the speed is +//! not supported by the platform or the device. + +#[cfg(not(any( + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "wasi", +)))] +mod ioctl; +#[cfg(not(target_os = "wasi"))] +mod tc; +#[cfg(not(windows))] +mod tty; +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] +mod types; + +#[cfg(not(any( + target_os = "cygwin", + target_os = "espidf", + target_os = "haiku", + target_os = "wasi", +)))] +pub use ioctl::*; +#[cfg(not(target_os = "wasi"))] +pub use tc::*; +#[cfg(not(windows))] +pub use tty::*; +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] +pub use types::*; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/tc.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/tc.rs new file mode 100644 index 0000000000000000000000000000000000000000..dabd17eb7c8e07f6c9ecbbc2446296e41ca43895 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/tc.rs @@ -0,0 +1,225 @@ +use crate::fd::AsFd; +#[cfg(not(target_os = "espidf"))] +use crate::termios::{Action, OptionalActions, QueueSelector, Termios, Winsize}; +use crate::{backend, io}; + +pub use crate::pid::Pid; + +/// `tcgetattr(fd)`—Get terminal attributes. +/// +/// Also known as the `TCGETS` (or `TCGETS2` on Linux) operation with `ioctl`. +/// +/// On Linux, this uses `TCGETS2`. If that fails in a way that indicates that +/// the host doesn't support it, this falls back to the old `TCGETS`, manually +/// initializes the fields that `TCGETS` doesn't initialize, and fails with +/// `io::Errno::RANGE` if the input or output speeds cannot be supported. +/// +/// # References +/// - [POSIX `tcgetattr`] +/// - [Linux `ioctl_tty`] +/// - [Linux `termios`] +/// +/// [POSIX `tcgetattr`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcgetattr.html +/// [Linux `ioctl_tty`]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [Linux `termios`]: https://man7.org/linux/man-pages/man3/termios.3.html +#[cfg(not(any(windows, target_os = "espidf", target_os = "wasi")))] +#[inline] +#[doc(alias = "TCGETS")] +#[doc(alias = "TCGETS2")] +#[doc(alias = "tcgetattr2")] +pub fn tcgetattr(fd: Fd) -> io::Result { + backend::termios::syscalls::tcgetattr(fd.as_fd()) +} + +/// `tcgetwinsize(fd)`—Get the current terminal window size. +/// +/// Also known as the `TIOCGWINSZ` operation with `ioctl`. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +#[cfg(not(any( + windows, + target_os = "horizon", + target_os = "espidf", + target_os = "wasi" +)))] +#[inline] +#[doc(alias = "TIOCGWINSZ")] +pub fn tcgetwinsize(fd: Fd) -> io::Result { + backend::termios::syscalls::tcgetwinsize(fd.as_fd()) +} + +/// `tcgetpgrp(fd)`—Get the terminal foreground process group. +/// +/// Also known as the `TIOCGPGRP` operation with `ioctl`. +/// +/// On Linux, if `fd` is a pseudo-terminal, the underlying system call here can +/// return a pid of 0, which rustix's `Pid` type doesn't support. So rustix +/// instead handles this case by failing with [`io::Errno::OPNOTSUPP`] if the +/// pid is 0. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcgetpgrp.html +/// [Linux]: https://man7.org/linux/man-pages/man3/tcgetpgrp.3.html +#[cfg(not(any(windows, target_os = "wasi")))] +#[inline] +#[doc(alias = "TIOCGPGRP")] +pub fn tcgetpgrp(fd: Fd) -> io::Result { + backend::termios::syscalls::tcgetpgrp(fd.as_fd()) +} + +/// `tcsetpgrp(fd, pid)`—Set the terminal foreground process group. +/// +/// Also known as the `TIOCSPGRP` operation with `ioctl`. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcsetpgrp.html +/// [Linux]: https://man7.org/linux/man-pages/man3/tcsetpgrp.3.html +#[cfg(not(any(windows, target_os = "wasi")))] +#[inline] +#[doc(alias = "TIOCSPGRP")] +pub fn tcsetpgrp(fd: Fd, pid: Pid) -> io::Result<()> { + backend::termios::syscalls::tcsetpgrp(fd.as_fd(), pid) +} + +/// `tcsetattr(fd)`—Set terminal attributes. +/// +/// Also known as the `TCSETS` (or `TCSETS2` on Linux) operation with `ioctl`. +/// +/// On Linux, this uses `TCSETS2`. If that fails in a way that indicates that +/// the host doesn't support it, this falls back to the old `TCSETS`, and fails +/// with `io::Errno::RANGE` if the input or output speeds cannot be supported. +/// +/// # References +/// - [POSIX `tcsetattr`] +/// - [Linux `ioctl_tty`] +/// - [Linux `termios`] +/// +/// [POSIX `tcsetattr`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcsetattr.html +/// [Linux `ioctl_tty`]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [Linux `termios`]: https://man7.org/linux/man-pages/man3/termios.3.html +#[cfg(not(target_os = "espidf"))] +#[inline] +#[doc(alias = "TCSETS")] +#[doc(alias = "TCSETS2")] +#[doc(alias = "tcsetattr2")] +pub fn tcsetattr( + fd: Fd, + optional_actions: OptionalActions, + termios: &Termios, +) -> io::Result<()> { + backend::termios::syscalls::tcsetattr(fd.as_fd(), optional_actions, termios) +} + +/// `tcsendbreak(fd, 0)`—Transmit zero-valued bits. +/// +/// This transmits zero-valued bits for at least 0.25 seconds. +/// +/// This function does not have a `duration` parameter, and always uses the +/// implementation-defined value, which transmits for at least 0.25 seconds. +/// +/// Also known as the `TCSBRK` operation with `ioctl`, with a duration +/// parameter of 0. +/// +/// # References +/// - [POSIX `tcsendbreak`] +/// - [Linux `ioctl_tty`] +/// - [Linux `termios`] +/// +/// [POSIX `tcsendbreak`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcsendbreak.html +/// [Linux `ioctl_tty`]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [Linux `termios`]: https://man7.org/linux/man-pages/man3/termios.3.html +#[inline] +#[doc(alias = "TCSBRK")] +pub fn tcsendbreak(fd: Fd) -> io::Result<()> { + backend::termios::syscalls::tcsendbreak(fd.as_fd()) +} + +/// `tcdrain(fd, duration)`—Wait until all pending output has been written. +/// +/// # References +/// - [POSIX `tcdrain`] +/// - [Linux `ioctl_tty`] +/// - [Linux `termios`] +/// +/// [POSIX `tcsetattr`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcdrain.html +/// [Linux `ioctl_tty`]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [Linux `termios`]: https://man7.org/linux/man-pages/man3/termios.3.html +#[cfg(not(target_os = "espidf"))] +#[inline] +pub fn tcdrain(fd: Fd) -> io::Result<()> { + backend::termios::syscalls::tcdrain(fd.as_fd()) +} + +/// `tcflush(fd, queue_selector)`—Wait until all pending output has been +/// written. +/// +/// # References +/// - [POSIX `tcflush`] +/// - [Linux `ioctl_tty`] +/// - [Linux `termios`] +/// +/// [POSIX `tcflush`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcflush.html +/// [Linux `ioctl_tty`]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [Linux `termios`]: https://man7.org/linux/man-pages/man3/termios.3.html +#[cfg(not(target_os = "espidf"))] +#[inline] +#[doc(alias = "TCFLSH")] +pub fn tcflush(fd: Fd, queue_selector: QueueSelector) -> io::Result<()> { + backend::termios::syscalls::tcflush(fd.as_fd(), queue_selector) +} + +/// `tcflow(fd, action)`—Suspend or resume transmission or reception. +/// +/// # References +/// - [POSIX `tcflow`] +/// - [Linux `ioctl_tty`] +/// - [Linux `termios`] +/// +/// [POSIX `tcflow`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcflow.html +/// [Linux `ioctl_tty`]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +/// [Linux `termios`]: https://man7.org/linux/man-pages/man3/termios.3.html +#[cfg(not(target_os = "espidf"))] +#[inline] +#[doc(alias = "TCXONC")] +pub fn tcflow(fd: Fd, action: Action) -> io::Result<()> { + backend::termios::syscalls::tcflow(fd.as_fd(), action) +} + +/// `tcgetsid(fd)`—Return the session ID of the current session with `fd` as +/// its controlling terminal. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcgetsid.html +/// [Linux]: https://man7.org/linux/man-pages/man3/tcgetsid.3.html +#[inline] +#[doc(alias = "TIOCGSID")] +pub fn tcgetsid(fd: Fd) -> io::Result { + backend::termios::syscalls::tcgetsid(fd.as_fd()) +} + +/// `tcsetwinsize(fd)`—Set the current terminal window size. +/// +/// Also known as the `TIOCSWINSZ` operation with `ioctl`. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html +#[cfg(not(any(target_os = "espidf", target_os = "horizon")))] +#[inline] +#[doc(alias = "TIOCSWINSZ")] +pub fn tcsetwinsize(fd: Fd, winsize: Winsize) -> io::Result<()> { + backend::termios::syscalls::tcsetwinsize(fd.as_fd(), winsize) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/tty.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/tty.rs new file mode 100644 index 0000000000000000000000000000000000000000..000ec8baf67cb379196d22ea9b8041f6df7fd489 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/tty.rs @@ -0,0 +1,90 @@ +//! Functions which operate on file descriptors which might be terminals. + +use crate::backend; +#[cfg(feature = "alloc")] +#[cfg(feature = "fs")] +#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] +use crate::path::SMALL_PATH_BUFFER_SIZE; +use backend::fd::AsFd; +#[cfg(feature = "alloc")] +#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] +use {crate::ffi::CString, crate::io, alloc::vec::Vec, backend::fd::BorrowedFd}; + +/// `isatty(fd)`—Tests whether a file descriptor refers to a terminal. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/isatty.html +/// [Linux]: https://man7.org/linux/man-pages/man3/isatty.3.html +#[inline] +pub fn isatty(fd: Fd) -> bool { + backend::termios::syscalls::isatty(fd.as_fd()) +} + +/// `ttyname_r(fd)`—Returns the name of the tty open on `fd`. +/// +/// If `reuse` already has available capacity, reuse it if possible. +/// +/// On Linux, this function depends on procfs being mounted on /proc. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/ttyname.html +/// [Linux]: https://man7.org/linux/man-pages/man3/ttyname.3.html +#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] +#[cfg(feature = "alloc")] +#[cfg(feature = "fs")] +#[doc(alias = "ttyname_r")] +#[cfg_attr(docsrs, doc(cfg(feature = "fs")))] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +#[inline] +pub fn ttyname>>(fd: Fd, reuse: B) -> io::Result { + _ttyname(fd.as_fd(), reuse.into()) +} + +#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] +#[cfg(feature = "alloc")] +#[cfg(feature = "fs")] +#[allow(unsafe_code)] +fn _ttyname(fd: BorrowedFd<'_>, mut buffer: Vec) -> io::Result { + buffer.clear(); + buffer.reserve(SMALL_PATH_BUFFER_SIZE); + + loop { + match backend::termios::syscalls::ttyname(fd, buffer.spare_capacity_mut()) { + Err(io::Errno::RANGE) => { + // Use `Vec` reallocation strategy to grow capacity + // exponentially. + buffer.reserve(buffer.capacity() + 1); + } + Ok(len) => { + // SAFETY: Assume the backend returns the length of the string + // excluding the NUL. + unsafe { + buffer.set_len(len + 1); + } + + // SAFETY: + // - “ttyname_r stores this pathname in the buffer buf” + // - [POSIX definition 3.271: Pathname]: “A string that is + // used to identify a file.” + // - [POSIX definition 3.375: String]: “A contiguous sequence + // of bytes terminated by and including the first null byte.” + // + // Thus, there will be a single NUL byte at the end of the + // string. + // + // [POSIX definition 3.271: Pathname]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html#tag_03_271 + // [POSIX definition 3.375: String]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html#tag_03_375 + unsafe { + return Ok(CString::from_vec_with_nul_unchecked(buffer)); + } + } + Err(errno) => return Err(errno), + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/types.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/types.rs new file mode 100644 index 0000000000000000000000000000000000000000..899fa74b6de56873951b27346f381b5c27607792 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/termios/types.rs @@ -0,0 +1,1654 @@ +use crate::backend::c; +use crate::backend::termios::types; +#[cfg(target_os = "nto")] +use crate::ffi; +use crate::{backend, io}; +use bitflags::bitflags; + +/// `struct termios` for use with [`tcgetattr`] and [`tcsetattr`]. +/// +/// [`tcgetattr`]: crate::termios::tcgetattr +/// [`tcsetattr`]: crate::termios::tcsetattr +#[repr(C)] +#[derive(Clone)] +pub struct Termios { + /// How is input interpreted? + #[doc(alias = "c_iflag")] + pub input_modes: InputModes, + + /// How is output translated? + #[doc(alias = "c_oflag")] + pub output_modes: OutputModes, + + /// Low-level configuration flags. + #[doc(alias = "c_cflag")] + pub control_modes: ControlModes, + + /// High-level configuration flags. + #[doc(alias = "c_lflag")] + pub local_modes: LocalModes, + + /// Line discipline. + #[doc(alias = "c_line")] + #[cfg(not(all(linux_raw, any(target_arch = "powerpc", target_arch = "powerpc64"))))] + #[cfg(any( + linux_like, + target_env = "newlib", + target_os = "fuchsia", + target_os = "haiku", + target_os = "redox" + ))] + pub line_discipline: u8, + + /// How are various special control codes handled? + #[doc(alias = "c_cc")] + #[cfg(not(target_os = "haiku"))] + pub special_codes: SpecialCodes, + + #[cfg(target_os = "nto")] + pub(crate) __reserved: [ffi::c_uint; 3], + + /// Line discipline. + // On PowerPC, this field comes after `c_cc`. + #[doc(alias = "c_line")] + #[cfg(all(linux_raw, any(target_arch = "powerpc", target_arch = "powerpc64")))] + pub line_discipline: c::cc_t, + + /// See the `input_speed` and `set_input_seed` functions. + /// + /// On Linux and BSDs, this is the arbitrary integer speed value. On all + /// other platforms, this is the encoded speed value. + #[cfg(not(any(solarish, all(libc, target_env = "newlib"), target_os = "aix")))] + pub(crate) input_speed: c::speed_t, + + /// See the `output_speed` and `set_output_seed` functions. + /// + /// On Linux and BSDs, this is the integer speed value. On all other + /// platforms, this is the encoded speed value. + #[cfg(not(any(solarish, all(libc, target_env = "newlib"), target_os = "aix")))] + pub(crate) output_speed: c::speed_t, + + /// How are various special control codes handled? + #[doc(alias = "c_cc")] + #[cfg(target_os = "haiku")] + pub special_codes: SpecialCodes, +} + +impl Termios { + /// `cfmakeraw(self)`—Set a `Termios` value to the settings for “raw” mode. + /// + /// In raw mode, input is available a byte at a time, echoing is disabled, + /// and special terminal input and output codes are disabled. + #[cfg(not(target_os = "nto"))] + #[doc(alias = "cfmakeraw")] + #[inline] + pub fn make_raw(&mut self) { + backend::termios::syscalls::cfmakeraw(self) + } + + /// Return the input communication speed. + /// + /// Unlike the `c_ispeed` field in glibc and others, this returns the + /// integer value of the speed, rather than the `B*` encoded constant + /// value. + #[doc(alias = "c_ispeed")] + #[doc(alias = "cfgetispeed")] + #[doc(alias = "cfgetspeed")] + #[inline] + pub fn input_speed(&self) -> u32 { + // On Linux and BSDs, `input_speed` is the arbitrary integer speed. + #[cfg(any(linux_kernel, bsd))] + { + debug_assert!(u32::try_from(self.input_speed).is_ok()); + self.input_speed as u32 + } + + // On illumos, `input_speed` is not present. + #[cfg(any(solarish, all(libc, target_env = "newlib"), target_os = "aix"))] + unsafe { + speed::decode(c::cfgetispeed(crate::utils::as_ptr(self).cast())).unwrap() + } + + // On other platforms, it's the encoded speed. + #[cfg(not(any( + linux_kernel, + bsd, + solarish, + all(libc, target_env = "newlib"), + target_os = "aix" + )))] + { + speed::decode(self.input_speed).unwrap() + } + } + + /// Return the output communication speed. + /// + /// Unlike the `c_ospeed` field in glibc and others, this returns the + /// arbitrary integer value of the speed, rather than the `B*` encoded + /// constant value. + #[inline] + pub fn output_speed(&self) -> u32 { + // On Linux and BSDs, `output_speed` is the arbitrary integer speed. + #[cfg(any(linux_kernel, bsd))] + { + debug_assert!(u32::try_from(self.output_speed).is_ok()); + self.output_speed as u32 + } + + // On illumos, `output_speed` is not present. + #[cfg(any(solarish, all(libc, target_env = "newlib"), target_os = "aix"))] + unsafe { + speed::decode(c::cfgetospeed(crate::utils::as_ptr(self).cast())).unwrap() + } + + // On other platforms, it's the encoded speed. + #[cfg(not(any( + linux_kernel, + bsd, + solarish, + all(libc, target_env = "newlib"), + target_os = "aix" + )))] + { + speed::decode(self.output_speed).unwrap() + } + } + + /// Set the input and output communication speeds. + /// + /// Unlike the `c_ispeed` and `c_ospeed` fields in glibc and others, this + /// takes the arbitrary integer value of the speed, rather than the `B*` + /// encoded constant value. Not all implementations support all integer + /// values; use the constants in the [`speed`] module for likely-supported + /// speeds. + #[cfg(not(target_os = "nto"))] + #[doc(alias = "cfsetspeed")] + #[doc(alias = "CBAUD")] + #[doc(alias = "CBAUDEX")] + #[doc(alias = "CIBAUD")] + #[doc(alias = "CIBAUDEX")] + #[inline] + pub fn set_speed(&mut self, new_speed: u32) -> io::Result<()> { + backend::termios::syscalls::set_speed(self, new_speed) + } + + /// Set the input communication speed. + /// + /// Unlike the `c_ispeed` field in glibc and others, this takes the + /// arbitrary integer value of the speed, rather than the `B*` encoded + /// constant value. Not all implementations support all integer values; use + /// the constants in the [`speed`] module for known-supported speeds. + /// + /// On some platforms, changing the input speed changes the output speed to + /// the same speed. + #[doc(alias = "c_ispeed")] + #[doc(alias = "cfsetispeed")] + #[doc(alias = "CIBAUD")] + #[doc(alias = "CIBAUDEX")] + #[inline] + pub fn set_input_speed(&mut self, new_speed: u32) -> io::Result<()> { + backend::termios::syscalls::set_input_speed(self, new_speed) + } + + /// Set the output communication speed. + /// + /// Unlike the `c_ospeed` field in glibc and others, this takes the + /// arbitrary integer value of the speed, rather than the `B*` encoded + /// constant value. Not all implementations support all integer values; use + /// the constants in the [`speed`] module for known-supported speeds. + /// + /// On some platforms, changing the output speed changes the input speed to + /// the same speed. + #[doc(alias = "c_ospeed")] + #[doc(alias = "cfsetospeed")] + #[doc(alias = "CBAUD")] + #[doc(alias = "CBAUDEX")] + #[inline] + pub fn set_output_speed(&mut self, new_speed: u32) -> io::Result<()> { + backend::termios::syscalls::set_output_speed(self, new_speed) + } +} + +impl core::fmt::Debug for Termios { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut d = f.debug_struct("Termios"); + d.field("input_modes", &self.input_modes); + d.field("output_modes", &self.output_modes); + + // This includes any bits set in the `CBAUD` and `CIBAUD` ranges, which + // is a little ugly, because we also decode those bits for the speeds + // below. However, it seems better to print them here than to hide + // them, because hiding them would make the `Termios` debug output + // appear to disagree with the `ControlModes` debug output for the same + // value, which could be confusing. + d.field("control_modes", &self.control_modes); + + d.field("local_modes", &self.local_modes); + #[cfg(any( + linux_like, + target_env = "newlib", + target_os = "fuchsia", + target_os = "haiku", + target_os = "redox" + ))] + { + d.field("line_discipline", &SpecialCode(self.line_discipline)); + } + d.field("special_codes", &self.special_codes); + d.field("input_speed", &self.input_speed()); + d.field("output_speed", &self.output_speed()); + d.finish() + } +} + +bitflags! { + /// Flags controlling terminal input. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct InputModes: types::tcflag_t { + /// `IGNBRK` + const IGNBRK = c::IGNBRK; + + /// `BRKINT` + const BRKINT = c::BRKINT; + + /// `IGNPAR` + const IGNPAR = c::IGNPAR; + + /// `PARMRK` + const PARMRK = c::PARMRK; + + /// `INPCK` + const INPCK = c::INPCK; + + /// `ISTRIP` + const ISTRIP = c::ISTRIP; + + /// `INLCR` + const INLCR = c::INLCR; + + /// `IGNCR` + const IGNCR = c::IGNCR; + + /// `ICRNL` + const ICRNL = c::ICRNL; + + /// `IUCLC` + #[cfg(any(linux_raw_dep, solarish, target_os = "aix", target_os = "haiku", target_os = "nto"))] + const IUCLC = c::IUCLC; + + /// `IXON` + const IXON = c::IXON; + + /// `IXANY` + #[cfg(not(target_os = "redox"))] + const IXANY = c::IXANY; + + /// `IXOFF` + const IXOFF = c::IXOFF; + + /// `IMAXBEL` + #[cfg(not(any(target_os = "haiku", target_os = "redox")))] + const IMAXBEL = c::IMAXBEL; + + /// `IUTF8` + #[cfg(not(any( + freebsdlike, + netbsdlike, + solarish, + target_os = "aix", + target_os = "emscripten", + target_os = "haiku", + target_os = "hurd", + target_os = "redox", + )))] + const IUTF8 = c::IUTF8; + + /// + const _ = !0; + } +} + +bitflags! { + /// Flags controlling terminal output. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct OutputModes: types::tcflag_t { + /// `OPOST` + const OPOST = c::OPOST; + + /// `OLCUC` + #[cfg(not(any( + apple, + freebsdlike, + target_os = "aix", + target_os = "netbsd", + target_os = "redox", + )))] + const OLCUC = c::OLCUC; + + /// `ONLCR` + const ONLCR = c::ONLCR; + + /// `OCRNL` + const OCRNL = c::OCRNL; + + /// `ONOCR` + const ONOCR = c::ONOCR; + + /// `ONLRET` + const ONLRET = c::ONLRET; + + /// `OFILL` + #[cfg(not(bsd))] + const OFILL = c::OFILL; + + /// `OFDEL` + #[cfg(not(bsd))] + const OFDEL = c::OFDEL; + + /// `NLDLY` + #[cfg(not(any(bsd, solarish, target_os = "redox")))] + const NLDLY = c::NLDLY; + + /// `NL0` + #[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] + const NL0 = c::NL0; + + /// `NL1` + #[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] + const NL1 = c::NL1; + + /// `CRDLY` + #[cfg(not(any(bsd, solarish, target_os = "redox")))] + const CRDLY = c::CRDLY; + + /// `CR0` + #[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] + const CR0 = c::CR0; + + /// `CR1` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const CR1 = c::CR1; + + /// `CR2` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const CR2 = c::CR2; + + /// `CR3` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const CR3 = c::CR3; + + /// `TABDLY` + #[cfg(not(any( + netbsdlike, + solarish, + target_os = "dragonfly", + target_os = "redox", + )))] + const TABDLY = c::TABDLY; + + /// `TAB0` + #[cfg(not(any( + netbsdlike, + solarish, + target_os = "dragonfly", + target_os = "fuchsia", + target_os = "redox", + )))] + const TAB0 = c::TAB0; + + /// `TAB1` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const TAB1 = c::TAB1; + + /// `TAB2` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const TAB2 = c::TAB2; + + /// `TAB3` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const TAB3 = c::TAB3; + + /// `XTABS` + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "redox", + )))] + const XTABS = c::XTABS; + + /// `BSDLY` + #[cfg(not(any(bsd, solarish, target_os = "redox")))] + const BSDLY = c::BSDLY; + + /// `BS0` + #[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] + const BS0 = c::BS0; + + /// `BS1` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const BS1 = c::BS1; + + /// `FFDLY` + #[cfg(not(any(bsd, solarish, target_os = "redox")))] + const FFDLY = c::FFDLY; + + /// `FF0` + #[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] + const FF0 = c::FF0; + + /// `FF1` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const FF1 = c::FF1; + + /// `VTDLY` + #[cfg(not(any(bsd, solarish, target_os = "redox")))] + const VTDLY = c::VTDLY; + + /// `VT0` + #[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] + const VT0 = c::VT0; + + /// `VT1` + #[cfg(not(any( + target_env = "musl", + bsd, + solarish, + target_os = "emscripten", + target_os = "fuchsia", + target_os = "redox", + )))] + const VT1 = c::VT1; + + /// + const _ = !0; + } +} + +bitflags! { + /// Flags controlling special terminal modes. + /// + /// `CBAUD`, `CBAUDEX`, `CIBAUD`, `CIBAUDEX`, and various `B*` speed + /// constants are often included in the control modes, however rustix + /// handles them separately, in [`Termios::set_speed`] and related + /// functions. If you see extra bits in the `Debug` output, they're + /// probably these flags. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct ControlModes: types::tcflag_t { + /// `CSIZE` + const CSIZE = c::CSIZE; + + /// `CS5` + const CS5 = c::CS5; + + /// `CS6` + const CS6 = c::CS6; + + /// `CS7` + const CS7 = c::CS7; + + /// `CS8` + const CS8 = c::CS8; + + /// `CSTOPB` + const CSTOPB = c::CSTOPB; + + /// `CREAD` + const CREAD = c::CREAD; + + /// `PARENB` + const PARENB = c::PARENB; + + /// `PARODD` + const PARODD = c::PARODD; + + /// `HUPCL` + const HUPCL = c::HUPCL; + + /// `CLOCAL` + const CLOCAL = c::CLOCAL; + + /// `CRTSCTS` + #[cfg(not(any(target_os = "aix", target_os = "nto", target_os = "redox")))] + const CRTSCTS = c::CRTSCTS; + + /// `CMSPAR` + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "emscripten", + target_os = "haiku", + target_os = "hurd", + target_os = "nto", + target_os = "redox", + )))] + const CMSPAR = c::CMSPAR; + + /// + const _ = !0; + } +} + +bitflags! { + /// Flags controlling “local” terminal modes. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct LocalModes: types::tcflag_t { + /// `XCASE` + #[cfg(any(linux_raw_dep, target_arch = "s390x", target_os = "haiku"))] + const XCASE = c::XCASE; + + /// `ECHOCTL` + #[cfg(not(target_os = "redox"))] + const ECHOCTL = c::ECHOCTL; + + /// `ECHOPRT` + #[cfg(not(any(target_os = "cygwin", target_os = "nto", target_os = "redox")))] + const ECHOPRT = c::ECHOPRT; + + /// `ECHOKE` + #[cfg(not(target_os = "redox"))] + const ECHOKE = c::ECHOKE; + + /// `FLUSHO` + #[cfg(not(any(target_os = "nto", target_os = "redox")))] + const FLUSHO = c::FLUSHO; + + /// `PENDIN` + #[cfg(not(any(target_os = "cygwin", target_os = "nto", target_os = "redox")))] + const PENDIN = c::PENDIN; + + /// `EXTPROC` + #[cfg(not(any( + target_os = "aix", + target_os = "cygwin", + target_os = "haiku", + target_os = "nto", + target_os = "redox", + )))] + const EXTPROC = c::EXTPROC; + + /// `ISIG` + const ISIG = c::ISIG; + + /// `ICANON`—A flag for the `c_lflag` field of [`Termios`] indicating + /// canonical mode. + const ICANON = c::ICANON; + + /// `ECHO` + const ECHO = c::ECHO; + + /// `ECHOE` + const ECHOE = c::ECHOE; + + /// `ECHOK` + const ECHOK = c::ECHOK; + + /// `ECHONL` + const ECHONL = c::ECHONL; + + /// `NOFLSH` + const NOFLSH = c::NOFLSH; + + /// `TOSTOP` + const TOSTOP = c::TOSTOP; + + /// `IEXTEN` + const IEXTEN = c::IEXTEN; + + /// + const _ = !0; + } +} + +/// Speeds for use with [`Termios::set_speed`], [`Termios::set_input_speed`], +/// and [`Termios::set_output_speed`]. +/// +/// Unlike in some platforms' libc APIs, these always have the same numerical +/// value as their names; for example, `B50` has the value `50`, and so on. +/// Consequently, it's not necessary to use them. They are provided here +/// because they help identify speeds which are likely to be supported, on +/// platforms and devices which don't support arbitrary speeds. +pub mod speed { + #[cfg(not(bsd))] + use crate::backend::c; + + /// `B0` + pub const B0: u32 = 0; + + /// `B50` + pub const B50: u32 = 50; + + /// `B75` + pub const B75: u32 = 75; + + /// `B110` + pub const B110: u32 = 110; + + /// `B134` + pub const B134: u32 = 134; + + /// `B150` + pub const B150: u32 = 150; + + /// `B200` + pub const B200: u32 = 200; + + /// `B300` + pub const B300: u32 = 300; + + /// `B600` + pub const B600: u32 = 600; + + /// `B1200` + pub const B1200: u32 = 1200; + + /// `B1800` + pub const B1800: u32 = 1800; + + /// `B2400` + pub const B2400: u32 = 2400; + + /// `B4800` + pub const B4800: u32 = 4800; + + /// `B9600` + pub const B9600: u32 = 9600; + + /// `B19200` + #[doc(alias = "EXTA")] + pub const B19200: u32 = 19200; + + /// `B38400` + #[doc(alias = "EXTB")] + pub const B38400: u32 = 38400; + + /// `B57600` + #[cfg(not(target_os = "aix"))] + pub const B57600: u32 = 57600; + + /// `B115200` + #[cfg(not(target_os = "aix"))] + pub const B115200: u32 = 115_200; + + /// `B230400` + #[cfg(not(target_os = "aix"))] + pub const B230400: u32 = 230_400; + + /// `B460800` + #[cfg(not(any( + apple, + target_os = "aix", + target_os = "dragonfly", + target_os = "haiku", + target_os = "openbsd" + )))] + pub const B460800: u32 = 460_800; + + /// `B500000` + #[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] + pub const B500000: u32 = 500_000; + + /// `B576000` + #[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] + pub const B576000: u32 = 576_000; + + /// `B921600` + #[cfg(not(any( + apple, + target_os = "aix", + target_os = "dragonfly", + target_os = "haiku", + target_os = "openbsd" + )))] + pub const B921600: u32 = 921_600; + + /// `B1000000` + #[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] + pub const B1000000: u32 = 1_000_000; + + /// `B1152000` + #[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] + pub const B1152000: u32 = 1_152_000; + + /// `B1500000` + #[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] + pub const B1500000: u32 = 1_500_000; + + /// `B2000000` + #[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] + pub const B2000000: u32 = 2_000_000; + + /// `B2500000` + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "solaris", + )))] + pub const B2500000: u32 = 2_500_000; + + /// `B3000000` + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "solaris", + )))] + pub const B3000000: u32 = 3_000_000; + + /// `B3500000` + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "solaris", + )))] + pub const B3500000: u32 = 3_500_000; + + /// `B4000000` + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "solaris", + )))] + pub const B4000000: u32 = 4_000_000; + + /// Translate from a `c::speed_t` code to an arbitrary integer speed value + /// `u32`. + /// + /// On BSD platforms, integer speed values are already the same as their + /// encoded values. + /// + /// On Linux on PowerPC, `TCGETS`/`TCSETS` support the `c_ispeed` and + /// `c_ospeed` fields. + /// + /// On Linux on architectures other than PowerPC, `TCGETS`/`TCSETS` don't + /// support the `c_ispeed` and `c_ospeed` fields, so we have to fall back + /// to `TCGETS2`/`TCSETS2` to support them. + #[cfg(not(any( + bsd, + all(linux_kernel, any(target_arch = "powerpc", target_arch = "powerpc64")) + )))] + pub(crate) const fn decode(encoded_speed: c::speed_t) -> Option { + match encoded_speed { + c::B0 => Some(0), + c::B50 => Some(50), + c::B75 => Some(75), + c::B110 => Some(110), + c::B134 => Some(134), + c::B150 => Some(150), + c::B200 => Some(200), + c::B300 => Some(300), + c::B600 => Some(600), + c::B1200 => Some(1200), + c::B1800 => Some(1800), + c::B2400 => Some(2400), + c::B4800 => Some(4800), + c::B9600 => Some(9600), + c::B19200 => Some(19200), + c::B38400 => Some(38400), + #[cfg(not(target_os = "aix"))] + c::B57600 => Some(57600), + #[cfg(not(target_os = "aix"))] + c::B115200 => Some(115_200), + #[cfg(not(any(target_os = "aix", target_os = "nto")))] + c::B230400 => Some(230_400), + #[cfg(not(any( + apple, + target_os = "aix", + target_os = "dragonfly", + target_os = "haiku", + target_os = "nto", + target_os = "openbsd" + )))] + c::B460800 => Some(460_800), + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "nto" + )))] + c::B500000 => Some(500_000), + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "nto" + )))] + c::B576000 => Some(576_000), + #[cfg(not(any( + apple, + target_os = "aix", + target_os = "dragonfly", + target_os = "haiku", + target_os = "nto", + target_os = "openbsd" + )))] + c::B921600 => Some(921_600), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + c::B1000000 => Some(1_000_000), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + c::B1152000 => Some(1_152_000), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + c::B1500000 => Some(1_500_000), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + c::B2000000 => Some(2_000_000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + c::B2500000 => Some(2_500_000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + c::B3000000 => Some(3_000_000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "cygwin", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + c::B3500000 => Some(3_500_000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "cygwin", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + c::B4000000 => Some(4_000_000), + _ => None, + } + } + + /// Translate from an arbitrary `u32` arbitrary integer speed value to a + /// `c::speed_t` code. + #[cfg(not(bsd))] + pub(crate) const fn encode(speed: u32) -> Option { + match speed { + 0 => Some(c::B0), + 50 => Some(c::B50), + 75 => Some(c::B75), + 110 => Some(c::B110), + 134 => Some(c::B134), + 150 => Some(c::B150), + 200 => Some(c::B200), + 300 => Some(c::B300), + 600 => Some(c::B600), + 1200 => Some(c::B1200), + 1800 => Some(c::B1800), + 2400 => Some(c::B2400), + 4800 => Some(c::B4800), + 9600 => Some(c::B9600), + 19200 => Some(c::B19200), + 38400 => Some(c::B38400), + #[cfg(not(target_os = "aix"))] + 57600 => Some(c::B57600), + #[cfg(not(target_os = "aix"))] + 115_200 => Some(c::B115200), + #[cfg(not(any(target_os = "aix", target_os = "nto")))] + 230_400 => Some(c::B230400), + #[cfg(not(any( + apple, + target_os = "aix", + target_os = "dragonfly", + target_os = "haiku", + target_os = "nto", + target_os = "openbsd", + )))] + 460_800 => Some(c::B460800), + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "nto" + )))] + 500_000 => Some(c::B500000), + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "nto" + )))] + 576_000 => Some(c::B576000), + #[cfg(not(any( + apple, + target_os = "aix", + target_os = "dragonfly", + target_os = "haiku", + target_os = "nto", + target_os = "openbsd" + )))] + 921_600 => Some(c::B921600), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + 1_000_000 => Some(c::B1000000), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + 1_152_000 => Some(c::B1152000), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + 1_500_000 => Some(c::B1500000), + #[cfg(not(any( + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris" + )))] + 2_000_000 => Some(c::B2000000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + 2_500_000 => Some(c::B2500000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + 3_000_000 => Some(c::B3000000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "cygwin", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + 3_500_000 => Some(c::B3500000), + #[cfg(not(any( + target_arch = "sparc", + target_arch = "sparc64", + bsd, + target_os = "aix", + target_os = "cygwin", + target_os = "haiku", + target_os = "nto", + target_os = "solaris", + )))] + 4_000_000 => Some(c::B4000000), + _ => None, + } + } +} + +/// An array indexed by [`SpecialCodeIndex`] indicating the current values of +/// various special control codes. +#[repr(transparent)] +#[derive(Clone)] +pub struct SpecialCodes(pub(crate) [c::cc_t; c::NCCS as usize]); + +impl core::ops::Index for SpecialCodes { + type Output = u8; + + fn index(&self, index: SpecialCodeIndex) -> &Self::Output { + &self.0[index.0] + } +} + +impl core::ops::IndexMut for SpecialCodes { + fn index_mut(&mut self, index: SpecialCodeIndex) -> &mut Self::Output { + &mut self.0[index.0] + } +} + +impl core::fmt::Debug for SpecialCodes { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "SpecialCodes {{")?; + let mut first = true; + for i in 0..self.0.len() { + if first { + write!(f, " ")?; + } else { + write!(f, ", ")?; + } + first = false; + let index = SpecialCodeIndex(i); + write!(f, "{:?}: {:?}", index, SpecialCode(self[index]))?; + } + if !first { + write!(f, " ")?; + } + write!(f, "}}") + } +} + +/// A newtype for pretty printing. +struct SpecialCode(u8); + +impl core::fmt::Debug for SpecialCode { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + if self.0 == 0 { + write!(f, "") + } else if self.0 < 0x20 { + write!(f, "^{}", (self.0 + 0x40) as char) + } else if self.0 == 0x7f { + write!(f, "^?") + } else if self.0 >= 0x80 { + write!(f, "M-")?; + SpecialCode(self.0 - 0x80).fmt(f) + } else { + write!(f, "{}", (self.0 as char)) + } + } +} + +/// Indices for use with [`Termios::special_codes`]. +#[derive(Copy, Clone, Eq, PartialEq, Hash)] +pub struct SpecialCodeIndex(usize); + +#[rustfmt::skip] +impl SpecialCodeIndex { + /// `VINTR` + pub const VINTR: Self = Self(c::VINTR as usize); + + /// `VQUIT` + pub const VQUIT: Self = Self(c::VQUIT as usize); + + /// `VERASE` + pub const VERASE: Self = Self(c::VERASE as usize); + + /// `VKILL` + pub const VKILL: Self = Self(c::VKILL as usize); + + /// `VEOF` + pub const VEOF: Self = Self(c::VEOF as usize); + + /// `VTIME` + pub const VTIME: Self = Self(c::VTIME as usize); + + /// `VMIN` + pub const VMIN: Self = Self(c::VMIN as usize); + + /// `VSWTC` + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", + target_os = "nto", + )))] + pub const VSWTC: Self = Self(c::VSWTC as usize); + + /// `VSTART` + pub const VSTART: Self = Self(c::VSTART as usize); + + /// `VSTOP` + pub const VSTOP: Self = Self(c::VSTOP as usize); + + /// `VSUSP` + pub const VSUSP: Self = Self(c::VSUSP as usize); + + /// `VEOL` + pub const VEOL: Self = Self(c::VEOL as usize); + + /// `VREPRINT` + #[cfg(not(target_os = "haiku"))] + pub const VREPRINT: Self = Self(c::VREPRINT as usize); + + /// `VDISCARD` + #[cfg(not(any(target_os = "aix", target_os = "haiku")))] + pub const VDISCARD: Self = Self(c::VDISCARD as usize); + + /// `VWERASE` + #[cfg(not(any(target_os = "aix", target_os = "haiku")))] + pub const VWERASE: Self = Self(c::VWERASE as usize); + + /// `VLNEXT` + #[cfg(not(target_os = "haiku"))] + pub const VLNEXT: Self = Self(c::VLNEXT as usize); + + /// `VEOL2` + pub const VEOL2: Self = Self(c::VEOL2 as usize); + + /// `VSWTCH` + #[cfg(any(solarish, target_os = "haiku", target_os = "nto"))] + pub const VSWTCH: Self = Self(c::VSWTCH as usize); + + /// `VDSUSP` + #[cfg(any( + bsd, + solarish, + target_os = "aix", + target_os = "hurd", + target_os = "nto" + ))] + pub const VDSUSP: Self = Self(c::VDSUSP as usize); + + /// `VSTATUS` + #[cfg(any(bsd, target_os = "hurd", target_os = "illumos"))] + pub const VSTATUS: Self = Self(c::VSTATUS as usize); + + /// `VERASE2` + #[cfg(any(freebsdlike, target_os = "illumos"))] + pub const VERASE2: Self = Self(c::VERASE2 as usize); +} + +impl core::fmt::Debug for SpecialCodeIndex { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match *self { + Self::VINTR => write!(f, "VINTR"), + Self::VQUIT => write!(f, "VQUIT"), + Self::VERASE => write!(f, "VERASE"), + Self::VKILL => write!(f, "VKILL"), + #[cfg(not(any( + solarish, + all(linux_kernel, any(target_arch = "sparc", target_arch = "sparc64")), + target_os = "aix", + target_os = "haiku", + )))] + Self::VEOF => write!(f, "VEOF"), + #[cfg(not(any( + solarish, + all(linux_kernel, any(target_arch = "sparc", target_arch = "sparc64")), + target_os = "aix", + target_os = "haiku", + )))] + Self::VTIME => write!(f, "VTIME"), + #[cfg(not(any( + solarish, + all(linux_kernel, any(target_arch = "sparc", target_arch = "sparc64")), + target_os = "aix", + target_os = "haiku", + )))] + Self::VMIN => write!(f, "VMIN"), + + // On Solarish platforms, Linux on SPARC, AIX, and Haiku, `VMIN` + // and `VTIME` have the same value as `VEOF` and `VEOL`. + #[cfg(any( + solarish, + all(linux_kernel, any(target_arch = "sparc", target_arch = "sparc64")), + target_os = "aix", + target_os = "haiku", + ))] + Self::VMIN => write!(f, "VMIN/VEOF"), + #[cfg(any( + solarish, + all(linux_kernel, any(target_arch = "sparc", target_arch = "sparc64")), + target_os = "aix", + target_os = "haiku", + ))] + Self::VTIME => write!(f, "VTIME/VEOL"), + + #[cfg(not(any( + bsd, + solarish, + target_os = "aix", + target_os = "haiku", + target_os = "hurd", + target_os = "nto", + )))] + Self::VSWTC => write!(f, "VSWTC"), + Self::VSTART => write!(f, "VSTART"), + Self::VSTOP => write!(f, "VSTOP"), + Self::VSUSP => write!(f, "VSUSP"), + #[cfg(not(any( + solarish, + all(linux_kernel, any(target_arch = "sparc", target_arch = "sparc64")), + target_os = "aix", + target_os = "haiku", + )))] + Self::VEOL => write!(f, "VEOL"), + #[cfg(not(target_os = "haiku"))] + Self::VREPRINT => write!(f, "VREPRINT"), + #[cfg(not(any(target_os = "aix", target_os = "haiku")))] + Self::VDISCARD => write!(f, "VDISCARD"), + #[cfg(not(any(target_os = "aix", target_os = "haiku")))] + Self::VWERASE => write!(f, "VWERASE"), + #[cfg(not(target_os = "haiku"))] + Self::VLNEXT => write!(f, "VLNEXT"), + Self::VEOL2 => write!(f, "VEOL2"), + #[cfg(any(solarish, target_os = "haiku", target_os = "nto"))] + Self::VSWTCH => write!(f, "VSWTCH"), + #[cfg(any( + bsd, + solarish, + target_os = "aix", + target_os = "hurd", + target_os = "nto" + ))] + Self::VDSUSP => write!(f, "VDSUSP"), + #[cfg(any(bsd, target_os = "hurd", target_os = "illumos"))] + Self::VSTATUS => write!(f, "VSTATUS"), + #[cfg(any(freebsdlike, target_os = "illumos"))] + Self::VERASE2 => write!(f, "VERASE2"), + + _ => write!(f, "unknown"), + } + } +} + +/// `TCSA*` values for use with [`tcsetattr`]. +/// +/// [`tcsetattr`]: crate::termios::tcsetattr +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(u32)] +pub enum OptionalActions { + /// `TCSANOW`—Make the change immediately. + #[doc(alias = "TCSANOW")] + Now = c::TCSANOW as u32, + + /// `TCSADRAIN`—Make the change after all output has been transmitted. + #[doc(alias = "TCSADRAIN")] + Drain = c::TCSADRAIN as u32, + + /// `TCSAFLUSH`—Discard any pending input and then make the change + /// after all output has been transmitted. + #[doc(alias = "TCSAFLUSH")] + Flush = c::TCSAFLUSH as u32, +} + +/// `TC*` values for use with [`tcflush`]. +/// +/// [`tcflush`]: crate::termios::tcflush +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(u32)] +pub enum QueueSelector { + /// `TCIFLUSH`—Flush data received but not read. + #[doc(alias = "TCIFLUSH")] + IFlush = c::TCIFLUSH as u32, + + /// `TCOFLUSH`—Flush data written but not transmitted. + #[doc(alias = "TCOFLUSH")] + OFlush = c::TCOFLUSH as u32, + + /// `TCIOFLUSH`—`IFlush` and `OFlush` combined. + #[doc(alias = "TCIOFLUSH")] + IOFlush = c::TCIOFLUSH as u32, +} + +/// `TC*` values for use with [`tcflow`]. +/// +/// [`tcflow`]: crate::termios::tcflow +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[repr(u32)] +pub enum Action { + /// `TCOOFF`—Suspend output. + #[doc(alias = "TCOOFF")] + OOff = c::TCOOFF as u32, + + /// `TCOON`—Restart suspended output. + #[doc(alias = "TCOON")] + OOn = c::TCOON as u32, + + /// `TCIOFF`—Transmits a STOP byte. + #[doc(alias = "TCIOFF")] + IOff = c::TCIOFF as u32, + + /// `TCION`—Transmits a START byte. + #[doc(alias = "TCION")] + IOn = c::TCION as u32, +} + +/// `struct winsize` for use with [`tcgetwinsize`]. +/// +/// [`tcgetwinsize`]: crate::termios::tcgetwinsize +#[doc(alias = "winsize")] +#[repr(C)] +#[derive(Debug, Copy, Clone, Eq, Hash, PartialEq)] +#[allow(missing_docs)] +pub struct Winsize { + /// The number of rows the terminal has. + pub ws_row: u16, + /// The number of columns the terminal has. + pub ws_col: u16, + + pub ws_xpixel: u16, + pub ws_ypixel: u16, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn termios_layouts() { + check_renamed_type!(InputModes, tcflag_t); + check_renamed_type!(OutputModes, tcflag_t); + check_renamed_type!(ControlModes, tcflag_t); + check_renamed_type!(LocalModes, tcflag_t); + assert_eq_size!(u8, libc::cc_t); + assert_eq_size!(types::tcflag_t, libc::tcflag_t); + + check_renamed_struct!(Winsize, winsize, ws_row, ws_col, ws_xpixel, ws_ypixel); + + // On platforms with a termios/termios2 split, check `termios`. + #[cfg(linux_raw)] + { + check_renamed_type!(Termios, termios2); + check_renamed_struct_renamed_field!(Termios, termios2, input_modes, c_iflag); + check_renamed_struct_renamed_field!(Termios, termios2, output_modes, c_oflag); + check_renamed_struct_renamed_field!(Termios, termios2, control_modes, c_cflag); + check_renamed_struct_renamed_field!(Termios, termios2, local_modes, c_lflag); + check_renamed_struct_renamed_field!(Termios, termios2, line_discipline, c_line); + check_renamed_struct_renamed_field!(Termios, termios2, special_codes, c_cc); + check_renamed_struct_renamed_field!(Termios, termios2, input_speed, c_ispeed); + check_renamed_struct_renamed_field!(Termios, termios2, output_speed, c_ospeed); + + // We assume that `termios` has the same layout as `termios2` minus the + // `c_ispeed` and `c_ospeed` fields. + check_renamed_struct_renamed_field!(Termios, termios, input_modes, c_iflag); + check_renamed_struct_renamed_field!(Termios, termios, output_modes, c_oflag); + check_renamed_struct_renamed_field!(Termios, termios, control_modes, c_cflag); + check_renamed_struct_renamed_field!(Termios, termios, local_modes, c_lflag); + check_renamed_struct_renamed_field!(Termios, termios, special_codes, c_cc); + + // On everything except PowerPC, `termios` matches `termios2` except + // for the addition of `c_ispeed` and `c_ospeed`. + #[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] + const_assert_eq!( + memoffset::offset_of!(Termios, input_speed), + core::mem::size_of::() + ); + + // On PowerPC, `termios2` is `termios`. + #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] + assert_eq_size!(c::termios2, c::termios); + } + + #[cfg(not(linux_raw))] + { + // On MIPS, SPARC, and Android, the libc lacks the ospeed and ispeed + // fields. + #[cfg(all( + not(all( + target_env = "gnu", + any( + target_arch = "mips", + target_arch = "mips32r6", + target_arch = "mips64", + target_arch = "mips64r6", + target_arch = "sparc", + target_arch = "sparc64" + ) + )), + not(all(libc, target_os = "android")) + ))] + check_renamed_type!(Termios, termios); + #[cfg(not(all( + not(all( + target_env = "gnu", + any( + target_arch = "mips", + target_arch = "mips32r6", + target_arch = "mips64", + target_arch = "mips64r6", + target_arch = "sparc", + target_arch = "sparc64" + ) + )), + not(all(libc, target_os = "android")) + )))] + const_assert!(core::mem::size_of::() >= core::mem::size_of::()); + + check_renamed_struct_renamed_field!(Termios, termios, input_modes, c_iflag); + check_renamed_struct_renamed_field!(Termios, termios, output_modes, c_oflag); + check_renamed_struct_renamed_field!(Termios, termios, control_modes, c_cflag); + check_renamed_struct_renamed_field!(Termios, termios, local_modes, c_lflag); + #[cfg(any( + linux_like, + target_env = "newlib", + target_os = "fuchsia", + target_os = "haiku", + target_os = "redox" + ))] + check_renamed_struct_renamed_field!(Termios, termios, line_discipline, c_line); + check_renamed_struct_renamed_field!(Termios, termios, special_codes, c_cc); + #[cfg(not(any( + linux_kernel, + solarish, + target_os = "emscripten", + target_os = "fuchsia" + )))] + { + check_renamed_struct_renamed_field!(Termios, termios, input_speed, c_ispeed); + check_renamed_struct_renamed_field!(Termios, termios, output_speed, c_ospeed); + } + #[cfg(any(target_env = "musl", target_os = "fuchsia"))] + { + check_renamed_struct_renamed_field!(Termios, termios, input_speed, __c_ispeed); + check_renamed_struct_renamed_field!(Termios, termios, output_speed, __c_ospeed); + } + } + + check_renamed_type!(OptionalActions, c_int); + check_renamed_type!(QueueSelector, c_int); + check_renamed_type!(Action, c_int); + } + + #[test] + #[cfg(not(any( + solarish, + target_os = "cygwin", + target_os = "emscripten", + target_os = "haiku", + target_os = "redox", + )))] + fn termios_legacy() { + // Check that our doc aliases above are correct. + const_assert_eq!(c::EXTA, c::B19200); + const_assert_eq!(c::EXTB, c::B38400); + } + + #[cfg(bsd)] + #[test] + fn termios_bsd() { + // On BSD platforms we can assume that the `B*` constants have their + // arbitrary integer speed value. Confirm this. + const_assert_eq!(c::B0, 0); + const_assert_eq!(c::B50, 50); + const_assert_eq!(c::B19200, 19200); + const_assert_eq!(c::B38400, 38400); + } + + #[test] + #[cfg(not(bsd))] + fn termios_speed_encoding() { + assert_eq!(speed::encode(0), Some(c::B0)); + assert_eq!(speed::encode(50), Some(c::B50)); + assert_eq!(speed::encode(19200), Some(c::B19200)); + assert_eq!(speed::encode(38400), Some(c::B38400)); + assert_eq!(speed::encode(1), None); + assert_eq!(speed::encode(!0), None); + + #[cfg(not(linux_kernel))] + { + assert_eq!(speed::decode(c::B0), Some(0)); + assert_eq!(speed::decode(c::B50), Some(50)); + assert_eq!(speed::decode(c::B19200), Some(19200)); + assert_eq!(speed::decode(c::B38400), Some(38400)); + } + } + + #[cfg(linux_kernel)] + #[test] + fn termios_ioctl_contiguity() { + // When using `termios2`, we assume that we can add the optional actions + // value to the ioctl request code. Test this assumption. + + const_assert_eq!(c::TCSETS2, c::TCSETS2 + 0); + const_assert_eq!(c::TCSETSW2, c::TCSETS2 + 1); + const_assert_eq!(c::TCSETSF2, c::TCSETS2 + 2); + + const_assert_eq!(c::TCSANOW - c::TCSANOW, 0); + const_assert_eq!(c::TCSADRAIN - c::TCSANOW, 1); + const_assert_eq!(c::TCSAFLUSH - c::TCSANOW, 2); + + // MIPS is different here. + #[cfg(any( + target_arch = "mips", + target_arch = "mips32r6", + target_arch = "mips64", + target_arch = "mips64r6" + ))] + { + assert_eq!(i128::from(c::TCSANOW) - i128::from(c::TCSETS), 0); + assert_eq!(i128::from(c::TCSADRAIN) - i128::from(c::TCSETS), 1); + assert_eq!(i128::from(c::TCSAFLUSH) - i128::from(c::TCSETS), 2); + } + #[cfg(not(any( + target_arch = "mips", + target_arch = "mips32r6", + target_arch = "mips64", + target_arch = "mips64r6" + )))] + { + const_assert_eq!(c::TCSANOW, 0); + const_assert_eq!(c::TCSADRAIN, 1); + const_assert_eq!(c::TCSAFLUSH, 2); + } + } + + #[cfg(linux_kernel)] + #[test] + fn termios_cibaud() { + // Test an assumption. + const_assert_eq!(c::CIBAUD, c::CBAUD << c::IBSHIFT); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/clock.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/clock.rs new file mode 100644 index 0000000000000000000000000000000000000000..d6be40e87f27579157f4a10c04e85f8a0661d80e --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/clock.rs @@ -0,0 +1,117 @@ +use crate::{backend, io}; +use core::fmt; + +pub use crate::timespec::{Nsecs, Secs, Timespec}; + +#[cfg(not(any( + apple, + target_os = "dragonfly", + target_os = "espidf", + target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11. + target_os = "openbsd", + target_os = "redox", + target_os = "vita", + target_os = "wasi", +)))] +pub use crate::clockid::ClockId; + +/// `clock_nanosleep(id, 0, request, remain)`—Sleeps for a duration on a +/// given clock. +/// +/// This is `clock_nanosleep` specialized for the case of a relative sleep +/// interval. See [`clock_nanosleep_absolute`] for absolute intervals. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_nanosleep.html +/// [Linux]: https://man7.org/linux/man-pages/man2/clock_nanosleep.2.html +#[cfg(not(any( + apple, + target_os = "dragonfly", + target_os = "emscripten", + target_os = "espidf", + target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11. + target_os = "haiku", + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "vita", + target_os = "wasi", +)))] +#[inline] +pub fn clock_nanosleep_relative(id: ClockId, request: &Timespec) -> NanosleepRelativeResult { + backend::thread::syscalls::clock_nanosleep_relative(id, request) +} + +/// `clock_nanosleep(id, TIMER_ABSTIME, request, NULL)`—Sleeps until an +/// absolute time on a given clock. +/// +/// This is `clock_nanosleep` specialized for the case of an absolute sleep +/// interval. See [`clock_nanosleep_relative`] for relative intervals. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_nanosleep.html +/// [Linux]: https://man7.org/linux/man-pages/man2/clock_nanosleep.2.html +#[cfg(not(any( + apple, + target_os = "dragonfly", + target_os = "emscripten", + target_os = "espidf", + target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11. + target_os = "haiku", + target_os = "horizon", + target_os = "openbsd", + target_os = "redox", + target_os = "vita", + target_os = "wasi", +)))] +#[inline] +pub fn clock_nanosleep_absolute(id: ClockId, request: &Timespec) -> io::Result<()> { + backend::thread::syscalls::clock_nanosleep_absolute(id, request) +} + +/// `nanosleep(request, remain)`—Sleeps for a duration. +/// +/// This effectively uses the system monotonic clock. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/nanosleep.html +/// [Linux]: https://man7.org/linux/man-pages/man2/nanosleep.2.html +#[inline] +pub fn nanosleep(request: &Timespec) -> NanosleepRelativeResult { + backend::thread::syscalls::nanosleep(request) +} + +/// A return type for `nanosleep` and `clock_nanosleep_relative`. +#[derive(Clone)] +#[must_use] +pub enum NanosleepRelativeResult { + /// The sleep completed normally. + Ok, + /// The sleep was interrupted, the remaining time is returned. + Interrupted(Timespec), + /// An invalid time value was provided. + Err(io::Errno), +} + +impl fmt::Debug for NanosleepRelativeResult { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Ok => f.write_str("Ok"), + Self::Interrupted(remaining) => write!( + f, + "Interrupted(Timespec {{ tv_sec: {:?}, tv_nsec: {:?} }})", + remaining.tv_sec, remaining.tv_nsec + ), + Self::Err(err) => write!(f, "Err({:?})", err), + } + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/futex.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/futex.rs new file mode 100644 index 0000000000000000000000000000000000000000..9862997d45068cf408f653225029e7abe8769fd1 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/futex.rs @@ -0,0 +1,600 @@ +//! Linux `futex`. +//! +//! Futex is a very low-level mechanism for implementing concurrency primitives +//! such as mutexes, rwlocks, and condvars. For a higher-level API that +//! provides those abstractions, see [rustix-futex-sync]. +//! +//! # Examples +//! +//! ``` +//! use rustix::thread::futex; +//! use std::sync::atomic::AtomicU32; +//! +//! # fn test(futex: &AtomicU32) -> rustix::io::Result<()> { +//! // Wake up one waiter. +//! futex::wake(futex, futex::Flags::PRIVATE, 1)?; +//! # Ok(()) +//! # } +//! ``` +//! +//! # References +//! - [Linux `futex` system call] +//! - [Linux `futex` feature] +//! +//! [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +//! [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +//! [rustix-futex-sync]: https://crates.io/crates/rustix-futex-sync +#![allow(unsafe_code)] + +use core::ffi::c_void; +use core::num::NonZeroU32; +use core::ptr; +use core::sync::atomic::AtomicU32; + +use crate::backend::thread::futex::Operation; +use crate::backend::thread::syscalls::{futex_timeout, futex_val2}; +use crate::fd::{FromRawFd as _, OwnedFd, RawFd}; +use crate::{backend, io}; + +pub use crate::clockid::ClockId; +pub use crate::timespec::{Nsecs, Secs, Timespec}; + +pub use backend::thread::futex::{Flags, WaitFlags, OWNER_DIED, WAITERS}; + +/// `syscall(SYS_futex, uaddr, FUTEX_WAIT, val, timeout, NULL, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn wait( + uaddr: &AtomicU32, + flags: Flags, + val: u32, + timeout: Option<&Timespec>, +) -> io::Result<()> { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_timeout(uaddr, Operation::Wait, flags, val, timeout, ptr::null(), 0).map(|val| { + debug_assert_eq!( + val, 0, + "The return value should always equal zero, if the call is successful" + ); + }) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_WAKE, val, NULL, NULL, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn wake(uaddr: &AtomicU32, flags: Flags, val: u32) -> io::Result { + // SAFETY: The raw pointers come from references or null. + unsafe { futex_val2(uaddr, Operation::Wake, flags, val, 0, ptr::null(), 0) } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_FD, val, NULL, NULL, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn fd(uaddr: &AtomicU32, flags: Flags, val: u32) -> io::Result { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_val2(uaddr, Operation::Fd, flags, val, 0, ptr::null(), 0).map(|val| { + let fd = val as RawFd; + debug_assert_eq!(fd as usize, val, "return value should be a valid fd"); + OwnedFd::from_raw_fd(fd) + }) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_REQUEUE, val, val2, uaddr2, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn requeue( + uaddr: &AtomicU32, + flags: Flags, + val: u32, + val2: u32, + uaddr2: &AtomicU32, +) -> io::Result { + // SAFETY: The raw pointers come from references or null. + unsafe { futex_val2(uaddr, Operation::Requeue, flags, val, val2, uaddr2, 0) } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_CMP_REQUEUE, val, val2, uaddr2, val3)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn cmp_requeue( + uaddr: &AtomicU32, + flags: Flags, + val: u32, + val2: u32, + uaddr2: &AtomicU32, + val3: u32, +) -> io::Result { + // SAFETY: The raw pointers come from references or null. + unsafe { futex_val2(uaddr, Operation::CmpRequeue, flags, val, val2, uaddr2, val3) } +} + +/// `FUTEX_OP_*` operations for use with [`wake_op`]. +#[derive(Debug, Copy, Clone, Eq, PartialEq)] +#[repr(u32)] +#[allow(clippy::identity_op)] +pub enum WakeOp { + /// `FUTEX_OP_SET`: `uaddr2 = oparg;` + Set = 0, + /// `FUTEX_OP_ADD`: `uaddr2 += oparg;` + Add = 1, + /// `FUTEX_OP_OR`: `uaddr2 |= oparg;` + Or = 2, + /// `FUTEX_OP_ANDN`: `uaddr2 &= ~oparg;` + AndN = 3, + /// `FUTEX_OP_XOR`: `uaddr2 ^= oparg;` + XOr = 4, + /// `FUTEX_OP_SET | FUTEX_OP_ARG_SHIFT`: `uaddr2 = (oparg << 1);` + SetShift = 0 | 8, + /// `FUTEX_OP_ADD | FUTEX_OP_ARG_SHIFT`: `uaddr2 += (oparg << 1);` + AddShift = 1 | 8, + /// `FUTEX_OP_OR | FUTEX_OP_ARG_SHIFT`: `uaddr2 |= (oparg << 1);` + OrShift = 2 | 8, + /// `FUTEX_OP_ANDN | FUTEX_OP_ARG_SHIFT`: `uaddr2 &= !(oparg << 1);` + AndNShift = 3 | 8, + /// `FUTEX_OP_XOR | FUTEX_OP_ARG_SHIFT`: `uaddr2 ^= (oparg << 1);` + XOrShift = 4 | 8, +} + +/// `FUTEX_OP_CMP_*` operations for use with [`wake_op`]. +#[derive(Debug, Copy, Clone, Eq, PartialEq)] +#[repr(u32)] +pub enum WakeOpCmp { + /// `FUTEX_OP_CMP_EQ`: `if oldval == cmparg { wake(); }` + Eq = 0, + /// `FUTEX_OP_CMP_EQ`: `if oldval != cmparg { wake(); }` + Ne = 1, + /// `FUTEX_OP_CMP_EQ`: `if oldval < cmparg { wake(); }` + Lt = 2, + /// `FUTEX_OP_CMP_EQ`: `if oldval <= cmparg { wake(); }` + Le = 3, + /// `FUTEX_OP_CMP_EQ`: `if oldval > cmparg { wake(); }` + Gt = 4, + /// `FUTEX_OP_CMP_EQ`: `if oldval >= cmparg { wake(); }` + Ge = 5, +} + +/// `syscall(SYS_futex, uaddr, FUTEX_WAKE_OP, val, val2, uaddr2, val3)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +#[allow(clippy::too_many_arguments)] +pub fn wake_op( + uaddr: &AtomicU32, + flags: Flags, + val: u32, + val2: u32, + uaddr2: &AtomicU32, + op: WakeOp, + cmp: WakeOpCmp, + oparg: u16, + cmparg: u16, +) -> io::Result { + if oparg >= 1 << 12 || cmparg >= 1 << 12 { + return Err(io::Errno::INVAL); + } + + let val3 = + ((op as u32) << 28) | ((cmp as u32) << 24) | ((oparg as u32) << 12) | (cmparg as u32); + + // SAFETY: The raw pointers come from references or null. + unsafe { futex_val2(uaddr, Operation::WakeOp, flags, val, val2, uaddr2, val3) } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_LOCK_PI, 0, timeout, NULL, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn lock_pi(uaddr: &AtomicU32, flags: Flags, timeout: Option<&Timespec>) -> io::Result<()> { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_timeout(uaddr, Operation::LockPi, flags, 0, timeout, ptr::null(), 0).map(|val| { + debug_assert_eq!( + val, 0, + "The return value should always equal zero, if the call is successful" + ); + }) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_UNLOCK_PI, 0, NULL, NULL, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn unlock_pi(uaddr: &AtomicU32, flags: Flags) -> io::Result<()> { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_val2(uaddr, Operation::UnlockPi, flags, 0, 0, ptr::null(), 0).map(|val| { + debug_assert_eq!( + val, 0, + "The return value should always equal zero, if the call is successful" + ); + }) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_TRYLOCK_PI, 0, NULL, NULL, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn trylock_pi(uaddr: &AtomicU32, flags: Flags) -> io::Result { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_val2(uaddr, Operation::TrylockPi, flags, 0, 0, ptr::null(), 0).map(|ret| ret == 0) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_WAIT_BITSET, val, timeout, NULL, val3)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn wait_bitset( + uaddr: &AtomicU32, + flags: Flags, + val: u32, + timeout: Option<&Timespec>, + val3: NonZeroU32, +) -> io::Result<()> { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_timeout( + uaddr, + Operation::WaitBitset, + flags, + val, + timeout, + ptr::null(), + val3.get(), + ) + .map(|val| { + debug_assert_eq!( + val, 0, + "The return value should always equal zero, if the call is successful" + ); + }) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_WAKE_BITSET, val, NULL, NULL, val3)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn wake_bitset( + uaddr: &AtomicU32, + flags: Flags, + val: u32, + val3: NonZeroU32, +) -> io::Result { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_val2( + uaddr, + Operation::WakeBitset, + flags, + val, + 0, + ptr::null(), + val3.get(), + ) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_WAIT_REQUEUE_PI, val, timeout, uaddr2, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn wait_requeue_pi( + uaddr: &AtomicU32, + flags: Flags, + val: u32, + timeout: Option<&Timespec>, + uaddr2: &AtomicU32, +) -> io::Result<()> { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_timeout( + uaddr, + Operation::WaitRequeuePi, + flags, + val, + timeout, + uaddr2, + 0, + ) + .map(|val| { + debug_assert_eq!( + val, 0, + "The return value should always equal zero, if the call is successful" + ); + }) + } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_CMP_REQUEUE_PI, 1, val2, uaddr2, val3)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn cmp_requeue_pi( + uaddr: &AtomicU32, + flags: Flags, + val2: u32, + uaddr2: &AtomicU32, + val3: u32, +) -> io::Result { + // SAFETY: The raw pointers come from references or null. + unsafe { futex_val2(uaddr, Operation::CmpRequeuePi, flags, 1, val2, uaddr2, val3) } +} + +/// `syscall(SYS_futex, uaddr, FUTEX_LOCK_PI2, 0, timeout, NULL, 0)` +/// +/// This is a very low-level feature for implementing synchronization +/// primitives. See the references links. +/// +/// # References +/// - [Linux `futex` system call] +/// - [Linux `futex` feature] +/// +/// [Linux `futex` system call]: https://man7.org/linux/man-pages/man2/futex.2.html +/// [Linux `futex` feature]: https://man7.org/linux/man-pages/man7/futex.7.html +#[inline] +pub fn lock_pi2(uaddr: &AtomicU32, flags: Flags, timeout: Option<&Timespec>) -> io::Result<()> { + // SAFETY: The raw pointers come from references or null. + unsafe { + futex_timeout(uaddr, Operation::LockPi2, flags, 0, timeout, ptr::null(), 0).map(|val| { + debug_assert_eq!( + val, 0, + "The return value should always equal zero, if the call is successful" + ); + }) + } +} + +/// A pointer in the [`Wait`] struct. +#[repr(C)] +#[derive(Copy, Clone)] +#[non_exhaustive] +pub struct WaitPtr { + #[cfg(all(target_pointer_width = "32", target_endian = "big"))] + #[doc(hidden)] + pub __pad32: u32, + #[cfg(all(target_pointer_width = "16", target_endian = "big"))] + #[doc(hidden)] + pub __pad16: u16, + + /// The pointer value. + pub ptr: *mut c_void, + + #[cfg(all(target_pointer_width = "16", target_endian = "little"))] + #[doc(hidden)] + pub __pad16: u16, + #[cfg(all(target_pointer_width = "32", target_endian = "little"))] + #[doc(hidden)] + pub __pad32: u32, +} + +impl WaitPtr { + /// Construct a new `WaitPtr` holding the given raw pointer value. + #[inline] + pub const fn new(ptr: *mut c_void) -> Self { + Self { + ptr, + + #[cfg(target_pointer_width = "16")] + __pad16: 0, + #[cfg(any(target_pointer_width = "16", target_pointer_width = "32"))] + __pad32: 0, + } + } +} + +impl Default for WaitPtr { + #[inline] + fn default() -> Self { + Self::new(ptr::null_mut()) + } +} + +impl From<*mut c_void> for WaitPtr { + #[inline] + fn from(ptr: *mut c_void) -> Self { + Self::new(ptr) + } +} + +impl core::fmt::Debug for WaitPtr { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + self.ptr.fmt(f) + } +} + +/// For use with [`waitv`]. +#[repr(C)] +#[derive(Debug, Copy, Clone)] +#[non_exhaustive] +pub struct Wait { + /// The expected value. + pub val: u64, + /// The address to wait for. + pub uaddr: WaitPtr, + /// The type and size of futex to perform. + pub flags: WaitFlags, + + /// Reserved for future use. + pub(crate) __reserved: u32, +} + +impl Wait { + /// Construct a zero-initialized `Wait`. + #[inline] + pub const fn new() -> Self { + Self { + val: 0, + uaddr: WaitPtr::new(ptr::null_mut()), + flags: WaitFlags::empty(), + __reserved: 0, + } + } +} + +impl Default for Wait { + #[inline] + fn default() -> Self { + Self::new() + } +} + +/// `futex_waitv(waiters.as_ptr(), waiters.len(), flags, timeout, clockd)`— +/// Wait on an array of futexes, wake on any. +/// +/// This requires Linux ≥ 5.16. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://www.kernel.org/doc/html/latest/userspace-api/futex2.html +#[inline] +pub fn waitv( + waiters: &[Wait], + flags: WaitvFlags, + timeout: Option<&Timespec>, + clockid: ClockId, +) -> io::Result { + backend::thread::syscalls::futex_waitv(waiters, flags, timeout, clockid) +} + +bitflags::bitflags! { + /// Flags for use with the flags argument in [`waitv`]. + /// + /// At this time, no flags are defined. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct WaitvFlags: u32 { + /// + const _ = !0; + } +} + +#[cfg(linux_raw)] +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_layouts() { + use crate::backend::c; + + check_renamed_struct!(Wait, futex_waitv, val, uaddr, flags, __reserved); + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/id.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/id.rs new file mode 100644 index 0000000000000000000000000000000000000000..a299628f3ec3070a45022de4e9083f0d9c73a686 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/id.rs @@ -0,0 +1,194 @@ +//! CPU and thread identifiers. +//! +//! # Safety +//! +//! The `Cpuid`, type can be constructed from raw integers, which is marked +//! unsafe because actual OS's assign special meaning to some integer values. + +#![allow(unsafe_code)] +use crate::{backend, io}; +#[cfg(linux_kernel)] +use backend::thread::types::RawCpuid; + +pub use crate::pid::{Pid, RawPid}; +pub use crate::ugid::{Gid, RawGid, RawUid, Uid}; + +/// A Linux CPU ID. +#[cfg(linux_kernel)] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq, Debug, Hash)] +pub struct Cpuid(RawCpuid); + +#[cfg(linux_kernel)] +impl Cpuid { + /// Converts a `RawCpuid` into a `Cpuid`. + /// + /// # Safety + /// + /// `raw` must be the value of a valid Linux CPU ID. + #[inline] + pub const unsafe fn from_raw(raw: RawCpuid) -> Self { + Self(raw) + } + + /// Converts a `Cpuid` into a `RawCpuid`. + #[inline] + pub const fn as_raw(self) -> RawCpuid { + self.0 + } +} + +/// `gettid()`—Returns the thread ID. +/// +/// This returns the OS thread ID, which is not necessarily the same as the +/// Rust's `std::thread::Thread::id` or the pthread ID. +/// +/// This function always does a system call. To avoid this overhead, ask the +/// thread runtime for the ID instead, for example using [`libc::gettid`] or +/// [`origin::thread::current_id`]. +/// +/// [`libc::gettid`]: https://docs.rs/libc/*/libc/fn.gettid.html +/// [`origin::thread::current_id`]: https://docs.rs/origin/*/origin/thread/fn.current_id.html +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/gettid.2.html +#[inline] +#[must_use] +pub fn gettid() -> Pid { + backend::thread::syscalls::gettid() +} + +/// `setuid(uid)`—Sets the effective user ID of the calling thread. +/// +/// # Warning +/// +/// This is not the `setuid` you are looking for… POSIX requires uids to be +/// process granular, but on Linux they are per-thread. Thus, this call only +/// changes the uid for the current *thread*, not the entire process even +/// though that is in violation of the POSIX standard. +/// +/// For details on this distinction, see the C library vs. kernel differences +/// in the [manual page][linux_notes]. This call implements the kernel +/// behavior. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setuid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setuid.2.html +/// [linux_notes]: https://man7.org/linux/man-pages/man2/setuid.2.html#NOTES +#[inline] +pub fn set_thread_uid(uid: Uid) -> io::Result<()> { + backend::thread::syscalls::setuid_thread(uid) +} + +/// `setresuid(ruid, euid, suid)`—Sets the real, effective, and saved user ID +/// of the calling thread. +/// +/// # Warning +/// +/// This is not the `setresuid` you are looking for… POSIX requires uids to be +/// process granular, but on Linux they are per-thread. Thus, this call only +/// changes the uid for the current *thread*, not the entire process even +/// though that is in violation of the POSIX standard. +/// +/// For details on this distinction, see the C library vs. kernel differences +/// in the [manual page][linux_notes] and the notes in [`set_thread_uid`]. This +/// call implements the kernel behavior. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/setresuid.2.html +/// [linux_notes]: https://man7.org/linux/man-pages/man2/setresuid.2.html#NOTES +#[inline] +pub fn set_thread_res_uid(ruid: R, euid: E, suid: S) -> io::Result<()> +where + R: Into>, + E: Into>, + S: Into>, +{ + backend::thread::syscalls::setresuid_thread(ruid.into(), euid.into(), suid.into()) +} + +/// `setgid(gid)`—Sets the effective group ID of the current thread. +/// +/// # Warning +/// +/// This is not the `setgid` you are looking for… POSIX requires gids to be +/// process granular, but on Linux they are per-thread. Thus, this call only +/// changes the gid for the current *thread*, not the entire process even +/// though that is in violation of the POSIX standard. +/// +/// For details on this distinction, see the C library vs. kernel differences +/// in the [manual page][linux_notes]. This call implements the kernel +/// behavior. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/setgid.html +/// [Linux]: https://man7.org/linux/man-pages/man2/setgid.2.html +/// [linux_notes]: https://man7.org/linux/man-pages/man2/setgid.2.html#NOTES +#[inline] +pub fn set_thread_gid(gid: Gid) -> io::Result<()> { + backend::thread::syscalls::setgid_thread(gid) +} + +/// `setresgid(rgid, egid, sgid)`—Sets the real, effective, and saved group +/// ID of the current thread. +/// +/// # Warning +/// +/// This is not the `setresgid` you are looking for… POSIX requires gids to be +/// process granular, but on Linux they are per-thread. Thus, this call only +/// changes the gid for the current *thread*, not the entire process even +/// though that is in violation of the POSIX standard. +/// +/// For details on this distinction, see the C library vs. kernel differences +/// in the [manual page][linux_notes] and the notes in [`set_thread_gid`]. This +/// call implements the kernel behavior. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/setresgid.2.html +/// [linux_notes]: https://man7.org/linux/man-pages/man2/setresgid.2.html#NOTES +#[inline] +pub fn set_thread_res_gid(rgid: R, egid: E, sgid: S) -> io::Result<()> +where + R: Into>, + E: Into>, + S: Into>, +{ + backend::thread::syscalls::setresgid_thread(rgid.into(), egid.into(), sgid.into()) +} + +/// `setgroups(groups)`—Sets the supplementary group IDs for the calling +/// thread. +/// +/// # Warning +/// +/// This is not the `setgroups` you are looking for… POSIX requires gids to be +/// process granular, but on Linux they are per-thread. Thus, this call only +/// changes the gids for the current *thread*, not the entire process even +/// though that is in violation of the POSIX standard. +/// +/// For details on this distinction, see the C library vs. kernel differences +/// in the [manual page][linux_notes]. This call implements the kernel +/// behavior. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/setgroups.2.html +/// [linux_notes]: https://man7.org/linux/man-pages/man2/setgroups.2.html#NOTES +#[cfg(linux_kernel)] +#[inline] +pub fn set_thread_groups(groups: &[Gid]) -> io::Result<()> { + backend::thread::syscalls::setgroups_thread(groups) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/libcap.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/libcap.rs new file mode 100644 index 0000000000000000000000000000000000000000..af5ab58a8f24eb1e628c5312525983b190552049 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/libcap.rs @@ -0,0 +1,189 @@ +use bitflags::bitflags; +use core::mem::MaybeUninit; + +use crate::pid::Pid; +use crate::{backend, io}; + +/// `__user_cap_data_struct` +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct CapabilitySets { + /// `__user_cap_data_struct.effective` + pub effective: CapabilitySet, + /// `__user_cap_data_struct.permitted` + pub permitted: CapabilitySet, + /// `__user_cap_data_struct.inheritable` + pub inheritable: CapabilitySet, +} + +/// Previous name of `CapabilitySet`. +#[deprecated(since = "1.1.0", note = "Renamed to CapabilitySet")] +pub type CapabilityFlags = CapabilitySet; + +bitflags! { + /// `CAP_*` constants. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct CapabilitySet: u64 { + /// `CAP_CHOWN` + const CHOWN = 1 << linux_raw_sys::general::CAP_CHOWN; + /// `CAP_DAC_OVERRIDE` + const DAC_OVERRIDE = 1 << linux_raw_sys::general::CAP_DAC_OVERRIDE; + /// `CAP_DAC_READ_SEARCH` + const DAC_READ_SEARCH = 1 << linux_raw_sys::general::CAP_DAC_READ_SEARCH; + /// `CAP_FOWNER` + const FOWNER = 1 << linux_raw_sys::general::CAP_FOWNER; + /// `CAP_FSETID` + const FSETID = 1 << linux_raw_sys::general::CAP_FSETID; + /// `CAP_KILL` + const KILL = 1 << linux_raw_sys::general::CAP_KILL; + /// `CAP_SETGID` + const SETGID = 1 << linux_raw_sys::general::CAP_SETGID; + /// `CAP_SETUID` + const SETUID = 1 << linux_raw_sys::general::CAP_SETUID; + /// `CAP_SETPCAP` + const SETPCAP = 1 << linux_raw_sys::general::CAP_SETPCAP; + /// `CAP_LINUX_IMMUTABLE` + const LINUX_IMMUTABLE = 1 << linux_raw_sys::general::CAP_LINUX_IMMUTABLE; + /// `CAP_NET_BIND_SERVICE` + const NET_BIND_SERVICE = 1 << linux_raw_sys::general::CAP_NET_BIND_SERVICE; + /// `CAP_NET_BROADCAST` + const NET_BROADCAST = 1 << linux_raw_sys::general::CAP_NET_BROADCAST; + /// `CAP_NET_ADMIN` + const NET_ADMIN = 1 << linux_raw_sys::general::CAP_NET_ADMIN; + /// `CAP_NET_RAW` + const NET_RAW = 1 << linux_raw_sys::general::CAP_NET_RAW; + /// `CAP_IPC_LOCK` + const IPC_LOCK = 1 << linux_raw_sys::general::CAP_IPC_LOCK; + /// `CAP_IPC_OWNER` + const IPC_OWNER = 1 << linux_raw_sys::general::CAP_IPC_OWNER; + /// `CAP_SYS_MODULE` + const SYS_MODULE = 1 << linux_raw_sys::general::CAP_SYS_MODULE; + /// `CAP_SYS_RAWIO` + const SYS_RAWIO = 1 << linux_raw_sys::general::CAP_SYS_RAWIO; + /// `CAP_SYS_CHROOT` + const SYS_CHROOT = 1 << linux_raw_sys::general::CAP_SYS_CHROOT; + /// `CAP_SYS_PTRACE` + const SYS_PTRACE = 1 << linux_raw_sys::general::CAP_SYS_PTRACE; + /// `CAP_SYS_PACCT` + const SYS_PACCT = 1 << linux_raw_sys::general::CAP_SYS_PACCT; + /// `CAP_SYS_ADMIN` + const SYS_ADMIN = 1 << linux_raw_sys::general::CAP_SYS_ADMIN; + /// `CAP_SYS_BOOT` + const SYS_BOOT = 1 << linux_raw_sys::general::CAP_SYS_BOOT; + /// `CAP_SYS_NICE` + const SYS_NICE = 1 << linux_raw_sys::general::CAP_SYS_NICE; + /// `CAP_SYS_RESOURCE` + const SYS_RESOURCE = 1 << linux_raw_sys::general::CAP_SYS_RESOURCE; + /// `CAP_SYS_TIME` + const SYS_TIME = 1 << linux_raw_sys::general::CAP_SYS_TIME; + /// `CAP_SYS_TTY_CONFIG` + const SYS_TTY_CONFIG = 1 << linux_raw_sys::general::CAP_SYS_TTY_CONFIG; + /// `CAP_MKNOD` + const MKNOD = 1 << linux_raw_sys::general::CAP_MKNOD; + /// `CAP_LEASE` + const LEASE = 1 << linux_raw_sys::general::CAP_LEASE; + /// `CAP_AUDIT_WRITE` + const AUDIT_WRITE = 1 << linux_raw_sys::general::CAP_AUDIT_WRITE; + /// `CAP_AUDIT_CONTROL` + const AUDIT_CONTROL = 1 << linux_raw_sys::general::CAP_AUDIT_CONTROL; + /// `CAP_SETFCAP` + const SETFCAP = 1 << linux_raw_sys::general::CAP_SETFCAP; + /// `CAP_MAC_OVERRIDE` + const MAC_OVERRIDE = 1 << linux_raw_sys::general::CAP_MAC_OVERRIDE; + /// `CAP_MAC_ADMIN` + const MAC_ADMIN = 1 << linux_raw_sys::general::CAP_MAC_ADMIN; + /// `CAP_SYSLOG` + const SYSLOG = 1 << linux_raw_sys::general::CAP_SYSLOG; + /// `CAP_WAKE_ALARM` + const WAKE_ALARM = 1 << linux_raw_sys::general::CAP_WAKE_ALARM; + /// `CAP_BLOCK_SUSPEND` + const BLOCK_SUSPEND = 1 << linux_raw_sys::general::CAP_BLOCK_SUSPEND; + /// `CAP_AUDIT_READ` + const AUDIT_READ = 1 << linux_raw_sys::general::CAP_AUDIT_READ; + /// `CAP_PERFMON` + const PERFMON = 1 << linux_raw_sys::general::CAP_PERFMON; + /// `CAP_BPF` + const BPF = 1 << linux_raw_sys::general::CAP_BPF; + /// `CAP_CHECKPOINT_RESTORE` + const CHECKPOINT_RESTORE = 1 << linux_raw_sys::general::CAP_CHECKPOINT_RESTORE; + + /// + const _ = !0; + } +} + +/// `capget(_LINUX_CAPABILITY_VERSION_3, pid)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/capget.2.html +#[inline] +#[doc(alias = "capget")] +pub fn capabilities(pid: Option) -> io::Result { + capget(pid) +} + +/// `capset(_LINUX_CAPABILITY_VERSION_3, pid, effective, permitted, +/// inheritable)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/capget.2.html +#[inline] +#[doc(alias = "capset")] +pub fn set_capabilities(pid: Option, sets: CapabilitySets) -> io::Result<()> { + capset(pid, sets) +} + +#[inline] +#[allow(unsafe_code)] +fn capget(pid: Option) -> io::Result { + let mut data = [MaybeUninit::::uninit(); 2]; + + let data = { + let mut header = linux_raw_sys::general::__user_cap_header_struct { + version: linux_raw_sys::general::_LINUX_CAPABILITY_VERSION_3, + pid: Pid::as_raw(pid) as backend::c::c_int, + }; + + backend::thread::syscalls::capget(&mut header, &mut data)?; + // SAFETY: v3 is a 64-bit implementation, so the kernel filled in both + // data structs. + unsafe { (data[0].assume_init(), data[1].assume_init()) } + }; + + let effective = u64::from(data.0.effective) | (u64::from(data.1.effective) << u32::BITS); + let permitted = u64::from(data.0.permitted) | (u64::from(data.1.permitted) << u32::BITS); + let inheritable = u64::from(data.0.inheritable) | (u64::from(data.1.inheritable) << u32::BITS); + + // The kernel returns a partitioned bitset that we just combined above. + Ok(CapabilitySets { + effective: CapabilitySet::from_bits_retain(effective), + permitted: CapabilitySet::from_bits_retain(permitted), + inheritable: CapabilitySet::from_bits_retain(inheritable), + }) +} + +#[inline] +fn capset(pid: Option, sets: CapabilitySets) -> io::Result<()> { + let mut header = linux_raw_sys::general::__user_cap_header_struct { + version: linux_raw_sys::general::_LINUX_CAPABILITY_VERSION_3, + pid: Pid::as_raw(pid) as backend::c::c_int, + }; + let data = [ + linux_raw_sys::general::__user_cap_data_struct { + effective: sets.effective.bits() as u32, + permitted: sets.permitted.bits() as u32, + inheritable: sets.inheritable.bits() as u32, + }, + linux_raw_sys::general::__user_cap_data_struct { + effective: (sets.effective.bits() >> u32::BITS) as u32, + permitted: (sets.permitted.bits() >> u32::BITS) as u32, + inheritable: (sets.inheritable.bits() >> u32::BITS) as u32, + }, + ]; + + backend::thread::syscalls::capset(&mut header, &data) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/membarrier.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/membarrier.rs new file mode 100644 index 0000000000000000000000000000000000000000..b3e6508e5cd4365620b2ba6621476cbae6cb4226 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/membarrier.rs @@ -0,0 +1,92 @@ +//! The Linux `membarrier` syscall. + +use crate::thread::Cpuid; +use crate::{backend, io}; + +pub use backend::thread::types::MembarrierCommand; + +#[cfg(linux_kernel)] +bitflags::bitflags! { + /// A result from [`membarrier_query`]. + /// + /// These flags correspond to values of [`MembarrierCommand`] which are + /// supported in the OS. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct MembarrierQuery: u32 { + /// `MEMBARRIER_CMD_GLOBAL` (also known as `MEMBARRIER_CMD_SHARED`) + #[doc(alias = "SHARED")] + #[doc(alias = "MEMBARRIER_CMD_SHARED")] + const GLOBAL = MembarrierCommand::Global as _; + /// `MEMBARRIER_CMD_GLOBAL_EXPEDITED` + const GLOBAL_EXPEDITED = MembarrierCommand::GlobalExpedited as _; + /// `MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED` + const REGISTER_GLOBAL_EXPEDITED = MembarrierCommand::RegisterGlobalExpedited as _; + /// `MEMBARRIER_CMD_PRIVATE_EXPEDITED` + const PRIVATE_EXPEDITED = MembarrierCommand::PrivateExpedited as _; + /// `MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED` + const REGISTER_PRIVATE_EXPEDITED = MembarrierCommand::RegisterPrivateExpedited as _; + /// `MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE` + const PRIVATE_EXPEDITED_SYNC_CORE = MembarrierCommand::PrivateExpeditedSyncCore as _; + /// `MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE` + const REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = MembarrierCommand::RegisterPrivateExpeditedSyncCore as _; + /// `MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ` (since Linux 5.10) + const PRIVATE_EXPEDITED_RSEQ = MembarrierCommand::PrivateExpeditedRseq as _; + /// `MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ` (since Linux 5.10) + const REGISTER_PRIVATE_EXPEDITED_RSEQ = MembarrierCommand::RegisterPrivateExpeditedRseq as _; + + /// + const _ = !0; + } +} + +#[cfg(linux_kernel)] +impl MembarrierQuery { + /// Test whether this query result contains the given command. + #[inline] + pub fn contains_command(self, cmd: MembarrierCommand) -> bool { + // `MembarrierCommand` is an enum that only contains values also valid + // in `MembarrierQuery`. + self.contains(Self::from_bits_retain(cmd as _)) + } +} + +/// `membarrier(MEMBARRIER_CMD_QUERY, 0, 0)`—Query the supported `membarrier` +/// commands. +/// +/// This function doesn't return a `Result` because it always succeeds; if the +/// underlying OS doesn't support the `membarrier` syscall, it returns an empty +/// `MembarrierQuery` value. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/membarrier.2.html +#[inline] +#[doc(alias = "MEMBARRIER_CMD_QUERY")] +pub fn membarrier_query() -> MembarrierQuery { + backend::thread::syscalls::membarrier_query() +} + +/// `membarrier(cmd, 0, 0)`—Perform a memory barrier. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/membarrier.2.html +#[inline] +pub fn membarrier(cmd: MembarrierCommand) -> io::Result<()> { + backend::thread::syscalls::membarrier(cmd) +} + +/// `membarrier(cmd, MEMBARRIER_CMD_FLAG_CPU, cpu)`—Perform a memory barrier +/// with a specific CPU. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/membarrier.2.html +#[inline] +pub fn membarrier_cpu(cmd: MembarrierCommand, cpu: Cpuid) -> io::Result<()> { + backend::thread::syscalls::membarrier_cpu(cmd, cpu) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..26d1de427158e1e4899b4c712c09a62cf93c2798 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/mod.rs @@ -0,0 +1,37 @@ +//! Thread-associated operations. + +#[cfg(not(target_os = "redox"))] +mod clock; +#[cfg(linux_kernel)] +pub mod futex; +#[cfg(linux_kernel)] +mod id; +#[cfg(linux_kernel)] +mod libcap; +#[cfg(linux_kernel)] +mod membarrier; +#[cfg(linux_kernel)] +mod prctl; +#[cfg(any(freebsdlike, linux_kernel, target_os = "fuchsia"))] +mod sched; +mod sched_yield; +#[cfg(linux_kernel)] +mod setns; + +#[cfg(not(target_os = "redox"))] +pub use clock::*; +#[cfg(linux_kernel)] +pub use id::*; +#[cfg(linux_kernel)] +// #[expect(deprecated, reason = "CapabilityFlags is deprecated")] +#[allow(deprecated)] +pub use libcap::{capabilities, set_capabilities, CapabilityFlags, CapabilitySet, CapabilitySets}; +#[cfg(linux_kernel)] +pub use membarrier::*; +#[cfg(linux_kernel)] +pub use prctl::*; +#[cfg(any(freebsdlike, linux_kernel, target_os = "fuchsia"))] +pub use sched::*; +pub use sched_yield::sched_yield; +#[cfg(linux_kernel)] +pub use setns::*; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/prctl.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/prctl.rs new file mode 100644 index 0000000000000000000000000000000000000000..ad6def3ff56b5e24e98a84bc9145ffb8b03737f5 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/prctl.rs @@ -0,0 +1,1130 @@ +//! Linux `prctl` wrappers. +//! +//! Rustix wraps variadic/dynamic-dispatch functions like `prctl` in type-safe +//! wrappers. +//! +//! # Safety +//! +//! The inner `prctl` calls are dynamically typed and must be called correctly. +#![allow(unsafe_code)] + +use core::mem::MaybeUninit; +use core::num::NonZeroU64; +use core::ptr; +use core::ptr::NonNull; +use core::sync::atomic::AtomicU8; + +use bitflags::bitflags; + +use crate::backend::prctl::syscalls; +#[cfg(feature = "alloc")] +use crate::ffi::CString; +use crate::ffi::{c_int, c_uint, c_void, CStr}; +use crate::io; +use crate::io::Errno; +use crate::pid::Pid; +#[cfg(linux_raw_dep)] +use crate::prctl::PointerAuthenticationKeys; +use crate::prctl::{prctl_1arg, prctl_2args, prctl_3args, prctl_get_at_arg2_optional}; +use crate::utils::as_ptr; + +use super::CapabilitySet; + +// +// PR_GET_KEEPCAPS/PR_SET_KEEPCAPS +// + +const PR_GET_KEEPCAPS: c_int = 7; + +/// Get the current state of the calling thread's `keep capabilities` flag. +/// +/// # References +/// - [`prctl(PR_GET_KEEPCAPS,…)`] +/// +/// [`prctl(PR_GET_KEEPCAPS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn get_keep_capabilities() -> io::Result { + unsafe { prctl_1arg(PR_GET_KEEPCAPS) }.map(|r| r != 0) +} + +const PR_SET_KEEPCAPS: c_int = 8; + +/// Set the state of the calling thread's `keep capabilities` flag. +/// +/// # References +/// - [`prctl(PR_SET_KEEPCAPS,…)`] +/// +/// [`prctl(PR_SET_KEEPCAPS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn set_keep_capabilities(enable: bool) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_KEEPCAPS, usize::from(enable) as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_NAME/PR_SET_NAME +// + +#[cfg(feature = "alloc")] +const PR_GET_NAME: c_int = 16; + +/// Get the name of the calling thread. +/// +/// # References +/// - [`prctl(PR_GET_NAME,…)`] +/// +/// [`prctl(PR_GET_NAME,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[cfg(feature = "alloc")] +#[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] +pub fn name() -> io::Result { + let mut buffer = [0_u8; 16]; + unsafe { prctl_2args(PR_GET_NAME, buffer.as_mut_ptr().cast())? }; + + let len = buffer.iter().position(|&x| x == 0_u8).unwrap_or(0); + CString::new(&buffer[..len]).map_err(|_r| io::Errno::ILSEQ) +} + +const PR_SET_NAME: c_int = 15; + +/// Set the name of the calling thread. +/// +/// Unlike `pthread_setname_np`, this function silently truncates the name to +/// 16 bytes, as the Linux syscall does. +/// +/// # References +/// - [`prctl(PR_SET_NAME,…)`] +/// +/// [`prctl(PR_SET_NAME,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn set_name(name: &CStr) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_NAME, name.as_ptr() as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_SECCOMP/PR_SET_SECCOMP +// + +const PR_GET_SECCOMP: c_int = 21; + +const SECCOMP_MODE_DISABLED: i32 = 0; +const SECCOMP_MODE_STRICT: i32 = 1; +const SECCOMP_MODE_FILTER: i32 = 2; + +/// `SECCOMP_MODE_*` +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(i32)] +pub enum SecureComputingMode { + /// Secure computing is not in use. + Disabled = SECCOMP_MODE_DISABLED, + /// Use hard-coded filter. + Strict = SECCOMP_MODE_STRICT, + /// Use user-supplied filter. + Filter = SECCOMP_MODE_FILTER, +} + +impl TryFrom for SecureComputingMode { + type Error = io::Errno; + + fn try_from(value: i32) -> Result { + match value { + SECCOMP_MODE_DISABLED => Ok(Self::Disabled), + SECCOMP_MODE_STRICT => Ok(Self::Strict), + SECCOMP_MODE_FILTER => Ok(Self::Filter), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get the secure computing mode of the calling thread. +/// +/// If the caller is not in secure computing mode, this returns +/// [`SecureComputingMode::Disabled`]. If the caller is in strict secure +/// computing mode, then this call will cause a [`Signal::KILL`] signal to be +/// sent to the process. If the caller is in filter mode, and this system call +/// is allowed by the seccomp filters, it returns +/// [`SecureComputingMode::Filter`]; otherwise, the process is killed with a +/// [`Signal::KILL`] signal. +/// +/// Since Linux 3.8, the Seccomp field of the `/proc/[pid]/status` file +/// provides a method of obtaining the same information, without the risk that +/// the process is killed; see [the `proc` manual page]. +/// +/// # References +/// - [`prctl(PR_GET_SECCOMP,…)`] +/// +/// [`Signal::KILL`]: crate::signal::Signal::KILL +/// [`prctl(PR_GET_SECCOMP,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [the `proc` manual page]: https://man7.org/linux/man-pages/man5/proc.5.html +#[inline] +pub fn secure_computing_mode() -> io::Result { + unsafe { prctl_1arg(PR_GET_SECCOMP) }.and_then(TryInto::try_into) +} + +const PR_SET_SECCOMP: c_int = 22; + +/// Set the secure computing mode for the calling thread, to limit the +/// available system calls. +/// +/// # References +/// - [`prctl(PR_SET_SECCOMP,…)`] +/// +/// [`prctl(PR_SET_SECCOMP,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn set_secure_computing_mode(mode: SecureComputingMode) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_SECCOMP, mode as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_CAPBSET_READ/PR_CAPBSET_DROP +// + +const PR_CAPBSET_READ: c_int = 23; + +/// Linux per-thread capability. +#[deprecated(since = "1.1.0", note = "Use CapabilitySet with a single bit instead")] +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +#[non_exhaustive] +pub enum Capability { + /// In a system with the `_POSIX_CHOWN_RESTRICTED` option defined, this + /// overrides the restriction of changing file ownership and group + /// ownership. + ChangeOwnership = linux_raw_sys::general::CAP_CHOWN, + /// Override all DAC access, including ACL execute access if `_POSIX_ACL` + /// is defined. Excluding DAC access covered by + /// [`Capability::LinuxImmutable`]. + DACOverride = linux_raw_sys::general::CAP_DAC_OVERRIDE, + /// Overrides all DAC restrictions regarding read and search on files and + /// directories, including ACL restrictions if `_POSIX_ACL` is defined. + /// Excluding DAC access covered by [`Capability::LinuxImmutable`]. + DACReadSearch = linux_raw_sys::general::CAP_DAC_READ_SEARCH, + /// Overrides all restrictions about allowed operations on files, where + /// file owner ID must be equal to the user ID, except where + /// [`Capability::FileSetID`] is applicable. It doesn't override MAC and + /// DAC restrictions. + FileOwner = linux_raw_sys::general::CAP_FOWNER, + /// Overrides the following restrictions that the effective user ID shall + /// match the file owner ID when setting the `S_ISUID` and `S_ISGID` bits + /// on that file; that the effective group ID (or one of the supplementary + /// group IDs) shall match the file owner ID when setting the `S_ISGID` bit + /// on that file; that the `S_ISUID` and `S_ISGID` bits are cleared on + /// successful return from `chown` (not implemented). + FileSetID = linux_raw_sys::general::CAP_FSETID, + /// Overrides the restriction that the real or effective user ID of a + /// process sending a signal must match the real or effective user ID of + /// the process receiving the signal. + Kill = linux_raw_sys::general::CAP_KILL, + /// Allows `setgid` manipulation. Allows `setgroups`. Allows forged gids on + /// socket credentials passing. + SetGroupID = linux_raw_sys::general::CAP_SETGID, + /// Allows `set*uid` manipulation (including fsuid). Allows forged pids on + /// socket credentials passing. + SetUserID = linux_raw_sys::general::CAP_SETUID, + /// Without VFS support for capabilities: + /// - Transfer any capability in your permitted set to any pid. + /// - remove any capability in your permitted set from any pid. With VFS + /// support for capabilities (neither of above, but) + /// - Add any capability from current's capability bounding set to the + /// current process' inheritable set. + /// - Allow taking bits out of capability bounding set. + /// - Allow modification of the securebits for a process. + SetPermittedCapabilities = linux_raw_sys::general::CAP_SETPCAP, + /// Allow modification of `S_IMMUTABLE` and `S_APPEND` file attributes. + LinuxImmutable = linux_raw_sys::general::CAP_LINUX_IMMUTABLE, + /// Allows binding to TCP/UDP sockets below 1024. Allows binding to ATM + /// VCIs below 32. + NetBindService = linux_raw_sys::general::CAP_NET_BIND_SERVICE, + /// Allow broadcasting, listen to multicast. + NetBroadcast = linux_raw_sys::general::CAP_NET_BROADCAST, + /// Allow interface configuration. Allow administration of IP firewall, + /// masquerading and accounting. Allow setting debug option on sockets. + /// Allow modification of routing tables. Allow setting arbitrary + /// process / process group ownership on sockets. Allow binding to any + /// address for transparent proxying (also via [`Capability::NetRaw`]). + /// Allow setting TOS (type of service). Allow setting promiscuous + /// mode. Allow clearing driver statistics. Allow multicasting. Allow + /// read/write of device-specific registers. Allow activation of ATM + /// control sockets. + NetAdmin = linux_raw_sys::general::CAP_NET_ADMIN, + /// Allow use of `RAW` sockets. Allow use of `PACKET` sockets. Allow + /// binding to any address for transparent proxying (also via + /// [`Capability::NetAdmin`]). + NetRaw = linux_raw_sys::general::CAP_NET_RAW, + /// Allow locking of shared memory segments. Allow mlock and mlockall + /// (which doesn't really have anything to do with IPC). + IPCLock = linux_raw_sys::general::CAP_IPC_LOCK, + /// Override IPC ownership checks. + IPCOwner = linux_raw_sys::general::CAP_IPC_OWNER, + /// Insert and remove kernel modules - modify kernel without limit. + SystemModule = linux_raw_sys::general::CAP_SYS_MODULE, + /// Allow ioperm/iopl access. Allow sending USB messages to any device via + /// `/dev/bus/usb`. + SystemRawIO = linux_raw_sys::general::CAP_SYS_RAWIO, + /// Allow use of `chroot`. + SystemChangeRoot = linux_raw_sys::general::CAP_SYS_CHROOT, + /// Allow `ptrace` of any process. + SystemProcessTrace = linux_raw_sys::general::CAP_SYS_PTRACE, + /// Allow configuration of process accounting. + SystemProcessAccounting = linux_raw_sys::general::CAP_SYS_PACCT, + /// Allow configuration of the secure attention key. Allow administration + /// of the random device. Allow examination and configuration of disk + /// quotas. Allow setting the domainname. Allow setting the hostname. + /// Allow `mount` and `umount`, setting up new smb connection. + /// Allow some autofs root ioctls. Allow nfsservctl. Allow + /// `VM86_REQUEST_IRQ`. Allow to read/write pci config on alpha. Allow + /// `irix_prctl` on mips (setstacksize). Allow flushing all cache on + /// m68k (`sys_cacheflush`). Allow removing semaphores. Used instead of + /// [`Capability::ChangeOwnership`] to "chown" IPC message queues, + /// semaphores and shared memory. Allow locking/unlocking of shared + /// memory segment. Allow turning swap on/off. Allow forged pids on + /// socket credentials passing. Allow setting readahead and + /// flushing buffers on block devices. Allow setting geometry in floppy + /// driver. Allow turning DMA on/off in `xd` driver. Allow + /// administration of md devices (mostly the above, but some + /// extra ioctls). Allow tuning the ide driver. Allow access to the nvram + /// device. Allow administration of `apm_bios`, serial and bttv (TV) + /// device. Allow manufacturer commands in isdn CAPI support driver. + /// Allow reading non-standardized portions of pci configuration space. + /// Allow DDI debug ioctl on sbpcd driver. Allow setting up serial ports. + /// Allow sending raw qic-117 commands. Allow enabling/disabling tagged + /// queuing on SCSI controllers and sending arbitrary SCSI commands. + /// Allow setting encryption key on loopback filesystem. Allow setting + /// zone reclaim policy. Allow everything under + /// [`Capability::BerkeleyPacketFilters`] and + /// [`Capability::PerformanceMonitoring`] for backward compatibility. + SystemAdmin = linux_raw_sys::general::CAP_SYS_ADMIN, + /// Allow use of `reboot`. + SystemBoot = linux_raw_sys::general::CAP_SYS_BOOT, + /// Allow raising priority and setting priority on other (different UID) + /// processes. Allow use of FIFO and round-robin (realtime) scheduling + /// on own processes and setting the scheduling algorithm used by + /// another process. Allow setting cpu affinity on other processes. + /// Allow setting realtime ioprio class. Allow setting ioprio class on + /// other processes. + SystemNice = linux_raw_sys::general::CAP_SYS_NICE, + /// Override resource limits. Set resource limits. Override quota limits. + /// Override reserved space on ext2 filesystem. Modify data journaling + /// mode on ext3 filesystem (uses journaling resources). NOTE: ext2 + /// honors fsuid when checking for resource overrides, so you can + /// override using fsuid too. Override size restrictions on IPC message + /// queues. Allow more than 64hz interrupts from the real-time clock. + /// Override max number of consoles on console allocation. Override max + /// number of keymaps. Control memory reclaim behavior. + SystemResource = linux_raw_sys::general::CAP_SYS_RESOURCE, + /// Allow manipulation of system clock. Allow `irix_stime` on mips. Allow + /// setting the real-time clock. + SystemTime = linux_raw_sys::general::CAP_SYS_TIME, + /// Allow configuration of tty devices. Allow `vhangup` of tty. + SystemTTYConfig = linux_raw_sys::general::CAP_SYS_TTY_CONFIG, + /// Allow the privileged aspects of `mknod`. + MakeNode = linux_raw_sys::general::CAP_MKNOD, + /// Allow taking of leases on files. + Lease = linux_raw_sys::general::CAP_LEASE, + /// Allow writing the audit log via unicast netlink socket. + AuditWrite = linux_raw_sys::general::CAP_AUDIT_WRITE, + /// Allow configuration of audit via unicast netlink socket. + AuditControl = linux_raw_sys::general::CAP_AUDIT_CONTROL, + /// Set or remove capabilities on files. Map `uid=0` into a child user + /// namespace. + SetFileCapabilities = linux_raw_sys::general::CAP_SETFCAP, + /// Override MAC access. The base kernel enforces no MAC policy. An LSM may + /// enforce a MAC policy, and if it does and it chooses to implement + /// capability based overrides of that policy, this is the capability it + /// should use to do so. + MACOverride = linux_raw_sys::general::CAP_MAC_OVERRIDE, + /// Allow MAC configuration or state changes. The base kernel requires no + /// MAC configuration. An LSM may enforce a MAC policy, and if it does and + /// it chooses to implement capability based checks on modifications to + /// that policy or the data required to maintain it, this is the capability + /// it should use to do so. + MACAdmin = linux_raw_sys::general::CAP_MAC_ADMIN, + /// Allow configuring the kernel's `syslog` (`printk` behaviour). + SystemLog = linux_raw_sys::general::CAP_SYSLOG, + /// Allow triggering something that will wake the system. + WakeAlarm = linux_raw_sys::general::CAP_WAKE_ALARM, + /// Allow preventing system suspends. + BlockSuspend = linux_raw_sys::general::CAP_BLOCK_SUSPEND, + /// Allow reading the audit log via multicast netlink socket. + AuditRead = linux_raw_sys::general::CAP_AUDIT_READ, + /// Allow system performance and observability privileged operations using + /// `perf_events`, `i915_perf` and other kernel subsystems. + PerformanceMonitoring = linux_raw_sys::general::CAP_PERFMON, + /// This capability allows the following BPF operations: + /// - Creating all types of BPF maps + /// - Advanced verifier features + /// - Indirect variable access + /// - Bounded loops + /// - BPF to BPF function calls + /// - Scalar precision tracking + /// - Larger complexity limits + /// - Dead code elimination + /// - And potentially other features + /// - Loading BPF Type Format (BTF) data + /// - Retrieve `xlated` and JITed code of BPF programs + /// - Use `bpf_spin_lock` helper + /// + /// [`Capability::PerformanceMonitoring`] relaxes the verifier checks + /// further: + /// - BPF progs can use of pointer-to-integer conversions + /// - speculation attack hardening measures are bypassed + /// - `bpf_probe_read` to read arbitrary kernel memory is allowed + /// - `bpf_trace_printk` to print kernel memory is allowed + /// + /// [`Capability::SystemAdmin`] is required to use `bpf_probe_write_user`. + /// + /// [`Capability::SystemAdmin`] is required to iterate system-wide loaded + /// programs, maps, links, and BTFs, and convert their IDs to file + /// descriptors. + /// + /// [`Capability::PerformanceMonitoring`] and + /// [`Capability::BerkeleyPacketFilters`] are required to load tracing + /// programs. [`Capability::NetAdmin`] and + /// [`Capability::BerkeleyPacketFilters`] are required to load + /// networking programs. + BerkeleyPacketFilters = linux_raw_sys::general::CAP_BPF, + /// Allow checkpoint/restore related operations. Allow PID selection during + /// `clone3`. Allow writing to `ns_last_pid`. + CheckpointRestore = linux_raw_sys::general::CAP_CHECKPOINT_RESTORE, +} + +mod private { + pub trait Sealed {} + pub struct Token; + + #[allow(deprecated)] + impl Sealed for crate::thread::Capability {} + impl Sealed for crate::thread::CapabilitySet {} +} +/// Compatibility trait to keep existing code that uses the deprecated [`Capability`] type working. +/// +/// This trait and its methods are sealed. It must not be used downstream. +pub trait CompatCapability: private::Sealed + Copy { + #[doc(hidden)] + fn as_capability_set(self, _: private::Token) -> CapabilitySet; +} +#[allow(deprecated)] +impl CompatCapability for Capability { + fn as_capability_set(self, _: private::Token) -> CapabilitySet { + match self { + Self::ChangeOwnership => CapabilitySet::CHOWN, + Self::DACOverride => CapabilitySet::DAC_OVERRIDE, + Self::DACReadSearch => CapabilitySet::DAC_READ_SEARCH, + Self::FileOwner => CapabilitySet::FOWNER, + Self::FileSetID => CapabilitySet::FSETID, + Self::Kill => CapabilitySet::KILL, + Self::SetGroupID => CapabilitySet::SETGID, + Self::SetUserID => CapabilitySet::SETUID, + Self::SetPermittedCapabilities => CapabilitySet::SETPCAP, + Self::LinuxImmutable => CapabilitySet::LINUX_IMMUTABLE, + Self::NetBindService => CapabilitySet::NET_BIND_SERVICE, + Self::NetBroadcast => CapabilitySet::NET_BROADCAST, + Self::NetAdmin => CapabilitySet::NET_ADMIN, + Self::NetRaw => CapabilitySet::NET_RAW, + Self::IPCLock => CapabilitySet::IPC_LOCK, + Self::IPCOwner => CapabilitySet::IPC_OWNER, + Self::SystemModule => CapabilitySet::SYS_MODULE, + Self::SystemRawIO => CapabilitySet::SYS_RAWIO, + Self::SystemChangeRoot => CapabilitySet::SYS_CHROOT, + Self::SystemProcessTrace => CapabilitySet::SYS_PTRACE, + Self::SystemProcessAccounting => CapabilitySet::SYS_PACCT, + Self::SystemAdmin => CapabilitySet::SYS_ADMIN, + Self::SystemBoot => CapabilitySet::SYS_BOOT, + Self::SystemNice => CapabilitySet::SYS_NICE, + Self::SystemResource => CapabilitySet::SYS_RESOURCE, + Self::SystemTime => CapabilitySet::SYS_TIME, + Self::SystemTTYConfig => CapabilitySet::SYS_TTY_CONFIG, + Self::MakeNode => CapabilitySet::MKNOD, + Self::Lease => CapabilitySet::LEASE, + Self::AuditWrite => CapabilitySet::AUDIT_WRITE, + Self::AuditControl => CapabilitySet::AUDIT_CONTROL, + Self::SetFileCapabilities => CapabilitySet::SETFCAP, + Self::MACOverride => CapabilitySet::MAC_OVERRIDE, + Self::MACAdmin => CapabilitySet::MAC_ADMIN, + Self::SystemLog => CapabilitySet::SYSLOG, + Self::WakeAlarm => CapabilitySet::WAKE_ALARM, + Self::BlockSuspend => CapabilitySet::BLOCK_SUSPEND, + Self::AuditRead => CapabilitySet::AUDIT_READ, + Self::PerformanceMonitoring => CapabilitySet::PERFMON, + Self::BerkeleyPacketFilters => CapabilitySet::BPF, + Self::CheckpointRestore => CapabilitySet::CHECKPOINT_RESTORE, + } + } +} +impl CompatCapability for CapabilitySet { + fn as_capability_set(self, _: private::Token) -> CapabilitySet { + self + } +} + +/// Check if the specified capability is in the calling thread's capability +/// bounding set. +/// +/// # References +/// - [`prctl(PR_CAPBSET_READ,…)`] +/// +/// [`prctl(PR_CAPBSET_READ,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn capability_is_in_bounding_set(capability: impl CompatCapability) -> io::Result { + let capset = capability.as_capability_set(private::Token).bits(); + if capset.count_ones() != 1 { + return Err(Errno::INVAL); + } + let cap = capset.trailing_zeros(); + + // as *mut _ should be ptr::without_provenance_mut but our MSRV does not allow it. + unsafe { prctl_2args(PR_CAPBSET_READ, cap as usize as *mut _) }.map(|r| r != 0) +} + +const PR_CAPBSET_DROP: c_int = 24; + +/// If the calling thread has the [`Capability::SetPermittedCapabilities`] +/// capability within its user namespace, then drop the specified capability +/// from the thread's capability bounding set. +/// +/// # References +/// - [`prctl(PR_CAPBSET_DROP,…)`] +/// +/// [`prctl(PR_CAPBSET_DROP,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn remove_capability_from_bounding_set(capability: impl CompatCapability) -> io::Result<()> { + let capset = capability.as_capability_set(private::Token).bits(); + if capset.count_ones() != 1 { + return Err(Errno::INVAL); + } + let cap = capset.trailing_zeros(); + + // as *mut _ should be ptr::without_provenance_mut but our MSRV does not allow it. + unsafe { prctl_2args(PR_CAPBSET_DROP, cap as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_SECUREBITS/PR_SET_SECUREBITS +// + +const PR_GET_SECUREBITS: c_int = 27; + +bitflags! { + /// `SECBIT_*` + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct CapabilitiesSecureBits: u32 { + /// If this bit is set, then the kernel does not grant capabilities + /// when a `set-user-ID-root` program is executed, or when a process + /// with an effective or real UID of [`Uid::ROOT`] calls `execve`. + const NO_ROOT = 1_u32 << 0; + /// Set [`NO_ROOT`] irreversibly. + /// + /// [`NO_ROOT`]: Self::NO_ROOT + const NO_ROOT_LOCKED = 1_u32 << 1; + /// Setting this flag stops the kernel from adjusting the process' + /// permitted, effective, and ambient capability sets when the thread's + /// effective and filesystem UIDs are switched between zero and nonzero + /// values. + const NO_SETUID_FIXUP = 1_u32 << 2; + /// Set [`NO_SETUID_FIXUP`] irreversibly. + /// + /// [`NO_SETUID_FIXUP`]: Self::NO_SETUID_FIXUP + const NO_SETUID_FIXUP_LOCKED = 1_u32 << 3; + /// Setting this flag allows a thread that has one or more 0 UIDs to + /// retain capabilities in its permitted set when it switches all of + /// its UIDs to nonzero values. + const KEEP_CAPS = 1_u32 << 4; + /// Set [`KEEP_CAPS`] irreversibly. + /// + /// [`KEEP_CAPS`]: Self::KEEP_CAPS + const KEEP_CAPS_LOCKED = 1_u32 << 5; + /// Setting this flag disallows raising ambient capabilities via the + /// `prctl`'s `PR_CAP_AMBIENT_RAISE` operation. + const NO_CAP_AMBIENT_RAISE = 1_u32 << 6; + /// Set [`NO_CAP_AMBIENT_RAISE`] irreversibly. + /// + /// [`NO_CAP_AMBIENT_RAISE`]: Self::NO_CAP_AMBIENT_RAISE + const NO_CAP_AMBIENT_RAISE_LOCKED = 1_u32 << 7; + + /// + const _ = !0; + } +} + +/// Get the `securebits` flags of the calling thread. +/// +/// # References +/// - [`prctl(PR_GET_SECUREBITS,…)`] +/// +/// [`prctl(PR_GET_SECUREBITS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn capabilities_secure_bits() -> io::Result { + let r = unsafe { prctl_1arg(PR_GET_SECUREBITS)? } as c_uint; + CapabilitiesSecureBits::from_bits(r).ok_or(io::Errno::RANGE) +} + +const PR_SET_SECUREBITS: c_int = 28; + +/// Set the `securebits` flags of the calling thread. +/// +/// # References +/// - [`prctl(PR_SET_SECUREBITS,…)`] +/// +/// [`prctl(PR_SET_SECUREBITS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn set_capabilities_secure_bits(bits: CapabilitiesSecureBits) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_SECUREBITS, bits.bits() as usize as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_TIMERSLACK/PR_SET_TIMERSLACK +// + +const PR_GET_TIMERSLACK: c_int = 30; + +/// Get the `current` timer slack value of the calling thread. +/// +/// # References +/// - [`prctl(PR_GET_TIMERSLACK,…)`] +/// +/// [`prctl(PR_GET_TIMERSLACK,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn current_timer_slack() -> io::Result { + unsafe { prctl_1arg(PR_GET_TIMERSLACK) }.map(|r| r as u64) +} + +const PR_SET_TIMERSLACK: c_int = 29; + +/// Sets the `current` timer slack value for the calling thread. +/// +/// # References +/// - [`prctl(PR_SET_TIMERSLACK,…)`] +/// +/// [`prctl(PR_SET_TIMERSLACK,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn set_current_timer_slack(value: Option) -> io::Result<()> { + let value = usize::try_from(value.map_or(0, NonZeroU64::get)).map_err(|_r| io::Errno::RANGE)?; + unsafe { prctl_2args(PR_SET_TIMERSLACK, value as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_NO_NEW_PRIVS/PR_SET_NO_NEW_PRIVS +// + +const PR_GET_NO_NEW_PRIVS: c_int = 39; + +/// Get the value of the `no_new_privs` attribute for the calling thread. +/// +/// # References +/// - [`prctl(PR_GET_NO_NEW_PRIVS,…)`] +/// +/// [`prctl(PR_GET_NO_NEW_PRIVS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn no_new_privs() -> io::Result { + unsafe { prctl_1arg(PR_GET_NO_NEW_PRIVS) }.map(|r| r != 0) +} + +const PR_SET_NO_NEW_PRIVS: c_int = 38; + +/// Set the calling thread's `no_new_privs` attribute. +/// +/// # References +/// - [`prctl(PR_SET_NO_NEW_PRIVS,…)`] +/// +/// [`prctl(PR_SET_NO_NEW_PRIVS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn set_no_new_privs(no_new_privs: bool) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_NO_NEW_PRIVS, usize::from(no_new_privs) as *mut _) }.map(|_r| ()) +} + +// +// PR_GET_TID_ADDRESS +// + +const PR_GET_TID_ADDRESS: c_int = 40; + +/// Get the `clear_child_tid` address set by `set_tid_address` +/// and `clone`'s `CLONE_CHILD_CLEARTID` flag. +/// +/// # References +/// - [`prctl(PR_GET_TID_ADDRESS,…)`] +/// +/// [`prctl(PR_GET_TID_ADDRESS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn get_clear_child_tid_address() -> io::Result>> { + unsafe { prctl_get_at_arg2_optional::<*mut c_void>(PR_GET_TID_ADDRESS) }.map(NonNull::new) +} + +// +// PR_GET_THP_DISABLE/PR_SET_THP_DISABLE +// + +const PR_GET_THP_DISABLE: c_int = 42; + +/// Get the current setting of the `THP disable` flag for the calling thread. +/// +/// # References +/// - [`prctl(PR_GET_THP_DISABLE,…)`] +/// +/// [`prctl(PR_GET_THP_DISABLE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn transparent_huge_pages_are_disabled() -> io::Result { + unsafe { prctl_1arg(PR_GET_THP_DISABLE) }.map(|r| r != 0) +} + +const PR_SET_THP_DISABLE: c_int = 41; + +/// Set the state of the `THP disable` flag for the calling thread. +/// +/// # References +/// - [`prctl(PR_SET_THP_DISABLE,…)`] +/// +/// [`prctl(PR_SET_THP_DISABLE,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn disable_transparent_huge_pages(thp_disable: bool) -> io::Result<()> { + unsafe { prctl_2args(PR_SET_THP_DISABLE, usize::from(thp_disable) as *mut _) }.map(|_r| ()) +} + +// +// PR_CAP_AMBIENT +// + +const PR_CAP_AMBIENT: c_int = 47; + +const PR_CAP_AMBIENT_IS_SET: usize = 1; + +/// Check if the specified capability is in the ambient set. +/// +/// # References +/// - [`prctl(PR_CAP_AMBIENT,PR_CAP_AMBIENT_IS_SET,…)`] +/// +/// [`prctl(PR_CAP_AMBIENT,PR_CAP_AMBIENT_IS_SET,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn capability_is_in_ambient_set(capability: impl CompatCapability) -> io::Result { + let capset = capability.as_capability_set(private::Token).bits(); + if capset.count_ones() != 1 { + return Err(Errno::INVAL); + } + let cap = capset.trailing_zeros(); + + unsafe { + prctl_3args( + PR_CAP_AMBIENT, + PR_CAP_AMBIENT_IS_SET as *mut _, + // as *mut _ should be ptr::without_provenance_mut but our MSRV does not allow it. + cap as usize as *mut _, + ) + } + .map(|r| r != 0) +} + +const PR_CAP_AMBIENT_CLEAR_ALL: usize = 4; + +/// Remove all capabilities from the ambient set. +/// +/// # References +/// - [`prctl(PR_CAP_AMBIENT,PR_CAP_AMBIENT_CLEAR_ALL,…)`] +/// +/// [`prctl(PR_CAP_AMBIENT,PR_CAP_AMBIENT_CLEAR_ALL,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn clear_ambient_capability_set() -> io::Result<()> { + unsafe { prctl_2args(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL as *mut _) }.map(|_r| ()) +} + +const PR_CAP_AMBIENT_RAISE: usize = 2; +const PR_CAP_AMBIENT_LOWER: usize = 3; + +/// Add or remove the specified capability to the ambient set. +/// +/// # References +/// - [`prctl(PR_CAP_AMBIENT,…)`] +/// +/// [`prctl(PR_CAP_AMBIENT,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn configure_capability_in_ambient_set( + capability: impl CompatCapability, + enable: bool, +) -> io::Result<()> { + let sub_operation = if enable { + PR_CAP_AMBIENT_RAISE + } else { + PR_CAP_AMBIENT_LOWER + }; + let capset = capability.as_capability_set(private::Token).bits(); + if capset.count_ones() != 1 { + return Err(Errno::INVAL); + } + let cap = capset.trailing_zeros(); + + unsafe { + prctl_3args( + PR_CAP_AMBIENT, + sub_operation as *mut _, + // as *mut _ should be ptr::without_provenance_mut but our MSRV does not allow it. + cap as usize as *mut _, + ) + } + .map(|_r| ()) +} + +// +// PR_SVE_GET_VL/PR_SVE_SET_VL +// + +const PR_SVE_GET_VL: c_int = 51; + +const PR_SVE_VL_LEN_MASK: u32 = 0xffff; +const PR_SVE_VL_INHERIT: u32 = 1_u32 << 17; + +/// Scalable Vector Extension vector length configuration. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +pub struct SVEVectorLengthConfig { + /// Vector length in bytes. + pub vector_length_in_bytes: u32, + /// Vector length inherited across `execve`. + pub vector_length_inherited_across_execve: bool, +} + +/// Get the thread's current SVE vector length configuration. +/// +/// # References +/// - [`prctl(PR_SVE_GET_VL,…)`] +/// +/// [`prctl(PR_SVE_GET_VL,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn sve_vector_length_configuration() -> io::Result { + let bits = unsafe { prctl_1arg(PR_SVE_GET_VL)? } as c_uint; + Ok(SVEVectorLengthConfig { + vector_length_in_bytes: bits & PR_SVE_VL_LEN_MASK, + vector_length_inherited_across_execve: (bits & PR_SVE_VL_INHERIT) != 0, + }) +} + +const PR_SVE_SET_VL: c_int = 50; + +const PR_SVE_SET_VL_ONEXEC: u32 = 1_u32 << 18; + +/// Configure the thread's vector length of Scalable Vector Extension. +/// +/// # References +/// - [`prctl(PR_SVE_SET_VL,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, +/// as detailed in the references above. +/// +/// [`prctl(PR_SVE_SET_VL,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub unsafe fn set_sve_vector_length_configuration( + vector_length_in_bytes: usize, + vector_length_inherited_across_execve: bool, + defer_change_to_next_execve: bool, +) -> io::Result<()> { + let vector_length_in_bytes = + u32::try_from(vector_length_in_bytes).map_err(|_r| io::Errno::RANGE)?; + + let mut bits = vector_length_in_bytes & PR_SVE_VL_LEN_MASK; + + if vector_length_inherited_across_execve { + bits |= PR_SVE_VL_INHERIT; + } + + if defer_change_to_next_execve { + bits |= PR_SVE_SET_VL_ONEXEC; + } + + prctl_2args(PR_SVE_SET_VL, bits as usize as *mut _).map(|_r| ()) +} + +// +// PR_PAC_RESET_KEYS +// + +const PR_PAC_RESET_KEYS: c_int = 54; + +/// Securely reset the thread's pointer authentication keys to fresh random +/// values generated by the kernel. +/// +/// # References +/// - [`prctl(PR_PAC_RESET_KEYS,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, +/// as detailed in the references above. +/// +/// [`prctl(PR_PAC_RESET_KEYS,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +#[cfg(linux_raw_dep)] +pub unsafe fn reset_pointer_authentication_keys( + keys: Option, +) -> io::Result<()> { + let keys = keys.as_ref().map_or(0_u32, PointerAuthenticationKeys::bits); + prctl_2args(PR_PAC_RESET_KEYS, keys as usize as *mut _).map(|_r| ()) +} + +// +// PR_GET_TAGGED_ADDR_CTRL/PR_SET_TAGGED_ADDR_CTRL +// + +const PR_GET_TAGGED_ADDR_CTRL: c_int = 56; + +const PR_MTE_TAG_SHIFT: u32 = 3; +const PR_MTE_TAG_MASK: u32 = 0xffff_u32 << PR_MTE_TAG_SHIFT; + +bitflags! { + /// Zero means addresses that are passed for the purpose of being + /// dereferenced by the kernel must be untagged. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct TaggedAddressMode: u32 { + /// Addresses that are passed for the purpose of being dereferenced by + /// the kernel may be tagged. + const ENABLED = 1_u32 << 0; + /// Synchronous tag check fault mode. + const TCF_SYNC = 1_u32 << 1; + /// Asynchronous tag check fault mode. + const TCF_ASYNC = 1_u32 << 2; + + /// + const _ = !0; + } +} + +/// Get the current tagged address mode for the calling thread. +/// +/// # References +/// - [`prctl(PR_GET_TAGGED_ADDR_CTRL,…)`] +/// +/// [`prctl(PR_GET_TAGGED_ADDR_CTRL,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub fn current_tagged_address_mode() -> io::Result<(Option, u32)> { + let r = unsafe { prctl_1arg(PR_GET_TAGGED_ADDR_CTRL)? } as c_uint; + let mode = r & 0b111_u32; + let mte_tag = (r & PR_MTE_TAG_MASK) >> PR_MTE_TAG_SHIFT; + Ok((TaggedAddressMode::from_bits(mode), mte_tag)) +} + +const PR_SET_TAGGED_ADDR_CTRL: c_int = 55; + +/// Controls support for passing tagged user-space addresses to the kernel. +/// +/// # References +/// - [`prctl(PR_SET_TAGGED_ADDR_CTRL,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_SET_TAGGED_ADDR_CTRL,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub unsafe fn set_current_tagged_address_mode( + mode: Option, + mte_tag: u32, +) -> io::Result<()> { + let config = mode.as_ref().map_or(0_u32, TaggedAddressMode::bits) + | ((mte_tag << PR_MTE_TAG_SHIFT) & PR_MTE_TAG_MASK); + prctl_2args(PR_SET_TAGGED_ADDR_CTRL, config as usize as *mut _).map(|_r| ()) +} + +// +// PR_SET_SYSCALL_USER_DISPATCH +// + +const PR_SET_SYSCALL_USER_DISPATCH: c_int = 59; + +const PR_SYS_DISPATCH_OFF: usize = 0; + +/// Disable Syscall User Dispatch mechanism. +/// +/// # References +/// - [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_OFF,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_OFF,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub unsafe fn disable_syscall_user_dispatch() -> io::Result<()> { + prctl_2args(PR_SET_SYSCALL_USER_DISPATCH, PR_SYS_DISPATCH_OFF as *mut _).map(|_r| ()) +} + +const PR_SYS_DISPATCH_ON: usize = 1; + +/// Allow system calls to be executed. +const SYSCALL_DISPATCH_FILTER_ALLOW: u8 = 0; +/// Block system calls from executing. +const SYSCALL_DISPATCH_FILTER_BLOCK: u8 = 1; + +/// Value of the fast switch flag controlling system calls user dispatch +/// mechanism without the need to issue a syscall. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u8)] +pub enum SysCallUserDispatchFastSwitch { + /// System calls are allowed to execute. + Allow = SYSCALL_DISPATCH_FILTER_ALLOW, + /// System calls are blocked from executing. + Block = SYSCALL_DISPATCH_FILTER_BLOCK, +} + +impl TryFrom for SysCallUserDispatchFastSwitch { + type Error = io::Errno; + + fn try_from(value: u8) -> Result { + match value { + SYSCALL_DISPATCH_FILTER_ALLOW => Ok(Self::Allow), + SYSCALL_DISPATCH_FILTER_BLOCK => Ok(Self::Block), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Enable Syscall User Dispatch mechanism. +/// +/// # References +/// - [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_ON,…)`] +/// +/// # Safety +/// +/// Please ensure the conditions necessary to safely call this function, as +/// detailed in the references above. +/// +/// [`prctl(PR_SET_SYSCALL_USER_DISPATCH,PR_SYS_DISPATCH_ON,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +#[inline] +pub unsafe fn enable_syscall_user_dispatch( + always_allowed_region: &[u8], + fast_switch_flag: &AtomicU8, +) -> io::Result<()> { + syscalls::prctl( + PR_SET_SYSCALL_USER_DISPATCH, + PR_SYS_DISPATCH_ON as *mut _, + always_allowed_region.as_ptr() as *mut _, + always_allowed_region.len() as *mut _, + as_ptr(fast_switch_flag) as *mut _, + ) + .map(|_r| ()) +} + +// +// PR_SCHED_CORE +// + +const PR_SCHED_CORE: c_int = 62; + +const PR_SCHED_CORE_GET: usize = 0; + +const PR_SCHED_CORE_SCOPE_THREAD: u32 = 0; +const PR_SCHED_CORE_SCOPE_THREAD_GROUP: u32 = 1; +const PR_SCHED_CORE_SCOPE_PROCESS_GROUP: u32 = 2; + +/// `PR_SCHED_CORE_SCOPE_*` +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum CoreSchedulingScope { + /// Operation will be performed for the thread. + Thread = PR_SCHED_CORE_SCOPE_THREAD, + /// Operation will be performed for all tasks in the task group of the + /// process. + ThreadGroup = PR_SCHED_CORE_SCOPE_THREAD_GROUP, + /// Operation will be performed for all processes in the process group. + ProcessGroup = PR_SCHED_CORE_SCOPE_PROCESS_GROUP, +} + +impl TryFrom for CoreSchedulingScope { + type Error = io::Errno; + + fn try_from(value: u32) -> Result { + match value { + PR_SCHED_CORE_SCOPE_THREAD => Ok(Self::Thread), + PR_SCHED_CORE_SCOPE_THREAD_GROUP => Ok(Self::ThreadGroup), + PR_SCHED_CORE_SCOPE_PROCESS_GROUP => Ok(Self::ProcessGroup), + _ => Err(io::Errno::RANGE), + } + } +} + +/// Get core scheduling cookie of a process. +/// +/// # References +/// - [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_GET,…)`] +/// +/// [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_GET,…)`]: https://www.kernel.org/doc/html/v6.13/admin-guide/hw-vuln/core-scheduling.html +#[inline] +pub fn core_scheduling_cookie(pid: Pid, scope: CoreSchedulingScope) -> io::Result { + let mut value: MaybeUninit = MaybeUninit::uninit(); + unsafe { + syscalls::prctl( + PR_SCHED_CORE, + PR_SCHED_CORE_GET as *mut _, + pid.as_raw_nonzero().get() as usize as *mut _, + scope as usize as *mut _, + value.as_mut_ptr().cast(), + )?; + Ok(value.assume_init()) + } +} + +const PR_SCHED_CORE_CREATE: usize = 1; + +/// Create unique core scheduling cookie. +/// +/// # References +/// - [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_CREATE,…)`] +/// +/// [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_CREATE,…)`]: https://www.kernel.org/doc/html/v6.13/admin-guide/hw-vuln/core-scheduling.html +#[inline] +pub fn create_core_scheduling_cookie(pid: Pid, scope: CoreSchedulingScope) -> io::Result<()> { + unsafe { + syscalls::prctl( + PR_SCHED_CORE, + PR_SCHED_CORE_CREATE as *mut _, + pid.as_raw_nonzero().get() as usize as *mut _, + scope as usize as *mut _, + ptr::null_mut(), + ) + .map(|_r| ()) + } +} + +const PR_SCHED_CORE_SHARE_TO: usize = 2; + +/// Push core scheduling cookie to a process. +/// +/// # References +/// - [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_SHARE_TO,…)`] +/// +/// [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_SHARE_TO,…)`]: https://www.kernel.org/doc/html/v6.13/admin-guide/hw-vuln/core-scheduling.html +#[inline] +pub fn push_core_scheduling_cookie(pid: Pid, scope: CoreSchedulingScope) -> io::Result<()> { + unsafe { + syscalls::prctl( + PR_SCHED_CORE, + PR_SCHED_CORE_SHARE_TO as *mut _, + pid.as_raw_nonzero().get() as usize as *mut _, + scope as usize as *mut _, + ptr::null_mut(), + ) + .map(|_r| ()) + } +} + +const PR_SCHED_CORE_SHARE_FROM: usize = 3; + +/// Pull core scheduling cookie from a process. +/// +/// # References +/// - [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_SHARE_FROM,…)`] +/// +/// [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_SHARE_FROM,…)`]: https://www.kernel.org/doc/html/v6.13/admin-guide/hw-vuln/core-scheduling.html +#[inline] +pub fn pull_core_scheduling_cookie(pid: Pid, scope: CoreSchedulingScope) -> io::Result<()> { + unsafe { + syscalls::prctl( + PR_SCHED_CORE, + PR_SCHED_CORE_SHARE_FROM as *mut _, + pid.as_raw_nonzero().get() as usize as *mut _, + scope as usize as *mut _, + ptr::null_mut(), + ) + .map(|_r| ()) + } +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/sched.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/sched.rs new file mode 100644 index 0000000000000000000000000000000000000000..034b026187c383a749c66638a476331f06c329cd --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/sched.rs @@ -0,0 +1,161 @@ +use crate::pid::Pid; +use crate::{backend, io}; +use core::{fmt, hash}; + +/// `CpuSet` represents a bit-mask of CPUs. +/// +/// `CpuSet`s are used by [`sched_setaffinity`] and [`sched_getaffinity`], for +/// example. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/CPU_SET.3.html +/// [`sched_setaffinity`]: crate::thread::sched_setaffinity +/// [`sched_getaffinity`]: crate::thread::sched_getaffinity +#[repr(transparent)] +#[derive(Clone, Copy)] +pub struct CpuSet { + cpu_set: backend::thread::types::RawCpuSet, +} + +impl CpuSet { + /// The maximum number of CPU in `CpuSet`. + pub const MAX_CPU: usize = backend::thread::types::CPU_SETSIZE; + + /// Create a new and empty `CpuSet`. + #[inline] + pub fn new() -> Self { + Self { + cpu_set: backend::thread::types::raw_cpu_set_new(), + } + } + + /// Test to see if a CPU is in the `CpuSet`. + /// + /// `field` is the CPU id to test. + #[inline] + pub fn is_set(&self, field: usize) -> bool { + backend::thread::cpu_set::CPU_ISSET(field, &self.cpu_set) + } + + /// Add a CPU to `CpuSet`. + /// + /// `field` is the CPU id to add. + #[inline] + pub fn set(&mut self, field: usize) { + backend::thread::cpu_set::CPU_SET(field, &mut self.cpu_set) + } + + /// Remove a CPU from `CpuSet`. + /// + /// `field` is the CPU id to remove. + #[inline] + pub fn unset(&mut self, field: usize) { + backend::thread::cpu_set::CPU_CLR(field, &mut self.cpu_set) + } + + /// Count the number of CPUs set in the `CpuSet`. + #[cfg(linux_kernel)] + #[inline] + pub fn count(&self) -> u32 { + backend::thread::cpu_set::CPU_COUNT(&self.cpu_set) + } + + /// Zeroes the `CpuSet`. + #[inline] + pub fn clear(&mut self) { + backend::thread::cpu_set::CPU_ZERO(&mut self.cpu_set) + } +} + +impl Default for CpuSet { + #[inline] + fn default() -> Self { + Self::new() + } +} + +impl fmt::Debug for CpuSet { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "CpuSet {{")?; + let mut first = true; + for i in 0..Self::MAX_CPU { + if self.is_set(i) { + if first { + write!(f, " ")?; + first = false; + } else { + write!(f, ", ")?; + } + write!(f, "cpu{}", i)?; + } + } + write!(f, " }}") + } +} + +impl hash::Hash for CpuSet { + fn hash(&self, state: &mut H) { + for i in 0..Self::MAX_CPU { + self.is_set(i).hash(state); + } + } +} + +impl Eq for CpuSet {} + +impl PartialEq for CpuSet { + fn eq(&self, other: &Self) -> bool { + backend::thread::cpu_set::CPU_EQUAL(&self.cpu_set, &other.cpu_set) + } +} + +/// `sched_setaffinity(pid, cpuset)`—Set a thread's CPU affinity mask. +/// +/// `pid` is the thread ID to update. If pid is `None`, then the current thread +/// is updated. +/// +/// The `CpuSet` argument specifies the set of CPUs on which the thread will be +/// eligible to run. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/sched_setaffinity.2.html +#[inline] +pub fn sched_setaffinity(pid: Option, cpuset: &CpuSet) -> io::Result<()> { + backend::thread::syscalls::sched_setaffinity(pid, &cpuset.cpu_set) +} + +/// `sched_getaffinity(pid)`—Get a thread's CPU affinity mask. +/// +/// `pid` is the thread ID to check. If pid is `None`, then the current thread +/// is checked. +/// +/// Returns the set of CPUs on which the thread is eligible to run. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/sched_getaffinity.2.html +#[inline] +pub fn sched_getaffinity(pid: Option) -> io::Result { + let mut cpuset = CpuSet::new(); + backend::thread::syscalls::sched_getaffinity(pid, &mut cpuset.cpu_set).and(Ok(cpuset)) +} + +/// `sched_getcpu()`—Get the CPU that the current thread is currently on. +/// +/// # References +/// - [Linux] +/// - [DragonFly BSD] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/sched_getcpu.3.html +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=sched_getcpu§ion=2 +// FreeBSD added `sched_getcpu` in 13.0. +#[cfg(any(linux_kernel, target_os = "dragonfly"))] +#[inline] +pub fn sched_getcpu() -> usize { + backend::thread::syscalls::sched_getcpu() +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/sched_yield.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/sched_yield.rs new file mode 100644 index 0000000000000000000000000000000000000000..e630a95c0a02be0294b5d10f4500cebc32efae2c --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/sched_yield.rs @@ -0,0 +1,16 @@ +use crate::backend; + +/// `sched_yield()`—Hints to the OS that other processes should run. +/// +/// This function always succeeds. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/sched_yield.html +/// [Linux]: https://man7.org/linux/man-pages/man2/sched_yield.2.html +#[inline] +pub fn sched_yield() { + backend::thread::syscalls::sched_yield() +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/setns.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/setns.rs new file mode 100644 index 0000000000000000000000000000000000000000..9ec1205a946a03f556ad7e2da391135ea8529680 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/thread/setns.rs @@ -0,0 +1,162 @@ +//! Thread-specific namespace functions. +//! +//! # Safety +//! +//! The `unshare` function can cause threads to use different file descriptor tables. +#![allow(unsafe_code)] + +use bitflags::bitflags; +use linux_raw_sys::general::{ + CLONE_FILES, CLONE_FS, CLONE_NEWCGROUP, CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, + CLONE_NEWTIME, CLONE_NEWUSER, CLONE_NEWUTS, CLONE_SYSVSEM, +}; + +use crate::backend::c::c_int; +use crate::backend::thread::syscalls; +use crate::fd::BorrowedFd; +use crate::io; + +bitflags! { + /// Thread name space type. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct ThreadNameSpaceType: u32 { + /// Time name space. + const TIME = CLONE_NEWTIME; + /// Mount name space. + const MOUNT = CLONE_NEWNS; + /// Control group (CGroup) name space. + const CONTROL_GROUP = CLONE_NEWCGROUP; + /// `Host name` and `NIS domain name` (UTS) name space. + const HOST_NAME_AND_NIS_DOMAIN_NAME = CLONE_NEWUTS; + /// Inter-process communication (IPC) name space. + const INTER_PROCESS_COMMUNICATION = CLONE_NEWIPC; + /// User name space. + const USER = CLONE_NEWUSER; + /// Process ID name space. + const PROCESS_ID = CLONE_NEWPID; + /// Network name space. + const NETWORK = CLONE_NEWNET; + + /// + const _ = !0; + } +} + +/// Type of name space referred to by a link. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] +#[repr(u32)] +pub enum LinkNameSpaceType { + /// Time name space. + Time = CLONE_NEWTIME, + /// Mount name space. + Mount = CLONE_NEWNS, + /// Control group (CGroup) name space. + ControlGroup = CLONE_NEWCGROUP, + /// `Host name` and `NIS domain name` (UTS) name space. + HostNameAndNISDomainName = CLONE_NEWUTS, + /// Inter-process communication (IPC) name space. + InterProcessCommunication = CLONE_NEWIPC, + /// User name space. + User = CLONE_NEWUSER, + /// Process ID name space. + ProcessID = CLONE_NEWPID, + /// Network name space. + Network = CLONE_NEWNET, +} + +bitflags! { + /// `CLONE_*` for use with [`unshare`]. + #[repr(transparent)] + #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] + pub struct UnshareFlags: u32 { + /// `CLONE_FILES` + const FILES = CLONE_FILES; + /// `CLONE_FS` + const FS = CLONE_FS; + /// `CLONE_NEWCGROUP` + const NEWCGROUP = CLONE_NEWCGROUP; + /// `CLONE_NEWIPC` + const NEWIPC = CLONE_NEWIPC; + /// `CLONE_NEWNET` + const NEWNET = CLONE_NEWNET; + /// `CLONE_NEWNS` + const NEWNS = CLONE_NEWNS; + /// `CLONE_NEWPID` + const NEWPID = CLONE_NEWPID; + /// `CLONE_NEWTIME` + const NEWTIME = CLONE_NEWTIME; + /// `CLONE_NEWUSER` + const NEWUSER = CLONE_NEWUSER; + /// `CLONE_NEWUTS` + const NEWUTS = CLONE_NEWUTS; + /// `CLONE_SYSVSEM` + const SYSVSEM = CLONE_SYSVSEM; + + /// + const _ = !0; + } +} + +/// Reassociate the calling thread with the namespace associated with link +/// referred to by `fd`. +/// +/// `fd` must refer to one of the magic links in a `/proc/[pid]/ns/` directory, +/// or a bind mount to such a link. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/setns.2.html +#[doc(alias = "setns")] +pub fn move_into_link_name_space( + fd: BorrowedFd<'_>, + allowed_type: Option, +) -> io::Result<()> { + let allowed_type = allowed_type.map_or(0, |t| t as c_int); + syscalls::setns(fd, allowed_type).map(|_r| ()) +} + +/// Atomically move the calling thread into one or more of the same namespaces +/// as the thread referred to by `fd`. +/// +/// `fd` must refer to a thread ID. See: `pidfd_open` and `clone`. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/setns.2.html +#[doc(alias = "setns")] +pub fn move_into_thread_name_spaces( + fd: BorrowedFd<'_>, + allowed_types: ThreadNameSpaceType, +) -> io::Result<()> { + syscalls::setns(fd, allowed_types.bits() as c_int).map(|_r| ()) +} + +/// `unshare(flags)`—Deprecated in favor of [`unshare_unsafe`]. +/// +/// This function should be unsafe; see the safety comment on `unshare_unsafe`. +#[deprecated(since = "1.1.0", note = "Use `unshare_unsafe`")] +pub fn unshare(flags: UnshareFlags) -> io::Result<()> { + // SAFETY: This is not actually safe. This function is deprecated and users + // should use `unshare_unsafe` instead. + unsafe { syscalls::unshare(flags) } +} + +/// `unshare(flags)`—Disassociate parts of the current thread's execution +/// context with other threads. +/// +/// # Safety +/// +/// When using `UnshareFlags::FILES`, this function can cause one thread to be +/// unable to use file descriptors created on a different thread. Callers must +/// ensure that threads never observe file descriptors from unshared tables. +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/unshare.2.html +pub unsafe fn unshare_unsafe(flags: UnshareFlags) -> io::Result<()> { + syscalls::unshare(flags) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/clock.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/clock.rs new file mode 100644 index 0000000000000000000000000000000000000000..bdc2b11c833f9a6774045382e598c87d9b29be37 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/clock.rs @@ -0,0 +1,108 @@ +use crate::{backend, io}; + +pub use crate::timespec::{Nsecs, Secs, Timespec}; + +/// `clockid_t` +#[cfg(not(target_os = "wasi"))] +pub use crate::clockid::{ClockId, DynamicClockId}; + +/// `clock_getres(id)`—Returns the resolution of a clock. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_getres.html +/// [Linux]: https://man7.org/linux/man-pages/man2/clock_getres.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=clock_getres&sektion=2 +/// [NetBSD]: https://man.netbsd.org/clock_getres.2 +/// [OpenBSD]: https://man.openbsd.org/clock_getres.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=clock_getres§ion=2 +/// [illumos]: https://illumos.org/man/3C/clock_getres +#[cfg(not(any(target_os = "redox", target_os = "wasi")))] +#[inline] +#[must_use] +pub fn clock_getres(id: ClockId) -> Timespec { + backend::time::syscalls::clock_getres(id) +} + +/// `clock_gettime(id)`—Returns the current value of a clock. +/// +/// This function uses `ClockId` which only contains clocks which are known to +/// always be supported at runtime, allowing this function to be infallible. +/// For a greater set of clocks and dynamic clock support, see +/// [`clock_gettime_dynamic`]. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_gettime.html +/// [Linux]: https://man7.org/linux/man-pages/man2/clock_gettime.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=clock_getres&sektion=2 +/// [NetBSD]: https://man.netbsd.org/clock_getres.2 +/// [OpenBSD]: https://man.openbsd.org/clock_getres.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=clock_getres§ion=2 +/// [illumos]: https://illumos.org/man/3C/clock_gettime +#[cfg(not(target_os = "wasi"))] +#[inline] +#[must_use] +pub fn clock_gettime(id: ClockId) -> Timespec { + backend::time::syscalls::clock_gettime(id) +} + +/// Like [`clock_gettime`] but with support for dynamic clocks. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_gettime.html +/// [Linux]: https://man7.org/linux/man-pages/man2/clock_gettime.2.html +#[cfg(not(target_os = "wasi"))] +#[inline] +pub fn clock_gettime_dynamic(id: DynamicClockId<'_>) -> io::Result { + backend::time::syscalls::clock_gettime_dynamic(id) +} + +/// `clock_settime(id, timespec)`—Sets the current value of a settable clock. +/// +/// This fails with [`io::Errno::INVAL`] if the clock is not settable, and +/// [`io::Errno::ACCESS`] if the current process does not have permission to +/// set it. +/// +/// # References +/// - [POSIX] +/// - [Linux] +/// - [FreeBSD] +/// - [NetBSD] +/// - [OpenBSD] +/// - [DragonFly BSD] +/// - [illumos] +/// +/// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_settime.html +/// [Linux]: https://man7.org/linux/man-pages/man2/clock_settime.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=clock_settime&sektion=2 +/// [NetBSD]: https://man.netbsd.org/clock_settime.2 +/// [OpenBSD]: https://man.openbsd.org/clock_settime.2 +/// [DragonFly BSD]: https://man.dragonflybsd.org/?command=clock_settime§ion=2 +/// [illumos]: https://illumos.org/man/3C/clock_settime +#[cfg(not(any( + target_os = "redox", + target_os = "wasi", + all(apple, not(target_os = "macos")) +)))] +#[inline] +pub fn clock_settime(id: ClockId, timespec: Timespec) -> io::Result<()> { + backend::time::syscalls::clock_settime(id, timespec) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..8aeec874ad02c20c463ea9407acb7d36859f79d2 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/mod.rs @@ -0,0 +1,23 @@ +//! Time-related operations. + +mod clock; +#[cfg(any( + linux_kernel, + target_os = "freebsd", + target_os = "fuchsia", + target_os = "illumos", + target_os = "netbsd" +))] +mod timerfd; + +// TODO: Convert WASI'S clock APIs to use handles rather than ambient clock +// identifiers, update `wasi-libc`, and then add support in `rustix`. +pub use clock::*; +#[cfg(any( + linux_kernel, + target_os = "freebsd", + target_os = "fuchsia", + target_os = "illumos", + target_os = "netbsd" +))] +pub use timerfd::*; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/timerfd.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/timerfd.rs new file mode 100644 index 0000000000000000000000000000000000000000..b9a8cc7f8789e9f9d737bcc29dc322f307eb24ea --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.3/src/time/timerfd.rs @@ -0,0 +1,77 @@ +use crate::fd::{AsFd, OwnedFd}; +use crate::timespec::Timespec; +use crate::{backend, io}; + +pub use backend::time::types::{TimerfdClockId, TimerfdFlags, TimerfdTimerFlags}; + +/// `struct itimerspec` for use with [`timerfd_gettime`] and +/// [`timerfd_settime`]. +/// +/// [`timerfd_gettime`]: crate::time::timerfd_gettime +/// [`timerfd_settime`]: crate::time::timerfd_settime +#[derive(Debug, Clone)] +pub struct Itimerspec { + /// Interval between times. + pub it_interval: Timespec, + /// Value of the time. + pub it_value: Timespec, +} + +/// `timerfd_create(clockid, flags)`—Create a timer. +/// +/// For a higher-level API to timerfd functionality, see the [timerfd] crate. +/// +/// [timerfd]: https://crates.io/crates/timerfd +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/timerfd_create.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=timerfd_create&sektion=2 +/// [illumos]: https://illumos.org/man/3C/timerfd_create +/// [NetBSD]: https://man.netbsd.org/timerfd_create.2 +#[inline] +pub fn timerfd_create(clockid: TimerfdClockId, flags: TimerfdFlags) -> io::Result { + backend::time::syscalls::timerfd_create(clockid, flags) +} + +/// `timerfd_settime(clockid, flags, new_value)`—Set the time on a timer. +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/timerfd_settime.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=timerfd_settime&sektion=2 +/// [illumos]: https://illumos.org/man/3C/timerfd_settime +/// [NetBSD]: https://man.netbsd.org/timerfd_settime.2 +#[inline] +pub fn timerfd_settime( + fd: Fd, + flags: TimerfdTimerFlags, + new_value: &Itimerspec, +) -> io::Result { + backend::time::syscalls::timerfd_settime(fd.as_fd(), flags, new_value) +} + +/// `timerfd_gettime(clockid, flags)`—Query a timer. +/// +/// # References +/// - [Linux] +/// - [FreeBSD] +/// - [illumos] +/// - [NetBSD] +/// +/// [Linux]: https://man7.org/linux/man-pages/man2/timerfd_gettime.2.html +/// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=timerfd_gettime&sektion=2 +/// [illumos]: https://illumos.org/man/3C/timerfd_gettime +/// [NetBSD]: https://man.netbsd.org/timerfd_gettime.2 +#[inline] +pub fn timerfd_gettime(fd: Fd) -> io::Result { + backend::time::syscalls::timerfd_gettime(fd.as_fd()) +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Wdk/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Wdk/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..9701888551c7489a7429912ddc9ee5b279857fdb --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Wdk/mod.rs @@ -0,0 +1,12 @@ +#[cfg(feature = "Wdk_Devices")] +pub mod Devices; +#[cfg(feature = "Wdk_Foundation")] +pub mod Foundation; +#[cfg(feature = "Wdk_Graphics")] +pub mod Graphics; +#[cfg(feature = "Wdk_NetworkManagement")] +pub mod NetworkManagement; +#[cfg(feature = "Wdk_Storage")] +pub mod Storage; +#[cfg(feature = "Wdk_System")] +pub mod System; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Data/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Data/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..d62fdf469180d85dac4da3b5c453a1449d8d4e60 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Data/mod.rs @@ -0,0 +1,4 @@ +#[cfg(feature = "Win32_Data_HtmlHelp")] +pub mod HtmlHelp; +#[cfg(feature = "Win32_Data_RightsManagement")] +pub mod RightsManagement; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Devices/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Devices/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..a9bf4c19f0c3cb5e3202d718ac5c13b58ea4be37 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Devices/mod.rs @@ -0,0 +1,100 @@ +#[cfg(feature = "Win32_Devices_AllJoyn")] +pub mod AllJoyn; +#[cfg(feature = "Win32_Devices_Beep")] +pub mod Beep; +#[cfg(feature = "Win32_Devices_BiometricFramework")] +pub mod BiometricFramework; +#[cfg(feature = "Win32_Devices_Bluetooth")] +pub mod Bluetooth; +#[cfg(feature = "Win32_Devices_Cdrom")] +pub mod Cdrom; +#[cfg(feature = "Win32_Devices_Communication")] +pub mod Communication; +#[cfg(feature = "Win32_Devices_DeviceAndDriverInstallation")] +pub mod DeviceAndDriverInstallation; +#[cfg(feature = "Win32_Devices_DeviceQuery")] +pub mod DeviceQuery; +#[cfg(feature = "Win32_Devices_Display")] +pub mod Display; +#[cfg(feature = "Win32_Devices_Dvd")] +pub mod Dvd; +#[cfg(feature = "Win32_Devices_Enumeration")] +pub mod Enumeration; +#[cfg(feature = "Win32_Devices_Fax")] +pub mod Fax; +#[cfg(feature = "Win32_Devices_HumanInterfaceDevice")] +pub mod HumanInterfaceDevice; +#[cfg(feature = "Win32_Devices_Nfc")] +pub mod Nfc; +#[cfg(feature = "Win32_Devices_Nfp")] +pub mod Nfp; +#[cfg(feature = "Win32_Devices_PortableDevices")] +pub mod PortableDevices; +#[cfg(feature = "Win32_Devices_Properties")] +pub mod Properties; +#[cfg(feature = "Win32_Devices_Pwm")] +pub mod Pwm; +#[cfg(feature = "Win32_Devices_Sensors")] +pub mod Sensors; +#[cfg(feature = "Win32_Devices_SerialCommunication")] +pub mod SerialCommunication; +#[cfg(feature = "Win32_Devices_Tapi")] +pub mod Tapi; +#[cfg(feature = "Win32_Devices_Usb")] +pub mod Usb; +#[cfg(feature = "Win32_Devices_WebServicesOnDevices")] +pub mod WebServicesOnDevices; +pub const BUS1394_LOCAL_HOST_INSTANCE_KEY: windows_sys::core::PCWSTR = windows_sys::core::w!("LOCAL HOST EUI64"); +pub const BUS1394_VIRTUAL_DEVICE_LIST_KEY: windows_sys::core::PCWSTR = windows_sys::core::w!("Virtual Device List"); +pub const IEEE1394API_ACCESS_EXCLUSIVE: u32 = 64u32; +pub const IEEE1394API_ACCESS_SHARED_READ: u32 = 16u32; +pub const IEEE1394API_ACCESS_SHARED_WRITE: u32 = 32u32; +pub const IEEE1394API_BUS_RESET_LOCAL_NODE_INITIATED: u32 = 4u32; +pub const IEEE1394API_BUS_RESET_LOCAL_NODE_IS_IRM: u32 = 2u32; +pub const IEEE1394API_BUS_RESET_LOCAL_NODE_IS_ROOT: u32 = 1u32; +pub const IEEE1394API_DEVICE_OWNERSHIP_LOCAL_NODE: u32 = 1u32; +pub const IEEE1394API_DEVICE_OWNERSHIP_REMOTE_NODE: u32 = 4u32; +pub const IEEE1394API_NOTIFICATION_BUS_RESET: u32 = 2u32; +pub const IEEE1394API_NOTIFICATION_DEVICE_ACCESS: u32 = 1u32; +pub const IEEE1394API_REMOTE_ACCESS_TRANSFER_REQUEST: u32 = 1u32; +pub const IEEE1394API_RESOURCE_OWNERSHIP_LOCAL_NODE: u32 = 2u32; +pub const IEEE1394API_RESOURCE_OWNERSHIP_REMOTE_NODE: u32 = 8u32; +pub const IEEE1394_API_ADD_VIRTUAL_DEVICE: u32 = 1u32; +pub const IEEE1394_API_DEVICE_ACCESS_TRANSFER: u32 = 3u32; +pub const IEEE1394_API_REMOVE_VIRTUAL_DEVICE: u32 = 2u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct IEEE1394_API_REQUEST { + pub RequestNumber: u32, + pub Flags: u32, + pub u: IEEE1394_API_REQUEST_0, +} +impl Default for IEEE1394_API_REQUEST { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union IEEE1394_API_REQUEST_0 { + pub AddVirtualDevice: IEEE1394_VDEV_PNP_REQUEST, + pub RemoveVirtualDevice: IEEE1394_VDEV_PNP_REQUEST, +} +impl Default for IEEE1394_API_REQUEST_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const IEEE1394_API_SET_LOCAL_NODE_PROPERTIES: u32 = 4u32; +pub const IEEE1394_REQUEST_FLAG_PERSISTENT: u32 = 2u32; +pub const IEEE1394_REQUEST_FLAG_UNICODE: u32 = 1u32; +pub const IEEE1394_REQUEST_FLAG_USE_LOCAL_HOST_EUI: u32 = 4u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct IEEE1394_VDEV_PNP_REQUEST { + pub fulFlags: u32, + pub Reserved: u32, + pub InstanceId: u64, + pub DeviceId: u8, +} +pub const IOCTL_IEEE1394_API_REQUEST: u32 = 2229248u32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Foundation/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Foundation/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..d19dd793458e562ca80005e3e32c07db00446c4f --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Foundation/mod.rs @@ -0,0 +1,10365 @@ +windows_link::link!("kernel32.dll" "system" fn CloseHandle(hobject : HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("api-ms-win-core-handle-l1-1-0.dll" "system" fn CompareObjectHandles(hfirstobjecthandle : HANDLE, hsecondobjecthandle : HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn DuplicateHandle(hsourceprocesshandle : HANDLE, hsourcehandle : HANDLE, htargetprocesshandle : HANDLE, lptargethandle : *mut HANDLE, dwdesiredaccess : u32, binherithandle : windows_sys::core::BOOL, dwoptions : DUPLICATE_HANDLE_OPTIONS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn FreeLibrary(hlibmodule : HMODULE) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetHandleInformation(hobject : HANDLE, lpdwflags : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetLastError() -> WIN32_ERROR); +windows_link::link!("kernel32.dll" "system" fn GlobalFree(hmem : HGLOBAL) -> HGLOBAL); +windows_link::link!("kernel32.dll" "system" fn LocalFree(hmem : HLOCAL) -> HLOCAL); +windows_link::link!("ntdll.dll" "system" fn RtlNtStatusToDosError(status : NTSTATUS) -> u32); +windows_link::link!("kernel32.dll" "system" fn SetHandleInformation(hobject : HANDLE, dwmask : u32, dwflags : HANDLE_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetLastError(dwerrcode : WIN32_ERROR)); +windows_link::link!("user32.dll" "system" fn SetLastErrorEx(dwerrcode : WIN32_ERROR, dwtype : u32)); +windows_link::link!("oleaut32.dll" "system" fn SysAddRefString(bstrstring : windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +windows_link::link!("oleaut32.dll" "system" fn SysAllocString(psz : windows_sys::core::PCWSTR) -> windows_sys::core::BSTR); +windows_link::link!("oleaut32.dll" "system" fn SysAllocStringByteLen(psz : windows_sys::core::PCSTR, len : u32) -> windows_sys::core::BSTR); +windows_link::link!("oleaut32.dll" "system" fn SysAllocStringLen(strin : windows_sys::core::PCWSTR, ui : u32) -> windows_sys::core::BSTR); +windows_link::link!("oleaut32.dll" "system" fn SysFreeString(bstrstring : windows_sys::core::BSTR)); +windows_link::link!("oleaut32.dll" "system" fn SysReAllocString(pbstr : *mut windows_sys::core::BSTR, psz : windows_sys::core::PCWSTR) -> i32); +windows_link::link!("oleaut32.dll" "system" fn SysReAllocStringLen(pbstr : *mut windows_sys::core::BSTR, psz : windows_sys::core::PCWSTR, len : u32) -> i32); +windows_link::link!("oleaut32.dll" "system" fn SysReleaseString(bstrstring : windows_sys::core::BSTR)); +windows_link::link!("oleaut32.dll" "system" fn SysStringByteLen(bstr : windows_sys::core::BSTR) -> u32); +windows_link::link!("oleaut32.dll" "system" fn SysStringLen(pbstr : windows_sys::core::BSTR) -> u32); +pub const APPMODEL_ERROR_DYNAMIC_PROPERTY_INVALID: WIN32_ERROR = 15705u32; +pub const APPMODEL_ERROR_DYNAMIC_PROPERTY_READ_FAILED: WIN32_ERROR = 15704u32; +pub const APPMODEL_ERROR_NO_APPLICATION: WIN32_ERROR = 15703u32; +pub const APPMODEL_ERROR_NO_MUTABLE_DIRECTORY: WIN32_ERROR = 15707u32; +pub const APPMODEL_ERROR_NO_PACKAGE: WIN32_ERROR = 15700u32; +pub const APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT: WIN32_ERROR = 15702u32; +pub const APPMODEL_ERROR_PACKAGE_NOT_AVAILABLE: WIN32_ERROR = 15706u32; +pub const APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT: WIN32_ERROR = 15701u32; +pub const APPX_E_BLOCK_HASH_INVALID: windows_sys::core::HRESULT = 0x80080207_u32 as _; +pub const APPX_E_CORRUPT_CONTENT: windows_sys::core::HRESULT = 0x80080206_u32 as _; +pub const APPX_E_DELTA_APPENDED_PACKAGE_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80080210_u32 as _; +pub const APPX_E_DELTA_BASELINE_VERSION_MISMATCH: windows_sys::core::HRESULT = 0x8008020D_u32 as _; +pub const APPX_E_DELTA_PACKAGE_MISSING_FILE: windows_sys::core::HRESULT = 0x8008020E_u32 as _; +pub const APPX_E_DIGEST_MISMATCH: windows_sys::core::HRESULT = 0x80080219_u32 as _; +pub const APPX_E_FILE_COMPRESSION_MISMATCH: windows_sys::core::HRESULT = 0x80080214_u32 as _; +pub const APPX_E_INTERLEAVING_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80080201_u32 as _; +pub const APPX_E_INVALID_APPINSTALLER: windows_sys::core::HRESULT = 0x8008020C_u32 as _; +pub const APPX_E_INVALID_BLOCKMAP: windows_sys::core::HRESULT = 0x80080205_u32 as _; +pub const APPX_E_INVALID_CONTENTGROUPMAP: windows_sys::core::HRESULT = 0x8008020B_u32 as _; +pub const APPX_E_INVALID_DELTA_PACKAGE: windows_sys::core::HRESULT = 0x8008020F_u32 as _; +pub const APPX_E_INVALID_ENCRYPTION_EXCLUSION_FILE_LIST: windows_sys::core::HRESULT = 0x80080216_u32 as _; +pub const APPX_E_INVALID_KEY_INFO: windows_sys::core::HRESULT = 0x8008020A_u32 as _; +pub const APPX_E_INVALID_MANIFEST: windows_sys::core::HRESULT = 0x80080204_u32 as _; +pub const APPX_E_INVALID_PACKAGESIGNCONFIG: windows_sys::core::HRESULT = 0x80080212_u32 as _; +pub const APPX_E_INVALID_PACKAGE_FOLDER_ACLS: windows_sys::core::HRESULT = 0x80080217_u32 as _; +pub const APPX_E_INVALID_PACKAGING_LAYOUT: windows_sys::core::HRESULT = 0x80080211_u32 as _; +pub const APPX_E_INVALID_PAYLOAD_PACKAGE_EXTENSION: windows_sys::core::HRESULT = 0x80080215_u32 as _; +pub const APPX_E_INVALID_PUBLISHER_BRIDGING: windows_sys::core::HRESULT = 0x80080218_u32 as _; +pub const APPX_E_INVALID_SIP_CLIENT_DATA: windows_sys::core::HRESULT = 0x80080209_u32 as _; +pub const APPX_E_MISSING_REQUIRED_FILE: windows_sys::core::HRESULT = 0x80080203_u32 as _; +pub const APPX_E_PACKAGING_INTERNAL: windows_sys::core::HRESULT = 0x80080200_u32 as _; +pub const APPX_E_RELATIONSHIPS_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80080202_u32 as _; +pub const APPX_E_REQUESTED_RANGE_TOO_LARGE: windows_sys::core::HRESULT = 0x80080208_u32 as _; +pub const APPX_E_RESOURCESPRI_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80080213_u32 as _; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct APP_LOCAL_DEVICE_ID { + pub value: [u8; 32], +} +impl Default for APP_LOCAL_DEVICE_ID { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const APP_LOCAL_DEVICE_ID_SIZE: u32 = 32u32; +pub const BT_E_SPURIOUS_ACTIVATION: windows_sys::core::HRESULT = 0x80080300_u32 as _; +pub const CACHE_E_FIRST: i32 = -2147221136i32; +pub const CACHE_E_LAST: i32 = -2147221121i32; +pub const CACHE_E_NOCACHE_UPDATED: windows_sys::core::HRESULT = 0x80040170_u32 as _; +pub const CACHE_S_FIRST: i32 = 262512i32; +pub const CACHE_S_FORMATETC_NOTSUPPORTED: windows_sys::core::HRESULT = 0x40170_u32 as _; +pub const CACHE_S_LAST: i32 = 262527i32; +pub const CACHE_S_SAMECACHE: windows_sys::core::HRESULT = 0x40171_u32 as _; +pub const CACHE_S_SOMECACHES_NOTUPDATED: windows_sys::core::HRESULT = 0x40172_u32 as _; +pub const CAT_E_CATIDNOEXIST: windows_sys::core::HRESULT = 0x80040160_u32 as _; +pub const CAT_E_FIRST: i32 = -2147221152i32; +pub const CAT_E_LAST: i32 = -2147221151i32; +pub const CAT_E_NODESCRIPTION: windows_sys::core::HRESULT = 0x80040161_u32 as _; +pub const CERTSRV_E_ADMIN_DENIED_REQUEST: windows_sys::core::HRESULT = 0x80094014_u32 as _; +pub const CERTSRV_E_ALIGNMENT_FAULT: windows_sys::core::HRESULT = 0x80094010_u32 as _; +pub const CERTSRV_E_ARCHIVED_KEY_REQUIRED: windows_sys::core::HRESULT = 0x80094804_u32 as _; +pub const CERTSRV_E_ARCHIVED_KEY_UNEXPECTED: windows_sys::core::HRESULT = 0x80094810_u32 as _; +pub const CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE: windows_sys::core::HRESULT = 0x8009400E_u32 as _; +pub const CERTSRV_E_BAD_RENEWAL_SUBJECT: windows_sys::core::HRESULT = 0x80094806_u32 as _; +pub const CERTSRV_E_BAD_REQUESTSTATUS: windows_sys::core::HRESULT = 0x80094003_u32 as _; +pub const CERTSRV_E_BAD_REQUESTSUBJECT: windows_sys::core::HRESULT = 0x80094001_u32 as _; +pub const CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL: windows_sys::core::HRESULT = 0x8009400C_u32 as _; +pub const CERTSRV_E_BAD_TEMPLATE_VERSION: windows_sys::core::HRESULT = 0x80094807_u32 as _; +pub const CERTSRV_E_CERT_TYPE_OVERLAP: windows_sys::core::HRESULT = 0x80094814_u32 as _; +pub const CERTSRV_E_CORRUPT_KEY_ATTESTATION: windows_sys::core::HRESULT = 0x8009481B_u32 as _; +pub const CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE: windows_sys::core::HRESULT = 0x80094013_u32 as _; +pub const CERTSRV_E_ENCODING_LENGTH: windows_sys::core::HRESULT = 0x80094007_u32 as _; +pub const CERTSRV_E_ENCRYPTION_CERT_REQUIRED: windows_sys::core::HRESULT = 0x80094018_u32 as _; +pub const CERTSRV_E_ENROLL_DENIED: windows_sys::core::HRESULT = 0x80094011_u32 as _; +pub const CERTSRV_E_EXPIRED_CHALLENGE: windows_sys::core::HRESULT = 0x8009481C_u32 as _; +pub const CERTSRV_E_INVALID_ATTESTATION: windows_sys::core::HRESULT = 0x80094819_u32 as _; +pub const CERTSRV_E_INVALID_CA_CERTIFICATE: windows_sys::core::HRESULT = 0x80094005_u32 as _; +pub const CERTSRV_E_INVALID_EK: windows_sys::core::HRESULT = 0x80094817_u32 as _; +pub const CERTSRV_E_INVALID_IDBINDING: windows_sys::core::HRESULT = 0x80094818_u32 as _; +pub const CERTSRV_E_INVALID_REQUESTID: windows_sys::core::HRESULT = 0x8009481E_u32 as _; +pub const CERTSRV_E_INVALID_RESPONSE: windows_sys::core::HRESULT = 0x8009481D_u32 as _; +pub const CERTSRV_E_ISSUANCE_POLICY_REQUIRED: windows_sys::core::HRESULT = 0x8009480C_u32 as _; +pub const CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED: windows_sys::core::HRESULT = 0x8009400A_u32 as _; +pub const CERTSRV_E_KEY_ATTESTATION: windows_sys::core::HRESULT = 0x8009481A_u32 as _; +pub const CERTSRV_E_KEY_ATTESTATION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80094017_u32 as _; +pub const CERTSRV_E_KEY_LENGTH: windows_sys::core::HRESULT = 0x80094811_u32 as _; +pub const CERTSRV_E_NO_CAADMIN_DEFINED: windows_sys::core::HRESULT = 0x8009400D_u32 as _; +pub const CERTSRV_E_NO_CERT_TYPE: windows_sys::core::HRESULT = 0x80094801_u32 as _; +pub const CERTSRV_E_NO_DB_SESSIONS: windows_sys::core::HRESULT = 0x8009400F_u32 as _; +pub const CERTSRV_E_NO_POLICY_SERVER: windows_sys::core::HRESULT = 0x80094015_u32 as _; +pub const CERTSRV_E_NO_REQUEST: windows_sys::core::HRESULT = 0x80094002_u32 as _; +pub const CERTSRV_E_NO_VALID_KRA: windows_sys::core::HRESULT = 0x8009400B_u32 as _; +pub const CERTSRV_E_PENDING_CLIENT_RESPONSE: windows_sys::core::HRESULT = 0x80094820_u32 as _; +pub const CERTSRV_E_PROPERTY_EMPTY: windows_sys::core::HRESULT = 0x80094004_u32 as _; +pub const CERTSRV_E_RENEWAL_BAD_PUBLIC_KEY: windows_sys::core::HRESULT = 0x80094816_u32 as _; +pub const CERTSRV_E_REQUEST_PRECERTIFICATE_MISMATCH: windows_sys::core::HRESULT = 0x8009481F_u32 as _; +pub const CERTSRV_E_RESTRICTEDOFFICER: windows_sys::core::HRESULT = 0x80094009_u32 as _; +pub const CERTSRV_E_ROLECONFLICT: windows_sys::core::HRESULT = 0x80094008_u32 as _; +pub const CERTSRV_E_SEC_EXT_DIRECTORY_SID_REQUIRED: windows_sys::core::HRESULT = 0x80094821_u32 as _; +pub const CERTSRV_E_SERVER_SUSPENDED: windows_sys::core::HRESULT = 0x80094006_u32 as _; +pub const CERTSRV_E_SIGNATURE_COUNT: windows_sys::core::HRESULT = 0x8009480A_u32 as _; +pub const CERTSRV_E_SIGNATURE_POLICY_REQUIRED: windows_sys::core::HRESULT = 0x80094809_u32 as _; +pub const CERTSRV_E_SIGNATURE_REJECTED: windows_sys::core::HRESULT = 0x8009480B_u32 as _; +pub const CERTSRV_E_SMIME_REQUIRED: windows_sys::core::HRESULT = 0x80094805_u32 as _; +pub const CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED: windows_sys::core::HRESULT = 0x80094803_u32 as _; +pub const CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED: windows_sys::core::HRESULT = 0x8009480E_u32 as _; +pub const CERTSRV_E_SUBJECT_DNS_REQUIRED: windows_sys::core::HRESULT = 0x8009480F_u32 as _; +pub const CERTSRV_E_SUBJECT_EMAIL_REQUIRED: windows_sys::core::HRESULT = 0x80094812_u32 as _; +pub const CERTSRV_E_SUBJECT_UPN_REQUIRED: windows_sys::core::HRESULT = 0x8009480D_u32 as _; +pub const CERTSRV_E_TEMPLATE_CONFLICT: windows_sys::core::HRESULT = 0x80094802_u32 as _; +pub const CERTSRV_E_TEMPLATE_DENIED: windows_sys::core::HRESULT = 0x80094012_u32 as _; +pub const CERTSRV_E_TEMPLATE_POLICY_REQUIRED: windows_sys::core::HRESULT = 0x80094808_u32 as _; +pub const CERTSRV_E_TOO_MANY_SIGNATURES: windows_sys::core::HRESULT = 0x80094815_u32 as _; +pub const CERTSRV_E_UNKNOWN_CERT_TYPE: windows_sys::core::HRESULT = 0x80094813_u32 as _; +pub const CERTSRV_E_UNSUPPORTED_CERT_TYPE: windows_sys::core::HRESULT = 0x80094800_u32 as _; +pub const CERTSRV_E_WEAK_SIGNATURE_OR_KEY: windows_sys::core::HRESULT = 0x80094016_u32 as _; +pub const CERT_E_CHAINING: windows_sys::core::HRESULT = 0x800B010A_u32 as _; +pub const CERT_E_CN_NO_MATCH: windows_sys::core::HRESULT = 0x800B010F_u32 as _; +pub const CERT_E_CRITICAL: windows_sys::core::HRESULT = 0x800B0105_u32 as _; +pub const CERT_E_EXPIRED: windows_sys::core::HRESULT = 0x800B0101_u32 as _; +pub const CERT_E_INVALID_NAME: windows_sys::core::HRESULT = 0x800B0114_u32 as _; +pub const CERT_E_INVALID_POLICY: windows_sys::core::HRESULT = 0x800B0113_u32 as _; +pub const CERT_E_ISSUERCHAINING: windows_sys::core::HRESULT = 0x800B0107_u32 as _; +pub const CERT_E_MALFORMED: windows_sys::core::HRESULT = 0x800B0108_u32 as _; +pub const CERT_E_PATHLENCONST: windows_sys::core::HRESULT = 0x800B0104_u32 as _; +pub const CERT_E_PURPOSE: windows_sys::core::HRESULT = 0x800B0106_u32 as _; +pub const CERT_E_REVOCATION_FAILURE: windows_sys::core::HRESULT = 0x800B010E_u32 as _; +pub const CERT_E_REVOKED: windows_sys::core::HRESULT = 0x800B010C_u32 as _; +pub const CERT_E_ROLE: windows_sys::core::HRESULT = 0x800B0103_u32 as _; +pub const CERT_E_UNTRUSTEDCA: windows_sys::core::HRESULT = 0x800B0112_u32 as _; +pub const CERT_E_UNTRUSTEDROOT: windows_sys::core::HRESULT = 0x800B0109_u32 as _; +pub const CERT_E_UNTRUSTEDTESTROOT: windows_sys::core::HRESULT = 0x800B010D_u32 as _; +pub const CERT_E_VALIDITYPERIODNESTING: windows_sys::core::HRESULT = 0x800B0102_u32 as _; +pub const CERT_E_WRONG_USAGE: windows_sys::core::HRESULT = 0x800B0110_u32 as _; +pub const CI_CORRUPT_CATALOG: windows_sys::core::HRESULT = 0xC0041801_u32 as _; +pub const CI_CORRUPT_DATABASE: windows_sys::core::HRESULT = 0xC0041800_u32 as _; +pub const CI_CORRUPT_FILTER_BUFFER: windows_sys::core::HRESULT = 0xC0041807_u32 as _; +pub const CI_E_ALREADY_INITIALIZED: windows_sys::core::HRESULT = 0x8004180A_u32 as _; +pub const CI_E_BUFFERTOOSMALL: windows_sys::core::HRESULT = 0x8004180C_u32 as _; +pub const CI_E_CARDINALITY_MISMATCH: windows_sys::core::HRESULT = 0x80041827_u32 as _; +pub const CI_E_CLIENT_FILTER_ABORT: windows_sys::core::HRESULT = 0xC0041824_u32 as _; +pub const CI_E_CONFIG_DISK_FULL: windows_sys::core::HRESULT = 0x80041828_u32 as _; +pub const CI_E_DISK_FULL: windows_sys::core::HRESULT = 0x80041811_u32 as _; +pub const CI_E_DISTRIBUTED_GROUPBY_UNSUPPORTED: windows_sys::core::HRESULT = 0x80041829_u32 as _; +pub const CI_E_DUPLICATE_NOTIFICATION: windows_sys::core::HRESULT = 0x80041817_u32 as _; +pub const CI_E_ENUMERATION_STARTED: windows_sys::core::HRESULT = 0xC0041822_u32 as _; +pub const CI_E_FILTERING_DISABLED: windows_sys::core::HRESULT = 0x80041810_u32 as _; +pub const CI_E_INVALID_FLAGS_COMBINATION: windows_sys::core::HRESULT = 0x80041819_u32 as _; +pub const CI_E_INVALID_STATE: windows_sys::core::HRESULT = 0x8004180F_u32 as _; +pub const CI_E_LOGON_FAILURE: windows_sys::core::HRESULT = 0x8004181C_u32 as _; +pub const CI_E_NOT_FOUND: windows_sys::core::HRESULT = 0x80041815_u32 as _; +pub const CI_E_NOT_INITIALIZED: windows_sys::core::HRESULT = 0x8004180B_u32 as _; +pub const CI_E_NOT_RUNNING: windows_sys::core::HRESULT = 0x80041820_u32 as _; +pub const CI_E_NO_CATALOG: windows_sys::core::HRESULT = 0x8004181D_u32 as _; +pub const CI_E_OUTOFSEQ_INCREMENT_DATA: windows_sys::core::HRESULT = 0x8004181A_u32 as _; +pub const CI_E_PROPERTY_NOT_CACHED: windows_sys::core::HRESULT = 0x8004180D_u32 as _; +pub const CI_E_PROPERTY_TOOLARGE: windows_sys::core::HRESULT = 0xC0041823_u32 as _; +pub const CI_E_SHARING_VIOLATION: windows_sys::core::HRESULT = 0x8004181B_u32 as _; +pub const CI_E_SHUTDOWN: windows_sys::core::HRESULT = 0x80041812_u32 as _; +pub const CI_E_STRANGE_PAGEORSECTOR_SIZE: windows_sys::core::HRESULT = 0x8004181E_u32 as _; +pub const CI_E_TIMEOUT: windows_sys::core::HRESULT = 0x8004181F_u32 as _; +pub const CI_E_UPDATES_DISABLED: windows_sys::core::HRESULT = 0x80041818_u32 as _; +pub const CI_E_USE_DEFAULT_PID: windows_sys::core::HRESULT = 0x80041816_u32 as _; +pub const CI_E_WORKID_NOTVALID: windows_sys::core::HRESULT = 0x80041813_u32 as _; +pub const CI_INCORRECT_VERSION: windows_sys::core::HRESULT = 0xC0041821_u32 as _; +pub const CI_INVALID_INDEX: windows_sys::core::HRESULT = 0xC0041808_u32 as _; +pub const CI_INVALID_PARTITION: windows_sys::core::HRESULT = 0xC0041802_u32 as _; +pub const CI_INVALID_PRIORITY: windows_sys::core::HRESULT = 0xC0041803_u32 as _; +pub const CI_NO_CATALOG: windows_sys::core::HRESULT = 0xC0041806_u32 as _; +pub const CI_NO_STARTING_KEY: windows_sys::core::HRESULT = 0xC0041804_u32 as _; +pub const CI_OUT_OF_INDEX_IDS: windows_sys::core::HRESULT = 0xC0041805_u32 as _; +pub const CI_PROPSTORE_INCONSISTENCY: windows_sys::core::HRESULT = 0xC0041809_u32 as _; +pub const CI_S_CAT_STOPPED: windows_sys::core::HRESULT = 0x41826_u32 as _; +pub const CI_S_END_OF_ENUMERATION: windows_sys::core::HRESULT = 0x41814_u32 as _; +pub const CI_S_NO_DOCSTORE: windows_sys::core::HRESULT = 0x41825_u32 as _; +pub const CI_S_WORKID_DELETED: windows_sys::core::HRESULT = 0x4180E_u32 as _; +pub const CLASSFACTORY_E_FIRST: i32 = -2147221232i32; +pub const CLASSFACTORY_E_LAST: i32 = -2147221217i32; +pub const CLASSFACTORY_S_FIRST: i32 = 262416i32; +pub const CLASSFACTORY_S_LAST: i32 = 262431i32; +pub const CLASS_E_CLASSNOTAVAILABLE: windows_sys::core::HRESULT = 0x80040111_u32 as _; +pub const CLASS_E_NOAGGREGATION: windows_sys::core::HRESULT = 0x80040110_u32 as _; +pub const CLASS_E_NOTLICENSED: windows_sys::core::HRESULT = 0x80040112_u32 as _; +pub const CLIENTSITE_E_FIRST: i32 = -2147221104i32; +pub const CLIENTSITE_E_LAST: i32 = -2147221089i32; +pub const CLIENTSITE_S_FIRST: i32 = 262544i32; +pub const CLIENTSITE_S_LAST: i32 = 262559i32; +pub const CLIPBRD_E_BAD_DATA: windows_sys::core::HRESULT = 0x800401D3_u32 as _; +pub const CLIPBRD_E_CANT_CLOSE: windows_sys::core::HRESULT = 0x800401D4_u32 as _; +pub const CLIPBRD_E_CANT_EMPTY: windows_sys::core::HRESULT = 0x800401D1_u32 as _; +pub const CLIPBRD_E_CANT_OPEN: windows_sys::core::HRESULT = 0x800401D0_u32 as _; +pub const CLIPBRD_E_CANT_SET: windows_sys::core::HRESULT = 0x800401D2_u32 as _; +pub const CLIPBRD_E_FIRST: i32 = -2147221040i32; +pub const CLIPBRD_E_LAST: i32 = -2147221025i32; +pub const CLIPBRD_S_FIRST: i32 = 262608i32; +pub const CLIPBRD_S_LAST: i32 = 262623i32; +pub type COLORREF = u32; +pub const COMADMIN_E_ALREADYINSTALLED: windows_sys::core::HRESULT = 0x80110404_u32 as _; +pub const COMADMIN_E_AMBIGUOUS_APPLICATION_NAME: windows_sys::core::HRESULT = 0x8011045C_u32 as _; +pub const COMADMIN_E_AMBIGUOUS_PARTITION_NAME: windows_sys::core::HRESULT = 0x8011045D_u32 as _; +pub const COMADMIN_E_APPDIRNOTFOUND: windows_sys::core::HRESULT = 0x8011041F_u32 as _; +pub const COMADMIN_E_APPLICATIONEXISTS: windows_sys::core::HRESULT = 0x8011040B_u32 as _; +pub const COMADMIN_E_APPLID_MATCHES_CLSID: windows_sys::core::HRESULT = 0x80110446_u32 as _; +pub const COMADMIN_E_APP_FILE_READFAIL: windows_sys::core::HRESULT = 0x80110408_u32 as _; +pub const COMADMIN_E_APP_FILE_VERSION: windows_sys::core::HRESULT = 0x80110409_u32 as _; +pub const COMADMIN_E_APP_FILE_WRITEFAIL: windows_sys::core::HRESULT = 0x80110407_u32 as _; +pub const COMADMIN_E_APP_NOT_RUNNING: windows_sys::core::HRESULT = 0x8011080A_u32 as _; +pub const COMADMIN_E_AUTHENTICATIONLEVEL: windows_sys::core::HRESULT = 0x80110413_u32 as _; +pub const COMADMIN_E_BADPATH: windows_sys::core::HRESULT = 0x8011040A_u32 as _; +pub const COMADMIN_E_BADREGISTRYLIBID: windows_sys::core::HRESULT = 0x8011041E_u32 as _; +pub const COMADMIN_E_BADREGISTRYPROGID: windows_sys::core::HRESULT = 0x80110412_u32 as _; +pub const COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET: windows_sys::core::HRESULT = 0x8011081F_u32 as _; +pub const COMADMIN_E_BASE_PARTITION_ONLY: windows_sys::core::HRESULT = 0x80110450_u32 as _; +pub const COMADMIN_E_CANNOT_ALIAS_EVENTCLASS: windows_sys::core::HRESULT = 0x80110820_u32 as _; +pub const COMADMIN_E_CANTCOPYFILE: windows_sys::core::HRESULT = 0x8011040D_u32 as _; +pub const COMADMIN_E_CANTMAKEINPROCSERVICE: windows_sys::core::HRESULT = 0x80110814_u32 as _; +pub const COMADMIN_E_CANTRECYCLELIBRARYAPPS: windows_sys::core::HRESULT = 0x8011080F_u32 as _; +pub const COMADMIN_E_CANTRECYCLESERVICEAPPS: windows_sys::core::HRESULT = 0x80110811_u32 as _; +pub const COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT: windows_sys::core::HRESULT = 0x8011044D_u32 as _; +pub const COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY: windows_sys::core::HRESULT = 0x8011044A_u32 as _; +pub const COMADMIN_E_CAN_NOT_EXPORT_SYS_APP: windows_sys::core::HRESULT = 0x8011044C_u32 as _; +pub const COMADMIN_E_CAN_NOT_START_APP: windows_sys::core::HRESULT = 0x8011044B_u32 as _; +pub const COMADMIN_E_CAT_BITNESSMISMATCH: windows_sys::core::HRESULT = 0x80110482_u32 as _; +pub const COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME: windows_sys::core::HRESULT = 0x80110457_u32 as _; +pub const COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED: windows_sys::core::HRESULT = 0x8011045B_u32 as _; +pub const COMADMIN_E_CAT_INVALID_PARTITION_NAME: windows_sys::core::HRESULT = 0x80110458_u32 as _; +pub const COMADMIN_E_CAT_PARTITION_IN_USE: windows_sys::core::HRESULT = 0x80110459_u32 as _; +pub const COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80110485_u32 as _; +pub const COMADMIN_E_CAT_SERVERFAULT: windows_sys::core::HRESULT = 0x80110486_u32 as _; +pub const COMADMIN_E_CAT_UNACCEPTABLEBITNESS: windows_sys::core::HRESULT = 0x80110483_u32 as _; +pub const COMADMIN_E_CAT_WRONGAPPBITNESS: windows_sys::core::HRESULT = 0x80110484_u32 as _; +pub const COMADMIN_E_CLSIDORIIDMISMATCH: windows_sys::core::HRESULT = 0x80110418_u32 as _; +pub const COMADMIN_E_COMPFILE_BADTLB: windows_sys::core::HRESULT = 0x80110428_u32 as _; +pub const COMADMIN_E_COMPFILE_CLASSNOTAVAIL: windows_sys::core::HRESULT = 0x80110427_u32 as _; +pub const COMADMIN_E_COMPFILE_DOESNOTEXIST: windows_sys::core::HRESULT = 0x80110424_u32 as _; +pub const COMADMIN_E_COMPFILE_GETCLASSOBJ: windows_sys::core::HRESULT = 0x80110426_u32 as _; +pub const COMADMIN_E_COMPFILE_LOADDLLFAIL: windows_sys::core::HRESULT = 0x80110425_u32 as _; +pub const COMADMIN_E_COMPFILE_NOREGISTRAR: windows_sys::core::HRESULT = 0x80110434_u32 as _; +pub const COMADMIN_E_COMPFILE_NOTINSTALLABLE: windows_sys::core::HRESULT = 0x80110429_u32 as _; +pub const COMADMIN_E_COMPONENTEXISTS: windows_sys::core::HRESULT = 0x80110439_u32 as _; +pub const COMADMIN_E_COMP_MOVE_BAD_DEST: windows_sys::core::HRESULT = 0x8011042E_u32 as _; +pub const COMADMIN_E_COMP_MOVE_DEST: windows_sys::core::HRESULT = 0x8011081D_u32 as _; +pub const COMADMIN_E_COMP_MOVE_LOCKED: windows_sys::core::HRESULT = 0x8011042D_u32 as _; +pub const COMADMIN_E_COMP_MOVE_PRIVATE: windows_sys::core::HRESULT = 0x8011081E_u32 as _; +pub const COMADMIN_E_COMP_MOVE_SOURCE: windows_sys::core::HRESULT = 0x8011081C_u32 as _; +pub const COMADMIN_E_COREQCOMPINSTALLED: windows_sys::core::HRESULT = 0x80110435_u32 as _; +pub const COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET: windows_sys::core::HRESULT = 0x80110816_u32 as _; +pub const COMADMIN_E_DLLLOADFAILED: windows_sys::core::HRESULT = 0x8011041D_u32 as _; +pub const COMADMIN_E_DLLREGISTERSERVER: windows_sys::core::HRESULT = 0x8011041A_u32 as _; +pub const COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER: windows_sys::core::HRESULT = 0x8011044E_u32 as _; +pub const COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES: windows_sys::core::HRESULT = 0x8011045A_u32 as _; +pub const COMADMIN_E_INVALIDUSERIDS: windows_sys::core::HRESULT = 0x80110410_u32 as _; +pub const COMADMIN_E_INVALID_PARTITION: windows_sys::core::HRESULT = 0x8011080B_u32 as _; +pub const COMADMIN_E_KEYMISSING: windows_sys::core::HRESULT = 0x80110403_u32 as _; +pub const COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT: windows_sys::core::HRESULT = 0x8011081A_u32 as _; +pub const COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS: windows_sys::core::HRESULT = 0x8011081B_u32 as _; +pub const COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE: windows_sys::core::HRESULT = 0x8011044F_u32 as _; +pub const COMADMIN_E_MIG_SCHEMANOTFOUND: windows_sys::core::HRESULT = 0x80110481_u32 as _; +pub const COMADMIN_E_MIG_VERSIONNOTSUPPORTED: windows_sys::core::HRESULT = 0x80110480_u32 as _; +pub const COMADMIN_E_NOREGISTRYCLSID: windows_sys::core::HRESULT = 0x80110411_u32 as _; +pub const COMADMIN_E_NOSERVERSHARE: windows_sys::core::HRESULT = 0x8011041B_u32 as _; +pub const COMADMIN_E_NOTCHANGEABLE: windows_sys::core::HRESULT = 0x8011042A_u32 as _; +pub const COMADMIN_E_NOTDELETEABLE: windows_sys::core::HRESULT = 0x8011042B_u32 as _; +pub const COMADMIN_E_NOTINREGISTRY: windows_sys::core::HRESULT = 0x8011043E_u32 as _; +pub const COMADMIN_E_NOUSER: windows_sys::core::HRESULT = 0x8011040F_u32 as _; +pub const COMADMIN_E_OBJECTERRORS: windows_sys::core::HRESULT = 0x80110401_u32 as _; +pub const COMADMIN_E_OBJECTEXISTS: windows_sys::core::HRESULT = 0x80110438_u32 as _; +pub const COMADMIN_E_OBJECTINVALID: windows_sys::core::HRESULT = 0x80110402_u32 as _; +pub const COMADMIN_E_OBJECTNOTPOOLABLE: windows_sys::core::HRESULT = 0x8011043F_u32 as _; +pub const COMADMIN_E_OBJECT_DOES_NOT_EXIST: windows_sys::core::HRESULT = 0x80110809_u32 as _; +pub const COMADMIN_E_OBJECT_PARENT_MISSING: windows_sys::core::HRESULT = 0x80110808_u32 as _; +pub const COMADMIN_E_PARTITIONS_DISABLED: windows_sys::core::HRESULT = 0x80110824_u32 as _; +pub const COMADMIN_E_PARTITION_ACCESSDENIED: windows_sys::core::HRESULT = 0x80110818_u32 as _; +pub const COMADMIN_E_PARTITION_MSI_ONLY: windows_sys::core::HRESULT = 0x80110819_u32 as _; +pub const COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED: windows_sys::core::HRESULT = 0x80110813_u32 as _; +pub const COMADMIN_E_PRIVATE_ACCESSDENIED: windows_sys::core::HRESULT = 0x80110821_u32 as _; +pub const COMADMIN_E_PROCESSALREADYRECYCLED: windows_sys::core::HRESULT = 0x80110812_u32 as _; +pub const COMADMIN_E_PROGIDINUSEBYCLSID: windows_sys::core::HRESULT = 0x80110815_u32 as _; +pub const COMADMIN_E_PROPERTYSAVEFAILED: windows_sys::core::HRESULT = 0x80110437_u32 as _; +pub const COMADMIN_E_PROPERTY_OVERFLOW: windows_sys::core::HRESULT = 0x8011043C_u32 as _; +pub const COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED: windows_sys::core::HRESULT = 0x80110817_u32 as _; +pub const COMADMIN_E_REGDB_ALREADYRUNNING: windows_sys::core::HRESULT = 0x80110475_u32 as _; +pub const COMADMIN_E_REGDB_NOTINITIALIZED: windows_sys::core::HRESULT = 0x80110472_u32 as _; +pub const COMADMIN_E_REGDB_NOTOPEN: windows_sys::core::HRESULT = 0x80110473_u32 as _; +pub const COMADMIN_E_REGDB_SYSTEMERR: windows_sys::core::HRESULT = 0x80110474_u32 as _; +pub const COMADMIN_E_REGFILE_CORRUPT: windows_sys::core::HRESULT = 0x8011043B_u32 as _; +pub const COMADMIN_E_REGISTERTLB: windows_sys::core::HRESULT = 0x80110430_u32 as _; +pub const COMADMIN_E_REGISTRARFAILED: windows_sys::core::HRESULT = 0x80110423_u32 as _; +pub const COMADMIN_E_REGISTRY_ACCESSDENIED: windows_sys::core::HRESULT = 0x80110823_u32 as _; +pub const COMADMIN_E_REMOTEINTERFACE: windows_sys::core::HRESULT = 0x80110419_u32 as _; +pub const COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM: windows_sys::core::HRESULT = 0x80110449_u32 as _; +pub const COMADMIN_E_ROLEEXISTS: windows_sys::core::HRESULT = 0x8011040C_u32 as _; +pub const COMADMIN_E_ROLE_DOES_NOT_EXIST: windows_sys::core::HRESULT = 0x80110447_u32 as _; +pub const COMADMIN_E_SAFERINVALID: windows_sys::core::HRESULT = 0x80110822_u32 as _; +pub const COMADMIN_E_SERVICENOTINSTALLED: windows_sys::core::HRESULT = 0x80110436_u32 as _; +pub const COMADMIN_E_SESSION: windows_sys::core::HRESULT = 0x8011042C_u32 as _; +pub const COMADMIN_E_START_APP_DISABLED: windows_sys::core::HRESULT = 0x80110451_u32 as _; +pub const COMADMIN_E_START_APP_NEEDS_COMPONENTS: windows_sys::core::HRESULT = 0x80110448_u32 as _; +pub const COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE: windows_sys::core::HRESULT = 0x8011080D_u32 as _; +pub const COMADMIN_E_SYSTEMAPP: windows_sys::core::HRESULT = 0x80110433_u32 as _; +pub const COMADMIN_E_USERPASSWDNOTVALID: windows_sys::core::HRESULT = 0x80110414_u32 as _; +pub const COMADMIN_E_USER_IN_SET: windows_sys::core::HRESULT = 0x8011080E_u32 as _; +pub const COMQC_E_APPLICATION_NOT_QUEUED: windows_sys::core::HRESULT = 0x80110600_u32 as _; +pub const COMQC_E_BAD_MESSAGE: windows_sys::core::HRESULT = 0x80110604_u32 as _; +pub const COMQC_E_NO_IPERSISTSTREAM: windows_sys::core::HRESULT = 0x80110603_u32 as _; +pub const COMQC_E_NO_QUEUEABLE_INTERFACES: windows_sys::core::HRESULT = 0x80110601_u32 as _; +pub const COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80110602_u32 as _; +pub const COMQC_E_UNAUTHENTICATED: windows_sys::core::HRESULT = 0x80110605_u32 as _; +pub const COMQC_E_UNTRUSTED_ENQUEUER: windows_sys::core::HRESULT = 0x80110606_u32 as _; +pub const CONTEXT_E_ABORTED: windows_sys::core::HRESULT = 0x8004E002_u32 as _; +pub const CONTEXT_E_ABORTING: windows_sys::core::HRESULT = 0x8004E003_u32 as _; +pub const CONTEXT_E_FIRST: i32 = -2147164160i32; +pub const CONTEXT_E_LAST: i32 = -2147164113i32; +pub const CONTEXT_E_NOCONTEXT: windows_sys::core::HRESULT = 0x8004E004_u32 as _; +pub const CONTEXT_E_NOJIT: windows_sys::core::HRESULT = 0x8004E026_u32 as _; +pub const CONTEXT_E_NOTRANSACTION: windows_sys::core::HRESULT = 0x8004E027_u32 as _; +pub const CONTEXT_E_OLDREF: windows_sys::core::HRESULT = 0x8004E007_u32 as _; +pub const CONTEXT_E_ROLENOTFOUND: windows_sys::core::HRESULT = 0x8004E00C_u32 as _; +pub const CONTEXT_E_SYNCH_TIMEOUT: windows_sys::core::HRESULT = 0x8004E006_u32 as _; +pub const CONTEXT_E_TMNOTAVAILABLE: windows_sys::core::HRESULT = 0x8004E00F_u32 as _; +pub const CONTEXT_E_WOULD_DEADLOCK: windows_sys::core::HRESULT = 0x8004E005_u32 as _; +pub const CONTEXT_S_FIRST: i32 = 319488i32; +pub const CONTEXT_S_LAST: i32 = 319535i32; +pub const CONTROL_C_EXIT: NTSTATUS = 0xC000013A_u32 as _; +pub const CONVERT10_E_FIRST: i32 = -2147221056i32; +pub const CONVERT10_E_LAST: i32 = -2147221041i32; +pub const CONVERT10_E_OLELINK_DISABLED: windows_sys::core::HRESULT = 0x800401C7_u32 as _; +pub const CONVERT10_E_OLESTREAM_BITMAP_TO_DIB: windows_sys::core::HRESULT = 0x800401C3_u32 as _; +pub const CONVERT10_E_OLESTREAM_FMT: windows_sys::core::HRESULT = 0x800401C2_u32 as _; +pub const CONVERT10_E_OLESTREAM_GET: windows_sys::core::HRESULT = 0x800401C0_u32 as _; +pub const CONVERT10_E_OLESTREAM_PUT: windows_sys::core::HRESULT = 0x800401C1_u32 as _; +pub const CONVERT10_E_STG_DIB_TO_BITMAP: windows_sys::core::HRESULT = 0x800401C6_u32 as _; +pub const CONVERT10_E_STG_FMT: windows_sys::core::HRESULT = 0x800401C4_u32 as _; +pub const CONVERT10_E_STG_NO_STD_STREAM: windows_sys::core::HRESULT = 0x800401C5_u32 as _; +pub const CONVERT10_S_FIRST: i32 = 262592i32; +pub const CONVERT10_S_LAST: i32 = 262607i32; +pub const CONVERT10_S_NO_PRESENTATION: windows_sys::core::HRESULT = 0x401C0_u32 as _; +pub const CO_E_ACCESSCHECKFAILED: windows_sys::core::HRESULT = 0x8001012A_u32 as _; +pub const CO_E_ACESINWRONGORDER: windows_sys::core::HRESULT = 0x8001013A_u32 as _; +pub const CO_E_ACNOTINITIALIZED: windows_sys::core::HRESULT = 0x8001013F_u32 as _; +pub const CO_E_ACTIVATIONFAILED: windows_sys::core::HRESULT = 0x8004E021_u32 as _; +pub const CO_E_ACTIVATIONFAILED_CATALOGERROR: windows_sys::core::HRESULT = 0x8004E023_u32 as _; +pub const CO_E_ACTIVATIONFAILED_EVENTLOGGED: windows_sys::core::HRESULT = 0x8004E022_u32 as _; +pub const CO_E_ACTIVATIONFAILED_TIMEOUT: windows_sys::core::HRESULT = 0x8004E024_u32 as _; +pub const CO_E_ALREADYINITIALIZED: windows_sys::core::HRESULT = 0x800401F1_u32 as _; +pub const CO_E_APPDIDNTREG: windows_sys::core::HRESULT = 0x800401FE_u32 as _; +pub const CO_E_APPNOTFOUND: windows_sys::core::HRESULT = 0x800401F5_u32 as _; +pub const CO_E_APPSINGLEUSE: windows_sys::core::HRESULT = 0x800401F6_u32 as _; +pub const CO_E_ASYNC_WORK_REJECTED: windows_sys::core::HRESULT = 0x80004029_u32 as _; +pub const CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT: windows_sys::core::HRESULT = 0x80004024_u32 as _; +pub const CO_E_BAD_PATH: windows_sys::core::HRESULT = 0x80080004_u32 as _; +pub const CO_E_BAD_SERVER_NAME: windows_sys::core::HRESULT = 0x80004014_u32 as _; +pub const CO_E_CALL_OUT_OF_TX_SCOPE_NOT_ALLOWED: windows_sys::core::HRESULT = 0x8004E030_u32 as _; +pub const CO_E_CANCEL_DISABLED: windows_sys::core::HRESULT = 0x80010140_u32 as _; +pub const CO_E_CANTDETERMINECLASS: windows_sys::core::HRESULT = 0x800401F2_u32 as _; +pub const CO_E_CANT_REMOTE: windows_sys::core::HRESULT = 0x80004013_u32 as _; +pub const CO_E_CLASSSTRING: windows_sys::core::HRESULT = 0x800401F3_u32 as _; +pub const CO_E_CLASS_CREATE_FAILED: windows_sys::core::HRESULT = 0x80080001_u32 as _; +pub const CO_E_CLASS_DISABLED: windows_sys::core::HRESULT = 0x80004027_u32 as _; +pub const CO_E_CLRNOTAVAILABLE: windows_sys::core::HRESULT = 0x80004028_u32 as _; +pub const CO_E_CLSREG_INCONSISTENT: windows_sys::core::HRESULT = 0x8000401F_u32 as _; +pub const CO_E_CONVERSIONFAILED: windows_sys::core::HRESULT = 0x8001012E_u32 as _; +pub const CO_E_CREATEPROCESS_FAILURE: windows_sys::core::HRESULT = 0x80004018_u32 as _; +pub const CO_E_DBERROR: windows_sys::core::HRESULT = 0x8004E02B_u32 as _; +pub const CO_E_DECODEFAILED: windows_sys::core::HRESULT = 0x8001013D_u32 as _; +pub const CO_E_DLLNOTFOUND: windows_sys::core::HRESULT = 0x800401F8_u32 as _; +pub const CO_E_ELEVATION_DISABLED: windows_sys::core::HRESULT = 0x80080017_u32 as _; +pub const CO_E_ERRORINAPP: windows_sys::core::HRESULT = 0x800401F7_u32 as _; +pub const CO_E_ERRORINDLL: windows_sys::core::HRESULT = 0x800401F9_u32 as _; +pub const CO_E_EXCEEDSYSACLLIMIT: windows_sys::core::HRESULT = 0x80010139_u32 as _; +pub const CO_E_EXIT_TRANSACTION_SCOPE_NOT_CALLED: windows_sys::core::HRESULT = 0x8004E031_u32 as _; +pub const CO_E_FAILEDTOCLOSEHANDLE: windows_sys::core::HRESULT = 0x80010138_u32 as _; +pub const CO_E_FAILEDTOCREATEFILE: windows_sys::core::HRESULT = 0x80010137_u32 as _; +pub const CO_E_FAILEDTOGENUUID: windows_sys::core::HRESULT = 0x80010136_u32 as _; +pub const CO_E_FAILEDTOGETSECCTX: windows_sys::core::HRESULT = 0x80010124_u32 as _; +pub const CO_E_FAILEDTOGETTOKENINFO: windows_sys::core::HRESULT = 0x80010126_u32 as _; +pub const CO_E_FAILEDTOGETWINDIR: windows_sys::core::HRESULT = 0x80010134_u32 as _; +pub const CO_E_FAILEDTOIMPERSONATE: windows_sys::core::HRESULT = 0x80010123_u32 as _; +pub const CO_E_FAILEDTOOPENPROCESSTOKEN: windows_sys::core::HRESULT = 0x8001013C_u32 as _; +pub const CO_E_FAILEDTOOPENTHREADTOKEN: windows_sys::core::HRESULT = 0x80010125_u32 as _; +pub const CO_E_FAILEDTOQUERYCLIENTBLANKET: windows_sys::core::HRESULT = 0x80010128_u32 as _; +pub const CO_E_FAILEDTOSETDACL: windows_sys::core::HRESULT = 0x80010129_u32 as _; +pub const CO_E_FIRST: i32 = -2147221008i32; +pub const CO_E_IIDREG_INCONSISTENT: windows_sys::core::HRESULT = 0x80004020_u32 as _; +pub const CO_E_IIDSTRING: windows_sys::core::HRESULT = 0x800401F4_u32 as _; +pub const CO_E_INCOMPATIBLESTREAMVERSION: windows_sys::core::HRESULT = 0x8001013B_u32 as _; +pub const CO_E_INITIALIZATIONFAILED: windows_sys::core::HRESULT = 0x8004E025_u32 as _; +pub const CO_E_INIT_CLASS_CACHE: windows_sys::core::HRESULT = 0x80004009_u32 as _; +pub const CO_E_INIT_MEMORY_ALLOCATOR: windows_sys::core::HRESULT = 0x80004008_u32 as _; +pub const CO_E_INIT_ONLY_SINGLE_THREADED: windows_sys::core::HRESULT = 0x80004012_u32 as _; +pub const CO_E_INIT_RPC_CHANNEL: windows_sys::core::HRESULT = 0x8000400A_u32 as _; +pub const CO_E_INIT_SCM_EXEC_FAILURE: windows_sys::core::HRESULT = 0x80004011_u32 as _; +pub const CO_E_INIT_SCM_FILE_MAPPING_EXISTS: windows_sys::core::HRESULT = 0x8000400F_u32 as _; +pub const CO_E_INIT_SCM_MAP_VIEW_OF_FILE: windows_sys::core::HRESULT = 0x80004010_u32 as _; +pub const CO_E_INIT_SCM_MUTEX_EXISTS: windows_sys::core::HRESULT = 0x8000400E_u32 as _; +pub const CO_E_INIT_SHARED_ALLOCATOR: windows_sys::core::HRESULT = 0x80004007_u32 as _; +pub const CO_E_INIT_TLS: windows_sys::core::HRESULT = 0x80004006_u32 as _; +pub const CO_E_INIT_TLS_CHANNEL_CONTROL: windows_sys::core::HRESULT = 0x8000400C_u32 as _; +pub const CO_E_INIT_TLS_SET_CHANNEL_CONTROL: windows_sys::core::HRESULT = 0x8000400B_u32 as _; +pub const CO_E_INIT_UNACCEPTED_USER_ALLOCATOR: windows_sys::core::HRESULT = 0x8000400D_u32 as _; +pub const CO_E_INVALIDSID: windows_sys::core::HRESULT = 0x8001012D_u32 as _; +pub const CO_E_ISOLEVELMISMATCH: windows_sys::core::HRESULT = 0x8004E02F_u32 as _; +pub const CO_E_LAST: i32 = -2147220993i32; +pub const CO_E_LAUNCH_PERMSSION_DENIED: windows_sys::core::HRESULT = 0x8000401B_u32 as _; +pub const CO_E_LOOKUPACCNAMEFAILED: windows_sys::core::HRESULT = 0x80010132_u32 as _; +pub const CO_E_LOOKUPACCSIDFAILED: windows_sys::core::HRESULT = 0x80010130_u32 as _; +pub const CO_E_MALFORMED_SPN: windows_sys::core::HRESULT = 0x80004033_u32 as _; +pub const CO_E_MISSING_DISPLAYNAME: windows_sys::core::HRESULT = 0x80080015_u32 as _; +pub const CO_E_MSI_ERROR: windows_sys::core::HRESULT = 0x80004023_u32 as _; +pub const CO_E_NETACCESSAPIFAILED: windows_sys::core::HRESULT = 0x8001012B_u32 as _; +pub const CO_E_NOCOOKIES: windows_sys::core::HRESULT = 0x8004E02A_u32 as _; +pub const CO_E_NOIISINTRINSICS: windows_sys::core::HRESULT = 0x8004E029_u32 as _; +pub const CO_E_NOMATCHINGNAMEFOUND: windows_sys::core::HRESULT = 0x80010131_u32 as _; +pub const CO_E_NOMATCHINGSIDFOUND: windows_sys::core::HRESULT = 0x8001012F_u32 as _; +pub const CO_E_NOSYNCHRONIZATION: windows_sys::core::HRESULT = 0x8004E02E_u32 as _; +pub const CO_E_NOTCONSTRUCTED: windows_sys::core::HRESULT = 0x8004E02D_u32 as _; +pub const CO_E_NOTINITIALIZED: windows_sys::core::HRESULT = 0x800401F0_u32 as _; +pub const CO_E_NOTPOOLED: windows_sys::core::HRESULT = 0x8004E02C_u32 as _; +pub const CO_E_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80004021_u32 as _; +pub const CO_E_NO_SECCTX_IN_ACTIVATE: windows_sys::core::HRESULT = 0x8000402B_u32 as _; +pub const CO_E_OBJISREG: windows_sys::core::HRESULT = 0x800401FC_u32 as _; +pub const CO_E_OBJNOTCONNECTED: windows_sys::core::HRESULT = 0x800401FD_u32 as _; +pub const CO_E_OBJNOTREG: windows_sys::core::HRESULT = 0x800401FB_u32 as _; +pub const CO_E_OBJSRV_RPC_FAILURE: windows_sys::core::HRESULT = 0x80080006_u32 as _; +pub const CO_E_OLE1DDE_DISABLED: windows_sys::core::HRESULT = 0x80004016_u32 as _; +pub const CO_E_PATHTOOLONG: windows_sys::core::HRESULT = 0x80010135_u32 as _; +pub const CO_E_PREMATURE_STUB_RUNDOWN: windows_sys::core::HRESULT = 0x80004035_u32 as _; +pub const CO_E_RELEASED: windows_sys::core::HRESULT = 0x800401FF_u32 as _; +pub const CO_E_RELOAD_DLL: windows_sys::core::HRESULT = 0x80004022_u32 as _; +pub const CO_E_REMOTE_COMMUNICATION_FAILURE: windows_sys::core::HRESULT = 0x8000401D_u32 as _; +pub const CO_E_RUNAS_CREATEPROCESS_FAILURE: windows_sys::core::HRESULT = 0x80004019_u32 as _; +pub const CO_E_RUNAS_LOGON_FAILURE: windows_sys::core::HRESULT = 0x8000401A_u32 as _; +pub const CO_E_RUNAS_SYNTAX: windows_sys::core::HRESULT = 0x80004017_u32 as _; +pub const CO_E_RUNAS_VALUE_MUST_BE_AAA: windows_sys::core::HRESULT = 0x80080016_u32 as _; +pub const CO_E_SCM_ERROR: windows_sys::core::HRESULT = 0x80080002_u32 as _; +pub const CO_E_SCM_RPC_FAILURE: windows_sys::core::HRESULT = 0x80080003_u32 as _; +pub const CO_E_SERVER_EXEC_FAILURE: windows_sys::core::HRESULT = 0x80080005_u32 as _; +pub const CO_E_SERVER_INIT_TIMEOUT: windows_sys::core::HRESULT = 0x8000402A_u32 as _; +pub const CO_E_SERVER_NOT_PAUSED: windows_sys::core::HRESULT = 0x80004026_u32 as _; +pub const CO_E_SERVER_PAUSED: windows_sys::core::HRESULT = 0x80004025_u32 as _; +pub const CO_E_SERVER_START_TIMEOUT: windows_sys::core::HRESULT = 0x8000401E_u32 as _; +pub const CO_E_SERVER_STOPPING: windows_sys::core::HRESULT = 0x80080008_u32 as _; +pub const CO_E_SETSERLHNDLFAILED: windows_sys::core::HRESULT = 0x80010133_u32 as _; +pub const CO_E_START_SERVICE_FAILURE: windows_sys::core::HRESULT = 0x8000401C_u32 as _; +pub const CO_E_SXS_CONFIG: windows_sys::core::HRESULT = 0x80004032_u32 as _; +pub const CO_E_THREADINGMODEL_CHANGED: windows_sys::core::HRESULT = 0x8004E028_u32 as _; +pub const CO_E_THREADPOOL_CONFIG: windows_sys::core::HRESULT = 0x80004031_u32 as _; +pub const CO_E_TRACKER_CONFIG: windows_sys::core::HRESULT = 0x80004030_u32 as _; +pub const CO_E_TRUSTEEDOESNTMATCHCLIENT: windows_sys::core::HRESULT = 0x80010127_u32 as _; +pub const CO_E_UNREVOKED_REGISTRATION_ON_APARTMENT_SHUTDOWN: windows_sys::core::HRESULT = 0x80004034_u32 as _; +pub const CO_E_WRONGOSFORAPP: windows_sys::core::HRESULT = 0x800401FA_u32 as _; +pub const CO_E_WRONGTRUSTEENAMESYNTAX: windows_sys::core::HRESULT = 0x8001012C_u32 as _; +pub const CO_E_WRONG_SERVER_IDENTITY: windows_sys::core::HRESULT = 0x80004015_u32 as _; +pub const CO_S_FIRST: i32 = 262640i32; +pub const CO_S_LAST: i32 = 262655i32; +pub const CO_S_MACHINENAMENOTFOUND: windows_sys::core::HRESULT = 0x80013_u32 as _; +pub const CO_S_NOTALLINTERFACES: windows_sys::core::HRESULT = 0x80012_u32 as _; +pub const CRYPT_E_ALREADY_DECRYPTED: windows_sys::core::HRESULT = 0x80091009_u32 as _; +pub const CRYPT_E_ASN1_BADARGS: windows_sys::core::HRESULT = 0x80093109_u32 as _; +pub const CRYPT_E_ASN1_BADPDU: windows_sys::core::HRESULT = 0x80093108_u32 as _; +pub const CRYPT_E_ASN1_BADREAL: windows_sys::core::HRESULT = 0x8009310A_u32 as _; +pub const CRYPT_E_ASN1_BADTAG: windows_sys::core::HRESULT = 0x8009310B_u32 as _; +pub const CRYPT_E_ASN1_CHOICE: windows_sys::core::HRESULT = 0x8009310C_u32 as _; +pub const CRYPT_E_ASN1_CONSTRAINT: windows_sys::core::HRESULT = 0x80093105_u32 as _; +pub const CRYPT_E_ASN1_CORRUPT: windows_sys::core::HRESULT = 0x80093103_u32 as _; +pub const CRYPT_E_ASN1_EOD: windows_sys::core::HRESULT = 0x80093102_u32 as _; +pub const CRYPT_E_ASN1_ERROR: windows_sys::core::HRESULT = 0x80093100_u32 as _; +pub const CRYPT_E_ASN1_EXTENDED: windows_sys::core::HRESULT = 0x80093201_u32 as _; +pub const CRYPT_E_ASN1_INTERNAL: windows_sys::core::HRESULT = 0x80093101_u32 as _; +pub const CRYPT_E_ASN1_LARGE: windows_sys::core::HRESULT = 0x80093104_u32 as _; +pub const CRYPT_E_ASN1_MEMORY: windows_sys::core::HRESULT = 0x80093106_u32 as _; +pub const CRYPT_E_ASN1_NOEOD: windows_sys::core::HRESULT = 0x80093202_u32 as _; +pub const CRYPT_E_ASN1_NYI: windows_sys::core::HRESULT = 0x80093134_u32 as _; +pub const CRYPT_E_ASN1_OVERFLOW: windows_sys::core::HRESULT = 0x80093107_u32 as _; +pub const CRYPT_E_ASN1_PDU_TYPE: windows_sys::core::HRESULT = 0x80093133_u32 as _; +pub const CRYPT_E_ASN1_RULE: windows_sys::core::HRESULT = 0x8009310D_u32 as _; +pub const CRYPT_E_ASN1_UTF8: windows_sys::core::HRESULT = 0x8009310E_u32 as _; +pub const CRYPT_E_ATTRIBUTES_MISSING: windows_sys::core::HRESULT = 0x8009100F_u32 as _; +pub const CRYPT_E_AUTH_ATTR_MISSING: windows_sys::core::HRESULT = 0x80091006_u32 as _; +pub const CRYPT_E_BAD_ENCODE: windows_sys::core::HRESULT = 0x80092002_u32 as _; +pub const CRYPT_E_BAD_LEN: windows_sys::core::HRESULT = 0x80092001_u32 as _; +pub const CRYPT_E_BAD_MSG: windows_sys::core::HRESULT = 0x8009200D_u32 as _; +pub const CRYPT_E_CONTROL_TYPE: windows_sys::core::HRESULT = 0x8009100C_u32 as _; +pub const CRYPT_E_DELETED_PREV: windows_sys::core::HRESULT = 0x80092008_u32 as _; +pub const CRYPT_E_EXISTS: windows_sys::core::HRESULT = 0x80092005_u32 as _; +pub const CRYPT_E_FILERESIZED: windows_sys::core::HRESULT = 0x80092025_u32 as _; +pub const CRYPT_E_FILE_ERROR: windows_sys::core::HRESULT = 0x80092003_u32 as _; +pub const CRYPT_E_HASH_VALUE: windows_sys::core::HRESULT = 0x80091007_u32 as _; +pub const CRYPT_E_INVALID_IA5_STRING: windows_sys::core::HRESULT = 0x80092022_u32 as _; +pub const CRYPT_E_INVALID_INDEX: windows_sys::core::HRESULT = 0x80091008_u32 as _; +pub const CRYPT_E_INVALID_MSG_TYPE: windows_sys::core::HRESULT = 0x80091004_u32 as _; +pub const CRYPT_E_INVALID_NUMERIC_STRING: windows_sys::core::HRESULT = 0x80092020_u32 as _; +pub const CRYPT_E_INVALID_PRINTABLE_STRING: windows_sys::core::HRESULT = 0x80092021_u32 as _; +pub const CRYPT_E_INVALID_X500_STRING: windows_sys::core::HRESULT = 0x80092023_u32 as _; +pub const CRYPT_E_ISSUER_SERIALNUMBER: windows_sys::core::HRESULT = 0x8009100D_u32 as _; +pub const CRYPT_E_MISSING_PUBKEY_PARA: windows_sys::core::HRESULT = 0x8009202C_u32 as _; +pub const CRYPT_E_MSG_ERROR: windows_sys::core::HRESULT = 0x80091001_u32 as _; +pub const CRYPT_E_NOT_CHAR_STRING: windows_sys::core::HRESULT = 0x80092024_u32 as _; +pub const CRYPT_E_NOT_DECRYPTED: windows_sys::core::HRESULT = 0x8009100A_u32 as _; +pub const CRYPT_E_NOT_FOUND: windows_sys::core::HRESULT = 0x80092004_u32 as _; +pub const CRYPT_E_NOT_IN_CTL: windows_sys::core::HRESULT = 0x8009202A_u32 as _; +pub const CRYPT_E_NOT_IN_REVOCATION_DATABASE: windows_sys::core::HRESULT = 0x80092014_u32 as _; +pub const CRYPT_E_NO_DECRYPT_CERT: windows_sys::core::HRESULT = 0x8009200C_u32 as _; +pub const CRYPT_E_NO_KEY_PROPERTY: windows_sys::core::HRESULT = 0x8009200B_u32 as _; +pub const CRYPT_E_NO_MATCH: windows_sys::core::HRESULT = 0x80092009_u32 as _; +pub const CRYPT_E_NO_PROVIDER: windows_sys::core::HRESULT = 0x80092006_u32 as _; +pub const CRYPT_E_NO_REVOCATION_CHECK: windows_sys::core::HRESULT = 0x80092012_u32 as _; +pub const CRYPT_E_NO_REVOCATION_DLL: windows_sys::core::HRESULT = 0x80092011_u32 as _; +pub const CRYPT_E_NO_SIGNER: windows_sys::core::HRESULT = 0x8009200E_u32 as _; +pub const CRYPT_E_NO_TRUSTED_SIGNER: windows_sys::core::HRESULT = 0x8009202B_u32 as _; +pub const CRYPT_E_NO_VERIFY_USAGE_CHECK: windows_sys::core::HRESULT = 0x80092028_u32 as _; +pub const CRYPT_E_NO_VERIFY_USAGE_DLL: windows_sys::core::HRESULT = 0x80092027_u32 as _; +pub const CRYPT_E_OBJECT_LOCATOR_OBJECT_NOT_FOUND: windows_sys::core::HRESULT = 0x8009202D_u32 as _; +pub const CRYPT_E_OID_FORMAT: windows_sys::core::HRESULT = 0x80091003_u32 as _; +pub const CRYPT_E_OSS_ERROR: windows_sys::core::HRESULT = 0x80093000_u32 as _; +pub const CRYPT_E_PENDING_CLOSE: windows_sys::core::HRESULT = 0x8009200F_u32 as _; +pub const CRYPT_E_RECIPIENT_NOT_FOUND: windows_sys::core::HRESULT = 0x8009100B_u32 as _; +pub const CRYPT_E_REVOCATION_OFFLINE: windows_sys::core::HRESULT = 0x80092013_u32 as _; +pub const CRYPT_E_REVOKED: windows_sys::core::HRESULT = 0x80092010_u32 as _; +pub const CRYPT_E_SECURITY_SETTINGS: windows_sys::core::HRESULT = 0x80092026_u32 as _; +pub const CRYPT_E_SELF_SIGNED: windows_sys::core::HRESULT = 0x80092007_u32 as _; +pub const CRYPT_E_SIGNER_NOT_FOUND: windows_sys::core::HRESULT = 0x8009100E_u32 as _; +pub const CRYPT_E_STREAM_INSUFFICIENT_DATA: windows_sys::core::HRESULT = 0x80091011_u32 as _; +pub const CRYPT_E_STREAM_MSG_NOT_READY: windows_sys::core::HRESULT = 0x80091010_u32 as _; +pub const CRYPT_E_UNEXPECTED_ENCODING: windows_sys::core::HRESULT = 0x80091005_u32 as _; +pub const CRYPT_E_UNEXPECTED_MSG_TYPE: windows_sys::core::HRESULT = 0x8009200A_u32 as _; +pub const CRYPT_E_UNKNOWN_ALGO: windows_sys::core::HRESULT = 0x80091002_u32 as _; +pub const CRYPT_E_VERIFY_USAGE_OFFLINE: windows_sys::core::HRESULT = 0x80092029_u32 as _; +pub const CRYPT_I_NEW_PROTECTION_REQUIRED: windows_sys::core::HRESULT = 0x91012_u32 as _; +pub const CS_E_ADMIN_LIMIT_EXCEEDED: windows_sys::core::HRESULT = 0x8004016D_u32 as _; +pub const CS_E_CLASS_NOTFOUND: windows_sys::core::HRESULT = 0x80040166_u32 as _; +pub const CS_E_FIRST: i32 = -2147221148i32; +pub const CS_E_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x8004016F_u32 as _; +pub const CS_E_INVALID_PATH: windows_sys::core::HRESULT = 0x8004016B_u32 as _; +pub const CS_E_INVALID_VERSION: windows_sys::core::HRESULT = 0x80040167_u32 as _; +pub const CS_E_LAST: i32 = -2147221137i32; +pub const CS_E_NETWORK_ERROR: windows_sys::core::HRESULT = 0x8004016C_u32 as _; +pub const CS_E_NOT_DELETABLE: windows_sys::core::HRESULT = 0x80040165_u32 as _; +pub const CS_E_NO_CLASSSTORE: windows_sys::core::HRESULT = 0x80040168_u32 as _; +pub const CS_E_OBJECT_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x8004016A_u32 as _; +pub const CS_E_OBJECT_NOTFOUND: windows_sys::core::HRESULT = 0x80040169_u32 as _; +pub const CS_E_PACKAGE_NOTFOUND: windows_sys::core::HRESULT = 0x80040164_u32 as _; +pub const CS_E_SCHEMA_MISMATCH: windows_sys::core::HRESULT = 0x8004016E_u32 as _; +pub const D2DERR_BAD_NUMBER: windows_sys::core::HRESULT = 0x88990011_u32 as _; +pub const D2DERR_BITMAP_BOUND_AS_TARGET: windows_sys::core::HRESULT = 0x88990025_u32 as _; +pub const D2DERR_BITMAP_CANNOT_DRAW: windows_sys::core::HRESULT = 0x88990021_u32 as _; +pub const D2DERR_CYCLIC_GRAPH: windows_sys::core::HRESULT = 0x88990020_u32 as _; +pub const D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x88990009_u32 as _; +pub const D2DERR_DISPLAY_STATE_INVALID: windows_sys::core::HRESULT = 0x88990006_u32 as _; +pub const D2DERR_EFFECT_IS_NOT_REGISTERED: windows_sys::core::HRESULT = 0x88990028_u32 as _; +pub const D2DERR_EXCEEDS_MAX_BITMAP_SIZE: windows_sys::core::HRESULT = 0x8899001D_u32 as _; +pub const D2DERR_INCOMPATIBLE_BRUSH_TYPES: windows_sys::core::HRESULT = 0x88990018_u32 as _; +pub const D2DERR_INSUFFICIENT_DEVICE_CAPABILITIES: windows_sys::core::HRESULT = 0x88990026_u32 as _; +pub const D2DERR_INTERMEDIATE_TOO_LARGE: windows_sys::core::HRESULT = 0x88990027_u32 as _; +pub const D2DERR_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x88990008_u32 as _; +pub const D2DERR_INVALID_CALL: windows_sys::core::HRESULT = 0x8899000A_u32 as _; +pub const D2DERR_INVALID_GLYPH_IMAGE: windows_sys::core::HRESULT = 0x8899002E_u32 as _; +pub const D2DERR_INVALID_GRAPH_CONFIGURATION: windows_sys::core::HRESULT = 0x8899001E_u32 as _; +pub const D2DERR_INVALID_INTERNAL_GRAPH_CONFIGURATION: windows_sys::core::HRESULT = 0x8899001F_u32 as _; +pub const D2DERR_INVALID_PROPERTY: windows_sys::core::HRESULT = 0x88990029_u32 as _; +pub const D2DERR_INVALID_TARGET: windows_sys::core::HRESULT = 0x88990024_u32 as _; +pub const D2DERR_LAYER_ALREADY_IN_USE: windows_sys::core::HRESULT = 0x88990013_u32 as _; +pub const D2DERR_MAX_TEXTURE_SIZE_EXCEEDED: windows_sys::core::HRESULT = 0x8899000F_u32 as _; +pub const D2DERR_NOT_INITIALIZED: windows_sys::core::HRESULT = 0x88990002_u32 as _; +pub const D2DERR_NO_HARDWARE_DEVICE: windows_sys::core::HRESULT = 0x8899000B_u32 as _; +pub const D2DERR_NO_SUBPROPERTIES: windows_sys::core::HRESULT = 0x8899002A_u32 as _; +pub const D2DERR_ORIGINAL_TARGET_NOT_BOUND: windows_sys::core::HRESULT = 0x88990023_u32 as _; +pub const D2DERR_OUTSTANDING_BITMAP_REFERENCES: windows_sys::core::HRESULT = 0x88990022_u32 as _; +pub const D2DERR_POP_CALL_DID_NOT_MATCH_PUSH: windows_sys::core::HRESULT = 0x88990014_u32 as _; +pub const D2DERR_PRINT_FORMAT_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8899002C_u32 as _; +pub const D2DERR_PRINT_JOB_CLOSED: windows_sys::core::HRESULT = 0x8899002B_u32 as _; +pub const D2DERR_PUSH_POP_UNBALANCED: windows_sys::core::HRESULT = 0x88990016_u32 as _; +pub const D2DERR_RECREATE_TARGET: windows_sys::core::HRESULT = 0x8899000C_u32 as _; +pub const D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT: windows_sys::core::HRESULT = 0x88990017_u32 as _; +pub const D2DERR_SCANNER_FAILED: windows_sys::core::HRESULT = 0x88990004_u32 as _; +pub const D2DERR_SCREEN_ACCESS_DENIED: windows_sys::core::HRESULT = 0x88990005_u32 as _; +pub const D2DERR_SHADER_COMPILE_FAILED: windows_sys::core::HRESULT = 0x8899000E_u32 as _; +pub const D2DERR_TARGET_NOT_GDI_COMPATIBLE: windows_sys::core::HRESULT = 0x8899001A_u32 as _; +pub const D2DERR_TEXT_EFFECT_IS_WRONG_TYPE: windows_sys::core::HRESULT = 0x8899001B_u32 as _; +pub const D2DERR_TEXT_RENDERER_NOT_RELEASED: windows_sys::core::HRESULT = 0x8899001C_u32 as _; +pub const D2DERR_TOO_MANY_SHADER_ELEMENTS: windows_sys::core::HRESULT = 0x8899000D_u32 as _; +pub const D2DERR_TOO_MANY_TRANSFORM_INPUTS: windows_sys::core::HRESULT = 0x8899002D_u32 as _; +pub const D2DERR_UNSUPPORTED_OPERATION: windows_sys::core::HRESULT = 0x88990003_u32 as _; +pub const D2DERR_UNSUPPORTED_VERSION: windows_sys::core::HRESULT = 0x88990010_u32 as _; +pub const D2DERR_WIN32_ERROR: windows_sys::core::HRESULT = 0x88990019_u32 as _; +pub const D2DERR_WRONG_FACTORY: windows_sys::core::HRESULT = 0x88990012_u32 as _; +pub const D2DERR_WRONG_RESOURCE_DOMAIN: windows_sys::core::HRESULT = 0x88990015_u32 as _; +pub const D2DERR_WRONG_STATE: windows_sys::core::HRESULT = 0x88990001_u32 as _; +pub const D2DERR_ZERO_VECTOR: windows_sys::core::HRESULT = 0x88990007_u32 as _; +pub const D3D10_ERROR_FILE_NOT_FOUND: windows_sys::core::HRESULT = 0x88790002_u32 as _; +pub const D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS: windows_sys::core::HRESULT = 0x88790001_u32 as _; +pub const D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD: windows_sys::core::HRESULT = 0x887C0004_u32 as _; +pub const D3D11_ERROR_FILE_NOT_FOUND: windows_sys::core::HRESULT = 0x887C0002_u32 as _; +pub const D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS: windows_sys::core::HRESULT = 0x887C0001_u32 as _; +pub const D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS: windows_sys::core::HRESULT = 0x887C0003_u32 as _; +pub const D3D12_ERROR_ADAPTER_NOT_FOUND: windows_sys::core::HRESULT = 0x887E0001_u32 as _; +pub const D3D12_ERROR_DRIVER_VERSION_MISMATCH: windows_sys::core::HRESULT = 0x887E0002_u32 as _; +pub const D3D12_ERROR_INVALID_REDIST: windows_sys::core::HRESULT = 0x887E0003_u32 as _; +pub const DATA_E_FIRST: i32 = -2147221200i32; +pub const DATA_E_LAST: i32 = -2147221185i32; +pub const DATA_S_FIRST: i32 = 262448i32; +pub const DATA_S_LAST: i32 = 262463i32; +pub const DATA_S_SAMEFORMATETC: windows_sys::core::HRESULT = 0x40130_u32 as _; +pub const DBG_APP_NOT_IDLE: NTSTATUS = 0xC0010002_u32 as _; +pub const DBG_COMMAND_EXCEPTION: NTSTATUS = 0x40010009_u32 as _; +pub const DBG_CONTINUE: NTSTATUS = 0x10002_u32 as _; +pub const DBG_CONTROL_BREAK: NTSTATUS = 0x40010008_u32 as _; +pub const DBG_CONTROL_C: NTSTATUS = 0x40010005_u32 as _; +pub const DBG_EXCEPTION_HANDLED: NTSTATUS = 0x10001_u32 as _; +pub const DBG_EXCEPTION_NOT_HANDLED: NTSTATUS = 0x80010001_u32 as _; +pub const DBG_NO_STATE_CHANGE: NTSTATUS = 0xC0010001_u32 as _; +pub const DBG_PRINTEXCEPTION_C: NTSTATUS = 0x40010006_u32 as _; +pub const DBG_PRINTEXCEPTION_WIDE_C: NTSTATUS = 0x4001000A_u32 as _; +pub const DBG_REPLY_LATER: NTSTATUS = 0x40010001_u32 as _; +pub const DBG_RIPEXCEPTION: NTSTATUS = 0x40010007_u32 as _; +pub const DBG_TERMINATE_PROCESS: NTSTATUS = 0x40010004_u32 as _; +pub const DBG_TERMINATE_THREAD: NTSTATUS = 0x40010003_u32 as _; +pub const DBG_UNABLE_TO_PROVIDE_HANDLE: NTSTATUS = 0x40010002_u32 as _; +pub const DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED: windows_sys::core::HRESULT = 0x88980801_u32 as _; +pub const DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED: windows_sys::core::HRESULT = 0x88980802_u32 as _; +pub const DCOMPOSITION_ERROR_WINDOW_ALREADY_COMPOSED: windows_sys::core::HRESULT = 0x88980800_u32 as _; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct DECIMAL { + pub wReserved: u16, + pub Anonymous1: DECIMAL_0, + pub Hi32: u32, + pub Anonymous2: DECIMAL_1, +} +impl Default for DECIMAL { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union DECIMAL_0 { + pub Anonymous: DECIMAL_0_0, + pub signscale: u16, +} +impl Default for DECIMAL_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct DECIMAL_0_0 { + pub scale: u8, + pub sign: u8, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union DECIMAL_1 { + pub Anonymous: DECIMAL_1_0, + pub Lo64: u64, +} +impl Default for DECIMAL_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct DECIMAL_1_0 { + pub Lo32: u32, + pub Mid32: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct DEVPROPKEY { + pub fmtid: windows_sys::core::GUID, + pub pid: u32, +} +pub const DIGSIG_E_CRYPTO: windows_sys::core::HRESULT = 0x800B0008_u32 as _; +pub const DIGSIG_E_DECODE: windows_sys::core::HRESULT = 0x800B0006_u32 as _; +pub const DIGSIG_E_ENCODE: windows_sys::core::HRESULT = 0x800B0005_u32 as _; +pub const DIGSIG_E_EXTENSIBILITY: windows_sys::core::HRESULT = 0x800B0007_u32 as _; +pub const DISP_E_ARRAYISLOCKED: windows_sys::core::HRESULT = 0x8002000D_u32 as _; +pub const DISP_E_BADCALLEE: windows_sys::core::HRESULT = 0x80020010_u32 as _; +pub const DISP_E_BADINDEX: windows_sys::core::HRESULT = 0x8002000B_u32 as _; +pub const DISP_E_BADPARAMCOUNT: windows_sys::core::HRESULT = 0x8002000E_u32 as _; +pub const DISP_E_BADVARTYPE: windows_sys::core::HRESULT = 0x80020008_u32 as _; +pub const DISP_E_BUFFERTOOSMALL: windows_sys::core::HRESULT = 0x80020013_u32 as _; +pub const DISP_E_DIVBYZERO: windows_sys::core::HRESULT = 0x80020012_u32 as _; +pub const DISP_E_EXCEPTION: windows_sys::core::HRESULT = 0x80020009_u32 as _; +pub const DISP_E_MEMBERNOTFOUND: windows_sys::core::HRESULT = 0x80020003_u32 as _; +pub const DISP_E_NONAMEDARGS: windows_sys::core::HRESULT = 0x80020007_u32 as _; +pub const DISP_E_NOTACOLLECTION: windows_sys::core::HRESULT = 0x80020011_u32 as _; +pub const DISP_E_OVERFLOW: windows_sys::core::HRESULT = 0x8002000A_u32 as _; +pub const DISP_E_PARAMNOTFOUND: windows_sys::core::HRESULT = 0x80020004_u32 as _; +pub const DISP_E_PARAMNOTOPTIONAL: windows_sys::core::HRESULT = 0x8002000F_u32 as _; +pub const DISP_E_TYPEMISMATCH: windows_sys::core::HRESULT = 0x80020005_u32 as _; +pub const DISP_E_UNKNOWNINTERFACE: windows_sys::core::HRESULT = 0x80020001_u32 as _; +pub const DISP_E_UNKNOWNLCID: windows_sys::core::HRESULT = 0x8002000C_u32 as _; +pub const DISP_E_UNKNOWNNAME: windows_sys::core::HRESULT = 0x80020006_u32 as _; +pub const DNS_ERROR_ADDRESS_REQUIRED: WIN32_ERROR = 9573u32; +pub const DNS_ERROR_ALIAS_LOOP: WIN32_ERROR = 9722u32; +pub const DNS_ERROR_AUTOZONE_ALREADY_EXISTS: WIN32_ERROR = 9610u32; +pub const DNS_ERROR_AXFR: WIN32_ERROR = 9752u32; +pub const DNS_ERROR_BACKGROUND_LOADING: WIN32_ERROR = 9568u32; +pub const DNS_ERROR_BAD_KEYMASTER: WIN32_ERROR = 9122u32; +pub const DNS_ERROR_BAD_PACKET: WIN32_ERROR = 9502u32; +pub const DNS_ERROR_CANNOT_FIND_ROOT_HINTS: WIN32_ERROR = 9564u32; +pub const DNS_ERROR_CLIENT_SUBNET_ALREADY_EXISTS: WIN32_ERROR = 9977u32; +pub const DNS_ERROR_CLIENT_SUBNET_DOES_NOT_EXIST: WIN32_ERROR = 9976u32; +pub const DNS_ERROR_CLIENT_SUBNET_IS_ACCESSED: WIN32_ERROR = 9975u32; +pub const DNS_ERROR_CNAME_COLLISION: WIN32_ERROR = 9709u32; +pub const DNS_ERROR_CNAME_LOOP: WIN32_ERROR = 9707u32; +pub const DNS_ERROR_DATABASE_BASE: WIN32_ERROR = 9700u32; +pub const DNS_ERROR_DATAFILE_BASE: WIN32_ERROR = 9650u32; +pub const DNS_ERROR_DATAFILE_OPEN_FAILURE: WIN32_ERROR = 9653u32; +pub const DNS_ERROR_DATAFILE_PARSING: WIN32_ERROR = 9655u32; +pub const DNS_ERROR_DEFAULT_SCOPE: WIN32_ERROR = 9960u32; +pub const DNS_ERROR_DEFAULT_VIRTUALIZATION_INSTANCE: WIN32_ERROR = 9925u32; +pub const DNS_ERROR_DEFAULT_ZONESCOPE: WIN32_ERROR = 9953u32; +pub const DNS_ERROR_DELEGATION_REQUIRED: WIN32_ERROR = 9571u32; +pub const DNS_ERROR_DNAME_COLLISION: WIN32_ERROR = 9721u32; +pub const DNS_ERROR_DNSSEC_BASE: WIN32_ERROR = 9100u32; +pub const DNS_ERROR_DNSSEC_IS_DISABLED: WIN32_ERROR = 9125u32; +pub const DNS_ERROR_DP_ALREADY_ENLISTED: WIN32_ERROR = 9904u32; +pub const DNS_ERROR_DP_ALREADY_EXISTS: WIN32_ERROR = 9902u32; +pub const DNS_ERROR_DP_BASE: WIN32_ERROR = 9900u32; +pub const DNS_ERROR_DP_DOES_NOT_EXIST: WIN32_ERROR = 9901u32; +pub const DNS_ERROR_DP_FSMO_ERROR: WIN32_ERROR = 9906u32; +pub const DNS_ERROR_DP_NOT_AVAILABLE: WIN32_ERROR = 9905u32; +pub const DNS_ERROR_DP_NOT_ENLISTED: WIN32_ERROR = 9903u32; +pub const DNS_ERROR_DS_UNAVAILABLE: WIN32_ERROR = 9717u32; +pub const DNS_ERROR_DS_ZONE_ALREADY_EXISTS: WIN32_ERROR = 9718u32; +pub const DNS_ERROR_DWORD_VALUE_TOO_LARGE: WIN32_ERROR = 9567u32; +pub const DNS_ERROR_DWORD_VALUE_TOO_SMALL: WIN32_ERROR = 9566u32; +pub const DNS_ERROR_FILE_WRITEBACK_FAILED: WIN32_ERROR = 9654u32; +pub const DNS_ERROR_FORWARDER_ALREADY_EXISTS: WIN32_ERROR = 9619u32; +pub const DNS_ERROR_GENERAL_API_BASE: WIN32_ERROR = 9550u32; +pub const DNS_ERROR_INCONSISTENT_ROOT_HINTS: WIN32_ERROR = 9565u32; +pub const DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME: WIN32_ERROR = 9924u32; +pub const DNS_ERROR_INVALID_CLIENT_SUBNET_NAME: WIN32_ERROR = 9984u32; +pub const DNS_ERROR_INVALID_DATA: WIN32_ERROR = 13u32; +pub const DNS_ERROR_INVALID_DATAFILE_NAME: WIN32_ERROR = 9652u32; +pub const DNS_ERROR_INVALID_INITIAL_ROLLOVER_OFFSET: WIN32_ERROR = 9115u32; +pub const DNS_ERROR_INVALID_IP_ADDRESS: WIN32_ERROR = 9552u32; +pub const DNS_ERROR_INVALID_KEY_SIZE: WIN32_ERROR = 9106u32; +pub const DNS_ERROR_INVALID_NAME: WIN32_ERROR = 123u32; +pub const DNS_ERROR_INVALID_NAME_CHAR: WIN32_ERROR = 9560u32; +pub const DNS_ERROR_INVALID_NSEC3_ITERATION_COUNT: WIN32_ERROR = 9124u32; +pub const DNS_ERROR_INVALID_POLICY_TABLE: WIN32_ERROR = 9572u32; +pub const DNS_ERROR_INVALID_PROPERTY: WIN32_ERROR = 9553u32; +pub const DNS_ERROR_INVALID_ROLLOVER_PERIOD: WIN32_ERROR = 9114u32; +pub const DNS_ERROR_INVALID_SCOPE_NAME: WIN32_ERROR = 9958u32; +pub const DNS_ERROR_INVALID_SCOPE_OPERATION: WIN32_ERROR = 9961u32; +pub const DNS_ERROR_INVALID_SIGNATURE_VALIDITY_PERIOD: WIN32_ERROR = 9123u32; +pub const DNS_ERROR_INVALID_TYPE: WIN32_ERROR = 9551u32; +pub const DNS_ERROR_INVALID_XML: WIN32_ERROR = 9126u32; +pub const DNS_ERROR_INVALID_ZONESCOPE_NAME: WIN32_ERROR = 9954u32; +pub const DNS_ERROR_INVALID_ZONE_OPERATION: WIN32_ERROR = 9603u32; +pub const DNS_ERROR_INVALID_ZONE_TYPE: WIN32_ERROR = 9611u32; +pub const DNS_ERROR_KEYMASTER_REQUIRED: WIN32_ERROR = 9101u32; +pub const DNS_ERROR_KSP_DOES_NOT_SUPPORT_PROTECTION: WIN32_ERROR = 9108u32; +pub const DNS_ERROR_KSP_NOT_ACCESSIBLE: WIN32_ERROR = 9112u32; +pub const DNS_ERROR_LOAD_ZONESCOPE_FAILED: WIN32_ERROR = 9956u32; +pub const DNS_ERROR_MASK: WIN32_ERROR = 9000u32; +pub const DNS_ERROR_NAME_DOES_NOT_EXIST: WIN32_ERROR = 9714u32; +pub const DNS_ERROR_NAME_NOT_IN_ZONE: WIN32_ERROR = 9706u32; +pub const DNS_ERROR_NBSTAT_INIT_FAILED: WIN32_ERROR = 9617u32; +pub const DNS_ERROR_NEED_SECONDARY_ADDRESSES: WIN32_ERROR = 9614u32; +pub const DNS_ERROR_NEED_WINS_SERVERS: WIN32_ERROR = 9616u32; +pub const DNS_ERROR_NODE_CREATION_FAILED: WIN32_ERROR = 9703u32; +pub const DNS_ERROR_NODE_IS_CNAME: WIN32_ERROR = 9708u32; +pub const DNS_ERROR_NODE_IS_DNAME: WIN32_ERROR = 9720u32; +pub const DNS_ERROR_NON_RFC_NAME: WIN32_ERROR = 9556u32; +pub const DNS_ERROR_NOT_ALLOWED_ON_ACTIVE_SKD: WIN32_ERROR = 9119u32; +pub const DNS_ERROR_NOT_ALLOWED_ON_RODC: WIN32_ERROR = 9569u32; +pub const DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER: WIN32_ERROR = 9562u32; +pub const DNS_ERROR_NOT_ALLOWED_ON_SIGNED_ZONE: WIN32_ERROR = 9102u32; +pub const DNS_ERROR_NOT_ALLOWED_ON_UNSIGNED_ZONE: WIN32_ERROR = 9121u32; +pub const DNS_ERROR_NOT_ALLOWED_ON_ZSK: WIN32_ERROR = 9118u32; +pub const DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION: WIN32_ERROR = 9563u32; +pub const DNS_ERROR_NOT_ALLOWED_UNDER_DNAME: WIN32_ERROR = 9570u32; +pub const DNS_ERROR_NOT_ALLOWED_WITH_ZONESCOPES: WIN32_ERROR = 9955u32; +pub const DNS_ERROR_NOT_ENOUGH_SIGNING_KEY_DESCRIPTORS: WIN32_ERROR = 9104u32; +pub const DNS_ERROR_NOT_UNIQUE: WIN32_ERROR = 9555u32; +pub const DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE: WIN32_ERROR = 9719u32; +pub const DNS_ERROR_NO_CREATE_CACHE_DATA: WIN32_ERROR = 9713u32; +pub const DNS_ERROR_NO_DNS_SERVERS: WIN32_ERROR = 9852u32; +pub const DNS_ERROR_NO_MEMORY: WIN32_ERROR = 14u32; +pub const DNS_ERROR_NO_PACKET: WIN32_ERROR = 9503u32; +pub const DNS_ERROR_NO_TCPIP: WIN32_ERROR = 9851u32; +pub const DNS_ERROR_NO_VALID_TRUST_ANCHORS: WIN32_ERROR = 9127u32; +pub const DNS_ERROR_NO_ZONE_INFO: WIN32_ERROR = 9602u32; +pub const DNS_ERROR_NSEC3_INCOMPATIBLE_WITH_RSA_SHA1: WIN32_ERROR = 9103u32; +pub const DNS_ERROR_NSEC3_NAME_COLLISION: WIN32_ERROR = 9129u32; +pub const DNS_ERROR_NSEC_INCOMPATIBLE_WITH_NSEC3_RSA_SHA1: WIN32_ERROR = 9130u32; +pub const DNS_ERROR_NUMERIC_NAME: WIN32_ERROR = 9561u32; +pub const DNS_ERROR_OPERATION_BASE: WIN32_ERROR = 9750u32; +pub const DNS_ERROR_PACKET_FMT_BASE: WIN32_ERROR = 9500u32; +pub const DNS_ERROR_POLICY_ALREADY_EXISTS: WIN32_ERROR = 9971u32; +pub const DNS_ERROR_POLICY_DOES_NOT_EXIST: WIN32_ERROR = 9972u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA: WIN32_ERROR = 9973u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA_CLIENT_SUBNET: WIN32_ERROR = 9990u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA_FQDN: WIN32_ERROR = 9994u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA_INTERFACE: WIN32_ERROR = 9993u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA_NETWORK_PROTOCOL: WIN32_ERROR = 9992u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA_QUERY_TYPE: WIN32_ERROR = 9995u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA_TIME_OF_DAY: WIN32_ERROR = 9996u32; +pub const DNS_ERROR_POLICY_INVALID_CRITERIA_TRANSPORT_PROTOCOL: WIN32_ERROR = 9991u32; +pub const DNS_ERROR_POLICY_INVALID_NAME: WIN32_ERROR = 9982u32; +pub const DNS_ERROR_POLICY_INVALID_SETTINGS: WIN32_ERROR = 9974u32; +pub const DNS_ERROR_POLICY_INVALID_WEIGHT: WIN32_ERROR = 9981u32; +pub const DNS_ERROR_POLICY_LOCKED: WIN32_ERROR = 9980u32; +pub const DNS_ERROR_POLICY_MISSING_CRITERIA: WIN32_ERROR = 9983u32; +pub const DNS_ERROR_POLICY_PROCESSING_ORDER_INVALID: WIN32_ERROR = 9985u32; +pub const DNS_ERROR_POLICY_SCOPE_MISSING: WIN32_ERROR = 9986u32; +pub const DNS_ERROR_POLICY_SCOPE_NOT_ALLOWED: WIN32_ERROR = 9987u32; +pub const DNS_ERROR_PRIMARY_REQUIRES_DATAFILE: WIN32_ERROR = 9651u32; +pub const DNS_ERROR_RCODE: WIN32_ERROR = 9504u32; +pub const DNS_ERROR_RCODE_BADKEY: WIN32_ERROR = 9017u32; +pub const DNS_ERROR_RCODE_BADSIG: WIN32_ERROR = 9016u32; +pub const DNS_ERROR_RCODE_BADTIME: WIN32_ERROR = 9018u32; +pub const DNS_ERROR_RCODE_FORMAT_ERROR: WIN32_ERROR = 9001u32; +pub const DNS_ERROR_RCODE_LAST: WIN32_ERROR = 9018u32; +pub const DNS_ERROR_RCODE_NAME_ERROR: WIN32_ERROR = 9003u32; +pub const DNS_ERROR_RCODE_NOTAUTH: WIN32_ERROR = 9009u32; +pub const DNS_ERROR_RCODE_NOTZONE: WIN32_ERROR = 9010u32; +pub const DNS_ERROR_RCODE_NOT_IMPLEMENTED: WIN32_ERROR = 9004u32; +pub const DNS_ERROR_RCODE_NO_ERROR: WIN32_ERROR = 0u32; +pub const DNS_ERROR_RCODE_NXRRSET: WIN32_ERROR = 9008u32; +pub const DNS_ERROR_RCODE_REFUSED: WIN32_ERROR = 9005u32; +pub const DNS_ERROR_RCODE_SERVER_FAILURE: WIN32_ERROR = 9002u32; +pub const DNS_ERROR_RCODE_YXDOMAIN: WIN32_ERROR = 9006u32; +pub const DNS_ERROR_RCODE_YXRRSET: WIN32_ERROR = 9007u32; +pub const DNS_ERROR_RECORD_ALREADY_EXISTS: WIN32_ERROR = 9711u32; +pub const DNS_ERROR_RECORD_DOES_NOT_EXIST: WIN32_ERROR = 9701u32; +pub const DNS_ERROR_RECORD_FORMAT: WIN32_ERROR = 9702u32; +pub const DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT: WIN32_ERROR = 9710u32; +pub const DNS_ERROR_RECORD_TIMED_OUT: WIN32_ERROR = 9705u32; +pub const DNS_ERROR_RESPONSE_CODES_BASE: WIN32_ERROR = 9000u32; +pub const DNS_ERROR_ROLLOVER_ALREADY_QUEUED: WIN32_ERROR = 9120u32; +pub const DNS_ERROR_ROLLOVER_IN_PROGRESS: WIN32_ERROR = 9116u32; +pub const DNS_ERROR_ROLLOVER_NOT_POKEABLE: WIN32_ERROR = 9128u32; +pub const DNS_ERROR_RRL_INVALID_IPV4_PREFIX: WIN32_ERROR = 9913u32; +pub const DNS_ERROR_RRL_INVALID_IPV6_PREFIX: WIN32_ERROR = 9914u32; +pub const DNS_ERROR_RRL_INVALID_LEAK_RATE: WIN32_ERROR = 9916u32; +pub const DNS_ERROR_RRL_INVALID_TC_RATE: WIN32_ERROR = 9915u32; +pub const DNS_ERROR_RRL_INVALID_WINDOW_SIZE: WIN32_ERROR = 9912u32; +pub const DNS_ERROR_RRL_LEAK_RATE_LESSTHAN_TC_RATE: WIN32_ERROR = 9917u32; +pub const DNS_ERROR_RRL_NOT_ENABLED: WIN32_ERROR = 9911u32; +pub const DNS_ERROR_SCOPE_ALREADY_EXISTS: WIN32_ERROR = 9963u32; +pub const DNS_ERROR_SCOPE_DOES_NOT_EXIST: WIN32_ERROR = 9959u32; +pub const DNS_ERROR_SCOPE_LOCKED: WIN32_ERROR = 9962u32; +pub const DNS_ERROR_SECONDARY_DATA: WIN32_ERROR = 9712u32; +pub const DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP: WIN32_ERROR = 9612u32; +pub const DNS_ERROR_SECURE_BASE: WIN32_ERROR = 9800u32; +pub const DNS_ERROR_SERVERSCOPE_IS_REFERENCED: WIN32_ERROR = 9988u32; +pub const DNS_ERROR_SETUP_BASE: WIN32_ERROR = 9850u32; +pub const DNS_ERROR_SIGNING_KEY_NOT_ACCESSIBLE: WIN32_ERROR = 9107u32; +pub const DNS_ERROR_SOA_DELETE_INVALID: WIN32_ERROR = 9618u32; +pub const DNS_ERROR_STANDBY_KEY_NOT_PRESENT: WIN32_ERROR = 9117u32; +pub const DNS_ERROR_SUBNET_ALREADY_EXISTS: WIN32_ERROR = 9979u32; +pub const DNS_ERROR_SUBNET_DOES_NOT_EXIST: WIN32_ERROR = 9978u32; +pub const DNS_ERROR_TOO_MANY_SKDS: WIN32_ERROR = 9113u32; +pub const DNS_ERROR_TRY_AGAIN_LATER: WIN32_ERROR = 9554u32; +pub const DNS_ERROR_UNEXPECTED_CNG_ERROR: WIN32_ERROR = 9110u32; +pub const DNS_ERROR_UNEXPECTED_DATA_PROTECTION_ERROR: WIN32_ERROR = 9109u32; +pub const DNS_ERROR_UNKNOWN_RECORD_TYPE: WIN32_ERROR = 9704u32; +pub const DNS_ERROR_UNKNOWN_SIGNING_PARAMETER_VERSION: WIN32_ERROR = 9111u32; +pub const DNS_ERROR_UNSECURE_PACKET: WIN32_ERROR = 9505u32; +pub const DNS_ERROR_UNSUPPORTED_ALGORITHM: WIN32_ERROR = 9105u32; +pub const DNS_ERROR_VIRTUALIZATION_INSTANCE_ALREADY_EXISTS: WIN32_ERROR = 9921u32; +pub const DNS_ERROR_VIRTUALIZATION_INSTANCE_DOES_NOT_EXIST: WIN32_ERROR = 9922u32; +pub const DNS_ERROR_VIRTUALIZATION_TREE_LOCKED: WIN32_ERROR = 9923u32; +pub const DNS_ERROR_WINS_INIT_FAILED: WIN32_ERROR = 9615u32; +pub const DNS_ERROR_ZONESCOPE_ALREADY_EXISTS: WIN32_ERROR = 9951u32; +pub const DNS_ERROR_ZONESCOPE_DOES_NOT_EXIST: WIN32_ERROR = 9952u32; +pub const DNS_ERROR_ZONESCOPE_FILE_WRITEBACK_FAILED: WIN32_ERROR = 9957u32; +pub const DNS_ERROR_ZONESCOPE_IS_REFERENCED: WIN32_ERROR = 9989u32; +pub const DNS_ERROR_ZONE_ALREADY_EXISTS: WIN32_ERROR = 9609u32; +pub const DNS_ERROR_ZONE_BASE: WIN32_ERROR = 9600u32; +pub const DNS_ERROR_ZONE_CONFIGURATION_ERROR: WIN32_ERROR = 9604u32; +pub const DNS_ERROR_ZONE_CREATION_FAILED: WIN32_ERROR = 9608u32; +pub const DNS_ERROR_ZONE_DOES_NOT_EXIST: WIN32_ERROR = 9601u32; +pub const DNS_ERROR_ZONE_HAS_NO_NS_RECORDS: WIN32_ERROR = 9606u32; +pub const DNS_ERROR_ZONE_HAS_NO_SOA_RECORD: WIN32_ERROR = 9605u32; +pub const DNS_ERROR_ZONE_IS_SHUTDOWN: WIN32_ERROR = 9621u32; +pub const DNS_ERROR_ZONE_LOCKED: WIN32_ERROR = 9607u32; +pub const DNS_ERROR_ZONE_LOCKED_FOR_SIGNING: WIN32_ERROR = 9622u32; +pub const DNS_ERROR_ZONE_NOT_SECONDARY: WIN32_ERROR = 9613u32; +pub const DNS_ERROR_ZONE_REQUIRES_MASTER_IP: WIN32_ERROR = 9620u32; +pub const DNS_INFO_ADDED_LOCAL_WINS: i32 = 9753i32; +pub const DNS_INFO_AXFR_COMPLETE: i32 = 9751i32; +pub const DNS_INFO_NO_RECORDS: i32 = 9501i32; +pub const DNS_REQUEST_PENDING: i32 = 9506i32; +pub const DNS_STATUS_CONTINUE_NEEDED: i32 = 9801i32; +pub const DNS_STATUS_DOTTED_NAME: i32 = 9558i32; +pub const DNS_STATUS_FQDN: i32 = 9557i32; +pub const DNS_STATUS_SINGLE_PART_NAME: i32 = 9559i32; +pub const DNS_WARNING_DOMAIN_UNDELETED: i32 = 9716i32; +pub const DNS_WARNING_PTR_CREATE_FAILED: i32 = 9715i32; +pub const DRAGDROP_E_ALREADYREGISTERED: windows_sys::core::HRESULT = 0x80040101_u32 as _; +pub const DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED: windows_sys::core::HRESULT = 0x80040103_u32 as _; +pub const DRAGDROP_E_FIRST: i32 = -2147221248i32; +pub const DRAGDROP_E_INVALIDHWND: windows_sys::core::HRESULT = 0x80040102_u32 as _; +pub const DRAGDROP_E_LAST: i32 = -2147221233i32; +pub const DRAGDROP_E_NOTREGISTERED: windows_sys::core::HRESULT = 0x80040100_u32 as _; +pub const DRAGDROP_S_CANCEL: windows_sys::core::HRESULT = 0x40101_u32 as _; +pub const DRAGDROP_S_DROP: windows_sys::core::HRESULT = 0x40100_u32 as _; +pub const DRAGDROP_S_FIRST: i32 = 262400i32; +pub const DRAGDROP_S_LAST: i32 = 262415i32; +pub const DRAGDROP_S_USEDEFAULTCURSORS: windows_sys::core::HRESULT = 0x40102_u32 as _; +pub const DUPLICATE_CLOSE_SOURCE: DUPLICATE_HANDLE_OPTIONS = 1u32; +pub type DUPLICATE_HANDLE_OPTIONS = u32; +pub const DUPLICATE_SAME_ACCESS: DUPLICATE_HANDLE_OPTIONS = 2u32; +pub const DV_E_CLIPFORMAT: windows_sys::core::HRESULT = 0x8004006A_u32 as _; +pub const DV_E_DVASPECT: windows_sys::core::HRESULT = 0x8004006B_u32 as _; +pub const DV_E_DVTARGETDEVICE: windows_sys::core::HRESULT = 0x80040065_u32 as _; +pub const DV_E_DVTARGETDEVICE_SIZE: windows_sys::core::HRESULT = 0x8004006C_u32 as _; +pub const DV_E_FORMATETC: windows_sys::core::HRESULT = 0x80040064_u32 as _; +pub const DV_E_LINDEX: windows_sys::core::HRESULT = 0x80040068_u32 as _; +pub const DV_E_NOIVIEWOBJECT: windows_sys::core::HRESULT = 0x8004006D_u32 as _; +pub const DV_E_STATDATA: windows_sys::core::HRESULT = 0x80040067_u32 as _; +pub const DV_E_STGMEDIUM: windows_sys::core::HRESULT = 0x80040066_u32 as _; +pub const DV_E_TYMED: windows_sys::core::HRESULT = 0x80040069_u32 as _; +pub const DWMERR_CATASTROPHIC_FAILURE: windows_sys::core::HRESULT = 0x88980702_u32 as _; +pub const DWMERR_STATE_TRANSITION_FAILED: windows_sys::core::HRESULT = 0x88980700_u32 as _; +pub const DWMERR_THEME_FAILED: windows_sys::core::HRESULT = 0x88980701_u32 as _; +pub const DWM_E_ADAPTER_NOT_FOUND: windows_sys::core::HRESULT = 0x80263005_u32 as _; +pub const DWM_E_COMPOSITIONDISABLED: windows_sys::core::HRESULT = 0x80263001_u32 as _; +pub const DWM_E_NOT_QUEUING_PRESENTS: windows_sys::core::HRESULT = 0x80263004_u32 as _; +pub const DWM_E_NO_REDIRECTION_SURFACE_AVAILABLE: windows_sys::core::HRESULT = 0x80263003_u32 as _; +pub const DWM_E_REMOTING_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80263002_u32 as _; +pub const DWM_E_TEXTURE_TOO_LARGE: windows_sys::core::HRESULT = 0x80263007_u32 as _; +pub const DWM_S_GDI_REDIRECTION_SURFACE: windows_sys::core::HRESULT = 0x263005_u32 as _; +pub const DWM_S_GDI_REDIRECTION_SURFACE_BLT_VIA_GDI: windows_sys::core::HRESULT = 0x263008_u32 as _; +pub const DWRITE_E_ALREADYREGISTERED: windows_sys::core::HRESULT = 0x88985006_u32 as _; +pub const DWRITE_E_CACHEFORMAT: windows_sys::core::HRESULT = 0x88985007_u32 as _; +pub const DWRITE_E_CACHEVERSION: windows_sys::core::HRESULT = 0x88985008_u32 as _; +pub const DWRITE_E_FILEACCESS: windows_sys::core::HRESULT = 0x88985004_u32 as _; +pub const DWRITE_E_FILEFORMAT: windows_sys::core::HRESULT = 0x88985000_u32 as _; +pub const DWRITE_E_FILENOTFOUND: windows_sys::core::HRESULT = 0x88985003_u32 as _; +pub const DWRITE_E_FLOWDIRECTIONCONFLICTS: windows_sys::core::HRESULT = 0x8898500B_u32 as _; +pub const DWRITE_E_FONTCOLLECTIONOBSOLETE: windows_sys::core::HRESULT = 0x88985005_u32 as _; +pub const DWRITE_E_NOCOLOR: windows_sys::core::HRESULT = 0x8898500C_u32 as _; +pub const DWRITE_E_NOFONT: windows_sys::core::HRESULT = 0x88985002_u32 as _; +pub const DWRITE_E_TEXTRENDERERINCOMPATIBLE: windows_sys::core::HRESULT = 0x8898500A_u32 as _; +pub const DWRITE_E_UNEXPECTED: windows_sys::core::HRESULT = 0x88985001_u32 as _; +pub const DWRITE_E_UNSUPPORTEDOPERATION: windows_sys::core::HRESULT = 0x88985009_u32 as _; +pub const DXCORE_ERROR_EVENT_NOT_UNREGISTERED: windows_sys::core::HRESULT = 0x88800001_u32 as _; +pub const DXGI_DDI_ERR_NONEXCLUSIVE: windows_sys::core::HRESULT = 0x887B0003_u32 as _; +pub const DXGI_DDI_ERR_UNSUPPORTED: windows_sys::core::HRESULT = 0x887B0002_u32 as _; +pub const DXGI_DDI_ERR_WASSTILLDRAWING: windows_sys::core::HRESULT = 0x887B0001_u32 as _; +pub const DXGI_STATUS_CLIPPED: windows_sys::core::HRESULT = 0x87A0002_u32 as _; +pub const DXGI_STATUS_DDA_WAS_STILL_DRAWING: windows_sys::core::HRESULT = 0x87A000A_u32 as _; +pub const DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE: windows_sys::core::HRESULT = 0x87A0006_u32 as _; +pub const DXGI_STATUS_MODE_CHANGED: windows_sys::core::HRESULT = 0x87A0007_u32 as _; +pub const DXGI_STATUS_MODE_CHANGE_IN_PROGRESS: windows_sys::core::HRESULT = 0x87A0008_u32 as _; +pub const DXGI_STATUS_NO_DESKTOP_ACCESS: windows_sys::core::HRESULT = 0x87A0005_u32 as _; +pub const DXGI_STATUS_NO_REDIRECTION: windows_sys::core::HRESULT = 0x87A0004_u32 as _; +pub const DXGI_STATUS_OCCLUDED: windows_sys::core::HRESULT = 0x87A0001_u32 as _; +pub const DXGI_STATUS_PRESENT_REQUIRED: windows_sys::core::HRESULT = 0x87A002F_u32 as _; +pub const DXGI_STATUS_UNOCCLUDED: windows_sys::core::HRESULT = 0x87A0009_u32 as _; +pub const EAS_E_ADMINS_CANNOT_CHANGE_PASSWORD: windows_sys::core::HRESULT = 0x80550008_u32 as _; +pub const EAS_E_ADMINS_HAVE_BLANK_PASSWORD: windows_sys::core::HRESULT = 0x80550007_u32 as _; +pub const EAS_E_CONNECTED_ADMINS_NEED_TO_CHANGE_PASSWORD: windows_sys::core::HRESULT = 0x8055000B_u32 as _; +pub const EAS_E_CURRENT_CONNECTED_USER_NEED_TO_CHANGE_PASSWORD: windows_sys::core::HRESULT = 0x8055000D_u32 as _; +pub const EAS_E_CURRENT_USER_HAS_BLANK_PASSWORD: windows_sys::core::HRESULT = 0x80550004_u32 as _; +pub const EAS_E_LOCAL_CONTROLLED_USERS_CANNOT_CHANGE_PASSWORD: windows_sys::core::HRESULT = 0x80550009_u32 as _; +pub const EAS_E_PASSWORD_POLICY_NOT_ENFORCEABLE_FOR_CONNECTED_ADMINS: windows_sys::core::HRESULT = 0x8055000A_u32 as _; +pub const EAS_E_PASSWORD_POLICY_NOT_ENFORCEABLE_FOR_CURRENT_CONNECTED_USER: windows_sys::core::HRESULT = 0x8055000C_u32 as _; +pub const EAS_E_POLICY_COMPLIANT_WITH_ACTIONS: windows_sys::core::HRESULT = 0x80550002_u32 as _; +pub const EAS_E_POLICY_NOT_MANAGED_BY_OS: windows_sys::core::HRESULT = 0x80550001_u32 as _; +pub const EAS_E_REQUESTED_POLICY_NOT_ENFORCEABLE: windows_sys::core::HRESULT = 0x80550003_u32 as _; +pub const EAS_E_REQUESTED_POLICY_PASSWORD_EXPIRATION_INCOMPATIBLE: windows_sys::core::HRESULT = 0x80550005_u32 as _; +pub const EAS_E_USER_CANNOT_CHANGE_PASSWORD: windows_sys::core::HRESULT = 0x80550006_u32 as _; +pub const ENUM_E_FIRST: i32 = -2147221072i32; +pub const ENUM_E_LAST: i32 = -2147221057i32; +pub const ENUM_S_FIRST: i32 = 262576i32; +pub const ENUM_S_LAST: i32 = 262591i32; +pub const EPT_NT_CANT_CREATE: NTSTATUS = 0xC002004C_u32 as _; +pub const EPT_NT_CANT_PERFORM_OP: NTSTATUS = 0xC0020035_u32 as _; +pub const EPT_NT_INVALID_ENTRY: NTSTATUS = 0xC0020034_u32 as _; +pub const EPT_NT_NOT_REGISTERED: NTSTATUS = 0xC0020036_u32 as _; +pub const ERROR_ABANDONED_WAIT_0: WIN32_ERROR = 735u32; +pub const ERROR_ABANDONED_WAIT_63: WIN32_ERROR = 736u32; +pub const ERROR_ABANDON_HIBERFILE: WIN32_ERROR = 787u32; +pub const ERROR_ABIOS_ERROR: WIN32_ERROR = 538u32; +pub const ERROR_ACCESS_AUDIT_BY_POLICY: WIN32_ERROR = 785u32; +pub const ERROR_ACCESS_DENIED: WIN32_ERROR = 5u32; +pub const ERROR_ACCESS_DENIED_APPDATA: WIN32_ERROR = 502u32; +pub const ERROR_ACCESS_DISABLED_BY_POLICY: WIN32_ERROR = 1260u32; +pub const ERROR_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY: WIN32_ERROR = 786u32; +pub const ERROR_ACCESS_DISABLED_WEBBLADE: WIN32_ERROR = 1277u32; +pub const ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER: WIN32_ERROR = 1278u32; +pub const ERROR_ACCOUNT_DISABLED: WIN32_ERROR = 1331u32; +pub const ERROR_ACCOUNT_EXPIRED: WIN32_ERROR = 1793u32; +pub const ERROR_ACCOUNT_LOCKED_OUT: WIN32_ERROR = 1909u32; +pub const ERROR_ACCOUNT_RESTRICTION: WIN32_ERROR = 1327u32; +pub const ERROR_ACPI_ERROR: WIN32_ERROR = 669u32; +pub const ERROR_ACTIVATION_COUNT_EXCEEDED: WIN32_ERROR = 7059u32; +pub const ERROR_ACTIVE_CONNECTIONS: WIN32_ERROR = 2402u32; +pub const ERROR_ADAP_HDW_ERR: WIN32_ERROR = 57u32; +pub const ERROR_ADDRESS_ALREADY_ASSOCIATED: WIN32_ERROR = 1227u32; +pub const ERROR_ADDRESS_NOT_ASSOCIATED: WIN32_ERROR = 1228u32; +pub const ERROR_ADVANCED_INSTALLER_FAILED: WIN32_ERROR = 14099u32; +pub const ERROR_ALERTED: WIN32_ERROR = 739u32; +pub const ERROR_ALIAS_EXISTS: WIN32_ERROR = 1379u32; +pub const ERROR_ALLOCATE_BUCKET: WIN32_ERROR = 602u32; +pub const ERROR_ALLOTTED_SPACE_EXCEEDED: WIN32_ERROR = 1344u32; +pub const ERROR_ALLOWED_PORT_TYPE_RESTRICTION: u32 = 941u32; +pub const ERROR_ALL_NODES_NOT_AVAILABLE: WIN32_ERROR = 5037u32; +pub const ERROR_ALL_SIDS_FILTERED: windows_sys::core::HRESULT = 0xC0090002_u32 as _; +pub const ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED: WIN32_ERROR = 1933u32; +pub const ERROR_ALREADY_ASSIGNED: WIN32_ERROR = 85u32; +pub const ERROR_ALREADY_CONNECTED: u32 = 901u32; +pub const ERROR_ALREADY_CONNECTING: u32 = 910u32; +pub const ERROR_ALREADY_EXISTS: WIN32_ERROR = 183u32; +pub const ERROR_ALREADY_FIBER: WIN32_ERROR = 1280u32; +pub const ERROR_ALREADY_HAS_STREAM_ID: WIN32_ERROR = 4444u32; +pub const ERROR_ALREADY_INITIALIZED: WIN32_ERROR = 1247u32; +pub const ERROR_ALREADY_REGISTERED: WIN32_ERROR = 1242u32; +pub const ERROR_ALREADY_RUNNING_LKG: WIN32_ERROR = 1074u32; +pub const ERROR_ALREADY_THREAD: WIN32_ERROR = 1281u32; +pub const ERROR_ALREADY_WAITING: WIN32_ERROR = 1904u32; +pub const ERROR_ALREADY_WIN32: WIN32_ERROR = 719u32; +pub const ERROR_AMBIGUOUS_SYSTEM_DEVICE: WIN32_ERROR = 15250u32; +pub const ERROR_API_UNAVAILABLE: WIN32_ERROR = 15841u32; +pub const ERROR_APPCONTAINER_REQUIRED: WIN32_ERROR = 4251u32; +pub const ERROR_APPEXEC_APP_COMPAT_BLOCK: WIN32_ERROR = 3068u32; +pub const ERROR_APPEXEC_CALLER_WAIT_TIMEOUT: WIN32_ERROR = 3069u32; +pub const ERROR_APPEXEC_CALLER_WAIT_TIMEOUT_LICENSING: WIN32_ERROR = 3071u32; +pub const ERROR_APPEXEC_CALLER_WAIT_TIMEOUT_RESOURCES: WIN32_ERROR = 3072u32; +pub const ERROR_APPEXEC_CALLER_WAIT_TIMEOUT_TERMINATION: WIN32_ERROR = 3070u32; +pub const ERROR_APPEXEC_CONDITION_NOT_SATISFIED: WIN32_ERROR = 3060u32; +pub const ERROR_APPEXEC_HANDLE_INVALIDATED: WIN32_ERROR = 3061u32; +pub const ERROR_APPEXEC_HOST_ID_MISMATCH: WIN32_ERROR = 3066u32; +pub const ERROR_APPEXEC_INVALID_HOST_GENERATION: WIN32_ERROR = 3062u32; +pub const ERROR_APPEXEC_INVALID_HOST_STATE: WIN32_ERROR = 3064u32; +pub const ERROR_APPEXEC_NO_DONOR: WIN32_ERROR = 3065u32; +pub const ERROR_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION: WIN32_ERROR = 3063u32; +pub const ERROR_APPEXEC_UNKNOWN_USER: WIN32_ERROR = 3067u32; +pub const ERROR_APPHELP_BLOCK: WIN32_ERROR = 1259u32; +pub const ERROR_APPINSTALLER_ACTIVATION_BLOCKED: WIN32_ERROR = 15646u32; +pub const ERROR_APPINSTALLER_IS_MANAGED_BY_SYSTEM: WIN32_ERROR = 15672u32; +pub const ERROR_APPINSTALLER_URI_IN_USE: WIN32_ERROR = 15671u32; +pub const ERROR_APPX_FILE_NOT_ENCRYPTED: WIN32_ERROR = 409u32; +pub const ERROR_APPX_INTEGRITY_FAILURE_CLR_NGEN: WIN32_ERROR = 15624u32; +pub const ERROR_APPX_RAW_DATA_WRITE_FAILED: WIN32_ERROR = 15648u32; +pub const ERROR_APP_DATA_CORRUPT: WIN32_ERROR = 4402u32; +pub const ERROR_APP_DATA_EXPIRED: WIN32_ERROR = 4401u32; +pub const ERROR_APP_DATA_LIMIT_EXCEEDED: WIN32_ERROR = 4403u32; +pub const ERROR_APP_DATA_NOT_FOUND: WIN32_ERROR = 4400u32; +pub const ERROR_APP_DATA_REBOOT_REQUIRED: WIN32_ERROR = 4404u32; +pub const ERROR_APP_HANG: WIN32_ERROR = 1298u32; +pub const ERROR_APP_INIT_FAILURE: WIN32_ERROR = 575u32; +pub const ERROR_APP_WRONG_OS: WIN32_ERROR = 1151u32; +pub const ERROR_ARBITRATION_UNHANDLED: WIN32_ERROR = 723u32; +pub const ERROR_ARENA_TRASHED: WIN32_ERROR = 7u32; +pub const ERROR_ARITHMETIC_OVERFLOW: WIN32_ERROR = 534u32; +pub const ERROR_ASSERTION_FAILURE: WIN32_ERROR = 668u32; +pub const ERROR_ATOMIC_LOCKS_NOT_SUPPORTED: WIN32_ERROR = 174u32; +pub const ERROR_ATTRIBUTE_NOT_PRESENT: windows_sys::core::HRESULT = 0x8083000A_u32 as _; +pub const ERROR_AUDITING_DISABLED: windows_sys::core::HRESULT = 0xC0090001_u32 as _; +pub const ERROR_AUDIT_FAILED: WIN32_ERROR = 606u32; +pub const ERROR_AUTHENTICATION_FIREWALL_FAILED: WIN32_ERROR = 1935u32; +pub const ERROR_AUTHENTICATOR_MISMATCH: u32 = 955u32; +pub const ERROR_AUTHENTICODE_DISALLOWED: WIN32_ERROR = 3758096960u32; +pub const ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED: WIN32_ERROR = 3758096963u32; +pub const ERROR_AUTHENTICODE_TRUSTED_PUBLISHER: WIN32_ERROR = 3758096961u32; +pub const ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED: WIN32_ERROR = 3758096962u32; +pub const ERROR_AUTHIP_FAILURE: WIN32_ERROR = 1469u32; +pub const ERROR_AUTH_PROTOCOL_REJECTED: u32 = 917u32; +pub const ERROR_AUTH_PROTOCOL_RESTRICTION: u32 = 942u32; +pub const ERROR_AUTH_SERVER_TIMEOUT: u32 = 930u32; +pub const ERROR_AUTODATASEG_EXCEEDS_64k: WIN32_ERROR = 199u32; +pub const ERROR_BACKUP_CONTROLLER: WIN32_ERROR = 586u32; +pub const ERROR_BADDB: WIN32_ERROR = 1009u32; +pub const ERROR_BADKEY: WIN32_ERROR = 1010u32; +pub const ERROR_BADSTARTPOSITION: WIN32_ERROR = 778u32; +pub const ERROR_BAD_ACCESSOR_FLAGS: WIN32_ERROR = 773u32; +pub const ERROR_BAD_ARGUMENTS: WIN32_ERROR = 160u32; +pub const ERROR_BAD_CLUSTERS: WIN32_ERROR = 6849u32; +pub const ERROR_BAD_COMMAND: WIN32_ERROR = 22u32; +pub const ERROR_BAD_COMPRESSION_BUFFER: WIN32_ERROR = 605u32; +pub const ERROR_BAD_CONFIGURATION: WIN32_ERROR = 1610u32; +pub const ERROR_BAD_CURRENT_DIRECTORY: WIN32_ERROR = 703u32; +pub const ERROR_BAD_DESCRIPTOR_FORMAT: WIN32_ERROR = 1361u32; +pub const ERROR_BAD_DEVICE: WIN32_ERROR = 1200u32; +pub const ERROR_BAD_DEVICE_PATH: WIN32_ERROR = 330u32; +pub const ERROR_BAD_DEV_TYPE: WIN32_ERROR = 66u32; +pub const ERROR_BAD_DLL_ENTRYPOINT: WIN32_ERROR = 609u32; +pub const ERROR_BAD_DRIVER: WIN32_ERROR = 2001u32; +pub const ERROR_BAD_DRIVER_LEVEL: WIN32_ERROR = 119u32; +pub const ERROR_BAD_ENVIRONMENT: WIN32_ERROR = 10u32; +pub const ERROR_BAD_EXE_FORMAT: WIN32_ERROR = 193u32; +pub const ERROR_BAD_FILE_TYPE: WIN32_ERROR = 222u32; +pub const ERROR_BAD_FORMAT: WIN32_ERROR = 11u32; +pub const ERROR_BAD_FUNCTION_TABLE: WIN32_ERROR = 559u32; +pub const ERROR_BAD_IMPERSONATION_LEVEL: WIN32_ERROR = 1346u32; +pub const ERROR_BAD_INHERITANCE_ACL: WIN32_ERROR = 1340u32; +pub const ERROR_BAD_INTERFACE_INSTALLSECT: WIN32_ERROR = 3758096925u32; +pub const ERROR_BAD_LENGTH: WIN32_ERROR = 24u32; +pub const ERROR_BAD_LOGON_SESSION_STATE: WIN32_ERROR = 1365u32; +pub const ERROR_BAD_MCFG_TABLE: WIN32_ERROR = 791u32; +pub const ERROR_BAD_NETPATH: WIN32_ERROR = 53u32; +pub const ERROR_BAD_NET_NAME: WIN32_ERROR = 67u32; +pub const ERROR_BAD_NET_RESP: WIN32_ERROR = 58u32; +pub const ERROR_BAD_PATHNAME: WIN32_ERROR = 161u32; +pub const ERROR_BAD_PIPE: WIN32_ERROR = 230u32; +pub const ERROR_BAD_PROFILE: WIN32_ERROR = 1206u32; +pub const ERROR_BAD_PROVIDER: WIN32_ERROR = 1204u32; +pub const ERROR_BAD_QUERY_SYNTAX: WIN32_ERROR = 1615u32; +pub const ERROR_BAD_RECOVERY_POLICY: WIN32_ERROR = 6012u32; +pub const ERROR_BAD_REM_ADAP: WIN32_ERROR = 60u32; +pub const ERROR_BAD_SECTION_NAME_LINE: WIN32_ERROR = 3758096385u32; +pub const ERROR_BAD_SERVICE_ENTRYPOINT: WIN32_ERROR = 610u32; +pub const ERROR_BAD_SERVICE_INSTALLSECT: WIN32_ERROR = 3758096919u32; +pub const ERROR_BAD_STACK: WIN32_ERROR = 543u32; +pub const ERROR_BAD_THREADID_ADDR: WIN32_ERROR = 159u32; +pub const ERROR_BAD_TOKEN_TYPE: WIN32_ERROR = 1349u32; +pub const ERROR_BAD_UNIT: WIN32_ERROR = 20u32; +pub const ERROR_BAD_USERNAME: WIN32_ERROR = 2202u32; +pub const ERROR_BAD_USER_PROFILE: WIN32_ERROR = 1253u32; +pub const ERROR_BAD_VALIDATION_CLASS: WIN32_ERROR = 1348u32; +pub const ERROR_BAP_DISCONNECTED: u32 = 936u32; +pub const ERROR_BAP_REQUIRED: u32 = 943u32; +pub const ERROR_BCD_NOT_ALL_ENTRIES_IMPORTED: WIN32_ERROR = 2151219201u32; +pub const ERROR_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED: WIN32_ERROR = 2151219203u32; +pub const ERROR_BCD_TOO_MANY_ELEMENTS: WIN32_ERROR = 3224961026u32; +pub const ERROR_BEGINNING_OF_MEDIA: WIN32_ERROR = 1102u32; +pub const ERROR_BEYOND_VDL: WIN32_ERROR = 1289u32; +pub const ERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT: WIN32_ERROR = 585u32; +pub const ERROR_BIZRULES_NOT_ENABLED: windows_sys::core::HRESULT = 0xC0090003_u32 as _; +pub const ERROR_BLOCKED_BY_PARENTAL_CONTROLS: WIN32_ERROR = 346u32; +pub const ERROR_BLOCK_SHARED: WIN32_ERROR = 514u32; +pub const ERROR_BLOCK_SOURCE_WEAK_REFERENCE_INVALID: WIN32_ERROR = 512u32; +pub const ERROR_BLOCK_TARGET_WEAK_REFERENCE_INVALID: WIN32_ERROR = 513u32; +pub const ERROR_BLOCK_TOO_MANY_REFERENCES: WIN32_ERROR = 347u32; +pub const ERROR_BLOCK_WEAK_REFERENCE_INVALID: WIN32_ERROR = 511u32; +pub const ERROR_BOOT_ALREADY_ACCEPTED: WIN32_ERROR = 1076u32; +pub const ERROR_BROKEN_PIPE: WIN32_ERROR = 109u32; +pub const ERROR_BUFFER_ALL_ZEROS: WIN32_ERROR = 754u32; +pub const ERROR_BUFFER_OVERFLOW: WIN32_ERROR = 111u32; +pub const ERROR_BUSY: WIN32_ERROR = 170u32; +pub const ERROR_BUSY_DRIVE: WIN32_ERROR = 142u32; +pub const ERROR_BUS_RESET: WIN32_ERROR = 1111u32; +pub const ERROR_BYPASSIO_FLT_NOT_SUPPORTED: WIN32_ERROR = 506u32; +pub const ERROR_CACHE_PAGE_LOCKED: WIN32_ERROR = 752u32; +pub const ERROR_CALLBACK_INVOKE_INLINE: WIN32_ERROR = 812u32; +pub const ERROR_CALLBACK_POP_STACK: WIN32_ERROR = 768u32; +pub const ERROR_CALLBACK_SUPPLIED_INVALID_DATA: WIN32_ERROR = 1273u32; +pub const ERROR_CALL_NOT_IMPLEMENTED: WIN32_ERROR = 120u32; +pub const ERROR_CANCELLED: WIN32_ERROR = 1223u32; +pub const ERROR_CANCEL_VIOLATION: WIN32_ERROR = 173u32; +pub const ERROR_CANNOT_ABORT_TRANSACTIONS: WIN32_ERROR = 6848u32; +pub const ERROR_CANNOT_ACCEPT_TRANSACTED_WORK: WIN32_ERROR = 6847u32; +pub const ERROR_CANNOT_BREAK_OPLOCK: WIN32_ERROR = 802u32; +pub const ERROR_CANNOT_COPY: WIN32_ERROR = 266u32; +pub const ERROR_CANNOT_DETECT_DRIVER_FAILURE: WIN32_ERROR = 1080u32; +pub const ERROR_CANNOT_DETECT_PROCESS_ABORT: WIN32_ERROR = 1081u32; +pub const ERROR_CANNOT_EXECUTE_FILE_IN_TRANSACTION: WIN32_ERROR = 6838u32; +pub const ERROR_CANNOT_FIND_WND_CLASS: WIN32_ERROR = 1407u32; +pub const ERROR_CANNOT_GRANT_REQUESTED_OPLOCK: WIN32_ERROR = 801u32; +pub const ERROR_CANNOT_IMPERSONATE: WIN32_ERROR = 1368u32; +pub const ERROR_CANNOT_LOAD_REGISTRY_FILE: WIN32_ERROR = 589u32; +pub const ERROR_CANNOT_MAKE: WIN32_ERROR = 82u32; +pub const ERROR_CANNOT_OPEN_PROFILE: WIN32_ERROR = 1205u32; +pub const ERROR_CANNOT_SWITCH_RUNLEVEL: WIN32_ERROR = 15400u32; +pub const ERROR_CANTFETCHBACKWARDS: WIN32_ERROR = 770u32; +pub const ERROR_CANTOPEN: WIN32_ERROR = 1011u32; +pub const ERROR_CANTREAD: WIN32_ERROR = 1012u32; +pub const ERROR_CANTSCROLLBACKWARDS: WIN32_ERROR = 771u32; +pub const ERROR_CANTWRITE: WIN32_ERROR = 1013u32; +pub const ERROR_CANT_ACCESS_DOMAIN_INFO: WIN32_ERROR = 1351u32; +pub const ERROR_CANT_ACCESS_FILE: WIN32_ERROR = 1920u32; +pub const ERROR_CANT_ATTACH_TO_DEV_VOLUME: WIN32_ERROR = 478u32; +pub const ERROR_CANT_BREAK_TRANSACTIONAL_DEPENDENCY: WIN32_ERROR = 6824u32; +pub const ERROR_CANT_CLEAR_ENCRYPTION_FLAG: WIN32_ERROR = 432u32; +pub const ERROR_CANT_CREATE_MORE_STREAM_MINIVERSIONS: WIN32_ERROR = 6812u32; +pub const ERROR_CANT_CROSS_RM_BOUNDARY: WIN32_ERROR = 6825u32; +pub const ERROR_CANT_DELETE_LAST_ITEM: WIN32_ERROR = 4335u32; +pub const ERROR_CANT_DISABLE_MANDATORY: WIN32_ERROR = 1310u32; +pub const ERROR_CANT_ENABLE_DENY_ONLY: WIN32_ERROR = 629u32; +pub const ERROR_CANT_EVICT_ACTIVE_NODE: WIN32_ERROR = 5009u32; +pub const ERROR_CANT_LOAD_CLASS_ICON: WIN32_ERROR = 3758096908u32; +pub const ERROR_CANT_OPEN_ANONYMOUS: WIN32_ERROR = 1347u32; +pub const ERROR_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT: WIN32_ERROR = 6811u32; +pub const ERROR_CANT_RECOVER_WITH_HANDLE_OPEN: WIN32_ERROR = 6818u32; +pub const ERROR_CANT_REMOVE_DEVINST: WIN32_ERROR = 3758096946u32; +pub const ERROR_CANT_RESOLVE_FILENAME: WIN32_ERROR = 1921u32; +pub const ERROR_CANT_TERMINATE_SELF: WIN32_ERROR = 555u32; +pub const ERROR_CANT_WAIT: WIN32_ERROR = 554u32; +pub const ERROR_CAN_NOT_COMPLETE: WIN32_ERROR = 1003u32; +pub const ERROR_CAN_NOT_DEL_LOCAL_WINS: WIN32_ERROR = 4001u32; +pub const ERROR_CAPAUTHZ_CHANGE_TYPE: WIN32_ERROR = 451u32; +pub const ERROR_CAPAUTHZ_DB_CORRUPTED: WIN32_ERROR = 455u32; +pub const ERROR_CAPAUTHZ_NOT_AUTHORIZED: WIN32_ERROR = 453u32; +pub const ERROR_CAPAUTHZ_NOT_DEVUNLOCKED: WIN32_ERROR = 450u32; +pub const ERROR_CAPAUTHZ_NOT_PROVISIONED: WIN32_ERROR = 452u32; +pub const ERROR_CAPAUTHZ_NO_POLICY: WIN32_ERROR = 454u32; +pub const ERROR_CAPAUTHZ_SCCD_DEV_MODE_REQUIRED: WIN32_ERROR = 459u32; +pub const ERROR_CAPAUTHZ_SCCD_INVALID_CATALOG: WIN32_ERROR = 456u32; +pub const ERROR_CAPAUTHZ_SCCD_NO_AUTH_ENTITY: WIN32_ERROR = 457u32; +pub const ERROR_CAPAUTHZ_SCCD_NO_CAPABILITY_MATCH: WIN32_ERROR = 460u32; +pub const ERROR_CAPAUTHZ_SCCD_PARSE_ERROR: WIN32_ERROR = 458u32; +pub const ERROR_CARDBUS_NOT_SUPPORTED: WIN32_ERROR = 724u32; +pub const ERROR_CASE_DIFFERING_NAMES_IN_DIR: WIN32_ERROR = 424u32; +pub const ERROR_CASE_SENSITIVE_PATH: WIN32_ERROR = 442u32; +pub const ERROR_CERTIFICATE_VALIDATION_PREFERENCE_CONFLICT: WIN32_ERROR = 817u32; +pub const ERROR_CHECKING_FILE_SYSTEM: WIN32_ERROR = 712u32; +pub const ERROR_CHECKOUT_REQUIRED: WIN32_ERROR = 221u32; +pub const ERROR_CHILD_MUST_BE_VOLATILE: WIN32_ERROR = 1021u32; +pub const ERROR_CHILD_NOT_COMPLETE: WIN32_ERROR = 129u32; +pub const ERROR_CHILD_PROCESS_BLOCKED: WIN32_ERROR = 367u32; +pub const ERROR_CHILD_WINDOW_MENU: WIN32_ERROR = 1436u32; +pub const ERROR_CIMFS_IMAGE_CORRUPT: WIN32_ERROR = 470u32; +pub const ERROR_CIMFS_IMAGE_VERSION_NOT_SUPPORTED: WIN32_ERROR = 471u32; +pub const ERROR_CIRCULAR_DEPENDENCY: WIN32_ERROR = 1059u32; +pub const ERROR_CLASSIC_COMPAT_MODE_NOT_ALLOWED: WIN32_ERROR = 15667u32; +pub const ERROR_CLASS_ALREADY_EXISTS: WIN32_ERROR = 1410u32; +pub const ERROR_CLASS_DOES_NOT_EXIST: WIN32_ERROR = 1411u32; +pub const ERROR_CLASS_HAS_WINDOWS: WIN32_ERROR = 1412u32; +pub const ERROR_CLASS_MISMATCH: WIN32_ERROR = 3758096897u32; +pub const ERROR_CLEANER_CARTRIDGE_INSTALLED: WIN32_ERROR = 4340u32; +pub const ERROR_CLEANER_CARTRIDGE_SPENT: WIN32_ERROR = 4333u32; +pub const ERROR_CLEANER_SLOT_NOT_SET: WIN32_ERROR = 4332u32; +pub const ERROR_CLEANER_SLOT_SET: WIN32_ERROR = 4331u32; +pub const ERROR_CLIENT_INTERFACE_ALREADY_EXISTS: u32 = 915u32; +pub const ERROR_CLIENT_SERVER_PARAMETERS_INVALID: WIN32_ERROR = 597u32; +pub const ERROR_CLIPBOARD_NOT_OPEN: WIN32_ERROR = 1418u32; +pub const ERROR_CLIPPING_NOT_SUPPORTED: WIN32_ERROR = 2005u32; +pub const ERROR_CLIP_DEVICE_LICENSE_MISSING: windows_sys::core::HRESULT = 0xC0EA0003_u32 as _; +pub const ERROR_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID: windows_sys::core::HRESULT = 0xC0EA0005_u32 as _; +pub const ERROR_CLIP_LICENSE_DEVICE_ID_MISMATCH: windows_sys::core::HRESULT = 0xC0EA000A_u32 as _; +pub const ERROR_CLIP_LICENSE_EXPIRED: windows_sys::core::HRESULT = 0xC0EA0006_u32 as _; +pub const ERROR_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE: windows_sys::core::HRESULT = 0xC0EA0009_u32 as _; +pub const ERROR_CLIP_LICENSE_INVALID_SIGNATURE: windows_sys::core::HRESULT = 0xC0EA0004_u32 as _; +pub const ERROR_CLIP_LICENSE_NOT_FOUND: windows_sys::core::HRESULT = 0xC0EA0002_u32 as _; +pub const ERROR_CLIP_LICENSE_NOT_SIGNED: windows_sys::core::HRESULT = 0xC0EA0008_u32 as _; +pub const ERROR_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE: windows_sys::core::HRESULT = 0xC0EA0007_u32 as _; +pub const ERROR_CLOUD_FILE_ACCESS_DENIED: WIN32_ERROR = 395u32; +pub const ERROR_CLOUD_FILE_ALREADY_CONNECTED: WIN32_ERROR = 378u32; +pub const ERROR_CLOUD_FILE_AUTHENTICATION_FAILED: WIN32_ERROR = 386u32; +pub const ERROR_CLOUD_FILE_CONNECTED_PROVIDER_ONLY: WIN32_ERROR = 382u32; +pub const ERROR_CLOUD_FILE_DEHYDRATION_DISALLOWED: WIN32_ERROR = 434u32; +pub const ERROR_CLOUD_FILE_INCOMPATIBLE_HARDLINKS: WIN32_ERROR = 396u32; +pub const ERROR_CLOUD_FILE_INSUFFICIENT_RESOURCES: WIN32_ERROR = 387u32; +pub const ERROR_CLOUD_FILE_INVALID_REQUEST: WIN32_ERROR = 380u32; +pub const ERROR_CLOUD_FILE_IN_USE: WIN32_ERROR = 391u32; +pub const ERROR_CLOUD_FILE_METADATA_CORRUPT: WIN32_ERROR = 363u32; +pub const ERROR_CLOUD_FILE_METADATA_TOO_LARGE: WIN32_ERROR = 364u32; +pub const ERROR_CLOUD_FILE_NETWORK_UNAVAILABLE: WIN32_ERROR = 388u32; +pub const ERROR_CLOUD_FILE_NOT_IN_SYNC: WIN32_ERROR = 377u32; +pub const ERROR_CLOUD_FILE_NOT_SUPPORTED: WIN32_ERROR = 379u32; +pub const ERROR_CLOUD_FILE_NOT_UNDER_SYNC_ROOT: WIN32_ERROR = 390u32; +pub const ERROR_CLOUD_FILE_PINNED: WIN32_ERROR = 392u32; +pub const ERROR_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH: WIN32_ERROR = 366u32; +pub const ERROR_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE: WIN32_ERROR = 365u32; +pub const ERROR_CLOUD_FILE_PROPERTY_CORRUPT: WIN32_ERROR = 394u32; +pub const ERROR_CLOUD_FILE_PROPERTY_LOCK_CONFLICT: WIN32_ERROR = 397u32; +pub const ERROR_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED: WIN32_ERROR = 375u32; +pub const ERROR_CLOUD_FILE_PROVIDER_NOT_RUNNING: WIN32_ERROR = 362u32; +pub const ERROR_CLOUD_FILE_PROVIDER_TERMINATED: WIN32_ERROR = 404u32; +pub const ERROR_CLOUD_FILE_READ_ONLY_VOLUME: WIN32_ERROR = 381u32; +pub const ERROR_CLOUD_FILE_REQUEST_ABORTED: WIN32_ERROR = 393u32; +pub const ERROR_CLOUD_FILE_REQUEST_CANCELED: WIN32_ERROR = 398u32; +pub const ERROR_CLOUD_FILE_REQUEST_TIMEOUT: WIN32_ERROR = 426u32; +pub const ERROR_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT: WIN32_ERROR = 358u32; +pub const ERROR_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS: WIN32_ERROR = 374u32; +pub const ERROR_CLOUD_FILE_UNSUCCESSFUL: WIN32_ERROR = 389u32; +pub const ERROR_CLOUD_FILE_US_MESSAGE_TIMEOUT: WIN32_ERROR = 475u32; +pub const ERROR_CLOUD_FILE_VALIDATION_FAILED: WIN32_ERROR = 383u32; +pub const ERROR_CLUSCFG_ALREADY_COMMITTED: WIN32_ERROR = 5901u32; +pub const ERROR_CLUSCFG_ROLLBACK_FAILED: WIN32_ERROR = 5902u32; +pub const ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT: WIN32_ERROR = 5903u32; +pub const ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND: WIN32_ERROR = 5032u32; +pub const ERROR_CLUSTERLOG_CORRUPT: WIN32_ERROR = 5029u32; +pub const ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE: WIN32_ERROR = 5031u32; +pub const ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE: WIN32_ERROR = 5033u32; +pub const ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE: WIN32_ERROR = 5030u32; +pub const ERROR_CLUSTERSET_MANAGEMENT_CLUSTER_UNREACHABLE: WIN32_ERROR = 5999u32; +pub const ERROR_CLUSTER_AFFINITY_CONFLICT: WIN32_ERROR = 5971u32; +pub const ERROR_CLUSTER_BACKUP_IN_PROGRESS: WIN32_ERROR = 5949u32; +pub const ERROR_CLUSTER_CANNOT_RETURN_PROPERTIES: WIN32_ERROR = 5968u32; +pub const ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME: WIN32_ERROR = 5900u32; +pub const ERROR_CLUSTER_CANT_DESERIALIZE_DATA: WIN32_ERROR = 5923u32; +pub const ERROR_CLUSTER_CSV_INVALID_HANDLE: WIN32_ERROR = 5989u32; +pub const ERROR_CLUSTER_CSV_IO_PAUSE_TIMEOUT: WIN32_ERROR = 5979u32; +pub const ERROR_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR: WIN32_ERROR = 5990u32; +pub const ERROR_CLUSTER_DATABASE_SEQMISMATCH: WIN32_ERROR = 5083u32; +pub const ERROR_CLUSTER_DATABASE_TRANSACTION_IN_PROGRESS: WIN32_ERROR = 5918u32; +pub const ERROR_CLUSTER_DATABASE_TRANSACTION_NOT_IN_PROGRESS: WIN32_ERROR = 5919u32; +pub const ERROR_CLUSTER_DATABASE_UPDATE_CONDITION_FAILED: WIN32_ERROR = 5986u32; +pub const ERROR_CLUSTER_DISK_NOT_CONNECTED: WIN32_ERROR = 5963u32; +pub const ERROR_CLUSTER_EVICT_INVALID_REQUEST: WIN32_ERROR = 5939u32; +pub const ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP: WIN32_ERROR = 5896u32; +pub const ERROR_CLUSTER_FAULT_DOMAIN_FAILED_S2D_VALIDATION: WIN32_ERROR = 5996u32; +pub const ERROR_CLUSTER_FAULT_DOMAIN_INVALID_HIERARCHY: WIN32_ERROR = 5995u32; +pub const ERROR_CLUSTER_FAULT_DOMAIN_PARENT_NOT_FOUND: WIN32_ERROR = 5994u32; +pub const ERROR_CLUSTER_FAULT_DOMAIN_S2D_CONNECTIVITY_LOSS: WIN32_ERROR = 5997u32; +pub const ERROR_CLUSTER_GROUP_BUSY: WIN32_ERROR = 5944u32; +pub const ERROR_CLUSTER_GROUP_MOVING: WIN32_ERROR = 5908u32; +pub const ERROR_CLUSTER_GROUP_QUEUED: WIN32_ERROR = 5959u32; +pub const ERROR_CLUSTER_GROUP_SINGLETON_RESOURCE: WIN32_ERROR = 5941u32; +pub const ERROR_CLUSTER_GUM_NOT_LOCKER: WIN32_ERROR = 5085u32; +pub const ERROR_CLUSTER_INCOMPATIBLE_VERSIONS: WIN32_ERROR = 5075u32; +pub const ERROR_CLUSTER_INSTANCE_ID_MISMATCH: WIN32_ERROR = 5893u32; +pub const ERROR_CLUSTER_INTERNAL_INVALID_FUNCTION: WIN32_ERROR = 5912u32; +pub const ERROR_CLUSTER_INVALID_INFRASTRUCTURE_FILESERVER_NAME: WIN32_ERROR = 5998u32; +pub const ERROR_CLUSTER_INVALID_IPV6_NETWORK: WIN32_ERROR = 5926u32; +pub const ERROR_CLUSTER_INVALID_IPV6_TUNNEL_NETWORK: WIN32_ERROR = 5927u32; +pub const ERROR_CLUSTER_INVALID_NETWORK: WIN32_ERROR = 5054u32; +pub const ERROR_CLUSTER_INVALID_NETWORK_PROVIDER: WIN32_ERROR = 5049u32; +pub const ERROR_CLUSTER_INVALID_NODE: WIN32_ERROR = 5039u32; +pub const ERROR_CLUSTER_INVALID_NODE_WEIGHT: WIN32_ERROR = 5954u32; +pub const ERROR_CLUSTER_INVALID_REQUEST: WIN32_ERROR = 5048u32; +pub const ERROR_CLUSTER_INVALID_SECURITY_DESCRIPTOR: WIN32_ERROR = 5946u32; +pub const ERROR_CLUSTER_INVALID_STRING_FORMAT: WIN32_ERROR = 5917u32; +pub const ERROR_CLUSTER_INVALID_STRING_TERMINATION: WIN32_ERROR = 5916u32; +pub const ERROR_CLUSTER_IPADDR_IN_USE: WIN32_ERROR = 5057u32; +pub const ERROR_CLUSTER_JOIN_ABORTED: WIN32_ERROR = 5074u32; +pub const ERROR_CLUSTER_JOIN_IN_PROGRESS: WIN32_ERROR = 5041u32; +pub const ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS: WIN32_ERROR = 5053u32; +pub const ERROR_CLUSTER_LAST_INTERNAL_NETWORK: WIN32_ERROR = 5066u32; +pub const ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND: WIN32_ERROR = 5043u32; +pub const ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED: WIN32_ERROR = 5076u32; +pub const ERROR_CLUSTER_MAX_NODES_IN_CLUSTER: WIN32_ERROR = 5934u32; +pub const ERROR_CLUSTER_MEMBERSHIP_HALT: WIN32_ERROR = 5892u32; +pub const ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE: WIN32_ERROR = 5890u32; +pub const ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME: WIN32_ERROR = 5905u32; +pub const ERROR_CLUSTER_NETINTERFACE_EXISTS: WIN32_ERROR = 5046u32; +pub const ERROR_CLUSTER_NETINTERFACE_NOT_FOUND: WIN32_ERROR = 5047u32; +pub const ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE: WIN32_ERROR = 5064u32; +pub const ERROR_CLUSTER_NETWORK_ALREADY_ONLINE: WIN32_ERROR = 5063u32; +pub const ERROR_CLUSTER_NETWORK_EXISTS: WIN32_ERROR = 5044u32; +pub const ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS: WIN32_ERROR = 5067u32; +pub const ERROR_CLUSTER_NETWORK_NOT_FOUND: WIN32_ERROR = 5045u32; +pub const ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP: WIN32_ERROR = 5894u32; +pub const ERROR_CLUSTER_NETWORK_NOT_INTERNAL: WIN32_ERROR = 5060u32; +pub const ERROR_CLUSTER_NODE_ALREADY_DOWN: WIN32_ERROR = 5062u32; +pub const ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT: WIN32_ERROR = 5088u32; +pub const ERROR_CLUSTER_NODE_ALREADY_MEMBER: WIN32_ERROR = 5065u32; +pub const ERROR_CLUSTER_NODE_ALREADY_UP: WIN32_ERROR = 5061u32; +pub const ERROR_CLUSTER_NODE_DOWN: WIN32_ERROR = 5050u32; +pub const ERROR_CLUSTER_NODE_DRAIN_IN_PROGRESS: WIN32_ERROR = 5962u32; +pub const ERROR_CLUSTER_NODE_EXISTS: WIN32_ERROR = 5040u32; +pub const ERROR_CLUSTER_NODE_IN_GRACE_PERIOD: WIN32_ERROR = 5978u32; +pub const ERROR_CLUSTER_NODE_ISOLATED: WIN32_ERROR = 5984u32; +pub const ERROR_CLUSTER_NODE_NOT_FOUND: WIN32_ERROR = 5042u32; +pub const ERROR_CLUSTER_NODE_NOT_MEMBER: WIN32_ERROR = 5052u32; +pub const ERROR_CLUSTER_NODE_NOT_PAUSED: WIN32_ERROR = 5058u32; +pub const ERROR_CLUSTER_NODE_NOT_READY: WIN32_ERROR = 5072u32; +pub const ERROR_CLUSTER_NODE_PAUSED: WIN32_ERROR = 5070u32; +pub const ERROR_CLUSTER_NODE_QUARANTINED: WIN32_ERROR = 5985u32; +pub const ERROR_CLUSTER_NODE_SHUTTING_DOWN: WIN32_ERROR = 5073u32; +pub const ERROR_CLUSTER_NODE_UNREACHABLE: WIN32_ERROR = 5051u32; +pub const ERROR_CLUSTER_NODE_UP: WIN32_ERROR = 5056u32; +pub const ERROR_CLUSTER_NOT_INSTALLED: WIN32_ERROR = 5932u32; +pub const ERROR_CLUSTER_NOT_SHARED_VOLUME: WIN32_ERROR = 5945u32; +pub const ERROR_CLUSTER_NO_NET_ADAPTERS: WIN32_ERROR = 5906u32; +pub const ERROR_CLUSTER_NO_QUORUM: WIN32_ERROR = 5925u32; +pub const ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED: WIN32_ERROR = 5081u32; +pub const ERROR_CLUSTER_NO_SECURITY_CONTEXT: WIN32_ERROR = 5059u32; +pub const ERROR_CLUSTER_NULL_DATA: WIN32_ERROR = 5920u32; +pub const ERROR_CLUSTER_OBJECT_ALREADY_USED: WIN32_ERROR = 5936u32; +pub const ERROR_CLUSTER_OBJECT_IS_CLUSTER_SET_VM: WIN32_ERROR = 6250u32; +pub const ERROR_CLUSTER_OLD_VERSION: WIN32_ERROR = 5904u32; +pub const ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST: WIN32_ERROR = 5082u32; +pub const ERROR_CLUSTER_PARAMETER_MISMATCH: WIN32_ERROR = 5897u32; +pub const ERROR_CLUSTER_PARAMETER_OUT_OF_BOUNDS: WIN32_ERROR = 5913u32; +pub const ERROR_CLUSTER_PARTIAL_READ: WIN32_ERROR = 5921u32; +pub const ERROR_CLUSTER_PARTIAL_SEND: WIN32_ERROR = 5914u32; +pub const ERROR_CLUSTER_PARTIAL_WRITE: WIN32_ERROR = 5922u32; +pub const ERROR_CLUSTER_POISONED: WIN32_ERROR = 5907u32; +pub const ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH: WIN32_ERROR = 5895u32; +pub const ERROR_CLUSTER_QUORUMLOG_NOT_FOUND: WIN32_ERROR = 5891u32; +pub const ERROR_CLUSTER_REGISTRY_INVALID_FUNCTION: WIN32_ERROR = 5915u32; +pub const ERROR_CLUSTER_RESNAME_NOT_FOUND: WIN32_ERROR = 5080u32; +pub const ERROR_CLUSTER_RESOURCES_MUST_BE_ONLINE_ON_THE_SAME_NODE: WIN32_ERROR = 5933u32; +pub const ERROR_CLUSTER_RESOURCE_CONFIGURATION_ERROR: WIN32_ERROR = 5943u32; +pub const ERROR_CLUSTER_RESOURCE_CONTAINS_UNSUPPORTED_DIFF_AREA_FOR_SHARED_VOLUMES: WIN32_ERROR = 5969u32; +pub const ERROR_CLUSTER_RESOURCE_DOES_NOT_SUPPORT_UNMONITORED: WIN32_ERROR = 5982u32; +pub const ERROR_CLUSTER_RESOURCE_IS_IN_MAINTENANCE_MODE: WIN32_ERROR = 5970u32; +pub const ERROR_CLUSTER_RESOURCE_IS_REPLICATED: WIN32_ERROR = 5983u32; +pub const ERROR_CLUSTER_RESOURCE_IS_REPLICA_VIRTUAL_MACHINE: WIN32_ERROR = 5972u32; +pub const ERROR_CLUSTER_RESOURCE_LOCKED_STATUS: WIN32_ERROR = 5960u32; +pub const ERROR_CLUSTER_RESOURCE_NOT_MONITORED: WIN32_ERROR = 5981u32; +pub const ERROR_CLUSTER_RESOURCE_PROVIDER_FAILED: WIN32_ERROR = 5942u32; +pub const ERROR_CLUSTER_RESOURCE_TYPE_BUSY: WIN32_ERROR = 5909u32; +pub const ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND: WIN32_ERROR = 5078u32; +pub const ERROR_CLUSTER_RESOURCE_VETOED_CALL: WIN32_ERROR = 5955u32; +pub const ERROR_CLUSTER_RESOURCE_VETOED_MOVE_INCOMPATIBLE_NODES: WIN32_ERROR = 5953u32; +pub const ERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_DESTINATION: WIN32_ERROR = 5957u32; +pub const ERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_SOURCE: WIN32_ERROR = 5958u32; +pub const ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED: WIN32_ERROR = 5079u32; +pub const ERROR_CLUSTER_RHS_FAILED_INITIALIZATION: WIN32_ERROR = 5931u32; +pub const ERROR_CLUSTER_SHARED_VOLUMES_IN_USE: WIN32_ERROR = 5947u32; +pub const ERROR_CLUSTER_SHARED_VOLUME_FAILOVER_NOT_ALLOWED: WIN32_ERROR = 5961u32; +pub const ERROR_CLUSTER_SHARED_VOLUME_NOT_REDIRECTED: WIN32_ERROR = 5967u32; +pub const ERROR_CLUSTER_SHARED_VOLUME_REDIRECTED: WIN32_ERROR = 5966u32; +pub const ERROR_CLUSTER_SHUTTING_DOWN: WIN32_ERROR = 5022u32; +pub const ERROR_CLUSTER_SINGLETON_RESOURCE: WIN32_ERROR = 5940u32; +pub const ERROR_CLUSTER_SPACE_DEGRADED: WIN32_ERROR = 5987u32; +pub const ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED: WIN32_ERROR = 5077u32; +pub const ERROR_CLUSTER_TOKEN_DELEGATION_NOT_SUPPORTED: WIN32_ERROR = 5988u32; +pub const ERROR_CLUSTER_TOO_MANY_NODES: WIN32_ERROR = 5935u32; +pub const ERROR_CLUSTER_UPGRADE_FIX_QUORUM_NOT_SUPPORTED: WIN32_ERROR = 5974u32; +pub const ERROR_CLUSTER_UPGRADE_INCOMPATIBLE_VERSIONS: WIN32_ERROR = 5973u32; +pub const ERROR_CLUSTER_UPGRADE_INCOMPLETE: WIN32_ERROR = 5977u32; +pub const ERROR_CLUSTER_UPGRADE_IN_PROGRESS: WIN32_ERROR = 5976u32; +pub const ERROR_CLUSTER_UPGRADE_RESTART_REQUIRED: WIN32_ERROR = 5975u32; +pub const ERROR_CLUSTER_USE_SHARED_VOLUMES_API: WIN32_ERROR = 5948u32; +pub const ERROR_CLUSTER_WATCHDOG_TERMINATING: WIN32_ERROR = 5952u32; +pub const ERROR_CLUSTER_WRONG_OS_VERSION: WIN32_ERROR = 5899u32; +pub const ERROR_COLORSPACE_MISMATCH: WIN32_ERROR = 2021u32; +pub const ERROR_COMMITMENT_LIMIT: WIN32_ERROR = 1455u32; +pub const ERROR_COMMITMENT_MINIMUM: WIN32_ERROR = 635u32; +pub const ERROR_COMPRESSED_FILE_NOT_SUPPORTED: WIN32_ERROR = 335u32; +pub const ERROR_COMPRESSION_DISABLED: WIN32_ERROR = 769u32; +pub const ERROR_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION: WIN32_ERROR = 6850u32; +pub const ERROR_COMPRESSION_NOT_BENEFICIAL: WIN32_ERROR = 344u32; +pub const ERROR_COM_TASK_STOP_PENDING: WIN32_ERROR = 15501u32; +pub const ERROR_CONNECTED_OTHER_PASSWORD: WIN32_ERROR = 2108u32; +pub const ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT: WIN32_ERROR = 2109u32; +pub const ERROR_CONNECTION_ABORTED: WIN32_ERROR = 1236u32; +pub const ERROR_CONNECTION_ACTIVE: WIN32_ERROR = 1230u32; +pub const ERROR_CONNECTION_COUNT_LIMIT: WIN32_ERROR = 1238u32; +pub const ERROR_CONNECTION_INVALID: WIN32_ERROR = 1229u32; +pub const ERROR_CONNECTION_REFUSED: WIN32_ERROR = 1225u32; +pub const ERROR_CONNECTION_UNAVAIL: WIN32_ERROR = 1201u32; +pub const ERROR_CONTAINER_ASSIGNED: WIN32_ERROR = 1504u32; +pub const ERROR_CONTENT_BLOCKED: WIN32_ERROR = 1296u32; +pub const ERROR_CONTEXT_EXPIRED: WIN32_ERROR = 1931u32; +pub const ERROR_CONTINUE: WIN32_ERROR = 1246u32; +pub const ERROR_CONTROLLING_IEPORT: WIN32_ERROR = 4329u32; +pub const ERROR_CONTROL_C_EXIT: WIN32_ERROR = 572u32; +pub const ERROR_CONTROL_ID_NOT_FOUND: WIN32_ERROR = 1421u32; +pub const ERROR_CONVERT_TO_LARGE: WIN32_ERROR = 600u32; +pub const ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND: WIN32_ERROR = 3016u32; +pub const ERROR_CORE_RESOURCE: WIN32_ERROR = 5026u32; +pub const ERROR_CORRUPT_LOG_CLEARED: WIN32_ERROR = 798u32; +pub const ERROR_CORRUPT_LOG_CORRUPTED: WIN32_ERROR = 795u32; +pub const ERROR_CORRUPT_LOG_DELETED_FULL: WIN32_ERROR = 797u32; +pub const ERROR_CORRUPT_LOG_OVERFULL: WIN32_ERROR = 794u32; +pub const ERROR_CORRUPT_LOG_UNAVAILABLE: WIN32_ERROR = 796u32; +pub const ERROR_CORRUPT_SYSTEM_FILE: WIN32_ERROR = 634u32; +pub const ERROR_COULD_NOT_INTERPRET: WIN32_ERROR = 552u32; +pub const ERROR_COULD_NOT_RESIZE_LOG: WIN32_ERROR = 6629u32; +pub const ERROR_COUNTER_TIMEOUT: WIN32_ERROR = 1121u32; +pub const ERROR_CPU_SET_INVALID: WIN32_ERROR = 813u32; +pub const ERROR_CRASH_DUMP: WIN32_ERROR = 753u32; +pub const ERROR_CRC: WIN32_ERROR = 23u32; +pub const ERROR_CREATE_FAILED: WIN32_ERROR = 1631u32; +pub const ERROR_CRED_REQUIRES_CONFIRMATION: windows_sys::core::HRESULT = 0x80097019_u32 as _; +pub const ERROR_CRM_PROTOCOL_ALREADY_EXISTS: WIN32_ERROR = 6710u32; +pub const ERROR_CRM_PROTOCOL_NOT_FOUND: WIN32_ERROR = 6712u32; +pub const ERROR_CROSS_PARTITION_VIOLATION: WIN32_ERROR = 1661u32; +pub const ERROR_CSCSHARE_OFFLINE: WIN32_ERROR = 1262u32; +pub const ERROR_CSV_VOLUME_NOT_LOCAL: WIN32_ERROR = 5951u32; +pub const ERROR_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE: WIN32_ERROR = 6019u32; +pub const ERROR_CS_ENCRYPTION_FILE_NOT_CSE: WIN32_ERROR = 6021u32; +pub const ERROR_CS_ENCRYPTION_INVALID_SERVER_RESPONSE: WIN32_ERROR = 6017u32; +pub const ERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE: WIN32_ERROR = 6020u32; +pub const ERROR_CS_ENCRYPTION_UNSUPPORTED_SERVER: WIN32_ERROR = 6018u32; +pub const ERROR_CTLOG_INCONSISTENT_TRACKING_FILE: WIN32_ERROR = 3225026596u32; +pub const ERROR_CTLOG_INVALID_TRACKING_STATE: WIN32_ERROR = 3225026595u32; +pub const ERROR_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE: WIN32_ERROR = 3225026593u32; +pub const ERROR_CTLOG_TRACKING_NOT_INITIALIZED: WIN32_ERROR = 3225026592u32; +pub const ERROR_CTLOG_VHD_CHANGED_OFFLINE: WIN32_ERROR = 3225026594u32; +pub const ERROR_CTX_ACCOUNT_RESTRICTION: WIN32_ERROR = 7064u32; +pub const ERROR_CTX_BAD_VIDEO_MODE: WIN32_ERROR = 7025u32; +pub const ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY: WIN32_ERROR = 7005u32; +pub const ERROR_CTX_CDM_CONNECT: WIN32_ERROR = 7066u32; +pub const ERROR_CTX_CDM_DISCONNECT: WIN32_ERROR = 7067u32; +pub const ERROR_CTX_CLIENT_LICENSE_IN_USE: WIN32_ERROR = 7052u32; +pub const ERROR_CTX_CLIENT_LICENSE_NOT_SET: WIN32_ERROR = 7053u32; +pub const ERROR_CTX_CLIENT_QUERY_TIMEOUT: WIN32_ERROR = 7040u32; +pub const ERROR_CTX_CLOSE_PENDING: WIN32_ERROR = 7007u32; +pub const ERROR_CTX_CONSOLE_CONNECT: WIN32_ERROR = 7042u32; +pub const ERROR_CTX_CONSOLE_DISCONNECT: WIN32_ERROR = 7041u32; +pub const ERROR_CTX_ENCRYPTION_LEVEL_REQUIRED: WIN32_ERROR = 7061u32; +pub const ERROR_CTX_GRAPHICS_INVALID: WIN32_ERROR = 7035u32; +pub const ERROR_CTX_INVALID_MODEMNAME: WIN32_ERROR = 7010u32; +pub const ERROR_CTX_INVALID_PD: WIN32_ERROR = 7002u32; +pub const ERROR_CTX_INVALID_WD: WIN32_ERROR = 7049u32; +pub const ERROR_CTX_LICENSE_CLIENT_INVALID: WIN32_ERROR = 7055u32; +pub const ERROR_CTX_LICENSE_EXPIRED: WIN32_ERROR = 7056u32; +pub const ERROR_CTX_LICENSE_NOT_AVAILABLE: WIN32_ERROR = 7054u32; +pub const ERROR_CTX_LOGON_DISABLED: WIN32_ERROR = 7037u32; +pub const ERROR_CTX_MODEM_INF_NOT_FOUND: WIN32_ERROR = 7009u32; +pub const ERROR_CTX_MODEM_RESPONSE_BUSY: WIN32_ERROR = 7015u32; +pub const ERROR_CTX_MODEM_RESPONSE_ERROR: WIN32_ERROR = 7011u32; +pub const ERROR_CTX_MODEM_RESPONSE_NO_CARRIER: WIN32_ERROR = 7013u32; +pub const ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE: WIN32_ERROR = 7014u32; +pub const ERROR_CTX_MODEM_RESPONSE_TIMEOUT: WIN32_ERROR = 7012u32; +pub const ERROR_CTX_MODEM_RESPONSE_VOICE: WIN32_ERROR = 7016u32; +pub const ERROR_CTX_NOT_CONSOLE: WIN32_ERROR = 7038u32; +pub const ERROR_CTX_NO_FORCE_LOGOFF: WIN32_ERROR = 7063u32; +pub const ERROR_CTX_NO_OUTBUF: WIN32_ERROR = 7008u32; +pub const ERROR_CTX_PD_NOT_FOUND: WIN32_ERROR = 7003u32; +pub const ERROR_CTX_SECURITY_LAYER_ERROR: WIN32_ERROR = 7068u32; +pub const ERROR_CTX_SERVICE_NAME_COLLISION: WIN32_ERROR = 7006u32; +pub const ERROR_CTX_SESSION_IN_USE: WIN32_ERROR = 7062u32; +pub const ERROR_CTX_SHADOW_DENIED: WIN32_ERROR = 7044u32; +pub const ERROR_CTX_SHADOW_DISABLED: WIN32_ERROR = 7051u32; +pub const ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE: WIN32_ERROR = 7058u32; +pub const ERROR_CTX_SHADOW_INVALID: WIN32_ERROR = 7050u32; +pub const ERROR_CTX_SHADOW_NOT_RUNNING: WIN32_ERROR = 7057u32; +pub const ERROR_CTX_TD_ERROR: WIN32_ERROR = 7017u32; +pub const ERROR_CTX_WD_NOT_FOUND: WIN32_ERROR = 7004u32; +pub const ERROR_CTX_WINSTATIONS_DISABLED: WIN32_ERROR = 7060u32; +pub const ERROR_CTX_WINSTATION_ACCESS_DENIED: WIN32_ERROR = 7045u32; +pub const ERROR_CTX_WINSTATION_ALREADY_EXISTS: WIN32_ERROR = 7023u32; +pub const ERROR_CTX_WINSTATION_BUSY: WIN32_ERROR = 7024u32; +pub const ERROR_CTX_WINSTATION_NAME_INVALID: WIN32_ERROR = 7001u32; +pub const ERROR_CTX_WINSTATION_NOT_FOUND: WIN32_ERROR = 7022u32; +pub const ERROR_CURRENT_DIRECTORY: WIN32_ERROR = 16u32; +pub const ERROR_CURRENT_DOMAIN_NOT_ALLOWED: WIN32_ERROR = 1399u32; +pub const ERROR_CURRENT_TRANSACTION_NOT_VALID: WIN32_ERROR = 6714u32; +pub const ERROR_DATABASE_BACKUP_CORRUPT: WIN32_ERROR = 5087u32; +pub const ERROR_DATABASE_DOES_NOT_EXIST: WIN32_ERROR = 1065u32; +pub const ERROR_DATABASE_FAILURE: WIN32_ERROR = 4313u32; +pub const ERROR_DATABASE_FULL: WIN32_ERROR = 4314u32; +pub const ERROR_DATATYPE_MISMATCH: WIN32_ERROR = 1629u32; +pub const ERROR_DATA_CHECKSUM_ERROR: WIN32_ERROR = 323u32; +pub const ERROR_DATA_LOST_REPAIR: WIN32_ERROR = 6843u32; +pub const ERROR_DATA_NOT_ACCEPTED: WIN32_ERROR = 592u32; +pub const ERROR_DAX_MAPPING_EXISTS: WIN32_ERROR = 361u32; +pub const ERROR_DBG_ATTACH_PROCESS_FAILURE_LOCKDOWN: windows_sys::core::HRESULT = 0x80B00002_u32 as _; +pub const ERROR_DBG_COMMAND_EXCEPTION: WIN32_ERROR = 697u32; +pub const ERROR_DBG_CONNECT_SERVER_FAILURE_LOCKDOWN: windows_sys::core::HRESULT = 0x80B00003_u32 as _; +pub const ERROR_DBG_CONTINUE: WIN32_ERROR = 767u32; +pub const ERROR_DBG_CONTROL_BREAK: WIN32_ERROR = 696u32; +pub const ERROR_DBG_CONTROL_C: WIN32_ERROR = 693u32; +pub const ERROR_DBG_CREATE_PROCESS_FAILURE_LOCKDOWN: windows_sys::core::HRESULT = 0x80B00001_u32 as _; +pub const ERROR_DBG_EXCEPTION_HANDLED: WIN32_ERROR = 766u32; +pub const ERROR_DBG_EXCEPTION_NOT_HANDLED: WIN32_ERROR = 688u32; +pub const ERROR_DBG_PRINTEXCEPTION_C: WIN32_ERROR = 694u32; +pub const ERROR_DBG_REPLY_LATER: WIN32_ERROR = 689u32; +pub const ERROR_DBG_RIPEXCEPTION: WIN32_ERROR = 695u32; +pub const ERROR_DBG_START_SERVER_FAILURE_LOCKDOWN: windows_sys::core::HRESULT = 0x80B00004_u32 as _; +pub const ERROR_DBG_TERMINATE_PROCESS: WIN32_ERROR = 692u32; +pub const ERROR_DBG_TERMINATE_THREAD: WIN32_ERROR = 691u32; +pub const ERROR_DBG_UNABLE_TO_PROVIDE_HANDLE: WIN32_ERROR = 690u32; +pub const ERROR_DC_NOT_FOUND: WIN32_ERROR = 1425u32; +pub const ERROR_DDE_FAIL: WIN32_ERROR = 1156u32; +pub const ERROR_DDM_NOT_RUNNING: u32 = 903u32; +pub const ERROR_DEBUGGER_INACTIVE: WIN32_ERROR = 1284u32; +pub const ERROR_DEBUG_ATTACH_FAILED: WIN32_ERROR = 590u32; +pub const ERROR_DECRYPTION_FAILED: WIN32_ERROR = 6001u32; +pub const ERROR_DELAY_LOAD_FAILED: WIN32_ERROR = 1285u32; +pub const ERROR_DELETE_PENDING: WIN32_ERROR = 303u32; +pub const ERROR_DELETING_EXISTING_APPLICATIONDATA_STORE_FAILED: WIN32_ERROR = 15621u32; +pub const ERROR_DELETING_ICM_XFORM: WIN32_ERROR = 2019u32; +pub const ERROR_DEPENDENCY_ALREADY_EXISTS: WIN32_ERROR = 5003u32; +pub const ERROR_DEPENDENCY_NOT_ALLOWED: WIN32_ERROR = 5069u32; +pub const ERROR_DEPENDENCY_NOT_FOUND: WIN32_ERROR = 5002u32; +pub const ERROR_DEPENDENCY_TREE_TOO_COMPLEX: WIN32_ERROR = 5929u32; +pub const ERROR_DEPENDENT_RESOURCE_EXISTS: WIN32_ERROR = 5001u32; +pub const ERROR_DEPENDENT_RESOURCE_PROPERTY_CONFLICT: WIN32_ERROR = 5924u32; +pub const ERROR_DEPENDENT_SERVICES_RUNNING: WIN32_ERROR = 1051u32; +pub const ERROR_DEPLOYMENT_BLOCKED_BY_POLICY: WIN32_ERROR = 15617u32; +pub const ERROR_DEPLOYMENT_BLOCKED_BY_PROFILE_POLICY: WIN32_ERROR = 15651u32; +pub const ERROR_DEPLOYMENT_BLOCKED_BY_USER_LOG_OFF: WIN32_ERROR = 15641u32; +pub const ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_MACHINE: WIN32_ERROR = 15650u32; +pub const ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_PACKAGE: WIN32_ERROR = 15649u32; +pub const ERROR_DEPLOYMENT_FAILED_CONFLICTING_MUTABLE_PACKAGE_DIRECTORY: WIN32_ERROR = 15652u32; +pub const ERROR_DEPLOYMENT_OPTION_NOT_SUPPORTED: WIN32_ERROR = 15645u32; +pub const ERROR_DESTINATION_ELEMENT_FULL: WIN32_ERROR = 1161u32; +pub const ERROR_DESTROY_OBJECT_OF_OTHER_THREAD: WIN32_ERROR = 1435u32; +pub const ERROR_DEVICE_ALREADY_ATTACHED: WIN32_ERROR = 548u32; +pub const ERROR_DEVICE_ALREADY_REMEMBERED: WIN32_ERROR = 1202u32; +pub const ERROR_DEVICE_DOOR_OPEN: WIN32_ERROR = 1166u32; +pub const ERROR_DEVICE_ENUMERATION_ERROR: WIN32_ERROR = 648u32; +pub const ERROR_DEVICE_FEATURE_NOT_SUPPORTED: WIN32_ERROR = 316u32; +pub const ERROR_DEVICE_HARDWARE_ERROR: WIN32_ERROR = 483u32; +pub const ERROR_DEVICE_HINT_NAME_BUFFER_TOO_SMALL: WIN32_ERROR = 355u32; +pub const ERROR_DEVICE_INSTALLER_NOT_READY: WIN32_ERROR = 3758096966u32; +pub const ERROR_DEVICE_INSTALL_BLOCKED: WIN32_ERROR = 3758096968u32; +pub const ERROR_DEVICE_INTERFACE_ACTIVE: WIN32_ERROR = 3758096923u32; +pub const ERROR_DEVICE_INTERFACE_REMOVED: WIN32_ERROR = 3758096924u32; +pub const ERROR_DEVICE_IN_MAINTENANCE: WIN32_ERROR = 359u32; +pub const ERROR_DEVICE_IN_USE: WIN32_ERROR = 2404u32; +pub const ERROR_DEVICE_NOT_AVAILABLE: WIN32_ERROR = 4319u32; +pub const ERROR_DEVICE_NOT_CONNECTED: WIN32_ERROR = 1167u32; +pub const ERROR_DEVICE_NOT_PARTITIONED: WIN32_ERROR = 1107u32; +pub const ERROR_DEVICE_NO_RESOURCES: WIN32_ERROR = 322u32; +pub const ERROR_DEVICE_REINITIALIZATION_NEEDED: WIN32_ERROR = 1164u32; +pub const ERROR_DEVICE_REMOVED: WIN32_ERROR = 1617u32; +pub const ERROR_DEVICE_REQUIRES_CLEANING: WIN32_ERROR = 1165u32; +pub const ERROR_DEVICE_RESET_REQUIRED: WIN32_ERROR = 507u32; +pub const ERROR_DEVICE_SUPPORT_IN_PROGRESS: WIN32_ERROR = 171u32; +pub const ERROR_DEVICE_UNREACHABLE: WIN32_ERROR = 321u32; +pub const ERROR_DEVINFO_DATA_LOCKED: WIN32_ERROR = 3758096915u32; +pub const ERROR_DEVINFO_LIST_LOCKED: WIN32_ERROR = 3758096914u32; +pub const ERROR_DEVINFO_NOT_REGISTERED: WIN32_ERROR = 3758096904u32; +pub const ERROR_DEVINSTALL_QUEUE_NONNATIVE: WIN32_ERROR = 3758096944u32; +pub const ERROR_DEVINST_ALREADY_EXISTS: WIN32_ERROR = 3758096903u32; +pub const ERROR_DEV_NOT_EXIST: WIN32_ERROR = 55u32; +pub const ERROR_DEV_SIDELOAD_LIMIT_EXCEEDED: WIN32_ERROR = 15633u32; +pub const ERROR_DHCP_ADDRESS_CONFLICT: WIN32_ERROR = 4100u32; +pub const ERROR_DIALIN_HOURS_RESTRICTION: u32 = 940u32; +pub const ERROR_DIALOUT_HOURS_RESTRICTION: u32 = 944u32; +pub const ERROR_DIFFERENT_PROFILE_RESOURCE_MANAGER_EXIST: WIN32_ERROR = 15144u32; +pub const ERROR_DIFFERENT_SERVICE_ACCOUNT: WIN32_ERROR = 1079u32; +pub const ERROR_DIFFERENT_VERSION_OF_PACKAGED_SERVICE_INSTALLED: WIN32_ERROR = 15654u32; +pub const ERROR_DIF_BINDING_API_NOT_FOUND: WIN32_ERROR = 3199u32; +pub const ERROR_DIF_IOCALLBACK_NOT_REPLACED: WIN32_ERROR = 3190u32; +pub const ERROR_DIF_LIVEDUMP_LIMIT_EXCEEDED: WIN32_ERROR = 3191u32; +pub const ERROR_DIF_VOLATILE_DRIVER_HOTPATCHED: WIN32_ERROR = 3193u32; +pub const ERROR_DIF_VOLATILE_DRIVER_IS_NOT_RUNNING: WIN32_ERROR = 3195u32; +pub const ERROR_DIF_VOLATILE_INVALID_INFO: WIN32_ERROR = 3194u32; +pub const ERROR_DIF_VOLATILE_NOT_ALLOWED: WIN32_ERROR = 3198u32; +pub const ERROR_DIF_VOLATILE_PLUGIN_CHANGE_NOT_ALLOWED: WIN32_ERROR = 3197u32; +pub const ERROR_DIF_VOLATILE_PLUGIN_IS_NOT_RUNNING: WIN32_ERROR = 3196u32; +pub const ERROR_DIF_VOLATILE_SECTION_NOT_LOCKED: WIN32_ERROR = 3192u32; +pub const ERROR_DIRECTORY: WIN32_ERROR = 267u32; +pub const ERROR_DIRECTORY_NOT_RM: WIN32_ERROR = 6803u32; +pub const ERROR_DIRECTORY_NOT_SUPPORTED: WIN32_ERROR = 336u32; +pub const ERROR_DIRECT_ACCESS_HANDLE: WIN32_ERROR = 130u32; +pub const ERROR_DIR_EFS_DISALLOWED: WIN32_ERROR = 6010u32; +pub const ERROR_DIR_NOT_EMPTY: WIN32_ERROR = 145u32; +pub const ERROR_DIR_NOT_ROOT: WIN32_ERROR = 144u32; +pub const ERROR_DISCARDED: WIN32_ERROR = 157u32; +pub const ERROR_DISK_CHANGE: WIN32_ERROR = 107u32; +pub const ERROR_DISK_CORRUPT: WIN32_ERROR = 1393u32; +pub const ERROR_DISK_FULL: WIN32_ERROR = 112u32; +pub const ERROR_DISK_NOT_CSV_CAPABLE: WIN32_ERROR = 5964u32; +pub const ERROR_DISK_OPERATION_FAILED: WIN32_ERROR = 1127u32; +pub const ERROR_DISK_QUOTA_EXCEEDED: WIN32_ERROR = 1295u32; +pub const ERROR_DISK_RECALIBRATE_FAILED: WIN32_ERROR = 1126u32; +pub const ERROR_DISK_REPAIR_DISABLED: WIN32_ERROR = 780u32; +pub const ERROR_DISK_REPAIR_REDIRECTED: WIN32_ERROR = 792u32; +pub const ERROR_DISK_REPAIR_UNSUCCESSFUL: WIN32_ERROR = 793u32; +pub const ERROR_DISK_RESET_FAILED: WIN32_ERROR = 1128u32; +pub const ERROR_DISK_RESOURCES_EXHAUSTED: WIN32_ERROR = 314u32; +pub const ERROR_DISK_TOO_FRAGMENTED: WIN32_ERROR = 302u32; +pub const ERROR_DI_BAD_PATH: WIN32_ERROR = 3758096916u32; +pub const ERROR_DI_DONT_INSTALL: WIN32_ERROR = 3758096939u32; +pub const ERROR_DI_DO_DEFAULT: WIN32_ERROR = 3758096910u32; +pub const ERROR_DI_FUNCTION_OBSOLETE: WIN32_ERROR = 3758096958u32; +pub const ERROR_DI_NOFILECOPY: WIN32_ERROR = 3758096911u32; +pub const ERROR_DI_POSTPROCESSING_REQUIRED: WIN32_ERROR = 3758096934u32; +pub const ERROR_DLL_INIT_FAILED: WIN32_ERROR = 1114u32; +pub const ERROR_DLL_INIT_FAILED_LOGOFF: WIN32_ERROR = 624u32; +pub const ERROR_DLL_MIGHT_BE_INCOMPATIBLE: WIN32_ERROR = 687u32; +pub const ERROR_DLL_MIGHT_BE_INSECURE: WIN32_ERROR = 686u32; +pub const ERROR_DLL_NOT_FOUND: WIN32_ERROR = 1157u32; +pub const ERROR_DLP_POLICY_DENIES_OPERATION: WIN32_ERROR = 446u32; +pub const ERROR_DLP_POLICY_SILENTLY_FAIL: WIN32_ERROR = 449u32; +pub const ERROR_DLP_POLICY_WARNS_AGAINST_OPERATION: WIN32_ERROR = 445u32; +pub const ERROR_DM_OPERATION_LIMIT_EXCEEDED: windows_sys::core::HRESULT = 0xC0370600_u32 as _; +pub const ERROR_DOMAIN_CONTROLLER_EXISTS: WIN32_ERROR = 1250u32; +pub const ERROR_DOMAIN_CONTROLLER_NOT_FOUND: WIN32_ERROR = 1908u32; +pub const ERROR_DOMAIN_CTRLR_CONFIG_ERROR: WIN32_ERROR = 581u32; +pub const ERROR_DOMAIN_EXISTS: WIN32_ERROR = 1356u32; +pub const ERROR_DOMAIN_LIMIT_EXCEEDED: WIN32_ERROR = 1357u32; +pub const ERROR_DOMAIN_SID_SAME_AS_LOCAL_WORKSTATION: WIN32_ERROR = 8644u32; +pub const ERROR_DOMAIN_TRUST_INCONSISTENT: WIN32_ERROR = 1810u32; +pub const ERROR_DOWNGRADE_DETECTED: WIN32_ERROR = 1265u32; +pub const ERROR_DPL_NOT_SUPPORTED_FOR_USER: WIN32_ERROR = 423u32; +pub const ERROR_DRIVERS_LEAKING_LOCKED_PAGES: WIN32_ERROR = 729u32; +pub const ERROR_DRIVER_BLOCKED: WIN32_ERROR = 1275u32; +pub const ERROR_DRIVER_CANCEL_TIMEOUT: WIN32_ERROR = 594u32; +pub const ERROR_DRIVER_DATABASE_ERROR: WIN32_ERROR = 652u32; +pub const ERROR_DRIVER_FAILED_PRIOR_UNLOAD: WIN32_ERROR = 654u32; +pub const ERROR_DRIVER_FAILED_SLEEP: WIN32_ERROR = 633u32; +pub const ERROR_DRIVER_INSTALL_BLOCKED: WIN32_ERROR = 3758096969u32; +pub const ERROR_DRIVER_NONNATIVE: WIN32_ERROR = 3758096948u32; +pub const ERROR_DRIVER_PROCESS_TERMINATED: WIN32_ERROR = 1291u32; +pub const ERROR_DRIVER_STORE_ADD_FAILED: WIN32_ERROR = 3758096967u32; +pub const ERROR_DRIVER_STORE_DELETE_FAILED: WIN32_ERROR = 3758096972u32; +pub const ERROR_DRIVE_LOCKED: WIN32_ERROR = 108u32; +pub const ERROR_DRIVE_MEDIA_MISMATCH: WIN32_ERROR = 4303u32; +pub const ERROR_DS_ADD_REPLICA_INHIBITED: WIN32_ERROR = 8302u32; +pub const ERROR_DS_ADMIN_LIMIT_EXCEEDED: WIN32_ERROR = 8228u32; +pub const ERROR_DS_AFFECTS_MULTIPLE_DSAS: WIN32_ERROR = 8249u32; +pub const ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER: WIN32_ERROR = 8578u32; +pub const ERROR_DS_ALIASED_OBJ_MISSING: WIN32_ERROR = 8334u32; +pub const ERROR_DS_ALIAS_DEREF_PROBLEM: WIN32_ERROR = 8244u32; +pub const ERROR_DS_ALIAS_POINTS_TO_ALIAS: WIN32_ERROR = 8336u32; +pub const ERROR_DS_ALIAS_PROBLEM: WIN32_ERROR = 8241u32; +pub const ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS: WIN32_ERROR = 8205u32; +pub const ERROR_DS_ATTRIBUTE_OWNED_BY_SAM: WIN32_ERROR = 8346u32; +pub const ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED: WIN32_ERROR = 8204u32; +pub const ERROR_DS_ATT_ALREADY_EXISTS: WIN32_ERROR = 8318u32; +pub const ERROR_DS_ATT_IS_NOT_ON_OBJ: WIN32_ERROR = 8310u32; +pub const ERROR_DS_ATT_NOT_DEF_FOR_CLASS: WIN32_ERROR = 8317u32; +pub const ERROR_DS_ATT_NOT_DEF_IN_SCHEMA: WIN32_ERROR = 8303u32; +pub const ERROR_DS_ATT_SCHEMA_REQ_ID: WIN32_ERROR = 8399u32; +pub const ERROR_DS_ATT_SCHEMA_REQ_SYNTAX: WIN32_ERROR = 8416u32; +pub const ERROR_DS_ATT_VAL_ALREADY_EXISTS: WIN32_ERROR = 8323u32; +pub const ERROR_DS_AUDIT_FAILURE: WIN32_ERROR = 8625u32; +pub const ERROR_DS_AUTHORIZATION_FAILED: WIN32_ERROR = 8599u32; +pub const ERROR_DS_AUTH_METHOD_NOT_SUPPORTED: WIN32_ERROR = 8231u32; +pub const ERROR_DS_AUTH_UNKNOWN: WIN32_ERROR = 8234u32; +pub const ERROR_DS_AUX_CLS_TEST_FAIL: WIN32_ERROR = 8389u32; +pub const ERROR_DS_BACKLINK_WITHOUT_LINK: WIN32_ERROR = 8482u32; +pub const ERROR_DS_BAD_ATT_SCHEMA_SYNTAX: WIN32_ERROR = 8400u32; +pub const ERROR_DS_BAD_HIERARCHY_FILE: WIN32_ERROR = 8425u32; +pub const ERROR_DS_BAD_INSTANCE_TYPE: WIN32_ERROR = 8313u32; +pub const ERROR_DS_BAD_NAME_SYNTAX: WIN32_ERROR = 8335u32; +pub const ERROR_DS_BAD_RDN_ATT_ID_SYNTAX: WIN32_ERROR = 8392u32; +pub const ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED: WIN32_ERROR = 8426u32; +pub const ERROR_DS_BUSY: WIN32_ERROR = 8206u32; +pub const ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD: WIN32_ERROR = 8585u32; +pub const ERROR_DS_CANT_ADD_ATT_VALUES: WIN32_ERROR = 8320u32; +pub const ERROR_DS_CANT_ADD_SYSTEM_ONLY: WIN32_ERROR = 8358u32; +pub const ERROR_DS_CANT_ADD_TO_GC: WIN32_ERROR = 8550u32; +pub const ERROR_DS_CANT_CACHE_ATT: WIN32_ERROR = 8401u32; +pub const ERROR_DS_CANT_CACHE_CLASS: WIN32_ERROR = 8402u32; +pub const ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC: WIN32_ERROR = 8553u32; +pub const ERROR_DS_CANT_CREATE_UNDER_SCHEMA: WIN32_ERROR = 8510u32; +pub const ERROR_DS_CANT_DELETE: WIN32_ERROR = 8398u32; +pub const ERROR_DS_CANT_DELETE_DSA_OBJ: WIN32_ERROR = 8340u32; +pub const ERROR_DS_CANT_DEL_MASTER_CROSSREF: WIN32_ERROR = 8375u32; +pub const ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC: WIN32_ERROR = 8604u32; +pub const ERROR_DS_CANT_DEREF_ALIAS: WIN32_ERROR = 8337u32; +pub const ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN: WIN32_ERROR = 8603u32; +pub const ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF: WIN32_ERROR = 8589u32; +pub const ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN: WIN32_ERROR = 8537u32; +pub const ERROR_DS_CANT_FIND_DSA_OBJ: WIN32_ERROR = 8419u32; +pub const ERROR_DS_CANT_FIND_EXPECTED_NC: WIN32_ERROR = 8420u32; +pub const ERROR_DS_CANT_FIND_NC_IN_CACHE: WIN32_ERROR = 8421u32; +pub const ERROR_DS_CANT_MIX_MASTER_AND_REPS: WIN32_ERROR = 8331u32; +pub const ERROR_DS_CANT_MOD_OBJ_CLASS: WIN32_ERROR = 8215u32; +pub const ERROR_DS_CANT_MOD_PRIMARYGROUPID: WIN32_ERROR = 8506u32; +pub const ERROR_DS_CANT_MOD_SYSTEM_ONLY: WIN32_ERROR = 8369u32; +pub const ERROR_DS_CANT_MOVE_ACCOUNT_GROUP: WIN32_ERROR = 8498u32; +pub const ERROR_DS_CANT_MOVE_APP_BASIC_GROUP: WIN32_ERROR = 8608u32; +pub const ERROR_DS_CANT_MOVE_APP_QUERY_GROUP: WIN32_ERROR = 8609u32; +pub const ERROR_DS_CANT_MOVE_DELETED_OBJECT: WIN32_ERROR = 8489u32; +pub const ERROR_DS_CANT_MOVE_RESOURCE_GROUP: WIN32_ERROR = 8499u32; +pub const ERROR_DS_CANT_ON_NON_LEAF: WIN32_ERROR = 8213u32; +pub const ERROR_DS_CANT_ON_RDN: WIN32_ERROR = 8214u32; +pub const ERROR_DS_CANT_REMOVE_ATT_CACHE: WIN32_ERROR = 8403u32; +pub const ERROR_DS_CANT_REMOVE_CLASS_CACHE: WIN32_ERROR = 8404u32; +pub const ERROR_DS_CANT_REM_MISSING_ATT: WIN32_ERROR = 8324u32; +pub const ERROR_DS_CANT_REM_MISSING_ATT_VAL: WIN32_ERROR = 8325u32; +pub const ERROR_DS_CANT_REPLACE_HIDDEN_REC: WIN32_ERROR = 8424u32; +pub const ERROR_DS_CANT_RETRIEVE_ATTS: WIN32_ERROR = 8481u32; +pub const ERROR_DS_CANT_RETRIEVE_CHILD: WIN32_ERROR = 8422u32; +pub const ERROR_DS_CANT_RETRIEVE_DN: WIN32_ERROR = 8405u32; +pub const ERROR_DS_CANT_RETRIEVE_INSTANCE: WIN32_ERROR = 8407u32; +pub const ERROR_DS_CANT_RETRIEVE_SD: WIN32_ERROR = 8526u32; +pub const ERROR_DS_CANT_START: WIN32_ERROR = 8531u32; +pub const ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ: WIN32_ERROR = 8560u32; +pub const ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS: WIN32_ERROR = 8493u32; +pub const ERROR_DS_CHILDREN_EXIST: WIN32_ERROR = 8332u32; +pub const ERROR_DS_CLASS_MUST_BE_CONCRETE: WIN32_ERROR = 8359u32; +pub const ERROR_DS_CLASS_NOT_DSA: WIN32_ERROR = 8343u32; +pub const ERROR_DS_CLIENT_LOOP: WIN32_ERROR = 8259u32; +pub const ERROR_DS_CODE_INCONSISTENCY: WIN32_ERROR = 8408u32; +pub const ERROR_DS_COMPARE_FALSE: WIN32_ERROR = 8229u32; +pub const ERROR_DS_COMPARE_TRUE: WIN32_ERROR = 8230u32; +pub const ERROR_DS_CONFIDENTIALITY_REQUIRED: WIN32_ERROR = 8237u32; +pub const ERROR_DS_CONFIG_PARAM_MISSING: WIN32_ERROR = 8427u32; +pub const ERROR_DS_CONSTRAINT_VIOLATION: WIN32_ERROR = 8239u32; +pub const ERROR_DS_CONSTRUCTED_ATT_MOD: WIN32_ERROR = 8475u32; +pub const ERROR_DS_CONTROL_NOT_FOUND: WIN32_ERROR = 8258u32; +pub const ERROR_DS_COULDNT_CONTACT_FSMO: WIN32_ERROR = 8367u32; +pub const ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE: WIN32_ERROR = 8503u32; +pub const ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE: WIN32_ERROR = 8502u32; +pub const ERROR_DS_COULDNT_UPDATE_SPNS: WIN32_ERROR = 8525u32; +pub const ERROR_DS_COUNTING_AB_INDICES_FAILED: WIN32_ERROR = 8428u32; +pub const ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD: WIN32_ERROR = 8491u32; +pub const ERROR_DS_CROSS_DOM_MOVE_ERROR: WIN32_ERROR = 8216u32; +pub const ERROR_DS_CROSS_NC_DN_RENAME: WIN32_ERROR = 8368u32; +pub const ERROR_DS_CROSS_REF_BUSY: WIN32_ERROR = 8602u32; +pub const ERROR_DS_CROSS_REF_EXISTS: WIN32_ERROR = 8374u32; +pub const ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE: WIN32_ERROR = 8495u32; +pub const ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2: WIN32_ERROR = 8586u32; +pub const ERROR_DS_DATABASE_ERROR: WIN32_ERROR = 8409u32; +pub const ERROR_DS_DECODING_ERROR: WIN32_ERROR = 8253u32; +pub const ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED: WIN32_ERROR = 8536u32; +pub const ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST: WIN32_ERROR = 8535u32; +pub const ERROR_DS_DIFFERENT_REPL_EPOCHS: WIN32_ERROR = 8593u32; +pub const ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER: WIN32_ERROR = 8615u32; +pub const ERROR_DS_DISALLOWED_NC_REDIRECT: WIN32_ERROR = 8640u32; +pub const ERROR_DS_DNS_LOOKUP_FAILURE: WIN32_ERROR = 8524u32; +pub const ERROR_DS_DOMAIN_NAME_EXISTS_IN_FOREST: WIN32_ERROR = 8634u32; +pub const ERROR_DS_DOMAIN_RENAME_IN_PROGRESS: WIN32_ERROR = 8612u32; +pub const ERROR_DS_DOMAIN_VERSION_TOO_HIGH: WIN32_ERROR = 8564u32; +pub const ERROR_DS_DOMAIN_VERSION_TOO_LOW: WIN32_ERROR = 8566u32; +pub const ERROR_DS_DRA_ABANDON_SYNC: WIN32_ERROR = 8462u32; +pub const ERROR_DS_DRA_ACCESS_DENIED: WIN32_ERROR = 8453u32; +pub const ERROR_DS_DRA_BAD_DN: WIN32_ERROR = 8439u32; +pub const ERROR_DS_DRA_BAD_INSTANCE_TYPE: WIN32_ERROR = 8445u32; +pub const ERROR_DS_DRA_BAD_NC: WIN32_ERROR = 8440u32; +pub const ERROR_DS_DRA_BUSY: WIN32_ERROR = 8438u32; +pub const ERROR_DS_DRA_CONNECTION_FAILED: WIN32_ERROR = 8444u32; +pub const ERROR_DS_DRA_CORRUPT_UTD_VECTOR: WIN32_ERROR = 8629u32; +pub const ERROR_DS_DRA_DB_ERROR: WIN32_ERROR = 8451u32; +pub const ERROR_DS_DRA_DN_EXISTS: WIN32_ERROR = 8441u32; +pub const ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT: WIN32_ERROR = 8544u32; +pub const ERROR_DS_DRA_EXTN_CONNECTION_FAILED: WIN32_ERROR = 8466u32; +pub const ERROR_DS_DRA_GENERIC: WIN32_ERROR = 8436u32; +pub const ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET: WIN32_ERROR = 8464u32; +pub const ERROR_DS_DRA_INCONSISTENT_DIT: WIN32_ERROR = 8443u32; +pub const ERROR_DS_DRA_INTERNAL_ERROR: WIN32_ERROR = 8442u32; +pub const ERROR_DS_DRA_INVALID_PARAMETER: WIN32_ERROR = 8437u32; +pub const ERROR_DS_DRA_MAIL_PROBLEM: WIN32_ERROR = 8447u32; +pub const ERROR_DS_DRA_MISSING_KRBTGT_SECRET: WIN32_ERROR = 8633u32; +pub const ERROR_DS_DRA_MISSING_PARENT: WIN32_ERROR = 8460u32; +pub const ERROR_DS_DRA_NAME_COLLISION: WIN32_ERROR = 8458u32; +pub const ERROR_DS_DRA_NOT_SUPPORTED: WIN32_ERROR = 8454u32; +pub const ERROR_DS_DRA_NO_REPLICA: WIN32_ERROR = 8452u32; +pub const ERROR_DS_DRA_OBJ_IS_REP_SOURCE: WIN32_ERROR = 8450u32; +pub const ERROR_DS_DRA_OBJ_NC_MISMATCH: WIN32_ERROR = 8545u32; +pub const ERROR_DS_DRA_OUT_OF_MEM: WIN32_ERROR = 8446u32; +pub const ERROR_DS_DRA_OUT_SCHEDULE_WINDOW: WIN32_ERROR = 8617u32; +pub const ERROR_DS_DRA_PREEMPTED: WIN32_ERROR = 8461u32; +pub const ERROR_DS_DRA_RECYCLED_TARGET: WIN32_ERROR = 8639u32; +pub const ERROR_DS_DRA_REF_ALREADY_EXISTS: WIN32_ERROR = 8448u32; +pub const ERROR_DS_DRA_REF_NOT_FOUND: WIN32_ERROR = 8449u32; +pub const ERROR_DS_DRA_REPL_PENDING: WIN32_ERROR = 8477u32; +pub const ERROR_DS_DRA_RPC_CANCELLED: WIN32_ERROR = 8455u32; +pub const ERROR_DS_DRA_SCHEMA_CONFLICT: WIN32_ERROR = 8543u32; +pub const ERROR_DS_DRA_SCHEMA_INFO_SHIP: WIN32_ERROR = 8542u32; +pub const ERROR_DS_DRA_SCHEMA_MISMATCH: WIN32_ERROR = 8418u32; +pub const ERROR_DS_DRA_SECRETS_DENIED: WIN32_ERROR = 8630u32; +pub const ERROR_DS_DRA_SHUTDOWN: WIN32_ERROR = 8463u32; +pub const ERROR_DS_DRA_SINK_DISABLED: WIN32_ERROR = 8457u32; +pub const ERROR_DS_DRA_SOURCE_DISABLED: WIN32_ERROR = 8456u32; +pub const ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA: WIN32_ERROR = 8465u32; +pub const ERROR_DS_DRA_SOURCE_REINSTALLED: WIN32_ERROR = 8459u32; +pub const ERROR_DS_DRS_EXTENSIONS_CHANGED: WIN32_ERROR = 8594u32; +pub const ERROR_DS_DSA_MUST_BE_INT_MASTER: WIN32_ERROR = 8342u32; +pub const ERROR_DS_DST_DOMAIN_NOT_NATIVE: WIN32_ERROR = 8496u32; +pub const ERROR_DS_DST_NC_MISMATCH: WIN32_ERROR = 8486u32; +pub const ERROR_DS_DS_REQUIRED: WIN32_ERROR = 8478u32; +pub const ERROR_DS_DUPLICATE_ID_FOUND: WIN32_ERROR = 8605u32; +pub const ERROR_DS_DUP_LDAP_DISPLAY_NAME: WIN32_ERROR = 8382u32; +pub const ERROR_DS_DUP_LINK_ID: WIN32_ERROR = 8468u32; +pub const ERROR_DS_DUP_MAPI_ID: WIN32_ERROR = 8380u32; +pub const ERROR_DS_DUP_MSDS_INTID: WIN32_ERROR = 8597u32; +pub const ERROR_DS_DUP_OID: WIN32_ERROR = 8379u32; +pub const ERROR_DS_DUP_RDN: WIN32_ERROR = 8378u32; +pub const ERROR_DS_DUP_SCHEMA_ID_GUID: WIN32_ERROR = 8381u32; +pub const ERROR_DS_ENCODING_ERROR: WIN32_ERROR = 8252u32; +pub const ERROR_DS_EPOCH_MISMATCH: WIN32_ERROR = 8483u32; +pub const ERROR_DS_EXISTING_AD_CHILD_NC: WIN32_ERROR = 8613u32; +pub const ERROR_DS_EXISTS_IN_AUX_CLS: WIN32_ERROR = 8393u32; +pub const ERROR_DS_EXISTS_IN_MAY_HAVE: WIN32_ERROR = 8386u32; +pub const ERROR_DS_EXISTS_IN_MUST_HAVE: WIN32_ERROR = 8385u32; +pub const ERROR_DS_EXISTS_IN_POSS_SUP: WIN32_ERROR = 8395u32; +pub const ERROR_DS_EXISTS_IN_RDNATTID: WIN32_ERROR = 8598u32; +pub const ERROR_DS_EXISTS_IN_SUB_CLS: WIN32_ERROR = 8394u32; +pub const ERROR_DS_FILTER_UNKNOWN: WIN32_ERROR = 8254u32; +pub const ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS: WIN32_ERROR = 8555u32; +pub const ERROR_DS_FLAT_NAME_EXISTS_IN_FOREST: WIN32_ERROR = 8635u32; +pub const ERROR_DS_FOREST_VERSION_TOO_HIGH: WIN32_ERROR = 8563u32; +pub const ERROR_DS_FOREST_VERSION_TOO_LOW: WIN32_ERROR = 8565u32; +pub const ERROR_DS_GCVERIFY_ERROR: WIN32_ERROR = 8417u32; +pub const ERROR_DS_GC_NOT_AVAILABLE: WIN32_ERROR = 8217u32; +pub const ERROR_DS_GC_REQUIRED: WIN32_ERROR = 8547u32; +pub const ERROR_DS_GENERIC_ERROR: WIN32_ERROR = 8341u32; +pub const ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER: WIN32_ERROR = 8519u32; +pub const ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER: WIN32_ERROR = 8516u32; +pub const ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER: WIN32_ERROR = 8517u32; +pub const ERROR_DS_GOVERNSID_MISSING: WIN32_ERROR = 8410u32; +pub const ERROR_DS_GROUP_CONVERSION_ERROR: WIN32_ERROR = 8607u32; +pub const ERROR_DS_HAVE_PRIMARY_MEMBERS: WIN32_ERROR = 8521u32; +pub const ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED: WIN32_ERROR = 8429u32; +pub const ERROR_DS_HIERARCHY_TABLE_TOO_DEEP: WIN32_ERROR = 8628u32; +pub const ERROR_DS_HIGH_ADLDS_FFL: WIN32_ERROR = 8641u32; +pub const ERROR_DS_HIGH_DSA_VERSION: WIN32_ERROR = 8642u32; +pub const ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD: WIN32_ERROR = 8507u32; +pub const ERROR_DS_ILLEGAL_MOD_OPERATION: WIN32_ERROR = 8311u32; +pub const ERROR_DS_ILLEGAL_SUPERIOR: WIN32_ERROR = 8345u32; +pub const ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION: WIN32_ERROR = 8492u32; +pub const ERROR_DS_INAPPROPRIATE_AUTH: WIN32_ERROR = 8233u32; +pub const ERROR_DS_INAPPROPRIATE_MATCHING: WIN32_ERROR = 8238u32; +pub const ERROR_DS_INCOMPATIBLE_CONTROLS_USED: WIN32_ERROR = 8574u32; +pub const ERROR_DS_INCOMPATIBLE_VERSION: WIN32_ERROR = 8567u32; +pub const ERROR_DS_INCORRECT_ROLE_OWNER: WIN32_ERROR = 8210u32; +pub const ERROR_DS_INIT_FAILURE: WIN32_ERROR = 8532u32; +pub const ERROR_DS_INIT_FAILURE_CONSOLE: WIN32_ERROR = 8561u32; +pub const ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE: WIN32_ERROR = 8512u32; +pub const ERROR_DS_INSTALL_NO_SRC_SCH_VERSION: WIN32_ERROR = 8511u32; +pub const ERROR_DS_INSTALL_SCHEMA_MISMATCH: WIN32_ERROR = 8467u32; +pub const ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT: WIN32_ERROR = 8606u32; +pub const ERROR_DS_INSUFF_ACCESS_RIGHTS: WIN32_ERROR = 8344u32; +pub const ERROR_DS_INTERNAL_FAILURE: WIN32_ERROR = 8430u32; +pub const ERROR_DS_INVALID_ATTRIBUTE_SYNTAX: WIN32_ERROR = 8203u32; +pub const ERROR_DS_INVALID_DMD: WIN32_ERROR = 8360u32; +pub const ERROR_DS_INVALID_DN_SYNTAX: WIN32_ERROR = 8242u32; +pub const ERROR_DS_INVALID_GROUP_TYPE: WIN32_ERROR = 8513u32; +pub const ERROR_DS_INVALID_LDAP_DISPLAY_NAME: WIN32_ERROR = 8479u32; +pub const ERROR_DS_INVALID_NAME_FOR_SPN: WIN32_ERROR = 8554u32; +pub const ERROR_DS_INVALID_ROLE_OWNER: WIN32_ERROR = 8366u32; +pub const ERROR_DS_INVALID_SCRIPT: WIN32_ERROR = 8600u32; +pub const ERROR_DS_INVALID_SEARCH_FLAG: WIN32_ERROR = 8500u32; +pub const ERROR_DS_INVALID_SEARCH_FLAG_SUBTREE: WIN32_ERROR = 8626u32; +pub const ERROR_DS_INVALID_SEARCH_FLAG_TUPLE: WIN32_ERROR = 8627u32; +pub const ERROR_DS_IS_LEAF: WIN32_ERROR = 8243u32; +pub const ERROR_DS_KEY_NOT_UNIQUE: WIN32_ERROR = 8527u32; +pub const ERROR_DS_LDAP_SEND_QUEUE_FULL: WIN32_ERROR = 8616u32; +pub const ERROR_DS_LINK_ID_NOT_AVAILABLE: WIN32_ERROR = 8577u32; +pub const ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER: WIN32_ERROR = 8520u32; +pub const ERROR_DS_LOCAL_ERROR: WIN32_ERROR = 8251u32; +pub const ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY: WIN32_ERROR = 8548u32; +pub const ERROR_DS_LOOP_DETECT: WIN32_ERROR = 8246u32; +pub const ERROR_DS_LOW_ADLDS_FFL: WIN32_ERROR = 8643u32; +pub const ERROR_DS_LOW_DSA_VERSION: WIN32_ERROR = 8568u32; +pub const ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4: WIN32_ERROR = 8572u32; +pub const ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED: WIN32_ERROR = 8557u32; +pub const ERROR_DS_MAPI_ID_NOT_AVAILABLE: WIN32_ERROR = 8632u32; +pub const ERROR_DS_MASTERDSA_REQUIRED: WIN32_ERROR = 8314u32; +pub const ERROR_DS_MAX_OBJ_SIZE_EXCEEDED: WIN32_ERROR = 8304u32; +pub const ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY: WIN32_ERROR = 8201u32; +pub const ERROR_DS_MISSING_EXPECTED_ATT: WIN32_ERROR = 8411u32; +pub const ERROR_DS_MISSING_FOREST_TRUST: WIN32_ERROR = 8649u32; +pub const ERROR_DS_MISSING_FSMO_SETTINGS: WIN32_ERROR = 8434u32; +pub const ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER: WIN32_ERROR = 8497u32; +pub const ERROR_DS_MISSING_REQUIRED_ATT: WIN32_ERROR = 8316u32; +pub const ERROR_DS_MISSING_SUPREF: WIN32_ERROR = 8406u32; +pub const ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG: WIN32_ERROR = 8581u32; +pub const ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE: WIN32_ERROR = 8579u32; +pub const ERROR_DS_MODIFYDN_WRONG_GRANDPARENT: WIN32_ERROR = 8582u32; +pub const ERROR_DS_MUST_BE_RUN_ON_DST_DC: WIN32_ERROR = 8558u32; +pub const ERROR_DS_NAME_ERROR_DOMAIN_ONLY: WIN32_ERROR = 8473u32; +pub const ERROR_DS_NAME_ERROR_NOT_FOUND: WIN32_ERROR = 8470u32; +pub const ERROR_DS_NAME_ERROR_NOT_UNIQUE: WIN32_ERROR = 8471u32; +pub const ERROR_DS_NAME_ERROR_NO_MAPPING: WIN32_ERROR = 8472u32; +pub const ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING: WIN32_ERROR = 8474u32; +pub const ERROR_DS_NAME_ERROR_RESOLVING: WIN32_ERROR = 8469u32; +pub const ERROR_DS_NAME_ERROR_TRUST_REFERRAL: WIN32_ERROR = 8583u32; +pub const ERROR_DS_NAME_NOT_UNIQUE: WIN32_ERROR = 8571u32; +pub const ERROR_DS_NAME_REFERENCE_INVALID: WIN32_ERROR = 8373u32; +pub const ERROR_DS_NAME_TOO_LONG: WIN32_ERROR = 8348u32; +pub const ERROR_DS_NAME_TOO_MANY_PARTS: WIN32_ERROR = 8347u32; +pub const ERROR_DS_NAME_TYPE_UNKNOWN: WIN32_ERROR = 8351u32; +pub const ERROR_DS_NAME_UNPARSEABLE: WIN32_ERROR = 8350u32; +pub const ERROR_DS_NAME_VALUE_TOO_LONG: WIN32_ERROR = 8349u32; +pub const ERROR_DS_NAMING_MASTER_GC: WIN32_ERROR = 8523u32; +pub const ERROR_DS_NAMING_VIOLATION: WIN32_ERROR = 8247u32; +pub const ERROR_DS_NCNAME_MISSING_CR_REF: WIN32_ERROR = 8412u32; +pub const ERROR_DS_NCNAME_MUST_BE_NC: WIN32_ERROR = 8357u32; +pub const ERROR_DS_NC_MUST_HAVE_NC_PARENT: WIN32_ERROR = 8494u32; +pub const ERROR_DS_NC_STILL_HAS_DSAS: WIN32_ERROR = 8546u32; +pub const ERROR_DS_NONEXISTENT_MAY_HAVE: WIN32_ERROR = 8387u32; +pub const ERROR_DS_NONEXISTENT_MUST_HAVE: WIN32_ERROR = 8388u32; +pub const ERROR_DS_NONEXISTENT_POSS_SUP: WIN32_ERROR = 8390u32; +pub const ERROR_DS_NONSAFE_SCHEMA_CHANGE: WIN32_ERROR = 8508u32; +pub const ERROR_DS_NON_ASQ_SEARCH: WIN32_ERROR = 8624u32; +pub const ERROR_DS_NON_BASE_SEARCH: WIN32_ERROR = 8480u32; +pub const ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX: WIN32_ERROR = 8377u32; +pub const ERROR_DS_NOT_AN_OBJECT: WIN32_ERROR = 8352u32; +pub const ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC: WIN32_ERROR = 8487u32; +pub const ERROR_DS_NOT_CLOSEST: WIN32_ERROR = 8588u32; +pub const ERROR_DS_NOT_INSTALLED: WIN32_ERROR = 8200u32; +pub const ERROR_DS_NOT_ON_BACKLINK: WIN32_ERROR = 8362u32; +pub const ERROR_DS_NOT_SUPPORTED: WIN32_ERROR = 8256u32; +pub const ERROR_DS_NOT_SUPPORTED_SORT_ORDER: WIN32_ERROR = 8570u32; +pub const ERROR_DS_NO_ATTRIBUTE_OR_VALUE: WIN32_ERROR = 8202u32; +pub const ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN: WIN32_ERROR = 8569u32; +pub const ERROR_DS_NO_CHAINED_EVAL: WIN32_ERROR = 8328u32; +pub const ERROR_DS_NO_CHAINING: WIN32_ERROR = 8327u32; +pub const ERROR_DS_NO_CHECKPOINT_WITH_PDC: WIN32_ERROR = 8551u32; +pub const ERROR_DS_NO_CROSSREF_FOR_NC: WIN32_ERROR = 8363u32; +pub const ERROR_DS_NO_DELETED_NAME: WIN32_ERROR = 8355u32; +pub const ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS: WIN32_ERROR = 8549u32; +pub const ERROR_DS_NO_MORE_RIDS: WIN32_ERROR = 8209u32; +pub const ERROR_DS_NO_MSDS_INTID: WIN32_ERROR = 8596u32; +pub const ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN: WIN32_ERROR = 8514u32; +pub const ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN: WIN32_ERROR = 8515u32; +pub const ERROR_DS_NO_NTDSA_OBJECT: WIN32_ERROR = 8623u32; +pub const ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC: WIN32_ERROR = 8580u32; +pub const ERROR_DS_NO_PARENT_OBJECT: WIN32_ERROR = 8329u32; +pub const ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION: WIN32_ERROR = 8533u32; +pub const ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA: WIN32_ERROR = 8306u32; +pub const ERROR_DS_NO_REF_DOMAIN: WIN32_ERROR = 8575u32; +pub const ERROR_DS_NO_REQUESTED_ATTS_FOUND: WIN32_ERROR = 8308u32; +pub const ERROR_DS_NO_RESULTS_RETURNED: WIN32_ERROR = 8257u32; +pub const ERROR_DS_NO_RIDS_ALLOCATED: WIN32_ERROR = 8208u32; +pub const ERROR_DS_NO_SERVER_OBJECT: WIN32_ERROR = 8622u32; +pub const ERROR_DS_NO_SUCH_OBJECT: WIN32_ERROR = 8240u32; +pub const ERROR_DS_NO_TREE_DELETE_ABOVE_NC: WIN32_ERROR = 8501u32; +pub const ERROR_DS_NTDSCRIPT_PROCESS_ERROR: WIN32_ERROR = 8592u32; +pub const ERROR_DS_NTDSCRIPT_SYNTAX_ERROR: WIN32_ERROR = 8591u32; +pub const ERROR_DS_OBJECT_BEING_REMOVED: WIN32_ERROR = 8339u32; +pub const ERROR_DS_OBJECT_CLASS_REQUIRED: WIN32_ERROR = 8315u32; +pub const ERROR_DS_OBJECT_RESULTS_TOO_LARGE: WIN32_ERROR = 8248u32; +pub const ERROR_DS_OBJ_CLASS_NOT_DEFINED: WIN32_ERROR = 8371u32; +pub const ERROR_DS_OBJ_CLASS_NOT_SUBCLASS: WIN32_ERROR = 8372u32; +pub const ERROR_DS_OBJ_CLASS_VIOLATION: WIN32_ERROR = 8212u32; +pub const ERROR_DS_OBJ_GUID_EXISTS: WIN32_ERROR = 8361u32; +pub const ERROR_DS_OBJ_NOT_FOUND: WIN32_ERROR = 8333u32; +pub const ERROR_DS_OBJ_STRING_NAME_EXISTS: WIN32_ERROR = 8305u32; +pub const ERROR_DS_OBJ_TOO_LARGE: WIN32_ERROR = 8312u32; +pub const ERROR_DS_OFFSET_RANGE_ERROR: WIN32_ERROR = 8262u32; +pub const ERROR_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS: WIN32_ERROR = 8637u32; +pub const ERROR_DS_OID_NOT_FOUND: WIN32_ERROR = 8638u32; +pub const ERROR_DS_OPERATIONS_ERROR: WIN32_ERROR = 8224u32; +pub const ERROR_DS_OUT_OF_SCOPE: WIN32_ERROR = 8338u32; +pub const ERROR_DS_OUT_OF_VERSION_STORE: WIN32_ERROR = 8573u32; +pub const ERROR_DS_PARAM_ERROR: WIN32_ERROR = 8255u32; +pub const ERROR_DS_PARENT_IS_AN_ALIAS: WIN32_ERROR = 8330u32; +pub const ERROR_DS_PDC_OPERATION_IN_PROGRESS: WIN32_ERROR = 8490u32; +pub const ERROR_DS_PER_ATTRIBUTE_AUTHZ_FAILED_DURING_ADD: WIN32_ERROR = 8652u32; +pub const ERROR_DS_POLICY_NOT_KNOWN: WIN32_ERROR = 8618u32; +pub const ERROR_DS_PROTOCOL_ERROR: WIN32_ERROR = 8225u32; +pub const ERROR_DS_RANGE_CONSTRAINT: WIN32_ERROR = 8322u32; +pub const ERROR_DS_RDN_DOESNT_MATCH_SCHEMA: WIN32_ERROR = 8307u32; +pub const ERROR_DS_RECALCSCHEMA_FAILED: WIN32_ERROR = 8396u32; +pub const ERROR_DS_REFERRAL: WIN32_ERROR = 8235u32; +pub const ERROR_DS_REFERRAL_LIMIT_EXCEEDED: WIN32_ERROR = 8260u32; +pub const ERROR_DS_REFUSING_FSMO_ROLES: WIN32_ERROR = 8433u32; +pub const ERROR_DS_REMOTE_CROSSREF_OP_FAILED: WIN32_ERROR = 8601u32; +pub const ERROR_DS_REPLICATOR_ONLY: WIN32_ERROR = 8370u32; +pub const ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR: WIN32_ERROR = 8595u32; +pub const ERROR_DS_REPL_LIFETIME_EXCEEDED: WIN32_ERROR = 8614u32; +pub const ERROR_DS_RESERVED_LINK_ID: WIN32_ERROR = 8576u32; +pub const ERROR_DS_RESERVED_MAPI_ID: WIN32_ERROR = 8631u32; +pub const ERROR_DS_RIDMGR_DISABLED: WIN32_ERROR = 8263u32; +pub const ERROR_DS_RIDMGR_INIT_ERROR: WIN32_ERROR = 8211u32; +pub const ERROR_DS_ROLE_NOT_VERIFIED: WIN32_ERROR = 8610u32; +pub const ERROR_DS_ROOT_CANT_BE_SUBREF: WIN32_ERROR = 8326u32; +pub const ERROR_DS_ROOT_MUST_BE_NC: WIN32_ERROR = 8301u32; +pub const ERROR_DS_ROOT_REQUIRES_CLASS_TOP: WIN32_ERROR = 8432u32; +pub const ERROR_DS_SAM_INIT_FAILURE: WIN32_ERROR = 8504u32; +pub const ERROR_DS_SAM_INIT_FAILURE_CONSOLE: WIN32_ERROR = 8562u32; +pub const ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY: WIN32_ERROR = 8530u32; +pub const ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD: WIN32_ERROR = 8529u32; +pub const ERROR_DS_SCHEMA_ALLOC_FAILED: WIN32_ERROR = 8415u32; +pub const ERROR_DS_SCHEMA_NOT_LOADED: WIN32_ERROR = 8414u32; +pub const ERROR_DS_SCHEMA_UPDATE_DISALLOWED: WIN32_ERROR = 8509u32; +pub const ERROR_DS_SECURITY_CHECKING_ERROR: WIN32_ERROR = 8413u32; +pub const ERROR_DS_SECURITY_ILLEGAL_MODIFY: WIN32_ERROR = 8423u32; +pub const ERROR_DS_SEC_DESC_INVALID: WIN32_ERROR = 8354u32; +pub const ERROR_DS_SEC_DESC_TOO_SHORT: WIN32_ERROR = 8353u32; +pub const ERROR_DS_SEMANTIC_ATT_TEST: WIN32_ERROR = 8383u32; +pub const ERROR_DS_SENSITIVE_GROUP_VIOLATION: WIN32_ERROR = 8505u32; +pub const ERROR_DS_SERVER_DOWN: WIN32_ERROR = 8250u32; +pub const ERROR_DS_SHUTTING_DOWN: WIN32_ERROR = 8364u32; +pub const ERROR_DS_SINGLE_USER_MODE_FAILED: WIN32_ERROR = 8590u32; +pub const ERROR_DS_SINGLE_VALUE_CONSTRAINT: WIN32_ERROR = 8321u32; +pub const ERROR_DS_SIZELIMIT_EXCEEDED: WIN32_ERROR = 8227u32; +pub const ERROR_DS_SORT_CONTROL_MISSING: WIN32_ERROR = 8261u32; +pub const ERROR_DS_SOURCE_AUDITING_NOT_ENABLED: WIN32_ERROR = 8552u32; +pub const ERROR_DS_SOURCE_DOMAIN_IN_FOREST: WIN32_ERROR = 8534u32; +pub const ERROR_DS_SPN_VALUE_NOT_UNIQUE_IN_FOREST: WIN32_ERROR = 8647u32; +pub const ERROR_DS_SRC_AND_DST_NC_IDENTICAL: WIN32_ERROR = 8485u32; +pub const ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH: WIN32_ERROR = 8540u32; +pub const ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER: WIN32_ERROR = 8559u32; +pub const ERROR_DS_SRC_GUID_MISMATCH: WIN32_ERROR = 8488u32; +pub const ERROR_DS_SRC_NAME_MISMATCH: WIN32_ERROR = 8484u32; +pub const ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER: WIN32_ERROR = 8538u32; +pub const ERROR_DS_SRC_SID_EXISTS_IN_FOREST: WIN32_ERROR = 8539u32; +pub const ERROR_DS_STRING_SD_CONVERSION_FAILED: WIN32_ERROR = 8522u32; +pub const ERROR_DS_STRONG_AUTH_REQUIRED: WIN32_ERROR = 8232u32; +pub const ERROR_DS_SUBREF_MUST_HAVE_PARENT: WIN32_ERROR = 8356u32; +pub const ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD: WIN32_ERROR = 8376u32; +pub const ERROR_DS_SUB_CLS_TEST_FAIL: WIN32_ERROR = 8391u32; +pub const ERROR_DS_SYNTAX_MISMATCH: WIN32_ERROR = 8384u32; +pub const ERROR_DS_THREAD_LIMIT_EXCEEDED: WIN32_ERROR = 8587u32; +pub const ERROR_DS_TIMELIMIT_EXCEEDED: WIN32_ERROR = 8226u32; +pub const ERROR_DS_TREE_DELETE_NOT_FINISHED: WIN32_ERROR = 8397u32; +pub const ERROR_DS_UNABLE_TO_SURRENDER_ROLES: WIN32_ERROR = 8435u32; +pub const ERROR_DS_UNAVAILABLE: WIN32_ERROR = 8207u32; +pub const ERROR_DS_UNAVAILABLE_CRIT_EXTENSION: WIN32_ERROR = 8236u32; +pub const ERROR_DS_UNDELETE_SAM_VALIDATION_FAILED: WIN32_ERROR = 8645u32; +pub const ERROR_DS_UNICODEPWD_NOT_IN_QUOTES: WIN32_ERROR = 8556u32; +pub const ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER: WIN32_ERROR = 8518u32; +pub const ERROR_DS_UNKNOWN_ERROR: WIN32_ERROR = 8431u32; +pub const ERROR_DS_UNKNOWN_OPERATION: WIN32_ERROR = 8365u32; +pub const ERROR_DS_UNWILLING_TO_PERFORM: WIN32_ERROR = 8245u32; +pub const ERROR_DS_UPN_VALUE_NOT_UNIQUE_IN_FOREST: WIN32_ERROR = 8648u32; +pub const ERROR_DS_USER_BUFFER_TO_SMALL: WIN32_ERROR = 8309u32; +pub const ERROR_DS_VALUE_KEY_NOT_UNIQUE: WIN32_ERROR = 8650u32; +pub const ERROR_DS_VERSION_CHECK_FAILURE: WIN32_ERROR = 643u32; +pub const ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL: WIN32_ERROR = 8611u32; +pub const ERROR_DS_WRONG_LINKED_ATT_SYNTAX: WIN32_ERROR = 8528u32; +pub const ERROR_DS_WRONG_OM_OBJ_CLASS: WIN32_ERROR = 8476u32; +pub const ERROR_DUPLICATE_FOUND: WIN32_ERROR = 3758096898u32; +pub const ERROR_DUPLICATE_PRIVILEGES: WIN32_ERROR = 311u32; +pub const ERROR_DUPLICATE_SERVICE_NAME: WIN32_ERROR = 1078u32; +pub const ERROR_DUPLICATE_TAG: WIN32_ERROR = 2014u32; +pub const ERROR_DUP_DOMAINNAME: WIN32_ERROR = 1221u32; +pub const ERROR_DUP_NAME: WIN32_ERROR = 52u32; +pub const ERROR_DYNAMIC_CODE_BLOCKED: WIN32_ERROR = 1655u32; +pub const ERROR_DYNLINK_FROM_INVALID_RING: WIN32_ERROR = 196u32; +pub const ERROR_EAS_DIDNT_FIT: WIN32_ERROR = 275u32; +pub const ERROR_EAS_NOT_SUPPORTED: WIN32_ERROR = 282u32; +pub const ERROR_EA_ACCESS_DENIED: WIN32_ERROR = 994u32; +pub const ERROR_EA_FILE_CORRUPT: WIN32_ERROR = 276u32; +pub const ERROR_EA_LIST_INCONSISTENT: WIN32_ERROR = 255u32; +pub const ERROR_EA_TABLE_FULL: WIN32_ERROR = 277u32; +pub const ERROR_EC_CIRCULAR_FORWARDING: WIN32_ERROR = 15082u32; +pub const ERROR_EC_CREDSTORE_FULL: WIN32_ERROR = 15083u32; +pub const ERROR_EC_CRED_NOT_FOUND: WIN32_ERROR = 15084u32; +pub const ERROR_EC_LOG_DISABLED: WIN32_ERROR = 15081u32; +pub const ERROR_EC_NO_ACTIVE_CHANNEL: WIN32_ERROR = 15085u32; +pub const ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE: WIN32_ERROR = 15080u32; +pub const ERROR_EDP_DPL_POLICY_CANT_BE_SATISFIED: WIN32_ERROR = 357u32; +pub const ERROR_EDP_POLICY_DENIES_OPERATION: WIN32_ERROR = 356u32; +pub const ERROR_EFS_ALG_BLOB_TOO_BIG: WIN32_ERROR = 6013u32; +pub const ERROR_EFS_DISABLED: WIN32_ERROR = 6015u32; +pub const ERROR_EFS_NOT_ALLOWED_IN_TRANSACTION: WIN32_ERROR = 6831u32; +pub const ERROR_EFS_SERVER_NOT_TRUSTED: WIN32_ERROR = 6011u32; +pub const ERROR_EFS_VERSION_NOT_SUPPORT: WIN32_ERROR = 6016u32; +pub const ERROR_ELEVATION_REQUIRED: WIN32_ERROR = 740u32; +pub const ERROR_EMPTY: WIN32_ERROR = 4306u32; +pub const ERROR_ENCLAVE_FAILURE: WIN32_ERROR = 349u32; +pub const ERROR_ENCLAVE_NOT_TERMINATED: WIN32_ERROR = 814u32; +pub const ERROR_ENCLAVE_VIOLATION: WIN32_ERROR = 815u32; +pub const ERROR_ENCRYPTED_FILE_NOT_SUPPORTED: WIN32_ERROR = 489u32; +pub const ERROR_ENCRYPTED_IO_NOT_POSSIBLE: WIN32_ERROR = 808u32; +pub const ERROR_ENCRYPTING_METADATA_DISALLOWED: WIN32_ERROR = 431u32; +pub const ERROR_ENCRYPTION_DISABLED: WIN32_ERROR = 430u32; +pub const ERROR_ENCRYPTION_FAILED: WIN32_ERROR = 6000u32; +pub const ERROR_ENCRYPTION_POLICY_DENIES_OPERATION: WIN32_ERROR = 6022u32; +pub const ERROR_END_OF_MEDIA: WIN32_ERROR = 1100u32; +pub const ERROR_ENLISTMENT_NOT_FOUND: WIN32_ERROR = 6717u32; +pub const ERROR_ENLISTMENT_NOT_SUPERIOR: WIN32_ERROR = 6820u32; +pub const ERROR_ENVVAR_NOT_FOUND: WIN32_ERROR = 203u32; +pub const ERROR_EOM_OVERFLOW: WIN32_ERROR = 1129u32; +pub const ERROR_ERRORS_ENCOUNTERED: WIN32_ERROR = 774u32; +pub const ERROR_EVALUATION_EXPIRATION: WIN32_ERROR = 622u32; +pub const ERROR_EVENTLOG_CANT_START: WIN32_ERROR = 1501u32; +pub const ERROR_EVENTLOG_FILE_CHANGED: WIN32_ERROR = 1503u32; +pub const ERROR_EVENTLOG_FILE_CORRUPT: WIN32_ERROR = 1500u32; +pub const ERROR_EVENT_DONE: WIN32_ERROR = 710u32; +pub const ERROR_EVENT_PENDING: WIN32_ERROR = 711u32; +pub const ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY: WIN32_ERROR = 15036u32; +pub const ERROR_EVT_CHANNEL_CANNOT_ACTIVATE: WIN32_ERROR = 15025u32; +pub const ERROR_EVT_CHANNEL_NOT_FOUND: WIN32_ERROR = 15007u32; +pub const ERROR_EVT_CONFIGURATION_ERROR: WIN32_ERROR = 15010u32; +pub const ERROR_EVT_EVENT_DEFINITION_NOT_FOUND: WIN32_ERROR = 15032u32; +pub const ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND: WIN32_ERROR = 15003u32; +pub const ERROR_EVT_FILTER_ALREADYSCOPED: WIN32_ERROR = 15014u32; +pub const ERROR_EVT_FILTER_INVARG: WIN32_ERROR = 15016u32; +pub const ERROR_EVT_FILTER_INVTEST: WIN32_ERROR = 15017u32; +pub const ERROR_EVT_FILTER_INVTYPE: WIN32_ERROR = 15018u32; +pub const ERROR_EVT_FILTER_NOTELTSET: WIN32_ERROR = 15015u32; +pub const ERROR_EVT_FILTER_OUT_OF_RANGE: WIN32_ERROR = 15038u32; +pub const ERROR_EVT_FILTER_PARSEERR: WIN32_ERROR = 15019u32; +pub const ERROR_EVT_FILTER_TOO_COMPLEX: WIN32_ERROR = 15026u32; +pub const ERROR_EVT_FILTER_UNEXPECTEDTOKEN: WIN32_ERROR = 15021u32; +pub const ERROR_EVT_FILTER_UNSUPPORTEDOP: WIN32_ERROR = 15020u32; +pub const ERROR_EVT_INVALID_CHANNEL_PATH: WIN32_ERROR = 15000u32; +pub const ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE: WIN32_ERROR = 15023u32; +pub const ERROR_EVT_INVALID_EVENT_DATA: WIN32_ERROR = 15005u32; +pub const ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL: WIN32_ERROR = 15022u32; +pub const ERROR_EVT_INVALID_PUBLISHER_NAME: WIN32_ERROR = 15004u32; +pub const ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE: WIN32_ERROR = 15024u32; +pub const ERROR_EVT_INVALID_QUERY: WIN32_ERROR = 15001u32; +pub const ERROR_EVT_MALFORMED_XML_TEXT: WIN32_ERROR = 15008u32; +pub const ERROR_EVT_MAX_INSERTS_REACHED: WIN32_ERROR = 15031u32; +pub const ERROR_EVT_MESSAGE_ID_NOT_FOUND: WIN32_ERROR = 15028u32; +pub const ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND: WIN32_ERROR = 15033u32; +pub const ERROR_EVT_MESSAGE_NOT_FOUND: WIN32_ERROR = 15027u32; +pub const ERROR_EVT_NON_VALIDATING_MSXML: WIN32_ERROR = 15013u32; +pub const ERROR_EVT_PUBLISHER_DISABLED: WIN32_ERROR = 15037u32; +pub const ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND: WIN32_ERROR = 15002u32; +pub const ERROR_EVT_QUERY_RESULT_INVALID_POSITION: WIN32_ERROR = 15012u32; +pub const ERROR_EVT_QUERY_RESULT_STALE: WIN32_ERROR = 15011u32; +pub const ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL: WIN32_ERROR = 15009u32; +pub const ERROR_EVT_UNRESOLVED_PARAMETER_INSERT: WIN32_ERROR = 15030u32; +pub const ERROR_EVT_UNRESOLVED_VALUE_INSERT: WIN32_ERROR = 15029u32; +pub const ERROR_EVT_VERSION_TOO_NEW: WIN32_ERROR = 15035u32; +pub const ERROR_EVT_VERSION_TOO_OLD: WIN32_ERROR = 15034u32; +pub const ERROR_EXCEPTION_IN_RESOURCE_CALL: WIN32_ERROR = 5930u32; +pub const ERROR_EXCEPTION_IN_SERVICE: WIN32_ERROR = 1064u32; +pub const ERROR_EXCL_SEM_ALREADY_OWNED: WIN32_ERROR = 101u32; +pub const ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY: WIN32_ERROR = 217u32; +pub const ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY: WIN32_ERROR = 218u32; +pub const ERROR_EXE_MACHINE_TYPE_MISMATCH: WIN32_ERROR = 216u32; +pub const ERROR_EXE_MARKED_INVALID: WIN32_ERROR = 192u32; +pub const ERROR_EXPECTED_SECTION_NAME: WIN32_ERROR = 3758096384u32; +pub const ERROR_EXPIRED_HANDLE: WIN32_ERROR = 6854u32; +pub const ERROR_EXTENDED_ERROR: WIN32_ERROR = 1208u32; +pub const ERROR_EXTERNAL_BACKING_PROVIDER_UNKNOWN: WIN32_ERROR = 343u32; +pub const ERROR_EXTERNAL_SYSKEY_NOT_SUPPORTED: WIN32_ERROR = 399u32; +pub const ERROR_EXTRANEOUS_INFORMATION: WIN32_ERROR = 677u32; +pub const ERROR_FAILED_DRIVER_ENTRY: WIN32_ERROR = 647u32; +pub const ERROR_FAILED_SERVICE_CONTROLLER_CONNECT: WIN32_ERROR = 1063u32; +pub const ERROR_FAIL_FAST_EXCEPTION: WIN32_ERROR = 1653u32; +pub const ERROR_FAIL_I24: WIN32_ERROR = 83u32; +pub const ERROR_FAIL_NOACTION_REBOOT: WIN32_ERROR = 350u32; +pub const ERROR_FAIL_REBOOT_INITIATED: WIN32_ERROR = 3018u32; +pub const ERROR_FAIL_REBOOT_REQUIRED: WIN32_ERROR = 3017u32; +pub const ERROR_FAIL_RESTART: WIN32_ERROR = 352u32; +pub const ERROR_FAIL_SHUTDOWN: WIN32_ERROR = 351u32; +pub const ERROR_FATAL_APP_EXIT: WIN32_ERROR = 713u32; +pub const ERROR_FILEMARK_DETECTED: WIN32_ERROR = 1101u32; +pub const ERROR_FILENAME_EXCED_RANGE: WIN32_ERROR = 206u32; +pub const ERROR_FILEQUEUE_LOCKED: WIN32_ERROR = 3758096918u32; +pub const ERROR_FILE_CHECKED_OUT: WIN32_ERROR = 220u32; +pub const ERROR_FILE_CORRUPT: WIN32_ERROR = 1392u32; +pub const ERROR_FILE_ENCRYPTED: WIN32_ERROR = 6002u32; +pub const ERROR_FILE_EXISTS: WIN32_ERROR = 80u32; +pub const ERROR_FILE_HANDLE_REVOKED: WIN32_ERROR = 806u32; +pub const ERROR_FILE_HASH_NOT_IN_CATALOG: WIN32_ERROR = 3758096971u32; +pub const ERROR_FILE_IDENTITY_NOT_PERSISTENT: WIN32_ERROR = 6823u32; +pub const ERROR_FILE_INVALID: WIN32_ERROR = 1006u32; +pub const ERROR_FILE_LEVEL_TRIM_NOT_SUPPORTED: WIN32_ERROR = 326u32; +pub const ERROR_FILE_METADATA_OPTIMIZATION_IN_PROGRESS: WIN32_ERROR = 809u32; +pub const ERROR_FILE_NOT_ENCRYPTED: WIN32_ERROR = 6007u32; +pub const ERROR_FILE_NOT_FOUND: WIN32_ERROR = 2u32; +pub const ERROR_FILE_NOT_SUPPORTED: WIN32_ERROR = 425u32; +pub const ERROR_FILE_OFFLINE: WIN32_ERROR = 4350u32; +pub const ERROR_FILE_PROTECTED_UNDER_DPL: WIN32_ERROR = 406u32; +pub const ERROR_FILE_READ_ONLY: WIN32_ERROR = 6009u32; +pub const ERROR_FILE_SHARE_RESOURCE_CONFLICT: WIN32_ERROR = 5938u32; +pub const ERROR_FILE_SNAP_INVALID_PARAMETER: WIN32_ERROR = 440u32; +pub const ERROR_FILE_SNAP_IN_PROGRESS: WIN32_ERROR = 435u32; +pub const ERROR_FILE_SNAP_IO_NOT_COORDINATED: WIN32_ERROR = 438u32; +pub const ERROR_FILE_SNAP_MODIFY_NOT_SUPPORTED: WIN32_ERROR = 437u32; +pub const ERROR_FILE_SNAP_UNEXPECTED_ERROR: WIN32_ERROR = 439u32; +pub const ERROR_FILE_SNAP_USER_SECTION_NOT_SUPPORTED: WIN32_ERROR = 436u32; +pub const ERROR_FILE_SYSTEM_LIMITATION: WIN32_ERROR = 665u32; +pub const ERROR_FILE_SYSTEM_VIRTUALIZATION_BUSY: WIN32_ERROR = 371u32; +pub const ERROR_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION: WIN32_ERROR = 385u32; +pub const ERROR_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT: WIN32_ERROR = 370u32; +pub const ERROR_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN: WIN32_ERROR = 372u32; +pub const ERROR_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE: WIN32_ERROR = 369u32; +pub const ERROR_FILE_TOO_LARGE: WIN32_ERROR = 223u32; +pub const ERROR_FIRMWARE_UPDATED: WIN32_ERROR = 728u32; +pub const ERROR_FLOATED_SECTION: WIN32_ERROR = 6846u32; +pub const ERROR_FLOAT_MULTIPLE_FAULTS: WIN32_ERROR = 630u32; +pub const ERROR_FLOAT_MULTIPLE_TRAPS: WIN32_ERROR = 631u32; +pub const ERROR_FLOPPY_BAD_REGISTERS: WIN32_ERROR = 1125u32; +pub const ERROR_FLOPPY_ID_MARK_NOT_FOUND: WIN32_ERROR = 1122u32; +pub const ERROR_FLOPPY_UNKNOWN_ERROR: WIN32_ERROR = 1124u32; +pub const ERROR_FLOPPY_VOLUME: WIN32_ERROR = 584u32; +pub const ERROR_FLOPPY_WRONG_CYLINDER: WIN32_ERROR = 1123u32; +pub const ERROR_FLT_ALREADY_ENLISTED: windows_sys::core::HRESULT = 0x801F001B_u32 as _; +pub const ERROR_FLT_CBDQ_DISABLED: windows_sys::core::HRESULT = 0x801F000E_u32 as _; +pub const ERROR_FLT_CONTEXT_ALLOCATION_NOT_FOUND: windows_sys::core::HRESULT = 0x801F0016_u32 as _; +pub const ERROR_FLT_CONTEXT_ALREADY_DEFINED: windows_sys::core::HRESULT = 0x801F0002_u32 as _; +pub const ERROR_FLT_CONTEXT_ALREADY_LINKED: windows_sys::core::HRESULT = 0x801F001C_u32 as _; +pub const ERROR_FLT_DELETING_OBJECT: windows_sys::core::HRESULT = 0x801F000B_u32 as _; +pub const ERROR_FLT_DISALLOW_FAST_IO: windows_sys::core::HRESULT = 0x801F0004_u32 as _; +pub const ERROR_FLT_DO_NOT_ATTACH: windows_sys::core::HRESULT = 0x801F000F_u32 as _; +pub const ERROR_FLT_DO_NOT_DETACH: windows_sys::core::HRESULT = 0x801F0010_u32 as _; +pub const ERROR_FLT_DUPLICATE_ENTRY: windows_sys::core::HRESULT = 0x801F000D_u32 as _; +pub const ERROR_FLT_FILTER_NOT_FOUND: windows_sys::core::HRESULT = 0x801F0013_u32 as _; +pub const ERROR_FLT_FILTER_NOT_READY: windows_sys::core::HRESULT = 0x801F0008_u32 as _; +pub const ERROR_FLT_INSTANCE_ALTITUDE_COLLISION: windows_sys::core::HRESULT = 0x801F0011_u32 as _; +pub const ERROR_FLT_INSTANCE_NAME_COLLISION: windows_sys::core::HRESULT = 0x801F0012_u32 as _; +pub const ERROR_FLT_INSTANCE_NOT_FOUND: windows_sys::core::HRESULT = 0x801F0015_u32 as _; +pub const ERROR_FLT_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x801F000A_u32 as _; +pub const ERROR_FLT_INVALID_ASYNCHRONOUS_REQUEST: windows_sys::core::HRESULT = 0x801F0003_u32 as _; +pub const ERROR_FLT_INVALID_CONTEXT_REGISTRATION: windows_sys::core::HRESULT = 0x801F0017_u32 as _; +pub const ERROR_FLT_INVALID_NAME_REQUEST: windows_sys::core::HRESULT = 0x801F0005_u32 as _; +pub const ERROR_FLT_IO_COMPLETE: windows_sys::core::HRESULT = 0x1F0001_u32 as _; +pub const ERROR_FLT_MUST_BE_NONPAGED_POOL: windows_sys::core::HRESULT = 0x801F000C_u32 as _; +pub const ERROR_FLT_NAME_CACHE_MISS: windows_sys::core::HRESULT = 0x801F0018_u32 as _; +pub const ERROR_FLT_NOT_INITIALIZED: windows_sys::core::HRESULT = 0x801F0007_u32 as _; +pub const ERROR_FLT_NOT_SAFE_TO_POST_OPERATION: windows_sys::core::HRESULT = 0x801F0006_u32 as _; +pub const ERROR_FLT_NO_DEVICE_OBJECT: windows_sys::core::HRESULT = 0x801F0019_u32 as _; +pub const ERROR_FLT_NO_HANDLER_DEFINED: windows_sys::core::HRESULT = 0x801F0001_u32 as _; +pub const ERROR_FLT_NO_WAITER_FOR_REPLY: windows_sys::core::HRESULT = 0x801F0020_u32 as _; +pub const ERROR_FLT_POST_OPERATION_CLEANUP: windows_sys::core::HRESULT = 0x801F0009_u32 as _; +pub const ERROR_FLT_REGISTRATION_BUSY: windows_sys::core::HRESULT = 0x801F0023_u32 as _; +pub const ERROR_FLT_VOLUME_ALREADY_MOUNTED: windows_sys::core::HRESULT = 0x801F001A_u32 as _; +pub const ERROR_FLT_VOLUME_NOT_FOUND: windows_sys::core::HRESULT = 0x801F0014_u32 as _; +pub const ERROR_FLT_WCOS_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x801F0024_u32 as _; +pub const ERROR_FORMS_AUTH_REQUIRED: WIN32_ERROR = 224u32; +pub const ERROR_FOUND_OUT_OF_SCOPE: WIN32_ERROR = 601u32; +pub const ERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY: WIN32_ERROR = 762u32; +pub const ERROR_FS_DRIVER_REQUIRED: WIN32_ERROR = 588u32; +pub const ERROR_FS_GUID_MISMATCH: WIN32_ERROR = 477u32; +pub const ERROR_FS_METADATA_INCONSISTENT: WIN32_ERROR = 510u32; +pub const ERROR_FT_DI_SCAN_REQUIRED: WIN32_ERROR = 339u32; +pub const ERROR_FT_READ_FAILURE: WIN32_ERROR = 415u32; +pub const ERROR_FT_READ_FROM_COPY_FAILURE: WIN32_ERROR = 818u32; +pub const ERROR_FT_READ_RECOVERY_FROM_BACKUP: WIN32_ERROR = 704u32; +pub const ERROR_FT_WRITE_FAILURE: WIN32_ERROR = 338u32; +pub const ERROR_FT_WRITE_RECOVERY: WIN32_ERROR = 705u32; +pub const ERROR_FULLSCREEN_MODE: WIN32_ERROR = 1007u32; +pub const ERROR_FULL_BACKUP: WIN32_ERROR = 4004u32; +pub const ERROR_FUNCTION_FAILED: WIN32_ERROR = 1627u32; +pub const ERROR_FUNCTION_NOT_CALLED: WIN32_ERROR = 1626u32; +pub const ERROR_GDI_HANDLE_LEAK: WIN32_ERROR = 373u32; +pub const ERROR_GENERAL_SYNTAX: WIN32_ERROR = 3758096387u32; +pub const ERROR_GENERIC_COMMAND_FAILED: WIN32_ERROR = 14109u32; +pub const ERROR_GENERIC_NOT_MAPPED: WIN32_ERROR = 1360u32; +pub const ERROR_GEN_FAILURE: WIN32_ERROR = 31u32; +pub const ERROR_GLOBAL_ONLY_HOOK: WIN32_ERROR = 1429u32; +pub const ERROR_GPIO_CLIENT_INFORMATION_INVALID: WIN32_ERROR = 15322u32; +pub const ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE: WIN32_ERROR = 15326u32; +pub const ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED: WIN32_ERROR = 15327u32; +pub const ERROR_GPIO_INVALID_REGISTRATION_PACKET: WIN32_ERROR = 15324u32; +pub const ERROR_GPIO_OPERATION_DENIED: WIN32_ERROR = 15325u32; +pub const ERROR_GPIO_VERSION_NOT_SUPPORTED: WIN32_ERROR = 15323u32; +pub const ERROR_GRACEFUL_DISCONNECT: WIN32_ERROR = 1226u32; +pub const ERROR_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED: windows_sys::core::HRESULT = 0xC026243B_u32 as _; +pub const ERROR_GRAPHICS_ADAPTER_CHAIN_NOT_READY: windows_sys::core::HRESULT = 0xC0262433_u32 as _; +pub const ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE: windows_sys::core::HRESULT = 0xC0262328_u32 as _; +pub const ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET: windows_sys::core::HRESULT = 0xC0262329_u32 as _; +pub const ERROR_GRAPHICS_ADAPTER_WAS_RESET: windows_sys::core::HRESULT = 0xC0262003_u32 as _; +pub const ERROR_GRAPHICS_ALLOCATION_BUSY: windows_sys::core::HRESULT = 0xC0262102_u32 as _; +pub const ERROR_GRAPHICS_ALLOCATION_CLOSED: windows_sys::core::HRESULT = 0xC0262112_u32 as _; +pub const ERROR_GRAPHICS_ALLOCATION_CONTENT_LOST: windows_sys::core::HRESULT = 0xC0262116_u32 as _; +pub const ERROR_GRAPHICS_ALLOCATION_INVALID: windows_sys::core::HRESULT = 0xC0262106_u32 as _; +pub const ERROR_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION: windows_sys::core::HRESULT = 0xC026235A_u32 as _; +pub const ERROR_GRAPHICS_CANNOTCOLORCONVERT: windows_sys::core::HRESULT = 0xC0262008_u32 as _; +pub const ERROR_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN: windows_sys::core::HRESULT = 0xC0262343_u32 as _; +pub const ERROR_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION: windows_sys::core::HRESULT = 0xC0262109_u32 as _; +pub const ERROR_GRAPHICS_CANT_LOCK_MEMORY: windows_sys::core::HRESULT = 0xC0262101_u32 as _; +pub const ERROR_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION: windows_sys::core::HRESULT = 0xC0262111_u32 as _; +pub const ERROR_GRAPHICS_CHAINLINKS_NOT_ENUMERATED: windows_sys::core::HRESULT = 0xC0262432_u32 as _; +pub const ERROR_GRAPHICS_CHAINLINKS_NOT_POWERED_ON: windows_sys::core::HRESULT = 0xC0262435_u32 as _; +pub const ERROR_GRAPHICS_CHAINLINKS_NOT_STARTED: windows_sys::core::HRESULT = 0xC0262434_u32 as _; +pub const ERROR_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262401_u32 as _; +pub const ERROR_GRAPHICS_CLIENTVIDPN_NOT_SET: windows_sys::core::HRESULT = 0xC026235C_u32 as _; +pub const ERROR_GRAPHICS_COPP_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262501_u32 as _; +pub const ERROR_GRAPHICS_DATASET_IS_EMPTY: windows_sys::core::HRESULT = 0x26234B_u32 as _; +pub const ERROR_GRAPHICS_DDCCI_CURRENT_CURRENT_VALUE_GREATER_THAN_MAXIMUM_VALUE: windows_sys::core::HRESULT = 0xC02625D8_u32 as _; +pub const ERROR_GRAPHICS_DDCCI_INVALID_DATA: windows_sys::core::HRESULT = 0xC0262585_u32 as _; +pub const ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM: windows_sys::core::HRESULT = 0xC026258B_u32 as _; +pub const ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND: windows_sys::core::HRESULT = 0xC0262589_u32 as _; +pub const ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH: windows_sys::core::HRESULT = 0xC026258A_u32 as _; +pub const ERROR_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE: windows_sys::core::HRESULT = 0xC0262586_u32 as _; +pub const ERROR_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262584_u32 as _; +pub const ERROR_GRAPHICS_DEPENDABLE_CHILD_STATUS: windows_sys::core::HRESULT = 0x4026243C_u32 as _; +pub const ERROR_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP: windows_sys::core::HRESULT = 0xC02625E2_u32 as _; +pub const ERROR_GRAPHICS_DRIVER_MISMATCH: windows_sys::core::HRESULT = 0xC0262009_u32 as _; +pub const ERROR_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION: windows_sys::core::HRESULT = 0xC0262325_u32 as _; +pub const ERROR_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET: windows_sys::core::HRESULT = 0xC026231F_u32 as _; +pub const ERROR_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET: windows_sys::core::HRESULT = 0xC026231D_u32 as _; +pub const ERROR_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262348_u32 as _; +pub const ERROR_GRAPHICS_GPU_EXCEPTION_ON_DEVICE: windows_sys::core::HRESULT = 0xC0262200_u32 as _; +pub const ERROR_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST: windows_sys::core::HRESULT = 0xC0262581_u32 as _; +pub const ERROR_GRAPHICS_I2C_ERROR_RECEIVING_DATA: windows_sys::core::HRESULT = 0xC0262583_u32 as _; +pub const ERROR_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA: windows_sys::core::HRESULT = 0xC0262582_u32 as _; +pub const ERROR_GRAPHICS_I2C_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262580_u32 as _; +pub const ERROR_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT: windows_sys::core::HRESULT = 0xC0262355_u32 as _; +pub const ERROR_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE: windows_sys::core::HRESULT = 0xC0262436_u32 as _; +pub const ERROR_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN: windows_sys::core::HRESULT = 0xC0262012_u32 as _; +pub const ERROR_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED: windows_sys::core::HRESULT = 0xC0262013_u32 as _; +pub const ERROR_GRAPHICS_INSUFFICIENT_DMA_BUFFER: windows_sys::core::HRESULT = 0xC0262001_u32 as _; +pub const ERROR_GRAPHICS_INTERNAL_ERROR: windows_sys::core::HRESULT = 0xC02625E7_u32 as _; +pub const ERROR_GRAPHICS_INVALID_ACTIVE_REGION: windows_sys::core::HRESULT = 0xC026230B_u32 as _; +pub const ERROR_GRAPHICS_INVALID_ALLOCATION_HANDLE: windows_sys::core::HRESULT = 0xC0262114_u32 as _; +pub const ERROR_GRAPHICS_INVALID_ALLOCATION_INSTANCE: windows_sys::core::HRESULT = 0xC0262113_u32 as _; +pub const ERROR_GRAPHICS_INVALID_ALLOCATION_USAGE: windows_sys::core::HRESULT = 0xC0262110_u32 as _; +pub const ERROR_GRAPHICS_INVALID_CLIENT_TYPE: windows_sys::core::HRESULT = 0xC026235B_u32 as _; +pub const ERROR_GRAPHICS_INVALID_COLORBASIS: windows_sys::core::HRESULT = 0xC026233E_u32 as _; +pub const ERROR_GRAPHICS_INVALID_COPYPROTECTION_TYPE: windows_sys::core::HRESULT = 0xC026234F_u32 as _; +pub const ERROR_GRAPHICS_INVALID_DISPLAY_ADAPTER: windows_sys::core::HRESULT = 0xC0262002_u32 as _; +pub const ERROR_GRAPHICS_INVALID_DRIVER_MODEL: windows_sys::core::HRESULT = 0xC0262004_u32 as _; +pub const ERROR_GRAPHICS_INVALID_FREQUENCY: windows_sys::core::HRESULT = 0xC026230A_u32 as _; +pub const ERROR_GRAPHICS_INVALID_GAMMA_RAMP: windows_sys::core::HRESULT = 0xC0262347_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM: windows_sys::core::HRESULT = 0xC0262356_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITORDESCRIPTOR: windows_sys::core::HRESULT = 0xC026232B_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITORDESCRIPTORSET: windows_sys::core::HRESULT = 0xC026232A_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN: windows_sys::core::HRESULT = 0xC0262357_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE: windows_sys::core::HRESULT = 0xC026231C_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET: windows_sys::core::HRESULT = 0xC026231B_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT: windows_sys::core::HRESULT = 0xC0262358_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITOR_SOURCEMODESET: windows_sys::core::HRESULT = 0xC0262321_u32 as _; +pub const ERROR_GRAPHICS_INVALID_MONITOR_SOURCE_MODE: windows_sys::core::HRESULT = 0xC0262322_u32 as _; +pub const ERROR_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION: windows_sys::core::HRESULT = 0xC0262345_u32 as _; +pub const ERROR_GRAPHICS_INVALID_PATH_CONTENT_TYPE: windows_sys::core::HRESULT = 0xC026234E_u32 as _; +pub const ERROR_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL: windows_sys::core::HRESULT = 0xC0262344_u32 as _; +pub const ERROR_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE: windows_sys::core::HRESULT = 0xC026258C_u32 as _; +pub const ERROR_GRAPHICS_INVALID_PIXELFORMAT: windows_sys::core::HRESULT = 0xC026233D_u32 as _; +pub const ERROR_GRAPHICS_INVALID_PIXELVALUEACCESSMODE: windows_sys::core::HRESULT = 0xC026233F_u32 as _; +pub const ERROR_GRAPHICS_INVALID_POINTER: windows_sys::core::HRESULT = 0xC02625E4_u32 as _; +pub const ERROR_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE: windows_sys::core::HRESULT = 0xC026233A_u32 as _; +pub const ERROR_GRAPHICS_INVALID_SCANLINE_ORDERING: windows_sys::core::HRESULT = 0xC0262352_u32 as _; +pub const ERROR_GRAPHICS_INVALID_STRIDE: windows_sys::core::HRESULT = 0xC026233C_u32 as _; +pub const ERROR_GRAPHICS_INVALID_TOTAL_REGION: windows_sys::core::HRESULT = 0xC026230C_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET: windows_sys::core::HRESULT = 0xC0262315_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET: windows_sys::core::HRESULT = 0xC0262316_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE: windows_sys::core::HRESULT = 0xC0262304_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE: windows_sys::core::HRESULT = 0xC0262310_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET: windows_sys::core::HRESULT = 0xC0262305_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE: windows_sys::core::HRESULT = 0xC0262311_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDPN: windows_sys::core::HRESULT = 0xC0262303_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDPN_PRESENT_PATH: windows_sys::core::HRESULT = 0xC0262319_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDPN_SOURCEMODESET: windows_sys::core::HRESULT = 0xC0262308_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDPN_TARGETMODESET: windows_sys::core::HRESULT = 0xC0262309_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE: windows_sys::core::HRESULT = 0xC026232F_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY: windows_sys::core::HRESULT = 0xC0262300_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON: windows_sys::core::HRESULT = 0xC026234D_u32 as _; +pub const ERROR_GRAPHICS_INVALID_VISIBLEREGION_SIZE: windows_sys::core::HRESULT = 0xC026233B_u32 as _; +pub const ERROR_GRAPHICS_LEADLINK_NOT_ENUMERATED: windows_sys::core::HRESULT = 0xC0262431_u32 as _; +pub const ERROR_GRAPHICS_LEADLINK_START_DEFERRED: windows_sys::core::HRESULT = 0x40262437_u32 as _; +pub const ERROR_GRAPHICS_LINK_CONFIGURATION_IN_PROGRESS: windows_sys::core::HRESULT = 0xC0262017_u32 as _; +pub const ERROR_GRAPHICS_MAX_NUM_PATHS_REACHED: windows_sys::core::HRESULT = 0xC0262359_u32 as _; +pub const ERROR_GRAPHICS_MCA_INTERNAL_ERROR: windows_sys::core::HRESULT = 0xC0262588_u32 as _; +pub const ERROR_GRAPHICS_MCA_INVALID_CAPABILITIES_STRING: windows_sys::core::HRESULT = 0xC0262587_u32 as _; +pub const ERROR_GRAPHICS_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED: windows_sys::core::HRESULT = 0xC02625DE_u32 as _; +pub const ERROR_GRAPHICS_MCA_INVALID_VCP_VERSION: windows_sys::core::HRESULT = 0xC02625D9_u32 as _; +pub const ERROR_GRAPHICS_MCA_MCCS_VERSION_MISMATCH: windows_sys::core::HRESULT = 0xC02625DB_u32 as _; +pub const ERROR_GRAPHICS_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION: windows_sys::core::HRESULT = 0xC02625DA_u32 as _; +pub const ERROR_GRAPHICS_MCA_UNSUPPORTED_COLOR_TEMPERATURE: windows_sys::core::HRESULT = 0xC02625DF_u32 as _; +pub const ERROR_GRAPHICS_MCA_UNSUPPORTED_MCCS_VERSION: windows_sys::core::HRESULT = 0xC02625DC_u32 as _; +pub const ERROR_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC02625E3_u32 as _; +pub const ERROR_GRAPHICS_MODE_ALREADY_IN_MODESET: windows_sys::core::HRESULT = 0xC0262314_u32 as _; +pub const ERROR_GRAPHICS_MODE_ID_MUST_BE_UNIQUE: windows_sys::core::HRESULT = 0xC0262324_u32 as _; +pub const ERROR_GRAPHICS_MODE_NOT_IN_MODESET: windows_sys::core::HRESULT = 0xC026234A_u32 as _; +pub const ERROR_GRAPHICS_MODE_NOT_PINNED: windows_sys::core::HRESULT = 0x262307_u32 as _; +pub const ERROR_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET: windows_sys::core::HRESULT = 0xC026232D_u32 as _; +pub const ERROR_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE: windows_sys::core::HRESULT = 0xC026232E_u32 as _; +pub const ERROR_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET: windows_sys::core::HRESULT = 0xC026232C_u32 as _; +pub const ERROR_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER: windows_sys::core::HRESULT = 0xC0262334_u32 as _; +pub const ERROR_GRAPHICS_MONITOR_NOT_CONNECTED: windows_sys::core::HRESULT = 0xC0262338_u32 as _; +pub const ERROR_GRAPHICS_MONITOR_NO_LONGER_EXISTS: windows_sys::core::HRESULT = 0xC026258D_u32 as _; +pub const ERROR_GRAPHICS_MPO_ALLOCATION_UNPINNED: windows_sys::core::HRESULT = 0xC0262018_u32 as _; +pub const ERROR_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262349_u32 as _; +pub const ERROR_GRAPHICS_NOT_A_LINKED_ADAPTER: windows_sys::core::HRESULT = 0xC0262430_u32 as _; +pub const ERROR_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER: windows_sys::core::HRESULT = 0xC0262000_u32 as _; +pub const ERROR_GRAPHICS_NOT_POST_DEVICE_DRIVER: windows_sys::core::HRESULT = 0xC0262438_u32 as _; +pub const ERROR_GRAPHICS_NO_ACTIVE_VIDPN: windows_sys::core::HRESULT = 0xC0262336_u32 as _; +pub const ERROR_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS: windows_sys::core::HRESULT = 0xC0262354_u32 as _; +pub const ERROR_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET: windows_sys::core::HRESULT = 0xC0262333_u32 as _; +pub const ERROR_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME: windows_sys::core::HRESULT = 0xC02625E1_u32 as _; +pub const ERROR_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT: windows_sys::core::HRESULT = 0xC0262341_u32 as _; +pub const ERROR_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE: windows_sys::core::HRESULT = 0xC02625E5_u32 as _; +pub const ERROR_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET: windows_sys::core::HRESULT = 0x26234C_u32 as _; +pub const ERROR_GRAPHICS_NO_PREFERRED_MODE: windows_sys::core::HRESULT = 0x26231E_u32 as _; +pub const ERROR_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN: windows_sys::core::HRESULT = 0xC0262323_u32 as _; +pub const ERROR_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY: windows_sys::core::HRESULT = 0xC026231A_u32 as _; +pub const ERROR_GRAPHICS_NO_VIDEO_MEMORY: windows_sys::core::HRESULT = 0xC0262100_u32 as _; +pub const ERROR_GRAPHICS_NO_VIDPNMGR: windows_sys::core::HRESULT = 0xC0262335_u32 as _; +pub const ERROR_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED: windows_sys::core::HRESULT = 0xC02625E0_u32 as _; +pub const ERROR_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE: windows_sys::core::HRESULT = 0xC0262518_u32 as _; +pub const ERROR_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR: windows_sys::core::HRESULT = 0xC026251E_u32 as _; +pub const ERROR_GRAPHICS_OPM_HDCP_SRM_NEVER_SET: windows_sys::core::HRESULT = 0xC0262516_u32 as _; +pub const ERROR_GRAPHICS_OPM_INTERNAL_ERROR: windows_sys::core::HRESULT = 0xC026250B_u32 as _; +pub const ERROR_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST: windows_sys::core::HRESULT = 0xC0262521_u32 as _; +pub const ERROR_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS: windows_sys::core::HRESULT = 0xC0262503_u32 as _; +pub const ERROR_GRAPHICS_OPM_INVALID_HANDLE: windows_sys::core::HRESULT = 0xC026250C_u32 as _; +pub const ERROR_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST: windows_sys::core::HRESULT = 0xC026251D_u32 as _; +pub const ERROR_GRAPHICS_OPM_INVALID_SRM: windows_sys::core::HRESULT = 0xC0262512_u32 as _; +pub const ERROR_GRAPHICS_OPM_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262500_u32 as _; +pub const ERROR_GRAPHICS_OPM_NO_VIDEO_OUTPUTS_EXIST: windows_sys::core::HRESULT = 0xC0262505_u32 as _; +pub const ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP: windows_sys::core::HRESULT = 0xC0262514_u32 as _; +pub const ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA: windows_sys::core::HRESULT = 0xC0262515_u32 as _; +pub const ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP: windows_sys::core::HRESULT = 0xC0262513_u32 as _; +pub const ERROR_GRAPHICS_OPM_RESOLUTION_TOO_HIGH: windows_sys::core::HRESULT = 0xC0262517_u32 as _; +pub const ERROR_GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS: windows_sys::core::HRESULT = 0xC026251B_u32 as _; +pub const ERROR_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262520_u32 as _; +pub const ERROR_GRAPHICS_OPM_SPANNING_MODE_ENABLED: windows_sys::core::HRESULT = 0xC026250F_u32 as _; +pub const ERROR_GRAPHICS_OPM_THEATER_MODE_ENABLED: windows_sys::core::HRESULT = 0xC0262510_u32 as _; +pub const ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS: windows_sys::core::HRESULT = 0xC026251C_u32 as _; +pub const ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS: windows_sys::core::HRESULT = 0xC026251F_u32 as _; +pub const ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_NO_LONGER_EXISTS: windows_sys::core::HRESULT = 0xC026251A_u32 as _; +pub const ERROR_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL: windows_sys::core::HRESULT = 0xC02625E6_u32 as _; +pub const ERROR_GRAPHICS_PARTIAL_DATA_POPULATED: windows_sys::core::HRESULT = 0x4026200A_u32 as _; +pub const ERROR_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY: windows_sys::core::HRESULT = 0xC0262313_u32 as _; +pub const ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED: windows_sys::core::HRESULT = 0x262351_u32 as _; +pub const ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262346_u32 as _; +pub const ERROR_GRAPHICS_PATH_NOT_IN_TOPOLOGY: windows_sys::core::HRESULT = 0xC0262327_u32 as _; +pub const ERROR_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET: windows_sys::core::HRESULT = 0xC0262312_u32 as _; +pub const ERROR_GRAPHICS_POLLING_TOO_FREQUENTLY: windows_sys::core::HRESULT = 0x40262439_u32 as _; +pub const ERROR_GRAPHICS_PRESENT_BUFFER_NOT_BOUND: windows_sys::core::HRESULT = 0xC0262010_u32 as _; +pub const ERROR_GRAPHICS_PRESENT_DENIED: windows_sys::core::HRESULT = 0xC0262007_u32 as _; +pub const ERROR_GRAPHICS_PRESENT_INVALID_WINDOW: windows_sys::core::HRESULT = 0xC026200F_u32 as _; +pub const ERROR_GRAPHICS_PRESENT_MODE_CHANGED: windows_sys::core::HRESULT = 0xC0262005_u32 as _; +pub const ERROR_GRAPHICS_PRESENT_OCCLUDED: windows_sys::core::HRESULT = 0xC0262006_u32 as _; +pub const ERROR_GRAPHICS_PRESENT_REDIRECTION_DISABLED: windows_sys::core::HRESULT = 0xC026200B_u32 as _; +pub const ERROR_GRAPHICS_PRESENT_UNOCCLUDED: windows_sys::core::HRESULT = 0xC026200C_u32 as _; +pub const ERROR_GRAPHICS_PVP_HFS_FAILED: windows_sys::core::HRESULT = 0xC0262511_u32 as _; +pub const ERROR_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH: windows_sys::core::HRESULT = 0xC026250E_u32 as _; +pub const ERROR_GRAPHICS_RESOURCES_NOT_RELATED: windows_sys::core::HRESULT = 0xC0262330_u32 as _; +pub const ERROR_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS: windows_sys::core::HRESULT = 0xC02605E8_u32 as _; +pub const ERROR_GRAPHICS_SKIP_ALLOCATION_PREPARATION: windows_sys::core::HRESULT = 0x40262201_u32 as _; +pub const ERROR_GRAPHICS_SOURCE_ALREADY_IN_SET: windows_sys::core::HRESULT = 0xC0262317_u32 as _; +pub const ERROR_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE: windows_sys::core::HRESULT = 0xC0262331_u32 as _; +pub const ERROR_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY: windows_sys::core::HRESULT = 0xC0262339_u32 as _; +pub const ERROR_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED: windows_sys::core::HRESULT = 0xC0262400_u32 as _; +pub const ERROR_GRAPHICS_STALE_MODESET: windows_sys::core::HRESULT = 0xC0262320_u32 as _; +pub const ERROR_GRAPHICS_STALE_VIDPN_TOPOLOGY: windows_sys::core::HRESULT = 0xC0262337_u32 as _; +pub const ERROR_GRAPHICS_START_DEFERRED: windows_sys::core::HRESULT = 0x4026243A_u32 as _; +pub const ERROR_GRAPHICS_TARGET_ALREADY_IN_SET: windows_sys::core::HRESULT = 0xC0262318_u32 as _; +pub const ERROR_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE: windows_sys::core::HRESULT = 0xC0262332_u32 as _; +pub const ERROR_GRAPHICS_TARGET_NOT_IN_TOPOLOGY: windows_sys::core::HRESULT = 0xC0262340_u32 as _; +pub const ERROR_GRAPHICS_TOO_MANY_REFERENCES: windows_sys::core::HRESULT = 0xC0262103_u32 as _; +pub const ERROR_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED: windows_sys::core::HRESULT = 0xC0262353_u32 as _; +pub const ERROR_GRAPHICS_TRY_AGAIN_LATER: windows_sys::core::HRESULT = 0xC0262104_u32 as _; +pub const ERROR_GRAPHICS_TRY_AGAIN_NOW: windows_sys::core::HRESULT = 0xC0262105_u32 as _; +pub const ERROR_GRAPHICS_UAB_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262502_u32 as _; +pub const ERROR_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS: windows_sys::core::HRESULT = 0xC0262350_u32 as _; +pub const ERROR_GRAPHICS_UNKNOWN_CHILD_STATUS: windows_sys::core::HRESULT = 0x4026242F_u32 as _; +pub const ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE: windows_sys::core::HRESULT = 0xC0262107_u32 as _; +pub const ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED: windows_sys::core::HRESULT = 0xC0262108_u32 as _; +pub const ERROR_GRAPHICS_VAIL_FAILED_TO_SEND_COMPOSITION_WINDOW_DPI_MESSAGE: windows_sys::core::HRESULT = 0xC0262016_u32 as _; +pub const ERROR_GRAPHICS_VAIL_FAILED_TO_SEND_CREATE_SUPERWETINK_MESSAGE: windows_sys::core::HRESULT = 0xC0262014_u32 as _; +pub const ERROR_GRAPHICS_VAIL_FAILED_TO_SEND_DESTROY_SUPERWETINK_MESSAGE: windows_sys::core::HRESULT = 0xC0262015_u32 as _; +pub const ERROR_GRAPHICS_VAIL_STATE_CHANGED: windows_sys::core::HRESULT = 0xC0262011_u32 as _; +pub const ERROR_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES: windows_sys::core::HRESULT = 0xC0262326_u32 as _; +pub const ERROR_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262306_u32 as _; +pub const ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE: windows_sys::core::HRESULT = 0xC0262342_u32 as _; +pub const ERROR_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262302_u32 as _; +pub const ERROR_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0262301_u32 as _; +pub const ERROR_GRAPHICS_WINDOWDC_NOT_AVAILABLE: windows_sys::core::HRESULT = 0xC026200D_u32 as _; +pub const ERROR_GRAPHICS_WINDOWLESS_PRESENT_DISABLED: windows_sys::core::HRESULT = 0xC026200E_u32 as _; +pub const ERROR_GRAPHICS_WRONG_ALLOCATION_DEVICE: windows_sys::core::HRESULT = 0xC0262115_u32 as _; +pub const ERROR_GROUPSET_CANT_PROVIDE: WIN32_ERROR = 5993u32; +pub const ERROR_GROUPSET_NOT_AVAILABLE: WIN32_ERROR = 5991u32; +pub const ERROR_GROUPSET_NOT_FOUND: WIN32_ERROR = 5992u32; +pub const ERROR_GROUP_EXISTS: WIN32_ERROR = 1318u32; +pub const ERROR_GROUP_NOT_AVAILABLE: WIN32_ERROR = 5012u32; +pub const ERROR_GROUP_NOT_FOUND: WIN32_ERROR = 5013u32; +pub const ERROR_GROUP_NOT_ONLINE: WIN32_ERROR = 5014u32; +pub const ERROR_GUID_SUBSTITUTION_MADE: WIN32_ERROR = 680u32; +pub const ERROR_HANDLES_CLOSED: WIN32_ERROR = 676u32; +pub const ERROR_HANDLE_DISK_FULL: WIN32_ERROR = 39u32; +pub const ERROR_HANDLE_EOF: WIN32_ERROR = 38u32; +pub const ERROR_HANDLE_NO_LONGER_VALID: WIN32_ERROR = 6815u32; +pub const ERROR_HANDLE_REVOKED: WIN32_ERROR = 811u32; +pub const ERROR_HASH_NOT_PRESENT: WIN32_ERROR = 15301u32; +pub const ERROR_HASH_NOT_SUPPORTED: WIN32_ERROR = 15300u32; +pub const ERROR_HAS_SYSTEM_CRITICAL_FILES: WIN32_ERROR = 488u32; +pub const ERROR_HEURISTIC_DAMAGE_POSSIBLE: WIN32_ERROR = 6731u32; +pub const ERROR_HIBERNATED: WIN32_ERROR = 726u32; +pub const ERROR_HIBERNATION_FAILURE: WIN32_ERROR = 656u32; +pub const ERROR_HOOK_NEEDS_HMOD: WIN32_ERROR = 1428u32; +pub const ERROR_HOOK_NOT_INSTALLED: WIN32_ERROR = 1431u32; +pub const ERROR_HOOK_TYPE_NOT_ALLOWED: WIN32_ERROR = 1458u32; +pub const ERROR_HOST_DOWN: WIN32_ERROR = 1256u32; +pub const ERROR_HOST_NODE_NOT_AVAILABLE: WIN32_ERROR = 5005u32; +pub const ERROR_HOST_NODE_NOT_GROUP_OWNER: WIN32_ERROR = 5016u32; +pub const ERROR_HOST_NODE_NOT_RESOURCE_OWNER: WIN32_ERROR = 5015u32; +pub const ERROR_HOST_UNREACHABLE: WIN32_ERROR = 1232u32; +pub const ERROR_HOTKEY_ALREADY_REGISTERED: WIN32_ERROR = 1409u32; +pub const ERROR_HOTKEY_NOT_REGISTERED: WIN32_ERROR = 1419u32; +pub const ERROR_HUNG_DISPLAY_DRIVER_THREAD: windows_sys::core::HRESULT = 0x80260001_u32 as _; +pub const ERROR_HV_ACCESS_DENIED: WIN32_ERROR = 3224698886u32; +pub const ERROR_HV_ACKNOWLEDGED: WIN32_ERROR = 3224698902u32; +pub const ERROR_HV_CPUID_FEATURE_VALIDATION: WIN32_ERROR = 3224698940u32; +pub const ERROR_HV_CPUID_XSAVE_FEATURE_VALIDATION: WIN32_ERROR = 3224698941u32; +pub const ERROR_HV_DEVICE_NOT_IN_DOMAIN: WIN32_ERROR = 3224698998u32; +pub const ERROR_HV_EVENT_BUFFER_ALREADY_FREED: WIN32_ERROR = 3224698996u32; +pub const ERROR_HV_FEATURE_UNAVAILABLE: WIN32_ERROR = 3224698910u32; +pub const ERROR_HV_INACTIVE: WIN32_ERROR = 3224698908u32; +pub const ERROR_HV_INSUFFICIENT_BUFFER: WIN32_ERROR = 3224698931u32; +pub const ERROR_HV_INSUFFICIENT_BUFFERS: WIN32_ERROR = 3224698899u32; +pub const ERROR_HV_INSUFFICIENT_CONTIGUOUS_MEMORY: WIN32_ERROR = 3224698997u32; +pub const ERROR_HV_INSUFFICIENT_CONTIGUOUS_MEMORY_MIRRORING: WIN32_ERROR = 3224699010u32; +pub const ERROR_HV_INSUFFICIENT_CONTIGUOUS_ROOT_MEMORY: WIN32_ERROR = 3224699011u32; +pub const ERROR_HV_INSUFFICIENT_CONTIGUOUS_ROOT_MEMORY_MIRRORING: WIN32_ERROR = 3224699013u32; +pub const ERROR_HV_INSUFFICIENT_DEVICE_DOMAINS: WIN32_ERROR = 3224698936u32; +pub const ERROR_HV_INSUFFICIENT_MEMORY: WIN32_ERROR = 3224698891u32; +pub const ERROR_HV_INSUFFICIENT_MEMORY_MIRRORING: WIN32_ERROR = 3224699009u32; +pub const ERROR_HV_INSUFFICIENT_ROOT_MEMORY: WIN32_ERROR = 3224698995u32; +pub const ERROR_HV_INSUFFICIENT_ROOT_MEMORY_MIRRORING: WIN32_ERROR = 3224699012u32; +pub const ERROR_HV_INVALID_ALIGNMENT: WIN32_ERROR = 3224698884u32; +pub const ERROR_HV_INVALID_CONNECTION_ID: WIN32_ERROR = 3224698898u32; +pub const ERROR_HV_INVALID_CPU_GROUP_ID: WIN32_ERROR = 3224698991u32; +pub const ERROR_HV_INVALID_CPU_GROUP_STATE: WIN32_ERROR = 3224698992u32; +pub const ERROR_HV_INVALID_DEVICE_ID: WIN32_ERROR = 3224698967u32; +pub const ERROR_HV_INVALID_DEVICE_STATE: WIN32_ERROR = 3224698968u32; +pub const ERROR_HV_INVALID_HYPERCALL_CODE: WIN32_ERROR = 3224698882u32; +pub const ERROR_HV_INVALID_HYPERCALL_INPUT: WIN32_ERROR = 3224698883u32; +pub const ERROR_HV_INVALID_LP_INDEX: WIN32_ERROR = 3224698945u32; +pub const ERROR_HV_INVALID_PARAMETER: WIN32_ERROR = 3224698885u32; +pub const ERROR_HV_INVALID_PARTITION_ID: WIN32_ERROR = 3224698893u32; +pub const ERROR_HV_INVALID_PARTITION_STATE: WIN32_ERROR = 3224698887u32; +pub const ERROR_HV_INVALID_PORT_ID: WIN32_ERROR = 3224698897u32; +pub const ERROR_HV_INVALID_PROXIMITY_DOMAIN_INFO: WIN32_ERROR = 3224698906u32; +pub const ERROR_HV_INVALID_REGISTER_VALUE: WIN32_ERROR = 3224698960u32; +pub const ERROR_HV_INVALID_SAVE_RESTORE_STATE: WIN32_ERROR = 3224698903u32; +pub const ERROR_HV_INVALID_SYNIC_STATE: WIN32_ERROR = 3224698904u32; +pub const ERROR_HV_INVALID_VP_INDEX: WIN32_ERROR = 3224698894u32; +pub const ERROR_HV_INVALID_VP_STATE: WIN32_ERROR = 3224698901u32; +pub const ERROR_HV_INVALID_VTL_STATE: WIN32_ERROR = 3224698961u32; +pub const ERROR_HV_MSR_ACCESS_FAILED: WIN32_ERROR = 3224699008u32; +pub const ERROR_HV_NESTED_VM_EXIT: WIN32_ERROR = 3224698999u32; +pub const ERROR_HV_NOT_ACKNOWLEDGED: WIN32_ERROR = 3224698900u32; +pub const ERROR_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE: WIN32_ERROR = 3224698994u32; +pub const ERROR_HV_NOT_PRESENT: WIN32_ERROR = 3224702976u32; +pub const ERROR_HV_NO_DATA: WIN32_ERROR = 3224698907u32; +pub const ERROR_HV_NO_RESOURCES: WIN32_ERROR = 3224698909u32; +pub const ERROR_HV_NX_NOT_DETECTED: WIN32_ERROR = 3224698965u32; +pub const ERROR_HV_OBJECT_IN_USE: WIN32_ERROR = 3224698905u32; +pub const ERROR_HV_OPERATION_DENIED: WIN32_ERROR = 3224698888u32; +pub const ERROR_HV_OPERATION_FAILED: WIN32_ERROR = 3224698993u32; +pub const ERROR_HV_PAGE_REQUEST_INVALID: WIN32_ERROR = 3224698976u32; +pub const ERROR_HV_PARTITION_TOO_DEEP: WIN32_ERROR = 3224698892u32; +pub const ERROR_HV_PENDING_PAGE_REQUESTS: WIN32_ERROR = 3473497u32; +pub const ERROR_HV_PROCESSOR_STARTUP_TIMEOUT: WIN32_ERROR = 3224698942u32; +pub const ERROR_HV_PROPERTY_VALUE_OUT_OF_RANGE: WIN32_ERROR = 3224698890u32; +pub const ERROR_HV_SMX_ENABLED: WIN32_ERROR = 3224698943u32; +pub const ERROR_HV_UNKNOWN_PROPERTY: WIN32_ERROR = 3224698889u32; +pub const ERROR_HWNDS_HAVE_DIFF_PARENT: WIN32_ERROR = 1441u32; +pub const ERROR_ICM_NOT_ENABLED: WIN32_ERROR = 2018u32; +pub const ERROR_IDLE_DISCONNECTED: u32 = 926u32; +pub const ERROR_IEPORT_FULL: WIN32_ERROR = 4341u32; +pub const ERROR_ILLEGAL_CHARACTER: WIN32_ERROR = 582u32; +pub const ERROR_ILLEGAL_DLL_RELOCATION: WIN32_ERROR = 623u32; +pub const ERROR_ILLEGAL_ELEMENT_ADDRESS: WIN32_ERROR = 1162u32; +pub const ERROR_ILLEGAL_FLOAT_CONTEXT: WIN32_ERROR = 579u32; +pub const ERROR_ILL_FORMED_PASSWORD: WIN32_ERROR = 1324u32; +pub const ERROR_IMAGE_AT_DIFFERENT_BASE: WIN32_ERROR = 807u32; +pub const ERROR_IMAGE_MACHINE_TYPE_MISMATCH: WIN32_ERROR = 706u32; +pub const ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE: WIN32_ERROR = 720u32; +pub const ERROR_IMAGE_NOT_AT_BASE: WIN32_ERROR = 700u32; +pub const ERROR_IMAGE_SUBSYSTEM_NOT_PRESENT: WIN32_ERROR = 308u32; +pub const ERROR_IMPLEMENTATION_LIMIT: WIN32_ERROR = 1292u32; +pub const ERROR_IMPLICIT_TRANSACTION_NOT_SUPPORTED: WIN32_ERROR = 6725u32; +pub const ERROR_INCOMPATIBLE_SERVICE_PRIVILEGE: WIN32_ERROR = 1297u32; +pub const ERROR_INCOMPATIBLE_SERVICE_SID_TYPE: WIN32_ERROR = 1290u32; +pub const ERROR_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING: WIN32_ERROR = 304u32; +pub const ERROR_INCORRECT_ACCOUNT_TYPE: WIN32_ERROR = 8646u32; +pub const ERROR_INCORRECT_ADDRESS: WIN32_ERROR = 1241u32; +pub const ERROR_INCORRECT_SIZE: WIN32_ERROR = 1462u32; +pub const ERROR_INC_BACKUP: WIN32_ERROR = 4003u32; +pub const ERROR_INDEX_ABSENT: WIN32_ERROR = 1611u32; +pub const ERROR_INDEX_OUT_OF_BOUNDS: WIN32_ERROR = 474u32; +pub const ERROR_INDIGENOUS_TYPE: WIN32_ERROR = 4338u32; +pub const ERROR_INDOUBT_TRANSACTIONS_EXIST: WIN32_ERROR = 6827u32; +pub const ERROR_INFLOOP_IN_RELOC_CHAIN: WIN32_ERROR = 202u32; +pub const ERROR_INF_IN_USE_BY_DEVICES: WIN32_ERROR = 3758096957u32; +pub const ERROR_INSTALL_ALREADY_RUNNING: WIN32_ERROR = 1618u32; +pub const ERROR_INSTALL_CANCEL: WIN32_ERROR = 15608u32; +pub const ERROR_INSTALL_DEREGISTRATION_FAILURE: WIN32_ERROR = 15607u32; +pub const ERROR_INSTALL_FAILED: WIN32_ERROR = 15609u32; +pub const ERROR_INSTALL_FAILURE: WIN32_ERROR = 1603u32; +pub const ERROR_INSTALL_FIREWALL_SERVICE_NOT_RUNNING: WIN32_ERROR = 15626u32; +pub const ERROR_INSTALL_FULLTRUST_HOSTRUNTIME_REQUIRES_MAIN_PACKAGE_FULLTRUST_CAPABILITY: WIN32_ERROR = 15663u32; +pub const ERROR_INSTALL_INVALID_PACKAGE: WIN32_ERROR = 15602u32; +pub const ERROR_INSTALL_INVALID_RELATED_SET_UPDATE: WIN32_ERROR = 15639u32; +pub const ERROR_INSTALL_LANGUAGE_UNSUPPORTED: WIN32_ERROR = 1623u32; +pub const ERROR_INSTALL_LOG_FAILURE: WIN32_ERROR = 1622u32; +pub const ERROR_INSTALL_NETWORK_FAILURE: WIN32_ERROR = 15605u32; +pub const ERROR_INSTALL_NOTUSED: WIN32_ERROR = 1634u32; +pub const ERROR_INSTALL_OPEN_PACKAGE_FAILED: WIN32_ERROR = 15600u32; +pub const ERROR_INSTALL_OPTIONAL_PACKAGE_APPLICATIONID_NOT_UNIQUE: WIN32_ERROR = 15637u32; +pub const ERROR_INSTALL_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE: WIN32_ERROR = 15634u32; +pub const ERROR_INSTALL_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE_FULLTRUST_CAPABILITY: WIN32_ERROR = 15640u32; +pub const ERROR_INSTALL_OUT_OF_DISK_SPACE: WIN32_ERROR = 15604u32; +pub const ERROR_INSTALL_PACKAGE_DOWNGRADE: WIN32_ERROR = 15622u32; +pub const ERROR_INSTALL_PACKAGE_INVALID: WIN32_ERROR = 1620u32; +pub const ERROR_INSTALL_PACKAGE_NOT_FOUND: WIN32_ERROR = 15601u32; +pub const ERROR_INSTALL_PACKAGE_OPEN_FAILED: WIN32_ERROR = 1619u32; +pub const ERROR_INSTALL_PACKAGE_REJECTED: WIN32_ERROR = 1625u32; +pub const ERROR_INSTALL_PACKAGE_VERSION: WIN32_ERROR = 1613u32; +pub const ERROR_INSTALL_PLATFORM_UNSUPPORTED: WIN32_ERROR = 1633u32; +pub const ERROR_INSTALL_POLICY_FAILURE: WIN32_ERROR = 15615u32; +pub const ERROR_INSTALL_PREREQUISITE_FAILED: WIN32_ERROR = 15613u32; +pub const ERROR_INSTALL_REGISTRATION_FAILURE: WIN32_ERROR = 15606u32; +pub const ERROR_INSTALL_REJECTED: WIN32_ERROR = 1654u32; +pub const ERROR_INSTALL_REMOTE_DISALLOWED: WIN32_ERROR = 1640u32; +pub const ERROR_INSTALL_REMOTE_PROHIBITED: WIN32_ERROR = 1645u32; +pub const ERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED: WIN32_ERROR = 15603u32; +pub const ERROR_INSTALL_RESOLVE_HOSTRUNTIME_DEPENDENCY_FAILED: WIN32_ERROR = 15665u32; +pub const ERROR_INSTALL_SERVICE_FAILURE: WIN32_ERROR = 1601u32; +pub const ERROR_INSTALL_SERVICE_SAFEBOOT: WIN32_ERROR = 1652u32; +pub const ERROR_INSTALL_SOURCE_ABSENT: WIN32_ERROR = 1612u32; +pub const ERROR_INSTALL_SUSPEND: WIN32_ERROR = 1604u32; +pub const ERROR_INSTALL_TEMP_UNWRITABLE: WIN32_ERROR = 1632u32; +pub const ERROR_INSTALL_TRANSFORM_FAILURE: WIN32_ERROR = 1624u32; +pub const ERROR_INSTALL_TRANSFORM_REJECTED: WIN32_ERROR = 1644u32; +pub const ERROR_INSTALL_UI_FAILURE: WIN32_ERROR = 1621u32; +pub const ERROR_INSTALL_USEREXIT: WIN32_ERROR = 1602u32; +pub const ERROR_INSTALL_VOLUME_CORRUPT: WIN32_ERROR = 15630u32; +pub const ERROR_INSTALL_VOLUME_NOT_EMPTY: WIN32_ERROR = 15628u32; +pub const ERROR_INSTALL_VOLUME_OFFLINE: WIN32_ERROR = 15629u32; +pub const ERROR_INSTALL_WRONG_PROCESSOR_ARCHITECTURE: WIN32_ERROR = 15632u32; +pub const ERROR_INSTRUCTION_MISALIGNMENT: WIN32_ERROR = 549u32; +pub const ERROR_INSUFFICIENT_BUFFER: WIN32_ERROR = 122u32; +pub const ERROR_INSUFFICIENT_LOGON_INFO: WIN32_ERROR = 608u32; +pub const ERROR_INSUFFICIENT_POWER: WIN32_ERROR = 639u32; +pub const ERROR_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE: WIN32_ERROR = 781u32; +pub const ERROR_INSUFFICIENT_VIRTUAL_ADDR_RESOURCES: WIN32_ERROR = 473u32; +pub const ERROR_INTERFACE_ALREADY_EXISTS: u32 = 904u32; +pub const ERROR_INTERFACE_CONFIGURATION: u32 = 912u32; +pub const ERROR_INTERFACE_CONNECTED: u32 = 908u32; +pub const ERROR_INTERFACE_DEVICE_ACTIVE: WIN32_ERROR = 3758096923u32; +pub const ERROR_INTERFACE_DEVICE_REMOVED: WIN32_ERROR = 3758096924u32; +pub const ERROR_INTERFACE_DISABLED: u32 = 916u32; +pub const ERROR_INTERFACE_DISCONNECTED: u32 = 929u32; +pub const ERROR_INTERFACE_HAS_NO_DEVICES: u32 = 925u32; +pub const ERROR_INTERFACE_NOT_CONNECTED: u32 = 906u32; +pub const ERROR_INTERFACE_UNREACHABLE: u32 = 927u32; +pub const ERROR_INTERMIXED_KERNEL_EA_OPERATION: WIN32_ERROR = 324u32; +pub const ERROR_INTERNAL_DB_CORRUPTION: WIN32_ERROR = 1358u32; +pub const ERROR_INTERNAL_DB_ERROR: WIN32_ERROR = 1383u32; +pub const ERROR_INTERNAL_ERROR: WIN32_ERROR = 1359u32; +pub const ERROR_INTERRUPT_STILL_CONNECTED: WIN32_ERROR = 764u32; +pub const ERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED: WIN32_ERROR = 763u32; +pub const ERROR_INVALID_ACCEL_HANDLE: WIN32_ERROR = 1403u32; +pub const ERROR_INVALID_ACCESS: WIN32_ERROR = 12u32; +pub const ERROR_INVALID_ACCOUNT_NAME: WIN32_ERROR = 1315u32; +pub const ERROR_INVALID_ACE_CONDITION: WIN32_ERROR = 805u32; +pub const ERROR_INVALID_ACL: WIN32_ERROR = 1336u32; +pub const ERROR_INVALID_ADDRESS: WIN32_ERROR = 487u32; +pub const ERROR_INVALID_ATTRIBUTE_LENGTH: u32 = 953u32; +pub const ERROR_INVALID_AT_INTERRUPT_TIME: WIN32_ERROR = 104u32; +pub const ERROR_INVALID_BLOCK: WIN32_ERROR = 9u32; +pub const ERROR_INVALID_BLOCK_LENGTH: WIN32_ERROR = 1106u32; +pub const ERROR_INVALID_CAP: WIN32_ERROR = 320u32; +pub const ERROR_INVALID_CATEGORY: WIN32_ERROR = 117u32; +pub const ERROR_INVALID_CLASS: WIN32_ERROR = 3758096902u32; +pub const ERROR_INVALID_CLASS_INSTALLER: WIN32_ERROR = 3758096909u32; +pub const ERROR_INVALID_CLEANER: WIN32_ERROR = 4310u32; +pub const ERROR_INVALID_CLUSTER_IPV6_ADDRESS: WIN32_ERROR = 5911u32; +pub const ERROR_INVALID_CMM: WIN32_ERROR = 2010u32; +pub const ERROR_INVALID_COINSTALLER: WIN32_ERROR = 3758096935u32; +pub const ERROR_INVALID_COLORINDEX: WIN32_ERROR = 2022u32; +pub const ERROR_INVALID_COLORSPACE: WIN32_ERROR = 2017u32; +pub const ERROR_INVALID_COMBOBOX_MESSAGE: WIN32_ERROR = 1422u32; +pub const ERROR_INVALID_COMMAND_LINE: WIN32_ERROR = 1639u32; +pub const ERROR_INVALID_COMPUTERNAME: WIN32_ERROR = 1210u32; +pub const ERROR_INVALID_CONFIG_VALUE: WIN32_ERROR = 479u32; +pub const ERROR_INVALID_CRUNTIME_PARAMETER: WIN32_ERROR = 1288u32; +pub const ERROR_INVALID_CURSOR_HANDLE: WIN32_ERROR = 1402u32; +pub const ERROR_INVALID_DATA: WIN32_ERROR = 13u32; +pub const ERROR_INVALID_DATATYPE: WIN32_ERROR = 1804u32; +pub const ERROR_INVALID_DEVICE_OBJECT_PARAMETER: WIN32_ERROR = 650u32; +pub const ERROR_INVALID_DEVINST_NAME: WIN32_ERROR = 3758096901u32; +pub const ERROR_INVALID_DLL: WIN32_ERROR = 1154u32; +pub const ERROR_INVALID_DOMAINNAME: WIN32_ERROR = 1212u32; +pub const ERROR_INVALID_DOMAIN_ROLE: WIN32_ERROR = 1354u32; +pub const ERROR_INVALID_DOMAIN_STATE: WIN32_ERROR = 1353u32; +pub const ERROR_INVALID_DRIVE: WIN32_ERROR = 15u32; +pub const ERROR_INVALID_DRIVE_OBJECT: WIN32_ERROR = 4321u32; +pub const ERROR_INVALID_DWP_HANDLE: WIN32_ERROR = 1405u32; +pub const ERROR_INVALID_EA_HANDLE: WIN32_ERROR = 278u32; +pub const ERROR_INVALID_EA_NAME: WIN32_ERROR = 254u32; +pub const ERROR_INVALID_EDIT_HEIGHT: WIN32_ERROR = 1424u32; +pub const ERROR_INVALID_ENVIRONMENT: WIN32_ERROR = 1805u32; +pub const ERROR_INVALID_EVENTNAME: WIN32_ERROR = 1211u32; +pub const ERROR_INVALID_EVENT_COUNT: WIN32_ERROR = 151u32; +pub const ERROR_INVALID_EXCEPTION_HANDLER: WIN32_ERROR = 310u32; +pub const ERROR_INVALID_EXE_SIGNATURE: WIN32_ERROR = 191u32; +pub const ERROR_INVALID_FIELD: WIN32_ERROR = 1616u32; +pub const ERROR_INVALID_FIELD_IN_PARAMETER_LIST: WIN32_ERROR = 328u32; +pub const ERROR_INVALID_FILTER_DRIVER: WIN32_ERROR = 3758096940u32; +pub const ERROR_INVALID_FILTER_PROC: WIN32_ERROR = 1427u32; +pub const ERROR_INVALID_FLAGS: WIN32_ERROR = 1004u32; +pub const ERROR_INVALID_FLAG_NUMBER: WIN32_ERROR = 186u32; +pub const ERROR_INVALID_FORM_NAME: WIN32_ERROR = 1902u32; +pub const ERROR_INVALID_FORM_SIZE: WIN32_ERROR = 1903u32; +pub const ERROR_INVALID_FUNCTION: WIN32_ERROR = 1u32; +pub const ERROR_INVALID_GROUPNAME: WIN32_ERROR = 1209u32; +pub const ERROR_INVALID_GROUP_ATTRIBUTES: WIN32_ERROR = 1345u32; +pub const ERROR_INVALID_GW_COMMAND: WIN32_ERROR = 1443u32; +pub const ERROR_INVALID_HANDLE: WIN32_ERROR = 6u32; +pub const ERROR_INVALID_HANDLE_STATE: WIN32_ERROR = 1609u32; +pub const ERROR_INVALID_HOOK_FILTER: WIN32_ERROR = 1426u32; +pub const ERROR_INVALID_HOOK_HANDLE: WIN32_ERROR = 1404u32; +pub const ERROR_INVALID_HWPROFILE: WIN32_ERROR = 3758096912u32; +pub const ERROR_INVALID_HW_PROFILE: WIN32_ERROR = 619u32; +pub const ERROR_INVALID_ICON_HANDLE: WIN32_ERROR = 1414u32; +pub const ERROR_INVALID_ID_AUTHORITY: WIN32_ERROR = 1343u32; +pub const ERROR_INVALID_IMAGE_HASH: WIN32_ERROR = 577u32; +pub const ERROR_INVALID_IMPORT_OF_NON_DLL: WIN32_ERROR = 1276u32; +pub const ERROR_INVALID_INDEX: WIN32_ERROR = 1413u32; +pub const ERROR_INVALID_INF_LOGCONFIG: WIN32_ERROR = 3758096938u32; +pub const ERROR_INVALID_KERNEL_INFO_VERSION: WIN32_ERROR = 340u32; +pub const ERROR_INVALID_KEYBOARD_HANDLE: WIN32_ERROR = 1457u32; +pub const ERROR_INVALID_LABEL: WIN32_ERROR = 1299u32; +pub const ERROR_INVALID_LB_MESSAGE: WIN32_ERROR = 1432u32; +pub const ERROR_INVALID_LDT_DESCRIPTOR: WIN32_ERROR = 564u32; +pub const ERROR_INVALID_LDT_OFFSET: WIN32_ERROR = 563u32; +pub const ERROR_INVALID_LDT_SIZE: WIN32_ERROR = 561u32; +pub const ERROR_INVALID_LEVEL: WIN32_ERROR = 124u32; +pub const ERROR_INVALID_LIBRARY: WIN32_ERROR = 4301u32; +pub const ERROR_INVALID_LIST_FORMAT: WIN32_ERROR = 153u32; +pub const ERROR_INVALID_LOCK_RANGE: WIN32_ERROR = 307u32; +pub const ERROR_INVALID_LOGON_HOURS: WIN32_ERROR = 1328u32; +pub const ERROR_INVALID_LOGON_TYPE: WIN32_ERROR = 1367u32; +pub const ERROR_INVALID_MACHINENAME: WIN32_ERROR = 3758096928u32; +pub const ERROR_INVALID_MEDIA: WIN32_ERROR = 4300u32; +pub const ERROR_INVALID_MEDIA_POOL: WIN32_ERROR = 4302u32; +pub const ERROR_INVALID_MEMBER: WIN32_ERROR = 1388u32; +pub const ERROR_INVALID_MENU_HANDLE: WIN32_ERROR = 1401u32; +pub const ERROR_INVALID_MESSAGE: WIN32_ERROR = 1002u32; +pub const ERROR_INVALID_MESSAGEDEST: WIN32_ERROR = 1218u32; +pub const ERROR_INVALID_MESSAGENAME: WIN32_ERROR = 1217u32; +pub const ERROR_INVALID_MINALLOCSIZE: WIN32_ERROR = 195u32; +pub const ERROR_INVALID_MODULETYPE: WIN32_ERROR = 190u32; +pub const ERROR_INVALID_MONITOR_HANDLE: WIN32_ERROR = 1461u32; +pub const ERROR_INVALID_MSGBOX_STYLE: WIN32_ERROR = 1438u32; +pub const ERROR_INVALID_NAME: WIN32_ERROR = 123u32; +pub const ERROR_INVALID_NETNAME: WIN32_ERROR = 1214u32; +pub const ERROR_INVALID_OPERATION: WIN32_ERROR = 4317u32; +pub const ERROR_INVALID_OPERATION_ON_QUORUM: WIN32_ERROR = 5068u32; +pub const ERROR_INVALID_OPLOCK_PROTOCOL: WIN32_ERROR = 301u32; +pub const ERROR_INVALID_ORDINAL: WIN32_ERROR = 182u32; +pub const ERROR_INVALID_OWNER: WIN32_ERROR = 1307u32; +pub const ERROR_INVALID_PACKAGE_SID_LENGTH: WIN32_ERROR = 4253u32; +pub const ERROR_INVALID_PACKET: u32 = 954u32; +pub const ERROR_INVALID_PACKET_LENGTH_OR_ID: u32 = 952u32; +pub const ERROR_INVALID_PARAMETER: WIN32_ERROR = 87u32; +pub const ERROR_INVALID_PASSWORD: WIN32_ERROR = 86u32; +pub const ERROR_INVALID_PASSWORDNAME: WIN32_ERROR = 1216u32; +pub const ERROR_INVALID_PATCH_XML: WIN32_ERROR = 1650u32; +pub const ERROR_INVALID_PEP_INFO_VERSION: WIN32_ERROR = 341u32; +pub const ERROR_INVALID_PIXEL_FORMAT: WIN32_ERROR = 2000u32; +pub const ERROR_INVALID_PLUGPLAY_DEVICE_PATH: WIN32_ERROR = 620u32; +pub const ERROR_INVALID_PORT_ATTRIBUTES: WIN32_ERROR = 545u32; +pub const ERROR_INVALID_PRIMARY_GROUP: WIN32_ERROR = 1308u32; +pub const ERROR_INVALID_PRINTER_COMMAND: WIN32_ERROR = 1803u32; +pub const ERROR_INVALID_PRINTER_DRIVER_MANIFEST: WIN32_ERROR = 3021u32; +pub const ERROR_INVALID_PRINTER_NAME: WIN32_ERROR = 1801u32; +pub const ERROR_INVALID_PRINTER_STATE: WIN32_ERROR = 1906u32; +pub const ERROR_INVALID_PRINT_MONITOR: WIN32_ERROR = 3007u32; +pub const ERROR_INVALID_PRIORITY: WIN32_ERROR = 1800u32; +pub const ERROR_INVALID_PROFILE: WIN32_ERROR = 2011u32; +pub const ERROR_INVALID_PROPPAGE_PROVIDER: WIN32_ERROR = 3758096932u32; +pub const ERROR_INVALID_QUOTA_LOWER: WIN32_ERROR = 547u32; +pub const ERROR_INVALID_RADIUS_RESPONSE: u32 = 939u32; +pub const ERROR_INVALID_REFERENCE_STRING: WIN32_ERROR = 3758096927u32; +pub const ERROR_INVALID_REG_PROPERTY: WIN32_ERROR = 3758096905u32; +pub const ERROR_INVALID_REPARSE_DATA: WIN32_ERROR = 4392u32; +pub const ERROR_INVALID_RUNLEVEL_SETTING: WIN32_ERROR = 15401u32; +pub const ERROR_INVALID_SCROLLBAR_RANGE: WIN32_ERROR = 1448u32; +pub const ERROR_INVALID_SECURITY_DESCR: WIN32_ERROR = 1338u32; +pub const ERROR_INVALID_SEGDPL: WIN32_ERROR = 198u32; +pub const ERROR_INVALID_SEGMENT_NUMBER: WIN32_ERROR = 180u32; +pub const ERROR_INVALID_SEPARATOR_FILE: WIN32_ERROR = 1799u32; +pub const ERROR_INVALID_SERVER_STATE: WIN32_ERROR = 1352u32; +pub const ERROR_INVALID_SERVICENAME: WIN32_ERROR = 1213u32; +pub const ERROR_INVALID_SERVICE_ACCOUNT: WIN32_ERROR = 1057u32; +pub const ERROR_INVALID_SERVICE_CONTROL: WIN32_ERROR = 1052u32; +pub const ERROR_INVALID_SERVICE_LOCK: WIN32_ERROR = 1071u32; +pub const ERROR_INVALID_SHARENAME: WIN32_ERROR = 1215u32; +pub const ERROR_INVALID_SHOWWIN_COMMAND: WIN32_ERROR = 1449u32; +pub const ERROR_INVALID_SID: WIN32_ERROR = 1337u32; +pub const ERROR_INVALID_SIGNAL_NUMBER: WIN32_ERROR = 209u32; +pub const ERROR_INVALID_SIGNATURE: u32 = 950u32; +pub const ERROR_INVALID_SIGNATURE_LENGTH: u32 = 949u32; +pub const ERROR_INVALID_SPI_VALUE: WIN32_ERROR = 1439u32; +pub const ERROR_INVALID_STACKSEG: WIN32_ERROR = 189u32; +pub const ERROR_INVALID_STAGED_SIGNATURE: WIN32_ERROR = 15620u32; +pub const ERROR_INVALID_STARTING_CODESEG: WIN32_ERROR = 188u32; +pub const ERROR_INVALID_STATE: WIN32_ERROR = 5023u32; +pub const ERROR_INVALID_SUB_AUTHORITY: WIN32_ERROR = 1335u32; +pub const ERROR_INVALID_TABLE: WIN32_ERROR = 1628u32; +pub const ERROR_INVALID_TARGET: WIN32_ERROR = 3758096947u32; +pub const ERROR_INVALID_TARGET_HANDLE: WIN32_ERROR = 114u32; +pub const ERROR_INVALID_TASK_INDEX: WIN32_ERROR = 1551u32; +pub const ERROR_INVALID_TASK_NAME: WIN32_ERROR = 1550u32; +pub const ERROR_INVALID_THREAD_ID: WIN32_ERROR = 1444u32; +pub const ERROR_INVALID_TIME: WIN32_ERROR = 1901u32; +pub const ERROR_INVALID_TOKEN: WIN32_ERROR = 315u32; +pub const ERROR_INVALID_TRANSACTION: WIN32_ERROR = 6700u32; +pub const ERROR_INVALID_TRANSFORM: WIN32_ERROR = 2020u32; +pub const ERROR_INVALID_UNWIND_TARGET: WIN32_ERROR = 544u32; +pub const ERROR_INVALID_USER_BUFFER: WIN32_ERROR = 1784u32; +pub const ERROR_INVALID_USER_PRINCIPAL_NAME: WIN32_ERROR = 8636u32; +pub const ERROR_INVALID_VARIANT: WIN32_ERROR = 604u32; +pub const ERROR_INVALID_VERIFY_SWITCH: WIN32_ERROR = 118u32; +pub const ERROR_INVALID_WINDOW_HANDLE: WIN32_ERROR = 1400u32; +pub const ERROR_INVALID_WINDOW_STYLE: WIN32_ERROR = 2002u32; +pub const ERROR_INVALID_WORKSTATION: WIN32_ERROR = 1329u32; +pub const ERROR_IN_WOW64: WIN32_ERROR = 3758096949u32; +pub const ERROR_IOPL_NOT_ENABLED: WIN32_ERROR = 197u32; +pub const ERROR_IO_DEVICE: WIN32_ERROR = 1117u32; +pub const ERROR_IO_INCOMPLETE: WIN32_ERROR = 996u32; +pub const ERROR_IO_PENDING: WIN32_ERROR = 997u32; +pub const ERROR_IO_PREEMPTED: windows_sys::core::HRESULT = 0x89010001_u32 as _; +pub const ERROR_IO_PRIVILEGE_FAILED: WIN32_ERROR = 571u32; +pub const ERROR_IO_REISSUE_AS_CACHED: WIN32_ERROR = 3950u32; +pub const ERROR_IPSEC_AUTH_FIREWALL_DROP: WIN32_ERROR = 13917u32; +pub const ERROR_IPSEC_BAD_SPI: WIN32_ERROR = 13910u32; +pub const ERROR_IPSEC_CLEAR_TEXT_DROP: WIN32_ERROR = 13916u32; +pub const ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND: WIN32_ERROR = 13014u32; +pub const ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND: WIN32_ERROR = 13013u32; +pub const ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND: WIN32_ERROR = 13015u32; +pub const ERROR_IPSEC_DOSP_BLOCK: WIN32_ERROR = 13925u32; +pub const ERROR_IPSEC_DOSP_INVALID_PACKET: WIN32_ERROR = 13927u32; +pub const ERROR_IPSEC_DOSP_KEYMOD_NOT_ALLOWED: WIN32_ERROR = 13930u32; +pub const ERROR_IPSEC_DOSP_MAX_ENTRIES: WIN32_ERROR = 13929u32; +pub const ERROR_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES: WIN32_ERROR = 13932u32; +pub const ERROR_IPSEC_DOSP_NOT_INSTALLED: WIN32_ERROR = 13931u32; +pub const ERROR_IPSEC_DOSP_RECEIVED_MULTICAST: WIN32_ERROR = 13926u32; +pub const ERROR_IPSEC_DOSP_STATE_LOOKUP_FAILED: WIN32_ERROR = 13928u32; +pub const ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED: WIN32_ERROR = 13860u32; +pub const ERROR_IPSEC_IKE_ATTRIB_FAIL: WIN32_ERROR = 13802u32; +pub const ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE: WIN32_ERROR = 13905u32; +pub const ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_WITH_OPTIONAL_RETRY: WIN32_ERROR = 13907u32; +pub const ERROR_IPSEC_IKE_AUTH_FAIL: WIN32_ERROR = 13801u32; +pub const ERROR_IPSEC_IKE_BENIGN_REINIT: WIN32_ERROR = 13878u32; +pub const ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH: WIN32_ERROR = 13887u32; +pub const ERROR_IPSEC_IKE_CGA_AUTH_FAILED: WIN32_ERROR = 13892u32; +pub const ERROR_IPSEC_IKE_COEXISTENCE_SUPPRESS: WIN32_ERROR = 13902u32; +pub const ERROR_IPSEC_IKE_CRITICAL_PAYLOAD_NOT_RECOGNIZED: WIN32_ERROR = 13823u32; +pub const ERROR_IPSEC_IKE_CRL_FAILED: WIN32_ERROR = 13817u32; +pub const ERROR_IPSEC_IKE_DECRYPT: WIN32_ERROR = 13867u32; +pub const ERROR_IPSEC_IKE_DH_FAIL: WIN32_ERROR = 13822u32; +pub const ERROR_IPSEC_IKE_DH_FAILURE: WIN32_ERROR = 13864u32; +pub const ERROR_IPSEC_IKE_DOS_COOKIE_SENT: WIN32_ERROR = 13890u32; +pub const ERROR_IPSEC_IKE_DROP_NO_RESPONSE: WIN32_ERROR = 13813u32; +pub const ERROR_IPSEC_IKE_ENCRYPT: WIN32_ERROR = 13866u32; +pub const ERROR_IPSEC_IKE_ERROR: WIN32_ERROR = 13816u32; +pub const ERROR_IPSEC_IKE_FAILQUERYSSP: WIN32_ERROR = 13854u32; +pub const ERROR_IPSEC_IKE_FAILSSPINIT: WIN32_ERROR = 13853u32; +pub const ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR: WIN32_ERROR = 13804u32; +pub const ERROR_IPSEC_IKE_GETSPIFAIL: WIN32_ERROR = 13857u32; +pub const ERROR_IPSEC_IKE_INNER_IP_ASSIGNMENT_FAILURE: WIN32_ERROR = 13899u32; +pub const ERROR_IPSEC_IKE_INVALID_AUTH_ALG: WIN32_ERROR = 13874u32; +pub const ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD: WIN32_ERROR = 13889u32; +pub const ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN: WIN32_ERROR = 13881u32; +pub const ERROR_IPSEC_IKE_INVALID_CERT_TYPE: WIN32_ERROR = 13819u32; +pub const ERROR_IPSEC_IKE_INVALID_COOKIE: WIN32_ERROR = 13846u32; +pub const ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG: WIN32_ERROR = 13873u32; +pub const ERROR_IPSEC_IKE_INVALID_FILTER: WIN32_ERROR = 13858u32; +pub const ERROR_IPSEC_IKE_INVALID_GROUP: WIN32_ERROR = 13865u32; +pub const ERROR_IPSEC_IKE_INVALID_HASH: WIN32_ERROR = 13870u32; +pub const ERROR_IPSEC_IKE_INVALID_HASH_ALG: WIN32_ERROR = 13871u32; +pub const ERROR_IPSEC_IKE_INVALID_HASH_SIZE: WIN32_ERROR = 13872u32; +pub const ERROR_IPSEC_IKE_INVALID_HEADER: WIN32_ERROR = 13824u32; +pub const ERROR_IPSEC_IKE_INVALID_KEY_USAGE: WIN32_ERROR = 13818u32; +pub const ERROR_IPSEC_IKE_INVALID_MAJOR_VERSION: WIN32_ERROR = 13880u32; +pub const ERROR_IPSEC_IKE_INVALID_MM_FOR_QM: WIN32_ERROR = 13894u32; +pub const ERROR_IPSEC_IKE_INVALID_PAYLOAD: WIN32_ERROR = 13843u32; +pub const ERROR_IPSEC_IKE_INVALID_POLICY: WIN32_ERROR = 13861u32; +pub const ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY: WIN32_ERROR = 13879u32; +pub const ERROR_IPSEC_IKE_INVALID_SIG: WIN32_ERROR = 13875u32; +pub const ERROR_IPSEC_IKE_INVALID_SIGNATURE: WIN32_ERROR = 13826u32; +pub const ERROR_IPSEC_IKE_INVALID_SITUATION: WIN32_ERROR = 13863u32; +pub const ERROR_IPSEC_IKE_KERBEROS_ERROR: WIN32_ERROR = 13827u32; +pub const ERROR_IPSEC_IKE_KILL_DUMMY_NAP_TUNNEL: WIN32_ERROR = 13898u32; +pub const ERROR_IPSEC_IKE_LOAD_FAILED: WIN32_ERROR = 13876u32; +pub const ERROR_IPSEC_IKE_LOAD_SOFT_SA: WIN32_ERROR = 13844u32; +pub const ERROR_IPSEC_IKE_MM_ACQUIRE_DROP: WIN32_ERROR = 13809u32; +pub const ERROR_IPSEC_IKE_MM_DELAY_DROP: WIN32_ERROR = 13814u32; +pub const ERROR_IPSEC_IKE_MM_EXPIRED: WIN32_ERROR = 13885u32; +pub const ERROR_IPSEC_IKE_MM_LIMIT: WIN32_ERROR = 13882u32; +pub const ERROR_IPSEC_IKE_NEGOTIATION_DISABLED: WIN32_ERROR = 13883u32; +pub const ERROR_IPSEC_IKE_NEGOTIATION_PENDING: WIN32_ERROR = 13803u32; +pub const ERROR_IPSEC_IKE_NEG_STATUS_BEGIN: WIN32_ERROR = 13800u32; +pub const ERROR_IPSEC_IKE_NEG_STATUS_END: WIN32_ERROR = 13897u32; +pub const ERROR_IPSEC_IKE_NEG_STATUS_EXTENDED_END: WIN32_ERROR = 13909u32; +pub const ERROR_IPSEC_IKE_NOTCBPRIV: WIN32_ERROR = 13851u32; +pub const ERROR_IPSEC_IKE_NO_CERT: WIN32_ERROR = 13806u32; +pub const ERROR_IPSEC_IKE_NO_MM_POLICY: WIN32_ERROR = 13850u32; +pub const ERROR_IPSEC_IKE_NO_PEER_CERT: WIN32_ERROR = 13847u32; +pub const ERROR_IPSEC_IKE_NO_POLICY: WIN32_ERROR = 13825u32; +pub const ERROR_IPSEC_IKE_NO_PRIVATE_KEY: WIN32_ERROR = 13820u32; +pub const ERROR_IPSEC_IKE_NO_PUBLIC_KEY: WIN32_ERROR = 13828u32; +pub const ERROR_IPSEC_IKE_OUT_OF_MEMORY: WIN32_ERROR = 13859u32; +pub const ERROR_IPSEC_IKE_PEER_CRL_FAILED: WIN32_ERROR = 13848u32; +pub const ERROR_IPSEC_IKE_PEER_DOESNT_SUPPORT_MOBIKE: WIN32_ERROR = 13904u32; +pub const ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID: WIN32_ERROR = 13886u32; +pub const ERROR_IPSEC_IKE_POLICY_CHANGE: WIN32_ERROR = 13849u32; +pub const ERROR_IPSEC_IKE_POLICY_MATCH: WIN32_ERROR = 13868u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR: WIN32_ERROR = 13829u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_CERT: WIN32_ERROR = 13835u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ: WIN32_ERROR = 13836u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_DELETE: WIN32_ERROR = 13841u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_HASH: WIN32_ERROR = 13837u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_ID: WIN32_ERROR = 13834u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_KE: WIN32_ERROR = 13833u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_NATOA: WIN32_ERROR = 13893u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_NONCE: WIN32_ERROR = 13839u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY: WIN32_ERROR = 13840u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_PROP: WIN32_ERROR = 13831u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_SA: WIN32_ERROR = 13830u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_SIG: WIN32_ERROR = 13838u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_TRANS: WIN32_ERROR = 13832u32; +pub const ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR: WIN32_ERROR = 13842u32; +pub const ERROR_IPSEC_IKE_QM_ACQUIRE_DROP: WIN32_ERROR = 13810u32; +pub const ERROR_IPSEC_IKE_QM_DELAY_DROP: WIN32_ERROR = 13815u32; +pub const ERROR_IPSEC_IKE_QM_EXPIRED: WIN32_ERROR = 13895u32; +pub const ERROR_IPSEC_IKE_QM_LIMIT: WIN32_ERROR = 13884u32; +pub const ERROR_IPSEC_IKE_QUEUE_DROP_MM: WIN32_ERROR = 13811u32; +pub const ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM: WIN32_ERROR = 13812u32; +pub const ERROR_IPSEC_IKE_RATELIMIT_DROP: WIN32_ERROR = 13903u32; +pub const ERROR_IPSEC_IKE_REQUIRE_CP_PAYLOAD_MISSING: WIN32_ERROR = 13900u32; +pub const ERROR_IPSEC_IKE_RPC_DELETE: WIN32_ERROR = 13877u32; +pub const ERROR_IPSEC_IKE_SA_DELETED: WIN32_ERROR = 13807u32; +pub const ERROR_IPSEC_IKE_SA_REAPED: WIN32_ERROR = 13808u32; +pub const ERROR_IPSEC_IKE_SECLOADFAIL: WIN32_ERROR = 13852u32; +pub const ERROR_IPSEC_IKE_SHUTTING_DOWN: WIN32_ERROR = 13891u32; +pub const ERROR_IPSEC_IKE_SIMULTANEOUS_REKEY: WIN32_ERROR = 13821u32; +pub const ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN: WIN32_ERROR = 13845u32; +pub const ERROR_IPSEC_IKE_SRVACQFAIL: WIN32_ERROR = 13855u32; +pub const ERROR_IPSEC_IKE_SRVQUERYCRED: WIN32_ERROR = 13856u32; +pub const ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_AND_CERTMAP_FAILURE: WIN32_ERROR = 13908u32; +pub const ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_FAILURE: WIN32_ERROR = 13906u32; +pub const ERROR_IPSEC_IKE_TIMED_OUT: WIN32_ERROR = 13805u32; +pub const ERROR_IPSEC_IKE_TOO_MANY_FILTERS: WIN32_ERROR = 13896u32; +pub const ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID: WIN32_ERROR = 13888u32; +pub const ERROR_IPSEC_IKE_UNKNOWN_DOI: WIN32_ERROR = 13862u32; +pub const ERROR_IPSEC_IKE_UNSUPPORTED_ID: WIN32_ERROR = 13869u32; +pub const ERROR_IPSEC_INTEGRITY_CHECK_FAILED: WIN32_ERROR = 13915u32; +pub const ERROR_IPSEC_INVALID_PACKET: WIN32_ERROR = 13914u32; +pub const ERROR_IPSEC_KEY_MODULE_IMPERSONATION_NEGOTIATION_PENDING: WIN32_ERROR = 13901u32; +pub const ERROR_IPSEC_MM_AUTH_EXISTS: WIN32_ERROR = 13010u32; +pub const ERROR_IPSEC_MM_AUTH_IN_USE: WIN32_ERROR = 13012u32; +pub const ERROR_IPSEC_MM_AUTH_NOT_FOUND: WIN32_ERROR = 13011u32; +pub const ERROR_IPSEC_MM_AUTH_PENDING_DELETION: WIN32_ERROR = 13022u32; +pub const ERROR_IPSEC_MM_FILTER_EXISTS: WIN32_ERROR = 13006u32; +pub const ERROR_IPSEC_MM_FILTER_NOT_FOUND: WIN32_ERROR = 13007u32; +pub const ERROR_IPSEC_MM_FILTER_PENDING_DELETION: WIN32_ERROR = 13018u32; +pub const ERROR_IPSEC_MM_POLICY_EXISTS: WIN32_ERROR = 13003u32; +pub const ERROR_IPSEC_MM_POLICY_IN_USE: WIN32_ERROR = 13005u32; +pub const ERROR_IPSEC_MM_POLICY_NOT_FOUND: WIN32_ERROR = 13004u32; +pub const ERROR_IPSEC_MM_POLICY_PENDING_DELETION: WIN32_ERROR = 13021u32; +pub const ERROR_IPSEC_QM_POLICY_EXISTS: WIN32_ERROR = 13000u32; +pub const ERROR_IPSEC_QM_POLICY_IN_USE: WIN32_ERROR = 13002u32; +pub const ERROR_IPSEC_QM_POLICY_NOT_FOUND: WIN32_ERROR = 13001u32; +pub const ERROR_IPSEC_QM_POLICY_PENDING_DELETION: WIN32_ERROR = 13023u32; +pub const ERROR_IPSEC_REPLAY_CHECK_FAILED: WIN32_ERROR = 13913u32; +pub const ERROR_IPSEC_SA_LIFETIME_EXPIRED: WIN32_ERROR = 13911u32; +pub const ERROR_IPSEC_THROTTLE_DROP: WIN32_ERROR = 13918u32; +pub const ERROR_IPSEC_TRANSPORT_FILTER_EXISTS: WIN32_ERROR = 13008u32; +pub const ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND: WIN32_ERROR = 13009u32; +pub const ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION: WIN32_ERROR = 13019u32; +pub const ERROR_IPSEC_TUNNEL_FILTER_EXISTS: WIN32_ERROR = 13016u32; +pub const ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND: WIN32_ERROR = 13017u32; +pub const ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION: WIN32_ERROR = 13020u32; +pub const ERROR_IPSEC_WRONG_SA: WIN32_ERROR = 13912u32; +pub const ERROR_IP_ADDRESS_CONFLICT1: WIN32_ERROR = 611u32; +pub const ERROR_IP_ADDRESS_CONFLICT2: WIN32_ERROR = 612u32; +pub const ERROR_IRQ_BUSY: WIN32_ERROR = 1119u32; +pub const ERROR_IS_JOINED: WIN32_ERROR = 134u32; +pub const ERROR_IS_JOIN_PATH: WIN32_ERROR = 147u32; +pub const ERROR_IS_JOIN_TARGET: WIN32_ERROR = 133u32; +pub const ERROR_IS_SUBSTED: WIN32_ERROR = 135u32; +pub const ERROR_IS_SUBST_PATH: WIN32_ERROR = 146u32; +pub const ERROR_IS_SUBST_TARGET: WIN32_ERROR = 149u32; +pub const ERROR_ITERATED_DATA_EXCEEDS_64k: WIN32_ERROR = 194u32; +pub const ERROR_JOB_NO_CONTAINER: WIN32_ERROR = 1505u32; +pub const ERROR_JOIN_TO_JOIN: WIN32_ERROR = 138u32; +pub const ERROR_JOIN_TO_SUBST: WIN32_ERROR = 140u32; +pub const ERROR_JOURNAL_DELETE_IN_PROGRESS: WIN32_ERROR = 1178u32; +pub const ERROR_JOURNAL_ENTRY_DELETED: WIN32_ERROR = 1181u32; +pub const ERROR_JOURNAL_HOOK_SET: WIN32_ERROR = 1430u32; +pub const ERROR_JOURNAL_NOT_ACTIVE: WIN32_ERROR = 1179u32; +pub const ERROR_KERNEL_APC: WIN32_ERROR = 738u32; +pub const ERROR_KEY_DELETED: WIN32_ERROR = 1018u32; +pub const ERROR_KEY_DOES_NOT_EXIST: WIN32_ERROR = 3758096900u32; +pub const ERROR_KEY_HAS_CHILDREN: WIN32_ERROR = 1020u32; +pub const ERROR_KM_DRIVER_BLOCKED: WIN32_ERROR = 1930u32; +pub const ERROR_LABEL_TOO_LONG: WIN32_ERROR = 154u32; +pub const ERROR_LAPS_ENCRYPTION_REQUIRES_2016_DFL: WIN32_ERROR = 8657u32; +pub const ERROR_LAPS_LEGACY_SCHEMA_MISSING: WIN32_ERROR = 8655u32; +pub const ERROR_LAPS_SCHEMA_MISSING: WIN32_ERROR = 8656u32; +pub const ERROR_LAST_ADMIN: WIN32_ERROR = 1322u32; +pub const ERROR_LB_WITHOUT_TABSTOPS: WIN32_ERROR = 1434u32; +pub const ERROR_LIBRARY_FULL: WIN32_ERROR = 4322u32; +pub const ERROR_LIBRARY_OFFLINE: WIN32_ERROR = 4305u32; +pub const ERROR_LICENSE_QUOTA_EXCEEDED: WIN32_ERROR = 1395u32; +pub const ERROR_LINE_NOT_FOUND: WIN32_ERROR = 3758096642u32; +pub const ERROR_LINUX_SUBSYSTEM_NOT_PRESENT: WIN32_ERROR = 414u32; +pub const ERROR_LINUX_SUBSYSTEM_UPDATE_REQUIRED: WIN32_ERROR = 444u32; +pub const ERROR_LISTBOX_ID_NOT_FOUND: WIN32_ERROR = 1416u32; +pub const ERROR_LM_CROSS_ENCRYPTION_REQUIRED: WIN32_ERROR = 1390u32; +pub const ERROR_LOCAL_POLICY_MODIFICATION_NOT_SUPPORTED: WIN32_ERROR = 8653u32; +pub const ERROR_LOCAL_USER_SESSION_KEY: WIN32_ERROR = 1303u32; +pub const ERROR_LOCKED: WIN32_ERROR = 212u32; +pub const ERROR_LOCK_FAILED: WIN32_ERROR = 167u32; +pub const ERROR_LOCK_VIOLATION: WIN32_ERROR = 33u32; +pub const ERROR_LOGIN_TIME_RESTRICTION: WIN32_ERROR = 1239u32; +pub const ERROR_LOGIN_WKSTA_RESTRICTION: WIN32_ERROR = 1240u32; +pub const ERROR_LOGON_FAILURE: WIN32_ERROR = 1326u32; +pub const ERROR_LOGON_NOT_GRANTED: WIN32_ERROR = 1380u32; +pub const ERROR_LOGON_SERVER_CONFLICT: WIN32_ERROR = 568u32; +pub const ERROR_LOGON_SESSION_COLLISION: WIN32_ERROR = 1366u32; +pub const ERROR_LOGON_SESSION_EXISTS: WIN32_ERROR = 1363u32; +pub const ERROR_LOGON_TYPE_NOT_GRANTED: WIN32_ERROR = 1385u32; +pub const ERROR_LOG_APPENDED_FLUSH_FAILED: WIN32_ERROR = 6647u32; +pub const ERROR_LOG_ARCHIVE_IN_PROGRESS: WIN32_ERROR = 6633u32; +pub const ERROR_LOG_ARCHIVE_NOT_IN_PROGRESS: WIN32_ERROR = 6632u32; +pub const ERROR_LOG_BLOCKS_EXHAUSTED: WIN32_ERROR = 6605u32; +pub const ERROR_LOG_BLOCK_INCOMPLETE: WIN32_ERROR = 6603u32; +pub const ERROR_LOG_BLOCK_INVALID: WIN32_ERROR = 6609u32; +pub const ERROR_LOG_BLOCK_VERSION: WIN32_ERROR = 6608u32; +pub const ERROR_LOG_CANT_DELETE: WIN32_ERROR = 6616u32; +pub const ERROR_LOG_CLIENT_ALREADY_REGISTERED: WIN32_ERROR = 6636u32; +pub const ERROR_LOG_CLIENT_NOT_REGISTERED: WIN32_ERROR = 6637u32; +pub const ERROR_LOG_CONTAINER_LIMIT_EXCEEDED: WIN32_ERROR = 6617u32; +pub const ERROR_LOG_CONTAINER_OPEN_FAILED: WIN32_ERROR = 6641u32; +pub const ERROR_LOG_CONTAINER_READ_FAILED: WIN32_ERROR = 6639u32; +pub const ERROR_LOG_CONTAINER_STATE_INVALID: WIN32_ERROR = 6642u32; +pub const ERROR_LOG_CONTAINER_WRITE_FAILED: WIN32_ERROR = 6640u32; +pub const ERROR_LOG_CORRUPTION_DETECTED: WIN32_ERROR = 6817u32; +pub const ERROR_LOG_DEDICATED: WIN32_ERROR = 6631u32; +pub const ERROR_LOG_EPHEMERAL: WIN32_ERROR = 6634u32; +pub const ERROR_LOG_FILE_FULL: WIN32_ERROR = 1502u32; +pub const ERROR_LOG_FULL: WIN32_ERROR = 6628u32; +pub const ERROR_LOG_FULL_HANDLER_IN_PROGRESS: WIN32_ERROR = 6638u32; +pub const ERROR_LOG_GROWTH_FAILED: WIN32_ERROR = 6833u32; +pub const ERROR_LOG_HARD_ERROR: WIN32_ERROR = 718u32; +pub const ERROR_LOG_INCONSISTENT_SECURITY: WIN32_ERROR = 6646u32; +pub const ERROR_LOG_INVALID_RANGE: WIN32_ERROR = 6604u32; +pub const ERROR_LOG_METADATA_CORRUPT: WIN32_ERROR = 6612u32; +pub const ERROR_LOG_METADATA_FLUSH_FAILED: WIN32_ERROR = 6645u32; +pub const ERROR_LOG_METADATA_INCONSISTENT: WIN32_ERROR = 6614u32; +pub const ERROR_LOG_METADATA_INVALID: WIN32_ERROR = 6613u32; +pub const ERROR_LOG_MULTIPLEXED: WIN32_ERROR = 6630u32; +pub const ERROR_LOG_NOT_ENOUGH_CONTAINERS: WIN32_ERROR = 6635u32; +pub const ERROR_LOG_NO_RESTART: WIN32_ERROR = 6611u32; +pub const ERROR_LOG_PINNED: WIN32_ERROR = 6644u32; +pub const ERROR_LOG_PINNED_ARCHIVE_TAIL: WIN32_ERROR = 6623u32; +pub const ERROR_LOG_PINNED_RESERVATION: WIN32_ERROR = 6648u32; +pub const ERROR_LOG_POLICY_ALREADY_INSTALLED: WIN32_ERROR = 6619u32; +pub const ERROR_LOG_POLICY_CONFLICT: WIN32_ERROR = 6622u32; +pub const ERROR_LOG_POLICY_INVALID: WIN32_ERROR = 6621u32; +pub const ERROR_LOG_POLICY_NOT_INSTALLED: WIN32_ERROR = 6620u32; +pub const ERROR_LOG_READ_CONTEXT_INVALID: WIN32_ERROR = 6606u32; +pub const ERROR_LOG_READ_MODE_INVALID: WIN32_ERROR = 6610u32; +pub const ERROR_LOG_RECORDS_RESERVED_INVALID: WIN32_ERROR = 6625u32; +pub const ERROR_LOG_RECORD_NONEXISTENT: WIN32_ERROR = 6624u32; +pub const ERROR_LOG_RESERVATION_INVALID: WIN32_ERROR = 6615u32; +pub const ERROR_LOG_RESIZE_INVALID_SIZE: WIN32_ERROR = 6806u32; +pub const ERROR_LOG_RESTART_INVALID: WIN32_ERROR = 6607u32; +pub const ERROR_LOG_SECTOR_INVALID: WIN32_ERROR = 6600u32; +pub const ERROR_LOG_SECTOR_PARITY_INVALID: WIN32_ERROR = 6601u32; +pub const ERROR_LOG_SECTOR_REMAPPED: WIN32_ERROR = 6602u32; +pub const ERROR_LOG_SPACE_RESERVED_INVALID: WIN32_ERROR = 6626u32; +pub const ERROR_LOG_START_OF_LOG: WIN32_ERROR = 6618u32; +pub const ERROR_LOG_STATE_INVALID: WIN32_ERROR = 6643u32; +pub const ERROR_LOG_TAIL_INVALID: WIN32_ERROR = 6627u32; +pub const ERROR_LONGJUMP: WIN32_ERROR = 682u32; +pub const ERROR_LOST_MODE_LOGON_RESTRICTION: WIN32_ERROR = 1939u32; +pub const ERROR_LOST_WRITEBEHIND_DATA: WIN32_ERROR = 596u32; +pub const ERROR_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR: WIN32_ERROR = 790u32; +pub const ERROR_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED: WIN32_ERROR = 788u32; +pub const ERROR_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR: WIN32_ERROR = 789u32; +pub const ERROR_LUIDS_EXHAUSTED: WIN32_ERROR = 1334u32; +pub const ERROR_MACHINE_LOCKED: WIN32_ERROR = 1271u32; +pub const ERROR_MACHINE_SCOPE_NOT_ALLOWED: WIN32_ERROR = 15666u32; +pub const ERROR_MACHINE_UNAVAILABLE: WIN32_ERROR = 3758096930u32; +pub const ERROR_MAGAZINE_NOT_PRESENT: WIN32_ERROR = 1163u32; +pub const ERROR_MALFORMED_SUBSTITUTION_STRING: WIN32_ERROR = 14094u32; +pub const ERROR_MAPPED_ALIGNMENT: WIN32_ERROR = 1132u32; +pub const ERROR_MARKED_TO_DISALLOW_WRITES: WIN32_ERROR = 348u32; +pub const ERROR_MARSHALL_OVERFLOW: WIN32_ERROR = 603u32; +pub const ERROR_MAX_CLIENT_INTERFACE_LIMIT: u32 = 935u32; +pub const ERROR_MAX_LAN_INTERFACE_LIMIT: u32 = 933u32; +pub const ERROR_MAX_SESSIONS_REACHED: WIN32_ERROR = 353u32; +pub const ERROR_MAX_THRDS_REACHED: WIN32_ERROR = 164u32; +pub const ERROR_MAX_WAN_INTERFACE_LIMIT: u32 = 934u32; +pub const ERROR_MCA_EXCEPTION: WIN32_ERROR = 784u32; +pub const ERROR_MCA_INTERNAL_ERROR: WIN32_ERROR = 15205u32; +pub const ERROR_MCA_INVALID_CAPABILITIES_STRING: WIN32_ERROR = 15200u32; +pub const ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED: WIN32_ERROR = 15206u32; +pub const ERROR_MCA_INVALID_VCP_VERSION: WIN32_ERROR = 15201u32; +pub const ERROR_MCA_MCCS_VERSION_MISMATCH: WIN32_ERROR = 15203u32; +pub const ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION: WIN32_ERROR = 15202u32; +pub const ERROR_MCA_OCCURED: WIN32_ERROR = 651u32; +pub const ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE: WIN32_ERROR = 15207u32; +pub const ERROR_MCA_UNSUPPORTED_MCCS_VERSION: WIN32_ERROR = 15204u32; +pub const ERROR_MEDIA_CHANGED: WIN32_ERROR = 1110u32; +pub const ERROR_MEDIA_CHECK: WIN32_ERROR = 679u32; +pub const ERROR_MEDIA_INCOMPATIBLE: WIN32_ERROR = 4315u32; +pub const ERROR_MEDIA_NOT_AVAILABLE: WIN32_ERROR = 4318u32; +pub const ERROR_MEDIA_OFFLINE: WIN32_ERROR = 4304u32; +pub const ERROR_MEDIA_UNAVAILABLE: WIN32_ERROR = 4308u32; +pub const ERROR_MEDIUM_NOT_ACCESSIBLE: WIN32_ERROR = 4323u32; +pub const ERROR_MEMBERS_PRIMARY_GROUP: WIN32_ERROR = 1374u32; +pub const ERROR_MEMBER_IN_ALIAS: WIN32_ERROR = 1378u32; +pub const ERROR_MEMBER_IN_GROUP: WIN32_ERROR = 1320u32; +pub const ERROR_MEMBER_NOT_IN_ALIAS: WIN32_ERROR = 1377u32; +pub const ERROR_MEMBER_NOT_IN_GROUP: WIN32_ERROR = 1321u32; +pub const ERROR_MEMORY_HARDWARE: WIN32_ERROR = 779u32; +pub const ERROR_MENU_ITEM_NOT_FOUND: WIN32_ERROR = 1456u32; +pub const ERROR_MESSAGE_EXCEEDS_MAX_SIZE: WIN32_ERROR = 4336u32; +pub const ERROR_MESSAGE_SYNC_ONLY: WIN32_ERROR = 1159u32; +pub const ERROR_METAFILE_NOT_SUPPORTED: WIN32_ERROR = 2003u32; +pub const ERROR_META_EXPANSION_TOO_LONG: WIN32_ERROR = 208u32; +pub const ERROR_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION: WIN32_ERROR = 6810u32; +pub const ERROR_MISSING_SYSTEMFILE: WIN32_ERROR = 573u32; +pub const ERROR_MOD_NOT_FOUND: WIN32_ERROR = 126u32; +pub const ERROR_MONITOR_INVALID_DESCRIPTOR_CHECKSUM: windows_sys::core::HRESULT = 0xC0261003_u32 as _; +pub const ERROR_MONITOR_INVALID_DETAILED_TIMING_BLOCK: windows_sys::core::HRESULT = 0xC0261009_u32 as _; +pub const ERROR_MONITOR_INVALID_MANUFACTURE_DATE: windows_sys::core::HRESULT = 0xC026100A_u32 as _; +pub const ERROR_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK: windows_sys::core::HRESULT = 0xC0261006_u32 as _; +pub const ERROR_MONITOR_INVALID_STANDARD_TIMING_BLOCK: windows_sys::core::HRESULT = 0xC0261004_u32 as _; +pub const ERROR_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK: windows_sys::core::HRESULT = 0xC0261007_u32 as _; +pub const ERROR_MONITOR_NO_DESCRIPTOR: windows_sys::core::HRESULT = 0x261001_u32 as _; +pub const ERROR_MONITOR_NO_MORE_DESCRIPTOR_DATA: windows_sys::core::HRESULT = 0xC0261008_u32 as _; +pub const ERROR_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT: windows_sys::core::HRESULT = 0x261002_u32 as _; +pub const ERROR_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED: windows_sys::core::HRESULT = 0xC0261005_u32 as _; +pub const ERROR_MORE_DATA: WIN32_ERROR = 234u32; +pub const ERROR_MORE_WRITES: WIN32_ERROR = 1120u32; +pub const ERROR_MOUNT_POINT_NOT_RESOLVED: WIN32_ERROR = 649u32; +pub const ERROR_MP_PROCESSOR_MISMATCH: WIN32_ERROR = 725u32; +pub const ERROR_MRM_AUTOMERGE_ENABLED: WIN32_ERROR = 15139u32; +pub const ERROR_MRM_DIRECT_REF_TO_NON_DEFAULT_RESOURCE: WIN32_ERROR = 15146u32; +pub const ERROR_MRM_DUPLICATE_ENTRY: WIN32_ERROR = 15119u32; +pub const ERROR_MRM_DUPLICATE_MAP_NAME: WIN32_ERROR = 15118u32; +pub const ERROR_MRM_FILEPATH_TOO_LONG: WIN32_ERROR = 15121u32; +pub const ERROR_MRM_GENERATION_COUNT_MISMATCH: WIN32_ERROR = 15147u32; +pub const ERROR_MRM_INDETERMINATE_QUALIFIER_VALUE: WIN32_ERROR = 15138u32; +pub const ERROR_MRM_INVALID_FILE_TYPE: WIN32_ERROR = 15112u32; +pub const ERROR_MRM_INVALID_PRICONFIG: WIN32_ERROR = 15111u32; +pub const ERROR_MRM_INVALID_PRI_FILE: WIN32_ERROR = 15126u32; +pub const ERROR_MRM_INVALID_QUALIFIER_OPERATOR: WIN32_ERROR = 15137u32; +pub const ERROR_MRM_INVALID_QUALIFIER_VALUE: WIN32_ERROR = 15114u32; +pub const ERROR_MRM_INVALID_RESOURCE_IDENTIFIER: WIN32_ERROR = 15120u32; +pub const ERROR_MRM_MAP_NOT_FOUND: WIN32_ERROR = 15135u32; +pub const ERROR_MRM_MISSING_DEFAULT_LANGUAGE: WIN32_ERROR = 15160u32; +pub const ERROR_MRM_NAMED_RESOURCE_NOT_FOUND: WIN32_ERROR = 15127u32; +pub const ERROR_MRM_NO_CANDIDATE: WIN32_ERROR = 15115u32; +pub const ERROR_MRM_NO_CURRENT_VIEW_ON_THREAD: WIN32_ERROR = 15143u32; +pub const ERROR_MRM_NO_MATCH_OR_DEFAULT_CANDIDATE: WIN32_ERROR = 15116u32; +pub const ERROR_MRM_PACKAGE_NOT_FOUND: WIN32_ERROR = 15159u32; +pub const ERROR_MRM_RESOURCE_TYPE_MISMATCH: WIN32_ERROR = 15117u32; +pub const ERROR_MRM_RUNTIME_NO_DEFAULT_OR_NEUTRAL_RESOURCE: WIN32_ERROR = 15110u32; +pub const ERROR_MRM_SCOPE_ITEM_CONFLICT: WIN32_ERROR = 15161u32; +pub const ERROR_MRM_TOO_MANY_RESOURCES: WIN32_ERROR = 15140u32; +pub const ERROR_MRM_UNKNOWN_QUALIFIER: WIN32_ERROR = 15113u32; +pub const ERROR_MRM_UNSUPPORTED_DIRECTORY_TYPE: WIN32_ERROR = 15122u32; +pub const ERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_LOAD_UNLOAD_PRI_FILE: WIN32_ERROR = 15142u32; +pub const ERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_MERGE: WIN32_ERROR = 15141u32; +pub const ERROR_MRM_UNSUPPORTED_PROFILE_TYPE: WIN32_ERROR = 15136u32; +pub const ERROR_MR_MID_NOT_FOUND: WIN32_ERROR = 317u32; +pub const ERROR_MUI_FILE_NOT_FOUND: WIN32_ERROR = 15100u32; +pub const ERROR_MUI_FILE_NOT_LOADED: WIN32_ERROR = 15105u32; +pub const ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME: WIN32_ERROR = 15108u32; +pub const ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED: WIN32_ERROR = 15107u32; +pub const ERROR_MUI_INVALID_FILE: WIN32_ERROR = 15101u32; +pub const ERROR_MUI_INVALID_LOCALE_NAME: WIN32_ERROR = 15103u32; +pub const ERROR_MUI_INVALID_RC_CONFIG: WIN32_ERROR = 15102u32; +pub const ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME: WIN32_ERROR = 15104u32; +pub const ERROR_MULTIPLE_FAULT_VIOLATION: WIN32_ERROR = 640u32; +pub const ERROR_MUTANT_LIMIT_EXCEEDED: WIN32_ERROR = 587u32; +pub const ERROR_MUTUAL_AUTH_FAILED: WIN32_ERROR = 1397u32; +pub const ERROR_NDIS_ADAPTER_NOT_FOUND: WIN32_ERROR = 2150891526u32; +pub const ERROR_NDIS_ADAPTER_NOT_READY: WIN32_ERROR = 2150891537u32; +pub const ERROR_NDIS_ADAPTER_REMOVED: WIN32_ERROR = 2150891544u32; +pub const ERROR_NDIS_ALREADY_MAPPED: WIN32_ERROR = 2150891549u32; +pub const ERROR_NDIS_BAD_CHARACTERISTICS: WIN32_ERROR = 2150891525u32; +pub const ERROR_NDIS_BAD_VERSION: WIN32_ERROR = 2150891524u32; +pub const ERROR_NDIS_BUFFER_TOO_SHORT: WIN32_ERROR = 2150891542u32; +pub const ERROR_NDIS_DEVICE_FAILED: WIN32_ERROR = 2150891528u32; +pub const ERROR_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE: WIN32_ERROR = 2150899718u32; +pub const ERROR_NDIS_DOT11_AP_BAND_NOT_ALLOWED: WIN32_ERROR = 2150899720u32; +pub const ERROR_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE: WIN32_ERROR = 2150899717u32; +pub const ERROR_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED: WIN32_ERROR = 2150899719u32; +pub const ERROR_NDIS_DOT11_AUTO_CONFIG_ENABLED: WIN32_ERROR = 2150899712u32; +pub const ERROR_NDIS_DOT11_MEDIA_IN_USE: WIN32_ERROR = 2150899713u32; +pub const ERROR_NDIS_DOT11_POWER_STATE_INVALID: WIN32_ERROR = 2150899714u32; +pub const ERROR_NDIS_ERROR_READING_FILE: WIN32_ERROR = 2150891548u32; +pub const ERROR_NDIS_FILE_NOT_FOUND: WIN32_ERROR = 2150891547u32; +pub const ERROR_NDIS_GROUP_ADDRESS_IN_USE: WIN32_ERROR = 2150891546u32; +pub const ERROR_NDIS_INDICATION_REQUIRED: WIN32_ERROR = 3407873u32; +pub const ERROR_NDIS_INTERFACE_CLOSING: WIN32_ERROR = 2150891522u32; +pub const ERROR_NDIS_INTERFACE_NOT_FOUND: WIN32_ERROR = 2150891563u32; +pub const ERROR_NDIS_INVALID_ADDRESS: WIN32_ERROR = 2150891554u32; +pub const ERROR_NDIS_INVALID_DATA: WIN32_ERROR = 2150891541u32; +pub const ERROR_NDIS_INVALID_DEVICE_REQUEST: WIN32_ERROR = 2150891536u32; +pub const ERROR_NDIS_INVALID_LENGTH: WIN32_ERROR = 2150891540u32; +pub const ERROR_NDIS_INVALID_OID: WIN32_ERROR = 2150891543u32; +pub const ERROR_NDIS_INVALID_PACKET: WIN32_ERROR = 2150891535u32; +pub const ERROR_NDIS_INVALID_PORT: WIN32_ERROR = 2150891565u32; +pub const ERROR_NDIS_INVALID_PORT_STATE: WIN32_ERROR = 2150891566u32; +pub const ERROR_NDIS_LOW_POWER_STATE: WIN32_ERROR = 2150891567u32; +pub const ERROR_NDIS_MEDIA_DISCONNECTED: WIN32_ERROR = 2150891551u32; +pub const ERROR_NDIS_MULTICAST_EXISTS: WIN32_ERROR = 2150891530u32; +pub const ERROR_NDIS_MULTICAST_FULL: WIN32_ERROR = 2150891529u32; +pub const ERROR_NDIS_MULTICAST_NOT_FOUND: WIN32_ERROR = 2150891531u32; +pub const ERROR_NDIS_NOT_SUPPORTED: WIN32_ERROR = 2150891707u32; +pub const ERROR_NDIS_NO_QUEUES: WIN32_ERROR = 2150891569u32; +pub const ERROR_NDIS_OFFLOAD_CONNECTION_REJECTED: WIN32_ERROR = 3224637458u32; +pub const ERROR_NDIS_OFFLOAD_PATH_REJECTED: WIN32_ERROR = 3224637459u32; +pub const ERROR_NDIS_OFFLOAD_POLICY: WIN32_ERROR = 3224637455u32; +pub const ERROR_NDIS_OPEN_FAILED: WIN32_ERROR = 2150891527u32; +pub const ERROR_NDIS_PAUSED: WIN32_ERROR = 2150891562u32; +pub const ERROR_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL: WIN32_ERROR = 2150899716u32; +pub const ERROR_NDIS_PM_WOL_PATTERN_LIST_FULL: WIN32_ERROR = 2150899715u32; +pub const ERROR_NDIS_REINIT_REQUIRED: WIN32_ERROR = 2150891568u32; +pub const ERROR_NDIS_REQUEST_ABORTED: WIN32_ERROR = 2150891532u32; +pub const ERROR_NDIS_RESET_IN_PROGRESS: WIN32_ERROR = 2150891533u32; +pub const ERROR_NDIS_RESOURCE_CONFLICT: WIN32_ERROR = 2150891550u32; +pub const ERROR_NDIS_UNSUPPORTED_MEDIA: WIN32_ERROR = 2150891545u32; +pub const ERROR_NDIS_UNSUPPORTED_REVISION: WIN32_ERROR = 2150891564u32; +pub const ERROR_NEEDS_REGISTRATION: WIN32_ERROR = 15631u32; +pub const ERROR_NEEDS_REMEDIATION: WIN32_ERROR = 15612u32; +pub const ERROR_NEGATIVE_SEEK: WIN32_ERROR = 131u32; +pub const ERROR_NESTING_NOT_ALLOWED: WIN32_ERROR = 215u32; +pub const ERROR_NETLOGON_NOT_STARTED: WIN32_ERROR = 1792u32; +pub const ERROR_NETNAME_DELETED: WIN32_ERROR = 64u32; +pub const ERROR_NETWORK_ACCESS_DENIED: WIN32_ERROR = 65u32; +pub const ERROR_NETWORK_ACCESS_DENIED_EDP: WIN32_ERROR = 354u32; +pub const ERROR_NETWORK_AUTHENTICATION_PROMPT_CANCELED: WIN32_ERROR = 3024u32; +pub const ERROR_NETWORK_BUSY: WIN32_ERROR = 54u32; +pub const ERROR_NETWORK_NOT_AVAILABLE: WIN32_ERROR = 5035u32; +pub const ERROR_NETWORK_UNREACHABLE: WIN32_ERROR = 1231u32; +pub const ERROR_NET_OPEN_FAILED: WIN32_ERROR = 570u32; +pub const ERROR_NET_WRITE_FAULT: WIN32_ERROR = 88u32; +pub const ERROR_NOACCESS: WIN32_ERROR = 998u32; +pub const ERROR_NODE_CANNOT_BE_CLUSTERED: WIN32_ERROR = 5898u32; +pub const ERROR_NODE_CANT_HOST_RESOURCE: WIN32_ERROR = 5071u32; +pub const ERROR_NODE_NOT_ACTIVE_CLUSTER_MEMBER: WIN32_ERROR = 5980u32; +pub const ERROR_NODE_NOT_AVAILABLE: WIN32_ERROR = 5036u32; +pub const ERROR_NOINTERFACE: WIN32_ERROR = 632u32; +pub const ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT: WIN32_ERROR = 1807u32; +pub const ERROR_NOLOGON_SERVER_TRUST_ACCOUNT: WIN32_ERROR = 1809u32; +pub const ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT: WIN32_ERROR = 1808u32; +pub const ERROR_NONCORE_GROUPS_FOUND: WIN32_ERROR = 5937u32; +pub const ERROR_NONE_MAPPED: WIN32_ERROR = 1332u32; +pub const ERROR_NONPAGED_SYSTEM_RESOURCES: WIN32_ERROR = 1451u32; +pub const ERROR_NON_ACCOUNT_SID: WIN32_ERROR = 1257u32; +pub const ERROR_NON_CSV_PATH: WIN32_ERROR = 5950u32; +pub const ERROR_NON_DOMAIN_SID: WIN32_ERROR = 1258u32; +pub const ERROR_NON_MDICHILD_WINDOW: WIN32_ERROR = 1445u32; +pub const ERROR_NON_WINDOWS_DRIVER: WIN32_ERROR = 3758096942u32; +pub const ERROR_NON_WINDOWS_NT_DRIVER: WIN32_ERROR = 3758096941u32; +pub const ERROR_NOTHING_TO_TERMINATE: WIN32_ERROR = 758u32; +pub const ERROR_NOTIFICATION_GUID_ALREADY_DEFINED: WIN32_ERROR = 309u32; +pub const ERROR_NOTIFY_CLEANUP: WIN32_ERROR = 745u32; +pub const ERROR_NOTIFY_ENUM_DIR: WIN32_ERROR = 1022u32; +pub const ERROR_NOT_ALLOWED_ON_SYSTEM_FILE: WIN32_ERROR = 313u32; +pub const ERROR_NOT_ALL_ASSIGNED: WIN32_ERROR = 1300u32; +pub const ERROR_NOT_AN_INSTALLED_OEM_INF: WIN32_ERROR = 3758096956u32; +pub const ERROR_NOT_APPCONTAINER: WIN32_ERROR = 4250u32; +pub const ERROR_NOT_AUTHENTICATED: WIN32_ERROR = 1244u32; +pub const ERROR_NOT_A_CLOUD_FILE: WIN32_ERROR = 376u32; +pub const ERROR_NOT_A_CLOUD_SYNC_ROOT: WIN32_ERROR = 405u32; +pub const ERROR_NOT_A_DAX_VOLUME: WIN32_ERROR = 420u32; +pub const ERROR_NOT_A_DEV_VOLUME: WIN32_ERROR = 476u32; +pub const ERROR_NOT_A_REPARSE_POINT: WIN32_ERROR = 4390u32; +pub const ERROR_NOT_A_TIERED_VOLUME: windows_sys::core::HRESULT = 0x80830009_u32 as _; +pub const ERROR_NOT_CAPABLE: WIN32_ERROR = 775u32; +pub const ERROR_NOT_CHILD_WINDOW: WIN32_ERROR = 1442u32; +pub const ERROR_NOT_CLIENT_PORT: u32 = 913u32; +pub const ERROR_NOT_CONNECTED: WIN32_ERROR = 2250u32; +pub const ERROR_NOT_CONTAINER: WIN32_ERROR = 1207u32; +pub const ERROR_NOT_DAX_MAPPABLE: WIN32_ERROR = 421u32; +pub const ERROR_NOT_DISABLEABLE: WIN32_ERROR = 3758096945u32; +pub const ERROR_NOT_DOS_DISK: WIN32_ERROR = 26u32; +pub const ERROR_NOT_EMPTY: WIN32_ERROR = 4307u32; +pub const ERROR_NOT_ENOUGH_MEMORY: WIN32_ERROR = 8u32; +pub const ERROR_NOT_ENOUGH_QUOTA: WIN32_ERROR = 1816u32; +pub const ERROR_NOT_ENOUGH_SERVER_MEMORY: WIN32_ERROR = 1130u32; +pub const ERROR_NOT_EXPORT_FORMAT: WIN32_ERROR = 6008u32; +pub const ERROR_NOT_FOUND: WIN32_ERROR = 1168u32; +pub const ERROR_NOT_GUI_PROCESS: WIN32_ERROR = 1471u32; +pub const ERROR_NOT_INSTALLED: WIN32_ERROR = 3758100480u32; +pub const ERROR_NOT_JOINED: WIN32_ERROR = 136u32; +pub const ERROR_NOT_LOCKED: WIN32_ERROR = 158u32; +pub const ERROR_NOT_LOGGED_ON: WIN32_ERROR = 1245u32; +pub const ERROR_NOT_LOGON_PROCESS: WIN32_ERROR = 1362u32; +pub const ERROR_NOT_OWNER: WIN32_ERROR = 288u32; +pub const ERROR_NOT_QUORUM_CAPABLE: WIN32_ERROR = 5021u32; +pub const ERROR_NOT_QUORUM_CLASS: WIN32_ERROR = 5025u32; +pub const ERROR_NOT_READY: WIN32_ERROR = 21u32; +pub const ERROR_NOT_READ_FROM_COPY: WIN32_ERROR = 337u32; +pub const ERROR_NOT_REDUNDANT_STORAGE: WIN32_ERROR = 333u32; +pub const ERROR_NOT_REGISTRY_FILE: WIN32_ERROR = 1017u32; +pub const ERROR_NOT_ROUTER_PORT: u32 = 914u32; +pub const ERROR_NOT_SAFEBOOT_SERVICE: WIN32_ERROR = 1084u32; +pub const ERROR_NOT_SAFE_MODE_DRIVER: WIN32_ERROR = 646u32; +pub const ERROR_NOT_SAME_DEVICE: WIN32_ERROR = 17u32; +pub const ERROR_NOT_SAME_OBJECT: WIN32_ERROR = 1656u32; +pub const ERROR_NOT_SNAPSHOT_VOLUME: WIN32_ERROR = 6841u32; +pub const ERROR_NOT_SUBSTED: WIN32_ERROR = 137u32; +pub const ERROR_NOT_SUPPORTED: WIN32_ERROR = 50u32; +pub const ERROR_NOT_SUPPORTED_IN_APPCONTAINER: WIN32_ERROR = 4252u32; +pub const ERROR_NOT_SUPPORTED_ON_DAX: WIN32_ERROR = 360u32; +pub const ERROR_NOT_SUPPORTED_ON_SBS: WIN32_ERROR = 1254u32; +pub const ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER: WIN32_ERROR = 8584u32; +pub const ERROR_NOT_SUPPORTED_WITH_AUDITING: WIN32_ERROR = 499u32; +pub const ERROR_NOT_SUPPORTED_WITH_BTT: WIN32_ERROR = 429u32; +pub const ERROR_NOT_SUPPORTED_WITH_BYPASSIO: WIN32_ERROR = 493u32; +pub const ERROR_NOT_SUPPORTED_WITH_CACHED_HANDLE: WIN32_ERROR = 509u32; +pub const ERROR_NOT_SUPPORTED_WITH_COMPRESSION: WIN32_ERROR = 496u32; +pub const ERROR_NOT_SUPPORTED_WITH_DEDUPLICATION: WIN32_ERROR = 498u32; +pub const ERROR_NOT_SUPPORTED_WITH_ENCRYPTION: WIN32_ERROR = 495u32; +pub const ERROR_NOT_SUPPORTED_WITH_MONITORING: WIN32_ERROR = 503u32; +pub const ERROR_NOT_SUPPORTED_WITH_REPLICATION: WIN32_ERROR = 497u32; +pub const ERROR_NOT_SUPPORTED_WITH_SNAPSHOT: WIN32_ERROR = 504u32; +pub const ERROR_NOT_SUPPORTED_WITH_VIRTUALIZATION: WIN32_ERROR = 505u32; +pub const ERROR_NOT_TINY_STREAM: WIN32_ERROR = 598u32; +pub const ERROR_NO_ACE_CONDITION: WIN32_ERROR = 804u32; +pub const ERROR_NO_ADMIN_ACCESS_POINT: WIN32_ERROR = 5090u32; +pub const ERROR_NO_APPLICABLE_APP_LICENSES_FOUND: windows_sys::core::HRESULT = 0xC0EA0001_u32 as _; +pub const ERROR_NO_ASSOCIATED_CLASS: WIN32_ERROR = 3758096896u32; +pub const ERROR_NO_ASSOCIATED_SERVICE: WIN32_ERROR = 3758096921u32; +pub const ERROR_NO_ASSOCIATION: WIN32_ERROR = 1155u32; +pub const ERROR_NO_AUTHENTICODE_CATALOG: WIN32_ERROR = 3758096959u32; +pub const ERROR_NO_AUTH_PROTOCOL_AVAILABLE: u32 = 918u32; +pub const ERROR_NO_BACKUP: WIN32_ERROR = 3758096643u32; +pub const ERROR_NO_BROWSER_SERVERS_FOUND: WIN32_ERROR = 6118u32; +pub const ERROR_NO_BYPASSIO_DRIVER_SUPPORT: WIN32_ERROR = 494u32; +pub const ERROR_NO_CALLBACK_ACTIVE: WIN32_ERROR = 614u32; +pub const ERROR_NO_CATALOG_FOR_OEM_INF: WIN32_ERROR = 3758096943u32; +pub const ERROR_NO_CLASSINSTALL_PARAMS: WIN32_ERROR = 3758096917u32; +pub const ERROR_NO_CLASS_DRIVER_LIST: WIN32_ERROR = 3758096920u32; +pub const ERROR_NO_COMPAT_DRIVERS: WIN32_ERROR = 3758096936u32; +pub const ERROR_NO_CONFIGMGR_SERVICES: WIN32_ERROR = 3758096931u32; +pub const ERROR_NO_DATA: WIN32_ERROR = 232u32; +pub const ERROR_NO_DATA_DETECTED: WIN32_ERROR = 1104u32; +pub const ERROR_NO_DEFAULT_DEVICE_INTERFACE: WIN32_ERROR = 3758096922u32; +pub const ERROR_NO_DEFAULT_INTERFACE_DEVICE: WIN32_ERROR = 3758096922u32; +pub const ERROR_NO_DEVICE_ICON: WIN32_ERROR = 3758096937u32; +pub const ERROR_NO_DEVICE_SELECTED: WIN32_ERROR = 3758096913u32; +pub const ERROR_NO_DRIVER_SELECTED: WIN32_ERROR = 3758096899u32; +pub const ERROR_NO_EFS: WIN32_ERROR = 6004u32; +pub const ERROR_NO_EVENT_PAIR: WIN32_ERROR = 580u32; +pub const ERROR_NO_GUID_TRANSLATION: WIN32_ERROR = 560u32; +pub const ERROR_NO_IMPERSONATION_TOKEN: WIN32_ERROR = 1309u32; +pub const ERROR_NO_INF: WIN32_ERROR = 3758096906u32; +pub const ERROR_NO_INHERITANCE: WIN32_ERROR = 1391u32; +pub const ERROR_NO_INTERFACE_CREDENTIALS_SET: u32 = 909u32; +pub const ERROR_NO_LINK_TRACKING_IN_TRANSACTION: WIN32_ERROR = 6852u32; +pub const ERROR_NO_LOGON_SERVERS: WIN32_ERROR = 1311u32; +pub const ERROR_NO_LOG_SPACE: WIN32_ERROR = 1019u32; +pub const ERROR_NO_MATCH: WIN32_ERROR = 1169u32; +pub const ERROR_NO_MEDIA_IN_DRIVE: WIN32_ERROR = 1112u32; +pub const ERROR_NO_MORE_DEVICES: WIN32_ERROR = 1248u32; +pub const ERROR_NO_MORE_FILES: WIN32_ERROR = 18u32; +pub const ERROR_NO_MORE_ITEMS: WIN32_ERROR = 259u32; +pub const ERROR_NO_MORE_MATCHES: WIN32_ERROR = 626u32; +pub const ERROR_NO_MORE_SEARCH_HANDLES: WIN32_ERROR = 113u32; +pub const ERROR_NO_MORE_USER_HANDLES: WIN32_ERROR = 1158u32; +pub const ERROR_NO_NETWORK: WIN32_ERROR = 1222u32; +pub const ERROR_NO_NET_OR_BAD_PATH: WIN32_ERROR = 1203u32; +pub const ERROR_NO_NVRAM_RESOURCES: WIN32_ERROR = 1470u32; +pub const ERROR_NO_PAGEFILE: WIN32_ERROR = 578u32; +pub const ERROR_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND: WIN32_ERROR = 408u32; +pub const ERROR_NO_PROC_SLOTS: WIN32_ERROR = 89u32; +pub const ERROR_NO_PROMOTION_ACTIVE: WIN32_ERROR = 8222u32; +pub const ERROR_NO_QUOTAS_FOR_ACCOUNT: WIN32_ERROR = 1302u32; +pub const ERROR_NO_RADIUS_SERVERS: u32 = 938u32; +pub const ERROR_NO_RANGES_PROCESSED: WIN32_ERROR = 312u32; +pub const ERROR_NO_RECOVERY_POLICY: WIN32_ERROR = 6003u32; +pub const ERROR_NO_RECOVERY_PROGRAM: WIN32_ERROR = 1082u32; +pub const ERROR_NO_SAVEPOINT_WITH_OPEN_FILES: WIN32_ERROR = 6842u32; +pub const ERROR_NO_SCROLLBARS: WIN32_ERROR = 1447u32; +pub const ERROR_NO_SECRETS: WIN32_ERROR = 8620u32; +pub const ERROR_NO_SECURITY_ON_OBJECT: WIN32_ERROR = 1350u32; +pub const ERROR_NO_SHUTDOWN_IN_PROGRESS: WIN32_ERROR = 1116u32; +pub const ERROR_NO_SIGNAL_SENT: WIN32_ERROR = 205u32; +pub const ERROR_NO_SIGNATURE: u32 = 951u32; +pub const ERROR_NO_SITENAME: WIN32_ERROR = 1919u32; +pub const ERROR_NO_SITE_SETTINGS_OBJECT: WIN32_ERROR = 8619u32; +pub const ERROR_NO_SPOOL_SPACE: WIN32_ERROR = 62u32; +pub const ERROR_NO_SUCH_ALIAS: WIN32_ERROR = 1376u32; +pub const ERROR_NO_SUCH_DEVICE: WIN32_ERROR = 433u32; +pub const ERROR_NO_SUCH_DEVICE_INTERFACE: WIN32_ERROR = 3758096933u32; +pub const ERROR_NO_SUCH_DEVINST: WIN32_ERROR = 3758096907u32; +pub const ERROR_NO_SUCH_DOMAIN: WIN32_ERROR = 1355u32; +pub const ERROR_NO_SUCH_GROUP: WIN32_ERROR = 1319u32; +pub const ERROR_NO_SUCH_INTERFACE: u32 = 905u32; +pub const ERROR_NO_SUCH_INTERFACE_CLASS: WIN32_ERROR = 3758096926u32; +pub const ERROR_NO_SUCH_INTERFACE_DEVICE: WIN32_ERROR = 3758096933u32; +pub const ERROR_NO_SUCH_LOGON_SESSION: WIN32_ERROR = 1312u32; +pub const ERROR_NO_SUCH_MEMBER: WIN32_ERROR = 1387u32; +pub const ERROR_NO_SUCH_PACKAGE: WIN32_ERROR = 1364u32; +pub const ERROR_NO_SUCH_PRIVILEGE: WIN32_ERROR = 1313u32; +pub const ERROR_NO_SUCH_SITE: WIN32_ERROR = 1249u32; +pub const ERROR_NO_SUCH_USER: WIN32_ERROR = 1317u32; +pub const ERROR_NO_SUPPORTING_DRIVES: WIN32_ERROR = 4339u32; +pub const ERROR_NO_SYSTEM_MENU: WIN32_ERROR = 1437u32; +pub const ERROR_NO_SYSTEM_RESOURCES: WIN32_ERROR = 1450u32; +pub const ERROR_NO_TASK_QUEUE: WIN32_ERROR = 427u32; +pub const ERROR_NO_TOKEN: WIN32_ERROR = 1008u32; +pub const ERROR_NO_TRACKING_SERVICE: WIN32_ERROR = 1172u32; +pub const ERROR_NO_TRUST_LSA_SECRET: WIN32_ERROR = 1786u32; +pub const ERROR_NO_TRUST_SAM_ACCOUNT: WIN32_ERROR = 1787u32; +pub const ERROR_NO_TXF_METADATA: WIN32_ERROR = 6816u32; +pub const ERROR_NO_UNICODE_TRANSLATION: WIN32_ERROR = 1113u32; +pub const ERROR_NO_USER_KEYS: WIN32_ERROR = 6006u32; +pub const ERROR_NO_USER_SESSION_KEY: WIN32_ERROR = 1394u32; +pub const ERROR_NO_VOLUME_ID: WIN32_ERROR = 1173u32; +pub const ERROR_NO_VOLUME_LABEL: WIN32_ERROR = 125u32; +pub const ERROR_NO_WILDCARD_CHARACTERS: WIN32_ERROR = 1417u32; +pub const ERROR_NO_WORK_DONE: WIN32_ERROR = 235u32; +pub const ERROR_NO_WRITABLE_DC_FOUND: WIN32_ERROR = 8621u32; +pub const ERROR_NO_YIELD_PERFORMED: WIN32_ERROR = 721u32; +pub const ERROR_NTLM_BLOCKED: WIN32_ERROR = 1937u32; +pub const ERROR_NT_CROSS_ENCRYPTION_REQUIRED: WIN32_ERROR = 1386u32; +pub const ERROR_NULL_LM_PASSWORD: WIN32_ERROR = 1304u32; +pub const ERROR_OBJECT_ALREADY_EXISTS: WIN32_ERROR = 5010u32; +pub const ERROR_OBJECT_IN_LIST: WIN32_ERROR = 5011u32; +pub const ERROR_OBJECT_IS_IMMUTABLE: WIN32_ERROR = 4449u32; +pub const ERROR_OBJECT_NAME_EXISTS: WIN32_ERROR = 698u32; +pub const ERROR_OBJECT_NOT_EXTERNALLY_BACKED: WIN32_ERROR = 342u32; +pub const ERROR_OBJECT_NOT_FOUND: WIN32_ERROR = 4312u32; +pub const ERROR_OBJECT_NO_LONGER_EXISTS: WIN32_ERROR = 6807u32; +pub const ERROR_OFFLOAD_READ_FILE_NOT_SUPPORTED: WIN32_ERROR = 4442u32; +pub const ERROR_OFFLOAD_READ_FLT_NOT_SUPPORTED: WIN32_ERROR = 4440u32; +pub const ERROR_OFFLOAD_WRITE_FILE_NOT_SUPPORTED: WIN32_ERROR = 4443u32; +pub const ERROR_OFFLOAD_WRITE_FLT_NOT_SUPPORTED: WIN32_ERROR = 4441u32; +pub const ERROR_OFFSET_ALIGNMENT_VIOLATION: WIN32_ERROR = 327u32; +pub const ERROR_OLD_WIN_VERSION: WIN32_ERROR = 1150u32; +pub const ERROR_ONLY_IF_CONNECTED: WIN32_ERROR = 1251u32; +pub const ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE: WIN32_ERROR = 3758096965u32; +pub const ERROR_OPEN_FAILED: WIN32_ERROR = 110u32; +pub const ERROR_OPEN_FILES: WIN32_ERROR = 2401u32; +pub const ERROR_OPERATION_ABORTED: WIN32_ERROR = 995u32; +pub const ERROR_OPERATION_IN_PROGRESS: WIN32_ERROR = 329u32; +pub const ERROR_OPERATION_NOT_ALLOWED_FROM_SYSTEM_COMPONENT: WIN32_ERROR = 15145u32; +pub const ERROR_OPERATION_NOT_SUPPORTED_IN_TRANSACTION: WIN32_ERROR = 6853u32; +pub const ERROR_OPLOCK_BREAK_IN_PROGRESS: WIN32_ERROR = 742u32; +pub const ERROR_OPLOCK_HANDLE_CLOSED: WIN32_ERROR = 803u32; +pub const ERROR_OPLOCK_NOT_GRANTED: WIN32_ERROR = 300u32; +pub const ERROR_OPLOCK_SWITCHED_TO_NEW_HANDLE: WIN32_ERROR = 800u32; +pub const ERROR_ORPHAN_NAME_EXHAUSTED: WIN32_ERROR = 799u32; +pub const ERROR_OUTOFMEMORY: WIN32_ERROR = 14u32; +pub const ERROR_OUT_OF_PAPER: WIN32_ERROR = 28u32; +pub const ERROR_OUT_OF_STRUCTURES: WIN32_ERROR = 84u32; +pub const ERROR_OVERRIDE_NOCHANGES: WIN32_ERROR = 1252u32; +pub const ERROR_PACKAGED_SERVICE_REQUIRES_ADMIN_PRIVILEGES: WIN32_ERROR = 15656u32; +pub const ERROR_PACKAGES_IN_USE: WIN32_ERROR = 15618u32; +pub const ERROR_PACKAGES_REPUTATION_CHECK_FAILED: WIN32_ERROR = 15643u32; +pub const ERROR_PACKAGES_REPUTATION_CHECK_TIMEDOUT: WIN32_ERROR = 15644u32; +pub const ERROR_PACKAGE_ALREADY_EXISTS: WIN32_ERROR = 15611u32; +pub const ERROR_PACKAGE_EXTERNAL_LOCATION_NOT_ALLOWED: WIN32_ERROR = 15662u32; +pub const ERROR_PACKAGE_LACKS_CAPABILITY_FOR_MANDATORY_STARTUPTASKS: WIN32_ERROR = 15664u32; +pub const ERROR_PACKAGE_LACKS_CAPABILITY_TO_DEPLOY_ON_HOST: WIN32_ERROR = 15658u32; +pub const ERROR_PACKAGE_MOVE_BLOCKED_BY_STREAMING: WIN32_ERROR = 15636u32; +pub const ERROR_PACKAGE_MOVE_FAILED: WIN32_ERROR = 15627u32; +pub const ERROR_PACKAGE_NAME_MISMATCH: WIN32_ERROR = 15670u32; +pub const ERROR_PACKAGE_NOT_REGISTERED_FOR_USER: WIN32_ERROR = 15669u32; +pub const ERROR_PACKAGE_NOT_SUPPORTED_ON_FILESYSTEM: WIN32_ERROR = 15635u32; +pub const ERROR_PACKAGE_REPOSITORY_CORRUPTED: WIN32_ERROR = 15614u32; +pub const ERROR_PACKAGE_STAGING_ONHOLD: WIN32_ERROR = 15638u32; +pub const ERROR_PACKAGE_UPDATING: WIN32_ERROR = 15616u32; +pub const ERROR_PAGED_SYSTEM_RESOURCES: WIN32_ERROR = 1452u32; +pub const ERROR_PAGEFILE_CREATE_FAILED: WIN32_ERROR = 576u32; +pub const ERROR_PAGEFILE_NOT_SUPPORTED: WIN32_ERROR = 491u32; +pub const ERROR_PAGEFILE_QUOTA: WIN32_ERROR = 1454u32; +pub const ERROR_PAGEFILE_QUOTA_EXCEEDED: WIN32_ERROR = 567u32; +pub const ERROR_PAGE_FAULT_COPY_ON_WRITE: WIN32_ERROR = 749u32; +pub const ERROR_PAGE_FAULT_DEMAND_ZERO: WIN32_ERROR = 748u32; +pub const ERROR_PAGE_FAULT_GUARD_PAGE: WIN32_ERROR = 750u32; +pub const ERROR_PAGE_FAULT_PAGING_FILE: WIN32_ERROR = 751u32; +pub const ERROR_PAGE_FAULT_TRANSITION: WIN32_ERROR = 747u32; +pub const ERROR_PARAMETER_QUOTA_EXCEEDED: WIN32_ERROR = 1283u32; +pub const ERROR_PARTIAL_COPY: WIN32_ERROR = 299u32; +pub const ERROR_PARTITION_FAILURE: WIN32_ERROR = 1105u32; +pub const ERROR_PARTITION_TERMINATING: WIN32_ERROR = 1184u32; +pub const ERROR_PASSWORD_CHANGE_REQUIRED: WIN32_ERROR = 1938u32; +pub const ERROR_PASSWORD_EXPIRED: WIN32_ERROR = 1330u32; +pub const ERROR_PASSWORD_MUST_CHANGE: WIN32_ERROR = 1907u32; +pub const ERROR_PASSWORD_RESTRICTION: WIN32_ERROR = 1325u32; +pub const ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT: WIN32_ERROR = 1651u32; +pub const ERROR_PATCH_NO_SEQUENCE: WIN32_ERROR = 1648u32; +pub const ERROR_PATCH_PACKAGE_INVALID: WIN32_ERROR = 1636u32; +pub const ERROR_PATCH_PACKAGE_OPEN_FAILED: WIN32_ERROR = 1635u32; +pub const ERROR_PATCH_PACKAGE_REJECTED: WIN32_ERROR = 1643u32; +pub const ERROR_PATCH_PACKAGE_UNSUPPORTED: WIN32_ERROR = 1637u32; +pub const ERROR_PATCH_REMOVAL_DISALLOWED: WIN32_ERROR = 1649u32; +pub const ERROR_PATCH_REMOVAL_UNSUPPORTED: WIN32_ERROR = 1646u32; +pub const ERROR_PATCH_TARGET_NOT_FOUND: WIN32_ERROR = 1642u32; +pub const ERROR_PATH_BUSY: WIN32_ERROR = 148u32; +pub const ERROR_PATH_NOT_FOUND: WIN32_ERROR = 3u32; +pub const ERROR_PEER_REFUSED_AUTH: u32 = 919u32; +pub const ERROR_PER_USER_TRUST_QUOTA_EXCEEDED: WIN32_ERROR = 1932u32; +pub const ERROR_PIPE_BUSY: WIN32_ERROR = 231u32; +pub const ERROR_PIPE_CONNECTED: WIN32_ERROR = 535u32; +pub const ERROR_PIPE_LISTENING: WIN32_ERROR = 536u32; +pub const ERROR_PIPE_LOCAL: WIN32_ERROR = 229u32; +pub const ERROR_PIPE_NOT_CONNECTED: WIN32_ERROR = 233u32; +pub const ERROR_PKINIT_FAILURE: WIN32_ERROR = 1263u32; +pub const ERROR_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND: WIN32_ERROR = 4574u32; +pub const ERROR_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED: WIN32_ERROR = 4573u32; +pub const ERROR_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED: WIN32_ERROR = 4572u32; +pub const ERROR_PLATFORM_MANIFEST_INVALID: WIN32_ERROR = 4571u32; +pub const ERROR_PLATFORM_MANIFEST_NOT_ACTIVE: WIN32_ERROR = 4575u32; +pub const ERROR_PLATFORM_MANIFEST_NOT_AUTHORIZED: WIN32_ERROR = 4570u32; +pub const ERROR_PLATFORM_MANIFEST_NOT_SIGNED: WIN32_ERROR = 4576u32; +pub const ERROR_PLUGPLAY_QUERY_VETOED: WIN32_ERROR = 683u32; +pub const ERROR_PNP_BAD_MPS_TABLE: WIN32_ERROR = 671u32; +pub const ERROR_PNP_INVALID_ID: WIN32_ERROR = 674u32; +pub const ERROR_PNP_IRQ_TRANSLATION_FAILED: WIN32_ERROR = 673u32; +pub const ERROR_PNP_QUERY_REMOVE_DEVICE_TIMEOUT: WIN32_ERROR = 480u32; +pub const ERROR_PNP_QUERY_REMOVE_RELATED_DEVICE_TIMEOUT: WIN32_ERROR = 481u32; +pub const ERROR_PNP_QUERY_REMOVE_UNRELATED_DEVICE_TIMEOUT: WIN32_ERROR = 482u32; +pub const ERROR_PNP_REBOOT_REQUIRED: WIN32_ERROR = 638u32; +pub const ERROR_PNP_REGISTRY_ERROR: WIN32_ERROR = 3758096954u32; +pub const ERROR_PNP_RESTART_ENUMERATION: WIN32_ERROR = 636u32; +pub const ERROR_PNP_TRANSLATION_FAILED: WIN32_ERROR = 672u32; +pub const ERROR_POINT_NOT_FOUND: WIN32_ERROR = 1171u32; +pub const ERROR_POLICY_CONTROLLED_ACCOUNT: WIN32_ERROR = 8654u32; +pub const ERROR_POLICY_OBJECT_NOT_FOUND: WIN32_ERROR = 8219u32; +pub const ERROR_POLICY_ONLY_IN_DS: WIN32_ERROR = 8220u32; +pub const ERROR_POPUP_ALREADY_ACTIVE: WIN32_ERROR = 1446u32; +pub const ERROR_PORT_LIMIT_REACHED: u32 = 931u32; +pub const ERROR_PORT_MESSAGE_TOO_LONG: WIN32_ERROR = 546u32; +pub const ERROR_PORT_NOT_SET: WIN32_ERROR = 642u32; +pub const ERROR_PORT_UNREACHABLE: WIN32_ERROR = 1234u32; +pub const ERROR_POSSIBLE_DEADLOCK: WIN32_ERROR = 1131u32; +pub const ERROR_POTENTIAL_FILE_FOUND: WIN32_ERROR = 1180u32; +pub const ERROR_PPP_SESSION_TIMEOUT: u32 = 932u32; +pub const ERROR_PREDEFINED_HANDLE: WIN32_ERROR = 714u32; +pub const ERROR_PRIMARY_TRANSPORT_CONNECT_FAILED: WIN32_ERROR = 746u32; +pub const ERROR_PRINTER_ALREADY_EXISTS: WIN32_ERROR = 1802u32; +pub const ERROR_PRINTER_DELETED: WIN32_ERROR = 1905u32; +pub const ERROR_PRINTER_DRIVER_ALREADY_INSTALLED: WIN32_ERROR = 1795u32; +pub const ERROR_PRINTER_DRIVER_BLOCKED: WIN32_ERROR = 3014u32; +pub const ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED: WIN32_ERROR = 3019u32; +pub const ERROR_PRINTER_DRIVER_IN_USE: WIN32_ERROR = 3001u32; +pub const ERROR_PRINTER_DRIVER_PACKAGE_IN_USE: WIN32_ERROR = 3015u32; +pub const ERROR_PRINTER_DRIVER_WARNED: WIN32_ERROR = 3013u32; +pub const ERROR_PRINTER_HAS_JOBS_QUEUED: WIN32_ERROR = 3009u32; +pub const ERROR_PRINTER_NOT_FOUND: WIN32_ERROR = 3012u32; +pub const ERROR_PRINTER_NOT_SHAREABLE: WIN32_ERROR = 3022u32; +pub const ERROR_PRINTQ_FULL: WIN32_ERROR = 61u32; +pub const ERROR_PRINT_CANCELLED: WIN32_ERROR = 63u32; +pub const ERROR_PRINT_JOB_RESTART_REQUIRED: WIN32_ERROR = 3020u32; +pub const ERROR_PRINT_MONITOR_ALREADY_INSTALLED: WIN32_ERROR = 3006u32; +pub const ERROR_PRINT_MONITOR_IN_USE: WIN32_ERROR = 3008u32; +pub const ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED: WIN32_ERROR = 3005u32; +pub const ERROR_PRIVATE_DIALOG_INDEX: WIN32_ERROR = 1415u32; +pub const ERROR_PRIVILEGE_NOT_HELD: WIN32_ERROR = 1314u32; +pub const ERROR_PRI_MERGE_ADD_FILE_FAILED: WIN32_ERROR = 15151u32; +pub const ERROR_PRI_MERGE_BUNDLE_PACKAGES_NOT_ALLOWED: WIN32_ERROR = 15155u32; +pub const ERROR_PRI_MERGE_INVALID_FILE_NAME: WIN32_ERROR = 15158u32; +pub const ERROR_PRI_MERGE_LOAD_FILE_FAILED: WIN32_ERROR = 15150u32; +pub const ERROR_PRI_MERGE_MAIN_PACKAGE_REQUIRED: WIN32_ERROR = 15156u32; +pub const ERROR_PRI_MERGE_MISSING_SCHEMA: WIN32_ERROR = 15149u32; +pub const ERROR_PRI_MERGE_MULTIPLE_MAIN_PACKAGES_NOT_ALLOWED: WIN32_ERROR = 15154u32; +pub const ERROR_PRI_MERGE_MULTIPLE_PACKAGE_FAMILIES_NOT_ALLOWED: WIN32_ERROR = 15153u32; +pub const ERROR_PRI_MERGE_RESOURCE_PACKAGE_REQUIRED: WIN32_ERROR = 15157u32; +pub const ERROR_PRI_MERGE_VERSION_MISMATCH: WIN32_ERROR = 15148u32; +pub const ERROR_PRI_MERGE_WRITE_FILE_FAILED: WIN32_ERROR = 15152u32; +pub const ERROR_PROCESS_ABORTED: WIN32_ERROR = 1067u32; +pub const ERROR_PROCESS_IN_JOB: WIN32_ERROR = 760u32; +pub const ERROR_PROCESS_IS_PROTECTED: WIN32_ERROR = 1293u32; +pub const ERROR_PROCESS_MODE_ALREADY_BACKGROUND: WIN32_ERROR = 402u32; +pub const ERROR_PROCESS_MODE_NOT_BACKGROUND: WIN32_ERROR = 403u32; +pub const ERROR_PROCESS_NOT_IN_JOB: WIN32_ERROR = 759u32; +pub const ERROR_PROC_NOT_FOUND: WIN32_ERROR = 127u32; +pub const ERROR_PRODUCT_UNINSTALLED: WIN32_ERROR = 1614u32; +pub const ERROR_PRODUCT_VERSION: WIN32_ERROR = 1638u32; +pub const ERROR_PROFILE_DOES_NOT_MATCH_DEVICE: WIN32_ERROR = 2023u32; +pub const ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE: WIN32_ERROR = 2015u32; +pub const ERROR_PROFILE_NOT_FOUND: WIN32_ERROR = 2016u32; +pub const ERROR_PROFILING_AT_LIMIT: WIN32_ERROR = 553u32; +pub const ERROR_PROFILING_NOT_STARTED: WIN32_ERROR = 550u32; +pub const ERROR_PROFILING_NOT_STOPPED: WIN32_ERROR = 551u32; +pub const ERROR_PROMOTION_ACTIVE: WIN32_ERROR = 8221u32; +pub const ERROR_PROTOCOL_ALREADY_INSTALLED: u32 = 948u32; +pub const ERROR_PROTOCOL_STOP_PENDING: u32 = 907u32; +pub const ERROR_PROTOCOL_UNREACHABLE: WIN32_ERROR = 1233u32; +pub const ERROR_PROVISION_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE_PROVISIONED: WIN32_ERROR = 15642u32; +pub const ERROR_PWD_HISTORY_CONFLICT: WIN32_ERROR = 617u32; +pub const ERROR_PWD_TOO_LONG: WIN32_ERROR = 657u32; +pub const ERROR_PWD_TOO_RECENT: WIN32_ERROR = 616u32; +pub const ERROR_PWD_TOO_SHORT: WIN32_ERROR = 615u32; +pub const ERROR_QUERY_STORAGE_ERROR: WIN32_ERROR = 2151284737u32; +pub const ERROR_QUIC_ALPN_NEG_FAILURE: windows_sys::core::HRESULT = 0x80410007_u32 as _; +pub const ERROR_QUIC_CONNECTION_IDLE: windows_sys::core::HRESULT = 0x80410005_u32 as _; +pub const ERROR_QUIC_CONNECTION_TIMEOUT: windows_sys::core::HRESULT = 0x80410006_u32 as _; +pub const ERROR_QUIC_HANDSHAKE_FAILURE: windows_sys::core::HRESULT = 0x80410000_u32 as _; +pub const ERROR_QUIC_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80410003_u32 as _; +pub const ERROR_QUIC_PROTOCOL_VIOLATION: windows_sys::core::HRESULT = 0x80410004_u32 as _; +pub const ERROR_QUIC_USER_CANCELED: windows_sys::core::HRESULT = 0x80410002_u32 as _; +pub const ERROR_QUIC_VER_NEG_FAILURE: windows_sys::core::HRESULT = 0x80410001_u32 as _; +pub const ERROR_QUORUMLOG_OPEN_FAILED: WIN32_ERROR = 5028u32; +pub const ERROR_QUORUM_DISK_NOT_FOUND: WIN32_ERROR = 5086u32; +pub const ERROR_QUORUM_NOT_ALLOWED_IN_THIS_GROUP: WIN32_ERROR = 5928u32; +pub const ERROR_QUORUM_OWNER_ALIVE: WIN32_ERROR = 5034u32; +pub const ERROR_QUORUM_RESOURCE: WIN32_ERROR = 5020u32; +pub const ERROR_QUORUM_RESOURCE_ONLINE_FAILED: WIN32_ERROR = 5027u32; +pub const ERROR_QUOTA_ACTIVITY: WIN32_ERROR = 810u32; +pub const ERROR_QUOTA_LIST_INCONSISTENT: WIN32_ERROR = 621u32; +pub const ERROR_RANGE_LIST_CONFLICT: WIN32_ERROR = 627u32; +pub const ERROR_RANGE_NOT_FOUND: WIN32_ERROR = 644u32; +pub const ERROR_RDP_PROTOCOL_ERROR: WIN32_ERROR = 7065u32; +pub const ERROR_READ_FAULT: WIN32_ERROR = 30u32; +pub const ERROR_RECEIVE_EXPEDITED: WIN32_ERROR = 708u32; +pub const ERROR_RECEIVE_PARTIAL: WIN32_ERROR = 707u32; +pub const ERROR_RECEIVE_PARTIAL_EXPEDITED: WIN32_ERROR = 709u32; +pub const ERROR_RECOVERY_FAILURE: WIN32_ERROR = 1279u32; +pub const ERROR_RECOVERY_FILE_CORRUPT: WIN32_ERROR = 15619u32; +pub const ERROR_RECOVERY_NOT_NEEDED: WIN32_ERROR = 6821u32; +pub const ERROR_REC_NON_EXISTENT: WIN32_ERROR = 4005u32; +pub const ERROR_REDIRECTION_TO_DEFAULT_ACCOUNT_NOT_ALLOWED: WIN32_ERROR = 15657u32; +pub const ERROR_REDIRECTOR_HAS_OPEN_HANDLES: WIN32_ERROR = 1794u32; +pub const ERROR_REDIR_PAUSED: WIN32_ERROR = 72u32; +pub const ERROR_REGISTRATION_FROM_REMOTE_DRIVE_NOT_SUPPORTED: WIN32_ERROR = 15647u32; +pub const ERROR_REGISTRY_CORRUPT: WIN32_ERROR = 1015u32; +pub const ERROR_REGISTRY_HIVE_RECOVERED: WIN32_ERROR = 685u32; +pub const ERROR_REGISTRY_IO_FAILED: WIN32_ERROR = 1016u32; +pub const ERROR_REGISTRY_QUOTA_LIMIT: WIN32_ERROR = 613u32; +pub const ERROR_REGISTRY_RECOVERED: WIN32_ERROR = 1014u32; +pub const ERROR_REG_NAT_CONSUMPTION: WIN32_ERROR = 1261u32; +pub const ERROR_RELOC_CHAIN_XEEDS_SEGLIM: WIN32_ERROR = 201u32; +pub const ERROR_REMOTEACCESS_NOT_CONFIGURED: u32 = 956u32; +pub const ERROR_REMOTE_ACCT_DISABLED: u32 = 922u32; +pub const ERROR_REMOTE_AUTHENTICATION_FAILURE: u32 = 924u32; +pub const ERROR_REMOTE_COMM_FAILURE: WIN32_ERROR = 3758096929u32; +pub const ERROR_REMOTE_FILE_VERSION_MISMATCH: WIN32_ERROR = 6814u32; +pub const ERROR_REMOTE_NO_DIALIN_PERMISSION: u32 = 920u32; +pub const ERROR_REMOTE_PASSWD_EXPIRED: u32 = 921u32; +pub const ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED: WIN32_ERROR = 1936u32; +pub const ERROR_REMOTE_REQUEST_UNSUPPORTED: WIN32_ERROR = 3758096955u32; +pub const ERROR_REMOTE_RESTRICTED_LOGON_HOURS: u32 = 923u32; +pub const ERROR_REMOTE_SESSION_LIMIT_EXCEEDED: WIN32_ERROR = 1220u32; +pub const ERROR_REMOTE_STORAGE_MEDIA_ERROR: WIN32_ERROR = 4352u32; +pub const ERROR_REMOTE_STORAGE_NOT_ACTIVE: WIN32_ERROR = 4351u32; +pub const ERROR_REMOVE_FAILED: WIN32_ERROR = 15610u32; +pub const ERROR_REM_NOT_LIST: WIN32_ERROR = 51u32; +pub const ERROR_REPARSE: WIN32_ERROR = 741u32; +pub const ERROR_REPARSE_ATTRIBUTE_CONFLICT: WIN32_ERROR = 4391u32; +pub const ERROR_REPARSE_OBJECT: WIN32_ERROR = 755u32; +pub const ERROR_REPARSE_POINT_ENCOUNTERED: WIN32_ERROR = 4395u32; +pub const ERROR_REPARSE_TAG_INVALID: WIN32_ERROR = 4393u32; +pub const ERROR_REPARSE_TAG_MISMATCH: WIN32_ERROR = 4394u32; +pub const ERROR_REPLY_MESSAGE_MISMATCH: WIN32_ERROR = 595u32; +pub const ERROR_REQUEST_ABORTED: WIN32_ERROR = 1235u32; +pub const ERROR_REQUEST_OUT_OF_SEQUENCE: WIN32_ERROR = 776u32; +pub const ERROR_REQUEST_PAUSED: WIN32_ERROR = 3050u32; +pub const ERROR_REQUEST_REFUSED: WIN32_ERROR = 4320u32; +pub const ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION: WIN32_ERROR = 1459u32; +pub const ERROR_REQ_NOT_ACCEP: WIN32_ERROR = 71u32; +pub const ERROR_RESIDENT_FILE_NOT_SUPPORTED: WIN32_ERROR = 334u32; +pub const ERROR_RESILIENCY_FILE_CORRUPT: WIN32_ERROR = 15625u32; +pub const ERROR_RESMON_CREATE_FAILED: WIN32_ERROR = 5017u32; +pub const ERROR_RESMON_INVALID_STATE: WIN32_ERROR = 5084u32; +pub const ERROR_RESMON_ONLINE_FAILED: WIN32_ERROR = 5018u32; +pub const ERROR_RESMON_SYSTEM_RESOURCES_LACKING: WIN32_ERROR = 5956u32; +pub const ERROR_RESOURCEMANAGER_NOT_FOUND: WIN32_ERROR = 6716u32; +pub const ERROR_RESOURCEMANAGER_READ_ONLY: WIN32_ERROR = 6707u32; +pub const ERROR_RESOURCE_CALL_TIMED_OUT: WIN32_ERROR = 5910u32; +pub const ERROR_RESOURCE_DATA_NOT_FOUND: WIN32_ERROR = 1812u32; +pub const ERROR_RESOURCE_DISABLED: WIN32_ERROR = 4309u32; +pub const ERROR_RESOURCE_ENUM_USER_STOP: WIN32_ERROR = 15106u32; +pub const ERROR_RESOURCE_FAILED: WIN32_ERROR = 5038u32; +pub const ERROR_RESOURCE_LANG_NOT_FOUND: WIN32_ERROR = 1815u32; +pub const ERROR_RESOURCE_NAME_NOT_FOUND: WIN32_ERROR = 1814u32; +pub const ERROR_RESOURCE_NOT_AVAILABLE: WIN32_ERROR = 5006u32; +pub const ERROR_RESOURCE_NOT_FOUND: WIN32_ERROR = 5007u32; +pub const ERROR_RESOURCE_NOT_IN_AVAILABLE_STORAGE: WIN32_ERROR = 5965u32; +pub const ERROR_RESOURCE_NOT_ONLINE: WIN32_ERROR = 5004u32; +pub const ERROR_RESOURCE_NOT_PRESENT: WIN32_ERROR = 4316u32; +pub const ERROR_RESOURCE_ONLINE: WIN32_ERROR = 5019u32; +pub const ERROR_RESOURCE_PROPERTIES_STORED: WIN32_ERROR = 5024u32; +pub const ERROR_RESOURCE_PROPERTY_UNCHANGEABLE: WIN32_ERROR = 5089u32; +pub const ERROR_RESOURCE_REQUIREMENTS_CHANGED: WIN32_ERROR = 756u32; +pub const ERROR_RESOURCE_TYPE_NOT_FOUND: WIN32_ERROR = 1813u32; +pub const ERROR_RESTART_APPLICATION: WIN32_ERROR = 1467u32; +pub const ERROR_RESUME_HIBERNATION: WIN32_ERROR = 727u32; +pub const ERROR_RETRY: WIN32_ERROR = 1237u32; +pub const ERROR_RETURN_ADDRESS_HIJACK_ATTEMPT: WIN32_ERROR = 1662u32; +pub const ERROR_REVISION_MISMATCH: WIN32_ERROR = 1306u32; +pub const ERROR_RING2SEG_MUST_BE_MOVABLE: WIN32_ERROR = 200u32; +pub const ERROR_RING2_STACK_IN_USE: WIN32_ERROR = 207u32; +pub const ERROR_RMODE_APP: WIN32_ERROR = 1153u32; +pub const ERROR_RM_ALREADY_STARTED: WIN32_ERROR = 6822u32; +pub const ERROR_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT: WIN32_ERROR = 6728u32; +pub const ERROR_RM_DISCONNECTED: WIN32_ERROR = 6819u32; +pub const ERROR_RM_METADATA_CORRUPT: WIN32_ERROR = 6802u32; +pub const ERROR_RM_NOT_ACTIVE: WIN32_ERROR = 6801u32; +pub const ERROR_ROLLBACK_TIMER_EXPIRED: WIN32_ERROR = 6829u32; +pub const ERROR_ROUTER_CONFIG_INCOMPATIBLE: u32 = 945u32; +pub const ERROR_ROUTER_STOPPED: u32 = 900u32; +pub const ERROR_ROWSNOTRELEASED: WIN32_ERROR = 772u32; +pub const ERROR_RPL_NOT_ALLOWED: WIN32_ERROR = 4006u32; +pub const ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT: WIN32_ERROR = 15403u32; +pub const ERROR_RUNLEVEL_SWITCH_IN_PROGRESS: WIN32_ERROR = 15404u32; +pub const ERROR_RUNLEVEL_SWITCH_TIMEOUT: WIN32_ERROR = 15402u32; +pub const ERROR_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED: WIN32_ERROR = 410u32; +pub const ERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET: WIN32_ERROR = 411u32; +pub const ERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE: WIN32_ERROR = 412u32; +pub const ERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER: WIN32_ERROR = 413u32; +pub const ERROR_RXACT_COMMITTED: WIN32_ERROR = 744u32; +pub const ERROR_RXACT_COMMIT_FAILURE: WIN32_ERROR = 1370u32; +pub const ERROR_RXACT_COMMIT_NECESSARY: WIN32_ERROR = 678u32; +pub const ERROR_RXACT_INVALID_STATE: WIN32_ERROR = 1369u32; +pub const ERROR_RXACT_STATE_CREATED: WIN32_ERROR = 701u32; +pub const ERROR_SAME_DRIVE: WIN32_ERROR = 143u32; +pub const ERROR_SAM_INIT_FAILURE: WIN32_ERROR = 8541u32; +pub const ERROR_SCE_DISABLED: WIN32_ERROR = 3758096952u32; +pub const ERROR_SCOPE_NOT_FOUND: WIN32_ERROR = 318u32; +pub const ERROR_SCREEN_ALREADY_LOCKED: WIN32_ERROR = 1440u32; +pub const ERROR_SCRUB_DATA_DISABLED: WIN32_ERROR = 332u32; +pub const ERROR_SECCORE_INVALID_COMMAND: windows_sys::core::HRESULT = 0xC0E80000_u32 as _; +pub const ERROR_SECONDARY_IC_PROVIDER_NOT_REGISTERED: WIN32_ERROR = 15321u32; +pub const ERROR_SECRET_TOO_LONG: WIN32_ERROR = 1382u32; +pub const ERROR_SECTION_DIRECT_MAP_ONLY: WIN32_ERROR = 819u32; +pub const ERROR_SECTION_NAME_TOO_LONG: WIN32_ERROR = 3758096386u32; +pub const ERROR_SECTION_NOT_FOUND: WIN32_ERROR = 3758096641u32; +pub const ERROR_SECTOR_NOT_FOUND: WIN32_ERROR = 27u32; +pub const ERROR_SECUREBOOT_FILE_REPLACED: WIN32_ERROR = 4426u32; +pub const ERROR_SECUREBOOT_INVALID_POLICY: WIN32_ERROR = 4422u32; +pub const ERROR_SECUREBOOT_NOT_BASE_POLICY: WIN32_ERROR = 4434u32; +pub const ERROR_SECUREBOOT_NOT_ENABLED: WIN32_ERROR = 4425u32; +pub const ERROR_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY: WIN32_ERROR = 4435u32; +pub const ERROR_SECUREBOOT_PLATFORM_ID_MISMATCH: WIN32_ERROR = 4430u32; +pub const ERROR_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION: WIN32_ERROR = 4429u32; +pub const ERROR_SECUREBOOT_POLICY_NOT_AUTHORIZED: WIN32_ERROR = 4427u32; +pub const ERROR_SECUREBOOT_POLICY_NOT_SIGNED: WIN32_ERROR = 4424u32; +pub const ERROR_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND: WIN32_ERROR = 4423u32; +pub const ERROR_SECUREBOOT_POLICY_ROLLBACK_DETECTED: WIN32_ERROR = 4431u32; +pub const ERROR_SECUREBOOT_POLICY_UNKNOWN: WIN32_ERROR = 4428u32; +pub const ERROR_SECUREBOOT_POLICY_UPGRADE_MISMATCH: WIN32_ERROR = 4432u32; +pub const ERROR_SECUREBOOT_POLICY_VIOLATION: WIN32_ERROR = 4421u32; +pub const ERROR_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING: WIN32_ERROR = 4433u32; +pub const ERROR_SECUREBOOT_ROLLBACK_DETECTED: WIN32_ERROR = 4420u32; +pub const ERROR_SECURITY_DENIES_OPERATION: WIN32_ERROR = 447u32; +pub const ERROR_SECURITY_STREAM_IS_INCONSISTENT: WIN32_ERROR = 306u32; +pub const ERROR_SEEK: WIN32_ERROR = 25u32; +pub const ERROR_SEEK_ON_DEVICE: WIN32_ERROR = 132u32; +pub const ERROR_SEGMENT_NOTIFICATION: WIN32_ERROR = 702u32; +pub const ERROR_SEM_IS_SET: WIN32_ERROR = 102u32; +pub const ERROR_SEM_NOT_FOUND: WIN32_ERROR = 187u32; +pub const ERROR_SEM_OWNER_DIED: WIN32_ERROR = 105u32; +pub const ERROR_SEM_TIMEOUT: WIN32_ERROR = 121u32; +pub const ERROR_SEM_USER_LIMIT: WIN32_ERROR = 106u32; +pub const ERROR_SERIAL_NO_DEVICE: WIN32_ERROR = 1118u32; +pub const ERROR_SERVER_DISABLED: WIN32_ERROR = 1341u32; +pub const ERROR_SERVER_HAS_OPEN_HANDLES: WIN32_ERROR = 1811u32; +pub const ERROR_SERVER_NOT_DISABLED: WIN32_ERROR = 1342u32; +pub const ERROR_SERVER_SERVICE_CALL_REQUIRES_SMB1: WIN32_ERROR = 3023u32; +pub const ERROR_SERVER_SHUTDOWN_IN_PROGRESS: WIN32_ERROR = 1255u32; +pub const ERROR_SERVER_SID_MISMATCH: WIN32_ERROR = 628u32; +pub const ERROR_SERVER_TRANSPORT_CONFLICT: WIN32_ERROR = 816u32; +pub const ERROR_SERVICES_FAILED_AUTOSTART: WIN32_ERROR = 15405u32; +pub const ERROR_SERVICE_ALREADY_RUNNING: WIN32_ERROR = 1056u32; +pub const ERROR_SERVICE_CANNOT_ACCEPT_CTRL: WIN32_ERROR = 1061u32; +pub const ERROR_SERVICE_DATABASE_LOCKED: WIN32_ERROR = 1055u32; +pub const ERROR_SERVICE_DEPENDENCY_DELETED: WIN32_ERROR = 1075u32; +pub const ERROR_SERVICE_DEPENDENCY_FAIL: WIN32_ERROR = 1068u32; +pub const ERROR_SERVICE_DISABLED: WIN32_ERROR = 1058u32; +pub const ERROR_SERVICE_DOES_NOT_EXIST: WIN32_ERROR = 1060u32; +pub const ERROR_SERVICE_EXISTS: WIN32_ERROR = 1073u32; +pub const ERROR_SERVICE_EXISTS_AS_NON_PACKAGED_SERVICE: WIN32_ERROR = 15655u32; +pub const ERROR_SERVICE_IS_PAUSED: u32 = 928u32; +pub const ERROR_SERVICE_LOGON_FAILED: WIN32_ERROR = 1069u32; +pub const ERROR_SERVICE_MARKED_FOR_DELETE: WIN32_ERROR = 1072u32; +pub const ERROR_SERVICE_NEVER_STARTED: WIN32_ERROR = 1077u32; +pub const ERROR_SERVICE_NOTIFICATION: WIN32_ERROR = 716u32; +pub const ERROR_SERVICE_NOTIFY_CLIENT_LAGGING: WIN32_ERROR = 1294u32; +pub const ERROR_SERVICE_NOT_ACTIVE: WIN32_ERROR = 1062u32; +pub const ERROR_SERVICE_NOT_FOUND: WIN32_ERROR = 1243u32; +pub const ERROR_SERVICE_NOT_IN_EXE: WIN32_ERROR = 1083u32; +pub const ERROR_SERVICE_NO_THREAD: WIN32_ERROR = 1054u32; +pub const ERROR_SERVICE_REQUEST_TIMEOUT: WIN32_ERROR = 1053u32; +pub const ERROR_SERVICE_SPECIFIC_ERROR: WIN32_ERROR = 1066u32; +pub const ERROR_SERVICE_START_HANG: WIN32_ERROR = 1070u32; +pub const ERROR_SESSION_CREDENTIAL_CONFLICT: WIN32_ERROR = 1219u32; +pub const ERROR_SESSION_KEY_TOO_SHORT: WIN32_ERROR = 501u32; +pub const ERROR_SETCOUNT_ON_BAD_LB: WIN32_ERROR = 1433u32; +pub const ERROR_SETMARK_DETECTED: WIN32_ERROR = 1103u32; +pub const ERROR_SET_CONTEXT_DENIED: WIN32_ERROR = 1660u32; +pub const ERROR_SET_NOT_FOUND: WIN32_ERROR = 1170u32; +pub const ERROR_SET_POWER_STATE_FAILED: WIN32_ERROR = 1141u32; +pub const ERROR_SET_POWER_STATE_VETOED: WIN32_ERROR = 1140u32; +pub const ERROR_SET_SYSTEM_RESTORE_POINT: WIN32_ERROR = 3758096950u32; +pub const ERROR_SHARED_POLICY: WIN32_ERROR = 8218u32; +pub const ERROR_SHARING_BUFFER_EXCEEDED: WIN32_ERROR = 36u32; +pub const ERROR_SHARING_PAUSED: WIN32_ERROR = 70u32; +pub const ERROR_SHARING_VIOLATION: WIN32_ERROR = 32u32; +pub const ERROR_SHORT_NAMES_NOT_ENABLED_ON_VOLUME: WIN32_ERROR = 305u32; +pub const ERROR_SHUTDOWN_CLUSTER: WIN32_ERROR = 5008u32; +pub const ERROR_SHUTDOWN_DISKS_NOT_IN_MAINTENANCE_MODE: WIN32_ERROR = 1192u32; +pub const ERROR_SHUTDOWN_IN_PROGRESS: WIN32_ERROR = 1115u32; +pub const ERROR_SHUTDOWN_IS_SCHEDULED: WIN32_ERROR = 1190u32; +pub const ERROR_SHUTDOWN_USERS_LOGGED_ON: WIN32_ERROR = 1191u32; +pub const ERROR_SIGNAL_PENDING: WIN32_ERROR = 162u32; +pub const ERROR_SIGNAL_REFUSED: WIN32_ERROR = 156u32; +pub const ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH: WIN32_ERROR = 3758096964u32; +pub const ERROR_SIGNED_PACKAGE_INVALID_PUBLISHER_NAMESPACE: WIN32_ERROR = 15661u32; +pub const ERROR_SINGLETON_RESOURCE_INSTALLED_IN_ACTIVE_USER: WIN32_ERROR = 15653u32; +pub const ERROR_SINGLE_INSTANCE_APP: WIN32_ERROR = 1152u32; +pub const ERROR_SMARTCARD_SUBSYSTEM_FAILURE: WIN32_ERROR = 1264u32; +pub const ERROR_SMB1_NOT_AVAILABLE: WIN32_ERROR = 384u32; +pub const ERROR_SMB_BAD_CLUSTER_DIALECT: windows_sys::core::HRESULT = 0xC05D0001_u32 as _; +pub const ERROR_SMB_GUEST_LOGON_BLOCKED: WIN32_ERROR = 1272u32; +pub const ERROR_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP: windows_sys::core::HRESULT = 0xC05D0000_u32 as _; +pub const ERROR_SMB_NO_SIGNING_ALGORITHM_OVERLAP: windows_sys::core::HRESULT = 0xC05D0002_u32 as _; +pub const ERROR_SMI_PRIMITIVE_INSTALLER_FAILED: WIN32_ERROR = 14108u32; +pub const ERROR_SMR_GARBAGE_COLLECTION_REQUIRED: WIN32_ERROR = 4445u32; +pub const ERROR_SOME_NOT_MAPPED: WIN32_ERROR = 1301u32; +pub const ERROR_SOURCE_ELEMENT_EMPTY: WIN32_ERROR = 1160u32; +pub const ERROR_SPACES_ALLOCATION_SIZE_INVALID: windows_sys::core::HRESULT = 0x80E7000E_u32 as _; +pub const ERROR_SPACES_CACHE_FULL: windows_sys::core::HRESULT = 0x80E70026_u32 as _; +pub const ERROR_SPACES_CORRUPT_METADATA: windows_sys::core::HRESULT = 0x80E70018_u32 as _; +pub const ERROR_SPACES_DRIVE_LOST_DATA: windows_sys::core::HRESULT = 0x80E7001F_u32 as _; +pub const ERROR_SPACES_DRIVE_NOT_READY: windows_sys::core::HRESULT = 0x80E7001D_u32 as _; +pub const ERROR_SPACES_DRIVE_OPERATIONAL_STATE_INVALID: windows_sys::core::HRESULT = 0x80E70012_u32 as _; +pub const ERROR_SPACES_DRIVE_REDUNDANCY_INVALID: windows_sys::core::HRESULT = 0x80E70006_u32 as _; +pub const ERROR_SPACES_DRIVE_SECTOR_SIZE_INVALID: windows_sys::core::HRESULT = 0x80E70004_u32 as _; +pub const ERROR_SPACES_DRIVE_SPLIT: windows_sys::core::HRESULT = 0x80E7001E_u32 as _; +pub const ERROR_SPACES_DRT_FULL: windows_sys::core::HRESULT = 0x80E70019_u32 as _; +pub const ERROR_SPACES_ENCLOSURE_AWARE_INVALID: windows_sys::core::HRESULT = 0x80E7000F_u32 as _; +pub const ERROR_SPACES_ENTRY_INCOMPLETE: windows_sys::core::HRESULT = 0x80E70013_u32 as _; +pub const ERROR_SPACES_ENTRY_INVALID: windows_sys::core::HRESULT = 0x80E70014_u32 as _; +pub const ERROR_SPACES_EXTENDED_ERROR: windows_sys::core::HRESULT = 0x80E7000C_u32 as _; +pub const ERROR_SPACES_FAULT_DOMAIN_TYPE_INVALID: windows_sys::core::HRESULT = 0x80E70001_u32 as _; +pub const ERROR_SPACES_FLUSH_METADATA: windows_sys::core::HRESULT = 0x80E70025_u32 as _; +pub const ERROR_SPACES_INCONSISTENCY: windows_sys::core::HRESULT = 0x80E7001A_u32 as _; +pub const ERROR_SPACES_INTERLEAVE_LENGTH_INVALID: windows_sys::core::HRESULT = 0x80E70009_u32 as _; +pub const ERROR_SPACES_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80E70002_u32 as _; +pub const ERROR_SPACES_LOG_NOT_READY: windows_sys::core::HRESULT = 0x80E7001B_u32 as _; +pub const ERROR_SPACES_MAP_REQUIRED: windows_sys::core::HRESULT = 0x80E70016_u32 as _; +pub const ERROR_SPACES_MARK_DIRTY: windows_sys::core::HRESULT = 0x80E70020_u32 as _; +pub const ERROR_SPACES_NOT_ENOUGH_DRIVES: windows_sys::core::HRESULT = 0x80E7000B_u32 as _; +pub const ERROR_SPACES_NO_REDUNDANCY: windows_sys::core::HRESULT = 0x80E7001C_u32 as _; +pub const ERROR_SPACES_NUMBER_OF_COLUMNS_INVALID: windows_sys::core::HRESULT = 0x80E7000A_u32 as _; +pub const ERROR_SPACES_NUMBER_OF_DATA_COPIES_INVALID: windows_sys::core::HRESULT = 0x80E70007_u32 as _; +pub const ERROR_SPACES_NUMBER_OF_GROUPS_INVALID: windows_sys::core::HRESULT = 0x80E70011_u32 as _; +pub const ERROR_SPACES_PARITY_LAYOUT_INVALID: windows_sys::core::HRESULT = 0x80E70008_u32 as _; +pub const ERROR_SPACES_POOL_WAS_DELETED: windows_sys::core::HRESULT = 0xE70001_u32 as _; +pub const ERROR_SPACES_PROVISIONING_TYPE_INVALID: windows_sys::core::HRESULT = 0x80E7000D_u32 as _; +pub const ERROR_SPACES_REPAIR_IN_PROGRESS: windows_sys::core::HRESULT = 0x80E70027_u32 as _; +pub const ERROR_SPACES_RESILIENCY_TYPE_INVALID: windows_sys::core::HRESULT = 0x80E70003_u32 as _; +pub const ERROR_SPACES_UNSUPPORTED_VERSION: windows_sys::core::HRESULT = 0x80E70017_u32 as _; +pub const ERROR_SPACES_UPDATE_COLUMN_STATE: windows_sys::core::HRESULT = 0x80E70015_u32 as _; +pub const ERROR_SPACES_WRITE_CACHE_SIZE_INVALID: windows_sys::core::HRESULT = 0x80E70010_u32 as _; +pub const ERROR_SPARSE_FILE_NOT_SUPPORTED: WIN32_ERROR = 490u32; +pub const ERROR_SPARSE_NOT_ALLOWED_IN_TRANSACTION: WIN32_ERROR = 6844u32; +pub const ERROR_SPECIAL_ACCOUNT: WIN32_ERROR = 1371u32; +pub const ERROR_SPECIAL_GROUP: WIN32_ERROR = 1372u32; +pub const ERROR_SPECIAL_USER: WIN32_ERROR = 1373u32; +pub const ERROR_SPL_NO_ADDJOB: WIN32_ERROR = 3004u32; +pub const ERROR_SPL_NO_STARTDOC: WIN32_ERROR = 3003u32; +pub const ERROR_SPOOL_FILE_NOT_FOUND: WIN32_ERROR = 3002u32; +pub const ERROR_SRC_SRV_DLL_LOAD_FAILED: WIN32_ERROR = 428u32; +pub const ERROR_STACK_BUFFER_OVERRUN: WIN32_ERROR = 1282u32; +pub const ERROR_STACK_OVERFLOW: WIN32_ERROR = 1001u32; +pub const ERROR_STACK_OVERFLOW_READ: WIN32_ERROR = 599u32; +pub const ERROR_STAGEFROMUPDATEAGENT_PACKAGE_NOT_APPLICABLE: WIN32_ERROR = 15668u32; +pub const ERROR_STATE_COMPOSITE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED: WIN32_ERROR = 15815u32; +pub const ERROR_STATE_CONTAINER_NAME_SIZE_LIMIT_EXCEEDED: WIN32_ERROR = 15818u32; +pub const ERROR_STATE_CREATE_CONTAINER_FAILED: WIN32_ERROR = 15805u32; +pub const ERROR_STATE_DELETE_CONTAINER_FAILED: WIN32_ERROR = 15806u32; +pub const ERROR_STATE_DELETE_SETTING_FAILED: WIN32_ERROR = 15809u32; +pub const ERROR_STATE_ENUMERATE_CONTAINER_FAILED: WIN32_ERROR = 15813u32; +pub const ERROR_STATE_ENUMERATE_SETTINGS_FAILED: WIN32_ERROR = 15814u32; +pub const ERROR_STATE_GET_VERSION_FAILED: WIN32_ERROR = 15801u32; +pub const ERROR_STATE_LOAD_STORE_FAILED: WIN32_ERROR = 15800u32; +pub const ERROR_STATE_OPEN_CONTAINER_FAILED: WIN32_ERROR = 15804u32; +pub const ERROR_STATE_QUERY_SETTING_FAILED: WIN32_ERROR = 15810u32; +pub const ERROR_STATE_READ_COMPOSITE_SETTING_FAILED: WIN32_ERROR = 15811u32; +pub const ERROR_STATE_READ_SETTING_FAILED: WIN32_ERROR = 15807u32; +pub const ERROR_STATE_SETTING_NAME_SIZE_LIMIT_EXCEEDED: WIN32_ERROR = 15817u32; +pub const ERROR_STATE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED: WIN32_ERROR = 15816u32; +pub const ERROR_STATE_SET_VERSION_FAILED: WIN32_ERROR = 15802u32; +pub const ERROR_STATE_STRUCTURED_RESET_FAILED: WIN32_ERROR = 15803u32; +pub const ERROR_STATE_WRITE_COMPOSITE_SETTING_FAILED: WIN32_ERROR = 15812u32; +pub const ERROR_STATE_WRITE_SETTING_FAILED: WIN32_ERROR = 15808u32; +pub const ERROR_STATIC_INIT: WIN32_ERROR = 4002u32; +pub const ERROR_STOPPED_ON_SYMLINK: WIN32_ERROR = 681u32; +pub const ERROR_STORAGE_LOST_DATA_PERSISTENCE: WIN32_ERROR = 368u32; +pub const ERROR_STORAGE_RESERVE_ALREADY_EXISTS: WIN32_ERROR = 418u32; +pub const ERROR_STORAGE_RESERVE_DOES_NOT_EXIST: WIN32_ERROR = 417u32; +pub const ERROR_STORAGE_RESERVE_ID_INVALID: WIN32_ERROR = 416u32; +pub const ERROR_STORAGE_RESERVE_NOT_EMPTY: WIN32_ERROR = 419u32; +pub const ERROR_STORAGE_STACK_ACCESS_DENIED: WIN32_ERROR = 472u32; +pub const ERROR_STORAGE_TOPOLOGY_ID_MISMATCH: WIN32_ERROR = 345u32; +pub const ERROR_STREAM_MINIVERSION_NOT_FOUND: WIN32_ERROR = 6808u32; +pub const ERROR_STREAM_MINIVERSION_NOT_VALID: WIN32_ERROR = 6809u32; +pub const ERROR_STRICT_CFG_VIOLATION: WIN32_ERROR = 1657u32; +pub const ERROR_SUBST_TO_JOIN: WIN32_ERROR = 141u32; +pub const ERROR_SUBST_TO_SUBST: WIN32_ERROR = 139u32; +pub const ERROR_SUCCESS: WIN32_ERROR = 0u32; +pub const ERROR_SUCCESS_REBOOT_INITIATED: WIN32_ERROR = 1641u32; +pub const ERROR_SUCCESS_REBOOT_REQUIRED: WIN32_ERROR = 3010u32; +pub const ERROR_SUCCESS_RESTART_REQUIRED: WIN32_ERROR = 3011u32; +pub const ERROR_SVHDX_ERROR_NOT_AVAILABLE: windows_sys::core::HRESULT = 0xC05CFF00_u32 as _; +pub const ERROR_SVHDX_ERROR_STORED: windows_sys::core::HRESULT = 0xC05C0000_u32 as _; +pub const ERROR_SVHDX_NO_INITIATOR: windows_sys::core::HRESULT = 0xC05CFF0B_u32 as _; +pub const ERROR_SVHDX_RESERVATION_CONFLICT: windows_sys::core::HRESULT = 0xC05CFF07_u32 as _; +pub const ERROR_SVHDX_UNIT_ATTENTION_AVAILABLE: windows_sys::core::HRESULT = 0xC05CFF01_u32 as _; +pub const ERROR_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED: windows_sys::core::HRESULT = 0xC05CFF02_u32 as _; +pub const ERROR_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED: windows_sys::core::HRESULT = 0xC05CFF06_u32 as _; +pub const ERROR_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED: windows_sys::core::HRESULT = 0xC05CFF05_u32 as _; +pub const ERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED: windows_sys::core::HRESULT = 0xC05CFF03_u32 as _; +pub const ERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED: windows_sys::core::HRESULT = 0xC05CFF04_u32 as _; +pub const ERROR_SVHDX_VERSION_MISMATCH: windows_sys::core::HRESULT = 0xC05CFF09_u32 as _; +pub const ERROR_SVHDX_WRONG_FILE_TYPE: windows_sys::core::HRESULT = 0xC05CFF08_u32 as _; +pub const ERROR_SWAPERROR: WIN32_ERROR = 999u32; +pub const ERROR_SXS_ACTIVATION_CONTEXT_DISABLED: WIN32_ERROR = 14006u32; +pub const ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT: WIN32_ERROR = 14103u32; +pub const ERROR_SXS_ASSEMBLY_MISSING: WIN32_ERROR = 14081u32; +pub const ERROR_SXS_ASSEMBLY_NOT_FOUND: WIN32_ERROR = 14003u32; +pub const ERROR_SXS_ASSEMBLY_NOT_LOCKED: WIN32_ERROR = 14097u32; +pub const ERROR_SXS_CANT_GEN_ACTCTX: WIN32_ERROR = 14001u32; +pub const ERROR_SXS_COMPONENT_STORE_CORRUPT: WIN32_ERROR = 14098u32; +pub const ERROR_SXS_CORRUPTION: WIN32_ERROR = 14083u32; +pub const ERROR_SXS_CORRUPT_ACTIVATION_STACK: WIN32_ERROR = 14082u32; +pub const ERROR_SXS_DUPLICATE_ACTIVATABLE_CLASS: WIN32_ERROR = 14111u32; +pub const ERROR_SXS_DUPLICATE_ASSEMBLY_NAME: WIN32_ERROR = 14027u32; +pub const ERROR_SXS_DUPLICATE_CLSID: WIN32_ERROR = 14023u32; +pub const ERROR_SXS_DUPLICATE_DLL_NAME: WIN32_ERROR = 14021u32; +pub const ERROR_SXS_DUPLICATE_IID: WIN32_ERROR = 14024u32; +pub const ERROR_SXS_DUPLICATE_PROGID: WIN32_ERROR = 14026u32; +pub const ERROR_SXS_DUPLICATE_TLBID: WIN32_ERROR = 14025u32; +pub const ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME: WIN32_ERROR = 14022u32; +pub const ERROR_SXS_EARLY_DEACTIVATION: WIN32_ERROR = 14084u32; +pub const ERROR_SXS_FILE_HASH_MISMATCH: WIN32_ERROR = 14028u32; +pub const ERROR_SXS_FILE_HASH_MISSING: WIN32_ERROR = 14110u32; +pub const ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY: WIN32_ERROR = 14104u32; +pub const ERROR_SXS_IDENTITIES_DIFFERENT: WIN32_ERROR = 14102u32; +pub const ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE: WIN32_ERROR = 14092u32; +pub const ERROR_SXS_IDENTITY_PARSE_ERROR: WIN32_ERROR = 14093u32; +pub const ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN: WIN32_ERROR = 14095u32; +pub const ERROR_SXS_INVALID_ACTCTXDATA_FORMAT: WIN32_ERROR = 14002u32; +pub const ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE: WIN32_ERROR = 14017u32; +pub const ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME: WIN32_ERROR = 14080u32; +pub const ERROR_SXS_INVALID_DEACTIVATION: WIN32_ERROR = 14085u32; +pub const ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME: WIN32_ERROR = 14091u32; +pub const ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE: WIN32_ERROR = 14090u32; +pub const ERROR_SXS_INVALID_XML_NAMESPACE_URI: WIN32_ERROR = 14014u32; +pub const ERROR_SXS_KEY_NOT_FOUND: WIN32_ERROR = 14007u32; +pub const ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED: WIN32_ERROR = 14016u32; +pub const ERROR_SXS_MANIFEST_FORMAT_ERROR: WIN32_ERROR = 14004u32; +pub const ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT: WIN32_ERROR = 14101u32; +pub const ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE: WIN32_ERROR = 14019u32; +pub const ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE: WIN32_ERROR = 14018u32; +pub const ERROR_SXS_MANIFEST_PARSE_ERROR: WIN32_ERROR = 14005u32; +pub const ERROR_SXS_MANIFEST_TOO_BIG: WIN32_ERROR = 14105u32; +pub const ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE: WIN32_ERROR = 14079u32; +pub const ERROR_SXS_MULTIPLE_DEACTIVATION: WIN32_ERROR = 14086u32; +pub const ERROR_SXS_POLICY_PARSE_ERROR: WIN32_ERROR = 14029u32; +pub const ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT: WIN32_ERROR = 14020u32; +pub const ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET: WIN32_ERROR = 14011u32; +pub const ERROR_SXS_PROCESS_TERMINATION_REQUESTED: WIN32_ERROR = 14087u32; +pub const ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING: WIN32_ERROR = 14078u32; +pub const ERROR_SXS_PROTECTION_CATALOG_NOT_VALID: WIN32_ERROR = 14076u32; +pub const ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT: WIN32_ERROR = 14075u32; +pub const ERROR_SXS_PROTECTION_RECOVERY_FAILED: WIN32_ERROR = 14074u32; +pub const ERROR_SXS_RELEASE_ACTIVATION_CONTEXT: WIN32_ERROR = 14088u32; +pub const ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED: WIN32_ERROR = 14015u32; +pub const ERROR_SXS_SECTION_NOT_FOUND: WIN32_ERROR = 14000u32; +pub const ERROR_SXS_SETTING_NOT_REGISTERED: WIN32_ERROR = 14106u32; +pub const ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY: WIN32_ERROR = 14089u32; +pub const ERROR_SXS_THREAD_QUERIES_DISABLED: WIN32_ERROR = 14010u32; +pub const ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE: WIN32_ERROR = 14107u32; +pub const ERROR_SXS_UNKNOWN_ENCODING: WIN32_ERROR = 14013u32; +pub const ERROR_SXS_UNKNOWN_ENCODING_GROUP: WIN32_ERROR = 14012u32; +pub const ERROR_SXS_UNTRANSLATABLE_HRESULT: WIN32_ERROR = 14077u32; +pub const ERROR_SXS_VERSION_CONFLICT: WIN32_ERROR = 14008u32; +pub const ERROR_SXS_WRONG_SECTION_TYPE: WIN32_ERROR = 14009u32; +pub const ERROR_SXS_XML_E_BADCHARDATA: WIN32_ERROR = 14036u32; +pub const ERROR_SXS_XML_E_BADCHARINSTRING: WIN32_ERROR = 14034u32; +pub const ERROR_SXS_XML_E_BADNAMECHAR: WIN32_ERROR = 14033u32; +pub const ERROR_SXS_XML_E_BADPEREFINSUBSET: WIN32_ERROR = 14059u32; +pub const ERROR_SXS_XML_E_BADSTARTNAMECHAR: WIN32_ERROR = 14032u32; +pub const ERROR_SXS_XML_E_BADXMLCASE: WIN32_ERROR = 14069u32; +pub const ERROR_SXS_XML_E_BADXMLDECL: WIN32_ERROR = 14056u32; +pub const ERROR_SXS_XML_E_COMMENTSYNTAX: WIN32_ERROR = 14031u32; +pub const ERROR_SXS_XML_E_DUPLICATEATTRIBUTE: WIN32_ERROR = 14053u32; +pub const ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE: WIN32_ERROR = 14045u32; +pub const ERROR_SXS_XML_E_EXPECTINGTAGEND: WIN32_ERROR = 14038u32; +pub const ERROR_SXS_XML_E_INCOMPLETE_ENCODING: WIN32_ERROR = 14043u32; +pub const ERROR_SXS_XML_E_INTERNALERROR: WIN32_ERROR = 14041u32; +pub const ERROR_SXS_XML_E_INVALIDATROOTLEVEL: WIN32_ERROR = 14055u32; +pub const ERROR_SXS_XML_E_INVALIDENCODING: WIN32_ERROR = 14067u32; +pub const ERROR_SXS_XML_E_INVALIDSWITCH: WIN32_ERROR = 14068u32; +pub const ERROR_SXS_XML_E_INVALID_DECIMAL: WIN32_ERROR = 14047u32; +pub const ERROR_SXS_XML_E_INVALID_HEXIDECIMAL: WIN32_ERROR = 14048u32; +pub const ERROR_SXS_XML_E_INVALID_STANDALONE: WIN32_ERROR = 14070u32; +pub const ERROR_SXS_XML_E_INVALID_UNICODE: WIN32_ERROR = 14049u32; +pub const ERROR_SXS_XML_E_INVALID_VERSION: WIN32_ERROR = 14072u32; +pub const ERROR_SXS_XML_E_MISSINGEQUALS: WIN32_ERROR = 14073u32; +pub const ERROR_SXS_XML_E_MISSINGQUOTE: WIN32_ERROR = 14030u32; +pub const ERROR_SXS_XML_E_MISSINGROOT: WIN32_ERROR = 14057u32; +pub const ERROR_SXS_XML_E_MISSINGSEMICOLON: WIN32_ERROR = 14039u32; +pub const ERROR_SXS_XML_E_MISSINGWHITESPACE: WIN32_ERROR = 14037u32; +pub const ERROR_SXS_XML_E_MISSING_PAREN: WIN32_ERROR = 14044u32; +pub const ERROR_SXS_XML_E_MULTIPLEROOTS: WIN32_ERROR = 14054u32; +pub const ERROR_SXS_XML_E_MULTIPLE_COLONS: WIN32_ERROR = 14046u32; +pub const ERROR_SXS_XML_E_RESERVEDNAMESPACE: WIN32_ERROR = 14066u32; +pub const ERROR_SXS_XML_E_UNBALANCEDPAREN: WIN32_ERROR = 14040u32; +pub const ERROR_SXS_XML_E_UNCLOSEDCDATA: WIN32_ERROR = 14065u32; +pub const ERROR_SXS_XML_E_UNCLOSEDCOMMENT: WIN32_ERROR = 14063u32; +pub const ERROR_SXS_XML_E_UNCLOSEDDECL: WIN32_ERROR = 14064u32; +pub const ERROR_SXS_XML_E_UNCLOSEDENDTAG: WIN32_ERROR = 14061u32; +pub const ERROR_SXS_XML_E_UNCLOSEDSTARTTAG: WIN32_ERROR = 14060u32; +pub const ERROR_SXS_XML_E_UNCLOSEDSTRING: WIN32_ERROR = 14062u32; +pub const ERROR_SXS_XML_E_UNCLOSEDTAG: WIN32_ERROR = 14052u32; +pub const ERROR_SXS_XML_E_UNEXPECTEDENDTAG: WIN32_ERROR = 14051u32; +pub const ERROR_SXS_XML_E_UNEXPECTEDEOF: WIN32_ERROR = 14058u32; +pub const ERROR_SXS_XML_E_UNEXPECTED_STANDALONE: WIN32_ERROR = 14071u32; +pub const ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE: WIN32_ERROR = 14042u32; +pub const ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK: WIN32_ERROR = 14050u32; +pub const ERROR_SXS_XML_E_XMLDECLSYNTAX: WIN32_ERROR = 14035u32; +pub const ERROR_SYMLINK_CLASS_DISABLED: WIN32_ERROR = 1463u32; +pub const ERROR_SYMLINK_NOT_SUPPORTED: WIN32_ERROR = 1464u32; +pub const ERROR_SYNCHRONIZATION_REQUIRED: WIN32_ERROR = 569u32; +pub const ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED: WIN32_ERROR = 1274u32; +pub const ERROR_SYSTEM_DEVICE_NOT_FOUND: WIN32_ERROR = 15299u32; +pub const ERROR_SYSTEM_HIVE_TOO_LARGE: WIN32_ERROR = 653u32; +pub const ERROR_SYSTEM_IMAGE_BAD_SIGNATURE: WIN32_ERROR = 637u32; +pub const ERROR_SYSTEM_INTEGRITY_INVALID_POLICY: WIN32_ERROR = 4552u32; +pub const ERROR_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED: WIN32_ERROR = 4553u32; +pub const ERROR_SYSTEM_INTEGRITY_POLICY_VIOLATION: WIN32_ERROR = 4551u32; +pub const ERROR_SYSTEM_INTEGRITY_REPUTATION_DANGEROUS_EXT: WIN32_ERROR = 4558u32; +pub const ERROR_SYSTEM_INTEGRITY_REPUTATION_EXPLICIT_DENY_FILE: WIN32_ERROR = 4582u32; +pub const ERROR_SYSTEM_INTEGRITY_REPUTATION_MALICIOUS: WIN32_ERROR = 4556u32; +pub const ERROR_SYSTEM_INTEGRITY_REPUTATION_OFFLINE: WIN32_ERROR = 4559u32; +pub const ERROR_SYSTEM_INTEGRITY_REPUTATION_PUA: WIN32_ERROR = 4557u32; +pub const ERROR_SYSTEM_INTEGRITY_REPUTATION_UNATTAINABLE: WIN32_ERROR = 4581u32; +pub const ERROR_SYSTEM_INTEGRITY_REPUTATION_UNFRIENDLY_FILE: WIN32_ERROR = 4580u32; +pub const ERROR_SYSTEM_INTEGRITY_ROLLBACK_DETECTED: WIN32_ERROR = 4550u32; +pub const ERROR_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED: WIN32_ERROR = 4555u32; +pub const ERROR_SYSTEM_INTEGRITY_TOO_MANY_POLICIES: WIN32_ERROR = 4554u32; +pub const ERROR_SYSTEM_NEEDS_REMEDIATION: WIN32_ERROR = 15623u32; +pub const ERROR_SYSTEM_POWERSTATE_COMPLEX_TRANSITION: WIN32_ERROR = 783u32; +pub const ERROR_SYSTEM_POWERSTATE_TRANSITION: WIN32_ERROR = 782u32; +pub const ERROR_SYSTEM_PROCESS_TERMINATED: WIN32_ERROR = 591u32; +pub const ERROR_SYSTEM_SHUTDOWN: WIN32_ERROR = 641u32; +pub const ERROR_SYSTEM_TRACE: WIN32_ERROR = 150u32; +pub const ERROR_TAG_NOT_FOUND: WIN32_ERROR = 2012u32; +pub const ERROR_TAG_NOT_PRESENT: WIN32_ERROR = 2013u32; +pub const ERROR_THREAD_1_INACTIVE: WIN32_ERROR = 210u32; +pub const ERROR_THREAD_ALREADY_IN_TASK: WIN32_ERROR = 1552u32; +pub const ERROR_THREAD_MODE_ALREADY_BACKGROUND: WIN32_ERROR = 400u32; +pub const ERROR_THREAD_MODE_NOT_BACKGROUND: WIN32_ERROR = 401u32; +pub const ERROR_THREAD_NOT_IN_PROCESS: WIN32_ERROR = 566u32; +pub const ERROR_THREAD_WAS_SUSPENDED: WIN32_ERROR = 699u32; +pub const ERROR_TIERING_ALREADY_PROCESSING: windows_sys::core::HRESULT = 0x80830006_u32 as _; +pub const ERROR_TIERING_CANNOT_PIN_OBJECT: windows_sys::core::HRESULT = 0x80830007_u32 as _; +pub const ERROR_TIERING_FILE_IS_NOT_PINNED: windows_sys::core::HRESULT = 0x80830008_u32 as _; +pub const ERROR_TIERING_INVALID_FILE_ID: windows_sys::core::HRESULT = 0x80830004_u32 as _; +pub const ERROR_TIERING_NOT_SUPPORTED_ON_VOLUME: windows_sys::core::HRESULT = 0x80830001_u32 as _; +pub const ERROR_TIERING_STORAGE_TIER_NOT_FOUND: windows_sys::core::HRESULT = 0x80830003_u32 as _; +pub const ERROR_TIERING_VOLUME_DISMOUNT_IN_PROGRESS: windows_sys::core::HRESULT = 0x80830002_u32 as _; +pub const ERROR_TIERING_WRONG_CLUSTER_NODE: windows_sys::core::HRESULT = 0x80830005_u32 as _; +pub const ERROR_TIMEOUT: WIN32_ERROR = 1460u32; +pub const ERROR_TIMER_NOT_CANCELED: WIN32_ERROR = 541u32; +pub const ERROR_TIMER_RESOLUTION_NOT_SET: WIN32_ERROR = 607u32; +pub const ERROR_TIMER_RESUME_IGNORED: WIN32_ERROR = 722u32; +pub const ERROR_TIME_SENSITIVE_THREAD: WIN32_ERROR = 422u32; +pub const ERROR_TIME_SKEW: WIN32_ERROR = 1398u32; +pub const ERROR_TLW_WITH_WSCHILD: WIN32_ERROR = 1406u32; +pub const ERROR_TM_IDENTITY_MISMATCH: WIN32_ERROR = 6845u32; +pub const ERROR_TM_INITIALIZATION_FAILED: WIN32_ERROR = 6706u32; +pub const ERROR_TM_VOLATILE: WIN32_ERROR = 6828u32; +pub const ERROR_TOKEN_ALREADY_IN_USE: WIN32_ERROR = 1375u32; +pub const ERROR_TOO_MANY_CMDS: WIN32_ERROR = 56u32; +pub const ERROR_TOO_MANY_CONTEXT_IDS: WIN32_ERROR = 1384u32; +pub const ERROR_TOO_MANY_DESCRIPTORS: WIN32_ERROR = 331u32; +pub const ERROR_TOO_MANY_LINKS: WIN32_ERROR = 1142u32; +pub const ERROR_TOO_MANY_LUIDS_REQUESTED: WIN32_ERROR = 1333u32; +pub const ERROR_TOO_MANY_MODULES: WIN32_ERROR = 214u32; +pub const ERROR_TOO_MANY_MUXWAITERS: WIN32_ERROR = 152u32; +pub const ERROR_TOO_MANY_NAMES: WIN32_ERROR = 68u32; +pub const ERROR_TOO_MANY_OPEN_FILES: WIN32_ERROR = 4u32; +pub const ERROR_TOO_MANY_POSTS: WIN32_ERROR = 298u32; +pub const ERROR_TOO_MANY_SECRETS: WIN32_ERROR = 1381u32; +pub const ERROR_TOO_MANY_SEMAPHORES: WIN32_ERROR = 100u32; +pub const ERROR_TOO_MANY_SEM_REQUESTS: WIN32_ERROR = 103u32; +pub const ERROR_TOO_MANY_SESS: WIN32_ERROR = 69u32; +pub const ERROR_TOO_MANY_SIDS: WIN32_ERROR = 1389u32; +pub const ERROR_TOO_MANY_TCBS: WIN32_ERROR = 155u32; +pub const ERROR_TOO_MANY_THREADS: WIN32_ERROR = 565u32; +pub const ERROR_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE: WIN32_ERROR = 6834u32; +pub const ERROR_TRANSACTIONAL_CONFLICT: WIN32_ERROR = 6800u32; +pub const ERROR_TRANSACTIONAL_OPEN_NOT_ALLOWED: WIN32_ERROR = 6832u32; +pub const ERROR_TRANSACTIONMANAGER_IDENTITY_MISMATCH: WIN32_ERROR = 6727u32; +pub const ERROR_TRANSACTIONMANAGER_NOT_FOUND: WIN32_ERROR = 6718u32; +pub const ERROR_TRANSACTIONMANAGER_NOT_ONLINE: WIN32_ERROR = 6719u32; +pub const ERROR_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION: WIN32_ERROR = 6720u32; +pub const ERROR_TRANSACTIONS_NOT_FROZEN: WIN32_ERROR = 6839u32; +pub const ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE: WIN32_ERROR = 6805u32; +pub const ERROR_TRANSACTION_ALREADY_ABORTED: WIN32_ERROR = 6704u32; +pub const ERROR_TRANSACTION_ALREADY_COMMITTED: WIN32_ERROR = 6705u32; +pub const ERROR_TRANSACTION_FREEZE_IN_PROGRESS: WIN32_ERROR = 6840u32; +pub const ERROR_TRANSACTION_INTEGRITY_VIOLATED: WIN32_ERROR = 6726u32; +pub const ERROR_TRANSACTION_INVALID_MARSHALL_BUFFER: WIN32_ERROR = 6713u32; +pub const ERROR_TRANSACTION_MUST_WRITETHROUGH: WIN32_ERROR = 6729u32; +pub const ERROR_TRANSACTION_NOT_ACTIVE: WIN32_ERROR = 6701u32; +pub const ERROR_TRANSACTION_NOT_ENLISTED: WIN32_ERROR = 6855u32; +pub const ERROR_TRANSACTION_NOT_FOUND: WIN32_ERROR = 6715u32; +pub const ERROR_TRANSACTION_NOT_JOINED: WIN32_ERROR = 6708u32; +pub const ERROR_TRANSACTION_NOT_REQUESTED: WIN32_ERROR = 6703u32; +pub const ERROR_TRANSACTION_NOT_ROOT: WIN32_ERROR = 6721u32; +pub const ERROR_TRANSACTION_NO_SUPERIOR: WIN32_ERROR = 6730u32; +pub const ERROR_TRANSACTION_OBJECT_EXPIRED: WIN32_ERROR = 6722u32; +pub const ERROR_TRANSACTION_PROPAGATION_FAILED: WIN32_ERROR = 6711u32; +pub const ERROR_TRANSACTION_RECORD_TOO_LONG: WIN32_ERROR = 6724u32; +pub const ERROR_TRANSACTION_REQUEST_NOT_VALID: WIN32_ERROR = 6702u32; +pub const ERROR_TRANSACTION_REQUIRED_PROMOTION: WIN32_ERROR = 6837u32; +pub const ERROR_TRANSACTION_RESPONSE_NOT_ENLISTED: WIN32_ERROR = 6723u32; +pub const ERROR_TRANSACTION_SCOPE_CALLBACKS_NOT_SET: WIN32_ERROR = 6836u32; +pub const ERROR_TRANSACTION_SUPERIOR_EXISTS: WIN32_ERROR = 6709u32; +pub const ERROR_TRANSFORM_NOT_SUPPORTED: WIN32_ERROR = 2004u32; +pub const ERROR_TRANSLATION_COMPLETE: WIN32_ERROR = 757u32; +pub const ERROR_TRANSPORT_FULL: WIN32_ERROR = 4328u32; +pub const ERROR_TRUSTED_DOMAIN_FAILURE: WIN32_ERROR = 1788u32; +pub const ERROR_TRUSTED_RELATIONSHIP_FAILURE: WIN32_ERROR = 1789u32; +pub const ERROR_TRUST_FAILURE: WIN32_ERROR = 1790u32; +pub const ERROR_TS_INCOMPATIBLE_SESSIONS: WIN32_ERROR = 7069u32; +pub const ERROR_TS_VIDEO_SUBSYSTEM_ERROR: WIN32_ERROR = 7070u32; +pub const ERROR_TXF_ATTRIBUTE_CORRUPT: WIN32_ERROR = 6830u32; +pub const ERROR_TXF_DIR_NOT_EMPTY: WIN32_ERROR = 6826u32; +pub const ERROR_TXF_METADATA_ALREADY_PRESENT: WIN32_ERROR = 6835u32; +pub const ERROR_UNABLE_TO_CLEAN: WIN32_ERROR = 4311u32; +pub const ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA: WIN32_ERROR = 4330u32; +pub const ERROR_UNABLE_TO_INVENTORY_DRIVE: WIN32_ERROR = 4325u32; +pub const ERROR_UNABLE_TO_INVENTORY_SLOT: WIN32_ERROR = 4326u32; +pub const ERROR_UNABLE_TO_INVENTORY_TRANSPORT: WIN32_ERROR = 4327u32; +pub const ERROR_UNABLE_TO_LOAD_MEDIUM: WIN32_ERROR = 4324u32; +pub const ERROR_UNABLE_TO_LOCK_MEDIA: WIN32_ERROR = 1108u32; +pub const ERROR_UNABLE_TO_MOVE_REPLACEMENT: WIN32_ERROR = 1176u32; +pub const ERROR_UNABLE_TO_MOVE_REPLACEMENT_2: WIN32_ERROR = 1177u32; +pub const ERROR_UNABLE_TO_REMOVE_REPLACED: WIN32_ERROR = 1175u32; +pub const ERROR_UNABLE_TO_UNLOAD_MEDIA: WIN32_ERROR = 1109u32; +pub const ERROR_UNDEFINED_CHARACTER: WIN32_ERROR = 583u32; +pub const ERROR_UNDEFINED_SCOPE: WIN32_ERROR = 319u32; +pub const ERROR_UNEXPECTED_MM_CREATE_ERR: WIN32_ERROR = 556u32; +pub const ERROR_UNEXPECTED_MM_EXTEND_ERR: WIN32_ERROR = 558u32; +pub const ERROR_UNEXPECTED_MM_MAP_ERROR: WIN32_ERROR = 557u32; +pub const ERROR_UNEXPECTED_NTCACHEMANAGER_ERROR: WIN32_ERROR = 443u32; +pub const ERROR_UNEXPECTED_OMID: WIN32_ERROR = 4334u32; +pub const ERROR_UNEXP_NET_ERR: WIN32_ERROR = 59u32; +pub const ERROR_UNHANDLED_EXCEPTION: WIN32_ERROR = 574u32; +pub const ERROR_UNIDENTIFIED_ERROR: WIN32_ERROR = 1287u32; +pub const ERROR_UNKNOWN_COMPONENT: WIN32_ERROR = 1607u32; +pub const ERROR_UNKNOWN_EXCEPTION: WIN32_ERROR = 3758096953u32; +pub const ERROR_UNKNOWN_FEATURE: WIN32_ERROR = 1606u32; +pub const ERROR_UNKNOWN_PATCH: WIN32_ERROR = 1647u32; +pub const ERROR_UNKNOWN_PORT: WIN32_ERROR = 1796u32; +pub const ERROR_UNKNOWN_PRINTER_DRIVER: WIN32_ERROR = 1797u32; +pub const ERROR_UNKNOWN_PRINTPROCESSOR: WIN32_ERROR = 1798u32; +pub const ERROR_UNKNOWN_PRINT_MONITOR: WIN32_ERROR = 3000u32; +pub const ERROR_UNKNOWN_PRODUCT: WIN32_ERROR = 1605u32; +pub const ERROR_UNKNOWN_PROPERTY: WIN32_ERROR = 1608u32; +pub const ERROR_UNKNOWN_PROTOCOL_ID: u32 = 902u32; +pub const ERROR_UNKNOWN_REVISION: WIN32_ERROR = 1305u32; +pub const ERROR_UNMAPPED_SUBSTITUTION_STRING: WIN32_ERROR = 14096u32; +pub const ERROR_UNRECOGNIZED_MEDIA: WIN32_ERROR = 1785u32; +pub const ERROR_UNRECOGNIZED_VOLUME: WIN32_ERROR = 1005u32; +pub const ERROR_UNRECOVERABLE_STACK_OVERFLOW: WIN32_ERROR = 3758097152u32; +pub const ERROR_UNSATISFIED_DEPENDENCIES: WIN32_ERROR = 441u32; +pub const ERROR_UNSIGNED_PACKAGE_INVALID_CONTENT: WIN32_ERROR = 15659u32; +pub const ERROR_UNSIGNED_PACKAGE_INVALID_PUBLISHER_NAMESPACE: WIN32_ERROR = 15660u32; +pub const ERROR_UNSUPPORTED_COMPRESSION: WIN32_ERROR = 618u32; +pub const ERROR_UNSUPPORTED_TYPE: WIN32_ERROR = 1630u32; +pub const ERROR_UNTRUSTED_MOUNT_POINT: WIN32_ERROR = 448u32; +pub const ERROR_UNWIND: WIN32_ERROR = 542u32; +pub const ERROR_UNWIND_CONSOLIDATE: WIN32_ERROR = 684u32; +pub const ERROR_UPDATE_IN_PROGRESS: u32 = 911u32; +pub const ERROR_USER_APC: WIN32_ERROR = 737u32; +pub const ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED: WIN32_ERROR = 1934u32; +pub const ERROR_USER_EXISTS: WIN32_ERROR = 1316u32; +pub const ERROR_USER_LIMIT: u32 = 937u32; +pub const ERROR_USER_MAPPED_FILE: WIN32_ERROR = 1224u32; +pub const ERROR_USER_PROFILE_LOAD: WIN32_ERROR = 500u32; +pub const ERROR_VALIDATE_CONTINUE: WIN32_ERROR = 625u32; +pub const ERROR_VC_DISCONNECTED: WIN32_ERROR = 240u32; +pub const ERROR_VDM_DISALLOWED: WIN32_ERROR = 1286u32; +pub const ERROR_VDM_HARD_ERROR: WIN32_ERROR = 593u32; +pub const ERROR_VERIFIER_STOP: WIN32_ERROR = 537u32; +pub const ERROR_VERSION_PARSE_ERROR: WIN32_ERROR = 777u32; +pub const ERROR_VHDSET_BACKING_STORAGE_NOT_FOUND: windows_sys::core::HRESULT = 0xC05CFF0C_u32 as _; +pub const ERROR_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE: WIN32_ERROR = 3225026599u32; +pub const ERROR_VHD_BITMAP_MISMATCH: WIN32_ERROR = 3225026572u32; +pub const ERROR_VHD_BLOCK_ALLOCATION_FAILURE: WIN32_ERROR = 3225026569u32; +pub const ERROR_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT: WIN32_ERROR = 3225026570u32; +pub const ERROR_VHD_CHANGE_TRACKING_DISABLED: WIN32_ERROR = 3225026602u32; +pub const ERROR_VHD_CHILD_PARENT_ID_MISMATCH: WIN32_ERROR = 3225026574u32; +pub const ERROR_VHD_CHILD_PARENT_SIZE_MISMATCH: WIN32_ERROR = 3225026583u32; +pub const ERROR_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH: WIN32_ERROR = 3225026575u32; +pub const ERROR_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE: WIN32_ERROR = 3225026598u32; +pub const ERROR_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED: WIN32_ERROR = 3225026584u32; +pub const ERROR_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT: WIN32_ERROR = 3225026585u32; +pub const ERROR_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH: WIN32_ERROR = 3225026562u32; +pub const ERROR_VHD_DRIVE_FOOTER_CORRUPT: WIN32_ERROR = 3225026563u32; +pub const ERROR_VHD_DRIVE_FOOTER_MISSING: WIN32_ERROR = 3225026561u32; +pub const ERROR_VHD_FORMAT_UNKNOWN: WIN32_ERROR = 3225026564u32; +pub const ERROR_VHD_FORMAT_UNSUPPORTED_VERSION: WIN32_ERROR = 3225026565u32; +pub const ERROR_VHD_INVALID_BLOCK_SIZE: WIN32_ERROR = 3225026571u32; +pub const ERROR_VHD_INVALID_CHANGE_TRACKING_ID: WIN32_ERROR = 3225026601u32; +pub const ERROR_VHD_INVALID_FILE_SIZE: WIN32_ERROR = 3225026579u32; +pub const ERROR_VHD_INVALID_SIZE: WIN32_ERROR = 3225026578u32; +pub const ERROR_VHD_INVALID_STATE: WIN32_ERROR = 3225026588u32; +pub const ERROR_VHD_INVALID_TYPE: WIN32_ERROR = 3225026587u32; +pub const ERROR_VHD_METADATA_FULL: WIN32_ERROR = 3225026600u32; +pub const ERROR_VHD_METADATA_READ_FAILURE: WIN32_ERROR = 3225026576u32; +pub const ERROR_VHD_METADATA_WRITE_FAILURE: WIN32_ERROR = 3225026577u32; +pub const ERROR_VHD_MISSING_CHANGE_TRACKING_INFORMATION: WIN32_ERROR = 3225026608u32; +pub const ERROR_VHD_PARENT_VHD_ACCESS_DENIED: WIN32_ERROR = 3225026582u32; +pub const ERROR_VHD_PARENT_VHD_NOT_FOUND: WIN32_ERROR = 3225026573u32; +pub const ERROR_VHD_RESIZE_WOULD_TRUNCATE_DATA: WIN32_ERROR = 3225026597u32; +pub const ERROR_VHD_SHARED: windows_sys::core::HRESULT = 0xC05CFF0A_u32 as _; +pub const ERROR_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH: WIN32_ERROR = 3225026566u32; +pub const ERROR_VHD_SPARSE_HEADER_CORRUPT: WIN32_ERROR = 3225026568u32; +pub const ERROR_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION: WIN32_ERROR = 3225026567u32; +pub const ERROR_VHD_UNEXPECTED_ID: WIN32_ERROR = 3225026612u32; +pub const ERROR_VID_CHILD_GPA_PAGE_SET_CORRUPTED: WIN32_ERROR = 3224829966u32; +pub const ERROR_VID_DUPLICATE_HANDLER: WIN32_ERROR = 3224829953u32; +pub const ERROR_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT: WIN32_ERROR = 3224829982u32; +pub const ERROR_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT: WIN32_ERROR = 3224829964u32; +pub const ERROR_VID_HANDLER_NOT_PRESENT: WIN32_ERROR = 3224829956u32; +pub const ERROR_VID_INSUFFICIENT_RESOURCES_HV_DEPOSIT: WIN32_ERROR = 3224829997u32; +pub const ERROR_VID_INSUFFICIENT_RESOURCES_PHYSICAL_BUFFER: WIN32_ERROR = 3224829996u32; +pub const ERROR_VID_INSUFFICIENT_RESOURCES_RESERVE: WIN32_ERROR = 3224829995u32; +pub const ERROR_VID_INSUFFICIENT_RESOURCES_WITHDRAW: WIN32_ERROR = 3224829999u32; +pub const ERROR_VID_INVALID_CHILD_GPA_PAGE_SET: WIN32_ERROR = 3224829986u32; +pub const ERROR_VID_INVALID_GPA_RANGE_HANDLE: WIN32_ERROR = 3224829973u32; +pub const ERROR_VID_INVALID_MEMORY_BLOCK_HANDLE: WIN32_ERROR = 3224829970u32; +pub const ERROR_VID_INVALID_MESSAGE_QUEUE_HANDLE: WIN32_ERROR = 3224829972u32; +pub const ERROR_VID_INVALID_NUMA_NODE_INDEX: WIN32_ERROR = 3224829968u32; +pub const ERROR_VID_INVALID_NUMA_SETTINGS: WIN32_ERROR = 3224829967u32; +pub const ERROR_VID_INVALID_OBJECT_NAME: WIN32_ERROR = 3224829957u32; +pub const ERROR_VID_INVALID_PPM_HANDLE: WIN32_ERROR = 3224829976u32; +pub const ERROR_VID_INVALID_PROCESSOR_STATE: WIN32_ERROR = 3224829981u32; +pub const ERROR_VID_KM_INTERFACE_ALREADY_INITIALIZED: WIN32_ERROR = 3224829983u32; +pub const ERROR_VID_MBPS_ARE_LOCKED: WIN32_ERROR = 3224829977u32; +pub const ERROR_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE: WIN32_ERROR = 3224829989u32; +pub const ERROR_VID_MBP_COUNT_EXCEEDED_LIMIT: WIN32_ERROR = 3224829990u32; +pub const ERROR_VID_MB_PROPERTY_ALREADY_SET_RESET: WIN32_ERROR = 3224829984u32; +pub const ERROR_VID_MB_STILL_REFERENCED: WIN32_ERROR = 3224829965u32; +pub const ERROR_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED: WIN32_ERROR = 3224829975u32; +pub const ERROR_VID_MEMORY_TYPE_NOT_SUPPORTED: WIN32_ERROR = 3224829998u32; +pub const ERROR_VID_MESSAGE_QUEUE_ALREADY_EXISTS: WIN32_ERROR = 3224829963u32; +pub const ERROR_VID_MESSAGE_QUEUE_CLOSED: WIN32_ERROR = 3224829978u32; +pub const ERROR_VID_MESSAGE_QUEUE_NAME_TOO_LONG: WIN32_ERROR = 3224829959u32; +pub const ERROR_VID_MMIO_RANGE_DESTROYED: WIN32_ERROR = 3224829985u32; +pub const ERROR_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED: WIN32_ERROR = 3224829969u32; +pub const ERROR_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE: WIN32_ERROR = 3224829974u32; +pub const ERROR_VID_PAGE_RANGE_OVERFLOW: WIN32_ERROR = 3224829971u32; +pub const ERROR_VID_PARTITION_ALREADY_EXISTS: WIN32_ERROR = 3224829960u32; +pub const ERROR_VID_PARTITION_DOES_NOT_EXIST: WIN32_ERROR = 3224829961u32; +pub const ERROR_VID_PARTITION_NAME_NOT_FOUND: WIN32_ERROR = 3224829962u32; +pub const ERROR_VID_PARTITION_NAME_TOO_LONG: WIN32_ERROR = 3224829958u32; +pub const ERROR_VID_PROCESS_ALREADY_SET: WIN32_ERROR = 3224830000u32; +pub const ERROR_VID_QUEUE_FULL: WIN32_ERROR = 3224829955u32; +pub const ERROR_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED: WIN32_ERROR = 2151088129u32; +pub const ERROR_VID_RESERVE_PAGE_SET_IS_BEING_USED: WIN32_ERROR = 3224829987u32; +pub const ERROR_VID_RESERVE_PAGE_SET_TOO_SMALL: WIN32_ERROR = 3224829988u32; +pub const ERROR_VID_SAVED_STATE_CORRUPT: WIN32_ERROR = 3224829991u32; +pub const ERROR_VID_SAVED_STATE_INCOMPATIBLE: WIN32_ERROR = 3224829993u32; +pub const ERROR_VID_SAVED_STATE_UNRECOGNIZED_ITEM: WIN32_ERROR = 3224829992u32; +pub const ERROR_VID_STOP_PENDING: WIN32_ERROR = 3224829980u32; +pub const ERROR_VID_TOO_MANY_HANDLERS: WIN32_ERROR = 3224829954u32; +pub const ERROR_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED: WIN32_ERROR = 3224829979u32; +pub const ERROR_VID_VTL_ACCESS_DENIED: WIN32_ERROR = 3224829994u32; +pub const ERROR_VIRTDISK_DISK_ALREADY_OWNED: WIN32_ERROR = 3225026590u32; +pub const ERROR_VIRTDISK_DISK_ONLINE_AND_WRITABLE: WIN32_ERROR = 3225026591u32; +pub const ERROR_VIRTDISK_NOT_VIRTUAL_DISK: WIN32_ERROR = 3225026581u32; +pub const ERROR_VIRTDISK_PROVIDER_NOT_FOUND: WIN32_ERROR = 3225026580u32; +pub const ERROR_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE: WIN32_ERROR = 3225026589u32; +pub const ERROR_VIRTUAL_DISK_LIMITATION: WIN32_ERROR = 3225026586u32; +pub const ERROR_VIRUS_DELETED: WIN32_ERROR = 226u32; +pub const ERROR_VIRUS_INFECTED: WIN32_ERROR = 225u32; +pub const ERROR_VMCOMPUTE_CONNECTION_CLOSED: WIN32_ERROR = 3224830218u32; +pub const ERROR_VMCOMPUTE_CONNECT_FAILED: WIN32_ERROR = 3224830216u32; +pub const ERROR_VMCOMPUTE_HYPERV_NOT_INSTALLED: WIN32_ERROR = 3224830210u32; +pub const ERROR_VMCOMPUTE_IMAGE_MISMATCH: WIN32_ERROR = 3224830209u32; +pub const ERROR_VMCOMPUTE_INVALID_JSON: WIN32_ERROR = 3224830221u32; +pub const ERROR_VMCOMPUTE_INVALID_LAYER: WIN32_ERROR = 3224830226u32; +pub const ERROR_VMCOMPUTE_INVALID_STATE: WIN32_ERROR = 3224830213u32; +pub const ERROR_VMCOMPUTE_OPERATION_PENDING: WIN32_ERROR = 3224830211u32; +pub const ERROR_VMCOMPUTE_PROTOCOL_ERROR: WIN32_ERROR = 3224830225u32; +pub const ERROR_VMCOMPUTE_SYSTEM_ALREADY_EXISTS: WIN32_ERROR = 3224830223u32; +pub const ERROR_VMCOMPUTE_SYSTEM_ALREADY_STOPPED: WIN32_ERROR = 3224830224u32; +pub const ERROR_VMCOMPUTE_SYSTEM_NOT_FOUND: WIN32_ERROR = 3224830222u32; +pub const ERROR_VMCOMPUTE_TERMINATED: WIN32_ERROR = 3224830215u32; +pub const ERROR_VMCOMPUTE_TERMINATED_DURING_START: WIN32_ERROR = 3224830208u32; +pub const ERROR_VMCOMPUTE_TIMEOUT: WIN32_ERROR = 3224830217u32; +pub const ERROR_VMCOMPUTE_TOO_MANY_NOTIFICATIONS: WIN32_ERROR = 3224830212u32; +pub const ERROR_VMCOMPUTE_UNEXPECTED_EXIT: WIN32_ERROR = 3224830214u32; +pub const ERROR_VMCOMPUTE_UNKNOWN_MESSAGE: WIN32_ERROR = 3224830219u32; +pub const ERROR_VMCOMPUTE_UNSUPPORTED_PROTOCOL_VERSION: WIN32_ERROR = 3224830220u32; +pub const ERROR_VMCOMPUTE_WINDOWS_INSIDER_REQUIRED: WIN32_ERROR = 3224830227u32; +pub const ERROR_VNET_VIRTUAL_SWITCH_NAME_NOT_FOUND: WIN32_ERROR = 3224830464u32; +pub const ERROR_VOLMGR_ALL_DISKS_FAILED: WIN32_ERROR = 3224895529u32; +pub const ERROR_VOLMGR_BAD_BOOT_DISK: WIN32_ERROR = 3224895567u32; +pub const ERROR_VOLMGR_DATABASE_FULL: WIN32_ERROR = 3224895489u32; +pub const ERROR_VOLMGR_DIFFERENT_SECTOR_SIZE: WIN32_ERROR = 3224895566u32; +pub const ERROR_VOLMGR_DISK_CONFIGURATION_CORRUPTED: WIN32_ERROR = 3224895490u32; +pub const ERROR_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC: WIN32_ERROR = 3224895491u32; +pub const ERROR_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME: WIN32_ERROR = 3224895493u32; +pub const ERROR_VOLMGR_DISK_DUPLICATE: WIN32_ERROR = 3224895494u32; +pub const ERROR_VOLMGR_DISK_DYNAMIC: WIN32_ERROR = 3224895495u32; +pub const ERROR_VOLMGR_DISK_ID_INVALID: WIN32_ERROR = 3224895496u32; +pub const ERROR_VOLMGR_DISK_INVALID: WIN32_ERROR = 3224895497u32; +pub const ERROR_VOLMGR_DISK_LAST_VOTER: WIN32_ERROR = 3224895498u32; +pub const ERROR_VOLMGR_DISK_LAYOUT_INVALID: WIN32_ERROR = 3224895499u32; +pub const ERROR_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS: WIN32_ERROR = 3224895500u32; +pub const ERROR_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED: WIN32_ERROR = 3224895501u32; +pub const ERROR_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL: WIN32_ERROR = 3224895502u32; +pub const ERROR_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS: WIN32_ERROR = 3224895503u32; +pub const ERROR_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS: WIN32_ERROR = 3224895504u32; +pub const ERROR_VOLMGR_DISK_MISSING: WIN32_ERROR = 3224895505u32; +pub const ERROR_VOLMGR_DISK_NOT_EMPTY: WIN32_ERROR = 3224895506u32; +pub const ERROR_VOLMGR_DISK_NOT_ENOUGH_SPACE: WIN32_ERROR = 3224895507u32; +pub const ERROR_VOLMGR_DISK_REVECTORING_FAILED: WIN32_ERROR = 3224895508u32; +pub const ERROR_VOLMGR_DISK_SECTOR_SIZE_INVALID: WIN32_ERROR = 3224895509u32; +pub const ERROR_VOLMGR_DISK_SET_NOT_CONTAINED: WIN32_ERROR = 3224895510u32; +pub const ERROR_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS: WIN32_ERROR = 3224895511u32; +pub const ERROR_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES: WIN32_ERROR = 3224895512u32; +pub const ERROR_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED: WIN32_ERROR = 3224895513u32; +pub const ERROR_VOLMGR_EXTENT_ALREADY_USED: WIN32_ERROR = 3224895514u32; +pub const ERROR_VOLMGR_EXTENT_NOT_CONTIGUOUS: WIN32_ERROR = 3224895515u32; +pub const ERROR_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION: WIN32_ERROR = 3224895516u32; +pub const ERROR_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED: WIN32_ERROR = 3224895517u32; +pub const ERROR_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION: WIN32_ERROR = 3224895518u32; +pub const ERROR_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH: WIN32_ERROR = 3224895519u32; +pub const ERROR_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED: WIN32_ERROR = 3224895520u32; +pub const ERROR_VOLMGR_INCOMPLETE_DISK_MIGRATION: WIN32_ERROR = 2151153666u32; +pub const ERROR_VOLMGR_INCOMPLETE_REGENERATION: WIN32_ERROR = 2151153665u32; +pub const ERROR_VOLMGR_INTERLEAVE_LENGTH_INVALID: WIN32_ERROR = 3224895521u32; +pub const ERROR_VOLMGR_MAXIMUM_REGISTERED_USERS: WIN32_ERROR = 3224895522u32; +pub const ERROR_VOLMGR_MEMBER_INDEX_DUPLICATE: WIN32_ERROR = 3224895524u32; +pub const ERROR_VOLMGR_MEMBER_INDEX_INVALID: WIN32_ERROR = 3224895525u32; +pub const ERROR_VOLMGR_MEMBER_IN_SYNC: WIN32_ERROR = 3224895523u32; +pub const ERROR_VOLMGR_MEMBER_MISSING: WIN32_ERROR = 3224895526u32; +pub const ERROR_VOLMGR_MEMBER_NOT_DETACHED: WIN32_ERROR = 3224895527u32; +pub const ERROR_VOLMGR_MEMBER_REGENERATING: WIN32_ERROR = 3224895528u32; +pub const ERROR_VOLMGR_MIRROR_NOT_SUPPORTED: WIN32_ERROR = 3224895579u32; +pub const ERROR_VOLMGR_NOTIFICATION_RESET: WIN32_ERROR = 3224895532u32; +pub const ERROR_VOLMGR_NOT_PRIMARY_PACK: WIN32_ERROR = 3224895570u32; +pub const ERROR_VOLMGR_NO_REGISTERED_USERS: WIN32_ERROR = 3224895530u32; +pub const ERROR_VOLMGR_NO_SUCH_USER: WIN32_ERROR = 3224895531u32; +pub const ERROR_VOLMGR_NO_VALID_LOG_COPIES: WIN32_ERROR = 3224895576u32; +pub const ERROR_VOLMGR_NUMBER_OF_DISKS_INVALID: WIN32_ERROR = 3224895578u32; +pub const ERROR_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID: WIN32_ERROR = 3224895573u32; +pub const ERROR_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID: WIN32_ERROR = 3224895572u32; +pub const ERROR_VOLMGR_NUMBER_OF_EXTENTS_INVALID: WIN32_ERROR = 3224895565u32; +pub const ERROR_VOLMGR_NUMBER_OF_MEMBERS_INVALID: WIN32_ERROR = 3224895533u32; +pub const ERROR_VOLMGR_NUMBER_OF_PLEXES_INVALID: WIN32_ERROR = 3224895534u32; +pub const ERROR_VOLMGR_PACK_CONFIG_OFFLINE: WIN32_ERROR = 3224895568u32; +pub const ERROR_VOLMGR_PACK_CONFIG_ONLINE: WIN32_ERROR = 3224895569u32; +pub const ERROR_VOLMGR_PACK_CONFIG_UPDATE_FAILED: WIN32_ERROR = 3224895492u32; +pub const ERROR_VOLMGR_PACK_DUPLICATE: WIN32_ERROR = 3224895535u32; +pub const ERROR_VOLMGR_PACK_HAS_QUORUM: WIN32_ERROR = 3224895540u32; +pub const ERROR_VOLMGR_PACK_ID_INVALID: WIN32_ERROR = 3224895536u32; +pub const ERROR_VOLMGR_PACK_INVALID: WIN32_ERROR = 3224895537u32; +pub const ERROR_VOLMGR_PACK_LOG_UPDATE_FAILED: WIN32_ERROR = 3224895571u32; +pub const ERROR_VOLMGR_PACK_NAME_INVALID: WIN32_ERROR = 3224895538u32; +pub const ERROR_VOLMGR_PACK_OFFLINE: WIN32_ERROR = 3224895539u32; +pub const ERROR_VOLMGR_PACK_WITHOUT_QUORUM: WIN32_ERROR = 3224895541u32; +pub const ERROR_VOLMGR_PARTITION_STYLE_INVALID: WIN32_ERROR = 3224895542u32; +pub const ERROR_VOLMGR_PARTITION_UPDATE_FAILED: WIN32_ERROR = 3224895543u32; +pub const ERROR_VOLMGR_PLEX_INDEX_DUPLICATE: WIN32_ERROR = 3224895545u32; +pub const ERROR_VOLMGR_PLEX_INDEX_INVALID: WIN32_ERROR = 3224895546u32; +pub const ERROR_VOLMGR_PLEX_IN_SYNC: WIN32_ERROR = 3224895544u32; +pub const ERROR_VOLMGR_PLEX_LAST_ACTIVE: WIN32_ERROR = 3224895547u32; +pub const ERROR_VOLMGR_PLEX_MISSING: WIN32_ERROR = 3224895548u32; +pub const ERROR_VOLMGR_PLEX_NOT_RAID5: WIN32_ERROR = 3224895551u32; +pub const ERROR_VOLMGR_PLEX_NOT_SIMPLE: WIN32_ERROR = 3224895552u32; +pub const ERROR_VOLMGR_PLEX_NOT_SIMPLE_SPANNED: WIN32_ERROR = 3224895575u32; +pub const ERROR_VOLMGR_PLEX_REGENERATING: WIN32_ERROR = 3224895549u32; +pub const ERROR_VOLMGR_PLEX_TYPE_INVALID: WIN32_ERROR = 3224895550u32; +pub const ERROR_VOLMGR_PRIMARY_PACK_PRESENT: WIN32_ERROR = 3224895577u32; +pub const ERROR_VOLMGR_RAID5_NOT_SUPPORTED: WIN32_ERROR = 3224895580u32; +pub const ERROR_VOLMGR_STRUCTURE_SIZE_INVALID: WIN32_ERROR = 3224895553u32; +pub const ERROR_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS: WIN32_ERROR = 3224895554u32; +pub const ERROR_VOLMGR_TRANSACTION_IN_PROGRESS: WIN32_ERROR = 3224895555u32; +pub const ERROR_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE: WIN32_ERROR = 3224895556u32; +pub const ERROR_VOLMGR_VOLUME_CONTAINS_MISSING_DISK: WIN32_ERROR = 3224895557u32; +pub const ERROR_VOLMGR_VOLUME_ID_INVALID: WIN32_ERROR = 3224895558u32; +pub const ERROR_VOLMGR_VOLUME_LENGTH_INVALID: WIN32_ERROR = 3224895559u32; +pub const ERROR_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE: WIN32_ERROR = 3224895560u32; +pub const ERROR_VOLMGR_VOLUME_MIRRORED: WIN32_ERROR = 3224895574u32; +pub const ERROR_VOLMGR_VOLUME_NOT_MIRRORED: WIN32_ERROR = 3224895561u32; +pub const ERROR_VOLMGR_VOLUME_NOT_RETAINED: WIN32_ERROR = 3224895562u32; +pub const ERROR_VOLMGR_VOLUME_OFFLINE: WIN32_ERROR = 3224895563u32; +pub const ERROR_VOLMGR_VOLUME_RETAINED: WIN32_ERROR = 3224895564u32; +pub const ERROR_VOLSNAP_ACTIVATION_TIMEOUT: windows_sys::core::HRESULT = 0x80820002_u32 as _; +pub const ERROR_VOLSNAP_BOOTFILE_NOT_VALID: windows_sys::core::HRESULT = 0x80820001_u32 as _; +pub const ERROR_VOLSNAP_HIBERNATE_READY: WIN32_ERROR = 761u32; +pub const ERROR_VOLSNAP_NO_BYPASSIO_WITH_SNAPSHOT: windows_sys::core::HRESULT = 0x80820003_u32 as _; +pub const ERROR_VOLSNAP_PREPARE_HIBERNATE: WIN32_ERROR = 655u32; +pub const ERROR_VOLUME_CONTAINS_SYS_FILES: WIN32_ERROR = 4337u32; +pub const ERROR_VOLUME_DIRTY: WIN32_ERROR = 6851u32; +pub const ERROR_VOLUME_MOUNTED: WIN32_ERROR = 743u32; +pub const ERROR_VOLUME_NOT_CLUSTER_ALIGNED: WIN32_ERROR = 407u32; +pub const ERROR_VOLUME_NOT_SIS_ENABLED: WIN32_ERROR = 4500u32; +pub const ERROR_VOLUME_NOT_SUPPORTED: WIN32_ERROR = 492u32; +pub const ERROR_VOLUME_NOT_SUPPORT_EFS: WIN32_ERROR = 6014u32; +pub const ERROR_VOLUME_UPGRADE_DISABLED: WIN32_ERROR = 517u32; +pub const ERROR_VOLUME_UPGRADE_DISABLED_TILL_OS_DOWNGRADE_EXPIRED: WIN32_ERROR = 518u32; +pub const ERROR_VOLUME_UPGRADE_NOT_NEEDED: WIN32_ERROR = 515u32; +pub const ERROR_VOLUME_UPGRADE_PENDING: WIN32_ERROR = 516u32; +pub const ERROR_VOLUME_WRITE_ACCESS_DENIED: WIN32_ERROR = 508u32; +pub const ERROR_VRF_VOLATILE_CFG_AND_IO_ENABLED: WIN32_ERROR = 3080u32; +pub const ERROR_VRF_VOLATILE_NMI_REGISTERED: WIN32_ERROR = 3086u32; +pub const ERROR_VRF_VOLATILE_NOT_RUNNABLE_SYSTEM: WIN32_ERROR = 3083u32; +pub const ERROR_VRF_VOLATILE_NOT_STOPPABLE: WIN32_ERROR = 3081u32; +pub const ERROR_VRF_VOLATILE_NOT_SUPPORTED_RULECLASS: WIN32_ERROR = 3084u32; +pub const ERROR_VRF_VOLATILE_PROTECTED_DRIVER: WIN32_ERROR = 3085u32; +pub const ERROR_VRF_VOLATILE_SAFE_MODE: WIN32_ERROR = 3082u32; +pub const ERROR_VRF_VOLATILE_SETTINGS_CONFLICT: WIN32_ERROR = 3087u32; +pub const ERROR_VSMB_SAVED_STATE_CORRUPT: WIN32_ERROR = 3224830977u32; +pub const ERROR_VSMB_SAVED_STATE_FILE_NOT_FOUND: WIN32_ERROR = 3224830976u32; +pub const ERROR_VSM_DMA_PROTECTION_NOT_IN_USE: WIN32_ERROR = 4561u32; +pub const ERROR_VSM_NOT_INITIALIZED: WIN32_ERROR = 4560u32; +pub const ERROR_WAIT_1: WIN32_ERROR = 731u32; +pub const ERROR_WAIT_2: WIN32_ERROR = 732u32; +pub const ERROR_WAIT_3: WIN32_ERROR = 733u32; +pub const ERROR_WAIT_63: WIN32_ERROR = 734u32; +pub const ERROR_WAIT_FOR_OPLOCK: WIN32_ERROR = 765u32; +pub const ERROR_WAIT_NO_CHILDREN: WIN32_ERROR = 128u32; +pub const ERROR_WAKE_SYSTEM: WIN32_ERROR = 730u32; +pub const ERROR_WAKE_SYSTEM_DEBUGGER: WIN32_ERROR = 675u32; +pub const ERROR_WAS_LOCKED: WIN32_ERROR = 717u32; +pub const ERROR_WAS_UNLOCKED: WIN32_ERROR = 715u32; +pub const ERROR_WEAK_WHFBKEY_BLOCKED: WIN32_ERROR = 8651u32; +pub const ERROR_WINDOW_NOT_COMBOBOX: WIN32_ERROR = 1423u32; +pub const ERROR_WINDOW_NOT_DIALOG: WIN32_ERROR = 1420u32; +pub const ERROR_WINDOW_OF_OTHER_THREAD: WIN32_ERROR = 1408u32; +pub const ERROR_WINS_INTERNAL: WIN32_ERROR = 4000u32; +pub const ERROR_WIP_ENCRYPTION_FAILED: WIN32_ERROR = 6023u32; +pub const ERROR_WMI_ALREADY_DISABLED: WIN32_ERROR = 4212u32; +pub const ERROR_WMI_ALREADY_ENABLED: WIN32_ERROR = 4206u32; +pub const ERROR_WMI_DP_FAILED: WIN32_ERROR = 4209u32; +pub const ERROR_WMI_DP_NOT_FOUND: WIN32_ERROR = 4204u32; +pub const ERROR_WMI_GUID_DISCONNECTED: WIN32_ERROR = 4207u32; +pub const ERROR_WMI_GUID_NOT_FOUND: WIN32_ERROR = 4200u32; +pub const ERROR_WMI_INSTANCE_NOT_FOUND: WIN32_ERROR = 4201u32; +pub const ERROR_WMI_INVALID_MOF: WIN32_ERROR = 4210u32; +pub const ERROR_WMI_INVALID_REGINFO: WIN32_ERROR = 4211u32; +pub const ERROR_WMI_ITEMID_NOT_FOUND: WIN32_ERROR = 4202u32; +pub const ERROR_WMI_READ_ONLY: WIN32_ERROR = 4213u32; +pub const ERROR_WMI_SERVER_UNAVAILABLE: WIN32_ERROR = 4208u32; +pub const ERROR_WMI_SET_FAILURE: WIN32_ERROR = 4214u32; +pub const ERROR_WMI_TRY_AGAIN: WIN32_ERROR = 4203u32; +pub const ERROR_WMI_UNRESOLVED_INSTANCE_REF: WIN32_ERROR = 4205u32; +pub const ERROR_WOF_FILE_RESOURCE_TABLE_CORRUPT: WIN32_ERROR = 4448u32; +pub const ERROR_WOF_WIM_HEADER_CORRUPT: WIN32_ERROR = 4446u32; +pub const ERROR_WOF_WIM_RESOURCE_TABLE_CORRUPT: WIN32_ERROR = 4447u32; +pub const ERROR_WORKING_SET_QUOTA: WIN32_ERROR = 1453u32; +pub const ERROR_WOW_ASSERTION: WIN32_ERROR = 670u32; +pub const ERROR_WRITE_FAULT: WIN32_ERROR = 29u32; +pub const ERROR_WRITE_PROTECT: WIN32_ERROR = 19u32; +pub const ERROR_WRONG_COMPARTMENT: WIN32_ERROR = 1468u32; +pub const ERROR_WRONG_DISK: WIN32_ERROR = 34u32; +pub const ERROR_WRONG_EFS: WIN32_ERROR = 6005u32; +pub const ERROR_WRONG_INF_STYLE: WIN32_ERROR = 3758096640u32; +pub const ERROR_WRONG_INF_TYPE: WIN32_ERROR = 3758096970u32; +pub const ERROR_WRONG_PASSWORD: WIN32_ERROR = 1323u32; +pub const ERROR_WRONG_TARGET_NAME: WIN32_ERROR = 1396u32; +pub const ERROR_WX86_ERROR: WIN32_ERROR = 540u32; +pub const ERROR_WX86_WARNING: WIN32_ERROR = 539u32; +pub const ERROR_XMLDSIG_ERROR: WIN32_ERROR = 1466u32; +pub const ERROR_XML_ENCODING_MISMATCH: WIN32_ERROR = 14100u32; +pub const ERROR_XML_PARSE_ERROR: WIN32_ERROR = 1465u32; +pub const EVENT_E_ALL_SUBSCRIBERS_FAILED: windows_sys::core::HRESULT = 0x80040201_u32 as _; +pub const EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT: windows_sys::core::HRESULT = 0x8004020E_u32 as _; +pub const EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT: windows_sys::core::HRESULT = 0x8004020D_u32 as _; +pub const EVENT_E_COMPLUS_NOT_INSTALLED: windows_sys::core::HRESULT = 0x8004020C_u32 as _; +pub const EVENT_E_FIRST: i32 = -2147220992i32; +pub const EVENT_E_INTERNALERROR: windows_sys::core::HRESULT = 0x80040206_u32 as _; +pub const EVENT_E_INTERNALEXCEPTION: windows_sys::core::HRESULT = 0x80040205_u32 as _; +pub const EVENT_E_INVALID_EVENT_CLASS_PARTITION: windows_sys::core::HRESULT = 0x8004020F_u32 as _; +pub const EVENT_E_INVALID_PER_USER_SID: windows_sys::core::HRESULT = 0x80040207_u32 as _; +pub const EVENT_E_LAST: i32 = -2147220961i32; +pub const EVENT_E_MISSING_EVENTCLASS: windows_sys::core::HRESULT = 0x8004020A_u32 as _; +pub const EVENT_E_NOT_ALL_REMOVED: windows_sys::core::HRESULT = 0x8004020B_u32 as _; +pub const EVENT_E_PER_USER_SID_NOT_LOGGED_ON: windows_sys::core::HRESULT = 0x80040210_u32 as _; +pub const EVENT_E_QUERYFIELD: windows_sys::core::HRESULT = 0x80040204_u32 as _; +pub const EVENT_E_QUERYSYNTAX: windows_sys::core::HRESULT = 0x80040203_u32 as _; +pub const EVENT_E_TOO_MANY_METHODS: windows_sys::core::HRESULT = 0x80040209_u32 as _; +pub const EVENT_E_USER_EXCEPTION: windows_sys::core::HRESULT = 0x80040208_u32 as _; +pub const EVENT_S_FIRST: i32 = 262656i32; +pub const EVENT_S_LAST: i32 = 262687i32; +pub const EVENT_S_NOSUBSCRIBERS: windows_sys::core::HRESULT = 0x40202_u32 as _; +pub const EVENT_S_SOME_SUBSCRIBERS_FAILED: windows_sys::core::HRESULT = 0x40200_u32 as _; +pub const EXCEPTION_ACCESS_VIOLATION: NTSTATUS = 0xC0000005_u32 as _; +pub const EXCEPTION_ARRAY_BOUNDS_EXCEEDED: NTSTATUS = 0xC000008C_u32 as _; +pub const EXCEPTION_BREAKPOINT: NTSTATUS = 0x80000003_u32 as _; +pub const EXCEPTION_DATATYPE_MISALIGNMENT: NTSTATUS = 0x80000002_u32 as _; +pub const EXCEPTION_FLT_DENORMAL_OPERAND: NTSTATUS = 0xC000008D_u32 as _; +pub const EXCEPTION_FLT_DIVIDE_BY_ZERO: NTSTATUS = 0xC000008E_u32 as _; +pub const EXCEPTION_FLT_INEXACT_RESULT: NTSTATUS = 0xC000008F_u32 as _; +pub const EXCEPTION_FLT_INVALID_OPERATION: NTSTATUS = 0xC0000090_u32 as _; +pub const EXCEPTION_FLT_OVERFLOW: NTSTATUS = 0xC0000091_u32 as _; +pub const EXCEPTION_FLT_STACK_CHECK: NTSTATUS = 0xC0000092_u32 as _; +pub const EXCEPTION_FLT_UNDERFLOW: NTSTATUS = 0xC0000093_u32 as _; +pub const EXCEPTION_GUARD_PAGE: NTSTATUS = 0x80000001_u32 as _; +pub const EXCEPTION_ILLEGAL_INSTRUCTION: NTSTATUS = 0xC000001D_u32 as _; +pub const EXCEPTION_INT_DIVIDE_BY_ZERO: NTSTATUS = 0xC0000094_u32 as _; +pub const EXCEPTION_INT_OVERFLOW: NTSTATUS = 0xC0000095_u32 as _; +pub const EXCEPTION_INVALID_DISPOSITION: NTSTATUS = 0xC0000026_u32 as _; +pub const EXCEPTION_INVALID_HANDLE: NTSTATUS = 0xC0000008_u32 as _; +pub const EXCEPTION_IN_PAGE_ERROR: NTSTATUS = 0xC0000006_u32 as _; +pub const EXCEPTION_NONCONTINUABLE_EXCEPTION: NTSTATUS = 0xC0000025_u32 as _; +pub const EXCEPTION_POSSIBLE_DEADLOCK: NTSTATUS = 0xC0000194_u32 as _; +pub const EXCEPTION_PRIV_INSTRUCTION: NTSTATUS = 0xC0000096_u32 as _; +pub const EXCEPTION_SINGLE_STEP: NTSTATUS = 0x80000004_u32 as _; +pub const EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW: NTSTATUS = 0xE0000300_u32 as _; +pub const EXCEPTION_STACK_OVERFLOW: NTSTATUS = 0xC00000FD_u32 as _; +pub const E_ABORT: windows_sys::core::HRESULT = 0x80004004_u32 as _; +pub const E_ACCESSDENIED: windows_sys::core::HRESULT = 0x80070005_u32 as _; +pub const E_APPLICATION_ACTIVATION_EXEC_FAILURE: windows_sys::core::HRESULT = 0x8027025B_u32 as _; +pub const E_APPLICATION_ACTIVATION_TIMED_OUT: windows_sys::core::HRESULT = 0x8027025A_u32 as _; +pub const E_APPLICATION_EXITING: windows_sys::core::HRESULT = 0x8000001A_u32 as _; +pub const E_APPLICATION_MANAGER_NOT_RUNNING: windows_sys::core::HRESULT = 0x80270257_u32 as _; +pub const E_APPLICATION_NOT_REGISTERED: windows_sys::core::HRESULT = 0x80270254_u32 as _; +pub const E_APPLICATION_TEMPORARY_LICENSE_ERROR: windows_sys::core::HRESULT = 0x8027025C_u32 as _; +pub const E_APPLICATION_TRIAL_LICENSE_EXPIRED: windows_sys::core::HRESULT = 0x8027025D_u32 as _; +pub const E_APPLICATION_VIEW_EXITING: windows_sys::core::HRESULT = 0x8000001B_u32 as _; +pub const E_ASYNC_OPERATION_NOT_STARTED: windows_sys::core::HRESULT = 0x80000019_u32 as _; +pub const E_AUDIO_ENGINE_NODE_NOT_FOUND: windows_sys::core::HRESULT = 0x80660001_u32 as _; +pub const E_BLUETOOTH_ATT_ATTRIBUTE_NOT_FOUND: windows_sys::core::HRESULT = 0x8065000A_u32 as _; +pub const E_BLUETOOTH_ATT_ATTRIBUTE_NOT_LONG: windows_sys::core::HRESULT = 0x8065000B_u32 as _; +pub const E_BLUETOOTH_ATT_INSUFFICIENT_AUTHENTICATION: windows_sys::core::HRESULT = 0x80650005_u32 as _; +pub const E_BLUETOOTH_ATT_INSUFFICIENT_AUTHORIZATION: windows_sys::core::HRESULT = 0x80650008_u32 as _; +pub const E_BLUETOOTH_ATT_INSUFFICIENT_ENCRYPTION: windows_sys::core::HRESULT = 0x8065000F_u32 as _; +pub const E_BLUETOOTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE: windows_sys::core::HRESULT = 0x8065000C_u32 as _; +pub const E_BLUETOOTH_ATT_INSUFFICIENT_RESOURCES: windows_sys::core::HRESULT = 0x80650011_u32 as _; +pub const E_BLUETOOTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH: windows_sys::core::HRESULT = 0x8065000D_u32 as _; +pub const E_BLUETOOTH_ATT_INVALID_HANDLE: windows_sys::core::HRESULT = 0x80650001_u32 as _; +pub const E_BLUETOOTH_ATT_INVALID_OFFSET: windows_sys::core::HRESULT = 0x80650007_u32 as _; +pub const E_BLUETOOTH_ATT_INVALID_PDU: windows_sys::core::HRESULT = 0x80650004_u32 as _; +pub const E_BLUETOOTH_ATT_PREPARE_QUEUE_FULL: windows_sys::core::HRESULT = 0x80650009_u32 as _; +pub const E_BLUETOOTH_ATT_READ_NOT_PERMITTED: windows_sys::core::HRESULT = 0x80650002_u32 as _; +pub const E_BLUETOOTH_ATT_REQUEST_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80650006_u32 as _; +pub const E_BLUETOOTH_ATT_UNKNOWN_ERROR: windows_sys::core::HRESULT = 0x80651000_u32 as _; +pub const E_BLUETOOTH_ATT_UNLIKELY: windows_sys::core::HRESULT = 0x8065000E_u32 as _; +pub const E_BLUETOOTH_ATT_UNSUPPORTED_GROUP_TYPE: windows_sys::core::HRESULT = 0x80650010_u32 as _; +pub const E_BLUETOOTH_ATT_WRITE_NOT_PERMITTED: windows_sys::core::HRESULT = 0x80650003_u32 as _; +pub const E_BOUNDS: windows_sys::core::HRESULT = 0x8000000B_u32 as _; +pub const E_CHANGED_STATE: windows_sys::core::HRESULT = 0x8000000C_u32 as _; +pub const E_ELEVATED_ACTIVATION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80270251_u32 as _; +pub const E_FAIL: windows_sys::core::HRESULT = 0x80004005_u32 as _; +pub const E_FULL_ADMIN_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80270253_u32 as _; +pub const E_HANDLE: windows_sys::core::HRESULT = 0x80070006_u32 as _; +pub const E_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80660003_u32 as _; +pub const E_HDAUDIO_EMPTY_CONNECTION_LIST: windows_sys::core::HRESULT = 0x80660002_u32 as _; +pub const E_HDAUDIO_NO_LOGICAL_DEVICES_CREATED: windows_sys::core::HRESULT = 0x80660004_u32 as _; +pub const E_HDAUDIO_NULL_LINKED_LIST_ENTRY: windows_sys::core::HRESULT = 0x80660005_u32 as _; +pub const E_ILLEGAL_DELEGATE_ASSIGNMENT: windows_sys::core::HRESULT = 0x80000018_u32 as _; +pub const E_ILLEGAL_METHOD_CALL: windows_sys::core::HRESULT = 0x8000000E_u32 as _; +pub const E_ILLEGAL_STATE_CHANGE: windows_sys::core::HRESULT = 0x8000000D_u32 as _; +pub const E_INVALIDARG: windows_sys::core::HRESULT = 0x80070057_u32 as _; +pub const E_INVALID_PROTOCOL_FORMAT: windows_sys::core::HRESULT = 0x83760002_u32 as _; +pub const E_INVALID_PROTOCOL_OPERATION: windows_sys::core::HRESULT = 0x83760001_u32 as _; +pub const E_MBN_BAD_SIM: windows_sys::core::HRESULT = 0x80548202_u32 as _; +pub const E_MBN_CONTEXT_NOT_ACTIVATED: windows_sys::core::HRESULT = 0x80548201_u32 as _; +pub const E_MBN_DATA_CLASS_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80548203_u32 as _; +pub const E_MBN_DEFAULT_PROFILE_EXIST: windows_sys::core::HRESULT = 0x80548219_u32 as _; +pub const E_MBN_FAILURE: windows_sys::core::HRESULT = 0x80548212_u32 as _; +pub const E_MBN_INVALID_ACCESS_STRING: windows_sys::core::HRESULT = 0x80548204_u32 as _; +pub const E_MBN_INVALID_CACHE: windows_sys::core::HRESULT = 0x8054820C_u32 as _; +pub const E_MBN_INVALID_PROFILE: windows_sys::core::HRESULT = 0x80548218_u32 as _; +pub const E_MBN_MAX_ACTIVATED_CONTEXTS: windows_sys::core::HRESULT = 0x80548205_u32 as _; +pub const E_MBN_NOT_REGISTERED: windows_sys::core::HRESULT = 0x8054820D_u32 as _; +pub const E_MBN_PACKET_SVC_DETACHED: windows_sys::core::HRESULT = 0x80548206_u32 as _; +pub const E_MBN_PIN_DISABLED: windows_sys::core::HRESULT = 0x80548211_u32 as _; +pub const E_MBN_PIN_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8054820F_u32 as _; +pub const E_MBN_PIN_REQUIRED: windows_sys::core::HRESULT = 0x80548210_u32 as _; +pub const E_MBN_PROVIDERS_NOT_FOUND: windows_sys::core::HRESULT = 0x8054820E_u32 as _; +pub const E_MBN_PROVIDER_NOT_VISIBLE: windows_sys::core::HRESULT = 0x80548207_u32 as _; +pub const E_MBN_RADIO_POWER_OFF: windows_sys::core::HRESULT = 0x80548208_u32 as _; +pub const E_MBN_SERVICE_NOT_ACTIVATED: windows_sys::core::HRESULT = 0x80548209_u32 as _; +pub const E_MBN_SIM_NOT_INSERTED: windows_sys::core::HRESULT = 0x8054820A_u32 as _; +pub const E_MBN_SMS_ENCODING_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80548220_u32 as _; +pub const E_MBN_SMS_FILTER_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80548221_u32 as _; +pub const E_MBN_SMS_FORMAT_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80548227_u32 as _; +pub const E_MBN_SMS_INVALID_MEMORY_INDEX: windows_sys::core::HRESULT = 0x80548222_u32 as _; +pub const E_MBN_SMS_LANG_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80548223_u32 as _; +pub const E_MBN_SMS_MEMORY_FAILURE: windows_sys::core::HRESULT = 0x80548224_u32 as _; +pub const E_MBN_SMS_MEMORY_FULL: windows_sys::core::HRESULT = 0x80548229_u32 as _; +pub const E_MBN_SMS_NETWORK_TIMEOUT: windows_sys::core::HRESULT = 0x80548225_u32 as _; +pub const E_MBN_SMS_OPERATION_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80548228_u32 as _; +pub const E_MBN_SMS_UNKNOWN_SMSC_ADDRESS: windows_sys::core::HRESULT = 0x80548226_u32 as _; +pub const E_MBN_VOICE_CALL_IN_PROGRESS: windows_sys::core::HRESULT = 0x8054820B_u32 as _; +pub const E_MONITOR_RESOLUTION_TOO_LOW: windows_sys::core::HRESULT = 0x80270250_u32 as _; +pub const E_MULTIPLE_EXTENSIONS_FOR_APPLICATION: windows_sys::core::HRESULT = 0x80270255_u32 as _; +pub const E_MULTIPLE_PACKAGES_FOR_FAMILY: windows_sys::core::HRESULT = 0x80270256_u32 as _; +pub const E_NOINTERFACE: windows_sys::core::HRESULT = 0x80004002_u32 as _; +pub const E_NOTIMPL: windows_sys::core::HRESULT = 0x80004001_u32 as _; +pub const E_OUTOFMEMORY: windows_sys::core::HRESULT = 0x8007000E_u32 as _; +pub const E_POINTER: windows_sys::core::HRESULT = 0x80004003_u32 as _; +pub const E_PROTOCOL_EXTENSIONS_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x83760003_u32 as _; +pub const E_PROTOCOL_VERSION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x83760005_u32 as _; +pub const E_SKYDRIVE_FILE_NOT_UPLOADED: windows_sys::core::HRESULT = 0x80270263_u32 as _; +pub const E_SKYDRIVE_ROOT_TARGET_CANNOT_INDEX: windows_sys::core::HRESULT = 0x80270262_u32 as _; +pub const E_SKYDRIVE_ROOT_TARGET_FILE_SYSTEM_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80270260_u32 as _; +pub const E_SKYDRIVE_ROOT_TARGET_OVERLAP: windows_sys::core::HRESULT = 0x80270261_u32 as _; +pub const E_SKYDRIVE_ROOT_TARGET_VOLUME_ROOT_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80270265_u32 as _; +pub const E_SKYDRIVE_UPDATE_AVAILABILITY_FAIL: windows_sys::core::HRESULT = 0x80270264_u32 as _; +pub const E_STRING_NOT_NULL_TERMINATED: windows_sys::core::HRESULT = 0x80000017_u32 as _; +pub const E_SUBPROTOCOL_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x83760004_u32 as _; +pub const E_SYNCENGINE_CLIENT_UPDATE_NEEDED: windows_sys::core::HRESULT = 0x8802D006_u32 as _; +pub const E_SYNCENGINE_FILE_IDENTIFIER_UNKNOWN: windows_sys::core::HRESULT = 0x8802C002_u32 as _; +pub const E_SYNCENGINE_FILE_SIZE_EXCEEDS_REMAINING_QUOTA: windows_sys::core::HRESULT = 0x8802B002_u32 as _; +pub const E_SYNCENGINE_FILE_SIZE_OVER_LIMIT: windows_sys::core::HRESULT = 0x8802B001_u32 as _; +pub const E_SYNCENGINE_FILE_SYNC_PARTNER_ERROR: windows_sys::core::HRESULT = 0x8802B005_u32 as _; +pub const E_SYNCENGINE_FOLDER_INACCESSIBLE: windows_sys::core::HRESULT = 0x8802D001_u32 as _; +pub const E_SYNCENGINE_FOLDER_IN_REDIRECTION: windows_sys::core::HRESULT = 0x8802D00B_u32 as _; +pub const E_SYNCENGINE_FOLDER_ITEM_COUNT_LIMIT_EXCEEDED: windows_sys::core::HRESULT = 0x8802B004_u32 as _; +pub const E_SYNCENGINE_PATH_LENGTH_LIMIT_EXCEEDED: windows_sys::core::HRESULT = 0x8802D004_u32 as _; +pub const E_SYNCENGINE_PROXY_AUTHENTICATION_REQUIRED: windows_sys::core::HRESULT = 0x8802D007_u32 as _; +pub const E_SYNCENGINE_REMOTE_PATH_LENGTH_LIMIT_EXCEEDED: windows_sys::core::HRESULT = 0x8802D005_u32 as _; +pub const E_SYNCENGINE_REQUEST_BLOCKED_BY_SERVICE: windows_sys::core::HRESULT = 0x8802C006_u32 as _; +pub const E_SYNCENGINE_REQUEST_BLOCKED_DUE_TO_CLIENT_ERROR: windows_sys::core::HRESULT = 0x8802C007_u32 as _; +pub const E_SYNCENGINE_SERVICE_AUTHENTICATION_FAILED: windows_sys::core::HRESULT = 0x8802C003_u32 as _; +pub const E_SYNCENGINE_SERVICE_RETURNED_UNEXPECTED_SIZE: windows_sys::core::HRESULT = 0x8802C005_u32 as _; +pub const E_SYNCENGINE_STORAGE_SERVICE_BLOCKED: windows_sys::core::HRESULT = 0x8802D00A_u32 as _; +pub const E_SYNCENGINE_STORAGE_SERVICE_PROVISIONING_FAILED: windows_sys::core::HRESULT = 0x8802D008_u32 as _; +pub const E_SYNCENGINE_SYNC_PAUSED_BY_SERVICE: windows_sys::core::HRESULT = 0x8802B006_u32 as _; +pub const E_SYNCENGINE_UNKNOWN_SERVICE_ERROR: windows_sys::core::HRESULT = 0x8802C004_u32 as _; +pub const E_SYNCENGINE_UNSUPPORTED_FILE_NAME: windows_sys::core::HRESULT = 0x8802B003_u32 as _; +pub const E_SYNCENGINE_UNSUPPORTED_FOLDER_NAME: windows_sys::core::HRESULT = 0x8802D002_u32 as _; +pub const E_SYNCENGINE_UNSUPPORTED_MARKET: windows_sys::core::HRESULT = 0x8802D003_u32 as _; +pub const E_SYNCENGINE_UNSUPPORTED_REPARSE_POINT: windows_sys::core::HRESULT = 0x8802D009_u32 as _; +pub const E_UAC_DISABLED: windows_sys::core::HRESULT = 0x80270252_u32 as _; +pub const E_UNEXPECTED: windows_sys::core::HRESULT = 0x8000FFFF_u32 as _; +pub const FACILITY_ACPI_ERROR_CODE: NTSTATUS_FACILITY_CODE = 20u32; +pub const FACILITY_APP_EXEC: NTSTATUS_FACILITY_CODE = 236u32; +pub const FACILITY_AUDIO_KERNEL: NTSTATUS_FACILITY_CODE = 68u32; +pub const FACILITY_BCD_ERROR_CODE: NTSTATUS_FACILITY_CODE = 57u32; +pub const FACILITY_BTH_ATT: NTSTATUS_FACILITY_CODE = 66u32; +pub const FACILITY_CLUSTER_ERROR_CODE: NTSTATUS_FACILITY_CODE = 19u32; +pub const FACILITY_CODCLASS_ERROR_CODE: NTSTATUS_FACILITY_CODE = 6u32; +pub const FACILITY_COMMONLOG: NTSTATUS_FACILITY_CODE = 26u32; +pub const FACILITY_DEBUGGER: NTSTATUS_FACILITY_CODE = 1u32; +pub const FACILITY_DRIVER_FRAMEWORK: NTSTATUS_FACILITY_CODE = 32u32; +pub const FACILITY_FILTER_MANAGER: NTSTATUS_FACILITY_CODE = 28u32; +pub const FACILITY_FIREWIRE_ERROR_CODE: NTSTATUS_FACILITY_CODE = 18u32; +pub const FACILITY_FVE_ERROR_CODE: NTSTATUS_FACILITY_CODE = 33u32; +pub const FACILITY_FWP_ERROR_CODE: NTSTATUS_FACILITY_CODE = 34u32; +pub const FACILITY_GRAPHICS_KERNEL: NTSTATUS_FACILITY_CODE = 30u32; +pub const FACILITY_HID_ERROR_CODE: NTSTATUS_FACILITY_CODE = 17u32; +pub const FACILITY_HYPERVISOR: NTSTATUS_FACILITY_CODE = 53u32; +pub const FACILITY_INTERIX: NTSTATUS_FACILITY_CODE = 153u32; +pub const FACILITY_IO_ERROR_CODE: NTSTATUS_FACILITY_CODE = 4u32; +pub const FACILITY_IPSEC: NTSTATUS_FACILITY_CODE = 54u32; +pub const FACILITY_LICENSING: NTSTATUS_FACILITY_CODE = 234u32; +pub const FACILITY_MAXIMUM_VALUE: NTSTATUS_FACILITY_CODE = 237u32; +pub const FACILITY_MCA_ERROR_CODE: NTSTATUS_FACILITY_CODE = 5u32; +pub const FACILITY_MONITOR: NTSTATUS_FACILITY_CODE = 29u32; +pub const FACILITY_NDIS_ERROR_CODE: NTSTATUS_FACILITY_CODE = 35u32; +pub const FACILITY_NTCERT: NTSTATUS_FACILITY_CODE = 8u32; +pub const FACILITY_NTSSPI: NTSTATUS_FACILITY_CODE = 9u32; +pub const FACILITY_NTWIN32: NTSTATUS_FACILITY_CODE = 7u32; +pub const FACILITY_NT_IORING: NTSTATUS_FACILITY_CODE = 70u32; +pub const FACILITY_PLATFORM_MANIFEST: NTSTATUS_FACILITY_CODE = 235u32; +pub const FACILITY_QUIC_ERROR_CODE: NTSTATUS_FACILITY_CODE = 36u32; +pub const FACILITY_RDBSS: NTSTATUS_FACILITY_CODE = 65u32; +pub const FACILITY_RESUME_KEY_FILTER: NTSTATUS_FACILITY_CODE = 64u32; +pub const FACILITY_RPC_RUNTIME: NTSTATUS_FACILITY_CODE = 2u32; +pub const FACILITY_RPC_STUBS: NTSTATUS_FACILITY_CODE = 3u32; +pub const FACILITY_RTPM: NTSTATUS_FACILITY_CODE = 42u32; +pub const FACILITY_SDBUS: NTSTATUS_FACILITY_CODE = 81u32; +pub const FACILITY_SECUREBOOT: NTSTATUS_FACILITY_CODE = 67u32; +pub const FACILITY_SECURITY_CORE: NTSTATUS_FACILITY_CODE = 232u32; +pub const FACILITY_SHARED_VHDX: NTSTATUS_FACILITY_CODE = 92u32; +pub const FACILITY_SMB: NTSTATUS_FACILITY_CODE = 93u32; +pub const FACILITY_SPACES: NTSTATUS_FACILITY_CODE = 231u32; +pub const FACILITY_SXS_ERROR_CODE: NTSTATUS_FACILITY_CODE = 21u32; +pub const FACILITY_SYSTEM_INTEGRITY: NTSTATUS_FACILITY_CODE = 233u32; +pub const FACILITY_TERMINAL_SERVER: NTSTATUS_FACILITY_CODE = 10u32; +pub const FACILITY_TPM: NTSTATUS_FACILITY_CODE = 41u32; +pub const FACILITY_TRANSACTION: NTSTATUS_FACILITY_CODE = 25u32; +pub const FACILITY_USB_ERROR_CODE: NTSTATUS_FACILITY_CODE = 16u32; +pub const FACILITY_VIDEO: NTSTATUS_FACILITY_CODE = 27u32; +pub const FACILITY_VIRTUALIZATION: NTSTATUS_FACILITY_CODE = 55u32; +pub const FACILITY_VOLMGR: NTSTATUS_FACILITY_CODE = 56u32; +pub const FACILITY_VOLSNAP: NTSTATUS_FACILITY_CODE = 80u32; +pub const FACILITY_VSM: NTSTATUS_FACILITY_CODE = 69u32; +pub const FACILITY_WIN32K_NTGDI: NTSTATUS_FACILITY_CODE = 63u32; +pub const FACILITY_WIN32K_NTUSER: NTSTATUS_FACILITY_CODE = 62u32; +pub const FACILITY_XVS: NTSTATUS_FACILITY_CODE = 94u32; +pub const FACILTIY_MUI_ERROR_CODE: u32 = 11u32; +pub const FALSE: windows_sys::core::BOOL = 0i32; +pub type FARPROC = Option isize>; +pub const FA_E_HOMEGROUP_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80270222_u32 as _; +pub const FA_E_MAX_PERSISTED_ITEMS_REACHED: windows_sys::core::HRESULT = 0x80270220_u32 as _; +pub const FDAEMON_E_CHANGEUPDATEFAILED: windows_sys::core::HRESULT = 0x80041684_u32 as _; +pub const FDAEMON_E_FATALERROR: windows_sys::core::HRESULT = 0x80041682_u32 as _; +pub const FDAEMON_E_LOWRESOURCE: windows_sys::core::HRESULT = 0x80041681_u32 as _; +pub const FDAEMON_E_NOWORDLIST: windows_sys::core::HRESULT = 0x80041687_u32 as _; +pub const FDAEMON_E_PARTITIONDELETED: windows_sys::core::HRESULT = 0x80041683_u32 as _; +pub const FDAEMON_E_TOOMANYFILTEREDBLOCKS: windows_sys::core::HRESULT = 0x80041688_u32 as _; +pub const FDAEMON_E_WORDLISTCOMMITFAILED: windows_sys::core::HRESULT = 0x80041686_u32 as _; +pub const FDAEMON_W_EMPTYWORDLIST: windows_sys::core::HRESULT = 0x41685_u32 as _; +pub const FDAEMON_W_WORDLISTFULL: windows_sys::core::HRESULT = 0x41680_u32 as _; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct FILETIME { + pub dwLowDateTime: u32, + pub dwHighDateTime: u32, +} +pub const FILTER_E_ALREADY_OPEN: windows_sys::core::HRESULT = 0x80041736_u32 as _; +pub const FILTER_E_CONTENTINDEXCORRUPT: windows_sys::core::HRESULT = 0xC0041734_u32 as _; +pub const FILTER_E_IN_USE: windows_sys::core::HRESULT = 0x80041738_u32 as _; +pub const FILTER_E_NOT_OPEN: windows_sys::core::HRESULT = 0x80041739_u32 as _; +pub const FILTER_E_NO_SUCH_PROPERTY: windows_sys::core::HRESULT = 0x8004173B_u32 as _; +pub const FILTER_E_OFFLINE: windows_sys::core::HRESULT = 0x8004173D_u32 as _; +pub const FILTER_E_PARTIALLY_FILTERED: windows_sys::core::HRESULT = 0x8004173E_u32 as _; +pub const FILTER_E_TOO_BIG: windows_sys::core::HRESULT = 0x80041730_u32 as _; +pub const FILTER_E_UNREACHABLE: windows_sys::core::HRESULT = 0x80041737_u32 as _; +pub const FILTER_S_CONTENTSCAN_DELAYED: windows_sys::core::HRESULT = 0x41733_u32 as _; +pub const FILTER_S_DISK_FULL: windows_sys::core::HRESULT = 0x41735_u32 as _; +pub const FILTER_S_FULL_CONTENTSCAN_IMMEDIATE: windows_sys::core::HRESULT = 0x41732_u32 as _; +pub const FILTER_S_NO_PROPSETS: windows_sys::core::HRESULT = 0x4173A_u32 as _; +pub const FILTER_S_NO_SECURITY_DESCRIPTOR: windows_sys::core::HRESULT = 0x4173C_u32 as _; +pub const FILTER_S_PARTIAL_CONTENTSCAN_IMMEDIATE: windows_sys::core::HRESULT = 0x41731_u32 as _; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct FLOAT128 { + pub LowPart: i64, + pub HighPart: i64, +} +pub const FRS_ERR_AUTHENTICATION: i32 = 8008i32; +pub const FRS_ERR_CHILD_TO_PARENT_COMM: i32 = 8011i32; +pub const FRS_ERR_INSUFFICIENT_PRIV: i32 = 8007i32; +pub const FRS_ERR_INTERNAL: i32 = 8005i32; +pub const FRS_ERR_INTERNAL_API: i32 = 8004i32; +pub const FRS_ERR_INVALID_API_SEQUENCE: i32 = 8001i32; +pub const FRS_ERR_INVALID_SERVICE_PARAMETER: i32 = 8017i32; +pub const FRS_ERR_PARENT_AUTHENTICATION: i32 = 8010i32; +pub const FRS_ERR_PARENT_INSUFFICIENT_PRIV: i32 = 8009i32; +pub const FRS_ERR_PARENT_TO_CHILD_COMM: i32 = 8012i32; +pub const FRS_ERR_SERVICE_COMM: i32 = 8006i32; +pub const FRS_ERR_STARTING_SERVICE: i32 = 8002i32; +pub const FRS_ERR_STOPPING_SERVICE: i32 = 8003i32; +pub const FRS_ERR_SYSVOL_DEMOTE: i32 = 8016i32; +pub const FRS_ERR_SYSVOL_IS_BUSY: i32 = 8015i32; +pub const FRS_ERR_SYSVOL_POPULATE: i32 = 8013i32; +pub const FRS_ERR_SYSVOL_POPULATE_TIMEOUT: i32 = 8014i32; +pub const FVE_E_AAD_ENDPOINT_BUSY: windows_sys::core::HRESULT = 0x803100E1_u32 as _; +pub const FVE_E_AAD_SERVER_FAIL_BACKOFF: windows_sys::core::HRESULT = 0x803100EA_u32 as _; +pub const FVE_E_AAD_SERVER_FAIL_RETRY_AFTER: windows_sys::core::HRESULT = 0x803100E9_u32 as _; +pub const FVE_E_ACTION_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310009_u32 as _; +pub const FVE_E_ADBACKUP_NOT_ENABLED: windows_sys::core::HRESULT = 0x803100D5_u32 as _; +pub const FVE_E_AD_ATTR_NOT_SET: windows_sys::core::HRESULT = 0x8031000E_u32 as _; +pub const FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_FIXED_DRIVE: windows_sys::core::HRESULT = 0x803100DB_u32 as _; +pub const FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_OS_DRIVE: windows_sys::core::HRESULT = 0x803100DA_u32 as _; +pub const FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_REMOVABLE_DRIVE: windows_sys::core::HRESULT = 0x803100DC_u32 as _; +pub const FVE_E_AD_GUID_NOT_FOUND: windows_sys::core::HRESULT = 0x8031000F_u32 as _; +pub const FVE_E_AD_INSUFFICIENT_BUFFER: windows_sys::core::HRESULT = 0x8031001A_u32 as _; +pub const FVE_E_AD_INVALID_DATASIZE: windows_sys::core::HRESULT = 0x8031000C_u32 as _; +pub const FVE_E_AD_INVALID_DATATYPE: windows_sys::core::HRESULT = 0x8031000B_u32 as _; +pub const FVE_E_AD_NO_VALUES: windows_sys::core::HRESULT = 0x8031000D_u32 as _; +pub const FVE_E_AD_SCHEMA_NOT_INSTALLED: windows_sys::core::HRESULT = 0x8031000A_u32 as _; +pub const FVE_E_AUTH_INVALID_APPLICATION: windows_sys::core::HRESULT = 0x80310044_u32 as _; +pub const FVE_E_AUTH_INVALID_CONFIG: windows_sys::core::HRESULT = 0x80310045_u32 as _; +pub const FVE_E_AUTOUNLOCK_ENABLED: windows_sys::core::HRESULT = 0x80310029_u32 as _; +pub const FVE_E_BAD_DATA: windows_sys::core::HRESULT = 0x80310016_u32 as _; +pub const FVE_E_BAD_INFORMATION: windows_sys::core::HRESULT = 0x80310010_u32 as _; +pub const FVE_E_BAD_PARTITION_SIZE: windows_sys::core::HRESULT = 0x80310014_u32 as _; +pub const FVE_E_BCD_APPLICATIONS_PATH_INCORRECT: windows_sys::core::HRESULT = 0x80310052_u32 as _; +pub const FVE_E_BOOTABLE_CDDVD: windows_sys::core::HRESULT = 0x80310030_u32 as _; +pub const FVE_E_BUFFER_TOO_LARGE: windows_sys::core::HRESULT = 0x803100CF_u32 as _; +pub const FVE_E_CANNOT_ENCRYPT_NO_KEY: windows_sys::core::HRESULT = 0x8031002E_u32 as _; +pub const FVE_E_CANNOT_SET_FVEK_ENCRYPTED: windows_sys::core::HRESULT = 0x8031002D_u32 as _; +pub const FVE_E_CANT_LOCK_AUTOUNLOCK_ENABLED_VOLUME: windows_sys::core::HRESULT = 0x80310097_u32 as _; +pub const FVE_E_CLUSTERING_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8031001E_u32 as _; +pub const FVE_E_CONV_READ: windows_sys::core::HRESULT = 0x8031001B_u32 as _; +pub const FVE_E_CONV_RECOVERY_FAILED: windows_sys::core::HRESULT = 0x80310088_u32 as _; +pub const FVE_E_CONV_WRITE: windows_sys::core::HRESULT = 0x8031001C_u32 as _; +pub const FVE_E_DATASET_FULL: windows_sys::core::HRESULT = 0x803100EB_u32 as _; +pub const FVE_E_DEBUGGER_ENABLED: windows_sys::core::HRESULT = 0x8031004F_u32 as _; +pub const FVE_E_DEVICELOCKOUT_COUNTER_MISMATCH: windows_sys::core::HRESULT = 0x803100CE_u32 as _; +pub const FVE_E_DEVICE_LOCKOUT_COUNTER_UNAVAILABLE: windows_sys::core::HRESULT = 0x803100CD_u32 as _; +pub const FVE_E_DEVICE_NOT_JOINED: windows_sys::core::HRESULT = 0x803100E0_u32 as _; +pub const FVE_E_DE_DEVICE_LOCKEDOUT: windows_sys::core::HRESULT = 0x803100CA_u32 as _; +pub const FVE_E_DE_FIXED_DATA_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803100C5_u32 as _; +pub const FVE_E_DE_HARDWARE_NOT_COMPLIANT: windows_sys::core::HRESULT = 0x803100C6_u32 as _; +pub const FVE_E_DE_OS_VOLUME_NOT_PROTECTED: windows_sys::core::HRESULT = 0x803100C9_u32 as _; +pub const FVE_E_DE_PREVENTED_FOR_OS: windows_sys::core::HRESULT = 0x803100D1_u32 as _; +pub const FVE_E_DE_PROTECTION_NOT_YET_ENABLED: windows_sys::core::HRESULT = 0x803100CB_u32 as _; +pub const FVE_E_DE_PROTECTION_SUSPENDED: windows_sys::core::HRESULT = 0x803100C8_u32 as _; +pub const FVE_E_DE_VOLUME_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803100D3_u32 as _; +pub const FVE_E_DE_VOLUME_OPTED_OUT: windows_sys::core::HRESULT = 0x803100D2_u32 as _; +pub const FVE_E_DE_WINRE_NOT_CONFIGURED: windows_sys::core::HRESULT = 0x803100C7_u32 as _; +pub const FVE_E_DRY_RUN_FAILED: windows_sys::core::HRESULT = 0x8031004D_u32 as _; +pub const FVE_E_DV_NOT_ALLOWED_BY_GP: windows_sys::core::HRESULT = 0x80310071_u32 as _; +pub const FVE_E_DV_NOT_SUPPORTED_ON_FS: windows_sys::core::HRESULT = 0x80310070_u32 as _; +pub const FVE_E_EDRIVE_BAND_ENUMERATION_FAILED: windows_sys::core::HRESULT = 0x803100E3_u32 as _; +pub const FVE_E_EDRIVE_BAND_IN_USE: windows_sys::core::HRESULT = 0x803100B0_u32 as _; +pub const FVE_E_EDRIVE_DISALLOWED_BY_GP: windows_sys::core::HRESULT = 0x803100B1_u32 as _; +pub const FVE_E_EDRIVE_DRY_RUN_FAILED: windows_sys::core::HRESULT = 0x803100BC_u32 as _; +pub const FVE_E_EDRIVE_DV_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803100B4_u32 as _; +pub const FVE_E_EDRIVE_INCOMPATIBLE_FIRMWARE: windows_sys::core::HRESULT = 0x803100BF_u32 as _; +pub const FVE_E_EDRIVE_INCOMPATIBLE_VOLUME: windows_sys::core::HRESULT = 0x803100B2_u32 as _; +pub const FVE_E_EDRIVE_NO_FAILOVER_TO_SW: windows_sys::core::HRESULT = 0x803100AF_u32 as _; +pub const FVE_E_EFI_ONLY: windows_sys::core::HRESULT = 0x8031009C_u32 as _; +pub const FVE_E_ENH_PIN_INVALID: windows_sys::core::HRESULT = 0x80310099_u32 as _; +pub const FVE_E_EOW_NOT_SUPPORTED_IN_VERSION: windows_sys::core::HRESULT = 0x803100D4_u32 as _; +pub const FVE_E_EXECUTE_REQUEST_SENT_TOO_SOON: windows_sys::core::HRESULT = 0x803100DE_u32 as _; +pub const FVE_E_FAILED_AUTHENTICATION: windows_sys::core::HRESULT = 0x80310027_u32 as _; +pub const FVE_E_FAILED_SECTOR_SIZE: windows_sys::core::HRESULT = 0x80310026_u32 as _; +pub const FVE_E_FAILED_WRONG_FS: windows_sys::core::HRESULT = 0x80310013_u32 as _; +pub const FVE_E_FIPS_DISABLE_PROTECTION_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310046_u32 as _; +pub const FVE_E_FIPS_HASH_KDF_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310098_u32 as _; +pub const FVE_E_FIPS_PREVENTS_EXTERNAL_KEY_EXPORT: windows_sys::core::HRESULT = 0x80310038_u32 as _; +pub const FVE_E_FIPS_PREVENTS_PASSPHRASE: windows_sys::core::HRESULT = 0x8031006C_u32 as _; +pub const FVE_E_FIPS_PREVENTS_RECOVERY_PASSWORD: windows_sys::core::HRESULT = 0x80310037_u32 as _; +pub const FVE_E_FIPS_RNG_CHECK_FAILED: windows_sys::core::HRESULT = 0x80310036_u32 as _; +pub const FVE_E_FIRMWARE_TYPE_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80310048_u32 as _; +pub const FVE_E_FOREIGN_VOLUME: windows_sys::core::HRESULT = 0x80310023_u32 as _; +pub const FVE_E_FS_MOUNTED: windows_sys::core::HRESULT = 0x8031004B_u32 as _; +pub const FVE_E_FS_NOT_EXTENDED: windows_sys::core::HRESULT = 0x80310047_u32 as _; +pub const FVE_E_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE: windows_sys::core::HRESULT = 0x803100A5_u32 as _; +pub const FVE_E_HIDDEN_VOLUME: windows_sys::core::HRESULT = 0x80310056_u32 as _; +pub const FVE_E_INVALID_BITLOCKER_OID: windows_sys::core::HRESULT = 0x8031006E_u32 as _; +pub const FVE_E_INVALID_DATUM_TYPE: windows_sys::core::HRESULT = 0x8031009B_u32 as _; +pub const FVE_E_INVALID_KEY_FORMAT: windows_sys::core::HRESULT = 0x80310034_u32 as _; +pub const FVE_E_INVALID_NBP_CERT: windows_sys::core::HRESULT = 0x803100E2_u32 as _; +pub const FVE_E_INVALID_NKP_CERT: windows_sys::core::HRESULT = 0x8031009F_u32 as _; +pub const FVE_E_INVALID_PASSWORD_FORMAT: windows_sys::core::HRESULT = 0x80310035_u32 as _; +pub const FVE_E_INVALID_PIN_CHARS: windows_sys::core::HRESULT = 0x8031009A_u32 as _; +pub const FVE_E_INVALID_PIN_CHARS_DETAILED: windows_sys::core::HRESULT = 0x803100CC_u32 as _; +pub const FVE_E_INVALID_PROTECTOR_TYPE: windows_sys::core::HRESULT = 0x8031003A_u32 as _; +pub const FVE_E_INVALID_STARTUP_OPTIONS: windows_sys::core::HRESULT = 0x8031005B_u32 as _; +pub const FVE_E_KEYFILE_INVALID: windows_sys::core::HRESULT = 0x8031003D_u32 as _; +pub const FVE_E_KEYFILE_NOT_FOUND: windows_sys::core::HRESULT = 0x8031003C_u32 as _; +pub const FVE_E_KEYFILE_NO_VMK: windows_sys::core::HRESULT = 0x8031003E_u32 as _; +pub const FVE_E_KEY_LENGTH_NOT_SUPPORTED_BY_EDRIVE: windows_sys::core::HRESULT = 0x803100A7_u32 as _; +pub const FVE_E_KEY_PROTECTOR_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80310069_u32 as _; +pub const FVE_E_KEY_REQUIRED: windows_sys::core::HRESULT = 0x8031001D_u32 as _; +pub const FVE_E_KEY_ROTATION_NOT_ENABLED: windows_sys::core::HRESULT = 0x803100DF_u32 as _; +pub const FVE_E_KEY_ROTATION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803100DD_u32 as _; +pub const FVE_E_LIVEID_ACCOUNT_BLOCKED: windows_sys::core::HRESULT = 0x803100C3_u32 as _; +pub const FVE_E_LIVEID_ACCOUNT_SUSPENDED: windows_sys::core::HRESULT = 0x803100C2_u32 as _; +pub const FVE_E_LOCKED_VOLUME: windows_sys::core::HRESULT = 0x80310000_u32 as _; +pub const FVE_E_METADATA_FULL: windows_sys::core::HRESULT = 0x803100EC_u32 as _; +pub const FVE_E_MOR_FAILED: windows_sys::core::HRESULT = 0x80310055_u32 as _; +pub const FVE_E_MULTIPLE_NKP_CERTS: windows_sys::core::HRESULT = 0x8031009D_u32 as _; +pub const FVE_E_NON_BITLOCKER_KU: windows_sys::core::HRESULT = 0x80310093_u32 as _; +pub const FVE_E_NON_BITLOCKER_OID: windows_sys::core::HRESULT = 0x80310085_u32 as _; +pub const FVE_E_NOT_ACTIVATED: windows_sys::core::HRESULT = 0x80310008_u32 as _; +pub const FVE_E_NOT_ALLOWED_IN_SAFE_MODE: windows_sys::core::HRESULT = 0x80310040_u32 as _; +pub const FVE_E_NOT_ALLOWED_IN_VERSION: windows_sys::core::HRESULT = 0x80310053_u32 as _; +pub const FVE_E_NOT_ALLOWED_ON_CLUSTER: windows_sys::core::HRESULT = 0x803100AE_u32 as _; +pub const FVE_E_NOT_ALLOWED_ON_CSV_STACK: windows_sys::core::HRESULT = 0x803100AD_u32 as _; +pub const FVE_E_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING: windows_sys::core::HRESULT = 0x803100B3_u32 as _; +pub const FVE_E_NOT_DATA_VOLUME: windows_sys::core::HRESULT = 0x80310019_u32 as _; +pub const FVE_E_NOT_DECRYPTED: windows_sys::core::HRESULT = 0x80310039_u32 as _; +pub const FVE_E_NOT_DE_VOLUME: windows_sys::core::HRESULT = 0x803100D7_u32 as _; +pub const FVE_E_NOT_ENCRYPTED: windows_sys::core::HRESULT = 0x80310001_u32 as _; +pub const FVE_E_NOT_ON_STACK: windows_sys::core::HRESULT = 0x8031004A_u32 as _; +pub const FVE_E_NOT_OS_VOLUME: windows_sys::core::HRESULT = 0x80310028_u32 as _; +pub const FVE_E_NOT_PROVISIONED_ON_ALL_VOLUMES: windows_sys::core::HRESULT = 0x803100C4_u32 as _; +pub const FVE_E_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80310015_u32 as _; +pub const FVE_E_NO_AUTOUNLOCK_MASTER_KEY: windows_sys::core::HRESULT = 0x80310054_u32 as _; +pub const FVE_E_NO_BOOTMGR_METRIC: windows_sys::core::HRESULT = 0x80310005_u32 as _; +pub const FVE_E_NO_BOOTSECTOR_METRIC: windows_sys::core::HRESULT = 0x80310004_u32 as _; +pub const FVE_E_NO_EXISTING_PASSPHRASE: windows_sys::core::HRESULT = 0x803100A8_u32 as _; +pub const FVE_E_NO_EXISTING_PIN: windows_sys::core::HRESULT = 0x803100A0_u32 as _; +pub const FVE_E_NO_FEATURE_LICENSE: windows_sys::core::HRESULT = 0x8031005A_u32 as _; +pub const FVE_E_NO_LICENSE: windows_sys::core::HRESULT = 0x80310049_u32 as _; +pub const FVE_E_NO_MBR_METRIC: windows_sys::core::HRESULT = 0x80310003_u32 as _; +pub const FVE_E_NO_PASSPHRASE_WITH_TPM: windows_sys::core::HRESULT = 0x803100AB_u32 as _; +pub const FVE_E_NO_PREBOOT_KEYBOARD_DETECTED: windows_sys::core::HRESULT = 0x803100B5_u32 as _; +pub const FVE_E_NO_PREBOOT_KEYBOARD_OR_WINRE_DETECTED: windows_sys::core::HRESULT = 0x803100B6_u32 as _; +pub const FVE_E_NO_PROTECTORS_TO_TEST: windows_sys::core::HRESULT = 0x8031003B_u32 as _; +pub const FVE_E_NO_SUCH_CAPABILITY_ON_TARGET: windows_sys::core::HRESULT = 0x803100D0_u32 as _; +pub const FVE_E_NO_TPM_BIOS: windows_sys::core::HRESULT = 0x80310002_u32 as _; +pub const FVE_E_NO_TPM_WITH_PASSPHRASE: windows_sys::core::HRESULT = 0x803100AC_u32 as _; +pub const FVE_E_OPERATION_NOT_SUPPORTED_ON_VISTA_VOLUME: windows_sys::core::HRESULT = 0x80310096_u32 as _; +pub const FVE_E_OSV_KSR_NOT_ALLOWED: windows_sys::core::HRESULT = 0x803100D9_u32 as _; +pub const FVE_E_OS_NOT_PROTECTED: windows_sys::core::HRESULT = 0x80310020_u32 as _; +pub const FVE_E_OS_VOLUME_PASSPHRASE_NOT_ALLOWED: windows_sys::core::HRESULT = 0x8031006D_u32 as _; +pub const FVE_E_OVERLAPPED_UPDATE: windows_sys::core::HRESULT = 0x80310024_u32 as _; +pub const FVE_E_PASSPHRASE_PROTECTOR_CHANGE_BY_STD_USER_DISALLOWED: windows_sys::core::HRESULT = 0x803100C1_u32 as _; +pub const FVE_E_PASSPHRASE_TOO_LONG: windows_sys::core::HRESULT = 0x803100AA_u32 as _; +pub const FVE_E_PIN_INVALID: windows_sys::core::HRESULT = 0x80310043_u32 as _; +pub const FVE_E_PIN_PROTECTOR_CHANGE_BY_STD_USER_DISALLOWED: windows_sys::core::HRESULT = 0x803100A2_u32 as _; +pub const FVE_E_POLICY_CONFLICT_FDV_RK_OFF_AUK_ON: windows_sys::core::HRESULT = 0x80310083_u32 as _; +pub const FVE_E_POLICY_CONFLICT_FDV_RP_OFF_ADB_ON: windows_sys::core::HRESULT = 0x80310091_u32 as _; +pub const FVE_E_POLICY_CONFLICT_OSV_RP_OFF_ADB_ON: windows_sys::core::HRESULT = 0x80310090_u32 as _; +pub const FVE_E_POLICY_CONFLICT_RDV_RK_OFF_AUK_ON: windows_sys::core::HRESULT = 0x80310084_u32 as _; +pub const FVE_E_POLICY_CONFLICT_RDV_RP_OFF_ADB_ON: windows_sys::core::HRESULT = 0x80310092_u32 as _; +pub const FVE_E_POLICY_CONFLICT_RO_AND_STARTUP_KEY_REQUIRED: windows_sys::core::HRESULT = 0x80310087_u32 as _; +pub const FVE_E_POLICY_INVALID_ENHANCED_BCD_SETTINGS: windows_sys::core::HRESULT = 0x803100BE_u32 as _; +pub const FVE_E_POLICY_INVALID_PASSPHRASE_LENGTH: windows_sys::core::HRESULT = 0x80310080_u32 as _; +pub const FVE_E_POLICY_INVALID_PIN_LENGTH: windows_sys::core::HRESULT = 0x80310068_u32 as _; +pub const FVE_E_POLICY_ON_RDV_EXCLUSION_LIST: windows_sys::core::HRESULT = 0x803100E4_u32 as _; +pub const FVE_E_POLICY_PASSPHRASE_NOT_ALLOWED: windows_sys::core::HRESULT = 0x8031006A_u32 as _; +pub const FVE_E_POLICY_PASSPHRASE_REQUIRED: windows_sys::core::HRESULT = 0x8031006B_u32 as _; +pub const FVE_E_POLICY_PASSPHRASE_REQUIRES_ASCII: windows_sys::core::HRESULT = 0x803100A4_u32 as _; +pub const FVE_E_POLICY_PASSPHRASE_TOO_SIMPLE: windows_sys::core::HRESULT = 0x80310081_u32 as _; +pub const FVE_E_POLICY_PASSWORD_REQUIRED: windows_sys::core::HRESULT = 0x8031002C_u32 as _; +pub const FVE_E_POLICY_PROHIBITS_SELFSIGNED: windows_sys::core::HRESULT = 0x80310086_u32 as _; +pub const FVE_E_POLICY_RECOVERY_KEY_NOT_ALLOWED: windows_sys::core::HRESULT = 0x8031005E_u32 as _; +pub const FVE_E_POLICY_RECOVERY_KEY_REQUIRED: windows_sys::core::HRESULT = 0x8031005F_u32 as _; +pub const FVE_E_POLICY_RECOVERY_PASSWORD_NOT_ALLOWED: windows_sys::core::HRESULT = 0x8031005C_u32 as _; +pub const FVE_E_POLICY_RECOVERY_PASSWORD_REQUIRED: windows_sys::core::HRESULT = 0x8031005D_u32 as _; +pub const FVE_E_POLICY_REQUIRES_RECOVERY_PASSWORD_ON_TOUCH_DEVICE: windows_sys::core::HRESULT = 0x803100B8_u32 as _; +pub const FVE_E_POLICY_REQUIRES_STARTUP_PIN_ON_TOUCH_DEVICE: windows_sys::core::HRESULT = 0x803100B7_u32 as _; +pub const FVE_E_POLICY_STARTUP_KEY_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310062_u32 as _; +pub const FVE_E_POLICY_STARTUP_KEY_REQUIRED: windows_sys::core::HRESULT = 0x80310063_u32 as _; +pub const FVE_E_POLICY_STARTUP_PIN_KEY_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310064_u32 as _; +pub const FVE_E_POLICY_STARTUP_PIN_KEY_REQUIRED: windows_sys::core::HRESULT = 0x80310065_u32 as _; +pub const FVE_E_POLICY_STARTUP_PIN_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310060_u32 as _; +pub const FVE_E_POLICY_STARTUP_PIN_REQUIRED: windows_sys::core::HRESULT = 0x80310061_u32 as _; +pub const FVE_E_POLICY_STARTUP_TPM_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310066_u32 as _; +pub const FVE_E_POLICY_STARTUP_TPM_REQUIRED: windows_sys::core::HRESULT = 0x80310067_u32 as _; +pub const FVE_E_POLICY_USER_CERTIFICATE_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310072_u32 as _; +pub const FVE_E_POLICY_USER_CERTIFICATE_REQUIRED: windows_sys::core::HRESULT = 0x80310073_u32 as _; +pub const FVE_E_POLICY_USER_CERT_MUST_BE_HW: windows_sys::core::HRESULT = 0x80310074_u32 as _; +pub const FVE_E_POLICY_USER_CONFIGURE_FDV_AUTOUNLOCK_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310075_u32 as _; +pub const FVE_E_POLICY_USER_CONFIGURE_RDV_AUTOUNLOCK_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310076_u32 as _; +pub const FVE_E_POLICY_USER_CONFIGURE_RDV_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310077_u32 as _; +pub const FVE_E_POLICY_USER_DISABLE_RDV_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310079_u32 as _; +pub const FVE_E_POLICY_USER_ENABLE_RDV_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310078_u32 as _; +pub const FVE_E_PREDICTED_TPM_PROTECTOR_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803100E5_u32 as _; +pub const FVE_E_PRIVATEKEY_AUTH_FAILED: windows_sys::core::HRESULT = 0x80310094_u32 as _; +pub const FVE_E_PROTECTION_CANNOT_BE_DISABLED: windows_sys::core::HRESULT = 0x803100D8_u32 as _; +pub const FVE_E_PROTECTION_DISABLED: windows_sys::core::HRESULT = 0x80310021_u32 as _; +pub const FVE_E_PROTECTOR_CHANGE_MAX_PASSPHRASE_CHANGE_ATTEMPTS_REACHED: windows_sys::core::HRESULT = 0x803100C0_u32 as _; +pub const FVE_E_PROTECTOR_CHANGE_MAX_PIN_CHANGE_ATTEMPTS_REACHED: windows_sys::core::HRESULT = 0x803100A3_u32 as _; +pub const FVE_E_PROTECTOR_CHANGE_PASSPHRASE_MISMATCH: windows_sys::core::HRESULT = 0x803100A9_u32 as _; +pub const FVE_E_PROTECTOR_CHANGE_PIN_MISMATCH: windows_sys::core::HRESULT = 0x803100A1_u32 as _; +pub const FVE_E_PROTECTOR_EXISTS: windows_sys::core::HRESULT = 0x80310031_u32 as _; +pub const FVE_E_PROTECTOR_NOT_FOUND: windows_sys::core::HRESULT = 0x80310033_u32 as _; +pub const FVE_E_PUBKEY_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80310058_u32 as _; +pub const FVE_E_RAW_ACCESS: windows_sys::core::HRESULT = 0x80310050_u32 as _; +pub const FVE_E_RAW_BLOCKED: windows_sys::core::HRESULT = 0x80310051_u32 as _; +pub const FVE_E_REBOOT_REQUIRED: windows_sys::core::HRESULT = 0x8031004E_u32 as _; +pub const FVE_E_RECOVERY_KEY_REQUIRED: windows_sys::core::HRESULT = 0x80310022_u32 as _; +pub const FVE_E_RECOVERY_PARTITION: windows_sys::core::HRESULT = 0x80310082_u32 as _; +pub const FVE_E_RELATIVE_PATH: windows_sys::core::HRESULT = 0x80310032_u32 as _; +pub const FVE_E_REMOVAL_OF_DRA_FAILED: windows_sys::core::HRESULT = 0x80310095_u32 as _; +pub const FVE_E_REMOVAL_OF_NKP_FAILED: windows_sys::core::HRESULT = 0x8031009E_u32 as _; +pub const FVE_E_SECUREBOOT_CONFIGURATION_INVALID: windows_sys::core::HRESULT = 0x803100BB_u32 as _; +pub const FVE_E_SECUREBOOT_DISABLED: windows_sys::core::HRESULT = 0x803100BA_u32 as _; +pub const FVE_E_SECURE_KEY_REQUIRED: windows_sys::core::HRESULT = 0x80310007_u32 as _; +pub const FVE_E_SETUP_TPM_CALLBACK_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803100E6_u32 as _; +pub const FVE_E_SHADOW_COPY_PRESENT: windows_sys::core::HRESULT = 0x803100BD_u32 as _; +pub const FVE_E_SYSTEM_VOLUME: windows_sys::core::HRESULT = 0x80310012_u32 as _; +pub const FVE_E_TOKEN_NOT_IMPERSONATED: windows_sys::core::HRESULT = 0x8031004C_u32 as _; +pub const FVE_E_TOO_SMALL: windows_sys::core::HRESULT = 0x80310011_u32 as _; +pub const FVE_E_TPM_CONTEXT_SETUP_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803100E7_u32 as _; +pub const FVE_E_TPM_DISABLED: windows_sys::core::HRESULT = 0x8031003F_u32 as _; +pub const FVE_E_TPM_INVALID_PCR: windows_sys::core::HRESULT = 0x80310041_u32 as _; +pub const FVE_E_TPM_NOT_OWNED: windows_sys::core::HRESULT = 0x80310018_u32 as _; +pub const FVE_E_TPM_NO_VMK: windows_sys::core::HRESULT = 0x80310042_u32 as _; +pub const FVE_E_TPM_SRK_AUTH_NOT_ZERO: windows_sys::core::HRESULT = 0x80310025_u32 as _; +pub const FVE_E_TRANSIENT_STATE: windows_sys::core::HRESULT = 0x80310057_u32 as _; +pub const FVE_E_UPDATE_INVALID_CONFIG: windows_sys::core::HRESULT = 0x803100E8_u32 as _; +pub const FVE_E_VIRTUALIZED_SPACE_TOO_BIG: windows_sys::core::HRESULT = 0x80310089_u32 as _; +pub const FVE_E_VOLUME_BOUND_ALREADY: windows_sys::core::HRESULT = 0x8031001F_u32 as _; +pub const FVE_E_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT: windows_sys::core::HRESULT = 0x803100D6_u32 as _; +pub const FVE_E_VOLUME_HANDLE_OPEN: windows_sys::core::HRESULT = 0x80310059_u32 as _; +pub const FVE_E_VOLUME_NOT_BOUND: windows_sys::core::HRESULT = 0x80310017_u32 as _; +pub const FVE_E_VOLUME_TOO_SMALL: windows_sys::core::HRESULT = 0x8031006F_u32 as _; +pub const FVE_E_WIPE_CANCEL_NOT_APPLICABLE: windows_sys::core::HRESULT = 0x803100B9_u32 as _; +pub const FVE_E_WIPE_NOT_ALLOWED_ON_TP_STORAGE: windows_sys::core::HRESULT = 0x803100A6_u32 as _; +pub const FVE_E_WRONG_BOOTMGR: windows_sys::core::HRESULT = 0x80310006_u32 as _; +pub const FVE_E_WRONG_BOOTSECTOR: windows_sys::core::HRESULT = 0x8031002A_u32 as _; +pub const FVE_E_WRONG_SYSTEM_FS: windows_sys::core::HRESULT = 0x8031002B_u32 as _; +pub const FWP_E_ACTION_INCOMPATIBLE_WITH_LAYER: windows_sys::core::HRESULT = 0x8032002C_u32 as _; +pub const FWP_E_ACTION_INCOMPATIBLE_WITH_SUBLAYER: windows_sys::core::HRESULT = 0x8032002D_u32 as _; +pub const FWP_E_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x80320009_u32 as _; +pub const FWP_E_BUILTIN_OBJECT: windows_sys::core::HRESULT = 0x80320017_u32 as _; +pub const FWP_E_CALLOUT_NOTIFICATION_FAILED: windows_sys::core::HRESULT = 0x80320037_u32 as _; +pub const FWP_E_CALLOUT_NOT_FOUND: windows_sys::core::HRESULT = 0x80320001_u32 as _; +pub const FWP_E_CONDITION_NOT_FOUND: windows_sys::core::HRESULT = 0x80320002_u32 as _; +pub const FWP_E_CONNECTIONS_DISABLED: windows_sys::core::HRESULT = 0x80320041_u32 as _; +pub const FWP_E_CONTEXT_INCOMPATIBLE_WITH_CALLOUT: windows_sys::core::HRESULT = 0x8032002F_u32 as _; +pub const FWP_E_CONTEXT_INCOMPATIBLE_WITH_LAYER: windows_sys::core::HRESULT = 0x8032002E_u32 as _; +pub const FWP_E_DROP_NOICMP: windows_sys::core::HRESULT = 0x80320104_u32 as _; +pub const FWP_E_DUPLICATE_AUTH_METHOD: windows_sys::core::HRESULT = 0x8032003C_u32 as _; +pub const FWP_E_DUPLICATE_CONDITION: windows_sys::core::HRESULT = 0x8032002A_u32 as _; +pub const FWP_E_DUPLICATE_KEYMOD: windows_sys::core::HRESULT = 0x8032002B_u32 as _; +pub const FWP_E_DYNAMIC_SESSION_IN_PROGRESS: windows_sys::core::HRESULT = 0x8032000B_u32 as _; +pub const FWP_E_EM_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80320032_u32 as _; +pub const FWP_E_FILTER_NOT_FOUND: windows_sys::core::HRESULT = 0x80320003_u32 as _; +pub const FWP_E_IKEEXT_NOT_RUNNING: windows_sys::core::HRESULT = 0x80320044_u32 as _; +pub const FWP_E_INCOMPATIBLE_AUTH_METHOD: windows_sys::core::HRESULT = 0x80320030_u32 as _; +pub const FWP_E_INCOMPATIBLE_CIPHER_TRANSFORM: windows_sys::core::HRESULT = 0x8032003A_u32 as _; +pub const FWP_E_INCOMPATIBLE_DH_GROUP: windows_sys::core::HRESULT = 0x80320031_u32 as _; +pub const FWP_E_INCOMPATIBLE_LAYER: windows_sys::core::HRESULT = 0x80320014_u32 as _; +pub const FWP_E_INCOMPATIBLE_SA_STATE: windows_sys::core::HRESULT = 0x8032001B_u32 as _; +pub const FWP_E_INCOMPATIBLE_TXN: windows_sys::core::HRESULT = 0x80320011_u32 as _; +pub const FWP_E_INVALID_ACTION_TYPE: windows_sys::core::HRESULT = 0x80320024_u32 as _; +pub const FWP_E_INVALID_AUTH_TRANSFORM: windows_sys::core::HRESULT = 0x80320038_u32 as _; +pub const FWP_E_INVALID_CIPHER_TRANSFORM: windows_sys::core::HRESULT = 0x80320039_u32 as _; +pub const FWP_E_INVALID_DNS_NAME: windows_sys::core::HRESULT = 0x80320042_u32 as _; +pub const FWP_E_INVALID_ENUMERATOR: windows_sys::core::HRESULT = 0x8032001D_u32 as _; +pub const FWP_E_INVALID_FLAGS: windows_sys::core::HRESULT = 0x8032001E_u32 as _; +pub const FWP_E_INVALID_INTERVAL: windows_sys::core::HRESULT = 0x80320021_u32 as _; +pub const FWP_E_INVALID_NET_MASK: windows_sys::core::HRESULT = 0x8032001F_u32 as _; +pub const FWP_E_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x80320035_u32 as _; +pub const FWP_E_INVALID_RANGE: windows_sys::core::HRESULT = 0x80320020_u32 as _; +pub const FWP_E_INVALID_TRANSFORM_COMBINATION: windows_sys::core::HRESULT = 0x8032003B_u32 as _; +pub const FWP_E_INVALID_TUNNEL_ENDPOINT: windows_sys::core::HRESULT = 0x8032003D_u32 as _; +pub const FWP_E_INVALID_WEIGHT: windows_sys::core::HRESULT = 0x80320025_u32 as _; +pub const FWP_E_IN_USE: windows_sys::core::HRESULT = 0x8032000A_u32 as _; +pub const FWP_E_KEY_DICTATION_INVALID_KEYING_MATERIAL: windows_sys::core::HRESULT = 0x80320040_u32 as _; +pub const FWP_E_KEY_DICTATOR_ALREADY_REGISTERED: windows_sys::core::HRESULT = 0x8032003F_u32 as _; +pub const FWP_E_KM_CLIENTS_ONLY: windows_sys::core::HRESULT = 0x80320015_u32 as _; +pub const FWP_E_L2_DRIVER_NOT_READY: windows_sys::core::HRESULT = 0x8032003E_u32 as _; +pub const FWP_E_LAYER_NOT_FOUND: windows_sys::core::HRESULT = 0x80320004_u32 as _; +pub const FWP_E_LIFETIME_MISMATCH: windows_sys::core::HRESULT = 0x80320016_u32 as _; +pub const FWP_E_MATCH_TYPE_MISMATCH: windows_sys::core::HRESULT = 0x80320026_u32 as _; +pub const FWP_E_NET_EVENTS_DISABLED: windows_sys::core::HRESULT = 0x80320013_u32 as _; +pub const FWP_E_NEVER_MATCH: windows_sys::core::HRESULT = 0x80320033_u32 as _; +pub const FWP_E_NOTIFICATION_DROPPED: windows_sys::core::HRESULT = 0x80320019_u32 as _; +pub const FWP_E_NOT_FOUND: windows_sys::core::HRESULT = 0x80320008_u32 as _; +pub const FWP_E_NO_TXN_IN_PROGRESS: windows_sys::core::HRESULT = 0x8032000D_u32 as _; +pub const FWP_E_NULL_DISPLAY_NAME: windows_sys::core::HRESULT = 0x80320023_u32 as _; +pub const FWP_E_NULL_POINTER: windows_sys::core::HRESULT = 0x8032001C_u32 as _; +pub const FWP_E_OUT_OF_BOUNDS: windows_sys::core::HRESULT = 0x80320028_u32 as _; +pub const FWP_E_PROVIDER_CONTEXT_MISMATCH: windows_sys::core::HRESULT = 0x80320034_u32 as _; +pub const FWP_E_PROVIDER_CONTEXT_NOT_FOUND: windows_sys::core::HRESULT = 0x80320006_u32 as _; +pub const FWP_E_PROVIDER_NOT_FOUND: windows_sys::core::HRESULT = 0x80320005_u32 as _; +pub const FWP_E_RESERVED: windows_sys::core::HRESULT = 0x80320029_u32 as _; +pub const FWP_E_SESSION_ABORTED: windows_sys::core::HRESULT = 0x80320010_u32 as _; +pub const FWP_E_STILL_ON: windows_sys::core::HRESULT = 0x80320043_u32 as _; +pub const FWP_E_SUBLAYER_NOT_FOUND: windows_sys::core::HRESULT = 0x80320007_u32 as _; +pub const FWP_E_TIMEOUT: windows_sys::core::HRESULT = 0x80320012_u32 as _; +pub const FWP_E_TOO_MANY_CALLOUTS: windows_sys::core::HRESULT = 0x80320018_u32 as _; +pub const FWP_E_TOO_MANY_SUBLAYERS: windows_sys::core::HRESULT = 0x80320036_u32 as _; +pub const FWP_E_TRAFFIC_MISMATCH: windows_sys::core::HRESULT = 0x8032001A_u32 as _; +pub const FWP_E_TXN_ABORTED: windows_sys::core::HRESULT = 0x8032000F_u32 as _; +pub const FWP_E_TXN_IN_PROGRESS: windows_sys::core::HRESULT = 0x8032000E_u32 as _; +pub const FWP_E_TYPE_MISMATCH: windows_sys::core::HRESULT = 0x80320027_u32 as _; +pub const FWP_E_WRONG_SESSION: windows_sys::core::HRESULT = 0x8032000C_u32 as _; +pub const FWP_E_ZERO_LENGTH_ARRAY: windows_sys::core::HRESULT = 0x80320022_u32 as _; +pub const GCN_E_DEFAULTNAMESPACE_EXISTS: windows_sys::core::HRESULT = 0x803B0029_u32 as _; +pub const GCN_E_MODULE_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0021_u32 as _; +pub const GCN_E_NETADAPTER_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0026_u32 as _; +pub const GCN_E_NETADAPTER_TIMEOUT: windows_sys::core::HRESULT = 0x803B0025_u32 as _; +pub const GCN_E_NETCOMPARTMENT_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0027_u32 as _; +pub const GCN_E_NETINTERFACE_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0028_u32 as _; +pub const GCN_E_NO_REQUEST_HANDLERS: windows_sys::core::HRESULT = 0x803B0022_u32 as _; +pub const GCN_E_REQUEST_UNSUPPORTED: windows_sys::core::HRESULT = 0x803B0023_u32 as _; +pub const GCN_E_RUNTIMEKEYS_FAILED: windows_sys::core::HRESULT = 0x803B0024_u32 as _; +pub type GENERIC_ACCESS_RIGHTS = u32; +pub const GENERIC_ALL: GENERIC_ACCESS_RIGHTS = 268435456u32; +pub const GENERIC_EXECUTE: GENERIC_ACCESS_RIGHTS = 536870912u32; +pub const GENERIC_READ: GENERIC_ACCESS_RIGHTS = 2147483648u32; +pub const GENERIC_WRITE: GENERIC_ACCESS_RIGHTS = 1073741824u32; +pub type HANDLE = *mut core::ffi::c_void; +pub type HANDLE_FLAGS = u32; +pub const HANDLE_FLAG_INHERIT: HANDLE_FLAGS = 1u32; +pub const HANDLE_FLAG_PROTECT_FROM_CLOSE: HANDLE_FLAGS = 2u32; +pub type HANDLE_PTR = usize; +pub const HCN_E_ADAPTER_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0006_u32 as _; +pub const HCN_E_ADDR_INVALID_OR_RESERVED: windows_sys::core::HRESULT = 0x803B002F_u32 as _; +pub const HCN_E_DEGRADED_OPERATION: windows_sys::core::HRESULT = 0x803B0017_u32 as _; +pub const HCN_E_ENDPOINT_ALREADY_ATTACHED: windows_sys::core::HRESULT = 0x803B0014_u32 as _; +pub const HCN_E_ENDPOINT_NAMESPACE_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x803B002B_u32 as _; +pub const HCN_E_ENDPOINT_NOT_ATTACHED: windows_sys::core::HRESULT = 0x803B0034_u32 as _; +pub const HCN_E_ENDPOINT_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0002_u32 as _; +pub const HCN_E_ENDPOINT_NOT_LOCAL: windows_sys::core::HRESULT = 0x803B0035_u32 as _; +pub const HCN_E_ENDPOINT_SHARING_DISABLED: windows_sys::core::HRESULT = 0x803B001D_u32 as _; +pub const HCN_E_ENTITY_HAS_REFERENCES: windows_sys::core::HRESULT = 0x803B002C_u32 as _; +pub const HCN_E_GUID_CONVERSION_FAILURE: windows_sys::core::HRESULT = 0x803B0019_u32 as _; +pub const HCN_E_ICS_DISABLED: windows_sys::core::HRESULT = 0x803B002A_u32 as _; +pub const HCN_E_INVALID_ENDPOINT: windows_sys::core::HRESULT = 0x803B000C_u32 as _; +pub const HCN_E_INVALID_INTERNAL_PORT: windows_sys::core::HRESULT = 0x803B002D_u32 as _; +pub const HCN_E_INVALID_IP: windows_sys::core::HRESULT = 0x803B001E_u32 as _; +pub const HCN_E_INVALID_IP_SUBNET: windows_sys::core::HRESULT = 0x803B0033_u32 as _; +pub const HCN_E_INVALID_JSON: windows_sys::core::HRESULT = 0x803B001B_u32 as _; +pub const HCN_E_INVALID_JSON_REFERENCE: windows_sys::core::HRESULT = 0x803B001C_u32 as _; +pub const HCN_E_INVALID_NETWORK: windows_sys::core::HRESULT = 0x803B000A_u32 as _; +pub const HCN_E_INVALID_NETWORK_TYPE: windows_sys::core::HRESULT = 0x803B000B_u32 as _; +pub const HCN_E_INVALID_POLICY: windows_sys::core::HRESULT = 0x803B000D_u32 as _; +pub const HCN_E_INVALID_POLICY_TYPE: windows_sys::core::HRESULT = 0x803B000E_u32 as _; +pub const HCN_E_INVALID_PREFIX: windows_sys::core::HRESULT = 0x803B0030_u32 as _; +pub const HCN_E_INVALID_REMOTE_ENDPOINT_OPERATION: windows_sys::core::HRESULT = 0x803B000F_u32 as _; +pub const HCN_E_INVALID_SUBNET: windows_sys::core::HRESULT = 0x803B0032_u32 as _; +pub const HCN_E_LAYER_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x803B0011_u32 as _; +pub const HCN_E_LAYER_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0003_u32 as _; +pub const HCN_E_MANAGER_STOPPED: windows_sys::core::HRESULT = 0x803B0020_u32 as _; +pub const HCN_E_MAPPING_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803B0016_u32 as _; +pub const HCN_E_NAMESPACE_ATTACH_FAILED: windows_sys::core::HRESULT = 0x803B002E_u32 as _; +pub const HCN_E_NETWORK_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x803B0010_u32 as _; +pub const HCN_E_NETWORK_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0001_u32 as _; +pub const HCN_E_OBJECT_USED_AFTER_UNLOAD: windows_sys::core::HRESULT = 0x803B0031_u32 as _; +pub const HCN_E_POLICY_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x803B0012_u32 as _; +pub const HCN_E_POLICY_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0008_u32 as _; +pub const HCN_E_PORT_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x803B0013_u32 as _; +pub const HCN_E_PORT_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0007_u32 as _; +pub const HCN_E_REGKEY_FAILURE: windows_sys::core::HRESULT = 0x803B001A_u32 as _; +pub const HCN_E_REQUEST_UNSUPPORTED: windows_sys::core::HRESULT = 0x803B0015_u32 as _; +pub const HCN_E_SHARED_SWITCH_MODIFICATION: windows_sys::core::HRESULT = 0x803B0018_u32 as _; +pub const HCN_E_SUBNET_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0005_u32 as _; +pub const HCN_E_SWITCH_EXTENSION_NOT_FOUND: windows_sys::core::HRESULT = 0x803B001F_u32 as _; +pub const HCN_E_SWITCH_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0004_u32 as _; +pub const HCN_E_VFP_NOT_ALLOWED: windows_sys::core::HRESULT = 0x803B0037_u32 as _; +pub const HCN_E_VFP_PORTSETTING_NOT_FOUND: windows_sys::core::HRESULT = 0x803B0009_u32 as _; +pub const HCN_INTERFACEPARAMETERS_ALREADY_APPLIED: windows_sys::core::HRESULT = 0x803B0036_u32 as _; +pub const HCS_E_ACCESS_DENIED: windows_sys::core::HRESULT = 0x8037011B_u32 as _; +pub const HCS_E_CONNECTION_CLOSED: windows_sys::core::HRESULT = 0x8037010A_u32 as _; +pub const HCS_E_CONNECTION_TIMEOUT: windows_sys::core::HRESULT = 0x80370109_u32 as _; +pub const HCS_E_CONNECT_FAILED: windows_sys::core::HRESULT = 0x80370108_u32 as _; +pub const HCS_E_GUEST_CRITICAL_ERROR: windows_sys::core::HRESULT = 0x8037011C_u32 as _; +pub const HCS_E_HYPERV_NOT_INSTALLED: windows_sys::core::HRESULT = 0x80370102_u32 as _; +pub const HCS_E_IMAGE_MISMATCH: windows_sys::core::HRESULT = 0x80370101_u32 as _; +pub const HCS_E_INVALID_JSON: windows_sys::core::HRESULT = 0x8037010D_u32 as _; +pub const HCS_E_INVALID_LAYER: windows_sys::core::HRESULT = 0x80370112_u32 as _; +pub const HCS_E_INVALID_STATE: windows_sys::core::HRESULT = 0x80370105_u32 as _; +pub const HCS_E_OPERATION_ALREADY_CANCELLED: windows_sys::core::HRESULT = 0x80370121_u32 as _; +pub const HCS_E_OPERATION_ALREADY_STARTED: windows_sys::core::HRESULT = 0x80370116_u32 as _; +pub const HCS_E_OPERATION_NOT_STARTED: windows_sys::core::HRESULT = 0x80370115_u32 as _; +pub const HCS_E_OPERATION_PENDING: windows_sys::core::HRESULT = 0x80370117_u32 as _; +pub const HCS_E_OPERATION_RESULT_ALLOCATION_FAILED: windows_sys::core::HRESULT = 0x8037011A_u32 as _; +pub const HCS_E_OPERATION_SYSTEM_CALLBACK_ALREADY_SET: windows_sys::core::HRESULT = 0x80370119_u32 as _; +pub const HCS_E_OPERATION_TIMEOUT: windows_sys::core::HRESULT = 0x80370118_u32 as _; +pub const HCS_E_PROCESS_ALREADY_STOPPED: windows_sys::core::HRESULT = 0x8037011F_u32 as _; +pub const HCS_E_PROCESS_INFO_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x8037011D_u32 as _; +pub const HCS_E_PROTOCOL_ERROR: windows_sys::core::HRESULT = 0x80370111_u32 as _; +pub const HCS_E_SERVICE_DISCONNECT: windows_sys::core::HRESULT = 0x8037011E_u32 as _; +pub const HCS_E_SERVICE_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80370114_u32 as _; +pub const HCS_E_SYSTEM_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x8037010F_u32 as _; +pub const HCS_E_SYSTEM_ALREADY_STOPPED: windows_sys::core::HRESULT = 0x80370110_u32 as _; +pub const HCS_E_SYSTEM_NOT_CONFIGURED_FOR_OPERATION: windows_sys::core::HRESULT = 0x80370120_u32 as _; +pub const HCS_E_SYSTEM_NOT_FOUND: windows_sys::core::HRESULT = 0x8037010E_u32 as _; +pub const HCS_E_TERMINATED: windows_sys::core::HRESULT = 0x80370107_u32 as _; +pub const HCS_E_TERMINATED_DURING_START: windows_sys::core::HRESULT = 0x80370100_u32 as _; +pub const HCS_E_UNEXPECTED_EXIT: windows_sys::core::HRESULT = 0x80370106_u32 as _; +pub const HCS_E_UNKNOWN_MESSAGE: windows_sys::core::HRESULT = 0x8037010B_u32 as _; +pub const HCS_E_UNSUPPORTED_PROTOCOL_VERSION: windows_sys::core::HRESULT = 0x8037010C_u32 as _; +pub const HCS_E_WINDOWS_INSIDER_REQUIRED: windows_sys::core::HRESULT = 0x80370113_u32 as _; +pub type HGLOBAL = *mut core::ffi::c_void; +pub type HINSTANCE = *mut core::ffi::c_void; +pub type HLOCAL = *mut core::ffi::c_void; +pub type HLSURF = *mut core::ffi::c_void; +pub type HMODULE = *mut core::ffi::c_void; +pub type HRSRC = *mut core::ffi::c_void; +pub type HSPRITE = *mut core::ffi::c_void; +pub const HSP_BASE_ERROR_MASK: windows_sys::core::HRESULT = 0x81290100_u32 as _; +pub const HSP_BASE_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x812901FF_u32 as _; +pub const HSP_BS_ERROR_MASK: windows_sys::core::HRESULT = 0x81281000_u32 as _; +pub const HSP_BS_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x812810FF_u32 as _; +pub const HSP_DRV_ERROR_MASK: windows_sys::core::HRESULT = 0x81290000_u32 as _; +pub const HSP_DRV_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x812900FF_u32 as _; +pub const HSP_E_ERROR_MASK: windows_sys::core::HRESULT = 0x81280000_u32 as _; +pub const HSP_E_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x81280FFF_u32 as _; +pub const HSP_KSP_ALGORITHM_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x81290209_u32 as _; +pub const HSP_KSP_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x81290205_u32 as _; +pub const HSP_KSP_DEVICE_NOT_READY: windows_sys::core::HRESULT = 0x81290201_u32 as _; +pub const HSP_KSP_ERROR_MASK: windows_sys::core::HRESULT = 0x81290200_u32 as _; +pub const HSP_KSP_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x812902FF_u32 as _; +pub const HSP_KSP_INVALID_DATA: windows_sys::core::HRESULT = 0x81290207_u32 as _; +pub const HSP_KSP_INVALID_FLAGS: windows_sys::core::HRESULT = 0x81290208_u32 as _; +pub const HSP_KSP_INVALID_KEY_HANDLE: windows_sys::core::HRESULT = 0x81290203_u32 as _; +pub const HSP_KSP_INVALID_KEY_TYPE: windows_sys::core::HRESULT = 0x8129020C_u32 as _; +pub const HSP_KSP_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x81290204_u32 as _; +pub const HSP_KSP_INVALID_PROVIDER_HANDLE: windows_sys::core::HRESULT = 0x81290202_u32 as _; +pub const HSP_KSP_KEY_ALREADY_FINALIZED: windows_sys::core::HRESULT = 0x8129020A_u32 as _; +pub const HSP_KSP_KEY_EXISTS: windows_sys::core::HRESULT = 0x81290215_u32 as _; +pub const HSP_KSP_KEY_LOAD_FAIL: windows_sys::core::HRESULT = 0x81290217_u32 as _; +pub const HSP_KSP_KEY_MISSING: windows_sys::core::HRESULT = 0x81290216_u32 as _; +pub const HSP_KSP_KEY_NOT_FINALIZED: windows_sys::core::HRESULT = 0x8129020B_u32 as _; +pub const HSP_KSP_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x81290206_u32 as _; +pub const HSP_KSP_NO_MEMORY: windows_sys::core::HRESULT = 0x81290210_u32 as _; +pub const HSP_KSP_NO_MORE_ITEMS: windows_sys::core::HRESULT = 0x81290218_u32 as _; +pub const HSP_KSP_PARAMETER_NOT_SET: windows_sys::core::HRESULT = 0x81290211_u32 as _; +pub type HSTR = *mut core::ffi::c_void; +pub const HTTP_E_STATUS_AMBIGUOUS: windows_sys::core::HRESULT = 0x8019012C_u32 as _; +pub const HTTP_E_STATUS_BAD_GATEWAY: windows_sys::core::HRESULT = 0x801901F6_u32 as _; +pub const HTTP_E_STATUS_BAD_METHOD: windows_sys::core::HRESULT = 0x80190195_u32 as _; +pub const HTTP_E_STATUS_BAD_REQUEST: windows_sys::core::HRESULT = 0x80190190_u32 as _; +pub const HTTP_E_STATUS_CONFLICT: windows_sys::core::HRESULT = 0x80190199_u32 as _; +pub const HTTP_E_STATUS_DENIED: windows_sys::core::HRESULT = 0x80190191_u32 as _; +pub const HTTP_E_STATUS_EXPECTATION_FAILED: windows_sys::core::HRESULT = 0x801901A1_u32 as _; +pub const HTTP_E_STATUS_FORBIDDEN: windows_sys::core::HRESULT = 0x80190193_u32 as _; +pub const HTTP_E_STATUS_GATEWAY_TIMEOUT: windows_sys::core::HRESULT = 0x801901F8_u32 as _; +pub const HTTP_E_STATUS_GONE: windows_sys::core::HRESULT = 0x8019019A_u32 as _; +pub const HTTP_E_STATUS_LENGTH_REQUIRED: windows_sys::core::HRESULT = 0x8019019B_u32 as _; +pub const HTTP_E_STATUS_MOVED: windows_sys::core::HRESULT = 0x8019012D_u32 as _; +pub const HTTP_E_STATUS_NONE_ACCEPTABLE: windows_sys::core::HRESULT = 0x80190196_u32 as _; +pub const HTTP_E_STATUS_NOT_FOUND: windows_sys::core::HRESULT = 0x80190194_u32 as _; +pub const HTTP_E_STATUS_NOT_MODIFIED: windows_sys::core::HRESULT = 0x80190130_u32 as _; +pub const HTTP_E_STATUS_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x801901F5_u32 as _; +pub const HTTP_E_STATUS_PAYMENT_REQ: windows_sys::core::HRESULT = 0x80190192_u32 as _; +pub const HTTP_E_STATUS_PRECOND_FAILED: windows_sys::core::HRESULT = 0x8019019C_u32 as _; +pub const HTTP_E_STATUS_PROXY_AUTH_REQ: windows_sys::core::HRESULT = 0x80190197_u32 as _; +pub const HTTP_E_STATUS_RANGE_NOT_SATISFIABLE: windows_sys::core::HRESULT = 0x801901A0_u32 as _; +pub const HTTP_E_STATUS_REDIRECT: windows_sys::core::HRESULT = 0x8019012E_u32 as _; +pub const HTTP_E_STATUS_REDIRECT_KEEP_VERB: windows_sys::core::HRESULT = 0x80190133_u32 as _; +pub const HTTP_E_STATUS_REDIRECT_METHOD: windows_sys::core::HRESULT = 0x8019012F_u32 as _; +pub const HTTP_E_STATUS_REQUEST_TIMEOUT: windows_sys::core::HRESULT = 0x80190198_u32 as _; +pub const HTTP_E_STATUS_REQUEST_TOO_LARGE: windows_sys::core::HRESULT = 0x8019019D_u32 as _; +pub const HTTP_E_STATUS_SERVER_ERROR: windows_sys::core::HRESULT = 0x801901F4_u32 as _; +pub const HTTP_E_STATUS_SERVICE_UNAVAIL: windows_sys::core::HRESULT = 0x801901F7_u32 as _; +pub const HTTP_E_STATUS_UNEXPECTED: windows_sys::core::HRESULT = 0x80190001_u32 as _; +pub const HTTP_E_STATUS_UNEXPECTED_CLIENT_ERROR: windows_sys::core::HRESULT = 0x80190004_u32 as _; +pub const HTTP_E_STATUS_UNEXPECTED_REDIRECTION: windows_sys::core::HRESULT = 0x80190003_u32 as _; +pub const HTTP_E_STATUS_UNEXPECTED_SERVER_ERROR: windows_sys::core::HRESULT = 0x80190005_u32 as _; +pub const HTTP_E_STATUS_UNSUPPORTED_MEDIA: windows_sys::core::HRESULT = 0x8019019F_u32 as _; +pub const HTTP_E_STATUS_URI_TOO_LONG: windows_sys::core::HRESULT = 0x8019019E_u32 as _; +pub const HTTP_E_STATUS_USE_PROXY: windows_sys::core::HRESULT = 0x80190131_u32 as _; +pub const HTTP_E_STATUS_VERSION_NOT_SUP: windows_sys::core::HRESULT = 0x801901F9_u32 as _; +pub type HUMPD = *mut core::ffi::c_void; +pub type HWND = *mut core::ffi::c_void; +pub const INPLACE_E_FIRST: i32 = -2147221088i32; +pub const INPLACE_E_LAST: i32 = -2147221073i32; +pub const INPLACE_E_NOTOOLSPACE: windows_sys::core::HRESULT = 0x800401A1_u32 as _; +pub const INPLACE_E_NOTUNDOABLE: windows_sys::core::HRESULT = 0x800401A0_u32 as _; +pub const INPLACE_S_FIRST: i32 = 262560i32; +pub const INPLACE_S_LAST: i32 = 262575i32; +pub const INPLACE_S_TRUNCATED: windows_sys::core::HRESULT = 0x401A0_u32 as _; +pub const INPUT_E_DEVICE_INFO: windows_sys::core::HRESULT = 0x80400006_u32 as _; +pub const INPUT_E_DEVICE_PROPERTY: windows_sys::core::HRESULT = 0x80400008_u32 as _; +pub const INPUT_E_FRAME: windows_sys::core::HRESULT = 0x80400004_u32 as _; +pub const INPUT_E_HISTORY: windows_sys::core::HRESULT = 0x80400005_u32 as _; +pub const INPUT_E_MULTIMODAL: windows_sys::core::HRESULT = 0x80400002_u32 as _; +pub const INPUT_E_OUT_OF_ORDER: windows_sys::core::HRESULT = 0x80400000_u32 as _; +pub const INPUT_E_PACKET: windows_sys::core::HRESULT = 0x80400003_u32 as _; +pub const INPUT_E_REENTRANCY: windows_sys::core::HRESULT = 0x80400001_u32 as _; +pub const INPUT_E_TRANSFORM: windows_sys::core::HRESULT = 0x80400007_u32 as _; +pub const INVALID_HANDLE_VALUE: HANDLE = -1i32 as _; +pub const IORING_E_COMPLETION_QUEUE_TOO_BIG: windows_sys::core::HRESULT = 0x80460005_u32 as _; +pub const IORING_E_COMPLETION_QUEUE_TOO_FULL: windows_sys::core::HRESULT = 0x80460008_u32 as _; +pub const IORING_E_CORRUPT: windows_sys::core::HRESULT = 0x80460007_u32 as _; +pub const IORING_E_REQUIRED_FLAG_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80460001_u32 as _; +pub const IORING_E_SUBMISSION_QUEUE_FULL: windows_sys::core::HRESULT = 0x80460002_u32 as _; +pub const IORING_E_SUBMISSION_QUEUE_TOO_BIG: windows_sys::core::HRESULT = 0x80460004_u32 as _; +pub const IORING_E_SUBMIT_IN_PROGRESS: windows_sys::core::HRESULT = 0x80460006_u32 as _; +pub const IORING_E_VERSION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80460003_u32 as _; +pub const IO_BAD_BLOCK_WITH_NAME: NTSTATUS = 0xC004001F_u32 as _; +pub const IO_CDROM_EXCLUSIVE_LOCK: NTSTATUS = 0x40040085_u32 as _; +pub const IO_DRIVER_CANCEL_TIMEOUT: NTSTATUS = 0x80040036_u32 as _; +pub const IO_DUMP_CALLBACK_EXCEPTION: NTSTATUS = 0xC00400A3_u32 as _; +pub const IO_DUMP_CREATION_SUCCESS: NTSTATUS = 0x400A2_u32 as _; +pub const IO_DUMP_DIRECT_CONFIG_FAILED: NTSTATUS = 0xC0040030_u32 as _; +pub const IO_DUMP_DRIVER_LOAD_FAILURE: NTSTATUS = 0xC004002D_u32 as _; +pub const IO_DUMP_DUMPFILE_CONFLICT: NTSTATUS = 0xC004002F_u32 as _; +pub const IO_DUMP_INITIALIZATION_FAILURE: NTSTATUS = 0xC004002E_u32 as _; +pub const IO_DUMP_INIT_DEDICATED_DUMP_FAILURE: NTSTATUS = 0xC00400A4_u32 as _; +pub const IO_DUMP_PAGE_CONFIG_FAILED: NTSTATUS = 0xC0040031_u32 as _; +pub const IO_DUMP_POINTER_FAILURE: NTSTATUS = 0xC004002C_u32 as _; +pub const IO_ERROR_DISK_RESOURCES_EXHAUSTED: NTSTATUS = 0xC0040096_u32 as _; +pub const IO_ERROR_DUMP_CREATION_ERROR: NTSTATUS = 0xC00400A1_u32 as _; +pub const IO_ERROR_IO_HARDWARE_ERROR: NTSTATUS = 0xC004009A_u32 as _; +pub const IO_ERR_BAD_BLOCK: NTSTATUS = 0xC0040007_u32 as _; +pub const IO_ERR_BAD_FIRMWARE: NTSTATUS = 0xC0040019_u32 as _; +pub const IO_ERR_CONFIGURATION_ERROR: NTSTATUS = 0xC0040003_u32 as _; +pub const IO_ERR_CONTROLLER_ERROR: NTSTATUS = 0xC004000B_u32 as _; +pub const IO_ERR_DMA_CONFLICT_DETECTED: NTSTATUS = 0xC0040017_u32 as _; +pub const IO_ERR_DMA_RESOURCE_CONFLICT: NTSTATUS = 0xC004001B_u32 as _; +pub const IO_ERR_DRIVER_ERROR: NTSTATUS = 0xC0040004_u32 as _; +pub const IO_ERR_INCORRECT_IRQL: NTSTATUS = 0xC004000D_u32 as _; +pub const IO_ERR_INSUFFICIENT_RESOURCES: NTSTATUS = 0xC0040002_u32 as _; +pub const IO_ERR_INTERNAL_ERROR: NTSTATUS = 0xC004000C_u32 as _; +pub const IO_ERR_INTERRUPT_RESOURCE_CONFLICT: NTSTATUS = 0xC004001C_u32 as _; +pub const IO_ERR_INVALID_IOBASE: NTSTATUS = 0xC004000E_u32 as _; +pub const IO_ERR_INVALID_REQUEST: NTSTATUS = 0xC0040010_u32 as _; +pub const IO_ERR_IRQ_CONFLICT_DETECTED: NTSTATUS = 0xC0040018_u32 as _; +pub const IO_ERR_LAYERED_FAILURE: NTSTATUS = 0xC0040012_u32 as _; +pub const IO_ERR_MEMORY_CONFLICT_DETECTED: NTSTATUS = 0xC0040015_u32 as _; +pub const IO_ERR_MEMORY_RESOURCE_CONFLICT: NTSTATUS = 0xC004001D_u32 as _; +pub const IO_ERR_NOT_READY: NTSTATUS = 0xC004000F_u32 as _; +pub const IO_ERR_OVERRUN_ERROR: NTSTATUS = 0xC0040008_u32 as _; +pub const IO_ERR_PARITY: NTSTATUS = 0xC0040005_u32 as _; +pub const IO_ERR_PORT_CONFLICT_DETECTED: NTSTATUS = 0xC0040016_u32 as _; +pub const IO_ERR_PORT_RESOURCE_CONFLICT: NTSTATUS = 0xC004001E_u32 as _; +pub const IO_ERR_PORT_TIMEOUT: NTSTATUS = 0xC0040075_u32 as _; +pub const IO_ERR_PROTOCOL: NTSTATUS = 0xC0040014_u32 as _; +pub const IO_ERR_RESET: NTSTATUS = 0xC0040013_u32 as _; +pub const IO_ERR_RETRY_SUCCEEDED: NTSTATUS = 0x40001_u32 as _; +pub const IO_ERR_SEEK_ERROR: NTSTATUS = 0xC0040006_u32 as _; +pub const IO_ERR_SEQUENCE: NTSTATUS = 0xC004000A_u32 as _; +pub const IO_ERR_THREAD_STUCK_IN_DEVICE_DRIVER: NTSTATUS = 0xC004006C_u32 as _; +pub const IO_ERR_TIMEOUT: NTSTATUS = 0xC0040009_u32 as _; +pub const IO_ERR_VERSION: NTSTATUS = 0xC0040011_u32 as _; +pub const IO_FILE_QUOTA_CORRUPT: NTSTATUS = 0xC004002A_u32 as _; +pub const IO_FILE_QUOTA_FAILED: NTSTATUS = 0x80040028_u32 as _; +pub const IO_FILE_QUOTA_LIMIT: NTSTATUS = 0x40040025_u32 as _; +pub const IO_FILE_QUOTA_STARTED: NTSTATUS = 0x40040026_u32 as _; +pub const IO_FILE_QUOTA_SUCCEEDED: NTSTATUS = 0x40040027_u32 as _; +pub const IO_FILE_QUOTA_THRESHOLD: NTSTATUS = 0x40040024_u32 as _; +pub const IO_FILE_SYSTEM_CORRUPT: NTSTATUS = 0xC0040029_u32 as _; +pub const IO_FILE_SYSTEM_CORRUPT_WITH_NAME: NTSTATUS = 0xC0040037_u32 as _; +pub const IO_INFO_THROTTLE_COMPLETE: NTSTATUS = 0x40040077_u32 as _; +pub const IO_LOST_DELAYED_WRITE: NTSTATUS = 0x80040032_u32 as _; +pub const IO_LOST_DELAYED_WRITE_NETWORK_DISCONNECTED: NTSTATUS = 0x8004008B_u32 as _; +pub const IO_LOST_DELAYED_WRITE_NETWORK_LOCAL_DISK_ERROR: NTSTATUS = 0x8004008D_u32 as _; +pub const IO_LOST_DELAYED_WRITE_NETWORK_SERVER_ERROR: NTSTATUS = 0x8004008C_u32 as _; +pub const IO_RECOVERED_VIA_ECC: NTSTATUS = 0x80040021_u32 as _; +pub const IO_SYSTEM_SLEEP_FAILED: NTSTATUS = 0xC004002B_u32 as _; +pub const IO_WARNING_ADAPTER_FIRMWARE_UPDATED: NTSTATUS = 0x400400A0_u32 as _; +pub const IO_WARNING_ALLOCATION_FAILED: NTSTATUS = 0x80040038_u32 as _; +pub const IO_WARNING_BUS_RESET: NTSTATUS = 0x80040076_u32 as _; +pub const IO_WARNING_COMPLETION_TIME: NTSTATUS = 0x8004009B_u32 as _; +pub const IO_WARNING_DEVICE_HAS_INTERNAL_DUMP: NTSTATUS = 0x8004008F_u32 as _; +pub const IO_WARNING_DISK_CAPACITY_CHANGED: NTSTATUS = 0x80040097_u32 as _; +pub const IO_WARNING_DISK_FIRMWARE_UPDATED: NTSTATUS = 0x4004009F_u32 as _; +pub const IO_WARNING_DISK_PROVISIONING_TYPE_CHANGED: NTSTATUS = 0x80040098_u32 as _; +pub const IO_WARNING_DISK_SURPRISE_REMOVED: NTSTATUS = 0x8004009D_u32 as _; +pub const IO_WARNING_DUMP_DISABLED_DEVICE_GONE: NTSTATUS = 0x8004009C_u32 as _; +pub const IO_WARNING_DUPLICATE_PATH: NTSTATUS = 0x8004003B_u32 as _; +pub const IO_WARNING_DUPLICATE_SIGNATURE: NTSTATUS = 0x8004003A_u32 as _; +pub const IO_WARNING_INTERRUPT_STILL_PENDING: NTSTATUS = 0x80040035_u32 as _; +pub const IO_WARNING_IO_OPERATION_RETRIED: NTSTATUS = 0x80040099_u32 as _; +pub const IO_WARNING_LOG_FLUSH_FAILED: NTSTATUS = 0x80040039_u32 as _; +pub const IO_WARNING_PAGING_FAILURE: NTSTATUS = 0x80040033_u32 as _; +pub const IO_WARNING_REPEATED_DISK_GUID: NTSTATUS = 0x8004009E_u32 as _; +pub const IO_WARNING_RESET: NTSTATUS = 0x80040081_u32 as _; +pub const IO_WARNING_SOFT_THRESHOLD_REACHED: NTSTATUS = 0x80040090_u32 as _; +pub const IO_WARNING_SOFT_THRESHOLD_REACHED_EX: NTSTATUS = 0x80040091_u32 as _; +pub const IO_WARNING_SOFT_THRESHOLD_REACHED_EX_LUN_LUN: NTSTATUS = 0x80040092_u32 as _; +pub const IO_WARNING_SOFT_THRESHOLD_REACHED_EX_LUN_POOL: NTSTATUS = 0x80040093_u32 as _; +pub const IO_WARNING_SOFT_THRESHOLD_REACHED_EX_POOL_LUN: NTSTATUS = 0x80040094_u32 as _; +pub const IO_WARNING_SOFT_THRESHOLD_REACHED_EX_POOL_POOL: NTSTATUS = 0x80040095_u32 as _; +pub const IO_WARNING_VOLUME_LOST_DISK_EXTENT: NTSTATUS = 0x8004008E_u32 as _; +pub const IO_WARNING_WRITE_FUA_PROBLEM: NTSTATUS = 0x80040084_u32 as _; +pub const IO_WRITE_CACHE_DISABLED: NTSTATUS = 0x80040022_u32 as _; +pub const IO_WRITE_CACHE_ENABLED: NTSTATUS = 0x80040020_u32 as _; +pub const IO_WRN_BAD_FIRMWARE: NTSTATUS = 0x8004001A_u32 as _; +pub const IO_WRN_FAILURE_PREDICTED: NTSTATUS = 0x80040034_u32 as _; +pub const JSCRIPT_E_CANTEXECUTE: windows_sys::core::HRESULT = 0x89020001_u32 as _; +pub const LANGUAGE_E_DATABASE_NOT_FOUND: windows_sys::core::HRESULT = 0x80041784_u32 as _; +pub const LANGUAGE_S_LARGE_WORD: windows_sys::core::HRESULT = 0x41781_u32 as _; +pub type LPARAM = isize; +pub type LRESULT = isize; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LUID { + pub LowPart: u32, + pub HighPart: i32, +} +pub const MARSHAL_E_FIRST: i32 = -2147221216i32; +pub const MARSHAL_E_LAST: i32 = -2147221201i32; +pub const MARSHAL_S_FIRST: i32 = 262432i32; +pub const MARSHAL_S_LAST: i32 = 262447i32; +pub const MAX_PATH: u32 = 260u32; +pub const MCA_BUS_ERROR: NTSTATUS = 0xC005007A_u32 as _; +pub const MCA_BUS_TIMEOUT_ERROR: NTSTATUS = 0xC005007B_u32 as _; +pub const MCA_ERROR_CACHE: NTSTATUS = 0xC005003D_u32 as _; +pub const MCA_ERROR_CPU: NTSTATUS = 0xC0050072_u32 as _; +pub const MCA_ERROR_CPU_BUS: NTSTATUS = 0xC0050041_u32 as _; +pub const MCA_ERROR_MAS: NTSTATUS = 0xC0050045_u32 as _; +pub const MCA_ERROR_MEM_1_2: NTSTATUS = 0xC0050049_u32 as _; +pub const MCA_ERROR_MEM_1_2_5: NTSTATUS = 0xC005004B_u32 as _; +pub const MCA_ERROR_MEM_1_2_5_4: NTSTATUS = 0xC005004D_u32 as _; +pub const MCA_ERROR_MEM_UNKNOWN: NTSTATUS = 0xC0050047_u32 as _; +pub const MCA_ERROR_PCI_BUS_MASTER_ABORT: NTSTATUS = 0xC0050059_u32 as _; +pub const MCA_ERROR_PCI_BUS_MASTER_ABORT_NO_INFO: NTSTATUS = 0xC005005B_u32 as _; +pub const MCA_ERROR_PCI_BUS_PARITY: NTSTATUS = 0xC0050051_u32 as _; +pub const MCA_ERROR_PCI_BUS_PARITY_NO_INFO: NTSTATUS = 0xC0050053_u32 as _; +pub const MCA_ERROR_PCI_BUS_SERR: NTSTATUS = 0xC0050055_u32 as _; +pub const MCA_ERROR_PCI_BUS_SERR_NO_INFO: NTSTATUS = 0xC0050057_u32 as _; +pub const MCA_ERROR_PCI_BUS_TIMEOUT: NTSTATUS = 0xC005005D_u32 as _; +pub const MCA_ERROR_PCI_BUS_TIMEOUT_NO_INFO: NTSTATUS = 0xC005005F_u32 as _; +pub const MCA_ERROR_PCI_BUS_UNKNOWN: NTSTATUS = 0xC0050061_u32 as _; +pub const MCA_ERROR_PCI_DEVICE: NTSTATUS = 0xC0050063_u32 as _; +pub const MCA_ERROR_PLATFORM_SPECIFIC: NTSTATUS = 0xC0050067_u32 as _; +pub const MCA_ERROR_REGISTER_FILE: NTSTATUS = 0xC0050043_u32 as _; +pub const MCA_ERROR_SMBIOS: NTSTATUS = 0xC0050065_u32 as _; +pub const MCA_ERROR_SYSTEM_EVENT: NTSTATUS = 0xC005004F_u32 as _; +pub const MCA_ERROR_TLB: NTSTATUS = 0xC005003F_u32 as _; +pub const MCA_ERROR_UNKNOWN: NTSTATUS = 0xC0050069_u32 as _; +pub const MCA_ERROR_UNKNOWN_NO_CPU: NTSTATUS = 0xC005006B_u32 as _; +pub const MCA_EXTERNAL_ERROR: NTSTATUS = 0xC005007F_u32 as _; +pub const MCA_FRC_ERROR: NTSTATUS = 0xC0050080_u32 as _; +pub const MCA_INFO_CPU_THERMAL_THROTTLING_REMOVED: NTSTATUS = 0x40050070_u32 as _; +pub const MCA_INFO_MEMORY_PAGE_MARKED_BAD: NTSTATUS = 0x40050074_u32 as _; +pub const MCA_INFO_NO_MORE_CORRECTED_ERROR_LOGS: NTSTATUS = 0x40050073_u32 as _; +pub const MCA_INTERNALTIMER_ERROR: NTSTATUS = 0xC005007C_u32 as _; +pub const MCA_MEMORYHIERARCHY_ERROR: NTSTATUS = 0xC0050078_u32 as _; +pub const MCA_MICROCODE_ROM_PARITY_ERROR: NTSTATUS = 0xC005007E_u32 as _; +pub const MCA_TLB_ERROR: NTSTATUS = 0xC0050079_u32 as _; +pub const MCA_WARNING_CACHE: NTSTATUS = 0x8005003C_u32 as _; +pub const MCA_WARNING_CMC_THRESHOLD_EXCEEDED: NTSTATUS = 0x8005006D_u32 as _; +pub const MCA_WARNING_CPE_THRESHOLD_EXCEEDED: NTSTATUS = 0x8005006E_u32 as _; +pub const MCA_WARNING_CPU: NTSTATUS = 0x80050071_u32 as _; +pub const MCA_WARNING_CPU_BUS: NTSTATUS = 0x80050040_u32 as _; +pub const MCA_WARNING_CPU_THERMAL_THROTTLED: NTSTATUS = 0x8005006F_u32 as _; +pub const MCA_WARNING_MAS: NTSTATUS = 0x80050044_u32 as _; +pub const MCA_WARNING_MEM_1_2: NTSTATUS = 0x80050048_u32 as _; +pub const MCA_WARNING_MEM_1_2_5: NTSTATUS = 0x8005004A_u32 as _; +pub const MCA_WARNING_MEM_1_2_5_4: NTSTATUS = 0x8005004C_u32 as _; +pub const MCA_WARNING_MEM_UNKNOWN: NTSTATUS = 0x80050046_u32 as _; +pub const MCA_WARNING_PCI_BUS_MASTER_ABORT: NTSTATUS = 0x80050058_u32 as _; +pub const MCA_WARNING_PCI_BUS_MASTER_ABORT_NO_INFO: NTSTATUS = 0x8005005A_u32 as _; +pub const MCA_WARNING_PCI_BUS_PARITY: NTSTATUS = 0x80050050_u32 as _; +pub const MCA_WARNING_PCI_BUS_PARITY_NO_INFO: NTSTATUS = 0x80050052_u32 as _; +pub const MCA_WARNING_PCI_BUS_SERR: NTSTATUS = 0x80050054_u32 as _; +pub const MCA_WARNING_PCI_BUS_SERR_NO_INFO: NTSTATUS = 0x80050056_u32 as _; +pub const MCA_WARNING_PCI_BUS_TIMEOUT: NTSTATUS = 0x8005005C_u32 as _; +pub const MCA_WARNING_PCI_BUS_TIMEOUT_NO_INFO: NTSTATUS = 0x8005005E_u32 as _; +pub const MCA_WARNING_PCI_BUS_UNKNOWN: NTSTATUS = 0x80050060_u32 as _; +pub const MCA_WARNING_PCI_DEVICE: NTSTATUS = 0x80050062_u32 as _; +pub const MCA_WARNING_PLATFORM_SPECIFIC: NTSTATUS = 0x80050066_u32 as _; +pub const MCA_WARNING_REGISTER_FILE: NTSTATUS = 0x80050042_u32 as _; +pub const MCA_WARNING_SMBIOS: NTSTATUS = 0x80050064_u32 as _; +pub const MCA_WARNING_SYSTEM_EVENT: NTSTATUS = 0x8005004E_u32 as _; +pub const MCA_WARNING_TLB: NTSTATUS = 0x8005003E_u32 as _; +pub const MCA_WARNING_UNKNOWN: NTSTATUS = 0x80050068_u32 as _; +pub const MCA_WARNING_UNKNOWN_NO_CPU: NTSTATUS = 0x8005006A_u32 as _; +pub const MEM_E_INVALID_LINK: windows_sys::core::HRESULT = 0x80080010_u32 as _; +pub const MEM_E_INVALID_ROOT: windows_sys::core::HRESULT = 0x80080009_u32 as _; +pub const MEM_E_INVALID_SIZE: windows_sys::core::HRESULT = 0x80080011_u32 as _; +pub const MENROLL_S_ENROLLMENT_SUSPENDED: windows_sys::core::HRESULT = 0x180011_u32 as _; +pub const MILAVERR_INSUFFICIENTVIDEORESOURCES: windows_sys::core::HRESULT = 0x88980508_u32 as _; +pub const MILAVERR_INVALIDWMPVERSION: windows_sys::core::HRESULT = 0x88980507_u32 as _; +pub const MILAVERR_MEDIAPLAYERCLOSED: windows_sys::core::HRESULT = 0x8898050D_u32 as _; +pub const MILAVERR_MODULENOTLOADED: windows_sys::core::HRESULT = 0x88980505_u32 as _; +pub const MILAVERR_NOCLOCK: windows_sys::core::HRESULT = 0x88980500_u32 as _; +pub const MILAVERR_NOMEDIATYPE: windows_sys::core::HRESULT = 0x88980501_u32 as _; +pub const MILAVERR_NOREADYFRAMES: windows_sys::core::HRESULT = 0x88980504_u32 as _; +pub const MILAVERR_NOVIDEOMIXER: windows_sys::core::HRESULT = 0x88980502_u32 as _; +pub const MILAVERR_NOVIDEOPRESENTER: windows_sys::core::HRESULT = 0x88980503_u32 as _; +pub const MILAVERR_REQUESTEDTEXTURETOOBIG: windows_sys::core::HRESULT = 0x8898050A_u32 as _; +pub const MILAVERR_SEEKFAILED: windows_sys::core::HRESULT = 0x8898050B_u32 as _; +pub const MILAVERR_UNEXPECTEDWMPFAILURE: windows_sys::core::HRESULT = 0x8898050C_u32 as _; +pub const MILAVERR_UNKNOWNHARDWAREERROR: windows_sys::core::HRESULT = 0x8898050E_u32 as _; +pub const MILAVERR_VIDEOACCELERATIONNOTAVAILABLE: windows_sys::core::HRESULT = 0x88980509_u32 as _; +pub const MILAVERR_WMPFACTORYNOTREGISTERED: windows_sys::core::HRESULT = 0x88980506_u32 as _; +pub const MILEFFECTSERR_ALREADYATTACHEDTOLISTENER: windows_sys::core::HRESULT = 0x88980618_u32 as _; +pub const MILEFFECTSERR_CONNECTORNOTASSOCIATEDWITHEFFECT: windows_sys::core::HRESULT = 0x88980612_u32 as _; +pub const MILEFFECTSERR_CONNECTORNOTCONNECTED: windows_sys::core::HRESULT = 0x88980611_u32 as _; +pub const MILEFFECTSERR_CYCLEDETECTED: windows_sys::core::HRESULT = 0x88980614_u32 as _; +pub const MILEFFECTSERR_EFFECTALREADYINAGRAPH: windows_sys::core::HRESULT = 0x88980616_u32 as _; +pub const MILEFFECTSERR_EFFECTHASNOCHILDREN: windows_sys::core::HRESULT = 0x88980617_u32 as _; +pub const MILEFFECTSERR_EFFECTINMORETHANONEGRAPH: windows_sys::core::HRESULT = 0x88980615_u32 as _; +pub const MILEFFECTSERR_EFFECTNOTPARTOFGROUP: windows_sys::core::HRESULT = 0x8898060F_u32 as _; +pub const MILEFFECTSERR_EMPTYBOUNDS: windows_sys::core::HRESULT = 0x8898061A_u32 as _; +pub const MILEFFECTSERR_NOINPUTSOURCEATTACHED: windows_sys::core::HRESULT = 0x88980610_u32 as _; +pub const MILEFFECTSERR_NOTAFFINETRANSFORM: windows_sys::core::HRESULT = 0x88980619_u32 as _; +pub const MILEFFECTSERR_OUTPUTSIZETOOLARGE: windows_sys::core::HRESULT = 0x8898061B_u32 as _; +pub const MILEFFECTSERR_RESERVED: windows_sys::core::HRESULT = 0x88980613_u32 as _; +pub const MILEFFECTSERR_UNKNOWNPROPERTY: windows_sys::core::HRESULT = 0x8898060E_u32 as _; +pub const MILERR_ADAPTER_NOT_FOUND: windows_sys::core::HRESULT = 0x8898009E_u32 as _; +pub const MILERR_ALREADYLOCKED: windows_sys::core::HRESULT = 0x88980086_u32 as _; +pub const MILERR_ALREADY_INITIALIZED: windows_sys::core::HRESULT = 0x8898008F_u32 as _; +pub const MILERR_BADNUMBER: windows_sys::core::HRESULT = 0x8898000A_u32 as _; +pub const MILERR_COLORSPACE_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8898009F_u32 as _; +pub const MILERR_DEVICECANNOTRENDERTEXT: windows_sys::core::HRESULT = 0x88980088_u32 as _; +pub const MILERR_DISPLAYFORMATNOTSUPPORTED: windows_sys::core::HRESULT = 0x88980084_u32 as _; +pub const MILERR_DISPLAYID_ACCESS_DENIED: windows_sys::core::HRESULT = 0x889800A1_u32 as _; +pub const MILERR_DISPLAYSTATEINVALID: windows_sys::core::HRESULT = 0x88980006_u32 as _; +pub const MILERR_DXGI_ENUMERATION_OUT_OF_SYNC: windows_sys::core::HRESULT = 0x8898009D_u32 as _; +pub const MILERR_GENERIC_IGNORE: windows_sys::core::HRESULT = 0x8898008B_u32 as _; +pub const MILERR_GLYPHBITMAPMISSED: windows_sys::core::HRESULT = 0x88980089_u32 as _; +pub const MILERR_INSUFFICIENTBUFFER: windows_sys::core::HRESULT = 0x88980002_u32 as _; +pub const MILERR_INTERNALERROR: windows_sys::core::HRESULT = 0x88980080_u32 as _; +pub const MILERR_INVALIDCALL: windows_sys::core::HRESULT = 0x88980085_u32 as _; +pub const MILERR_MALFORMEDGLYPHCACHE: windows_sys::core::HRESULT = 0x8898008A_u32 as _; +pub const MILERR_MALFORMED_GUIDELINE_DATA: windows_sys::core::HRESULT = 0x8898008C_u32 as _; +pub const MILERR_MAX_TEXTURE_SIZE_EXCEEDED: windows_sys::core::HRESULT = 0x8898009A_u32 as _; +pub const MILERR_MISMATCHED_SIZE: windows_sys::core::HRESULT = 0x88980090_u32 as _; +pub const MILERR_MROW_READLOCK_FAILED: windows_sys::core::HRESULT = 0x88980097_u32 as _; +pub const MILERR_MROW_UPDATE_FAILED: windows_sys::core::HRESULT = 0x88980098_u32 as _; +pub const MILERR_NEED_RECREATE_AND_PRESENT: windows_sys::core::HRESULT = 0x8898008E_u32 as _; +pub const MILERR_NONINVERTIBLEMATRIX: windows_sys::core::HRESULT = 0x88980007_u32 as _; +pub const MILERR_NOTLOCKED: windows_sys::core::HRESULT = 0x88980087_u32 as _; +pub const MILERR_NOT_QUEUING_PRESENTS: windows_sys::core::HRESULT = 0x88980094_u32 as _; +pub const MILERR_NO_HARDWARE_DEVICE: windows_sys::core::HRESULT = 0x8898008D_u32 as _; +pub const MILERR_NO_REDIRECTION_SURFACE_AVAILABLE: windows_sys::core::HRESULT = 0x88980091_u32 as _; +pub const MILERR_NO_REDIRECTION_SURFACE_RETRY_LATER: windows_sys::core::HRESULT = 0x88980095_u32 as _; +pub const MILERR_OBJECTBUSY: windows_sys::core::HRESULT = 0x88980001_u32 as _; +pub const MILERR_PREFILTER_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x889800A0_u32 as _; +pub const MILERR_QPC_TIME_WENT_BACKWARD: windows_sys::core::HRESULT = 0x8898009B_u32 as _; +pub const MILERR_QUEUED_PRESENT_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x88980093_u32 as _; +pub const MILERR_REMOTING_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x88980092_u32 as _; +pub const MILERR_SCANNER_FAILED: windows_sys::core::HRESULT = 0x88980004_u32 as _; +pub const MILERR_SCREENACCESSDENIED: windows_sys::core::HRESULT = 0x88980005_u32 as _; +pub const MILERR_SHADER_COMPILE_FAILED: windows_sys::core::HRESULT = 0x88980099_u32 as _; +pub const MILERR_TERMINATED: windows_sys::core::HRESULT = 0x88980009_u32 as _; +pub const MILERR_TOOMANYSHADERELEMNTS: windows_sys::core::HRESULT = 0x88980096_u32 as _; +pub const MILERR_WIN32ERROR: windows_sys::core::HRESULT = 0x88980003_u32 as _; +pub const MILERR_ZEROVECTOR: windows_sys::core::HRESULT = 0x88980008_u32 as _; +pub const MK_E_CANTOPENFILE: windows_sys::core::HRESULT = 0x800401EA_u32 as _; +pub const MK_E_CONNECTMANUALLY: windows_sys::core::HRESULT = 0x800401E0_u32 as _; +pub const MK_E_ENUMERATION_FAILED: windows_sys::core::HRESULT = 0x800401EF_u32 as _; +pub const MK_E_EXCEEDEDDEADLINE: windows_sys::core::HRESULT = 0x800401E1_u32 as _; +pub const MK_E_FIRST: i32 = -2147221024i32; +pub const MK_E_INTERMEDIATEINTERFACENOTSUPPORTED: windows_sys::core::HRESULT = 0x800401E7_u32 as _; +pub const MK_E_INVALIDEXTENSION: windows_sys::core::HRESULT = 0x800401E6_u32 as _; +pub const MK_E_LAST: i32 = -2147221009i32; +pub const MK_E_MUSTBOTHERUSER: windows_sys::core::HRESULT = 0x800401EB_u32 as _; +pub const MK_E_NEEDGENERIC: windows_sys::core::HRESULT = 0x800401E2_u32 as _; +pub const MK_E_NOINVERSE: windows_sys::core::HRESULT = 0x800401EC_u32 as _; +pub const MK_E_NOOBJECT: windows_sys::core::HRESULT = 0x800401E5_u32 as _; +pub const MK_E_NOPREFIX: windows_sys::core::HRESULT = 0x800401EE_u32 as _; +pub const MK_E_NOSTORAGE: windows_sys::core::HRESULT = 0x800401ED_u32 as _; +pub const MK_E_NOTBINDABLE: windows_sys::core::HRESULT = 0x800401E8_u32 as _; +pub const MK_E_NOTBOUND: windows_sys::core::HRESULT = 0x800401E9_u32 as _; +pub const MK_E_NO_NORMALIZED: windows_sys::core::HRESULT = 0x80080007_u32 as _; +pub const MK_E_SYNTAX: windows_sys::core::HRESULT = 0x800401E4_u32 as _; +pub const MK_E_UNAVAILABLE: windows_sys::core::HRESULT = 0x800401E3_u32 as _; +pub const MK_S_FIRST: i32 = 262624i32; +pub const MK_S_HIM: windows_sys::core::HRESULT = 0x401E5_u32 as _; +pub const MK_S_LAST: i32 = 262639i32; +pub const MK_S_ME: windows_sys::core::HRESULT = 0x401E4_u32 as _; +pub const MK_S_MONIKERALREADYREGISTERED: windows_sys::core::HRESULT = 0x401E7_u32 as _; +pub const MK_S_REDUCED_TO_SELF: windows_sys::core::HRESULT = 0x401E2_u32 as _; +pub const MK_S_US: windows_sys::core::HRESULT = 0x401E6_u32 as _; +pub const MSDTC_E_DUPLICATE_RESOURCE: windows_sys::core::HRESULT = 0x80110701_u32 as _; +pub const MSSIPOTF_E_BADVERSION: windows_sys::core::HRESULT = 0x80097015_u32 as _; +pub const MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT: windows_sys::core::HRESULT = 0x80097008_u32 as _; +pub const MSSIPOTF_E_BAD_MAGICNUMBER: windows_sys::core::HRESULT = 0x80097004_u32 as _; +pub const MSSIPOTF_E_BAD_OFFSET_TABLE: windows_sys::core::HRESULT = 0x80097005_u32 as _; +pub const MSSIPOTF_E_CANTGETOBJECT: windows_sys::core::HRESULT = 0x80097002_u32 as _; +pub const MSSIPOTF_E_CRYPT: windows_sys::core::HRESULT = 0x80097014_u32 as _; +pub const MSSIPOTF_E_DSIG_STRUCTURE: windows_sys::core::HRESULT = 0x80097016_u32 as _; +pub const MSSIPOTF_E_FAILED_HINTS_CHECK: windows_sys::core::HRESULT = 0x80097011_u32 as _; +pub const MSSIPOTF_E_FAILED_POLICY: windows_sys::core::HRESULT = 0x80097010_u32 as _; +pub const MSSIPOTF_E_FILE: windows_sys::core::HRESULT = 0x80097013_u32 as _; +pub const MSSIPOTF_E_FILETOOSMALL: windows_sys::core::HRESULT = 0x8009700B_u32 as _; +pub const MSSIPOTF_E_FILE_CHECKSUM: windows_sys::core::HRESULT = 0x8009700D_u32 as _; +pub const MSSIPOTF_E_NOHEADTABLE: windows_sys::core::HRESULT = 0x80097003_u32 as _; +pub const MSSIPOTF_E_NOT_OPENTYPE: windows_sys::core::HRESULT = 0x80097012_u32 as _; +pub const MSSIPOTF_E_OUTOFMEMRANGE: windows_sys::core::HRESULT = 0x80097001_u32 as _; +pub const MSSIPOTF_E_PCONST_CHECK: windows_sys::core::HRESULT = 0x80097017_u32 as _; +pub const MSSIPOTF_E_STRUCTURE: windows_sys::core::HRESULT = 0x80097018_u32 as _; +pub const MSSIPOTF_E_TABLES_OVERLAP: windows_sys::core::HRESULT = 0x80097009_u32 as _; +pub const MSSIPOTF_E_TABLE_CHECKSUM: windows_sys::core::HRESULT = 0x8009700C_u32 as _; +pub const MSSIPOTF_E_TABLE_LONGWORD: windows_sys::core::HRESULT = 0x80097007_u32 as _; +pub const MSSIPOTF_E_TABLE_PADBYTES: windows_sys::core::HRESULT = 0x8009700A_u32 as _; +pub const MSSIPOTF_E_TABLE_TAGORDER: windows_sys::core::HRESULT = 0x80097006_u32 as _; +pub const NAP_E_CONFLICTING_ID: windows_sys::core::HRESULT = 0x80270003_u32 as _; +pub const NAP_E_ENTITY_DISABLED: windows_sys::core::HRESULT = 0x8027000E_u32 as _; +pub const NAP_E_ID_NOT_FOUND: windows_sys::core::HRESULT = 0x8027000A_u32 as _; +pub const NAP_E_INVALID_PACKET: windows_sys::core::HRESULT = 0x80270001_u32 as _; +pub const NAP_E_MAXSIZE_TOO_SMALL: windows_sys::core::HRESULT = 0x8027000B_u32 as _; +pub const NAP_E_MISMATCHED_ID: windows_sys::core::HRESULT = 0x80270008_u32 as _; +pub const NAP_E_MISSING_SOH: windows_sys::core::HRESULT = 0x80270002_u32 as _; +pub const NAP_E_NETSH_GROUPPOLICY_ERROR: windows_sys::core::HRESULT = 0x8027000F_u32 as _; +pub const NAP_E_NOT_INITIALIZED: windows_sys::core::HRESULT = 0x80270007_u32 as _; +pub const NAP_E_NOT_PENDING: windows_sys::core::HRESULT = 0x80270009_u32 as _; +pub const NAP_E_NOT_REGISTERED: windows_sys::core::HRESULT = 0x80270006_u32 as _; +pub const NAP_E_NO_CACHED_SOH: windows_sys::core::HRESULT = 0x80270004_u32 as _; +pub const NAP_E_SERVICE_NOT_RUNNING: windows_sys::core::HRESULT = 0x8027000C_u32 as _; +pub const NAP_E_SHV_CONFIG_EXISTED: windows_sys::core::HRESULT = 0x80270011_u32 as _; +pub const NAP_E_SHV_CONFIG_NOT_FOUND: windows_sys::core::HRESULT = 0x80270012_u32 as _; +pub const NAP_E_SHV_TIMEOUT: windows_sys::core::HRESULT = 0x80270013_u32 as _; +pub const NAP_E_STILL_BOUND: windows_sys::core::HRESULT = 0x80270005_u32 as _; +pub const NAP_E_TOO_MANY_CALLS: windows_sys::core::HRESULT = 0x80270010_u32 as _; +pub const NAP_S_CERT_ALREADY_PRESENT: windows_sys::core::HRESULT = 0x27000D_u32 as _; +pub type NEARPROC = Option isize>; +pub const NOERROR: u32 = 0u32; +pub const NOT_AN_ERROR1: windows_sys::core::HRESULT = 0x81600_u32 as _; +pub const NO_ERROR: WIN32_ERROR = 0u32; +pub const NTDDI_MAXVER: u32 = 2560u32; +pub const NTE_AUTHENTICATION_IGNORED: windows_sys::core::HRESULT = 0x80090031_u32 as _; +pub const NTE_BAD_ALGID: windows_sys::core::HRESULT = 0x80090008_u32 as _; +pub const NTE_BAD_DATA: windows_sys::core::HRESULT = 0x80090005_u32 as _; +pub const NTE_BAD_FLAGS: windows_sys::core::HRESULT = 0x80090009_u32 as _; +pub const NTE_BAD_HASH: windows_sys::core::HRESULT = 0x80090002_u32 as _; +pub const NTE_BAD_HASH_STATE: windows_sys::core::HRESULT = 0x8009000C_u32 as _; +pub const NTE_BAD_KEY: windows_sys::core::HRESULT = 0x80090003_u32 as _; +pub const NTE_BAD_KEYSET: windows_sys::core::HRESULT = 0x80090016_u32 as _; +pub const NTE_BAD_KEYSET_PARAM: windows_sys::core::HRESULT = 0x8009001F_u32 as _; +pub const NTE_BAD_KEY_STATE: windows_sys::core::HRESULT = 0x8009000B_u32 as _; +pub const NTE_BAD_LEN: windows_sys::core::HRESULT = 0x80090004_u32 as _; +pub const NTE_BAD_PROVIDER: windows_sys::core::HRESULT = 0x80090013_u32 as _; +pub const NTE_BAD_PROV_TYPE: windows_sys::core::HRESULT = 0x80090014_u32 as _; +pub const NTE_BAD_PUBLIC_KEY: windows_sys::core::HRESULT = 0x80090015_u32 as _; +pub const NTE_BAD_SIGNATURE: windows_sys::core::HRESULT = 0x80090006_u32 as _; +pub const NTE_BAD_TYPE: windows_sys::core::HRESULT = 0x8009000A_u32 as _; +pub const NTE_BAD_UID: windows_sys::core::HRESULT = 0x80090001_u32 as _; +pub const NTE_BAD_VER: windows_sys::core::HRESULT = 0x80090007_u32 as _; +pub const NTE_BUFFERS_OVERLAP: windows_sys::core::HRESULT = 0x8009002B_u32 as _; +pub const NTE_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x80090028_u32 as _; +pub const NTE_DECRYPTION_FAILURE: windows_sys::core::HRESULT = 0x8009002C_u32 as _; +pub const NTE_DEVICE_NOT_FOUND: windows_sys::core::HRESULT = 0x80090035_u32 as _; +pub const NTE_DEVICE_NOT_READY: windows_sys::core::HRESULT = 0x80090030_u32 as _; +pub const NTE_DOUBLE_ENCRYPT: windows_sys::core::HRESULT = 0x80090012_u32 as _; +pub const NTE_ENCRYPTION_FAILURE: windows_sys::core::HRESULT = 0x80090034_u32 as _; +pub const NTE_EXISTS: windows_sys::core::HRESULT = 0x8009000F_u32 as _; +pub const NTE_FAIL: windows_sys::core::HRESULT = 0x80090020_u32 as _; +pub const NTE_FIXEDPARAMETER: windows_sys::core::HRESULT = 0x80090025_u32 as _; +pub const NTE_HMAC_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8009002F_u32 as _; +pub const NTE_INCORRECT_PASSWORD: windows_sys::core::HRESULT = 0x80090033_u32 as _; +pub const NTE_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x8009002D_u32 as _; +pub const NTE_INVALID_HANDLE: windows_sys::core::HRESULT = 0x80090026_u32 as _; +pub const NTE_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x80090027_u32 as _; +pub const NTE_KEYSET_ENTRY_BAD: windows_sys::core::HRESULT = 0x8009001A_u32 as _; +pub const NTE_KEYSET_NOT_DEF: windows_sys::core::HRESULT = 0x80090019_u32 as _; +pub const NTE_NOT_ACTIVE_CONSOLE: windows_sys::core::HRESULT = 0x80090038_u32 as _; +pub const NTE_NOT_FOUND: windows_sys::core::HRESULT = 0x80090011_u32 as _; +pub const NTE_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80090029_u32 as _; +pub const NTE_NO_KEY: windows_sys::core::HRESULT = 0x8009000D_u32 as _; +pub const NTE_NO_MEMORY: windows_sys::core::HRESULT = 0x8009000E_u32 as _; +pub const NTE_NO_MORE_ITEMS: windows_sys::core::HRESULT = 0x8009002A_u32 as _; +pub const NTE_OP_OK: u32 = 0u32; +pub const NTE_PASSWORD_CHANGE_REQUIRED: windows_sys::core::HRESULT = 0x80090037_u32 as _; +pub const NTE_PERM: windows_sys::core::HRESULT = 0x80090010_u32 as _; +pub const NTE_PROVIDER_DLL_FAIL: windows_sys::core::HRESULT = 0x8009001D_u32 as _; +pub const NTE_PROV_DLL_NOT_FOUND: windows_sys::core::HRESULT = 0x8009001E_u32 as _; +pub const NTE_PROV_TYPE_ENTRY_BAD: windows_sys::core::HRESULT = 0x80090018_u32 as _; +pub const NTE_PROV_TYPE_NOT_DEF: windows_sys::core::HRESULT = 0x80090017_u32 as _; +pub const NTE_PROV_TYPE_NO_MATCH: windows_sys::core::HRESULT = 0x8009001B_u32 as _; +pub const NTE_SIGNATURE_FILE_BAD: windows_sys::core::HRESULT = 0x8009001C_u32 as _; +pub const NTE_SILENT_CONTEXT: windows_sys::core::HRESULT = 0x80090022_u32 as _; +pub const NTE_SYS_ERR: windows_sys::core::HRESULT = 0x80090021_u32 as _; +pub const NTE_TEMPORARY_PROFILE: windows_sys::core::HRESULT = 0x80090024_u32 as _; +pub const NTE_TOKEN_KEYSET_STORAGE_FULL: windows_sys::core::HRESULT = 0x80090023_u32 as _; +pub const NTE_UI_REQUIRED: windows_sys::core::HRESULT = 0x8009002E_u32 as _; +pub const NTE_USER_CANCELLED: windows_sys::core::HRESULT = 0x80090036_u32 as _; +pub const NTE_VALIDATION_FAILED: windows_sys::core::HRESULT = 0x80090032_u32 as _; +pub type NTSTATUS = i32; +pub type NTSTATUS_FACILITY_CODE = u32; +pub type NTSTATUS_SEVERITY_CODE = u32; +pub type OBJECT_ATTRIBUTE_FLAGS = u32; +pub const OBJ_CASE_INSENSITIVE: OBJECT_ATTRIBUTE_FLAGS = 64u32; +pub const OBJ_DONT_REPARSE: OBJECT_ATTRIBUTE_FLAGS = 4096u32; +pub const OBJ_EXCLUSIVE: OBJECT_ATTRIBUTE_FLAGS = 32u32; +pub const OBJ_FORCE_ACCESS_CHECK: OBJECT_ATTRIBUTE_FLAGS = 1024u32; +pub const OBJ_IGNORE_IMPERSONATED_DEVICEMAP: OBJECT_ATTRIBUTE_FLAGS = 2048u32; +pub const OBJ_INHERIT: OBJECT_ATTRIBUTE_FLAGS = 2u32; +pub const OBJ_KERNEL_HANDLE: OBJECT_ATTRIBUTE_FLAGS = 512u32; +pub const OBJ_OPENIF: OBJECT_ATTRIBUTE_FLAGS = 128u32; +pub const OBJ_OPENLINK: OBJECT_ATTRIBUTE_FLAGS = 256u32; +pub const OBJ_PERMANENT: OBJECT_ATTRIBUTE_FLAGS = 16u32; +pub const OBJ_VALID_ATTRIBUTES: OBJECT_ATTRIBUTE_FLAGS = 8178u32; +pub const OLEOBJ_E_FIRST: i32 = -2147221120i32; +pub const OLEOBJ_E_INVALIDVERB: windows_sys::core::HRESULT = 0x80040181_u32 as _; +pub const OLEOBJ_E_LAST: i32 = -2147221105i32; +pub const OLEOBJ_E_NOVERBS: windows_sys::core::HRESULT = 0x80040180_u32 as _; +pub const OLEOBJ_S_CANNOT_DOVERB_NOW: windows_sys::core::HRESULT = 0x40181_u32 as _; +pub const OLEOBJ_S_FIRST: i32 = 262528i32; +pub const OLEOBJ_S_INVALIDHWND: windows_sys::core::HRESULT = 0x40182_u32 as _; +pub const OLEOBJ_S_INVALIDVERB: windows_sys::core::HRESULT = 0x40180_u32 as _; +pub const OLEOBJ_S_LAST: i32 = 262543i32; +pub const OLE_E_ADVF: windows_sys::core::HRESULT = 0x80040001_u32 as _; +pub const OLE_E_ADVISENOTSUPPORTED: windows_sys::core::HRESULT = 0x80040003_u32 as _; +pub const OLE_E_BLANK: windows_sys::core::HRESULT = 0x80040007_u32 as _; +pub const OLE_E_CANTCONVERT: windows_sys::core::HRESULT = 0x80040011_u32 as _; +pub const OLE_E_CANT_BINDTOSOURCE: windows_sys::core::HRESULT = 0x8004000A_u32 as _; +pub const OLE_E_CANT_GETMONIKER: windows_sys::core::HRESULT = 0x80040009_u32 as _; +pub const OLE_E_CLASSDIFF: windows_sys::core::HRESULT = 0x80040008_u32 as _; +pub const OLE_E_ENUM_NOMORE: windows_sys::core::HRESULT = 0x80040002_u32 as _; +pub const OLE_E_FIRST: windows_sys::core::HRESULT = 0x80040000_u32 as _; +pub const OLE_E_INVALIDHWND: windows_sys::core::HRESULT = 0x8004000F_u32 as _; +pub const OLE_E_INVALIDRECT: windows_sys::core::HRESULT = 0x8004000D_u32 as _; +pub const OLE_E_LAST: windows_sys::core::HRESULT = 0x800400FF_u32 as _; +pub const OLE_E_NOCACHE: windows_sys::core::HRESULT = 0x80040006_u32 as _; +pub const OLE_E_NOCONNECTION: windows_sys::core::HRESULT = 0x80040004_u32 as _; +pub const OLE_E_NOSTORAGE: windows_sys::core::HRESULT = 0x80040012_u32 as _; +pub const OLE_E_NOTRUNNING: windows_sys::core::HRESULT = 0x80040005_u32 as _; +pub const OLE_E_NOT_INPLACEACTIVE: windows_sys::core::HRESULT = 0x80040010_u32 as _; +pub const OLE_E_OLEVERB: windows_sys::core::HRESULT = 0x80040000_u32 as _; +pub const OLE_E_PROMPTSAVECANCELLED: windows_sys::core::HRESULT = 0x8004000C_u32 as _; +pub const OLE_E_STATIC: windows_sys::core::HRESULT = 0x8004000B_u32 as _; +pub const OLE_E_WRONGCOMPOBJ: windows_sys::core::HRESULT = 0x8004000E_u32 as _; +pub const OLE_S_FIRST: windows_sys::core::HRESULT = 0x40000_u32 as _; +pub const OLE_S_LAST: windows_sys::core::HRESULT = 0x400FF_u32 as _; +pub const OLE_S_MAC_CLIPFORMAT: windows_sys::core::HRESULT = 0x40002_u32 as _; +pub const OLE_S_STATIC: windows_sys::core::HRESULT = 0x40001_u32 as _; +pub const OLE_S_USEREG: windows_sys::core::HRESULT = 0x40000_u32 as _; +pub const ONL_CONNECTION_COUNT_LIMIT: windows_sys::core::HRESULT = 0x8086000D_u32 as _; +pub const ONL_E_ACCESS_DENIED_BY_TOU: windows_sys::core::HRESULT = 0x80860002_u32 as _; +pub const ONL_E_ACCOUNT_LOCKED: windows_sys::core::HRESULT = 0x80860007_u32 as _; +pub const ONL_E_ACCOUNT_SUSPENDED_ABUSE: windows_sys::core::HRESULT = 0x8086000B_u32 as _; +pub const ONL_E_ACCOUNT_SUSPENDED_COMPROIMISE: windows_sys::core::HRESULT = 0x8086000A_u32 as _; +pub const ONL_E_ACCOUNT_UPDATE_REQUIRED: windows_sys::core::HRESULT = 0x80860005_u32 as _; +pub const ONL_E_ACTION_REQUIRED: windows_sys::core::HRESULT = 0x8086000C_u32 as _; +pub const ONL_E_CONNECTED_ACCOUNT_CAN_NOT_SIGNOUT: windows_sys::core::HRESULT = 0x8086000E_u32 as _; +pub const ONL_E_EMAIL_VERIFICATION_REQUIRED: windows_sys::core::HRESULT = 0x80860009_u32 as _; +pub const ONL_E_FORCESIGNIN: windows_sys::core::HRESULT = 0x80860006_u32 as _; +pub const ONL_E_INVALID_APPLICATION: windows_sys::core::HRESULT = 0x80860003_u32 as _; +pub const ONL_E_INVALID_AUTHENTICATION_TARGET: windows_sys::core::HRESULT = 0x80860001_u32 as _; +pub const ONL_E_PARENTAL_CONSENT_REQUIRED: windows_sys::core::HRESULT = 0x80860008_u32 as _; +pub const ONL_E_PASSWORD_UPDATE_REQUIRED: windows_sys::core::HRESULT = 0x80860004_u32 as _; +pub const ONL_E_REQUEST_THROTTLED: windows_sys::core::HRESULT = 0x80860010_u32 as _; +pub const ONL_E_USER_AUTHENTICATION_REQUIRED: windows_sys::core::HRESULT = 0x8086000F_u32 as _; +pub const OR_INVALID_OID: i32 = 1911i32; +pub const OR_INVALID_OXID: i32 = 1910i32; +pub const OR_INVALID_SET: i32 = 1912i32; +pub const OSS_ACCESS_SERIALIZATION_ERROR: windows_sys::core::HRESULT = 0x80093013_u32 as _; +pub const OSS_API_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x80093029_u32 as _; +pub const OSS_BAD_ARG: windows_sys::core::HRESULT = 0x80093006_u32 as _; +pub const OSS_BAD_ENCRULES: windows_sys::core::HRESULT = 0x80093016_u32 as _; +pub const OSS_BAD_PTR: windows_sys::core::HRESULT = 0x8009300B_u32 as _; +pub const OSS_BAD_TABLE: windows_sys::core::HRESULT = 0x8009300F_u32 as _; +pub const OSS_BAD_TIME: windows_sys::core::HRESULT = 0x8009300C_u32 as _; +pub const OSS_BAD_VERSION: windows_sys::core::HRESULT = 0x80093007_u32 as _; +pub const OSS_BERDER_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x8009302A_u32 as _; +pub const OSS_CANT_CLOSE_TRACE_FILE: windows_sys::core::HRESULT = 0x8009302E_u32 as _; +pub const OSS_CANT_OPEN_TRACE_FILE: windows_sys::core::HRESULT = 0x8009301B_u32 as _; +pub const OSS_CANT_OPEN_TRACE_WINDOW: windows_sys::core::HRESULT = 0x80093018_u32 as _; +pub const OSS_COMPARATOR_CODE_NOT_LINKED: windows_sys::core::HRESULT = 0x80093025_u32 as _; +pub const OSS_COMPARATOR_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x80093024_u32 as _; +pub const OSS_CONSTRAINT_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x80093023_u32 as _; +pub const OSS_CONSTRAINT_VIOLATED: windows_sys::core::HRESULT = 0x80093011_u32 as _; +pub const OSS_COPIER_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x80093022_u32 as _; +pub const OSS_DATA_ERROR: windows_sys::core::HRESULT = 0x80093005_u32 as _; +pub const OSS_FATAL_ERROR: windows_sys::core::HRESULT = 0x80093012_u32 as _; +pub const OSS_INDEFINITE_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8009300D_u32 as _; +pub const OSS_LIMITED: windows_sys::core::HRESULT = 0x8009300A_u32 as _; +pub const OSS_MEM_ERROR: windows_sys::core::HRESULT = 0x8009300E_u32 as _; +pub const OSS_MEM_MGR_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x80093026_u32 as _; +pub const OSS_MORE_BUF: windows_sys::core::HRESULT = 0x80093001_u32 as _; +pub const OSS_MORE_INPUT: windows_sys::core::HRESULT = 0x80093004_u32 as _; +pub const OSS_MUTEX_NOT_CREATED: windows_sys::core::HRESULT = 0x8009302D_u32 as _; +pub const OSS_NEGATIVE_UINTEGER: windows_sys::core::HRESULT = 0x80093002_u32 as _; +pub const OSS_NULL_FCN: windows_sys::core::HRESULT = 0x80093015_u32 as _; +pub const OSS_NULL_TBL: windows_sys::core::HRESULT = 0x80093014_u32 as _; +pub const OSS_OID_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x8009301A_u32 as _; +pub const OSS_OPEN_TYPE_ERROR: windows_sys::core::HRESULT = 0x8009302C_u32 as _; +pub const OSS_OUT_MEMORY: windows_sys::core::HRESULT = 0x80093008_u32 as _; +pub const OSS_OUT_OF_RANGE: windows_sys::core::HRESULT = 0x80093021_u32 as _; +pub const OSS_PDU_MISMATCH: windows_sys::core::HRESULT = 0x80093009_u32 as _; +pub const OSS_PDU_RANGE: windows_sys::core::HRESULT = 0x80093003_u32 as _; +pub const OSS_PDV_CODE_NOT_LINKED: windows_sys::core::HRESULT = 0x80093028_u32 as _; +pub const OSS_PDV_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x80093027_u32 as _; +pub const OSS_PER_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x8009302B_u32 as _; +pub const OSS_REAL_CODE_NOT_LINKED: windows_sys::core::HRESULT = 0x80093020_u32 as _; +pub const OSS_REAL_DLL_NOT_LINKED: windows_sys::core::HRESULT = 0x8009301F_u32 as _; +pub const OSS_TABLE_MISMATCH: windows_sys::core::HRESULT = 0x8009301D_u32 as _; +pub const OSS_TOO_LONG: windows_sys::core::HRESULT = 0x80093010_u32 as _; +pub const OSS_TRACE_FILE_ALREADY_OPEN: windows_sys::core::HRESULT = 0x8009301C_u32 as _; +pub const OSS_TYPE_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8009301E_u32 as _; +pub const OSS_UNAVAIL_ENCRULES: windows_sys::core::HRESULT = 0x80093017_u32 as _; +pub const OSS_UNIMPLEMENTED: windows_sys::core::HRESULT = 0x80093019_u32 as _; +pub type PAPCFUNC = Option; +pub const PEERDIST_ERROR_ALREADY_COMPLETED: i32 = 4060i32; +pub const PEERDIST_ERROR_ALREADY_EXISTS: i32 = 4058i32; +pub const PEERDIST_ERROR_ALREADY_INITIALIZED: i32 = 4055i32; +pub const PEERDIST_ERROR_CANNOT_PARSE_CONTENTINFO: i32 = 4051i32; +pub const PEERDIST_ERROR_CONTENTINFO_VERSION_UNSUPPORTED: i32 = 4050i32; +pub const PEERDIST_ERROR_INVALIDATED: i32 = 4057i32; +pub const PEERDIST_ERROR_INVALID_CONFIGURATION: i32 = 4063i32; +pub const PEERDIST_ERROR_MISSING_DATA: i32 = 4052i32; +pub const PEERDIST_ERROR_NOT_INITIALIZED: i32 = 4054i32; +pub const PEERDIST_ERROR_NOT_LICENSED: i32 = 4064i32; +pub const PEERDIST_ERROR_NO_MORE: i32 = 4053i32; +pub const PEERDIST_ERROR_OPERATION_NOTFOUND: i32 = 4059i32; +pub const PEERDIST_ERROR_OUT_OF_BOUNDS: i32 = 4061i32; +pub const PEERDIST_ERROR_SERVICE_UNAVAILABLE: i32 = 4065i32; +pub const PEERDIST_ERROR_SHUTDOWN_IN_PROGRESS: i32 = 4056i32; +pub const PEERDIST_ERROR_TRUST_FAILURE: i32 = 4066i32; +pub const PEERDIST_ERROR_VERSION_UNSUPPORTED: i32 = 4062i32; +pub const PEER_E_ALREADY_LISTENING: windows_sys::core::HRESULT = 0x80630107_u32 as _; +pub const PEER_E_CANNOT_CONVERT_PEER_NAME: windows_sys::core::HRESULT = 0x80634001_u32 as _; +pub const PEER_E_CANNOT_START_SERVICE: windows_sys::core::HRESULT = 0x80630003_u32 as _; +pub const PEER_E_CERT_STORE_CORRUPTED: windows_sys::core::HRESULT = 0x80630801_u32 as _; +pub const PEER_E_CHAIN_TOO_LONG: windows_sys::core::HRESULT = 0x80630703_u32 as _; +pub const PEER_E_CIRCULAR_CHAIN_DETECTED: windows_sys::core::HRESULT = 0x80630706_u32 as _; +pub const PEER_E_CLASSIFIER_TOO_LONG: windows_sys::core::HRESULT = 0x80630201_u32 as _; +pub const PEER_E_CLOUD_NAME_AMBIGUOUS: windows_sys::core::HRESULT = 0x80631005_u32 as _; +pub const PEER_E_CONNECTION_FAILED: windows_sys::core::HRESULT = 0x80630109_u32 as _; +pub const PEER_E_CONNECTION_NOT_AUTHENTICATED: windows_sys::core::HRESULT = 0x8063010A_u32 as _; +pub const PEER_E_CONNECTION_NOT_FOUND: windows_sys::core::HRESULT = 0x80630103_u32 as _; +pub const PEER_E_CONNECTION_REFUSED: windows_sys::core::HRESULT = 0x8063010B_u32 as _; +pub const PEER_E_CONNECT_SELF: windows_sys::core::HRESULT = 0x80630106_u32 as _; +pub const PEER_E_CONTACT_NOT_FOUND: windows_sys::core::HRESULT = 0x80636001_u32 as _; +pub const PEER_E_DATABASE_ACCESSDENIED: windows_sys::core::HRESULT = 0x80630302_u32 as _; +pub const PEER_E_DATABASE_ALREADY_PRESENT: windows_sys::core::HRESULT = 0x80630305_u32 as _; +pub const PEER_E_DATABASE_NOT_PRESENT: windows_sys::core::HRESULT = 0x80630306_u32 as _; +pub const PEER_E_DBINITIALIZATION_FAILED: windows_sys::core::HRESULT = 0x80630303_u32 as _; +pub const PEER_E_DBNAME_CHANGED: windows_sys::core::HRESULT = 0x80630011_u32 as _; +pub const PEER_E_DEFERRED_VALIDATION: windows_sys::core::HRESULT = 0x80632030_u32 as _; +pub const PEER_E_DUPLICATE_GRAPH: windows_sys::core::HRESULT = 0x80630012_u32 as _; +pub const PEER_E_EVENT_HANDLE_NOT_FOUND: windows_sys::core::HRESULT = 0x80630501_u32 as _; +pub const PEER_E_FW_BLOCKED_BY_POLICY: windows_sys::core::HRESULT = 0x80637009_u32 as _; +pub const PEER_E_FW_BLOCKED_BY_SHIELDS_UP: windows_sys::core::HRESULT = 0x8063700A_u32 as _; +pub const PEER_E_FW_DECLINED: windows_sys::core::HRESULT = 0x8063700B_u32 as _; +pub const PEER_E_FW_EXCEPTION_DISABLED: windows_sys::core::HRESULT = 0x80637008_u32 as _; +pub const PEER_E_GRAPH_IN_USE: windows_sys::core::HRESULT = 0x80630015_u32 as _; +pub const PEER_E_GRAPH_NOT_READY: windows_sys::core::HRESULT = 0x80630013_u32 as _; +pub const PEER_E_GRAPH_SHUTTING_DOWN: windows_sys::core::HRESULT = 0x80630014_u32 as _; +pub const PEER_E_GROUPS_EXIST: windows_sys::core::HRESULT = 0x80630204_u32 as _; +pub const PEER_E_GROUP_IN_USE: windows_sys::core::HRESULT = 0x80632092_u32 as _; +pub const PEER_E_GROUP_NOT_READY: windows_sys::core::HRESULT = 0x80632091_u32 as _; +pub const PEER_E_IDENTITY_DELETED: windows_sys::core::HRESULT = 0x806320A0_u32 as _; +pub const PEER_E_IDENTITY_NOT_FOUND: windows_sys::core::HRESULT = 0x80630401_u32 as _; +pub const PEER_E_INVALID_ADDRESS: windows_sys::core::HRESULT = 0x80637007_u32 as _; +pub const PEER_E_INVALID_ATTRIBUTES: windows_sys::core::HRESULT = 0x80630602_u32 as _; +pub const PEER_E_INVALID_CLASSIFIER: windows_sys::core::HRESULT = 0x80632060_u32 as _; +pub const PEER_E_INVALID_CLASSIFIER_PROPERTY: windows_sys::core::HRESULT = 0x80632072_u32 as _; +pub const PEER_E_INVALID_CREDENTIAL: windows_sys::core::HRESULT = 0x80632082_u32 as _; +pub const PEER_E_INVALID_CREDENTIAL_INFO: windows_sys::core::HRESULT = 0x80632081_u32 as _; +pub const PEER_E_INVALID_DATABASE: windows_sys::core::HRESULT = 0x80630016_u32 as _; +pub const PEER_E_INVALID_FRIENDLY_NAME: windows_sys::core::HRESULT = 0x80632070_u32 as _; +pub const PEER_E_INVALID_GRAPH: windows_sys::core::HRESULT = 0x80630010_u32 as _; +pub const PEER_E_INVALID_GROUP: windows_sys::core::HRESULT = 0x80632093_u32 as _; +pub const PEER_E_INVALID_GROUP_PROPERTIES: windows_sys::core::HRESULT = 0x80632040_u32 as _; +pub const PEER_E_INVALID_PEER_HOST_NAME: windows_sys::core::HRESULT = 0x80634002_u32 as _; +pub const PEER_E_INVALID_PEER_NAME: windows_sys::core::HRESULT = 0x80632050_u32 as _; +pub const PEER_E_INVALID_RECORD: windows_sys::core::HRESULT = 0x80632010_u32 as _; +pub const PEER_E_INVALID_RECORD_EXPIRATION: windows_sys::core::HRESULT = 0x80632080_u32 as _; +pub const PEER_E_INVALID_RECORD_SIZE: windows_sys::core::HRESULT = 0x80632083_u32 as _; +pub const PEER_E_INVALID_ROLE_PROPERTY: windows_sys::core::HRESULT = 0x80632071_u32 as _; +pub const PEER_E_INVALID_SEARCH: windows_sys::core::HRESULT = 0x80630601_u32 as _; +pub const PEER_E_INVALID_TIME_PERIOD: windows_sys::core::HRESULT = 0x80630705_u32 as _; +pub const PEER_E_INVITATION_NOT_TRUSTED: windows_sys::core::HRESULT = 0x80630701_u32 as _; +pub const PEER_E_INVITE_CANCELLED: windows_sys::core::HRESULT = 0x80637000_u32 as _; +pub const PEER_E_INVITE_RESPONSE_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80637001_u32 as _; +pub const PEER_E_IPV6_NOT_INSTALLED: windows_sys::core::HRESULT = 0x80630001_u32 as _; +pub const PEER_E_MAX_RECORD_SIZE_EXCEEDED: windows_sys::core::HRESULT = 0x80630304_u32 as _; +pub const PEER_E_NODE_NOT_FOUND: windows_sys::core::HRESULT = 0x80630108_u32 as _; +pub const PEER_E_NOT_AUTHORIZED: windows_sys::core::HRESULT = 0x80632020_u32 as _; +pub const PEER_E_NOT_INITIALIZED: windows_sys::core::HRESULT = 0x80630002_u32 as _; +pub const PEER_E_NOT_LICENSED: windows_sys::core::HRESULT = 0x80630004_u32 as _; +pub const PEER_E_NOT_SIGNED_IN: windows_sys::core::HRESULT = 0x80637003_u32 as _; +pub const PEER_E_NO_CLOUD: windows_sys::core::HRESULT = 0x80631001_u32 as _; +pub const PEER_E_NO_KEY_ACCESS: windows_sys::core::HRESULT = 0x80630203_u32 as _; +pub const PEER_E_NO_MEMBERS_FOUND: windows_sys::core::HRESULT = 0x80632094_u32 as _; +pub const PEER_E_NO_MEMBER_CONNECTIONS: windows_sys::core::HRESULT = 0x80632095_u32 as _; +pub const PEER_E_NO_MORE: windows_sys::core::HRESULT = 0x80634003_u32 as _; +pub const PEER_E_PASSWORD_DOES_NOT_MEET_POLICY: windows_sys::core::HRESULT = 0x80632021_u32 as _; +pub const PEER_E_PNRP_DUPLICATE_PEER_NAME: windows_sys::core::HRESULT = 0x80634005_u32 as _; +pub const PEER_E_PRIVACY_DECLINED: windows_sys::core::HRESULT = 0x80637004_u32 as _; +pub const PEER_E_RECORD_NOT_FOUND: windows_sys::core::HRESULT = 0x80630301_u32 as _; +pub const PEER_E_SERVICE_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x806320A1_u32 as _; +pub const PEER_E_TIMEOUT: windows_sys::core::HRESULT = 0x80637005_u32 as _; +pub const PEER_E_TOO_MANY_ATTRIBUTES: windows_sys::core::HRESULT = 0x80630017_u32 as _; +pub const PEER_E_TOO_MANY_IDENTITIES: windows_sys::core::HRESULT = 0x80630202_u32 as _; +pub const PEER_E_UNABLE_TO_LISTEN: windows_sys::core::HRESULT = 0x80632096_u32 as _; +pub const PEER_E_UNSUPPORTED_VERSION: windows_sys::core::HRESULT = 0x80632090_u32 as _; +pub const PEER_S_ALREADY_A_MEMBER: windows_sys::core::HRESULT = 0x630006_u32 as _; +pub const PEER_S_ALREADY_CONNECTED: windows_sys::core::HRESULT = 0x632000_u32 as _; +pub const PEER_S_GRAPH_DATA_CREATED: windows_sys::core::HRESULT = 0x630001_u32 as _; +pub const PEER_S_NO_CONNECTIVITY: windows_sys::core::HRESULT = 0x630005_u32 as _; +pub const PEER_S_NO_EVENT_DATA: windows_sys::core::HRESULT = 0x630002_u32 as _; +pub const PEER_S_SUBSCRIPTION_EXISTS: windows_sys::core::HRESULT = 0x636000_u32 as _; +pub const PERSIST_E_NOTSELFSIZING: windows_sys::core::HRESULT = 0x800B000B_u32 as _; +pub const PERSIST_E_SIZEDEFINITE: windows_sys::core::HRESULT = 0x800B0009_u32 as _; +pub const PERSIST_E_SIZEINDEFINITE: windows_sys::core::HRESULT = 0x800B000A_u32 as _; +pub const PLA_E_CABAPI_FAILURE: windows_sys::core::HRESULT = 0x80300113_u32 as _; +pub const PLA_E_CONFLICT_INCL_EXCL_API: windows_sys::core::HRESULT = 0x80300105_u32 as _; +pub const PLA_E_CREDENTIALS_REQUIRED: windows_sys::core::HRESULT = 0x80300103_u32 as _; +pub const PLA_E_DCS_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x803000B7_u32 as _; +pub const PLA_E_DCS_IN_USE: windows_sys::core::HRESULT = 0x803000AA_u32 as _; +pub const PLA_E_DCS_NOT_FOUND: windows_sys::core::HRESULT = 0x80300002_u32 as _; +pub const PLA_E_DCS_NOT_RUNNING: windows_sys::core::HRESULT = 0x80300104_u32 as _; +pub const PLA_E_DCS_SINGLETON_REQUIRED: windows_sys::core::HRESULT = 0x80300102_u32 as _; +pub const PLA_E_DCS_START_WAIT_TIMEOUT: windows_sys::core::HRESULT = 0x8030010A_u32 as _; +pub const PLA_E_DC_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x80300109_u32 as _; +pub const PLA_E_DC_START_WAIT_TIMEOUT: windows_sys::core::HRESULT = 0x8030010B_u32 as _; +pub const PLA_E_EXE_ALREADY_CONFIGURED: windows_sys::core::HRESULT = 0x80300107_u32 as _; +pub const PLA_E_EXE_FULL_PATH_REQUIRED: windows_sys::core::HRESULT = 0x8030010E_u32 as _; +pub const PLA_E_EXE_PATH_NOT_VALID: windows_sys::core::HRESULT = 0x80300108_u32 as _; +pub const PLA_E_INVALID_SESSION_NAME: windows_sys::core::HRESULT = 0x8030010F_u32 as _; +pub const PLA_E_NETWORK_EXE_NOT_VALID: windows_sys::core::HRESULT = 0x80300106_u32 as _; +pub const PLA_E_NO_DUPLICATES: windows_sys::core::HRESULT = 0x8030010D_u32 as _; +pub const PLA_E_NO_MIN_DISK: windows_sys::core::HRESULT = 0x80300070_u32 as _; +pub const PLA_E_PLA_CHANNEL_NOT_ENABLED: windows_sys::core::HRESULT = 0x80300110_u32 as _; +pub const PLA_E_PROPERTY_CONFLICT: windows_sys::core::HRESULT = 0x80300101_u32 as _; +pub const PLA_E_REPORT_WAIT_TIMEOUT: windows_sys::core::HRESULT = 0x8030010C_u32 as _; +pub const PLA_E_RULES_MANAGER_FAILED: windows_sys::core::HRESULT = 0x80300112_u32 as _; +pub const PLA_E_TASKSCHED_CHANNEL_NOT_ENABLED: windows_sys::core::HRESULT = 0x80300111_u32 as _; +pub const PLA_E_TOO_MANY_FOLDERS: windows_sys::core::HRESULT = 0x80300045_u32 as _; +pub const PLA_S_PROPERTY_IGNORED: windows_sys::core::HRESULT = 0x300100_u32 as _; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct POINT { + pub x: i32, + pub y: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct POINTL { + pub x: i32, + pub y: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct POINTS { + pub x: i16, + pub y: i16, +} +pub const PRESENTATION_ERROR_LOST: windows_sys::core::HRESULT = 0x88810001_u32 as _; +pub type PROC = Option isize>; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct PROPERTYKEY { + pub fmtid: windows_sys::core::GUID, + pub pid: u32, +} +pub const PSINK_E_INDEX_ONLY: windows_sys::core::HRESULT = 0x80041791_u32 as _; +pub const PSINK_E_LARGE_ATTACHMENT: windows_sys::core::HRESULT = 0x80041792_u32 as _; +pub const PSINK_E_QUERY_ONLY: windows_sys::core::HRESULT = 0x80041790_u32 as _; +pub const PSINK_S_LARGE_WORD: windows_sys::core::HRESULT = 0x41793_u32 as _; +pub const QPARSE_E_EXPECTING_BRACE: windows_sys::core::HRESULT = 0x80041666_u32 as _; +pub const QPARSE_E_EXPECTING_COMMA: windows_sys::core::HRESULT = 0x80041671_u32 as _; +pub const QPARSE_E_EXPECTING_CURRENCY: windows_sys::core::HRESULT = 0x80041664_u32 as _; +pub const QPARSE_E_EXPECTING_DATE: windows_sys::core::HRESULT = 0x80041663_u32 as _; +pub const QPARSE_E_EXPECTING_EOS: windows_sys::core::HRESULT = 0x80041670_u32 as _; +pub const QPARSE_E_EXPECTING_GUID: windows_sys::core::HRESULT = 0x80041665_u32 as _; +pub const QPARSE_E_EXPECTING_INTEGER: windows_sys::core::HRESULT = 0x80041661_u32 as _; +pub const QPARSE_E_EXPECTING_PAREN: windows_sys::core::HRESULT = 0x80041667_u32 as _; +pub const QPARSE_E_EXPECTING_PHRASE: windows_sys::core::HRESULT = 0x8004166A_u32 as _; +pub const QPARSE_E_EXPECTING_PROPERTY: windows_sys::core::HRESULT = 0x80041668_u32 as _; +pub const QPARSE_E_EXPECTING_REAL: windows_sys::core::HRESULT = 0x80041662_u32 as _; +pub const QPARSE_E_EXPECTING_REGEX: windows_sys::core::HRESULT = 0x8004166C_u32 as _; +pub const QPARSE_E_EXPECTING_REGEX_PROPERTY: windows_sys::core::HRESULT = 0x8004166D_u32 as _; +pub const QPARSE_E_INVALID_GROUPING: windows_sys::core::HRESULT = 0x80041677_u32 as _; +pub const QPARSE_E_INVALID_LITERAL: windows_sys::core::HRESULT = 0x8004166E_u32 as _; +pub const QPARSE_E_INVALID_QUERY: windows_sys::core::HRESULT = 0x8004167A_u32 as _; +pub const QPARSE_E_INVALID_RANKMETHOD: windows_sys::core::HRESULT = 0x8004167B_u32 as _; +pub const QPARSE_E_INVALID_SORT_ORDER: windows_sys::core::HRESULT = 0x80041675_u32 as _; +pub const QPARSE_E_NOT_YET_IMPLEMENTED: windows_sys::core::HRESULT = 0x80041669_u32 as _; +pub const QPARSE_E_NO_SUCH_PROPERTY: windows_sys::core::HRESULT = 0x8004166F_u32 as _; +pub const QPARSE_E_NO_SUCH_SORT_PROPERTY: windows_sys::core::HRESULT = 0x80041674_u32 as _; +pub const QPARSE_E_UNEXPECTED_EOS: windows_sys::core::HRESULT = 0x80041672_u32 as _; +pub const QPARSE_E_UNEXPECTED_NOT: windows_sys::core::HRESULT = 0x80041660_u32 as _; +pub const QPARSE_E_UNSUPPORTED_PROPERTY_TYPE: windows_sys::core::HRESULT = 0x8004166B_u32 as _; +pub const QPARSE_E_WEIGHT_OUT_OF_RANGE: windows_sys::core::HRESULT = 0x80041673_u32 as _; +pub const QPLIST_E_BAD_GUID: windows_sys::core::HRESULT = 0x80041659_u32 as _; +pub const QPLIST_E_BYREF_USED_WITHOUT_PTRTYPE: windows_sys::core::HRESULT = 0x8004165E_u32 as _; +pub const QPLIST_E_CANT_OPEN_FILE: windows_sys::core::HRESULT = 0x80041651_u32 as _; +pub const QPLIST_E_CANT_SET_PROPERTY: windows_sys::core::HRESULT = 0x8004165B_u32 as _; +pub const QPLIST_E_DUPLICATE: windows_sys::core::HRESULT = 0x8004165C_u32 as _; +pub const QPLIST_E_EXPECTING_CLOSE_PAREN: windows_sys::core::HRESULT = 0x80041657_u32 as _; +pub const QPLIST_E_EXPECTING_GUID: windows_sys::core::HRESULT = 0x80041658_u32 as _; +pub const QPLIST_E_EXPECTING_INTEGER: windows_sys::core::HRESULT = 0x80041656_u32 as _; +pub const QPLIST_E_EXPECTING_NAME: windows_sys::core::HRESULT = 0x80041653_u32 as _; +pub const QPLIST_E_EXPECTING_PROP_SPEC: windows_sys::core::HRESULT = 0x8004165A_u32 as _; +pub const QPLIST_E_EXPECTING_TYPE: windows_sys::core::HRESULT = 0x80041654_u32 as _; +pub const QPLIST_E_READ_ERROR: windows_sys::core::HRESULT = 0x80041652_u32 as _; +pub const QPLIST_E_UNRECOGNIZED_TYPE: windows_sys::core::HRESULT = 0x80041655_u32 as _; +pub const QPLIST_E_VECTORBYREF_USED_ALONE: windows_sys::core::HRESULT = 0x8004165D_u32 as _; +pub const QPLIST_S_DUPLICATE: windows_sys::core::HRESULT = 0x41679_u32 as _; +pub const QUERY_E_ALLNOISE: windows_sys::core::HRESULT = 0x80041605_u32 as _; +pub const QUERY_E_DIR_ON_REMOVABLE_DRIVE: windows_sys::core::HRESULT = 0x8004160B_u32 as _; +pub const QUERY_E_DUPLICATE_OUTPUT_COLUMN: windows_sys::core::HRESULT = 0x80041608_u32 as _; +pub const QUERY_E_FAILED: windows_sys::core::HRESULT = 0x80041600_u32 as _; +pub const QUERY_E_INVALIDCATEGORIZE: windows_sys::core::HRESULT = 0x80041604_u32 as _; +pub const QUERY_E_INVALIDQUERY: windows_sys::core::HRESULT = 0x80041601_u32 as _; +pub const QUERY_E_INVALIDRESTRICTION: windows_sys::core::HRESULT = 0x80041602_u32 as _; +pub const QUERY_E_INVALIDSORT: windows_sys::core::HRESULT = 0x80041603_u32 as _; +pub const QUERY_E_INVALID_DIRECTORY: windows_sys::core::HRESULT = 0x8004160A_u32 as _; +pub const QUERY_E_INVALID_OUTPUT_COLUMN: windows_sys::core::HRESULT = 0x80041609_u32 as _; +pub const QUERY_E_TIMEDOUT: windows_sys::core::HRESULT = 0x80041607_u32 as _; +pub const QUERY_E_TOOCOMPLEX: windows_sys::core::HRESULT = 0x80041606_u32 as _; +pub const QUERY_S_NO_QUERY: windows_sys::core::HRESULT = 0x8004160C_u32 as _; +pub const QUTIL_E_CANT_CONVERT_VROOT: windows_sys::core::HRESULT = 0x80041676_u32 as _; +pub const QUTIL_E_INVALID_CODEPAGE: windows_sys::core::HRESULT = 0xC0041678_u32 as _; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RECT { + pub left: i32, + pub top: i32, + pub right: i32, + pub bottom: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RECTL { + pub left: i32, + pub top: i32, + pub right: i32, + pub bottom: i32, +} +pub const REGDB_E_BADTHREADINGMODEL: windows_sys::core::HRESULT = 0x80040156_u32 as _; +pub const REGDB_E_CLASSNOTREG: windows_sys::core::HRESULT = 0x80040154_u32 as _; +pub const REGDB_E_FIRST: i32 = -2147221168i32; +pub const REGDB_E_IIDNOTREG: windows_sys::core::HRESULT = 0x80040155_u32 as _; +pub const REGDB_E_INVALIDVALUE: windows_sys::core::HRESULT = 0x80040153_u32 as _; +pub const REGDB_E_KEYMISSING: windows_sys::core::HRESULT = 0x80040152_u32 as _; +pub const REGDB_E_LAST: i32 = -2147221153i32; +pub const REGDB_E_PACKAGEPOLICYVIOLATION: windows_sys::core::HRESULT = 0x80040157_u32 as _; +pub const REGDB_E_READREGDB: windows_sys::core::HRESULT = 0x80040150_u32 as _; +pub const REGDB_E_WRITEREGDB: windows_sys::core::HRESULT = 0x80040151_u32 as _; +pub const REGDB_S_FIRST: i32 = 262480i32; +pub const REGDB_S_LAST: i32 = 262495i32; +pub const ROUTEBASE: u32 = 900u32; +pub const ROUTEBASEEND: u32 = 957u32; +pub const RO_E_BLOCKED_CROSS_ASTA_CALL: windows_sys::core::HRESULT = 0x8000001F_u32 as _; +pub const RO_E_CANNOT_ACTIVATE_FULL_TRUST_SERVER: windows_sys::core::HRESULT = 0x80000020_u32 as _; +pub const RO_E_CANNOT_ACTIVATE_UNIVERSAL_APPLICATION_SERVER: windows_sys::core::HRESULT = 0x80000021_u32 as _; +pub const RO_E_CHANGE_NOTIFICATION_IN_PROGRESS: windows_sys::core::HRESULT = 0x80000015_u32 as _; +pub const RO_E_CLOSED: windows_sys::core::HRESULT = 0x80000013_u32 as _; +pub const RO_E_COMMITTED: windows_sys::core::HRESULT = 0x8000001E_u32 as _; +pub const RO_E_ERROR_STRING_NOT_FOUND: windows_sys::core::HRESULT = 0x80000016_u32 as _; +pub const RO_E_EXCLUSIVE_WRITE: windows_sys::core::HRESULT = 0x80000014_u32 as _; +pub const RO_E_INVALID_METADATA_FILE: windows_sys::core::HRESULT = 0x80000012_u32 as _; +pub const RO_E_METADATA_INVALID_TYPE_FORMAT: windows_sys::core::HRESULT = 0x80000011_u32 as _; +pub const RO_E_METADATA_NAME_IS_NAMESPACE: windows_sys::core::HRESULT = 0x80000010_u32 as _; +pub const RO_E_METADATA_NAME_NOT_FOUND: windows_sys::core::HRESULT = 0x8000000F_u32 as _; +pub const RO_E_MUST_BE_AGILE: windows_sys::core::HRESULT = 0x8000001C_u32 as _; +pub const RO_E_UNSUPPORTED_FROM_MTA: windows_sys::core::HRESULT = 0x8000001D_u32 as _; +pub const RPC_E_ACCESS_DENIED: windows_sys::core::HRESULT = 0x8001011B_u32 as _; +pub const RPC_E_ATTEMPTED_MULTITHREAD: windows_sys::core::HRESULT = 0x80010102_u32 as _; +pub const RPC_E_CALL_CANCELED: windows_sys::core::HRESULT = 0x80010002_u32 as _; +pub const RPC_E_CALL_COMPLETE: windows_sys::core::HRESULT = 0x80010117_u32 as _; +pub const RPC_E_CALL_REJECTED: windows_sys::core::HRESULT = 0x80010001_u32 as _; +pub const RPC_E_CANTCALLOUT_AGAIN: windows_sys::core::HRESULT = 0x80010011_u32 as _; +pub const RPC_E_CANTCALLOUT_INASYNCCALL: windows_sys::core::HRESULT = 0x80010004_u32 as _; +pub const RPC_E_CANTCALLOUT_INEXTERNALCALL: windows_sys::core::HRESULT = 0x80010005_u32 as _; +pub const RPC_E_CANTCALLOUT_ININPUTSYNCCALL: windows_sys::core::HRESULT = 0x8001010D_u32 as _; +pub const RPC_E_CANTPOST_INSENDCALL: windows_sys::core::HRESULT = 0x80010003_u32 as _; +pub const RPC_E_CANTTRANSMIT_CALL: windows_sys::core::HRESULT = 0x8001000A_u32 as _; +pub const RPC_E_CHANGED_MODE: windows_sys::core::HRESULT = 0x80010106_u32 as _; +pub const RPC_E_CLIENT_CANTMARSHAL_DATA: windows_sys::core::HRESULT = 0x8001000B_u32 as _; +pub const RPC_E_CLIENT_CANTUNMARSHAL_DATA: windows_sys::core::HRESULT = 0x8001000C_u32 as _; +pub const RPC_E_CLIENT_DIED: windows_sys::core::HRESULT = 0x80010008_u32 as _; +pub const RPC_E_CONNECTION_TERMINATED: windows_sys::core::HRESULT = 0x80010006_u32 as _; +pub const RPC_E_DISCONNECTED: windows_sys::core::HRESULT = 0x80010108_u32 as _; +pub const RPC_E_FAULT: windows_sys::core::HRESULT = 0x80010104_u32 as _; +pub const RPC_E_FULLSIC_REQUIRED: windows_sys::core::HRESULT = 0x80010121_u32 as _; +pub const RPC_E_INVALIDMETHOD: windows_sys::core::HRESULT = 0x80010107_u32 as _; +pub const RPC_E_INVALID_CALLDATA: windows_sys::core::HRESULT = 0x8001010C_u32 as _; +pub const RPC_E_INVALID_DATA: windows_sys::core::HRESULT = 0x8001000F_u32 as _; +pub const RPC_E_INVALID_DATAPACKET: windows_sys::core::HRESULT = 0x80010009_u32 as _; +pub const RPC_E_INVALID_EXTENSION: windows_sys::core::HRESULT = 0x80010112_u32 as _; +pub const RPC_E_INVALID_HEADER: windows_sys::core::HRESULT = 0x80010111_u32 as _; +pub const RPC_E_INVALID_IPID: windows_sys::core::HRESULT = 0x80010113_u32 as _; +pub const RPC_E_INVALID_OBJECT: windows_sys::core::HRESULT = 0x80010114_u32 as _; +pub const RPC_E_INVALID_OBJREF: windows_sys::core::HRESULT = 0x8001011D_u32 as _; +pub const RPC_E_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x80010010_u32 as _; +pub const RPC_E_INVALID_STD_NAME: windows_sys::core::HRESULT = 0x80010122_u32 as _; +pub const RPC_E_NOT_REGISTERED: windows_sys::core::HRESULT = 0x80010103_u32 as _; +pub const RPC_E_NO_CONTEXT: windows_sys::core::HRESULT = 0x8001011E_u32 as _; +pub const RPC_E_NO_GOOD_SECURITY_PACKAGES: windows_sys::core::HRESULT = 0x8001011A_u32 as _; +pub const RPC_E_NO_SYNC: windows_sys::core::HRESULT = 0x80010120_u32 as _; +pub const RPC_E_OUT_OF_RESOURCES: windows_sys::core::HRESULT = 0x80010101_u32 as _; +pub const RPC_E_REMOTE_DISABLED: windows_sys::core::HRESULT = 0x8001011C_u32 as _; +pub const RPC_E_RETRY: windows_sys::core::HRESULT = 0x80010109_u32 as _; +pub const RPC_E_SERVERCALL_REJECTED: windows_sys::core::HRESULT = 0x8001010B_u32 as _; +pub const RPC_E_SERVERCALL_RETRYLATER: windows_sys::core::HRESULT = 0x8001010A_u32 as _; +pub const RPC_E_SERVERFAULT: windows_sys::core::HRESULT = 0x80010105_u32 as _; +pub const RPC_E_SERVER_CANTMARSHAL_DATA: windows_sys::core::HRESULT = 0x8001000D_u32 as _; +pub const RPC_E_SERVER_CANTUNMARSHAL_DATA: windows_sys::core::HRESULT = 0x8001000E_u32 as _; +pub const RPC_E_SERVER_DIED: windows_sys::core::HRESULT = 0x80010007_u32 as _; +pub const RPC_E_SERVER_DIED_DNE: windows_sys::core::HRESULT = 0x80010012_u32 as _; +pub const RPC_E_SYS_CALL_FAILED: windows_sys::core::HRESULT = 0x80010100_u32 as _; +pub const RPC_E_THREAD_NOT_INIT: windows_sys::core::HRESULT = 0x8001010F_u32 as _; +pub const RPC_E_TIMEOUT: windows_sys::core::HRESULT = 0x8001011F_u32 as _; +pub const RPC_E_TOO_LATE: windows_sys::core::HRESULT = 0x80010119_u32 as _; +pub const RPC_E_UNEXPECTED: windows_sys::core::HRESULT = 0x8001FFFF_u32 as _; +pub const RPC_E_UNSECURE_CALL: windows_sys::core::HRESULT = 0x80010118_u32 as _; +pub const RPC_E_VERSION_MISMATCH: windows_sys::core::HRESULT = 0x80010110_u32 as _; +pub const RPC_E_WRONG_THREAD: windows_sys::core::HRESULT = 0x8001010E_u32 as _; +pub const RPC_NT_ADDRESS_ERROR: NTSTATUS = 0xC0020045_u32 as _; +pub const RPC_NT_ALREADY_LISTENING: NTSTATUS = 0xC002000E_u32 as _; +pub const RPC_NT_ALREADY_REGISTERED: NTSTATUS = 0xC002000C_u32 as _; +pub const RPC_NT_BAD_STUB_DATA: NTSTATUS = 0xC003000C_u32 as _; +pub const RPC_NT_BINDING_HAS_NO_AUTH: NTSTATUS = 0xC002002F_u32 as _; +pub const RPC_NT_BINDING_INCOMPLETE: NTSTATUS = 0xC0020051_u32 as _; +pub const RPC_NT_BYTE_COUNT_TOO_SMALL: NTSTATUS = 0xC003000B_u32 as _; +pub const RPC_NT_CALL_CANCELLED: NTSTATUS = 0xC0020050_u32 as _; +pub const RPC_NT_CALL_FAILED: NTSTATUS = 0xC002001B_u32 as _; +pub const RPC_NT_CALL_FAILED_DNE: NTSTATUS = 0xC002001C_u32 as _; +pub const RPC_NT_CALL_IN_PROGRESS: NTSTATUS = 0xC0020049_u32 as _; +pub const RPC_NT_CANNOT_SUPPORT: NTSTATUS = 0xC0020041_u32 as _; +pub const RPC_NT_CANT_CREATE_ENDPOINT: NTSTATUS = 0xC0020015_u32 as _; +pub const RPC_NT_COMM_FAILURE: NTSTATUS = 0xC0020052_u32 as _; +pub const RPC_NT_COOKIE_AUTH_FAILED: NTSTATUS = 0xC0020065_u32 as _; +pub const RPC_NT_DUPLICATE_ENDPOINT: NTSTATUS = 0xC0020029_u32 as _; +pub const RPC_NT_ENTRY_ALREADY_EXISTS: NTSTATUS = 0xC002003D_u32 as _; +pub const RPC_NT_ENTRY_NOT_FOUND: NTSTATUS = 0xC002003E_u32 as _; +pub const RPC_NT_ENUM_VALUE_OUT_OF_RANGE: NTSTATUS = 0xC003000A_u32 as _; +pub const RPC_NT_FP_DIV_ZERO: NTSTATUS = 0xC0020046_u32 as _; +pub const RPC_NT_FP_OVERFLOW: NTSTATUS = 0xC0020048_u32 as _; +pub const RPC_NT_FP_UNDERFLOW: NTSTATUS = 0xC0020047_u32 as _; +pub const RPC_NT_GROUP_MEMBER_NOT_FOUND: NTSTATUS = 0xC002004B_u32 as _; +pub const RPC_NT_INCOMPLETE_NAME: NTSTATUS = 0xC0020038_u32 as _; +pub const RPC_NT_INTERFACE_NOT_FOUND: NTSTATUS = 0xC002003C_u32 as _; +pub const RPC_NT_INTERNAL_ERROR: NTSTATUS = 0xC0020043_u32 as _; +pub const RPC_NT_INVALID_ASYNC_CALL: NTSTATUS = 0xC0020063_u32 as _; +pub const RPC_NT_INVALID_ASYNC_HANDLE: NTSTATUS = 0xC0020062_u32 as _; +pub const RPC_NT_INVALID_AUTH_IDENTITY: NTSTATUS = 0xC0020032_u32 as _; +pub const RPC_NT_INVALID_BINDING: NTSTATUS = 0xC0020003_u32 as _; +pub const RPC_NT_INVALID_BOUND: NTSTATUS = 0xC0020023_u32 as _; +pub const RPC_NT_INVALID_ENDPOINT_FORMAT: NTSTATUS = 0xC0020007_u32 as _; +pub const RPC_NT_INVALID_ES_ACTION: NTSTATUS = 0xC0030059_u32 as _; +pub const RPC_NT_INVALID_NAF_ID: NTSTATUS = 0xC0020040_u32 as _; +pub const RPC_NT_INVALID_NAME_SYNTAX: NTSTATUS = 0xC0020025_u32 as _; +pub const RPC_NT_INVALID_NETWORK_OPTIONS: NTSTATUS = 0xC0020019_u32 as _; +pub const RPC_NT_INVALID_NET_ADDR: NTSTATUS = 0xC0020008_u32 as _; +pub const RPC_NT_INVALID_OBJECT: NTSTATUS = 0xC002004D_u32 as _; +pub const RPC_NT_INVALID_PIPE_OBJECT: NTSTATUS = 0xC003005C_u32 as _; +pub const RPC_NT_INVALID_PIPE_OPERATION: NTSTATUS = 0xC003005D_u32 as _; +pub const RPC_NT_INVALID_RPC_PROTSEQ: NTSTATUS = 0xC0020005_u32 as _; +pub const RPC_NT_INVALID_STRING_BINDING: NTSTATUS = 0xC0020001_u32 as _; +pub const RPC_NT_INVALID_STRING_UUID: NTSTATUS = 0xC0020006_u32 as _; +pub const RPC_NT_INVALID_TAG: NTSTATUS = 0xC0020022_u32 as _; +pub const RPC_NT_INVALID_TIMEOUT: NTSTATUS = 0xC002000A_u32 as _; +pub const RPC_NT_INVALID_VERS_OPTION: NTSTATUS = 0xC0020039_u32 as _; +pub const RPC_NT_MAX_CALLS_TOO_SMALL: NTSTATUS = 0xC002002B_u32 as _; +pub const RPC_NT_NAME_SERVICE_UNAVAILABLE: NTSTATUS = 0xC002003F_u32 as _; +pub const RPC_NT_NOTHING_TO_EXPORT: NTSTATUS = 0xC0020037_u32 as _; +pub const RPC_NT_NOT_ALL_OBJS_UNEXPORTED: NTSTATUS = 0xC002003B_u32 as _; +pub const RPC_NT_NOT_CANCELLED: NTSTATUS = 0xC0020058_u32 as _; +pub const RPC_NT_NOT_LISTENING: NTSTATUS = 0xC0020010_u32 as _; +pub const RPC_NT_NOT_RPC_ERROR: NTSTATUS = 0xC0020055_u32 as _; +pub const RPC_NT_NO_BINDINGS: NTSTATUS = 0xC0020013_u32 as _; +pub const RPC_NT_NO_CALL_ACTIVE: NTSTATUS = 0xC002001A_u32 as _; +pub const RPC_NT_NO_CONTEXT_AVAILABLE: NTSTATUS = 0xC0020042_u32 as _; +pub const RPC_NT_NO_ENDPOINT_FOUND: NTSTATUS = 0xC0020009_u32 as _; +pub const RPC_NT_NO_ENTRY_NAME: NTSTATUS = 0xC0020024_u32 as _; +pub const RPC_NT_NO_INTERFACES: NTSTATUS = 0xC002004F_u32 as _; +pub const RPC_NT_NO_MORE_BINDINGS: NTSTATUS = 0xC002004A_u32 as _; +pub const RPC_NT_NO_MORE_ENTRIES: NTSTATUS = 0xC0030001_u32 as _; +pub const RPC_NT_NO_MORE_MEMBERS: NTSTATUS = 0xC002003A_u32 as _; +pub const RPC_NT_NO_PRINC_NAME: NTSTATUS = 0xC0020054_u32 as _; +pub const RPC_NT_NO_PROTSEQS: NTSTATUS = 0xC0020014_u32 as _; +pub const RPC_NT_NO_PROTSEQS_REGISTERED: NTSTATUS = 0xC002000F_u32 as _; +pub const RPC_NT_NULL_REF_POINTER: NTSTATUS = 0xC0030009_u32 as _; +pub const RPC_NT_OBJECT_NOT_FOUND: NTSTATUS = 0xC002000B_u32 as _; +pub const RPC_NT_OUT_OF_RESOURCES: NTSTATUS = 0xC0020016_u32 as _; +pub const RPC_NT_PIPE_CLOSED: NTSTATUS = 0xC003005F_u32 as _; +pub const RPC_NT_PIPE_DISCIPLINE_ERROR: NTSTATUS = 0xC0030060_u32 as _; +pub const RPC_NT_PIPE_EMPTY: NTSTATUS = 0xC0030061_u32 as _; +pub const RPC_NT_PROCNUM_OUT_OF_RANGE: NTSTATUS = 0xC002002E_u32 as _; +pub const RPC_NT_PROTOCOL_ERROR: NTSTATUS = 0xC002001D_u32 as _; +pub const RPC_NT_PROTSEQ_NOT_FOUND: NTSTATUS = 0xC002002D_u32 as _; +pub const RPC_NT_PROTSEQ_NOT_SUPPORTED: NTSTATUS = 0xC0020004_u32 as _; +pub const RPC_NT_PROXY_ACCESS_DENIED: NTSTATUS = 0xC0020064_u32 as _; +pub const RPC_NT_SEC_PKG_ERROR: NTSTATUS = 0xC0020057_u32 as _; +pub const RPC_NT_SEND_INCOMPLETE: NTSTATUS = 0x400200AF_u32 as _; +pub const RPC_NT_SERVER_TOO_BUSY: NTSTATUS = 0xC0020018_u32 as _; +pub const RPC_NT_SERVER_UNAVAILABLE: NTSTATUS = 0xC0020017_u32 as _; +pub const RPC_NT_SS_CANNOT_GET_CALL_HANDLE: NTSTATUS = 0xC0030008_u32 as _; +pub const RPC_NT_SS_CHAR_TRANS_OPEN_FAIL: NTSTATUS = 0xC0030002_u32 as _; +pub const RPC_NT_SS_CHAR_TRANS_SHORT_FILE: NTSTATUS = 0xC0030003_u32 as _; +pub const RPC_NT_SS_CONTEXT_DAMAGED: NTSTATUS = 0xC0030006_u32 as _; +pub const RPC_NT_SS_CONTEXT_MISMATCH: NTSTATUS = 0xC0030005_u32 as _; +pub const RPC_NT_SS_HANDLES_MISMATCH: NTSTATUS = 0xC0030007_u32 as _; +pub const RPC_NT_SS_IN_NULL_CONTEXT: NTSTATUS = 0xC0030004_u32 as _; +pub const RPC_NT_STRING_TOO_LONG: NTSTATUS = 0xC002002C_u32 as _; +pub const RPC_NT_TYPE_ALREADY_REGISTERED: NTSTATUS = 0xC002000D_u32 as _; +pub const RPC_NT_UNKNOWN_AUTHN_LEVEL: NTSTATUS = 0xC0020031_u32 as _; +pub const RPC_NT_UNKNOWN_AUTHN_SERVICE: NTSTATUS = 0xC0020030_u32 as _; +pub const RPC_NT_UNKNOWN_AUTHN_TYPE: NTSTATUS = 0xC002002A_u32 as _; +pub const RPC_NT_UNKNOWN_AUTHZ_SERVICE: NTSTATUS = 0xC0020033_u32 as _; +pub const RPC_NT_UNKNOWN_IF: NTSTATUS = 0xC0020012_u32 as _; +pub const RPC_NT_UNKNOWN_MGR_TYPE: NTSTATUS = 0xC0020011_u32 as _; +pub const RPC_NT_UNSUPPORTED_AUTHN_LEVEL: NTSTATUS = 0xC0020053_u32 as _; +pub const RPC_NT_UNSUPPORTED_NAME_SYNTAX: NTSTATUS = 0xC0020026_u32 as _; +pub const RPC_NT_UNSUPPORTED_TRANS_SYN: NTSTATUS = 0xC002001F_u32 as _; +pub const RPC_NT_UNSUPPORTED_TYPE: NTSTATUS = 0xC0020021_u32 as _; +pub const RPC_NT_UUID_LOCAL_ONLY: NTSTATUS = 0x40020056_u32 as _; +pub const RPC_NT_UUID_NO_ADDRESS: NTSTATUS = 0xC0020028_u32 as _; +pub const RPC_NT_WRONG_ES_VERSION: NTSTATUS = 0xC003005A_u32 as _; +pub const RPC_NT_WRONG_KIND_OF_BINDING: NTSTATUS = 0xC0020002_u32 as _; +pub const RPC_NT_WRONG_PIPE_VERSION: NTSTATUS = 0xC003005E_u32 as _; +pub const RPC_NT_WRONG_STUB_VERSION: NTSTATUS = 0xC003005B_u32 as _; +pub const RPC_NT_ZERO_DIVIDE: NTSTATUS = 0xC0020044_u32 as _; +pub const RPC_S_CALLPENDING: windows_sys::core::HRESULT = 0x80010115_u32 as _; +pub const RPC_S_WAITONTIMER: windows_sys::core::HRESULT = 0x80010116_u32 as _; +pub const RPC_X_BAD_STUB_DATA: i32 = 1783i32; +pub const RPC_X_BYTE_COUNT_TOO_SMALL: i32 = 1782i32; +pub const RPC_X_ENUM_VALUE_OUT_OF_RANGE: i32 = 1781i32; +pub const RPC_X_ENUM_VALUE_TOO_LARGE: i32 = 1781i32; +pub const RPC_X_INVALID_BOUND: i32 = -1073610717i32; +pub const RPC_X_INVALID_BUFFER: i32 = -1073741306i32; +pub const RPC_X_INVALID_ES_ACTION: i32 = 1827i32; +pub const RPC_X_INVALID_PIPE_OBJECT: i32 = 1830i32; +pub const RPC_X_INVALID_PIPE_OPERATION: i32 = 1831i32; +pub const RPC_X_INVALID_TAG: i32 = -1073610718i32; +pub const RPC_X_NO_MEMORY: i32 = -1073741801i32; +pub const RPC_X_NO_MORE_ENTRIES: i32 = 1772i32; +pub const RPC_X_NULL_REF_POINTER: i32 = 1780i32; +pub const RPC_X_PIPE_APP_MEMORY: i32 = -1073741801i32; +pub const RPC_X_PIPE_CLOSED: i32 = 1916i32; +pub const RPC_X_PIPE_DISCIPLINE_ERROR: i32 = 1917i32; +pub const RPC_X_PIPE_EMPTY: i32 = 1918i32; +pub const RPC_X_SS_CANNOT_GET_CALL_HANDLE: i32 = 1779i32; +pub const RPC_X_SS_CHAR_TRANS_OPEN_FAIL: i32 = 1773i32; +pub const RPC_X_SS_CHAR_TRANS_SHORT_FILE: i32 = 1774i32; +pub const RPC_X_SS_CONTEXT_DAMAGED: i32 = 1777i32; +pub const RPC_X_SS_CONTEXT_MISMATCH: i32 = -1073545211i32; +pub const RPC_X_SS_HANDLES_MISMATCH: i32 = 1778i32; +pub const RPC_X_SS_IN_NULL_CONTEXT: i32 = 1775i32; +pub const RPC_X_WRONG_ES_VERSION: i32 = 1828i32; +pub const RPC_X_WRONG_PIPE_ORDER: i32 = 1831i32; +pub const RPC_X_WRONG_PIPE_VERSION: i32 = 1832i32; +pub const RPC_X_WRONG_STUB_VERSION: i32 = 1829i32; +pub const SCARD_E_BAD_SEEK: windows_sys::core::HRESULT = 0x80100029_u32 as _; +pub const SCARD_E_CANCELLED: windows_sys::core::HRESULT = 0x80100002_u32 as _; +pub const SCARD_E_CANT_DISPOSE: windows_sys::core::HRESULT = 0x8010000E_u32 as _; +pub const SCARD_E_CARD_UNSUPPORTED: windows_sys::core::HRESULT = 0x8010001C_u32 as _; +pub const SCARD_E_CERTIFICATE_UNAVAILABLE: windows_sys::core::HRESULT = 0x8010002D_u32 as _; +pub const SCARD_E_COMM_DATA_LOST: windows_sys::core::HRESULT = 0x8010002F_u32 as _; +pub const SCARD_E_DIR_NOT_FOUND: windows_sys::core::HRESULT = 0x80100023_u32 as _; +pub const SCARD_E_DUPLICATE_READER: windows_sys::core::HRESULT = 0x8010001B_u32 as _; +pub const SCARD_E_FILE_NOT_FOUND: windows_sys::core::HRESULT = 0x80100024_u32 as _; +pub const SCARD_E_ICC_CREATEORDER: windows_sys::core::HRESULT = 0x80100021_u32 as _; +pub const SCARD_E_ICC_INSTALLATION: windows_sys::core::HRESULT = 0x80100020_u32 as _; +pub const SCARD_E_INSUFFICIENT_BUFFER: windows_sys::core::HRESULT = 0x80100008_u32 as _; +pub const SCARD_E_INVALID_ATR: windows_sys::core::HRESULT = 0x80100015_u32 as _; +pub const SCARD_E_INVALID_CHV: windows_sys::core::HRESULT = 0x8010002A_u32 as _; +pub const SCARD_E_INVALID_HANDLE: windows_sys::core::HRESULT = 0x80100003_u32 as _; +pub const SCARD_E_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x80100004_u32 as _; +pub const SCARD_E_INVALID_TARGET: windows_sys::core::HRESULT = 0x80100005_u32 as _; +pub const SCARD_E_INVALID_VALUE: windows_sys::core::HRESULT = 0x80100011_u32 as _; +pub const SCARD_E_NOT_READY: windows_sys::core::HRESULT = 0x80100010_u32 as _; +pub const SCARD_E_NOT_TRANSACTED: windows_sys::core::HRESULT = 0x80100016_u32 as _; +pub const SCARD_E_NO_ACCESS: windows_sys::core::HRESULT = 0x80100027_u32 as _; +pub const SCARD_E_NO_DIR: windows_sys::core::HRESULT = 0x80100025_u32 as _; +pub const SCARD_E_NO_FILE: windows_sys::core::HRESULT = 0x80100026_u32 as _; +pub const SCARD_E_NO_KEY_CONTAINER: windows_sys::core::HRESULT = 0x80100030_u32 as _; +pub const SCARD_E_NO_MEMORY: windows_sys::core::HRESULT = 0x80100006_u32 as _; +pub const SCARD_E_NO_PIN_CACHE: windows_sys::core::HRESULT = 0x80100033_u32 as _; +pub const SCARD_E_NO_READERS_AVAILABLE: windows_sys::core::HRESULT = 0x8010002E_u32 as _; +pub const SCARD_E_NO_SERVICE: windows_sys::core::HRESULT = 0x8010001D_u32 as _; +pub const SCARD_E_NO_SMARTCARD: windows_sys::core::HRESULT = 0x8010000C_u32 as _; +pub const SCARD_E_NO_SUCH_CERTIFICATE: windows_sys::core::HRESULT = 0x8010002C_u32 as _; +pub const SCARD_E_PCI_TOO_SMALL: windows_sys::core::HRESULT = 0x80100019_u32 as _; +pub const SCARD_E_PIN_CACHE_EXPIRED: windows_sys::core::HRESULT = 0x80100032_u32 as _; +pub const SCARD_E_PROTO_MISMATCH: windows_sys::core::HRESULT = 0x8010000F_u32 as _; +pub const SCARD_E_READER_UNAVAILABLE: windows_sys::core::HRESULT = 0x80100017_u32 as _; +pub const SCARD_E_READER_UNSUPPORTED: windows_sys::core::HRESULT = 0x8010001A_u32 as _; +pub const SCARD_E_READ_ONLY_CARD: windows_sys::core::HRESULT = 0x80100034_u32 as _; +pub const SCARD_E_SERVER_TOO_BUSY: windows_sys::core::HRESULT = 0x80100031_u32 as _; +pub const SCARD_E_SERVICE_STOPPED: windows_sys::core::HRESULT = 0x8010001E_u32 as _; +pub const SCARD_E_SHARING_VIOLATION: windows_sys::core::HRESULT = 0x8010000B_u32 as _; +pub const SCARD_E_SYSTEM_CANCELLED: windows_sys::core::HRESULT = 0x80100012_u32 as _; +pub const SCARD_E_TIMEOUT: windows_sys::core::HRESULT = 0x8010000A_u32 as _; +pub const SCARD_E_UNEXPECTED: windows_sys::core::HRESULT = 0x8010001F_u32 as _; +pub const SCARD_E_UNKNOWN_CARD: windows_sys::core::HRESULT = 0x8010000D_u32 as _; +pub const SCARD_E_UNKNOWN_READER: windows_sys::core::HRESULT = 0x80100009_u32 as _; +pub const SCARD_E_UNKNOWN_RES_MNG: windows_sys::core::HRESULT = 0x8010002B_u32 as _; +pub const SCARD_E_UNSUPPORTED_FEATURE: windows_sys::core::HRESULT = 0x80100022_u32 as _; +pub const SCARD_E_WRITE_TOO_MANY: windows_sys::core::HRESULT = 0x80100028_u32 as _; +pub const SCARD_F_COMM_ERROR: windows_sys::core::HRESULT = 0x80100013_u32 as _; +pub const SCARD_F_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80100001_u32 as _; +pub const SCARD_F_UNKNOWN_ERROR: windows_sys::core::HRESULT = 0x80100014_u32 as _; +pub const SCARD_F_WAITED_TOO_LONG: windows_sys::core::HRESULT = 0x80100007_u32 as _; +pub const SCARD_P_SHUTDOWN: windows_sys::core::HRESULT = 0x80100018_u32 as _; +pub const SCARD_W_CACHE_ITEM_NOT_FOUND: windows_sys::core::HRESULT = 0x80100070_u32 as _; +pub const SCARD_W_CACHE_ITEM_STALE: windows_sys::core::HRESULT = 0x80100071_u32 as _; +pub const SCARD_W_CACHE_ITEM_TOO_BIG: windows_sys::core::HRESULT = 0x80100072_u32 as _; +pub const SCARD_W_CANCELLED_BY_USER: windows_sys::core::HRESULT = 0x8010006E_u32 as _; +pub const SCARD_W_CARD_NOT_AUTHENTICATED: windows_sys::core::HRESULT = 0x8010006F_u32 as _; +pub const SCARD_W_CHV_BLOCKED: windows_sys::core::HRESULT = 0x8010006C_u32 as _; +pub const SCARD_W_EOF: windows_sys::core::HRESULT = 0x8010006D_u32 as _; +pub const SCARD_W_REMOVED_CARD: windows_sys::core::HRESULT = 0x80100069_u32 as _; +pub const SCARD_W_RESET_CARD: windows_sys::core::HRESULT = 0x80100068_u32 as _; +pub const SCARD_W_SECURITY_VIOLATION: windows_sys::core::HRESULT = 0x8010006A_u32 as _; +pub const SCARD_W_UNPOWERED_CARD: windows_sys::core::HRESULT = 0x80100067_u32 as _; +pub const SCARD_W_UNRESPONSIVE_CARD: windows_sys::core::HRESULT = 0x80100066_u32 as _; +pub const SCARD_W_UNSUPPORTED_CARD: windows_sys::core::HRESULT = 0x80100065_u32 as _; +pub const SCARD_W_WRONG_CHV: windows_sys::core::HRESULT = 0x8010006B_u32 as _; +pub const SCHED_E_ACCOUNT_DBASE_CORRUPT: windows_sys::core::HRESULT = 0x80041311_u32 as _; +pub const SCHED_E_ACCOUNT_INFORMATION_NOT_SET: windows_sys::core::HRESULT = 0x8004130F_u32 as _; +pub const SCHED_E_ACCOUNT_NAME_NOT_FOUND: windows_sys::core::HRESULT = 0x80041310_u32 as _; +pub const SCHED_E_ALREADY_RUNNING: windows_sys::core::HRESULT = 0x8004131F_u32 as _; +pub const SCHED_E_CANNOT_OPEN_TASK: windows_sys::core::HRESULT = 0x8004130D_u32 as _; +pub const SCHED_E_DEPRECATED_FEATURE_USED: windows_sys::core::HRESULT = 0x80041330_u32 as _; +pub const SCHED_E_INVALIDVALUE: windows_sys::core::HRESULT = 0x80041318_u32 as _; +pub const SCHED_E_INVALID_TASK: windows_sys::core::HRESULT = 0x8004130E_u32 as _; +pub const SCHED_E_INVALID_TASK_HASH: windows_sys::core::HRESULT = 0x80041321_u32 as _; +pub const SCHED_E_MALFORMEDXML: windows_sys::core::HRESULT = 0x8004131A_u32 as _; +pub const SCHED_E_MISSINGNODE: windows_sys::core::HRESULT = 0x80041319_u32 as _; +pub const SCHED_E_NAMESPACE: windows_sys::core::HRESULT = 0x80041317_u32 as _; +pub const SCHED_E_NO_SECURITY_SERVICES: windows_sys::core::HRESULT = 0x80041312_u32 as _; +pub const SCHED_E_PAST_END_BOUNDARY: windows_sys::core::HRESULT = 0x8004131E_u32 as _; +pub const SCHED_E_SERVICE_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80041322_u32 as _; +pub const SCHED_E_SERVICE_NOT_INSTALLED: windows_sys::core::HRESULT = 0x8004130C_u32 as _; +pub const SCHED_E_SERVICE_NOT_LOCALSYSTEM: i32 = 6200i32; +pub const SCHED_E_SERVICE_NOT_RUNNING: windows_sys::core::HRESULT = 0x80041315_u32 as _; +pub const SCHED_E_SERVICE_TOO_BUSY: windows_sys::core::HRESULT = 0x80041323_u32 as _; +pub const SCHED_E_START_ON_DEMAND: windows_sys::core::HRESULT = 0x80041328_u32 as _; +pub const SCHED_E_TASK_ATTEMPTED: windows_sys::core::HRESULT = 0x80041324_u32 as _; +pub const SCHED_E_TASK_DISABLED: windows_sys::core::HRESULT = 0x80041326_u32 as _; +pub const SCHED_E_TASK_NOT_READY: windows_sys::core::HRESULT = 0x8004130A_u32 as _; +pub const SCHED_E_TASK_NOT_RUNNING: windows_sys::core::HRESULT = 0x8004130B_u32 as _; +pub const SCHED_E_TASK_NOT_UBPM_COMPAT: windows_sys::core::HRESULT = 0x80041329_u32 as _; +pub const SCHED_E_TASK_NOT_V1_COMPAT: windows_sys::core::HRESULT = 0x80041327_u32 as _; +pub const SCHED_E_TOO_MANY_NODES: windows_sys::core::HRESULT = 0x8004131D_u32 as _; +pub const SCHED_E_TRIGGER_NOT_FOUND: windows_sys::core::HRESULT = 0x80041309_u32 as _; +pub const SCHED_E_UNEXPECTEDNODE: windows_sys::core::HRESULT = 0x80041316_u32 as _; +pub const SCHED_E_UNKNOWN_OBJECT_VERSION: windows_sys::core::HRESULT = 0x80041313_u32 as _; +pub const SCHED_E_UNSUPPORTED_ACCOUNT_OPTION: windows_sys::core::HRESULT = 0x80041314_u32 as _; +pub const SCHED_E_USER_NOT_LOGGED_ON: windows_sys::core::HRESULT = 0x80041320_u32 as _; +pub const SCHED_S_BATCH_LOGON_PROBLEM: windows_sys::core::HRESULT = 0x4131C_u32 as _; +pub const SCHED_S_EVENT_TRIGGER: windows_sys::core::HRESULT = 0x41308_u32 as _; +pub const SCHED_S_SOME_TRIGGERS_FAILED: windows_sys::core::HRESULT = 0x4131B_u32 as _; +pub const SCHED_S_TASK_DISABLED: windows_sys::core::HRESULT = 0x41302_u32 as _; +pub const SCHED_S_TASK_HAS_NOT_RUN: windows_sys::core::HRESULT = 0x41303_u32 as _; +pub const SCHED_S_TASK_NOT_SCHEDULED: windows_sys::core::HRESULT = 0x41305_u32 as _; +pub const SCHED_S_TASK_NO_MORE_RUNS: windows_sys::core::HRESULT = 0x41304_u32 as _; +pub const SCHED_S_TASK_NO_VALID_TRIGGERS: windows_sys::core::HRESULT = 0x41307_u32 as _; +pub const SCHED_S_TASK_QUEUED: windows_sys::core::HRESULT = 0x41325_u32 as _; +pub const SCHED_S_TASK_READY: windows_sys::core::HRESULT = 0x41300_u32 as _; +pub const SCHED_S_TASK_RUNNING: windows_sys::core::HRESULT = 0x41301_u32 as _; +pub const SCHED_S_TASK_TERMINATED: windows_sys::core::HRESULT = 0x41306_u32 as _; +pub const SDIAG_E_CANCELLED: i32 = -2143551232i32; +pub const SDIAG_E_CANNOTRUN: i32 = -2143551224i32; +pub const SDIAG_E_DISABLED: i32 = -2143551226i32; +pub const SDIAG_E_MANAGEDHOST: i32 = -2143551229i32; +pub const SDIAG_E_NOVERIFIER: i32 = -2143551228i32; +pub const SDIAG_E_POWERSHELL: i32 = -2143551230i32; +pub const SDIAG_E_RESOURCE: i32 = -2143551222i32; +pub const SDIAG_E_ROOTCAUSE: i32 = -2143551221i32; +pub const SDIAG_E_SCRIPT: i32 = -2143551231i32; +pub const SDIAG_E_TRUST: i32 = -2143551225i32; +pub const SDIAG_E_VERSION: i32 = -2143551223i32; +pub const SDIAG_S_CANNOTRUN: i32 = 3932421i32; +pub const SEARCH_E_NOMONIKER: windows_sys::core::HRESULT = 0x800416A1_u32 as _; +pub const SEARCH_E_NOREGION: windows_sys::core::HRESULT = 0x800416A2_u32 as _; +pub const SEARCH_S_NOMOREHITS: windows_sys::core::HRESULT = 0x416A0_u32 as _; +pub const SEC_E_ALGORITHM_MISMATCH: windows_sys::core::HRESULT = 0x80090331_u32 as _; +pub const SEC_E_APPLICATION_PROTOCOL_MISMATCH: windows_sys::core::HRESULT = 0x80090367_u32 as _; +pub const SEC_E_BAD_BINDINGS: windows_sys::core::HRESULT = 0x80090346_u32 as _; +pub const SEC_E_BAD_PKGID: windows_sys::core::HRESULT = 0x80090316_u32 as _; +pub const SEC_E_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x80090321_u32 as _; +pub const SEC_E_CANNOT_INSTALL: windows_sys::core::HRESULT = 0x80090307_u32 as _; +pub const SEC_E_CANNOT_PACK: windows_sys::core::HRESULT = 0x80090309_u32 as _; +pub const SEC_E_CERT_EXPIRED: windows_sys::core::HRESULT = 0x80090328_u32 as _; +pub const SEC_E_CERT_UNKNOWN: windows_sys::core::HRESULT = 0x80090327_u32 as _; +pub const SEC_E_CERT_WRONG_USAGE: windows_sys::core::HRESULT = 0x80090349_u32 as _; +pub const SEC_E_CONTEXT_EXPIRED: windows_sys::core::HRESULT = 0x80090317_u32 as _; +pub const SEC_E_CROSSREALM_DELEGATION_FAILURE: windows_sys::core::HRESULT = 0x80090357_u32 as _; +pub const SEC_E_CRYPTO_SYSTEM_INVALID: windows_sys::core::HRESULT = 0x80090337_u32 as _; +pub const SEC_E_DECRYPT_FAILURE: windows_sys::core::HRESULT = 0x80090330_u32 as _; +pub const SEC_E_DELEGATION_POLICY: windows_sys::core::HRESULT = 0x8009035E_u32 as _; +pub const SEC_E_DELEGATION_REQUIRED: windows_sys::core::HRESULT = 0x80090345_u32 as _; +pub const SEC_E_DOWNGRADE_DETECTED: windows_sys::core::HRESULT = 0x80090350_u32 as _; +pub const SEC_E_ENCRYPT_FAILURE: windows_sys::core::HRESULT = 0x80090329_u32 as _; +pub const SEC_E_EXT_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x8009036A_u32 as _; +pub const SEC_E_ILLEGAL_MESSAGE: windows_sys::core::HRESULT = 0x80090326_u32 as _; +pub const SEC_E_INCOMPLETE_CREDENTIALS: windows_sys::core::HRESULT = 0x80090320_u32 as _; +pub const SEC_E_INCOMPLETE_MESSAGE: windows_sys::core::HRESULT = 0x80090318_u32 as _; +pub const SEC_E_INSUFFICIENT_BUFFERS: windows_sys::core::HRESULT = 0x8009036B_u32 as _; +pub const SEC_E_INSUFFICIENT_MEMORY: windows_sys::core::HRESULT = 0x80090300_u32 as _; +pub const SEC_E_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80090304_u32 as _; +pub const SEC_E_INVALID_HANDLE: windows_sys::core::HRESULT = 0x80090301_u32 as _; +pub const SEC_E_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x8009035D_u32 as _; +pub const SEC_E_INVALID_TOKEN: windows_sys::core::HRESULT = 0x80090308_u32 as _; +pub const SEC_E_INVALID_UPN_NAME: windows_sys::core::HRESULT = 0x80090369_u32 as _; +pub const SEC_E_ISSUING_CA_UNTRUSTED: windows_sys::core::HRESULT = 0x80090352_u32 as _; +pub const SEC_E_ISSUING_CA_UNTRUSTED_KDC: windows_sys::core::HRESULT = 0x80090359_u32 as _; +pub const SEC_E_KDC_CERT_EXPIRED: windows_sys::core::HRESULT = 0x8009035A_u32 as _; +pub const SEC_E_KDC_CERT_REVOKED: windows_sys::core::HRESULT = 0x8009035B_u32 as _; +pub const SEC_E_KDC_INVALID_REQUEST: windows_sys::core::HRESULT = 0x80090340_u32 as _; +pub const SEC_E_KDC_UNABLE_TO_REFER: windows_sys::core::HRESULT = 0x80090341_u32 as _; +pub const SEC_E_KDC_UNKNOWN_ETYPE: windows_sys::core::HRESULT = 0x80090342_u32 as _; +pub const SEC_E_LOGON_DENIED: windows_sys::core::HRESULT = 0x8009030C_u32 as _; +pub const SEC_E_MAX_REFERRALS_EXCEEDED: windows_sys::core::HRESULT = 0x80090338_u32 as _; +pub const SEC_E_MESSAGE_ALTERED: windows_sys::core::HRESULT = 0x8009030F_u32 as _; +pub const SEC_E_MULTIPLE_ACCOUNTS: windows_sys::core::HRESULT = 0x80090347_u32 as _; +pub const SEC_E_MUST_BE_KDC: windows_sys::core::HRESULT = 0x80090339_u32 as _; +pub const SEC_E_MUTUAL_AUTH_FAILED: windows_sys::core::HRESULT = 0x80090363_u32 as _; +pub const SEC_E_NOT_OWNER: windows_sys::core::HRESULT = 0x80090306_u32 as _; +pub const SEC_E_NOT_SUPPORTED: i32 = -2146893054i32; +pub const SEC_E_NO_AUTHENTICATING_AUTHORITY: windows_sys::core::HRESULT = 0x80090311_u32 as _; +pub const SEC_E_NO_CONTEXT: windows_sys::core::HRESULT = 0x80090361_u32 as _; +pub const SEC_E_NO_CREDENTIALS: windows_sys::core::HRESULT = 0x8009030E_u32 as _; +pub const SEC_E_NO_IMPERSONATION: windows_sys::core::HRESULT = 0x8009030B_u32 as _; +pub const SEC_E_NO_IP_ADDRESSES: windows_sys::core::HRESULT = 0x80090335_u32 as _; +pub const SEC_E_NO_KERB_KEY: windows_sys::core::HRESULT = 0x80090348_u32 as _; +pub const SEC_E_NO_PA_DATA: windows_sys::core::HRESULT = 0x8009033C_u32 as _; +pub const SEC_E_NO_S4U_PROT_SUPPORT: windows_sys::core::HRESULT = 0x80090356_u32 as _; +pub const SEC_E_NO_SPM: i32 = -2146893052i32; +pub const SEC_E_NO_TGT_REPLY: windows_sys::core::HRESULT = 0x80090334_u32 as _; +pub const SEC_E_OK: windows_sys::core::HRESULT = 0x0_u32 as _; +pub const SEC_E_ONLY_HTTPS_ALLOWED: windows_sys::core::HRESULT = 0x80090365_u32 as _; +pub const SEC_E_OUT_OF_SEQUENCE: windows_sys::core::HRESULT = 0x80090310_u32 as _; +pub const SEC_E_PKINIT_CLIENT_FAILURE: windows_sys::core::HRESULT = 0x80090354_u32 as _; +pub const SEC_E_PKINIT_NAME_MISMATCH: windows_sys::core::HRESULT = 0x8009033D_u32 as _; +pub const SEC_E_PKU2U_CERT_FAILURE: windows_sys::core::HRESULT = 0x80090362_u32 as _; +pub const SEC_E_POLICY_NLTM_ONLY: windows_sys::core::HRESULT = 0x8009035F_u32 as _; +pub const SEC_E_QOP_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8009030A_u32 as _; +pub const SEC_E_REVOCATION_OFFLINE_C: windows_sys::core::HRESULT = 0x80090353_u32 as _; +pub const SEC_E_REVOCATION_OFFLINE_KDC: windows_sys::core::HRESULT = 0x80090358_u32 as _; +pub const SEC_E_SECPKG_NOT_FOUND: windows_sys::core::HRESULT = 0x80090305_u32 as _; +pub const SEC_E_SECURITY_QOS_FAILED: windows_sys::core::HRESULT = 0x80090332_u32 as _; +pub const SEC_E_SHUTDOWN_IN_PROGRESS: windows_sys::core::HRESULT = 0x8009033F_u32 as _; +pub const SEC_E_SMARTCARD_CERT_EXPIRED: windows_sys::core::HRESULT = 0x80090355_u32 as _; +pub const SEC_E_SMARTCARD_CERT_REVOKED: windows_sys::core::HRESULT = 0x80090351_u32 as _; +pub const SEC_E_SMARTCARD_LOGON_REQUIRED: windows_sys::core::HRESULT = 0x8009033E_u32 as _; +pub const SEC_E_STRONG_CRYPTO_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8009033A_u32 as _; +pub const SEC_E_TARGET_UNKNOWN: windows_sys::core::HRESULT = 0x80090303_u32 as _; +pub const SEC_E_TIME_SKEW: windows_sys::core::HRESULT = 0x80090324_u32 as _; +pub const SEC_E_TOO_MANY_PRINCIPALS: windows_sys::core::HRESULT = 0x8009033B_u32 as _; +pub const SEC_E_UNFINISHED_CONTEXT_DELETED: windows_sys::core::HRESULT = 0x80090333_u32 as _; +pub const SEC_E_UNKNOWN_CREDENTIALS: windows_sys::core::HRESULT = 0x8009030D_u32 as _; +pub const SEC_E_UNSUPPORTED_FUNCTION: windows_sys::core::HRESULT = 0x80090302_u32 as _; +pub const SEC_E_UNSUPPORTED_PREAUTH: windows_sys::core::HRESULT = 0x80090343_u32 as _; +pub const SEC_E_UNTRUSTED_ROOT: windows_sys::core::HRESULT = 0x80090325_u32 as _; +pub const SEC_E_WRONG_CREDENTIAL_HANDLE: windows_sys::core::HRESULT = 0x80090336_u32 as _; +pub const SEC_E_WRONG_PRINCIPAL: windows_sys::core::HRESULT = 0x80090322_u32 as _; +pub const SEC_I_ASYNC_CALL_PENDING: windows_sys::core::HRESULT = 0x90368_u32 as _; +pub const SEC_I_COMPLETE_AND_CONTINUE: windows_sys::core::HRESULT = 0x90314_u32 as _; +pub const SEC_I_COMPLETE_NEEDED: windows_sys::core::HRESULT = 0x90313_u32 as _; +pub const SEC_I_CONTEXT_EXPIRED: windows_sys::core::HRESULT = 0x90317_u32 as _; +pub const SEC_I_CONTINUE_NEEDED: windows_sys::core::HRESULT = 0x90312_u32 as _; +pub const SEC_I_CONTINUE_NEEDED_MESSAGE_OK: windows_sys::core::HRESULT = 0x90366_u32 as _; +pub const SEC_I_GENERIC_EXTENSION_RECEIVED: windows_sys::core::HRESULT = 0x90316_u32 as _; +pub const SEC_I_INCOMPLETE_CREDENTIALS: windows_sys::core::HRESULT = 0x90320_u32 as _; +pub const SEC_I_LOCAL_LOGON: windows_sys::core::HRESULT = 0x90315_u32 as _; +pub const SEC_I_MESSAGE_FRAGMENT: windows_sys::core::HRESULT = 0x90364_u32 as _; +pub const SEC_I_NO_LSA_CONTEXT: windows_sys::core::HRESULT = 0x90323_u32 as _; +pub const SEC_I_NO_RENEGOTIATION: windows_sys::core::HRESULT = 0x90360_u32 as _; +pub const SEC_I_RENEGOTIATE: windows_sys::core::HRESULT = 0x90321_u32 as _; +pub const SEC_I_SIGNATURE_NEEDED: windows_sys::core::HRESULT = 0x9035C_u32 as _; +pub const SEVERITY_ERROR: u32 = 1u32; +pub const SEVERITY_SUCCESS: u32 = 0u32; +pub type SHANDLE_PTR = isize; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SIZE { + pub cx: i32, + pub cy: i32, +} +pub const SPAPI_E_AUTHENTICODE_DISALLOWED: windows_sys::core::HRESULT = 0x800F0240_u32 as _; +pub const SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED: windows_sys::core::HRESULT = 0x800F0243_u32 as _; +pub const SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER: windows_sys::core::HRESULT = 0x800F0241_u32 as _; +pub const SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED: windows_sys::core::HRESULT = 0x800F0242_u32 as _; +pub const SPAPI_E_BAD_INTERFACE_INSTALLSECT: windows_sys::core::HRESULT = 0x800F021D_u32 as _; +pub const SPAPI_E_BAD_SECTION_NAME_LINE: windows_sys::core::HRESULT = 0x800F0001_u32 as _; +pub const SPAPI_E_BAD_SERVICE_INSTALLSECT: windows_sys::core::HRESULT = 0x800F0217_u32 as _; +pub const SPAPI_E_CANT_LOAD_CLASS_ICON: windows_sys::core::HRESULT = 0x800F020C_u32 as _; +pub const SPAPI_E_CANT_REMOVE_DEVINST: windows_sys::core::HRESULT = 0x800F0232_u32 as _; +pub const SPAPI_E_CLASS_MISMATCH: windows_sys::core::HRESULT = 0x800F0201_u32 as _; +pub const SPAPI_E_DEVICE_INSTALLER_NOT_READY: windows_sys::core::HRESULT = 0x800F0246_u32 as _; +pub const SPAPI_E_DEVICE_INSTALL_BLOCKED: windows_sys::core::HRESULT = 0x800F0248_u32 as _; +pub const SPAPI_E_DEVICE_INTERFACE_ACTIVE: windows_sys::core::HRESULT = 0x800F021B_u32 as _; +pub const SPAPI_E_DEVICE_INTERFACE_REMOVED: windows_sys::core::HRESULT = 0x800F021C_u32 as _; +pub const SPAPI_E_DEVINFO_DATA_LOCKED: windows_sys::core::HRESULT = 0x800F0213_u32 as _; +pub const SPAPI_E_DEVINFO_LIST_LOCKED: windows_sys::core::HRESULT = 0x800F0212_u32 as _; +pub const SPAPI_E_DEVINFO_NOT_REGISTERED: windows_sys::core::HRESULT = 0x800F0208_u32 as _; +pub const SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE: windows_sys::core::HRESULT = 0x800F0230_u32 as _; +pub const SPAPI_E_DEVINST_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x800F0207_u32 as _; +pub const SPAPI_E_DI_BAD_PATH: windows_sys::core::HRESULT = 0x800F0214_u32 as _; +pub const SPAPI_E_DI_DONT_INSTALL: windows_sys::core::HRESULT = 0x800F022B_u32 as _; +pub const SPAPI_E_DI_DO_DEFAULT: windows_sys::core::HRESULT = 0x800F020E_u32 as _; +pub const SPAPI_E_DI_FUNCTION_OBSOLETE: windows_sys::core::HRESULT = 0x800F023E_u32 as _; +pub const SPAPI_E_DI_NOFILECOPY: windows_sys::core::HRESULT = 0x800F020F_u32 as _; +pub const SPAPI_E_DI_POSTPROCESSING_REQUIRED: windows_sys::core::HRESULT = 0x800F0226_u32 as _; +pub const SPAPI_E_DRIVER_INSTALL_BLOCKED: windows_sys::core::HRESULT = 0x800F0249_u32 as _; +pub const SPAPI_E_DRIVER_NONNATIVE: windows_sys::core::HRESULT = 0x800F0234_u32 as _; +pub const SPAPI_E_DRIVER_STORE_ADD_FAILED: windows_sys::core::HRESULT = 0x800F0247_u32 as _; +pub const SPAPI_E_DRIVER_STORE_DELETE_FAILED: windows_sys::core::HRESULT = 0x800F024C_u32 as _; +pub const SPAPI_E_DUPLICATE_FOUND: windows_sys::core::HRESULT = 0x800F0202_u32 as _; +pub const SPAPI_E_ERROR_NOT_INSTALLED: windows_sys::core::HRESULT = 0x800F1000_u32 as _; +pub const SPAPI_E_EXPECTED_SECTION_NAME: windows_sys::core::HRESULT = 0x800F0000_u32 as _; +pub const SPAPI_E_FILEQUEUE_LOCKED: windows_sys::core::HRESULT = 0x800F0216_u32 as _; +pub const SPAPI_E_FILE_HASH_NOT_IN_CATALOG: windows_sys::core::HRESULT = 0x800F024B_u32 as _; +pub const SPAPI_E_GENERAL_SYNTAX: windows_sys::core::HRESULT = 0x800F0003_u32 as _; +pub const SPAPI_E_INCORRECTLY_COPIED_INF: windows_sys::core::HRESULT = 0x800F0237_u32 as _; +pub const SPAPI_E_INF_IN_USE_BY_DEVICES: windows_sys::core::HRESULT = 0x800F023D_u32 as _; +pub const SPAPI_E_INVALID_CLASS: windows_sys::core::HRESULT = 0x800F0206_u32 as _; +pub const SPAPI_E_INVALID_CLASS_INSTALLER: windows_sys::core::HRESULT = 0x800F020D_u32 as _; +pub const SPAPI_E_INVALID_COINSTALLER: windows_sys::core::HRESULT = 0x800F0227_u32 as _; +pub const SPAPI_E_INVALID_DEVINST_NAME: windows_sys::core::HRESULT = 0x800F0205_u32 as _; +pub const SPAPI_E_INVALID_FILTER_DRIVER: windows_sys::core::HRESULT = 0x800F022C_u32 as _; +pub const SPAPI_E_INVALID_HWPROFILE: windows_sys::core::HRESULT = 0x800F0210_u32 as _; +pub const SPAPI_E_INVALID_INF_LOGCONFIG: windows_sys::core::HRESULT = 0x800F022A_u32 as _; +pub const SPAPI_E_INVALID_MACHINENAME: windows_sys::core::HRESULT = 0x800F0220_u32 as _; +pub const SPAPI_E_INVALID_PROPPAGE_PROVIDER: windows_sys::core::HRESULT = 0x800F0224_u32 as _; +pub const SPAPI_E_INVALID_REFERENCE_STRING: windows_sys::core::HRESULT = 0x800F021F_u32 as _; +pub const SPAPI_E_INVALID_REG_PROPERTY: windows_sys::core::HRESULT = 0x800F0209_u32 as _; +pub const SPAPI_E_INVALID_TARGET: windows_sys::core::HRESULT = 0x800F0233_u32 as _; +pub const SPAPI_E_IN_WOW64: windows_sys::core::HRESULT = 0x800F0235_u32 as _; +pub const SPAPI_E_KEY_DOES_NOT_EXIST: windows_sys::core::HRESULT = 0x800F0204_u32 as _; +pub const SPAPI_E_LINE_NOT_FOUND: windows_sys::core::HRESULT = 0x800F0102_u32 as _; +pub const SPAPI_E_MACHINE_UNAVAILABLE: windows_sys::core::HRESULT = 0x800F0222_u32 as _; +pub const SPAPI_E_NON_WINDOWS_DRIVER: windows_sys::core::HRESULT = 0x800F022E_u32 as _; +pub const SPAPI_E_NON_WINDOWS_NT_DRIVER: windows_sys::core::HRESULT = 0x800F022D_u32 as _; +pub const SPAPI_E_NOT_AN_INSTALLED_OEM_INF: windows_sys::core::HRESULT = 0x800F023C_u32 as _; +pub const SPAPI_E_NOT_DISABLEABLE: windows_sys::core::HRESULT = 0x800F0231_u32 as _; +pub const SPAPI_E_NO_ASSOCIATED_CLASS: windows_sys::core::HRESULT = 0x800F0200_u32 as _; +pub const SPAPI_E_NO_ASSOCIATED_SERVICE: windows_sys::core::HRESULT = 0x800F0219_u32 as _; +pub const SPAPI_E_NO_AUTHENTICODE_CATALOG: windows_sys::core::HRESULT = 0x800F023F_u32 as _; +pub const SPAPI_E_NO_BACKUP: windows_sys::core::HRESULT = 0x800F0103_u32 as _; +pub const SPAPI_E_NO_CATALOG_FOR_OEM_INF: windows_sys::core::HRESULT = 0x800F022F_u32 as _; +pub const SPAPI_E_NO_CLASSINSTALL_PARAMS: windows_sys::core::HRESULT = 0x800F0215_u32 as _; +pub const SPAPI_E_NO_CLASS_DRIVER_LIST: windows_sys::core::HRESULT = 0x800F0218_u32 as _; +pub const SPAPI_E_NO_COMPAT_DRIVERS: windows_sys::core::HRESULT = 0x800F0228_u32 as _; +pub const SPAPI_E_NO_CONFIGMGR_SERVICES: windows_sys::core::HRESULT = 0x800F0223_u32 as _; +pub const SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE: windows_sys::core::HRESULT = 0x800F021A_u32 as _; +pub const SPAPI_E_NO_DEVICE_ICON: windows_sys::core::HRESULT = 0x800F0229_u32 as _; +pub const SPAPI_E_NO_DEVICE_SELECTED: windows_sys::core::HRESULT = 0x800F0211_u32 as _; +pub const SPAPI_E_NO_DRIVER_SELECTED: windows_sys::core::HRESULT = 0x800F0203_u32 as _; +pub const SPAPI_E_NO_INF: windows_sys::core::HRESULT = 0x800F020A_u32 as _; +pub const SPAPI_E_NO_SUCH_DEVICE_INTERFACE: windows_sys::core::HRESULT = 0x800F0225_u32 as _; +pub const SPAPI_E_NO_SUCH_DEVINST: windows_sys::core::HRESULT = 0x800F020B_u32 as _; +pub const SPAPI_E_NO_SUCH_INTERFACE_CLASS: windows_sys::core::HRESULT = 0x800F021E_u32 as _; +pub const SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE: windows_sys::core::HRESULT = 0x800F0245_u32 as _; +pub const SPAPI_E_PNP_REGISTRY_ERROR: windows_sys::core::HRESULT = 0x800F023A_u32 as _; +pub const SPAPI_E_REMOTE_COMM_FAILURE: windows_sys::core::HRESULT = 0x800F0221_u32 as _; +pub const SPAPI_E_REMOTE_REQUEST_UNSUPPORTED: windows_sys::core::HRESULT = 0x800F023B_u32 as _; +pub const SPAPI_E_SCE_DISABLED: windows_sys::core::HRESULT = 0x800F0238_u32 as _; +pub const SPAPI_E_SECTION_NAME_TOO_LONG: windows_sys::core::HRESULT = 0x800F0002_u32 as _; +pub const SPAPI_E_SECTION_NOT_FOUND: windows_sys::core::HRESULT = 0x800F0101_u32 as _; +pub const SPAPI_E_SET_SYSTEM_RESTORE_POINT: windows_sys::core::HRESULT = 0x800F0236_u32 as _; +pub const SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH: windows_sys::core::HRESULT = 0x800F0244_u32 as _; +pub const SPAPI_E_UNKNOWN_EXCEPTION: windows_sys::core::HRESULT = 0x800F0239_u32 as _; +pub const SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW: windows_sys::core::HRESULT = 0x800F0300_u32 as _; +pub const SPAPI_E_WRONG_INF_STYLE: windows_sys::core::HRESULT = 0x800F0100_u32 as _; +pub const SPAPI_E_WRONG_INF_TYPE: windows_sys::core::HRESULT = 0x800F024A_u32 as _; +pub const SQLITE_E_ABORT: windows_sys::core::HRESULT = 0x87AF0004_u32 as _; +pub const SQLITE_E_ABORT_ROLLBACK: windows_sys::core::HRESULT = 0x87AF0204_u32 as _; +pub const SQLITE_E_AUTH: windows_sys::core::HRESULT = 0x87AF0017_u32 as _; +pub const SQLITE_E_BUSY: windows_sys::core::HRESULT = 0x87AF0005_u32 as _; +pub const SQLITE_E_BUSY_RECOVERY: windows_sys::core::HRESULT = 0x87AF0105_u32 as _; +pub const SQLITE_E_BUSY_SNAPSHOT: windows_sys::core::HRESULT = 0x87AF0205_u32 as _; +pub const SQLITE_E_CANTOPEN: windows_sys::core::HRESULT = 0x87AF000E_u32 as _; +pub const SQLITE_E_CANTOPEN_CONVPATH: windows_sys::core::HRESULT = 0x87AF040E_u32 as _; +pub const SQLITE_E_CANTOPEN_FULLPATH: windows_sys::core::HRESULT = 0x87AF030E_u32 as _; +pub const SQLITE_E_CANTOPEN_ISDIR: windows_sys::core::HRESULT = 0x87AF020E_u32 as _; +pub const SQLITE_E_CANTOPEN_NOTEMPDIR: windows_sys::core::HRESULT = 0x87AF010E_u32 as _; +pub const SQLITE_E_CONSTRAINT: windows_sys::core::HRESULT = 0x87AF0013_u32 as _; +pub const SQLITE_E_CONSTRAINT_CHECK: windows_sys::core::HRESULT = 0x87AF0113_u32 as _; +pub const SQLITE_E_CONSTRAINT_COMMITHOOK: windows_sys::core::HRESULT = 0x87AF0213_u32 as _; +pub const SQLITE_E_CONSTRAINT_FOREIGNKEY: windows_sys::core::HRESULT = 0x87AF0313_u32 as _; +pub const SQLITE_E_CONSTRAINT_FUNCTION: windows_sys::core::HRESULT = 0x87AF0413_u32 as _; +pub const SQLITE_E_CONSTRAINT_NOTNULL: windows_sys::core::HRESULT = 0x87AF0513_u32 as _; +pub const SQLITE_E_CONSTRAINT_PRIMARYKEY: windows_sys::core::HRESULT = 0x87AF0613_u32 as _; +pub const SQLITE_E_CONSTRAINT_ROWID: windows_sys::core::HRESULT = 0x87AF0A13_u32 as _; +pub const SQLITE_E_CONSTRAINT_TRIGGER: windows_sys::core::HRESULT = 0x87AF0713_u32 as _; +pub const SQLITE_E_CONSTRAINT_UNIQUE: windows_sys::core::HRESULT = 0x87AF0813_u32 as _; +pub const SQLITE_E_CONSTRAINT_VTAB: windows_sys::core::HRESULT = 0x87AF0913_u32 as _; +pub const SQLITE_E_CORRUPT: windows_sys::core::HRESULT = 0x87AF000B_u32 as _; +pub const SQLITE_E_CORRUPT_VTAB: windows_sys::core::HRESULT = 0x87AF010B_u32 as _; +pub const SQLITE_E_DONE: windows_sys::core::HRESULT = 0x87AF0065_u32 as _; +pub const SQLITE_E_EMPTY: windows_sys::core::HRESULT = 0x87AF0010_u32 as _; +pub const SQLITE_E_ERROR: windows_sys::core::HRESULT = 0x87AF0001_u32 as _; +pub const SQLITE_E_FORMAT: windows_sys::core::HRESULT = 0x87AF0018_u32 as _; +pub const SQLITE_E_FULL: windows_sys::core::HRESULT = 0x87AF000D_u32 as _; +pub const SQLITE_E_INTERNAL: windows_sys::core::HRESULT = 0x87AF0002_u32 as _; +pub const SQLITE_E_INTERRUPT: windows_sys::core::HRESULT = 0x87AF0009_u32 as _; +pub const SQLITE_E_IOERR: windows_sys::core::HRESULT = 0x87AF000A_u32 as _; +pub const SQLITE_E_IOERR_ACCESS: windows_sys::core::HRESULT = 0x87AF0D0A_u32 as _; +pub const SQLITE_E_IOERR_AUTH: windows_sys::core::HRESULT = 0x87AF1A03_u32 as _; +pub const SQLITE_E_IOERR_BLOCKED: windows_sys::core::HRESULT = 0x87AF0B0A_u32 as _; +pub const SQLITE_E_IOERR_CHECKRESERVEDLOCK: windows_sys::core::HRESULT = 0x87AF0E0A_u32 as _; +pub const SQLITE_E_IOERR_CLOSE: windows_sys::core::HRESULT = 0x87AF100A_u32 as _; +pub const SQLITE_E_IOERR_CONVPATH: windows_sys::core::HRESULT = 0x87AF1A0A_u32 as _; +pub const SQLITE_E_IOERR_DELETE: windows_sys::core::HRESULT = 0x87AF0A0A_u32 as _; +pub const SQLITE_E_IOERR_DELETE_NOENT: windows_sys::core::HRESULT = 0x87AF170A_u32 as _; +pub const SQLITE_E_IOERR_DIR_CLOSE: windows_sys::core::HRESULT = 0x87AF110A_u32 as _; +pub const SQLITE_E_IOERR_DIR_FSYNC: windows_sys::core::HRESULT = 0x87AF050A_u32 as _; +pub const SQLITE_E_IOERR_FSTAT: windows_sys::core::HRESULT = 0x87AF070A_u32 as _; +pub const SQLITE_E_IOERR_FSYNC: windows_sys::core::HRESULT = 0x87AF040A_u32 as _; +pub const SQLITE_E_IOERR_GETTEMPPATH: windows_sys::core::HRESULT = 0x87AF190A_u32 as _; +pub const SQLITE_E_IOERR_LOCK: windows_sys::core::HRESULT = 0x87AF0F0A_u32 as _; +pub const SQLITE_E_IOERR_MMAP: windows_sys::core::HRESULT = 0x87AF180A_u32 as _; +pub const SQLITE_E_IOERR_NOMEM: windows_sys::core::HRESULT = 0x87AF0C0A_u32 as _; +pub const SQLITE_E_IOERR_RDLOCK: windows_sys::core::HRESULT = 0x87AF090A_u32 as _; +pub const SQLITE_E_IOERR_READ: windows_sys::core::HRESULT = 0x87AF010A_u32 as _; +pub const SQLITE_E_IOERR_SEEK: windows_sys::core::HRESULT = 0x87AF160A_u32 as _; +pub const SQLITE_E_IOERR_SHMLOCK: windows_sys::core::HRESULT = 0x87AF140A_u32 as _; +pub const SQLITE_E_IOERR_SHMMAP: windows_sys::core::HRESULT = 0x87AF150A_u32 as _; +pub const SQLITE_E_IOERR_SHMOPEN: windows_sys::core::HRESULT = 0x87AF120A_u32 as _; +pub const SQLITE_E_IOERR_SHMSIZE: windows_sys::core::HRESULT = 0x87AF130A_u32 as _; +pub const SQLITE_E_IOERR_SHORT_READ: windows_sys::core::HRESULT = 0x87AF020A_u32 as _; +pub const SQLITE_E_IOERR_TRUNCATE: windows_sys::core::HRESULT = 0x87AF060A_u32 as _; +pub const SQLITE_E_IOERR_UNLOCK: windows_sys::core::HRESULT = 0x87AF080A_u32 as _; +pub const SQLITE_E_IOERR_VNODE: windows_sys::core::HRESULT = 0x87AF1A02_u32 as _; +pub const SQLITE_E_IOERR_WRITE: windows_sys::core::HRESULT = 0x87AF030A_u32 as _; +pub const SQLITE_E_LOCKED: windows_sys::core::HRESULT = 0x87AF0006_u32 as _; +pub const SQLITE_E_LOCKED_SHAREDCACHE: windows_sys::core::HRESULT = 0x87AF0106_u32 as _; +pub const SQLITE_E_MISMATCH: windows_sys::core::HRESULT = 0x87AF0014_u32 as _; +pub const SQLITE_E_MISUSE: windows_sys::core::HRESULT = 0x87AF0015_u32 as _; +pub const SQLITE_E_NOLFS: windows_sys::core::HRESULT = 0x87AF0016_u32 as _; +pub const SQLITE_E_NOMEM: windows_sys::core::HRESULT = 0x87AF0007_u32 as _; +pub const SQLITE_E_NOTADB: windows_sys::core::HRESULT = 0x87AF001A_u32 as _; +pub const SQLITE_E_NOTFOUND: windows_sys::core::HRESULT = 0x87AF000C_u32 as _; +pub const SQLITE_E_NOTICE: windows_sys::core::HRESULT = 0x87AF001B_u32 as _; +pub const SQLITE_E_NOTICE_RECOVER_ROLLBACK: windows_sys::core::HRESULT = 0x87AF021B_u32 as _; +pub const SQLITE_E_NOTICE_RECOVER_WAL: windows_sys::core::HRESULT = 0x87AF011B_u32 as _; +pub const SQLITE_E_PERM: windows_sys::core::HRESULT = 0x87AF0003_u32 as _; +pub const SQLITE_E_PROTOCOL: windows_sys::core::HRESULT = 0x87AF000F_u32 as _; +pub const SQLITE_E_RANGE: windows_sys::core::HRESULT = 0x87AF0019_u32 as _; +pub const SQLITE_E_READONLY: windows_sys::core::HRESULT = 0x87AF0008_u32 as _; +pub const SQLITE_E_READONLY_CANTLOCK: windows_sys::core::HRESULT = 0x87AF0208_u32 as _; +pub const SQLITE_E_READONLY_DBMOVED: windows_sys::core::HRESULT = 0x87AF0408_u32 as _; +pub const SQLITE_E_READONLY_RECOVERY: windows_sys::core::HRESULT = 0x87AF0108_u32 as _; +pub const SQLITE_E_READONLY_ROLLBACK: windows_sys::core::HRESULT = 0x87AF0308_u32 as _; +pub const SQLITE_E_ROW: windows_sys::core::HRESULT = 0x87AF0064_u32 as _; +pub const SQLITE_E_SCHEMA: windows_sys::core::HRESULT = 0x87AF0011_u32 as _; +pub const SQLITE_E_TOOBIG: windows_sys::core::HRESULT = 0x87AF0012_u32 as _; +pub const SQLITE_E_WARNING: windows_sys::core::HRESULT = 0x87AF001C_u32 as _; +pub const SQLITE_E_WARNING_AUTOINDEX: windows_sys::core::HRESULT = 0x87AF011C_u32 as _; +pub const STATEREPOSITORY_ERROR_CACHE_CORRUPTED: windows_sys::core::HRESULT = 0x80670012_u32 as _; +pub const STATEREPOSITORY_ERROR_DICTIONARY_CORRUPTED: windows_sys::core::HRESULT = 0x80670005_u32 as _; +pub const STATEREPOSITORY_E_BLOCKED: windows_sys::core::HRESULT = 0x80670006_u32 as _; +pub const STATEREPOSITORY_E_BUSY_RECOVERY_RETRY: windows_sys::core::HRESULT = 0x80670008_u32 as _; +pub const STATEREPOSITORY_E_BUSY_RECOVERY_TIMEOUT_EXCEEDED: windows_sys::core::HRESULT = 0x8067000D_u32 as _; +pub const STATEREPOSITORY_E_BUSY_RETRY: windows_sys::core::HRESULT = 0x80670007_u32 as _; +pub const STATEREPOSITORY_E_BUSY_TIMEOUT_EXCEEDED: windows_sys::core::HRESULT = 0x8067000C_u32 as _; +pub const STATEREPOSITORY_E_CACHE_NOT_INIITALIZED: windows_sys::core::HRESULT = 0x80670015_u32 as _; +pub const STATEREPOSITORY_E_CONCURRENCY_LOCKING_FAILURE: windows_sys::core::HRESULT = 0x80670001_u32 as _; +pub const STATEREPOSITORY_E_CONFIGURATION_INVALID: windows_sys::core::HRESULT = 0x80670003_u32 as _; +pub const STATEREPOSITORY_E_DEPENDENCY_NOT_RESOLVED: windows_sys::core::HRESULT = 0x80670016_u32 as _; +pub const STATEREPOSITORY_E_LOCKED_RETRY: windows_sys::core::HRESULT = 0x80670009_u32 as _; +pub const STATEREPOSITORY_E_LOCKED_SHAREDCACHE_RETRY: windows_sys::core::HRESULT = 0x8067000A_u32 as _; +pub const STATEREPOSITORY_E_LOCKED_SHAREDCACHE_TIMEOUT_EXCEEDED: windows_sys::core::HRESULT = 0x8067000F_u32 as _; +pub const STATEREPOSITORY_E_LOCKED_TIMEOUT_EXCEEDED: windows_sys::core::HRESULT = 0x8067000E_u32 as _; +pub const STATEREPOSITORY_E_SERVICE_STOP_IN_PROGRESS: windows_sys::core::HRESULT = 0x80670010_u32 as _; +pub const STATEREPOSITORY_E_STATEMENT_INPROGRESS: windows_sys::core::HRESULT = 0x80670002_u32 as _; +pub const STATEREPOSITORY_E_TRANSACTION_REQUIRED: windows_sys::core::HRESULT = 0x8067000B_u32 as _; +pub const STATEREPOSITORY_E_UNKNOWN_SCHEMA_VERSION: windows_sys::core::HRESULT = 0x80670004_u32 as _; +pub const STATEREPOSITORY_TRANSACTION_CALLER_ID_CHANGED: windows_sys::core::HRESULT = 0x670013_u32 as _; +pub const STATEREPOSITORY_TRANSACTION_IN_PROGRESS: windows_sys::core::HRESULT = 0x80670014_u32 as _; +pub const STATEREPOSTORY_E_NESTED_TRANSACTION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80670011_u32 as _; +pub const STATUS_ABANDONED: NTSTATUS = 0x80_u32 as _; +pub const STATUS_ABANDONED_WAIT_0: NTSTATUS = 0x80_u32 as _; +pub const STATUS_ABANDONED_WAIT_63: NTSTATUS = 0xBF_u32 as _; +pub const STATUS_ABANDON_HIBERFILE: NTSTATUS = 0x40000033_u32 as _; +pub const STATUS_ABIOS_INVALID_COMMAND: NTSTATUS = 0xC0000113_u32 as _; +pub const STATUS_ABIOS_INVALID_LID: NTSTATUS = 0xC0000114_u32 as _; +pub const STATUS_ABIOS_INVALID_SELECTOR: NTSTATUS = 0xC0000116_u32 as _; +pub const STATUS_ABIOS_LID_ALREADY_OWNED: NTSTATUS = 0xC0000111_u32 as _; +pub const STATUS_ABIOS_LID_NOT_EXIST: NTSTATUS = 0xC0000110_u32 as _; +pub const STATUS_ABIOS_NOT_LID_OWNER: NTSTATUS = 0xC0000112_u32 as _; +pub const STATUS_ABIOS_NOT_PRESENT: NTSTATUS = 0xC000010F_u32 as _; +pub const STATUS_ABIOS_SELECTOR_NOT_AVAILABLE: NTSTATUS = 0xC0000115_u32 as _; +pub const STATUS_ACCESS_AUDIT_BY_POLICY: NTSTATUS = 0x40000032_u32 as _; +pub const STATUS_ACCESS_DENIED: NTSTATUS = 0xC0000022_u32 as _; +pub const STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT: NTSTATUS = 0xC0000361_u32 as _; +pub const STATUS_ACCESS_DISABLED_BY_POLICY_OTHER: NTSTATUS = 0xC0000364_u32 as _; +pub const STATUS_ACCESS_DISABLED_BY_POLICY_PATH: NTSTATUS = 0xC0000362_u32 as _; +pub const STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER: NTSTATUS = 0xC0000363_u32 as _; +pub const STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY: NTSTATUS = 0xC0000372_u32 as _; +pub const STATUS_ACCESS_VIOLATION: NTSTATUS = 0xC0000005_u32 as _; +pub const STATUS_ACPI_ACQUIRE_GLOBAL_LOCK: NTSTATUS = 0xC0140012_u32 as _; +pub const STATUS_ACPI_ADDRESS_NOT_MAPPED: NTSTATUS = 0xC014000C_u32 as _; +pub const STATUS_ACPI_ALREADY_INITIALIZED: NTSTATUS = 0xC0140013_u32 as _; +pub const STATUS_ACPI_ASSERT_FAILED: NTSTATUS = 0xC0140003_u32 as _; +pub const STATUS_ACPI_FATAL: NTSTATUS = 0xC0140006_u32 as _; +pub const STATUS_ACPI_HANDLER_COLLISION: NTSTATUS = 0xC014000E_u32 as _; +pub const STATUS_ACPI_INCORRECT_ARGUMENT_COUNT: NTSTATUS = 0xC014000B_u32 as _; +pub const STATUS_ACPI_INVALID_ACCESS_SIZE: NTSTATUS = 0xC0140011_u32 as _; +pub const STATUS_ACPI_INVALID_ARGTYPE: NTSTATUS = 0xC0140008_u32 as _; +pub const STATUS_ACPI_INVALID_ARGUMENT: NTSTATUS = 0xC0140005_u32 as _; +pub const STATUS_ACPI_INVALID_DATA: NTSTATUS = 0xC014000F_u32 as _; +pub const STATUS_ACPI_INVALID_EVENTTYPE: NTSTATUS = 0xC014000D_u32 as _; +pub const STATUS_ACPI_INVALID_INDEX: NTSTATUS = 0xC0140004_u32 as _; +pub const STATUS_ACPI_INVALID_MUTEX_LEVEL: NTSTATUS = 0xC0140015_u32 as _; +pub const STATUS_ACPI_INVALID_OBJTYPE: NTSTATUS = 0xC0140009_u32 as _; +pub const STATUS_ACPI_INVALID_OPCODE: NTSTATUS = 0xC0140001_u32 as _; +pub const STATUS_ACPI_INVALID_REGION: NTSTATUS = 0xC0140010_u32 as _; +pub const STATUS_ACPI_INVALID_SUPERNAME: NTSTATUS = 0xC0140007_u32 as _; +pub const STATUS_ACPI_INVALID_TABLE: NTSTATUS = 0xC0140019_u32 as _; +pub const STATUS_ACPI_INVALID_TARGETTYPE: NTSTATUS = 0xC014000A_u32 as _; +pub const STATUS_ACPI_MUTEX_NOT_OWNED: NTSTATUS = 0xC0140016_u32 as _; +pub const STATUS_ACPI_MUTEX_NOT_OWNER: NTSTATUS = 0xC0140017_u32 as _; +pub const STATUS_ACPI_NOT_INITIALIZED: NTSTATUS = 0xC0140014_u32 as _; +pub const STATUS_ACPI_POWER_REQUEST_FAILED: NTSTATUS = 0xC0140021_u32 as _; +pub const STATUS_ACPI_REG_HANDLER_FAILED: NTSTATUS = 0xC0140020_u32 as _; +pub const STATUS_ACPI_RS_ACCESS: NTSTATUS = 0xC0140018_u32 as _; +pub const STATUS_ACPI_STACK_OVERFLOW: NTSTATUS = 0xC0140002_u32 as _; +pub const STATUS_ADAPTER_HARDWARE_ERROR: NTSTATUS = 0xC00000C2_u32 as _; +pub const STATUS_ADDRESS_ALREADY_ASSOCIATED: NTSTATUS = 0xC0000238_u32 as _; +pub const STATUS_ADDRESS_ALREADY_EXISTS: NTSTATUS = 0xC000020A_u32 as _; +pub const STATUS_ADDRESS_CLOSED: NTSTATUS = 0xC000020B_u32 as _; +pub const STATUS_ADDRESS_NOT_ASSOCIATED: NTSTATUS = 0xC0000239_u32 as _; +pub const STATUS_ADMINLESS_ACCESS_DENIED: NTSTATUS = 0xC000A204_u32 as _; +pub const STATUS_ADVANCED_INSTALLER_FAILED: NTSTATUS = 0xC0150020_u32 as _; +pub const STATUS_AGENTS_EXHAUSTED: NTSTATUS = 0xC0000085_u32 as _; +pub const STATUS_ALERTED: NTSTATUS = 0x101_u32 as _; +pub const STATUS_ALIAS_EXISTS: NTSTATUS = 0xC0000154_u32 as _; +pub const STATUS_ALLOCATE_BUCKET: NTSTATUS = 0xC000022F_u32 as _; +pub const STATUS_ALLOTTED_SPACE_EXCEEDED: NTSTATUS = 0xC0000099_u32 as _; +pub const STATUS_ALL_SIDS_FILTERED: NTSTATUS = 0xC000035E_u32 as _; +pub const STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED: NTSTATUS = 0xC0000402_u32 as _; +pub const STATUS_ALPC_CHECK_COMPLETION_LIST: NTSTATUS = 0x40000030_u32 as _; +pub const STATUS_ALREADY_COMMITTED: NTSTATUS = 0xC0000021_u32 as _; +pub const STATUS_ALREADY_COMPLETE: NTSTATUS = 0xFF_u32 as _; +pub const STATUS_ALREADY_DISCONNECTED: NTSTATUS = 0x80000025_u32 as _; +pub const STATUS_ALREADY_HAS_STREAM_ID: NTSTATUS = 0xC000050E_u32 as _; +pub const STATUS_ALREADY_INITIALIZED: NTSTATUS = 0xC0000510_u32 as _; +pub const STATUS_ALREADY_REGISTERED: NTSTATUS = 0xC0000718_u32 as _; +pub const STATUS_ALREADY_WIN32: NTSTATUS = 0x4000001B_u32 as _; +pub const STATUS_AMBIGUOUS_SYSTEM_DEVICE: NTSTATUS = 0xC0000451_u32 as _; +pub const STATUS_APC_RETURNED_WHILE_IMPERSONATING: NTSTATUS = 0xC0000711_u32 as _; +pub const STATUS_APISET_NOT_HOSTED: NTSTATUS = 0xC0000481_u32 as _; +pub const STATUS_APISET_NOT_PRESENT: NTSTATUS = 0xC0000482_u32 as _; +pub const STATUS_APPEXEC_APP_COMPAT_BLOCK: NTSTATUS = 0xC0EC0008_u32 as _; +pub const STATUS_APPEXEC_CALLER_WAIT_TIMEOUT: NTSTATUS = 0xC0EC0009_u32 as _; +pub const STATUS_APPEXEC_CALLER_WAIT_TIMEOUT_LICENSING: NTSTATUS = 0xC0EC000B_u32 as _; +pub const STATUS_APPEXEC_CALLER_WAIT_TIMEOUT_RESOURCES: NTSTATUS = 0xC0EC000C_u32 as _; +pub const STATUS_APPEXEC_CALLER_WAIT_TIMEOUT_TERMINATION: NTSTATUS = 0xC0EC000A_u32 as _; +pub const STATUS_APPEXEC_CONDITION_NOT_SATISFIED: NTSTATUS = 0xC0EC0000_u32 as _; +pub const STATUS_APPEXEC_HANDLE_INVALIDATED: NTSTATUS = 0xC0EC0001_u32 as _; +pub const STATUS_APPEXEC_HOST_ID_MISMATCH: NTSTATUS = 0xC0EC0006_u32 as _; +pub const STATUS_APPEXEC_INVALID_HOST_GENERATION: NTSTATUS = 0xC0EC0002_u32 as _; +pub const STATUS_APPEXEC_INVALID_HOST_STATE: NTSTATUS = 0xC0EC0004_u32 as _; +pub const STATUS_APPEXEC_NO_DONOR: NTSTATUS = 0xC0EC0005_u32 as _; +pub const STATUS_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION: NTSTATUS = 0xC0EC0003_u32 as _; +pub const STATUS_APPEXEC_UNKNOWN_USER: NTSTATUS = 0xC0EC0007_u32 as _; +pub const STATUS_APPHELP_BLOCK: NTSTATUS = 0xC000035D_u32 as _; +pub const STATUS_APPX_FILE_NOT_ENCRYPTED: NTSTATUS = 0xC00004A6_u32 as _; +pub const STATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN: NTSTATUS = 0xC000047F_u32 as _; +pub const STATUS_APP_DATA_CORRUPT: NTSTATUS = 0xC000A283_u32 as _; +pub const STATUS_APP_DATA_EXPIRED: NTSTATUS = 0xC000A282_u32 as _; +pub const STATUS_APP_DATA_LIMIT_EXCEEDED: NTSTATUS = 0xC000A284_u32 as _; +pub const STATUS_APP_DATA_NOT_FOUND: NTSTATUS = 0xC000A281_u32 as _; +pub const STATUS_APP_DATA_REBOOT_REQUIRED: NTSTATUS = 0xC000A285_u32 as _; +pub const STATUS_APP_INIT_FAILURE: NTSTATUS = 0xC0000145_u32 as _; +pub const STATUS_ARBITRATION_UNHANDLED: NTSTATUS = 0x40000026_u32 as _; +pub const STATUS_ARRAY_BOUNDS_EXCEEDED: NTSTATUS = 0xC000008C_u32 as _; +pub const STATUS_ASSERTION_FAILURE: NTSTATUS = 0xC0000420_u32 as _; +pub const STATUS_ATTACHED_EXECUTABLE_MEMORY_WRITE: NTSTATUS = 0xC0000725_u32 as _; +pub const STATUS_ATTRIBUTE_NOT_PRESENT: NTSTATUS = 0xC000050C_u32 as _; +pub const STATUS_AUDIO_ENGINE_NODE_NOT_FOUND: NTSTATUS = 0xC0440001_u32 as _; +pub const STATUS_AUDITING_DISABLED: NTSTATUS = 0xC0000356_u32 as _; +pub const STATUS_AUDIT_FAILED: NTSTATUS = 0xC0000244_u32 as _; +pub const STATUS_AUTHIP_FAILURE: NTSTATUS = 0xC000A086_u32 as _; +pub const STATUS_AUTH_TAG_MISMATCH: NTSTATUS = 0xC000A002_u32 as _; +pub const STATUS_BACKUP_CONTROLLER: NTSTATUS = 0xC0000187_u32 as _; +pub const STATUS_BAD_BINDINGS: NTSTATUS = 0xC000035B_u32 as _; +pub const STATUS_BAD_CLUSTERS: NTSTATUS = 0xC0000805_u32 as _; +pub const STATUS_BAD_COMPRESSION_BUFFER: NTSTATUS = 0xC0000242_u32 as _; +pub const STATUS_BAD_CURRENT_DIRECTORY: NTSTATUS = 0x40000007_u32 as _; +pub const STATUS_BAD_DATA: NTSTATUS = 0xC000090B_u32 as _; +pub const STATUS_BAD_DESCRIPTOR_FORMAT: NTSTATUS = 0xC00000E7_u32 as _; +pub const STATUS_BAD_DEVICE_TYPE: NTSTATUS = 0xC00000CB_u32 as _; +pub const STATUS_BAD_DLL_ENTRYPOINT: NTSTATUS = 0xC0000251_u32 as _; +pub const STATUS_BAD_FILE_TYPE: NTSTATUS = 0xC0000903_u32 as _; +pub const STATUS_BAD_FUNCTION_TABLE: NTSTATUS = 0xC00000FF_u32 as _; +pub const STATUS_BAD_IMPERSONATION_LEVEL: NTSTATUS = 0xC00000A5_u32 as _; +pub const STATUS_BAD_INHERITANCE_ACL: NTSTATUS = 0xC000007D_u32 as _; +pub const STATUS_BAD_INITIAL_PC: NTSTATUS = 0xC000000A_u32 as _; +pub const STATUS_BAD_INITIAL_STACK: NTSTATUS = 0xC0000009_u32 as _; +pub const STATUS_BAD_KEY: NTSTATUS = 0xC000090A_u32 as _; +pub const STATUS_BAD_LOGON_SESSION_STATE: NTSTATUS = 0xC0000104_u32 as _; +pub const STATUS_BAD_MASTER_BOOT_RECORD: NTSTATUS = 0xC00000A9_u32 as _; +pub const STATUS_BAD_MCFG_TABLE: NTSTATUS = 0xC0000908_u32 as _; +pub const STATUS_BAD_NETWORK_NAME: NTSTATUS = 0xC00000CC_u32 as _; +pub const STATUS_BAD_NETWORK_PATH: NTSTATUS = 0xC00000BE_u32 as _; +pub const STATUS_BAD_REMOTE_ADAPTER: NTSTATUS = 0xC00000C5_u32 as _; +pub const STATUS_BAD_SERVICE_ENTRYPOINT: NTSTATUS = 0xC0000252_u32 as _; +pub const STATUS_BAD_STACK: NTSTATUS = 0xC0000028_u32 as _; +pub const STATUS_BAD_TOKEN_TYPE: NTSTATUS = 0xC00000A8_u32 as _; +pub const STATUS_BAD_VALIDATION_CLASS: NTSTATUS = 0xC00000A7_u32 as _; +pub const STATUS_BAD_WORKING_SET_LIMIT: NTSTATUS = 0xC000004C_u32 as _; +pub const STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED: NTSTATUS = 0x80390001_u32 as _; +pub const STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED: NTSTATUS = 0x80390003_u32 as _; +pub const STATUS_BCD_TOO_MANY_ELEMENTS: NTSTATUS = 0xC0390002_u32 as _; +pub const STATUS_BEGINNING_OF_MEDIA: NTSTATUS = 0x8000001F_u32 as _; +pub const STATUS_BEYOND_VDL: NTSTATUS = 0xC0000432_u32 as _; +pub const STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT: NTSTATUS = 0xC000016E_u32 as _; +pub const STATUS_BIZRULES_NOT_ENABLED: NTSTATUS = 0x40000034_u32 as _; +pub const STATUS_BLOCKED_BY_PARENTAL_CONTROLS: NTSTATUS = 0xC0000488_u32 as _; +pub const STATUS_BLOCK_SHARED: NTSTATUS = 0xC0000915_u32 as _; +pub const STATUS_BLOCK_SOURCE_WEAK_REFERENCE_INVALID: NTSTATUS = 0xC0000913_u32 as _; +pub const STATUS_BLOCK_TARGET_WEAK_REFERENCE_INVALID: NTSTATUS = 0xC0000914_u32 as _; +pub const STATUS_BLOCK_TOO_MANY_REFERENCES: NTSTATUS = 0xC000048C_u32 as _; +pub const STATUS_BLOCK_WEAK_REFERENCE_INVALID: NTSTATUS = 0xC0000912_u32 as _; +pub const STATUS_BREAKPOINT: NTSTATUS = 0x80000003_u32 as _; +pub const STATUS_BTH_ATT_ATTRIBUTE_NOT_FOUND: NTSTATUS = 0xC042000A_u32 as _; +pub const STATUS_BTH_ATT_ATTRIBUTE_NOT_LONG: NTSTATUS = 0xC042000B_u32 as _; +pub const STATUS_BTH_ATT_INSUFFICIENT_AUTHENTICATION: NTSTATUS = 0xC0420005_u32 as _; +pub const STATUS_BTH_ATT_INSUFFICIENT_AUTHORIZATION: NTSTATUS = 0xC0420008_u32 as _; +pub const STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION: NTSTATUS = 0xC042000F_u32 as _; +pub const STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE: NTSTATUS = 0xC042000C_u32 as _; +pub const STATUS_BTH_ATT_INSUFFICIENT_RESOURCES: NTSTATUS = 0xC0420011_u32 as _; +pub const STATUS_BTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH: NTSTATUS = 0xC042000D_u32 as _; +pub const STATUS_BTH_ATT_INVALID_HANDLE: NTSTATUS = 0xC0420001_u32 as _; +pub const STATUS_BTH_ATT_INVALID_OFFSET: NTSTATUS = 0xC0420007_u32 as _; +pub const STATUS_BTH_ATT_INVALID_PDU: NTSTATUS = 0xC0420004_u32 as _; +pub const STATUS_BTH_ATT_PREPARE_QUEUE_FULL: NTSTATUS = 0xC0420009_u32 as _; +pub const STATUS_BTH_ATT_READ_NOT_PERMITTED: NTSTATUS = 0xC0420002_u32 as _; +pub const STATUS_BTH_ATT_REQUEST_NOT_SUPPORTED: NTSTATUS = 0xC0420006_u32 as _; +pub const STATUS_BTH_ATT_UNKNOWN_ERROR: NTSTATUS = 0xC0421000_u32 as _; +pub const STATUS_BTH_ATT_UNLIKELY: NTSTATUS = 0xC042000E_u32 as _; +pub const STATUS_BTH_ATT_UNSUPPORTED_GROUP_TYPE: NTSTATUS = 0xC0420010_u32 as _; +pub const STATUS_BTH_ATT_WRITE_NOT_PERMITTED: NTSTATUS = 0xC0420003_u32 as _; +pub const STATUS_BUFFER_ALL_ZEROS: NTSTATUS = 0x117_u32 as _; +pub const STATUS_BUFFER_OVERFLOW: NTSTATUS = 0x80000005_u32 as _; +pub const STATUS_BUFFER_TOO_SMALL: NTSTATUS = 0xC0000023_u32 as _; +pub const STATUS_BUS_RESET: NTSTATUS = 0x8000001D_u32 as _; +pub const STATUS_BYPASSIO_FLT_NOT_SUPPORTED: NTSTATUS = 0xC00004D2_u32 as _; +pub const STATUS_CACHE_PAGE_LOCKED: NTSTATUS = 0x115_u32 as _; +pub const STATUS_CALLBACK_BYPASS: NTSTATUS = 0xC0000503_u32 as _; +pub const STATUS_CALLBACK_INVOKE_INLINE: NTSTATUS = 0xC000048B_u32 as _; +pub const STATUS_CALLBACK_POP_STACK: NTSTATUS = 0xC0000423_u32 as _; +pub const STATUS_CALLBACK_RETURNED_LANG: NTSTATUS = 0xC000071F_u32 as _; +pub const STATUS_CALLBACK_RETURNED_LDR_LOCK: NTSTATUS = 0xC000071E_u32 as _; +pub const STATUS_CALLBACK_RETURNED_PRI_BACK: NTSTATUS = 0xC0000720_u32 as _; +pub const STATUS_CALLBACK_RETURNED_THREAD_AFFINITY: NTSTATUS = 0xC0000721_u32 as _; +pub const STATUS_CALLBACK_RETURNED_THREAD_PRIORITY: NTSTATUS = 0xC000071B_u32 as _; +pub const STATUS_CALLBACK_RETURNED_TRANSACTION: NTSTATUS = 0xC000071D_u32 as _; +pub const STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING: NTSTATUS = 0xC0000710_u32 as _; +pub const STATUS_CANCELLED: NTSTATUS = 0xC0000120_u32 as _; +pub const STATUS_CANNOT_ABORT_TRANSACTIONS: NTSTATUS = 0xC019004D_u32 as _; +pub const STATUS_CANNOT_ACCEPT_TRANSACTED_WORK: NTSTATUS = 0xC019004C_u32 as _; +pub const STATUS_CANNOT_BREAK_OPLOCK: NTSTATUS = 0xC0000909_u32 as _; +pub const STATUS_CANNOT_DELETE: NTSTATUS = 0xC0000121_u32 as _; +pub const STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION: NTSTATUS = 0xC0190044_u32 as _; +pub const STATUS_CANNOT_GRANT_REQUESTED_OPLOCK: NTSTATUS = 0x8000002E_u32 as _; +pub const STATUS_CANNOT_IMPERSONATE: NTSTATUS = 0xC000010D_u32 as _; +pub const STATUS_CANNOT_LOAD_REGISTRY_FILE: NTSTATUS = 0xC0000218_u32 as _; +pub const STATUS_CANNOT_MAKE: NTSTATUS = 0xC00002EA_u32 as _; +pub const STATUS_CANNOT_SWITCH_RUNLEVEL: NTSTATUS = 0xC000A141_u32 as _; +pub const STATUS_CANT_ACCESS_DOMAIN_INFO: NTSTATUS = 0xC00000DA_u32 as _; +pub const STATUS_CANT_ATTACH_TO_DEV_VOLUME: NTSTATUS = 0xC00004DF_u32 as _; +pub const STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY: NTSTATUS = 0xC0190037_u32 as _; +pub const STATUS_CANT_CLEAR_ENCRYPTION_FLAG: NTSTATUS = 0xC00004B8_u32 as _; +pub const STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS: NTSTATUS = 0xC0190026_u32 as _; +pub const STATUS_CANT_CROSS_RM_BOUNDARY: NTSTATUS = 0xC0190038_u32 as _; +pub const STATUS_CANT_DISABLE_MANDATORY: NTSTATUS = 0xC000005D_u32 as _; +pub const STATUS_CANT_ENABLE_DENY_ONLY: NTSTATUS = 0xC00002B3_u32 as _; +pub const STATUS_CANT_OPEN_ANONYMOUS: NTSTATUS = 0xC00000A6_u32 as _; +pub const STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT: NTSTATUS = 0xC0190025_u32 as _; +pub const STATUS_CANT_RECOVER_WITH_HANDLE_OPEN: NTSTATUS = 0x80190031_u32 as _; +pub const STATUS_CANT_TERMINATE_SELF: NTSTATUS = 0xC00000DB_u32 as _; +pub const STATUS_CANT_WAIT: NTSTATUS = 0xC00000D8_u32 as _; +pub const STATUS_CARDBUS_NOT_SUPPORTED: NTSTATUS = 0x40000027_u32 as _; +pub const STATUS_CASE_DIFFERING_NAMES_IN_DIR: NTSTATUS = 0xC00004B3_u32 as _; +pub const STATUS_CASE_SENSITIVE_PATH: NTSTATUS = 0xC00004BA_u32 as _; +pub const STATUS_CC_NEEDS_CALLBACK_SECTION_DRAIN: NTSTATUS = 0xC000A008_u32 as _; +pub const STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE: NTSTATUS = 0xC0000714_u32 as _; +pub const STATUS_CERTIFICATE_VALIDATION_PREFERENCE_CONFLICT: NTSTATUS = 0xC00001B5_u32 as _; +pub const STATUS_CHECKING_FILE_SYSTEM: NTSTATUS = 0x40000014_u32 as _; +pub const STATUS_CHECKOUT_REQUIRED: NTSTATUS = 0xC0000902_u32 as _; +pub const STATUS_CHILD_MUST_BE_VOLATILE: NTSTATUS = 0xC0000181_u32 as _; +pub const STATUS_CHILD_PROCESS_BLOCKED: NTSTATUS = 0xC000049D_u32 as _; +pub const STATUS_CIMFS_IMAGE_CORRUPT: NTSTATUS = 0xC000C001_u32 as _; +pub const STATUS_CIMFS_IMAGE_VERSION_NOT_SUPPORTED: NTSTATUS = 0xC000C002_u32 as _; +pub const STATUS_CLEANER_CARTRIDGE_INSTALLED: NTSTATUS = 0x80000027_u32 as _; +pub const STATUS_CLIENT_SERVER_PARAMETERS_INVALID: NTSTATUS = 0xC0000223_u32 as _; +pub const STATUS_CLIP_DEVICE_LICENSE_MISSING: NTSTATUS = 0xC0EA0003_u32 as _; +pub const STATUS_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID: NTSTATUS = 0xC0EA0005_u32 as _; +pub const STATUS_CLIP_LICENSE_DEVICE_ID_MISMATCH: NTSTATUS = 0xC0EA000A_u32 as _; +pub const STATUS_CLIP_LICENSE_EXPIRED: NTSTATUS = 0xC0EA0006_u32 as _; +pub const STATUS_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE: NTSTATUS = 0xC0EA0009_u32 as _; +pub const STATUS_CLIP_LICENSE_INVALID_SIGNATURE: NTSTATUS = 0xC0EA0004_u32 as _; +pub const STATUS_CLIP_LICENSE_NOT_FOUND: NTSTATUS = 0xC0EA0002_u32 as _; +pub const STATUS_CLIP_LICENSE_NOT_SIGNED: NTSTATUS = 0xC0EA0008_u32 as _; +pub const STATUS_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE: NTSTATUS = 0xC0EA0007_u32 as _; +pub const STATUS_CLOUD_FILE_ACCESS_DENIED: NTSTATUS = 0xC000CF18_u32 as _; +pub const STATUS_CLOUD_FILE_ALREADY_CONNECTED: NTSTATUS = 0xC000CF09_u32 as _; +pub const STATUS_CLOUD_FILE_AUTHENTICATION_FAILED: NTSTATUS = 0xC000CF0F_u32 as _; +pub const STATUS_CLOUD_FILE_CONNECTED_PROVIDER_ONLY: NTSTATUS = 0xC000CF0D_u32 as _; +pub const STATUS_CLOUD_FILE_DEHYDRATION_DISALLOWED: NTSTATUS = 0xC000CF20_u32 as _; +pub const STATUS_CLOUD_FILE_INCOMPATIBLE_HARDLINKS: NTSTATUS = 0xC000CF19_u32 as _; +pub const STATUS_CLOUD_FILE_INSUFFICIENT_RESOURCES: NTSTATUS = 0xC000CF10_u32 as _; +pub const STATUS_CLOUD_FILE_INVALID_REQUEST: NTSTATUS = 0xC000CF0B_u32 as _; +pub const STATUS_CLOUD_FILE_IN_USE: NTSTATUS = 0xC000CF14_u32 as _; +pub const STATUS_CLOUD_FILE_METADATA_CORRUPT: NTSTATUS = 0xC000CF02_u32 as _; +pub const STATUS_CLOUD_FILE_METADATA_TOO_LARGE: NTSTATUS = 0xC000CF03_u32 as _; +pub const STATUS_CLOUD_FILE_NETWORK_UNAVAILABLE: NTSTATUS = 0xC000CF11_u32 as _; +pub const STATUS_CLOUD_FILE_NOT_IN_SYNC: NTSTATUS = 0xC000CF08_u32 as _; +pub const STATUS_CLOUD_FILE_NOT_SUPPORTED: NTSTATUS = 0xC000CF0A_u32 as _; +pub const STATUS_CLOUD_FILE_NOT_UNDER_SYNC_ROOT: NTSTATUS = 0xC000CF13_u32 as _; +pub const STATUS_CLOUD_FILE_PINNED: NTSTATUS = 0xC000CF15_u32 as _; +pub const STATUS_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH: NTSTATUS = 0x8000CF00_u32 as _; +pub const STATUS_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE: NTSTATUS = 0x8000CF04_u32 as _; +pub const STATUS_CLOUD_FILE_PROPERTY_CORRUPT: NTSTATUS = 0xC000CF17_u32 as _; +pub const STATUS_CLOUD_FILE_PROPERTY_LOCK_CONFLICT: NTSTATUS = 0xC000CF1A_u32 as _; +pub const STATUS_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED: NTSTATUS = 0xC000CF06_u32 as _; +pub const STATUS_CLOUD_FILE_PROVIDER_NOT_RUNNING: NTSTATUS = 0xC000CF01_u32 as _; +pub const STATUS_CLOUD_FILE_PROVIDER_TERMINATED: NTSTATUS = 0xC000CF1D_u32 as _; +pub const STATUS_CLOUD_FILE_READ_ONLY_VOLUME: NTSTATUS = 0xC000CF0C_u32 as _; +pub const STATUS_CLOUD_FILE_REQUEST_ABORTED: NTSTATUS = 0xC000CF16_u32 as _; +pub const STATUS_CLOUD_FILE_REQUEST_CANCELED: NTSTATUS = 0xC000CF1B_u32 as _; +pub const STATUS_CLOUD_FILE_REQUEST_TIMEOUT: NTSTATUS = 0xC000CF1F_u32 as _; +pub const STATUS_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT: NTSTATUS = 0xC000CF00_u32 as _; +pub const STATUS_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS: NTSTATUS = 0x8000CF05_u32 as _; +pub const STATUS_CLOUD_FILE_UNSUCCESSFUL: NTSTATUS = 0xC000CF12_u32 as _; +pub const STATUS_CLOUD_FILE_US_MESSAGE_TIMEOUT: NTSTATUS = 0xC000CF21_u32 as _; +pub const STATUS_CLOUD_FILE_VALIDATION_FAILED: NTSTATUS = 0xC000CF0E_u32 as _; +pub const STATUS_CLUSTER_CAM_TICKET_REPLAY_DETECTED: NTSTATUS = 0xC0130031_u32 as _; +pub const STATUS_CLUSTER_CSV_AUTO_PAUSE_ERROR: NTSTATUS = 0xC0130021_u32 as _; +pub const STATUS_CLUSTER_CSV_INVALID_HANDLE: NTSTATUS = 0xC0130029_u32 as _; +pub const STATUS_CLUSTER_CSV_NOT_REDIRECTED: NTSTATUS = 0xC0130023_u32 as _; +pub const STATUS_CLUSTER_CSV_NO_SNAPSHOTS: NTSTATUS = 0xC0130027_u32 as _; +pub const STATUS_CLUSTER_CSV_READ_OPLOCK_BREAK_IN_PROGRESS: NTSTATUS = 0xC0130020_u32 as _; +pub const STATUS_CLUSTER_CSV_REDIRECTED: NTSTATUS = 0xC0130022_u32 as _; +pub const STATUS_CLUSTER_CSV_SNAPSHOT_CREATION_IN_PROGRESS: NTSTATUS = 0xC0130025_u32 as _; +pub const STATUS_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR: NTSTATUS = 0xC0130030_u32 as _; +pub const STATUS_CLUSTER_CSV_VOLUME_DRAINING: NTSTATUS = 0xC0130024_u32 as _; +pub const STATUS_CLUSTER_CSV_VOLUME_DRAINING_SUCCEEDED_DOWNLEVEL: NTSTATUS = 0xC0130026_u32 as _; +pub const STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL: NTSTATUS = 0xC0130019_u32 as _; +pub const STATUS_CLUSTER_INVALID_NETWORK: NTSTATUS = 0xC0130010_u32 as _; +pub const STATUS_CLUSTER_INVALID_NETWORK_PROVIDER: NTSTATUS = 0xC013000B_u32 as _; +pub const STATUS_CLUSTER_INVALID_NODE: NTSTATUS = 0xC0130001_u32 as _; +pub const STATUS_CLUSTER_INVALID_REQUEST: NTSTATUS = 0xC013000A_u32 as _; +pub const STATUS_CLUSTER_JOIN_IN_PROGRESS: NTSTATUS = 0xC0130003_u32 as _; +pub const STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS: NTSTATUS = 0xC013000F_u32 as _; +pub const STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND: NTSTATUS = 0xC0130005_u32 as _; +pub const STATUS_CLUSTER_NETINTERFACE_EXISTS: NTSTATUS = 0xC0130008_u32 as _; +pub const STATUS_CLUSTER_NETINTERFACE_NOT_FOUND: NTSTATUS = 0xC0130009_u32 as _; +pub const STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE: NTSTATUS = 0x80130004_u32 as _; +pub const STATUS_CLUSTER_NETWORK_ALREADY_ONLINE: NTSTATUS = 0x80130003_u32 as _; +pub const STATUS_CLUSTER_NETWORK_EXISTS: NTSTATUS = 0xC0130006_u32 as _; +pub const STATUS_CLUSTER_NETWORK_NOT_FOUND: NTSTATUS = 0xC0130007_u32 as _; +pub const STATUS_CLUSTER_NETWORK_NOT_INTERNAL: NTSTATUS = 0xC0130016_u32 as _; +pub const STATUS_CLUSTER_NODE_ALREADY_DOWN: NTSTATUS = 0x80130002_u32 as _; +pub const STATUS_CLUSTER_NODE_ALREADY_MEMBER: NTSTATUS = 0x80130005_u32 as _; +pub const STATUS_CLUSTER_NODE_ALREADY_UP: NTSTATUS = 0x80130001_u32 as _; +pub const STATUS_CLUSTER_NODE_DOWN: NTSTATUS = 0xC013000C_u32 as _; +pub const STATUS_CLUSTER_NODE_EXISTS: NTSTATUS = 0xC0130002_u32 as _; +pub const STATUS_CLUSTER_NODE_NOT_FOUND: NTSTATUS = 0xC0130004_u32 as _; +pub const STATUS_CLUSTER_NODE_NOT_MEMBER: NTSTATUS = 0xC013000E_u32 as _; +pub const STATUS_CLUSTER_NODE_NOT_PAUSED: NTSTATUS = 0xC0130014_u32 as _; +pub const STATUS_CLUSTER_NODE_PAUSED: NTSTATUS = 0xC0130013_u32 as _; +pub const STATUS_CLUSTER_NODE_UNREACHABLE: NTSTATUS = 0xC013000D_u32 as _; +pub const STATUS_CLUSTER_NODE_UP: NTSTATUS = 0xC0130012_u32 as _; +pub const STATUS_CLUSTER_NON_CSV_PATH: NTSTATUS = 0xC0130018_u32 as _; +pub const STATUS_CLUSTER_NO_NET_ADAPTERS: NTSTATUS = 0xC0130011_u32 as _; +pub const STATUS_CLUSTER_NO_SECURITY_CONTEXT: NTSTATUS = 0xC0130015_u32 as _; +pub const STATUS_CLUSTER_POISONED: NTSTATUS = 0xC0130017_u32 as _; +pub const STATUS_COMMITMENT_LIMIT: NTSTATUS = 0xC000012D_u32 as _; +pub const STATUS_COMMITMENT_MINIMUM: NTSTATUS = 0xC00002C8_u32 as _; +pub const STATUS_COMPRESSED_FILE_NOT_SUPPORTED: NTSTATUS = 0xC000047B_u32 as _; +pub const STATUS_COMPRESSION_DISABLED: NTSTATUS = 0xC0000426_u32 as _; +pub const STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION: NTSTATUS = 0xC0190056_u32 as _; +pub const STATUS_COMPRESSION_NOT_BENEFICIAL: NTSTATUS = 0xC000046F_u32 as _; +pub const STATUS_CONFLICTING_ADDRESSES: NTSTATUS = 0xC0000018_u32 as _; +pub const STATUS_CONNECTION_ABORTED: NTSTATUS = 0xC0000241_u32 as _; +pub const STATUS_CONNECTION_ACTIVE: NTSTATUS = 0xC000023B_u32 as _; +pub const STATUS_CONNECTION_COUNT_LIMIT: NTSTATUS = 0xC0000246_u32 as _; +pub const STATUS_CONNECTION_DISCONNECTED: NTSTATUS = 0xC000020C_u32 as _; +pub const STATUS_CONNECTION_INVALID: NTSTATUS = 0xC000023A_u32 as _; +pub const STATUS_CONNECTION_IN_USE: NTSTATUS = 0xC0000108_u32 as _; +pub const STATUS_CONNECTION_REFUSED: NTSTATUS = 0xC0000236_u32 as _; +pub const STATUS_CONNECTION_RESET: NTSTATUS = 0xC000020D_u32 as _; +pub const STATUS_CONTAINER_ASSIGNED: NTSTATUS = 0xC0000508_u32 as _; +pub const STATUS_CONTENT_BLOCKED: NTSTATUS = 0xC0000804_u32 as _; +pub const STATUS_CONTEXT_MISMATCH: NTSTATUS = 0xC0000719_u32 as _; +pub const STATUS_CONTEXT_STOWED_EXCEPTION: NTSTATUS = 0xC000027C_u32 as _; +pub const STATUS_CONTROL_C_EXIT: NTSTATUS = 0xC000013A_u32 as _; +pub const STATUS_CONTROL_STACK_VIOLATION: NTSTATUS = 0xC00001B2_u32 as _; +pub const STATUS_CONVERT_TO_LARGE: NTSTATUS = 0xC000022C_u32 as _; +pub const STATUS_COPY_PROTECTION_FAILURE: NTSTATUS = 0xC0000305_u32 as _; +pub const STATUS_CORRUPT_LOG_CLEARED: NTSTATUS = 0xC000080D_u32 as _; +pub const STATUS_CORRUPT_LOG_CORRUPTED: NTSTATUS = 0xC000080A_u32 as _; +pub const STATUS_CORRUPT_LOG_DELETED_FULL: NTSTATUS = 0xC000080C_u32 as _; +pub const STATUS_CORRUPT_LOG_OVERFULL: NTSTATUS = 0xC0000809_u32 as _; +pub const STATUS_CORRUPT_LOG_UNAVAILABLE: NTSTATUS = 0xC000080B_u32 as _; +pub const STATUS_CORRUPT_LOG_UPLEVEL_RECORDS: NTSTATUS = 0xC0000811_u32 as _; +pub const STATUS_CORRUPT_SYSTEM_FILE: NTSTATUS = 0xC00002C4_u32 as _; +pub const STATUS_COULD_NOT_INTERPRET: NTSTATUS = 0xC00000B9_u32 as _; +pub const STATUS_COULD_NOT_RESIZE_LOG: NTSTATUS = 0x80190009_u32 as _; +pub const STATUS_CPU_SET_INVALID: NTSTATUS = 0xC00001AF_u32 as _; +pub const STATUS_CRASH_DUMP: NTSTATUS = 0x116_u32 as _; +pub const STATUS_CRC_ERROR: NTSTATUS = 0xC000003F_u32 as _; +pub const STATUS_CRED_REQUIRES_CONFIRMATION: NTSTATUS = 0xC0000440_u32 as _; +pub const STATUS_CRM_PROTOCOL_ALREADY_EXISTS: NTSTATUS = 0xC019000F_u32 as _; +pub const STATUS_CRM_PROTOCOL_NOT_FOUND: NTSTATUS = 0xC0190011_u32 as _; +pub const STATUS_CROSSREALM_DELEGATION_FAILURE: NTSTATUS = 0xC000040B_u32 as _; +pub const STATUS_CROSS_PARTITION_VIOLATION: NTSTATUS = 0xC000060B_u32 as _; +pub const STATUS_CRYPTO_SYSTEM_INVALID: NTSTATUS = 0xC00002F3_u32 as _; +pub const STATUS_CSS_AUTHENTICATION_FAILURE: NTSTATUS = 0xC0000306_u32 as _; +pub const STATUS_CSS_KEY_NOT_ESTABLISHED: NTSTATUS = 0xC0000308_u32 as _; +pub const STATUS_CSS_KEY_NOT_PRESENT: NTSTATUS = 0xC0000307_u32 as _; +pub const STATUS_CSS_REGION_MISMATCH: NTSTATUS = 0xC000030A_u32 as _; +pub const STATUS_CSS_RESETS_EXHAUSTED: NTSTATUS = 0xC000030B_u32 as _; +pub const STATUS_CSS_SCRAMBLED_SECTOR: NTSTATUS = 0xC0000309_u32 as _; +pub const STATUS_CSV_IO_PAUSE_TIMEOUT: NTSTATUS = 0xC0130028_u32 as _; +pub const STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE: NTSTATUS = 0xC0000443_u32 as _; +pub const STATUS_CS_ENCRYPTION_FILE_NOT_CSE: NTSTATUS = 0xC0000445_u32 as _; +pub const STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE: NTSTATUS = 0xC0000441_u32 as _; +pub const STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE: NTSTATUS = 0xC0000444_u32 as _; +pub const STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER: NTSTATUS = 0xC0000442_u32 as _; +pub const STATUS_CTLOG_INCONSISTENT_TRACKING_FILE: NTSTATUS = 0xC03A0024_u32 as _; +pub const STATUS_CTLOG_INVALID_TRACKING_STATE: NTSTATUS = 0xC03A0023_u32 as _; +pub const STATUS_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE: NTSTATUS = 0xC03A0021_u32 as _; +pub const STATUS_CTLOG_TRACKING_NOT_INITIALIZED: NTSTATUS = 0xC03A0020_u32 as _; +pub const STATUS_CTLOG_VHD_CHANGED_OFFLINE: NTSTATUS = 0xC03A0022_u32 as _; +pub const STATUS_CTL_FILE_NOT_SUPPORTED: NTSTATUS = 0xC0000057_u32 as _; +pub const STATUS_CTX_BAD_VIDEO_MODE: NTSTATUS = 0xC00A0018_u32 as _; +pub const STATUS_CTX_CDM_CONNECT: NTSTATUS = 0x400A0004_u32 as _; +pub const STATUS_CTX_CDM_DISCONNECT: NTSTATUS = 0x400A0005_u32 as _; +pub const STATUS_CTX_CLIENT_LICENSE_IN_USE: NTSTATUS = 0xC00A0034_u32 as _; +pub const STATUS_CTX_CLIENT_LICENSE_NOT_SET: NTSTATUS = 0xC00A0033_u32 as _; +pub const STATUS_CTX_CLIENT_QUERY_TIMEOUT: NTSTATUS = 0xC00A0026_u32 as _; +pub const STATUS_CTX_CLOSE_PENDING: NTSTATUS = 0xC00A0006_u32 as _; +pub const STATUS_CTX_CONSOLE_CONNECT: NTSTATUS = 0xC00A0028_u32 as _; +pub const STATUS_CTX_CONSOLE_DISCONNECT: NTSTATUS = 0xC00A0027_u32 as _; +pub const STATUS_CTX_GRAPHICS_INVALID: NTSTATUS = 0xC00A0022_u32 as _; +pub const STATUS_CTX_INVALID_MODEMNAME: NTSTATUS = 0xC00A0009_u32 as _; +pub const STATUS_CTX_INVALID_PD: NTSTATUS = 0xC00A0002_u32 as _; +pub const STATUS_CTX_INVALID_WD: NTSTATUS = 0xC00A002E_u32 as _; +pub const STATUS_CTX_LICENSE_CLIENT_INVALID: NTSTATUS = 0xC00A0012_u32 as _; +pub const STATUS_CTX_LICENSE_EXPIRED: NTSTATUS = 0xC00A0014_u32 as _; +pub const STATUS_CTX_LICENSE_NOT_AVAILABLE: NTSTATUS = 0xC00A0013_u32 as _; +pub const STATUS_CTX_LOGON_DISABLED: NTSTATUS = 0xC00A0037_u32 as _; +pub const STATUS_CTX_MODEM_INF_NOT_FOUND: NTSTATUS = 0xC00A0008_u32 as _; +pub const STATUS_CTX_MODEM_RESPONSE_BUSY: NTSTATUS = 0xC00A000E_u32 as _; +pub const STATUS_CTX_MODEM_RESPONSE_NO_CARRIER: NTSTATUS = 0xC00A000C_u32 as _; +pub const STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE: NTSTATUS = 0xC00A000D_u32 as _; +pub const STATUS_CTX_MODEM_RESPONSE_TIMEOUT: NTSTATUS = 0xC00A000B_u32 as _; +pub const STATUS_CTX_MODEM_RESPONSE_VOICE: NTSTATUS = 0xC00A000F_u32 as _; +pub const STATUS_CTX_NOT_CONSOLE: NTSTATUS = 0xC00A0024_u32 as _; +pub const STATUS_CTX_NO_OUTBUF: NTSTATUS = 0xC00A0007_u32 as _; +pub const STATUS_CTX_PD_NOT_FOUND: NTSTATUS = 0xC00A0003_u32 as _; +pub const STATUS_CTX_RESPONSE_ERROR: NTSTATUS = 0xC00A000A_u32 as _; +pub const STATUS_CTX_SECURITY_LAYER_ERROR: NTSTATUS = 0xC00A0038_u32 as _; +pub const STATUS_CTX_SHADOW_DENIED: NTSTATUS = 0xC00A002A_u32 as _; +pub const STATUS_CTX_SHADOW_DISABLED: NTSTATUS = 0xC00A0031_u32 as _; +pub const STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE: NTSTATUS = 0xC00A0035_u32 as _; +pub const STATUS_CTX_SHADOW_INVALID: NTSTATUS = 0xC00A0030_u32 as _; +pub const STATUS_CTX_SHADOW_NOT_RUNNING: NTSTATUS = 0xC00A0036_u32 as _; +pub const STATUS_CTX_TD_ERROR: NTSTATUS = 0xC00A0010_u32 as _; +pub const STATUS_CTX_WD_NOT_FOUND: NTSTATUS = 0xC00A002F_u32 as _; +pub const STATUS_CTX_WINSTATION_ACCESS_DENIED: NTSTATUS = 0xC00A002B_u32 as _; +pub const STATUS_CTX_WINSTATION_BUSY: NTSTATUS = 0xC00A0017_u32 as _; +pub const STATUS_CTX_WINSTATION_NAME_COLLISION: NTSTATUS = 0xC00A0016_u32 as _; +pub const STATUS_CTX_WINSTATION_NAME_INVALID: NTSTATUS = 0xC00A0001_u32 as _; +pub const STATUS_CTX_WINSTATION_NOT_FOUND: NTSTATUS = 0xC00A0015_u32 as _; +pub const STATUS_CURRENT_DOMAIN_NOT_ALLOWED: NTSTATUS = 0xC00002E9_u32 as _; +pub const STATUS_CURRENT_TRANSACTION_NOT_VALID: NTSTATUS = 0xC0190018_u32 as _; +pub const STATUS_DATATYPE_MISALIGNMENT: NTSTATUS = 0x80000002_u32 as _; +pub const STATUS_DATATYPE_MISALIGNMENT_ERROR: NTSTATUS = 0xC00002C5_u32 as _; +pub const STATUS_DATA_CHECKSUM_ERROR: NTSTATUS = 0xC0000470_u32 as _; +pub const STATUS_DATA_ERROR: NTSTATUS = 0xC000003E_u32 as _; +pub const STATUS_DATA_LATE_ERROR: NTSTATUS = 0xC000003D_u32 as _; +pub const STATUS_DATA_LOST_REPAIR: NTSTATUS = 0x80000803_u32 as _; +pub const STATUS_DATA_NOT_ACCEPTED: NTSTATUS = 0xC000021B_u32 as _; +pub const STATUS_DATA_OVERRUN: NTSTATUS = 0xC000003C_u32 as _; +pub const STATUS_DATA_OVERWRITTEN: NTSTATUS = 0x130_u32 as _; +pub const STATUS_DAX_MAPPING_EXISTS: NTSTATUS = 0xC000049C_u32 as _; +pub const STATUS_DEBUGGER_INACTIVE: NTSTATUS = 0xC0000354_u32 as _; +pub const STATUS_DEBUG_ATTACH_FAILED: NTSTATUS = 0xC0000219_u32 as _; +pub const STATUS_DECRYPTION_FAILED: NTSTATUS = 0xC000028B_u32 as _; +pub const STATUS_DELAY_LOAD_FAILED: NTSTATUS = 0xC0000412_u32 as _; +pub const STATUS_DELETE_PENDING: NTSTATUS = 0xC0000056_u32 as _; +pub const STATUS_DESTINATION_ELEMENT_FULL: NTSTATUS = 0xC0000284_u32 as _; +pub const STATUS_DEVICE_ALREADY_ATTACHED: NTSTATUS = 0xC0000038_u32 as _; +pub const STATUS_DEVICE_BUSY: NTSTATUS = 0x80000011_u32 as _; +pub const STATUS_DEVICE_CONFIGURATION_ERROR: NTSTATUS = 0xC0000182_u32 as _; +pub const STATUS_DEVICE_DATA_ERROR: NTSTATUS = 0xC000009C_u32 as _; +pub const STATUS_DEVICE_DOES_NOT_EXIST: NTSTATUS = 0xC00000C0_u32 as _; +pub const STATUS_DEVICE_DOOR_OPEN: NTSTATUS = 0x80000289_u32 as _; +pub const STATUS_DEVICE_ENUMERATION_ERROR: NTSTATUS = 0xC0000366_u32 as _; +pub const STATUS_DEVICE_FEATURE_NOT_SUPPORTED: NTSTATUS = 0xC0000463_u32 as _; +pub const STATUS_DEVICE_HARDWARE_ERROR: NTSTATUS = 0xC0000483_u32 as _; +pub const STATUS_DEVICE_HINT_NAME_BUFFER_TOO_SMALL: NTSTATUS = 0xC0000496_u32 as _; +pub const STATUS_DEVICE_HUNG: NTSTATUS = 0xC0000507_u32 as _; +pub const STATUS_DEVICE_INSUFFICIENT_RESOURCES: NTSTATUS = 0xC0000468_u32 as _; +pub const STATUS_DEVICE_IN_MAINTENANCE: NTSTATUS = 0xC0000499_u32 as _; +pub const STATUS_DEVICE_NOT_CONNECTED: NTSTATUS = 0xC000009D_u32 as _; +pub const STATUS_DEVICE_NOT_PARTITIONED: NTSTATUS = 0xC0000174_u32 as _; +pub const STATUS_DEVICE_NOT_READY: NTSTATUS = 0xC00000A3_u32 as _; +pub const STATUS_DEVICE_OFF_LINE: NTSTATUS = 0x80000010_u32 as _; +pub const STATUS_DEVICE_PAPER_EMPTY: NTSTATUS = 0x8000000E_u32 as _; +pub const STATUS_DEVICE_POWERED_OFF: NTSTATUS = 0x8000000F_u32 as _; +pub const STATUS_DEVICE_POWER_CYCLE_REQUIRED: NTSTATUS = 0x80000031_u32 as _; +pub const STATUS_DEVICE_POWER_FAILURE: NTSTATUS = 0xC000009E_u32 as _; +pub const STATUS_DEVICE_PROTOCOL_ERROR: NTSTATUS = 0xC0000186_u32 as _; +pub const STATUS_DEVICE_REMOVED: NTSTATUS = 0xC00002B6_u32 as _; +pub const STATUS_DEVICE_REQUIRES_CLEANING: NTSTATUS = 0x80000288_u32 as _; +pub const STATUS_DEVICE_RESET_REQUIRED: NTSTATUS = 0x800001B6_u32 as _; +pub const STATUS_DEVICE_SUPPORT_IN_PROGRESS: NTSTATUS = 0x80000030_u32 as _; +pub const STATUS_DEVICE_UNREACHABLE: NTSTATUS = 0xC0000464_u32 as _; +pub const STATUS_DEVICE_UNRESPONSIVE: NTSTATUS = 0xC000050A_u32 as _; +pub const STATUS_DFS_EXIT_PATH_FOUND: NTSTATUS = 0xC000009B_u32 as _; +pub const STATUS_DFS_UNAVAILABLE: NTSTATUS = 0xC000026D_u32 as _; +pub const STATUS_DIF_BINDING_API_NOT_FOUND: NTSTATUS = 0xC0000C7F_u32 as _; +pub const STATUS_DIF_IOCALLBACK_NOT_REPLACED: NTSTATUS = 0xC0000C76_u32 as _; +pub const STATUS_DIF_LIVEDUMP_LIMIT_EXCEEDED: NTSTATUS = 0xC0000C77_u32 as _; +pub const STATUS_DIF_VOLATILE_DRIVER_HOTPATCHED: NTSTATUS = 0xC0000C79_u32 as _; +pub const STATUS_DIF_VOLATILE_DRIVER_IS_NOT_RUNNING: NTSTATUS = 0xC0000C7B_u32 as _; +pub const STATUS_DIF_VOLATILE_INVALID_INFO: NTSTATUS = 0xC0000C7A_u32 as _; +pub const STATUS_DIF_VOLATILE_NOT_ALLOWED: NTSTATUS = 0xC0000C7E_u32 as _; +pub const STATUS_DIF_VOLATILE_PLUGIN_CHANGE_NOT_ALLOWED: NTSTATUS = 0xC0000C7D_u32 as _; +pub const STATUS_DIF_VOLATILE_PLUGIN_IS_NOT_RUNNING: NTSTATUS = 0xC0000C7C_u32 as _; +pub const STATUS_DIF_VOLATILE_SECTION_NOT_LOCKED: NTSTATUS = 0xC0000C78_u32 as _; +pub const STATUS_DIRECTORY_IS_A_REPARSE_POINT: NTSTATUS = 0xC0000281_u32 as _; +pub const STATUS_DIRECTORY_NOT_EMPTY: NTSTATUS = 0xC0000101_u32 as _; +pub const STATUS_DIRECTORY_NOT_RM: NTSTATUS = 0xC0190008_u32 as _; +pub const STATUS_DIRECTORY_NOT_SUPPORTED: NTSTATUS = 0xC000047C_u32 as _; +pub const STATUS_DIRECTORY_SERVICE_REQUIRED: NTSTATUS = 0xC00002B1_u32 as _; +pub const STATUS_DISK_CORRUPT_ERROR: NTSTATUS = 0xC0000032_u32 as _; +pub const STATUS_DISK_FULL: NTSTATUS = 0xC000007F_u32 as _; +pub const STATUS_DISK_OPERATION_FAILED: NTSTATUS = 0xC000016A_u32 as _; +pub const STATUS_DISK_QUOTA_EXCEEDED: NTSTATUS = 0xC0000802_u32 as _; +pub const STATUS_DISK_RECALIBRATE_FAILED: NTSTATUS = 0xC0000169_u32 as _; +pub const STATUS_DISK_REPAIR_DISABLED: NTSTATUS = 0xC0000800_u32 as _; +pub const STATUS_DISK_REPAIR_REDIRECTED: NTSTATUS = 0x40000807_u32 as _; +pub const STATUS_DISK_REPAIR_UNSUCCESSFUL: NTSTATUS = 0xC0000808_u32 as _; +pub const STATUS_DISK_RESET_FAILED: NTSTATUS = 0xC000016B_u32 as _; +pub const STATUS_DISK_RESOURCES_EXHAUSTED: NTSTATUS = 0xC0000461_u32 as _; +pub const STATUS_DLL_INIT_FAILED: NTSTATUS = 0xC0000142_u32 as _; +pub const STATUS_DLL_INIT_FAILED_LOGOFF: NTSTATUS = 0xC000026B_u32 as _; +pub const STATUS_DLL_MIGHT_BE_INCOMPATIBLE: NTSTATUS = 0x8000002C_u32 as _; +pub const STATUS_DLL_MIGHT_BE_INSECURE: NTSTATUS = 0x8000002B_u32 as _; +pub const STATUS_DLL_NOT_FOUND: NTSTATUS = 0xC0000135_u32 as _; +pub const STATUS_DM_OPERATION_LIMIT_EXCEEDED: NTSTATUS = 0xC0370600_u32 as _; +pub const STATUS_DOMAIN_CONTROLLER_NOT_FOUND: NTSTATUS = 0xC0000233_u32 as _; +pub const STATUS_DOMAIN_CTRLR_CONFIG_ERROR: NTSTATUS = 0xC000015E_u32 as _; +pub const STATUS_DOMAIN_EXISTS: NTSTATUS = 0xC00000E0_u32 as _; +pub const STATUS_DOMAIN_LIMIT_EXCEEDED: NTSTATUS = 0xC00000E1_u32 as _; +pub const STATUS_DOMAIN_TRUST_INCONSISTENT: NTSTATUS = 0xC000019B_u32 as _; +pub const STATUS_DRIVERS_LEAKING_LOCKED_PAGES: NTSTATUS = 0x4000002D_u32 as _; +pub const STATUS_DRIVER_BLOCKED: NTSTATUS = 0xC000036C_u32 as _; +pub const STATUS_DRIVER_BLOCKED_CRITICAL: NTSTATUS = 0xC000036B_u32 as _; +pub const STATUS_DRIVER_CANCEL_TIMEOUT: NTSTATUS = 0xC000021E_u32 as _; +pub const STATUS_DRIVER_DATABASE_ERROR: NTSTATUS = 0xC000036D_u32 as _; +pub const STATUS_DRIVER_ENTRYPOINT_NOT_FOUND: NTSTATUS = 0xC0000263_u32 as _; +pub const STATUS_DRIVER_FAILED_PRIOR_UNLOAD: NTSTATUS = 0xC000038E_u32 as _; +pub const STATUS_DRIVER_FAILED_SLEEP: NTSTATUS = 0xC00002C2_u32 as _; +pub const STATUS_DRIVER_INTERNAL_ERROR: NTSTATUS = 0xC0000183_u32 as _; +pub const STATUS_DRIVER_ORDINAL_NOT_FOUND: NTSTATUS = 0xC0000262_u32 as _; +pub const STATUS_DRIVER_PROCESS_TERMINATED: NTSTATUS = 0xC0000450_u32 as _; +pub const STATUS_DRIVER_UNABLE_TO_LOAD: NTSTATUS = 0xC000026C_u32 as _; +pub const STATUS_DS_ADMIN_LIMIT_EXCEEDED: NTSTATUS = 0xC00002C1_u32 as _; +pub const STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER: NTSTATUS = 0xC0000358_u32 as _; +pub const STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS: NTSTATUS = 0xC00002A4_u32 as _; +pub const STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED: NTSTATUS = 0xC00002A3_u32 as _; +pub const STATUS_DS_BUSY: NTSTATUS = 0xC00002A5_u32 as _; +pub const STATUS_DS_CANT_MOD_OBJ_CLASS: NTSTATUS = 0xC00002AE_u32 as _; +pub const STATUS_DS_CANT_MOD_PRIMARYGROUPID: NTSTATUS = 0xC00002D0_u32 as _; +pub const STATUS_DS_CANT_ON_NON_LEAF: NTSTATUS = 0xC00002AC_u32 as _; +pub const STATUS_DS_CANT_ON_RDN: NTSTATUS = 0xC00002AD_u32 as _; +pub const STATUS_DS_CANT_START: NTSTATUS = 0xC00002E1_u32 as _; +pub const STATUS_DS_CROSS_DOM_MOVE_FAILED: NTSTATUS = 0xC00002AF_u32 as _; +pub const STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST: NTSTATUS = 0xC000041A_u32 as _; +pub const STATUS_DS_DOMAIN_RENAME_IN_PROGRESS: NTSTATUS = 0xC0000801_u32 as _; +pub const STATUS_DS_DUPLICATE_ID_FOUND: NTSTATUS = 0xC0000405_u32 as _; +pub const STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST: NTSTATUS = 0xC000041B_u32 as _; +pub const STATUS_DS_GC_NOT_AVAILABLE: NTSTATUS = 0xC00002B0_u32 as _; +pub const STATUS_DS_GC_REQUIRED: NTSTATUS = 0xC00002E4_u32 as _; +pub const STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER: NTSTATUS = 0xC00002DA_u32 as _; +pub const STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER: NTSTATUS = 0xC00002D7_u32 as _; +pub const STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER: NTSTATUS = 0xC00002D8_u32 as _; +pub const STATUS_DS_GROUP_CONVERSION_ERROR: NTSTATUS = 0xC0000406_u32 as _; +pub const STATUS_DS_HAVE_PRIMARY_MEMBERS: NTSTATUS = 0xC00002DC_u32 as _; +pub const STATUS_DS_INCORRECT_ROLE_OWNER: NTSTATUS = 0xC00002A9_u32 as _; +pub const STATUS_DS_INIT_FAILURE: NTSTATUS = 0xC00002E2_u32 as _; +pub const STATUS_DS_INIT_FAILURE_CONSOLE: NTSTATUS = 0xC00002EC_u32 as _; +pub const STATUS_DS_INVALID_ATTRIBUTE_SYNTAX: NTSTATUS = 0xC00002A2_u32 as _; +pub const STATUS_DS_INVALID_GROUP_TYPE: NTSTATUS = 0xC00002D4_u32 as _; +pub const STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER: NTSTATUS = 0xC00002DB_u32 as _; +pub const STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY: NTSTATUS = 0xC00002E5_u32 as _; +pub const STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED: NTSTATUS = 0xC00002E7_u32 as _; +pub const STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY: NTSTATUS = 0x121_u32 as _; +pub const STATUS_DS_NAME_NOT_UNIQUE: NTSTATUS = 0xC0000404_u32 as _; +pub const STATUS_DS_NO_ATTRIBUTE_OR_VALUE: NTSTATUS = 0xC00002A1_u32 as _; +pub const STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS: NTSTATUS = 0xC00002E6_u32 as _; +pub const STATUS_DS_NO_MORE_RIDS: NTSTATUS = 0xC00002A8_u32 as _; +pub const STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN: NTSTATUS = 0xC00002D5_u32 as _; +pub const STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN: NTSTATUS = 0xC00002D6_u32 as _; +pub const STATUS_DS_NO_RIDS_ALLOCATED: NTSTATUS = 0xC00002A7_u32 as _; +pub const STATUS_DS_OBJ_CLASS_VIOLATION: NTSTATUS = 0xC00002AB_u32 as _; +pub const STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS: NTSTATUS = 0xC000A087_u32 as _; +pub const STATUS_DS_OID_NOT_FOUND: NTSTATUS = 0xC000A088_u32 as _; +pub const STATUS_DS_RIDMGR_DISABLED: NTSTATUS = 0xC00002BA_u32 as _; +pub const STATUS_DS_RIDMGR_INIT_ERROR: NTSTATUS = 0xC00002AA_u32 as _; +pub const STATUS_DS_SAM_INIT_FAILURE: NTSTATUS = 0xC00002CB_u32 as _; +pub const STATUS_DS_SAM_INIT_FAILURE_CONSOLE: NTSTATUS = 0xC00002ED_u32 as _; +pub const STATUS_DS_SENSITIVE_GROUP_VIOLATION: NTSTATUS = 0xC00002CD_u32 as _; +pub const STATUS_DS_SHUTTING_DOWN: NTSTATUS = 0x40000370_u32 as _; +pub const STATUS_DS_SRC_SID_EXISTS_IN_FOREST: NTSTATUS = 0xC0000419_u32 as _; +pub const STATUS_DS_UNAVAILABLE: NTSTATUS = 0xC00002A6_u32 as _; +pub const STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER: NTSTATUS = 0xC00002D9_u32 as _; +pub const STATUS_DS_VERSION_CHECK_FAILURE: NTSTATUS = 0xC0000355_u32 as _; +pub const STATUS_DUPLICATE_NAME: NTSTATUS = 0xC00000BD_u32 as _; +pub const STATUS_DUPLICATE_OBJECTID: NTSTATUS = 0xC000022A_u32 as _; +pub const STATUS_DUPLICATE_PRIVILEGES: NTSTATUS = 0xC00001A6_u32 as _; +pub const STATUS_DYNAMIC_CODE_BLOCKED: NTSTATUS = 0xC0000604_u32 as _; +pub const STATUS_EAS_NOT_SUPPORTED: NTSTATUS = 0xC000004F_u32 as _; +pub const STATUS_EA_CORRUPT_ERROR: NTSTATUS = 0xC0000053_u32 as _; +pub const STATUS_EA_LIST_INCONSISTENT: NTSTATUS = 0x80000014_u32 as _; +pub const STATUS_EA_TOO_LARGE: NTSTATUS = 0xC0000050_u32 as _; +pub const STATUS_EFS_ALG_BLOB_TOO_BIG: NTSTATUS = 0xC0000352_u32 as _; +pub const STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION: NTSTATUS = 0xC019003E_u32 as _; +pub const STATUS_ELEVATION_REQUIRED: NTSTATUS = 0xC000042C_u32 as _; +pub const STATUS_EMULATION_BREAKPOINT: NTSTATUS = 0x40000038_u32 as _; +pub const STATUS_EMULATION_SYSCALL: NTSTATUS = 0x40000039_u32 as _; +pub const STATUS_ENCLAVE_FAILURE: NTSTATUS = 0xC000048F_u32 as _; +pub const STATUS_ENCLAVE_IS_TERMINATING: NTSTATUS = 0xC0000512_u32 as _; +pub const STATUS_ENCLAVE_NOT_TERMINATED: NTSTATUS = 0xC0000511_u32 as _; +pub const STATUS_ENCLAVE_VIOLATION: NTSTATUS = 0xC00004A2_u32 as _; +pub const STATUS_ENCOUNTERED_WRITE_IN_PROGRESS: NTSTATUS = 0xC0000433_u32 as _; +pub const STATUS_ENCRYPTED_FILE_NOT_SUPPORTED: NTSTATUS = 0xC00004C3_u32 as _; +pub const STATUS_ENCRYPTED_IO_NOT_POSSIBLE: NTSTATUS = 0xC0000810_u32 as _; +pub const STATUS_ENCRYPTING_METADATA_DISALLOWED: NTSTATUS = 0xC00004B7_u32 as _; +pub const STATUS_ENCRYPTION_DISABLED: NTSTATUS = 0xC00004B6_u32 as _; +pub const STATUS_ENCRYPTION_FAILED: NTSTATUS = 0xC000028A_u32 as _; +pub const STATUS_END_OF_FILE: NTSTATUS = 0xC0000011_u32 as _; +pub const STATUS_END_OF_MEDIA: NTSTATUS = 0x8000001E_u32 as _; +pub const STATUS_ENLISTMENT_NOT_FOUND: NTSTATUS = 0xC0190050_u32 as _; +pub const STATUS_ENLISTMENT_NOT_SUPERIOR: NTSTATUS = 0xC0190033_u32 as _; +pub const STATUS_ENTRYPOINT_NOT_FOUND: NTSTATUS = 0xC0000139_u32 as _; +pub const STATUS_EOF_ON_GHOSTED_RANGE: NTSTATUS = 0xC000A007_u32 as _; +pub const STATUS_EOM_OVERFLOW: NTSTATUS = 0xC0000177_u32 as _; +pub const STATUS_ERROR_PROCESS_NOT_IN_JOB: NTSTATUS = 0xC00001AE_u32 as _; +pub const STATUS_EVALUATION_EXPIRATION: NTSTATUS = 0xC0000268_u32 as _; +pub const STATUS_EVENTLOG_CANT_START: NTSTATUS = 0xC000018F_u32 as _; +pub const STATUS_EVENTLOG_FILE_CHANGED: NTSTATUS = 0xC0000197_u32 as _; +pub const STATUS_EVENTLOG_FILE_CORRUPT: NTSTATUS = 0xC000018E_u32 as _; +pub const STATUS_EVENT_DONE: NTSTATUS = 0x40000012_u32 as _; +pub const STATUS_EVENT_PENDING: NTSTATUS = 0x40000013_u32 as _; +pub const STATUS_EXECUTABLE_MEMORY_WRITE: NTSTATUS = 0xC0000723_u32 as _; +pub const STATUS_EXPIRED_HANDLE: NTSTATUS = 0xC0190060_u32 as _; +pub const STATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN: NTSTATUS = 0xC000046E_u32 as _; +pub const STATUS_EXTERNAL_SYSKEY_NOT_SUPPORTED: NTSTATUS = 0xC00004A1_u32 as _; +pub const STATUS_EXTRANEOUS_INFORMATION: NTSTATUS = 0x80000017_u32 as _; +pub const STATUS_FAILED_DRIVER_ENTRY: NTSTATUS = 0xC0000365_u32 as _; +pub const STATUS_FAILED_STACK_SWITCH: NTSTATUS = 0xC0000373_u32 as _; +pub const STATUS_FAIL_CHECK: NTSTATUS = 0xC0000229_u32 as _; +pub const STATUS_FAIL_FAST_EXCEPTION: NTSTATUS = 0xC0000602_u32 as _; +pub const STATUS_FASTPATH_REJECTED: NTSTATUS = 0xC000A014_u32 as _; +pub const STATUS_FATAL_APP_EXIT: NTSTATUS = 0x40000015_u32 as _; +pub const STATUS_FATAL_MEMORY_EXHAUSTION: NTSTATUS = 0xC00001AD_u32 as _; +pub const STATUS_FATAL_USER_CALLBACK_EXCEPTION: NTSTATUS = 0xC000041D_u32 as _; +pub const STATUS_FILEMARK_DETECTED: NTSTATUS = 0x8000001B_u32 as _; +pub const STATUS_FILES_OPEN: NTSTATUS = 0xC0000107_u32 as _; +pub const STATUS_FILE_CHECKED_OUT: NTSTATUS = 0xC0000901_u32 as _; +pub const STATUS_FILE_CLOSED: NTSTATUS = 0xC0000128_u32 as _; +pub const STATUS_FILE_CORRUPT_ERROR: NTSTATUS = 0xC0000102_u32 as _; +pub const STATUS_FILE_DELETED: NTSTATUS = 0xC0000123_u32 as _; +pub const STATUS_FILE_ENCRYPTED: NTSTATUS = 0xC0000293_u32 as _; +pub const STATUS_FILE_FORCED_CLOSED: NTSTATUS = 0xC00000B6_u32 as _; +pub const STATUS_FILE_HANDLE_REVOKED: NTSTATUS = 0xC0000910_u32 as _; +pub const STATUS_FILE_IDENTITY_NOT_PERSISTENT: NTSTATUS = 0xC0190036_u32 as _; +pub const STATUS_FILE_INVALID: NTSTATUS = 0xC0000098_u32 as _; +pub const STATUS_FILE_IS_A_DIRECTORY: NTSTATUS = 0xC00000BA_u32 as _; +pub const STATUS_FILE_IS_OFFLINE: NTSTATUS = 0xC0000267_u32 as _; +pub const STATUS_FILE_LOCKED_WITH_ONLY_READERS: NTSTATUS = 0x12A_u32 as _; +pub const STATUS_FILE_LOCKED_WITH_WRITERS: NTSTATUS = 0x12B_u32 as _; +pub const STATUS_FILE_LOCK_CONFLICT: NTSTATUS = 0xC0000054_u32 as _; +pub const STATUS_FILE_METADATA_OPTIMIZATION_IN_PROGRESS: NTSTATUS = 0xC00001AB_u32 as _; +pub const STATUS_FILE_NOT_AVAILABLE: NTSTATUS = 0xC0000467_u32 as _; +pub const STATUS_FILE_NOT_ENCRYPTED: NTSTATUS = 0xC0000291_u32 as _; +pub const STATUS_FILE_NOT_SUPPORTED: NTSTATUS = 0xC00004B4_u32 as _; +pub const STATUS_FILE_PROTECTED_UNDER_DPL: NTSTATUS = 0xC00004A3_u32 as _; +pub const STATUS_FILE_RENAMED: NTSTATUS = 0xC00000D5_u32 as _; +pub const STATUS_FILE_SNAP_INVALID_PARAMETER: NTSTATUS = 0xC000F505_u32 as _; +pub const STATUS_FILE_SNAP_IN_PROGRESS: NTSTATUS = 0xC000F500_u32 as _; +pub const STATUS_FILE_SNAP_IO_NOT_COORDINATED: NTSTATUS = 0xC000F503_u32 as _; +pub const STATUS_FILE_SNAP_MODIFY_NOT_SUPPORTED: NTSTATUS = 0xC000F502_u32 as _; +pub const STATUS_FILE_SNAP_UNEXPECTED_ERROR: NTSTATUS = 0xC000F504_u32 as _; +pub const STATUS_FILE_SNAP_USER_SECTION_NOT_SUPPORTED: NTSTATUS = 0xC000F501_u32 as _; +pub const STATUS_FILE_SYSTEM_LIMITATION: NTSTATUS = 0xC0000427_u32 as _; +pub const STATUS_FILE_SYSTEM_VIRTUALIZATION_BUSY: NTSTATUS = 0xC000CE03_u32 as _; +pub const STATUS_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION: NTSTATUS = 0xC000CE05_u32 as _; +pub const STATUS_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT: NTSTATUS = 0xC000CE02_u32 as _; +pub const STATUS_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN: NTSTATUS = 0xC000CE04_u32 as _; +pub const STATUS_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE: NTSTATUS = 0xC000CE01_u32 as _; +pub const STATUS_FILE_TOO_LARGE: NTSTATUS = 0xC0000904_u32 as _; +pub const STATUS_FIRMWARE_IMAGE_INVALID: NTSTATUS = 0xC0000485_u32 as _; +pub const STATUS_FIRMWARE_SLOT_INVALID: NTSTATUS = 0xC0000484_u32 as _; +pub const STATUS_FIRMWARE_UPDATED: NTSTATUS = 0x4000002C_u32 as _; +pub const STATUS_FLOATED_SECTION: NTSTATUS = 0xC019004B_u32 as _; +pub const STATUS_FLOAT_DENORMAL_OPERAND: NTSTATUS = 0xC000008D_u32 as _; +pub const STATUS_FLOAT_DIVIDE_BY_ZERO: NTSTATUS = 0xC000008E_u32 as _; +pub const STATUS_FLOAT_INEXACT_RESULT: NTSTATUS = 0xC000008F_u32 as _; +pub const STATUS_FLOAT_INVALID_OPERATION: NTSTATUS = 0xC0000090_u32 as _; +pub const STATUS_FLOAT_MULTIPLE_FAULTS: NTSTATUS = 0xC00002B4_u32 as _; +pub const STATUS_FLOAT_MULTIPLE_TRAPS: NTSTATUS = 0xC00002B5_u32 as _; +pub const STATUS_FLOAT_OVERFLOW: NTSTATUS = 0xC0000091_u32 as _; +pub const STATUS_FLOAT_STACK_CHECK: NTSTATUS = 0xC0000092_u32 as _; +pub const STATUS_FLOAT_UNDERFLOW: NTSTATUS = 0xC0000093_u32 as _; +pub const STATUS_FLOPPY_BAD_REGISTERS: NTSTATUS = 0xC0000168_u32 as _; +pub const STATUS_FLOPPY_ID_MARK_NOT_FOUND: NTSTATUS = 0xC0000165_u32 as _; +pub const STATUS_FLOPPY_UNKNOWN_ERROR: NTSTATUS = 0xC0000167_u32 as _; +pub const STATUS_FLOPPY_VOLUME: NTSTATUS = 0xC0000164_u32 as _; +pub const STATUS_FLOPPY_WRONG_CYLINDER: NTSTATUS = 0xC0000166_u32 as _; +pub const STATUS_FLT_ALREADY_ENLISTED: NTSTATUS = 0xC01C001B_u32 as _; +pub const STATUS_FLT_BUFFER_TOO_SMALL: NTSTATUS = 0x801C0001_u32 as _; +pub const STATUS_FLT_CBDQ_DISABLED: NTSTATUS = 0xC01C000E_u32 as _; +pub const STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND: NTSTATUS = 0xC01C0016_u32 as _; +pub const STATUS_FLT_CONTEXT_ALREADY_DEFINED: NTSTATUS = 0xC01C0002_u32 as _; +pub const STATUS_FLT_CONTEXT_ALREADY_LINKED: NTSTATUS = 0xC01C001C_u32 as _; +pub const STATUS_FLT_DELETING_OBJECT: NTSTATUS = 0xC01C000B_u32 as _; +pub const STATUS_FLT_DISALLOW_FAST_IO: NTSTATUS = 0xC01C0004_u32 as _; +pub const STATUS_FLT_DISALLOW_FSFILTER_IO: i32 = -1071906812i32; +pub const STATUS_FLT_DO_NOT_ATTACH: NTSTATUS = 0xC01C000F_u32 as _; +pub const STATUS_FLT_DO_NOT_DETACH: NTSTATUS = 0xC01C0010_u32 as _; +pub const STATUS_FLT_DUPLICATE_ENTRY: NTSTATUS = 0xC01C000D_u32 as _; +pub const STATUS_FLT_FILTER_NOT_FOUND: NTSTATUS = 0xC01C0013_u32 as _; +pub const STATUS_FLT_FILTER_NOT_READY: NTSTATUS = 0xC01C0008_u32 as _; +pub const STATUS_FLT_INSTANCE_ALTITUDE_COLLISION: NTSTATUS = 0xC01C0011_u32 as _; +pub const STATUS_FLT_INSTANCE_NAME_COLLISION: NTSTATUS = 0xC01C0012_u32 as _; +pub const STATUS_FLT_INSTANCE_NOT_FOUND: NTSTATUS = 0xC01C0015_u32 as _; +pub const STATUS_FLT_INTERNAL_ERROR: NTSTATUS = 0xC01C000A_u32 as _; +pub const STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST: NTSTATUS = 0xC01C0003_u32 as _; +pub const STATUS_FLT_INVALID_CONTEXT_REGISTRATION: NTSTATUS = 0xC01C0017_u32 as _; +pub const STATUS_FLT_INVALID_NAME_REQUEST: NTSTATUS = 0xC01C0005_u32 as _; +pub const STATUS_FLT_IO_COMPLETE: NTSTATUS = 0x1C0001_u32 as _; +pub const STATUS_FLT_MUST_BE_NONPAGED_POOL: NTSTATUS = 0xC01C000C_u32 as _; +pub const STATUS_FLT_NAME_CACHE_MISS: NTSTATUS = 0xC01C0018_u32 as _; +pub const STATUS_FLT_NOT_INITIALIZED: NTSTATUS = 0xC01C0007_u32 as _; +pub const STATUS_FLT_NOT_SAFE_TO_POST_OPERATION: NTSTATUS = 0xC01C0006_u32 as _; +pub const STATUS_FLT_NO_DEVICE_OBJECT: NTSTATUS = 0xC01C0019_u32 as _; +pub const STATUS_FLT_NO_HANDLER_DEFINED: NTSTATUS = 0xC01C0001_u32 as _; +pub const STATUS_FLT_NO_WAITER_FOR_REPLY: NTSTATUS = 0xC01C0020_u32 as _; +pub const STATUS_FLT_POST_OPERATION_CLEANUP: NTSTATUS = 0xC01C0009_u32 as _; +pub const STATUS_FLT_REGISTRATION_BUSY: NTSTATUS = 0xC01C0023_u32 as _; +pub const STATUS_FLT_VOLUME_ALREADY_MOUNTED: NTSTATUS = 0xC01C001A_u32 as _; +pub const STATUS_FLT_VOLUME_NOT_FOUND: NTSTATUS = 0xC01C0014_u32 as _; +pub const STATUS_FLT_WCOS_NOT_SUPPORTED: NTSTATUS = 0xC01C0024_u32 as _; +pub const STATUS_FORMS_AUTH_REQUIRED: NTSTATUS = 0xC0000905_u32 as _; +pub const STATUS_FOUND_OUT_OF_SCOPE: NTSTATUS = 0xC000022E_u32 as _; +pub const STATUS_FREE_SPACE_TOO_FRAGMENTED: NTSTATUS = 0xC000049B_u32 as _; +pub const STATUS_FREE_VM_NOT_AT_BASE: NTSTATUS = 0xC000009F_u32 as _; +pub const STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY: NTSTATUS = 0x126_u32 as _; +pub const STATUS_FS_DRIVER_REQUIRED: NTSTATUS = 0xC000019C_u32 as _; +pub const STATUS_FS_GUID_MISMATCH: NTSTATUS = 0xC00004DE_u32 as _; +pub const STATUS_FS_METADATA_INCONSISTENT: NTSTATUS = 0xC0000518_u32 as _; +pub const STATUS_FT_DI_SCAN_REQUIRED: NTSTATUS = 0xC000046C_u32 as _; +pub const STATUS_FT_MISSING_MEMBER: NTSTATUS = 0xC000015F_u32 as _; +pub const STATUS_FT_ORPHANING: NTSTATUS = 0xC000016D_u32 as _; +pub const STATUS_FT_READ_FAILURE: NTSTATUS = 0xC00004AB_u32 as _; +pub const STATUS_FT_READ_FROM_COPY: NTSTATUS = 0x40000035_u32 as _; +pub const STATUS_FT_READ_FROM_COPY_FAILURE: NTSTATUS = 0xC00004BF_u32 as _; +pub const STATUS_FT_READ_RECOVERY_FROM_BACKUP: NTSTATUS = 0x4000000A_u32 as _; +pub const STATUS_FT_WRITE_FAILURE: NTSTATUS = 0xC000046B_u32 as _; +pub const STATUS_FT_WRITE_RECOVERY: NTSTATUS = 0x4000000B_u32 as _; +pub const STATUS_FULLSCREEN_MODE: NTSTATUS = 0xC0000159_u32 as _; +pub const STATUS_FVE_ACTION_NOT_ALLOWED: NTSTATUS = 0xC0210009_u32 as _; +pub const STATUS_FVE_AUTH_INVALID_APPLICATION: NTSTATUS = 0xC021001B_u32 as _; +pub const STATUS_FVE_AUTH_INVALID_CONFIG: NTSTATUS = 0xC021001C_u32 as _; +pub const STATUS_FVE_BAD_DATA: NTSTATUS = 0xC021000A_u32 as _; +pub const STATUS_FVE_BAD_INFORMATION: NTSTATUS = 0xC0210002_u32 as _; +pub const STATUS_FVE_BAD_METADATA_POINTER: NTSTATUS = 0xC021001F_u32 as _; +pub const STATUS_FVE_BAD_PARTITION_SIZE: NTSTATUS = 0xC0210005_u32 as _; +pub const STATUS_FVE_CONV_READ_ERROR: NTSTATUS = 0xC021000D_u32 as _; +pub const STATUS_FVE_CONV_RECOVERY_FAILED: NTSTATUS = 0xC0210028_u32 as _; +pub const STATUS_FVE_CONV_WRITE_ERROR: NTSTATUS = 0xC021000E_u32 as _; +pub const STATUS_FVE_DATASET_FULL: NTSTATUS = 0xC0210043_u32 as _; +pub const STATUS_FVE_DEBUGGER_ENABLED: NTSTATUS = 0xC021001D_u32 as _; +pub const STATUS_FVE_DEVICE_LOCKEDOUT: NTSTATUS = 0xC021003B_u32 as _; +pub const STATUS_FVE_DRY_RUN_FAILED: NTSTATUS = 0xC021001E_u32 as _; +pub const STATUS_FVE_EDRIVE_BAND_ENUMERATION_FAILED: NTSTATUS = 0xC0210041_u32 as _; +pub const STATUS_FVE_EDRIVE_DRY_RUN_FAILED: NTSTATUS = 0xC0210038_u32 as _; +pub const STATUS_FVE_ENH_PIN_INVALID: NTSTATUS = 0xC0210031_u32 as _; +pub const STATUS_FVE_FAILED_AUTHENTICATION: NTSTATUS = 0xC0210011_u32 as _; +pub const STATUS_FVE_FAILED_SECTOR_SIZE: NTSTATUS = 0xC0210010_u32 as _; +pub const STATUS_FVE_FAILED_WRONG_FS: NTSTATUS = 0xC0210004_u32 as _; +pub const STATUS_FVE_FS_MOUNTED: NTSTATUS = 0xC0210007_u32 as _; +pub const STATUS_FVE_FS_NOT_EXTENDED: NTSTATUS = 0xC0210006_u32 as _; +pub const STATUS_FVE_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE: NTSTATUS = 0xC0210032_u32 as _; +pub const STATUS_FVE_INVALID_DATUM_TYPE: NTSTATUS = 0xC021002A_u32 as _; +pub const STATUS_FVE_KEYFILE_INVALID: NTSTATUS = 0xC0210014_u32 as _; +pub const STATUS_FVE_KEYFILE_NOT_FOUND: NTSTATUS = 0xC0210013_u32 as _; +pub const STATUS_FVE_KEYFILE_NO_VMK: NTSTATUS = 0xC0210015_u32 as _; +pub const STATUS_FVE_LOCKED_VOLUME: NTSTATUS = 0xC0210000_u32 as _; +pub const STATUS_FVE_METADATA_FULL: NTSTATUS = 0xC0210044_u32 as _; +pub const STATUS_FVE_MOR_FAILED: NTSTATUS = 0xC0210025_u32 as _; +pub const STATUS_FVE_NOT_ALLOWED_ON_CLUSTER: NTSTATUS = 0xC0210035_u32 as _; +pub const STATUS_FVE_NOT_ALLOWED_ON_CSV_STACK: NTSTATUS = 0xC0210034_u32 as _; +pub const STATUS_FVE_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING: NTSTATUS = 0xC0210036_u32 as _; +pub const STATUS_FVE_NOT_DATA_VOLUME: NTSTATUS = 0xC021000C_u32 as _; +pub const STATUS_FVE_NOT_DE_VOLUME: NTSTATUS = 0xC021003D_u32 as _; +pub const STATUS_FVE_NOT_ENCRYPTED: NTSTATUS = 0xC0210001_u32 as _; +pub const STATUS_FVE_NOT_OS_VOLUME: NTSTATUS = 0xC0210012_u32 as _; +pub const STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY: NTSTATUS = 0xC0210024_u32 as _; +pub const STATUS_FVE_NO_FEATURE_LICENSE: NTSTATUS = 0xC0210026_u32 as _; +pub const STATUS_FVE_NO_LICENSE: NTSTATUS = 0xC0210008_u32 as _; +pub const STATUS_FVE_OLD_METADATA_COPY: NTSTATUS = 0xC0210020_u32 as _; +pub const STATUS_FVE_OSV_KSR_NOT_ALLOWED: NTSTATUS = 0xC0210040_u32 as _; +pub const STATUS_FVE_OVERLAPPED_UPDATE: NTSTATUS = 0xC021000F_u32 as _; +pub const STATUS_FVE_PARTIAL_METADATA: NTSTATUS = 0x80210001_u32 as _; +pub const STATUS_FVE_PIN_INVALID: NTSTATUS = 0xC021001A_u32 as _; +pub const STATUS_FVE_POLICY_ON_RDV_EXCLUSION_LIST: NTSTATUS = 0xC0210042_u32 as _; +pub const STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED: NTSTATUS = 0xC0210027_u32 as _; +pub const STATUS_FVE_PROTECTION_CANNOT_BE_DISABLED: NTSTATUS = 0xC021003F_u32 as _; +pub const STATUS_FVE_PROTECTION_DISABLED: NTSTATUS = 0xC021003E_u32 as _; +pub const STATUS_FVE_RAW_ACCESS: NTSTATUS = 0xC0210022_u32 as _; +pub const STATUS_FVE_RAW_BLOCKED: NTSTATUS = 0xC0210023_u32 as _; +pub const STATUS_FVE_REBOOT_REQUIRED: NTSTATUS = 0xC0210021_u32 as _; +pub const STATUS_FVE_SECUREBOOT_CONFIG_CHANGE: NTSTATUS = 0xC021003A_u32 as _; +pub const STATUS_FVE_SECUREBOOT_DISABLED: NTSTATUS = 0xC0210039_u32 as _; +pub const STATUS_FVE_TOO_SMALL: NTSTATUS = 0xC0210003_u32 as _; +pub const STATUS_FVE_TPM_DISABLED: NTSTATUS = 0xC0210016_u32 as _; +pub const STATUS_FVE_TPM_INVALID_PCR: NTSTATUS = 0xC0210018_u32 as _; +pub const STATUS_FVE_TPM_NO_VMK: NTSTATUS = 0xC0210019_u32 as _; +pub const STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO: NTSTATUS = 0xC0210017_u32 as _; +pub const STATUS_FVE_TRANSIENT_STATE: NTSTATUS = 0x80210002_u32 as _; +pub const STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG: NTSTATUS = 0xC0210029_u32 as _; +pub const STATUS_FVE_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT: NTSTATUS = 0xC021003C_u32 as _; +pub const STATUS_FVE_VOLUME_NOT_BOUND: NTSTATUS = 0xC021000B_u32 as _; +pub const STATUS_FVE_VOLUME_TOO_SMALL: NTSTATUS = 0xC0210030_u32 as _; +pub const STATUS_FVE_WIPE_CANCEL_NOT_APPLICABLE: NTSTATUS = 0xC0210037_u32 as _; +pub const STATUS_FVE_WIPE_NOT_ALLOWED_ON_TP_STORAGE: NTSTATUS = 0xC0210033_u32 as _; +pub const STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER: NTSTATUS = 0xC022002C_u32 as _; +pub const STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER: NTSTATUS = 0xC022002D_u32 as _; +pub const STATUS_FWP_ALREADY_EXISTS: NTSTATUS = 0xC0220009_u32 as _; +pub const STATUS_FWP_BUILTIN_OBJECT: NTSTATUS = 0xC0220017_u32 as _; +pub const STATUS_FWP_CALLOUT_NOTIFICATION_FAILED: NTSTATUS = 0xC0220037_u32 as _; +pub const STATUS_FWP_CALLOUT_NOT_FOUND: NTSTATUS = 0xC0220001_u32 as _; +pub const STATUS_FWP_CANNOT_PEND: NTSTATUS = 0xC0220103_u32 as _; +pub const STATUS_FWP_CONDITION_NOT_FOUND: NTSTATUS = 0xC0220002_u32 as _; +pub const STATUS_FWP_CONNECTIONS_DISABLED: NTSTATUS = 0xC0220041_u32 as _; +pub const STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT: NTSTATUS = 0xC022002F_u32 as _; +pub const STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER: NTSTATUS = 0xC022002E_u32 as _; +pub const STATUS_FWP_DROP_NOICMP: NTSTATUS = 0xC0220104_u32 as _; +pub const STATUS_FWP_DUPLICATE_AUTH_METHOD: NTSTATUS = 0xC022003C_u32 as _; +pub const STATUS_FWP_DUPLICATE_CONDITION: NTSTATUS = 0xC022002A_u32 as _; +pub const STATUS_FWP_DUPLICATE_KEYMOD: NTSTATUS = 0xC022002B_u32 as _; +pub const STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS: NTSTATUS = 0xC022000B_u32 as _; +pub const STATUS_FWP_EM_NOT_SUPPORTED: NTSTATUS = 0xC0220032_u32 as _; +pub const STATUS_FWP_FILTER_NOT_FOUND: NTSTATUS = 0xC0220003_u32 as _; +pub const STATUS_FWP_IKEEXT_NOT_RUNNING: NTSTATUS = 0xC0220044_u32 as _; +pub const STATUS_FWP_INCOMPATIBLE_AUTH_METHOD: NTSTATUS = 0xC0220030_u32 as _; +pub const STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM: NTSTATUS = 0xC022003A_u32 as _; +pub const STATUS_FWP_INCOMPATIBLE_DH_GROUP: NTSTATUS = 0xC0220031_u32 as _; +pub const STATUS_FWP_INCOMPATIBLE_LAYER: NTSTATUS = 0xC0220014_u32 as _; +pub const STATUS_FWP_INCOMPATIBLE_SA_STATE: NTSTATUS = 0xC022001B_u32 as _; +pub const STATUS_FWP_INCOMPATIBLE_TXN: NTSTATUS = 0xC0220011_u32 as _; +pub const STATUS_FWP_INJECT_HANDLE_CLOSING: NTSTATUS = 0xC0220101_u32 as _; +pub const STATUS_FWP_INJECT_HANDLE_STALE: NTSTATUS = 0xC0220102_u32 as _; +pub const STATUS_FWP_INVALID_ACTION_TYPE: NTSTATUS = 0xC0220024_u32 as _; +pub const STATUS_FWP_INVALID_AUTH_TRANSFORM: NTSTATUS = 0xC0220038_u32 as _; +pub const STATUS_FWP_INVALID_CIPHER_TRANSFORM: NTSTATUS = 0xC0220039_u32 as _; +pub const STATUS_FWP_INVALID_DNS_NAME: NTSTATUS = 0xC0220042_u32 as _; +pub const STATUS_FWP_INVALID_ENUMERATOR: NTSTATUS = 0xC022001D_u32 as _; +pub const STATUS_FWP_INVALID_FLAGS: NTSTATUS = 0xC022001E_u32 as _; +pub const STATUS_FWP_INVALID_INTERVAL: NTSTATUS = 0xC0220021_u32 as _; +pub const STATUS_FWP_INVALID_NET_MASK: NTSTATUS = 0xC022001F_u32 as _; +pub const STATUS_FWP_INVALID_PARAMETER: NTSTATUS = 0xC0220035_u32 as _; +pub const STATUS_FWP_INVALID_RANGE: NTSTATUS = 0xC0220020_u32 as _; +pub const STATUS_FWP_INVALID_TRANSFORM_COMBINATION: NTSTATUS = 0xC022003B_u32 as _; +pub const STATUS_FWP_INVALID_TUNNEL_ENDPOINT: NTSTATUS = 0xC022003D_u32 as _; +pub const STATUS_FWP_INVALID_WEIGHT: NTSTATUS = 0xC0220025_u32 as _; +pub const STATUS_FWP_IN_USE: NTSTATUS = 0xC022000A_u32 as _; +pub const STATUS_FWP_KEY_DICTATION_INVALID_KEYING_MATERIAL: NTSTATUS = 0xC0220040_u32 as _; +pub const STATUS_FWP_KEY_DICTATOR_ALREADY_REGISTERED: NTSTATUS = 0xC022003F_u32 as _; +pub const STATUS_FWP_KM_CLIENTS_ONLY: NTSTATUS = 0xC0220015_u32 as _; +pub const STATUS_FWP_L2_DRIVER_NOT_READY: NTSTATUS = 0xC022003E_u32 as _; +pub const STATUS_FWP_LAYER_NOT_FOUND: NTSTATUS = 0xC0220004_u32 as _; +pub const STATUS_FWP_LIFETIME_MISMATCH: NTSTATUS = 0xC0220016_u32 as _; +pub const STATUS_FWP_MATCH_TYPE_MISMATCH: NTSTATUS = 0xC0220026_u32 as _; +pub const STATUS_FWP_NET_EVENTS_DISABLED: NTSTATUS = 0xC0220013_u32 as _; +pub const STATUS_FWP_NEVER_MATCH: NTSTATUS = 0xC0220033_u32 as _; +pub const STATUS_FWP_NOTIFICATION_DROPPED: NTSTATUS = 0xC0220019_u32 as _; +pub const STATUS_FWP_NOT_FOUND: NTSTATUS = 0xC0220008_u32 as _; +pub const STATUS_FWP_NO_TXN_IN_PROGRESS: NTSTATUS = 0xC022000D_u32 as _; +pub const STATUS_FWP_NULL_DISPLAY_NAME: NTSTATUS = 0xC0220023_u32 as _; +pub const STATUS_FWP_NULL_POINTER: NTSTATUS = 0xC022001C_u32 as _; +pub const STATUS_FWP_OUT_OF_BOUNDS: NTSTATUS = 0xC0220028_u32 as _; +pub const STATUS_FWP_PROVIDER_CONTEXT_MISMATCH: NTSTATUS = 0xC0220034_u32 as _; +pub const STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND: NTSTATUS = 0xC0220006_u32 as _; +pub const STATUS_FWP_PROVIDER_NOT_FOUND: NTSTATUS = 0xC0220005_u32 as _; +pub const STATUS_FWP_RESERVED: NTSTATUS = 0xC0220029_u32 as _; +pub const STATUS_FWP_SESSION_ABORTED: NTSTATUS = 0xC0220010_u32 as _; +pub const STATUS_FWP_STILL_ON: NTSTATUS = 0xC0220043_u32 as _; +pub const STATUS_FWP_SUBLAYER_NOT_FOUND: NTSTATUS = 0xC0220007_u32 as _; +pub const STATUS_FWP_TCPIP_NOT_READY: NTSTATUS = 0xC0220100_u32 as _; +pub const STATUS_FWP_TIMEOUT: NTSTATUS = 0xC0220012_u32 as _; +pub const STATUS_FWP_TOO_MANY_CALLOUTS: NTSTATUS = 0xC0220018_u32 as _; +pub const STATUS_FWP_TOO_MANY_SUBLAYERS: NTSTATUS = 0xC0220036_u32 as _; +pub const STATUS_FWP_TRAFFIC_MISMATCH: NTSTATUS = 0xC022001A_u32 as _; +pub const STATUS_FWP_TXN_ABORTED: NTSTATUS = 0xC022000F_u32 as _; +pub const STATUS_FWP_TXN_IN_PROGRESS: NTSTATUS = 0xC022000E_u32 as _; +pub const STATUS_FWP_TYPE_MISMATCH: NTSTATUS = 0xC0220027_u32 as _; +pub const STATUS_FWP_WRONG_SESSION: NTSTATUS = 0xC022000C_u32 as _; +pub const STATUS_FWP_ZERO_LENGTH_ARRAY: NTSTATUS = 0xC0220022_u32 as _; +pub const STATUS_GDI_HANDLE_LEAK: NTSTATUS = 0x803F0001_u32 as _; +pub const STATUS_GENERIC_COMMAND_FAILED: NTSTATUS = 0xC0150026_u32 as _; +pub const STATUS_GENERIC_NOT_MAPPED: NTSTATUS = 0xC00000E6_u32 as _; +pub const STATUS_GHOSTED: NTSTATUS = 0x12F_u32 as _; +pub const STATUS_GPIO_CLIENT_INFORMATION_INVALID: NTSTATUS = 0xC000A122_u32 as _; +pub const STATUS_GPIO_INCOMPATIBLE_CONNECT_MODE: NTSTATUS = 0xC000A126_u32 as _; +pub const STATUS_GPIO_INTERRUPT_ALREADY_UNMASKED: NTSTATUS = 0x8000A127_u32 as _; +pub const STATUS_GPIO_INVALID_REGISTRATION_PACKET: NTSTATUS = 0xC000A124_u32 as _; +pub const STATUS_GPIO_OPERATION_DENIED: NTSTATUS = 0xC000A125_u32 as _; +pub const STATUS_GPIO_VERSION_NOT_SUPPORTED: NTSTATUS = 0xC000A123_u32 as _; +pub const STATUS_GRACEFUL_DISCONNECT: NTSTATUS = 0xC0000237_u32 as _; +pub const STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED: NTSTATUS = 0xC01E043B_u32 as _; +pub const STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY: NTSTATUS = 0xC01E0433_u32 as _; +pub const STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE: NTSTATUS = 0xC01E0328_u32 as _; +pub const STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET: NTSTATUS = 0xC01E0329_u32 as _; +pub const STATUS_GRAPHICS_ADAPTER_WAS_RESET: NTSTATUS = 0xC01E0003_u32 as _; +pub const STATUS_GRAPHICS_ALLOCATION_BUSY: NTSTATUS = 0xC01E0102_u32 as _; +pub const STATUS_GRAPHICS_ALLOCATION_CLOSED: NTSTATUS = 0xC01E0112_u32 as _; +pub const STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST: NTSTATUS = 0xC01E0116_u32 as _; +pub const STATUS_GRAPHICS_ALLOCATION_INVALID: NTSTATUS = 0xC01E0106_u32 as _; +pub const STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION: NTSTATUS = 0xC01E035A_u32 as _; +pub const STATUS_GRAPHICS_CANNOTCOLORCONVERT: NTSTATUS = 0xC01E0008_u32 as _; +pub const STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN: NTSTATUS = 0xC01E0343_u32 as _; +pub const STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION: NTSTATUS = 0xC01E0109_u32 as _; +pub const STATUS_GRAPHICS_CANT_LOCK_MEMORY: NTSTATUS = 0xC01E0101_u32 as _; +pub const STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION: NTSTATUS = 0xC01E0111_u32 as _; +pub const STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED: NTSTATUS = 0xC01E0432_u32 as _; +pub const STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON: NTSTATUS = 0xC01E0435_u32 as _; +pub const STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED: NTSTATUS = 0xC01E0434_u32 as _; +pub const STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED: NTSTATUS = 0xC01E0401_u32 as _; +pub const STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET: NTSTATUS = 0xC01E035C_u32 as _; +pub const STATUS_GRAPHICS_COPP_NOT_SUPPORTED: NTSTATUS = 0xC01E0501_u32 as _; +pub const STATUS_GRAPHICS_DATASET_IS_EMPTY: NTSTATUS = 0x401E034B_u32 as _; +pub const STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING: NTSTATUS = 0xC01E0587_u32 as _; +pub const STATUS_GRAPHICS_DDCCI_INVALID_DATA: NTSTATUS = 0xC01E0585_u32 as _; +pub const STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM: NTSTATUS = 0xC01E058B_u32 as _; +pub const STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND: NTSTATUS = 0xC01E0589_u32 as _; +pub const STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH: NTSTATUS = 0xC01E058A_u32 as _; +pub const STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE: NTSTATUS = 0xC01E0586_u32 as _; +pub const STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED: NTSTATUS = 0xC01E0584_u32 as _; +pub const STATUS_GRAPHICS_DEPENDABLE_CHILD_STATUS: NTSTATUS = 0x401E043C_u32 as _; +pub const STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP: NTSTATUS = 0xC01E05E2_u32 as _; +pub const STATUS_GRAPHICS_DRIVER_MISMATCH: NTSTATUS = 0xC01E0009_u32 as _; +pub const STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION: NTSTATUS = 0xC01E0325_u32 as _; +pub const STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET: NTSTATUS = 0xC01E031F_u32 as _; +pub const STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET: NTSTATUS = 0xC01E031D_u32 as _; +pub const STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED: NTSTATUS = 0xC01E0348_u32 as _; +pub const STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE: NTSTATUS = 0xC01E0200_u32 as _; +pub const STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST: NTSTATUS = 0xC01E0581_u32 as _; +pub const STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA: NTSTATUS = 0xC01E0583_u32 as _; +pub const STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA: NTSTATUS = 0xC01E0582_u32 as _; +pub const STATUS_GRAPHICS_I2C_NOT_SUPPORTED: NTSTATUS = 0xC01E0580_u32 as _; +pub const STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT: NTSTATUS = 0xC01E0355_u32 as _; +pub const STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE: NTSTATUS = 0xC01E0436_u32 as _; +pub const STATUS_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN: NTSTATUS = 0xC01E0012_u32 as _; +pub const STATUS_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED: NTSTATUS = 0xC01E0013_u32 as _; +pub const STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER: NTSTATUS = 0xC01E0001_u32 as _; +pub const STATUS_GRAPHICS_INTERNAL_ERROR: NTSTATUS = 0xC01E05E7_u32 as _; +pub const STATUS_GRAPHICS_INVALID_ACTIVE_REGION: NTSTATUS = 0xC01E030B_u32 as _; +pub const STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE: NTSTATUS = 0xC01E0114_u32 as _; +pub const STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE: NTSTATUS = 0xC01E0113_u32 as _; +pub const STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE: NTSTATUS = 0xC01E0110_u32 as _; +pub const STATUS_GRAPHICS_INVALID_CLIENT_TYPE: NTSTATUS = 0xC01E035B_u32 as _; +pub const STATUS_GRAPHICS_INVALID_COLORBASIS: NTSTATUS = 0xC01E033E_u32 as _; +pub const STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE: NTSTATUS = 0xC01E034F_u32 as _; +pub const STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER: NTSTATUS = 0xC01E0002_u32 as _; +pub const STATUS_GRAPHICS_INVALID_DRIVER_MODEL: NTSTATUS = 0xC01E0004_u32 as _; +pub const STATUS_GRAPHICS_INVALID_FREQUENCY: NTSTATUS = 0xC01E030A_u32 as _; +pub const STATUS_GRAPHICS_INVALID_GAMMA_RAMP: NTSTATUS = 0xC01E0347_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM: NTSTATUS = 0xC01E0356_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR: NTSTATUS = 0xC01E032B_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET: NTSTATUS = 0xC01E032A_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN: NTSTATUS = 0xC01E0357_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE: NTSTATUS = 0xC01E031C_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET: NTSTATUS = 0xC01E031B_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT: NTSTATUS = 0xC01E0358_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET: NTSTATUS = 0xC01E0321_u32 as _; +pub const STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE: NTSTATUS = 0xC01E0322_u32 as _; +pub const STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION: NTSTATUS = 0xC01E0345_u32 as _; +pub const STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE: NTSTATUS = 0xC01E034E_u32 as _; +pub const STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL: NTSTATUS = 0xC01E0344_u32 as _; +pub const STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE: NTSTATUS = 0xC01E058C_u32 as _; +pub const STATUS_GRAPHICS_INVALID_PIXELFORMAT: NTSTATUS = 0xC01E033D_u32 as _; +pub const STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE: NTSTATUS = 0xC01E033F_u32 as _; +pub const STATUS_GRAPHICS_INVALID_POINTER: NTSTATUS = 0xC01E05E4_u32 as _; +pub const STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE: NTSTATUS = 0xC01E033A_u32 as _; +pub const STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING: NTSTATUS = 0xC01E0352_u32 as _; +pub const STATUS_GRAPHICS_INVALID_STRIDE: NTSTATUS = 0xC01E033C_u32 as _; +pub const STATUS_GRAPHICS_INVALID_TOTAL_REGION: NTSTATUS = 0xC01E030C_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET: NTSTATUS = 0xC01E0315_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET: NTSTATUS = 0xC01E0316_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE: NTSTATUS = 0xC01E0304_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE: NTSTATUS = 0xC01E0310_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET: NTSTATUS = 0xC01E0305_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE: NTSTATUS = 0xC01E0311_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDPN: NTSTATUS = 0xC01E0303_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH: NTSTATUS = 0xC01E0319_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET: NTSTATUS = 0xC01E0308_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET: NTSTATUS = 0xC01E0309_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE: NTSTATUS = 0xC01E032F_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY: NTSTATUS = 0xC01E0300_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON: NTSTATUS = 0xC01E034D_u32 as _; +pub const STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE: NTSTATUS = 0xC01E033B_u32 as _; +pub const STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED: NTSTATUS = 0xC01E0431_u32 as _; +pub const STATUS_GRAPHICS_LEADLINK_START_DEFERRED: NTSTATUS = 0x401E0437_u32 as _; +pub const STATUS_GRAPHICS_LINK_CONFIGURATION_IN_PROGRESS: NTSTATUS = 0x801E0000_u32 as _; +pub const STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED: NTSTATUS = 0xC01E0359_u32 as _; +pub const STATUS_GRAPHICS_MCA_INTERNAL_ERROR: NTSTATUS = 0xC01E0588_u32 as _; +pub const STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED: NTSTATUS = 0xC01E05E3_u32 as _; +pub const STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET: NTSTATUS = 0xC01E0314_u32 as _; +pub const STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE: NTSTATUS = 0xC01E0324_u32 as _; +pub const STATUS_GRAPHICS_MODE_NOT_IN_MODESET: NTSTATUS = 0xC01E034A_u32 as _; +pub const STATUS_GRAPHICS_MODE_NOT_PINNED: NTSTATUS = 0x401E0307_u32 as _; +pub const STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET: NTSTATUS = 0xC01E032D_u32 as _; +pub const STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE: NTSTATUS = 0xC01E032E_u32 as _; +pub const STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET: NTSTATUS = 0xC01E032C_u32 as _; +pub const STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER: NTSTATUS = 0xC01E0334_u32 as _; +pub const STATUS_GRAPHICS_MONITOR_NOT_CONNECTED: NTSTATUS = 0xC01E0338_u32 as _; +pub const STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS: NTSTATUS = 0xC01E058D_u32 as _; +pub const STATUS_GRAPHICS_MPO_ALLOCATION_UNPINNED: NTSTATUS = 0xC01E0018_u32 as _; +pub const STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED: NTSTATUS = 0xC01E0349_u32 as _; +pub const STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER: NTSTATUS = 0xC01E0430_u32 as _; +pub const STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER: NTSTATUS = 0xC01E0000_u32 as _; +pub const STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER: NTSTATUS = 0xC01E0438_u32 as _; +pub const STATUS_GRAPHICS_NO_ACTIVE_VIDPN: NTSTATUS = 0xC01E0336_u32 as _; +pub const STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS: NTSTATUS = 0xC01E0354_u32 as _; +pub const STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET: NTSTATUS = 0xC01E0333_u32 as _; +pub const STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME: NTSTATUS = 0xC01E05E1_u32 as _; +pub const STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT: NTSTATUS = 0xC01E0341_u32 as _; +pub const STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE: NTSTATUS = 0xC01E05E5_u32 as _; +pub const STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET: NTSTATUS = 0x401E034C_u32 as _; +pub const STATUS_GRAPHICS_NO_PREFERRED_MODE: NTSTATUS = 0x401E031E_u32 as _; +pub const STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN: NTSTATUS = 0xC01E0323_u32 as _; +pub const STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY: NTSTATUS = 0xC01E031A_u32 as _; +pub const STATUS_GRAPHICS_NO_VIDEO_MEMORY: NTSTATUS = 0xC01E0100_u32 as _; +pub const STATUS_GRAPHICS_NO_VIDPNMGR: NTSTATUS = 0xC01E0335_u32 as _; +pub const STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED: NTSTATUS = 0xC01E05E0_u32 as _; +pub const STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE: NTSTATUS = 0xC01E0518_u32 as _; +pub const STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR: NTSTATUS = 0xC01E051E_u32 as _; +pub const STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET: NTSTATUS = 0xC01E0516_u32 as _; +pub const STATUS_GRAPHICS_OPM_INTERNAL_ERROR: NTSTATUS = 0xC01E050B_u32 as _; +pub const STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST: NTSTATUS = 0xC01E0521_u32 as _; +pub const STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS: NTSTATUS = 0xC01E0503_u32 as _; +pub const STATUS_GRAPHICS_OPM_INVALID_HANDLE: NTSTATUS = 0xC01E050C_u32 as _; +pub const STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST: NTSTATUS = 0xC01E051D_u32 as _; +pub const STATUS_GRAPHICS_OPM_INVALID_SRM: NTSTATUS = 0xC01E0512_u32 as _; +pub const STATUS_GRAPHICS_OPM_NOT_SUPPORTED: NTSTATUS = 0xC01E0500_u32 as _; +pub const STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST: NTSTATUS = 0xC01E0505_u32 as _; +pub const STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP: NTSTATUS = 0xC01E0514_u32 as _; +pub const STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA: NTSTATUS = 0xC01E0515_u32 as _; +pub const STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP: NTSTATUS = 0xC01E0513_u32 as _; +pub const STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS: NTSTATUS = 0xC01E051C_u32 as _; +pub const STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS: NTSTATUS = 0xC01E051F_u32 as _; +pub const STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS: NTSTATUS = 0xC01E051A_u32 as _; +pub const STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH: NTSTATUS = 0xC01E0517_u32 as _; +pub const STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED: NTSTATUS = 0xC01E0520_u32 as _; +pub const STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED: NTSTATUS = 0xC01E050F_u32 as _; +pub const STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED: NTSTATUS = 0xC01E0510_u32 as _; +pub const STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL: NTSTATUS = 0xC01E05E6_u32 as _; +pub const STATUS_GRAPHICS_PARTIAL_DATA_POPULATED: NTSTATUS = 0x401E000A_u32 as _; +pub const STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY: NTSTATUS = 0xC01E0313_u32 as _; +pub const STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED: NTSTATUS = 0x401E0351_u32 as _; +pub const STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED: NTSTATUS = 0xC01E0346_u32 as _; +pub const STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY: NTSTATUS = 0xC01E0327_u32 as _; +pub const STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET: NTSTATUS = 0xC01E0312_u32 as _; +pub const STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY: NTSTATUS = 0x401E0439_u32 as _; +pub const STATUS_GRAPHICS_PRESENT_BUFFER_NOT_BOUND: NTSTATUS = 0xC01E0010_u32 as _; +pub const STATUS_GRAPHICS_PRESENT_DENIED: NTSTATUS = 0xC01E0007_u32 as _; +pub const STATUS_GRAPHICS_PRESENT_INVALID_WINDOW: NTSTATUS = 0xC01E000F_u32 as _; +pub const STATUS_GRAPHICS_PRESENT_MODE_CHANGED: NTSTATUS = 0xC01E0005_u32 as _; +pub const STATUS_GRAPHICS_PRESENT_OCCLUDED: NTSTATUS = 0xC01E0006_u32 as _; +pub const STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED: NTSTATUS = 0xC01E000B_u32 as _; +pub const STATUS_GRAPHICS_PRESENT_UNOCCLUDED: NTSTATUS = 0xC01E000C_u32 as _; +pub const STATUS_GRAPHICS_PVP_HFS_FAILED: NTSTATUS = 0xC01E0511_u32 as _; +pub const STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH: NTSTATUS = 0xC01E050E_u32 as _; +pub const STATUS_GRAPHICS_RESOURCES_NOT_RELATED: NTSTATUS = 0xC01E0330_u32 as _; +pub const STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS: NTSTATUS = 0xC01E05E8_u32 as _; +pub const STATUS_GRAPHICS_SKIP_ALLOCATION_PREPARATION: NTSTATUS = 0x401E0201_u32 as _; +pub const STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET: NTSTATUS = 0xC01E0317_u32 as _; +pub const STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE: NTSTATUS = 0xC01E0331_u32 as _; +pub const STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY: NTSTATUS = 0xC01E0339_u32 as _; +pub const STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED: NTSTATUS = 0xC01E0400_u32 as _; +pub const STATUS_GRAPHICS_STALE_MODESET: NTSTATUS = 0xC01E0320_u32 as _; +pub const STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY: NTSTATUS = 0xC01E0337_u32 as _; +pub const STATUS_GRAPHICS_START_DEFERRED: NTSTATUS = 0x401E043A_u32 as _; +pub const STATUS_GRAPHICS_TARGET_ALREADY_IN_SET: NTSTATUS = 0xC01E0318_u32 as _; +pub const STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE: NTSTATUS = 0xC01E0332_u32 as _; +pub const STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY: NTSTATUS = 0xC01E0340_u32 as _; +pub const STATUS_GRAPHICS_TOO_MANY_REFERENCES: NTSTATUS = 0xC01E0103_u32 as _; +pub const STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED: NTSTATUS = 0xC01E0353_u32 as _; +pub const STATUS_GRAPHICS_TRY_AGAIN_LATER: NTSTATUS = 0xC01E0104_u32 as _; +pub const STATUS_GRAPHICS_TRY_AGAIN_NOW: NTSTATUS = 0xC01E0105_u32 as _; +pub const STATUS_GRAPHICS_UAB_NOT_SUPPORTED: NTSTATUS = 0xC01E0502_u32 as _; +pub const STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS: NTSTATUS = 0xC01E0350_u32 as _; +pub const STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS: NTSTATUS = 0x401E042F_u32 as _; +pub const STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE: NTSTATUS = 0xC01E0107_u32 as _; +pub const STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED: NTSTATUS = 0xC01E0108_u32 as _; +pub const STATUS_GRAPHICS_VAIL_STATE_CHANGED: NTSTATUS = 0xC01E0011_u32 as _; +pub const STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES: NTSTATUS = 0xC01E0326_u32 as _; +pub const STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED: NTSTATUS = 0xC01E0306_u32 as _; +pub const STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE: NTSTATUS = 0xC01E0342_u32 as _; +pub const STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED: NTSTATUS = 0xC01E0302_u32 as _; +pub const STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED: NTSTATUS = 0xC01E0301_u32 as _; +pub const STATUS_GRAPHICS_WINDOWDC_NOT_AVAILABLE: NTSTATUS = 0xC01E000D_u32 as _; +pub const STATUS_GRAPHICS_WINDOWLESS_PRESENT_DISABLED: NTSTATUS = 0xC01E000E_u32 as _; +pub const STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE: NTSTATUS = 0xC01E0115_u32 as _; +pub const STATUS_GROUP_EXISTS: NTSTATUS = 0xC0000065_u32 as _; +pub const STATUS_GUARD_PAGE_VIOLATION: NTSTATUS = 0x80000001_u32 as _; +pub const STATUS_GUIDS_EXHAUSTED: NTSTATUS = 0xC0000083_u32 as _; +pub const STATUS_GUID_SUBSTITUTION_MADE: NTSTATUS = 0x8000000C_u32 as _; +pub const STATUS_HANDLES_CLOSED: NTSTATUS = 0x8000000A_u32 as _; +pub const STATUS_HANDLE_NOT_CLOSABLE: NTSTATUS = 0xC0000235_u32 as _; +pub const STATUS_HANDLE_NO_LONGER_VALID: NTSTATUS = 0xC0190028_u32 as _; +pub const STATUS_HANDLE_REVOKED: NTSTATUS = 0xC000A006_u32 as _; +pub const STATUS_HARDWARE_MEMORY_ERROR: NTSTATUS = 0xC0000709_u32 as _; +pub const STATUS_HASH_NOT_PRESENT: NTSTATUS = 0xC000A101_u32 as _; +pub const STATUS_HASH_NOT_SUPPORTED: NTSTATUS = 0xC000A100_u32 as _; +pub const STATUS_HAS_SYSTEM_CRITICAL_FILES: NTSTATUS = 0xC00004BD_u32 as _; +pub const STATUS_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED: NTSTATUS = 0xC0440003_u32 as _; +pub const STATUS_HDAUDIO_EMPTY_CONNECTION_LIST: NTSTATUS = 0xC0440002_u32 as _; +pub const STATUS_HDAUDIO_NO_LOGICAL_DEVICES_CREATED: NTSTATUS = 0xC0440004_u32 as _; +pub const STATUS_HDAUDIO_NULL_LINKED_LIST_ENTRY: NTSTATUS = 0xC0440005_u32 as _; +pub const STATUS_HEAP_CORRUPTION: NTSTATUS = 0xC0000374_u32 as _; +pub const STATUS_HEURISTIC_DAMAGE_POSSIBLE: NTSTATUS = 0x40190001_u32 as _; +pub const STATUS_HIBERNATED: NTSTATUS = 0x4000002A_u32 as _; +pub const STATUS_HIBERNATION_FAILURE: NTSTATUS = 0xC0000411_u32 as _; +pub const STATUS_HIVE_UNLOADED: NTSTATUS = 0xC0000425_u32 as _; +pub const STATUS_HMAC_NOT_SUPPORTED: NTSTATUS = 0xC000A001_u32 as _; +pub const STATUS_HOPLIMIT_EXCEEDED: NTSTATUS = 0xC000A012_u32 as _; +pub const STATUS_HOST_DOWN: NTSTATUS = 0xC0000350_u32 as _; +pub const STATUS_HOST_UNREACHABLE: NTSTATUS = 0xC000023D_u32 as _; +pub const STATUS_HUNG_DISPLAY_DRIVER_THREAD: NTSTATUS = 0xC0000415_u32 as _; +pub const STATUS_HV_ACCESS_DENIED: NTSTATUS = 0xC0350006_u32 as _; +pub const STATUS_HV_ACKNOWLEDGED: NTSTATUS = 0xC0350016_u32 as _; +pub const STATUS_HV_CALL_PENDING: NTSTATUS = 0xC0350079_u32 as _; +pub const STATUS_HV_CPUID_FEATURE_VALIDATION_ERROR: NTSTATUS = 0xC035003C_u32 as _; +pub const STATUS_HV_CPUID_XSAVE_FEATURE_VALIDATION_ERROR: NTSTATUS = 0xC035003D_u32 as _; +pub const STATUS_HV_DEVICE_NOT_IN_DOMAIN: NTSTATUS = 0xC0350076_u32 as _; +pub const STATUS_HV_EVENT_BUFFER_ALREADY_FREED: NTSTATUS = 0xC0350074_u32 as _; +pub const STATUS_HV_FEATURE_UNAVAILABLE: NTSTATUS = 0xC035001E_u32 as _; +pub const STATUS_HV_INACTIVE: NTSTATUS = 0xC035001C_u32 as _; +pub const STATUS_HV_INSUFFICIENT_BUFFER: NTSTATUS = 0xC0350033_u32 as _; +pub const STATUS_HV_INSUFFICIENT_BUFFERS: NTSTATUS = 0xC0350013_u32 as _; +pub const STATUS_HV_INSUFFICIENT_CONTIGUOUS_MEMORY: NTSTATUS = 0xC0350075_u32 as _; +pub const STATUS_HV_INSUFFICIENT_CONTIGUOUS_MEMORY_MIRRORING: NTSTATUS = 0xC0350082_u32 as _; +pub const STATUS_HV_INSUFFICIENT_CONTIGUOUS_ROOT_MEMORY: NTSTATUS = 0xC0350083_u32 as _; +pub const STATUS_HV_INSUFFICIENT_CONTIGUOUS_ROOT_MEMORY_MIRRORING: NTSTATUS = 0xC0350085_u32 as _; +pub const STATUS_HV_INSUFFICIENT_DEVICE_DOMAINS: NTSTATUS = 0xC0350038_u32 as _; +pub const STATUS_HV_INSUFFICIENT_MEMORY: NTSTATUS = 0xC035000B_u32 as _; +pub const STATUS_HV_INSUFFICIENT_MEMORY_MIRRORING: NTSTATUS = 0xC0350081_u32 as _; +pub const STATUS_HV_INSUFFICIENT_ROOT_MEMORY: NTSTATUS = 0xC0350073_u32 as _; +pub const STATUS_HV_INSUFFICIENT_ROOT_MEMORY_MIRRORING: NTSTATUS = 0xC0350084_u32 as _; +pub const STATUS_HV_INVALID_ALIGNMENT: NTSTATUS = 0xC0350004_u32 as _; +pub const STATUS_HV_INVALID_CONNECTION_ID: NTSTATUS = 0xC0350012_u32 as _; +pub const STATUS_HV_INVALID_CPU_GROUP_ID: NTSTATUS = 0xC035006F_u32 as _; +pub const STATUS_HV_INVALID_CPU_GROUP_STATE: NTSTATUS = 0xC0350070_u32 as _; +pub const STATUS_HV_INVALID_DEVICE_ID: NTSTATUS = 0xC0350057_u32 as _; +pub const STATUS_HV_INVALID_DEVICE_STATE: NTSTATUS = 0xC0350058_u32 as _; +pub const STATUS_HV_INVALID_HYPERCALL_CODE: NTSTATUS = 0xC0350002_u32 as _; +pub const STATUS_HV_INVALID_HYPERCALL_INPUT: NTSTATUS = 0xC0350003_u32 as _; +pub const STATUS_HV_INVALID_LP_INDEX: NTSTATUS = 0xC0350041_u32 as _; +pub const STATUS_HV_INVALID_PARAMETER: NTSTATUS = 0xC0350005_u32 as _; +pub const STATUS_HV_INVALID_PARTITION_ID: NTSTATUS = 0xC035000D_u32 as _; +pub const STATUS_HV_INVALID_PARTITION_STATE: NTSTATUS = 0xC0350007_u32 as _; +pub const STATUS_HV_INVALID_PORT_ID: NTSTATUS = 0xC0350011_u32 as _; +pub const STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO: NTSTATUS = 0xC035001A_u32 as _; +pub const STATUS_HV_INVALID_REGISTER_VALUE: NTSTATUS = 0xC0350050_u32 as _; +pub const STATUS_HV_INVALID_SAVE_RESTORE_STATE: NTSTATUS = 0xC0350017_u32 as _; +pub const STATUS_HV_INVALID_SYNIC_STATE: NTSTATUS = 0xC0350018_u32 as _; +pub const STATUS_HV_INVALID_VP_INDEX: NTSTATUS = 0xC035000E_u32 as _; +pub const STATUS_HV_INVALID_VP_STATE: NTSTATUS = 0xC0350015_u32 as _; +pub const STATUS_HV_INVALID_VTL_STATE: NTSTATUS = 0xC0350051_u32 as _; +pub const STATUS_HV_MSR_ACCESS_FAILED: NTSTATUS = 0xC0350080_u32 as _; +pub const STATUS_HV_NESTED_VM_EXIT: NTSTATUS = 0xC0350077_u32 as _; +pub const STATUS_HV_NOT_ACKNOWLEDGED: NTSTATUS = 0xC0350014_u32 as _; +pub const STATUS_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE: NTSTATUS = 0xC0350072_u32 as _; +pub const STATUS_HV_NOT_PRESENT: NTSTATUS = 0xC0351000_u32 as _; +pub const STATUS_HV_NO_DATA: NTSTATUS = 0xC035001B_u32 as _; +pub const STATUS_HV_NO_RESOURCES: NTSTATUS = 0xC035001D_u32 as _; +pub const STATUS_HV_NX_NOT_DETECTED: NTSTATUS = 0xC0350055_u32 as _; +pub const STATUS_HV_OBJECT_IN_USE: NTSTATUS = 0xC0350019_u32 as _; +pub const STATUS_HV_OPERATION_DENIED: NTSTATUS = 0xC0350008_u32 as _; +pub const STATUS_HV_OPERATION_FAILED: NTSTATUS = 0xC0350071_u32 as _; +pub const STATUS_HV_PAGE_REQUEST_INVALID: NTSTATUS = 0xC0350060_u32 as _; +pub const STATUS_HV_PARTITION_TOO_DEEP: NTSTATUS = 0xC035000C_u32 as _; +pub const STATUS_HV_PENDING_PAGE_REQUESTS: NTSTATUS = 0x350059_u32 as _; +pub const STATUS_HV_PROCESSOR_STARTUP_TIMEOUT: NTSTATUS = 0xC035003E_u32 as _; +pub const STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE: NTSTATUS = 0xC035000A_u32 as _; +pub const STATUS_HV_SMX_ENABLED: NTSTATUS = 0xC035003F_u32 as _; +pub const STATUS_HV_UNKNOWN_PROPERTY: NTSTATUS = 0xC0350009_u32 as _; +pub const STATUS_ILLEGAL_CHARACTER: NTSTATUS = 0xC0000161_u32 as _; +pub const STATUS_ILLEGAL_DLL_RELOCATION: NTSTATUS = 0xC0000269_u32 as _; +pub const STATUS_ILLEGAL_ELEMENT_ADDRESS: NTSTATUS = 0xC0000285_u32 as _; +pub const STATUS_ILLEGAL_FLOAT_CONTEXT: NTSTATUS = 0xC000014A_u32 as _; +pub const STATUS_ILLEGAL_FUNCTION: NTSTATUS = 0xC00000AF_u32 as _; +pub const STATUS_ILLEGAL_INSTRUCTION: NTSTATUS = 0xC000001D_u32 as _; +pub const STATUS_ILL_FORMED_PASSWORD: NTSTATUS = 0xC000006B_u32 as _; +pub const STATUS_ILL_FORMED_SERVICE_ENTRY: NTSTATUS = 0xC0000160_u32 as _; +pub const STATUS_IMAGE_ALREADY_LOADED: NTSTATUS = 0xC000010E_u32 as _; +pub const STATUS_IMAGE_ALREADY_LOADED_AS_DLL: NTSTATUS = 0xC000019D_u32 as _; +pub const STATUS_IMAGE_AT_DIFFERENT_BASE: NTSTATUS = 0x40000036_u32 as _; +pub const STATUS_IMAGE_CERT_EXPIRED: NTSTATUS = 0xC0000605_u32 as _; +pub const STATUS_IMAGE_CERT_REVOKED: NTSTATUS = 0xC0000603_u32 as _; +pub const STATUS_IMAGE_CHECKSUM_MISMATCH: NTSTATUS = 0xC0000221_u32 as _; +pub const STATUS_IMAGE_LOADED_AS_PATCH_IMAGE: NTSTATUS = 0xC00004C0_u32 as _; +pub const STATUS_IMAGE_MACHINE_TYPE_MISMATCH: NTSTATUS = 0x4000000E_u32 as _; +pub const STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE: NTSTATUS = 0x40000023_u32 as _; +pub const STATUS_IMAGE_MP_UP_MISMATCH: NTSTATUS = 0xC0000249_u32 as _; +pub const STATUS_IMAGE_NOT_AT_BASE: NTSTATUS = 0x40000003_u32 as _; +pub const STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT: NTSTATUS = 0xC00001A3_u32 as _; +pub const STATUS_IMPLEMENTATION_LIMIT: NTSTATUS = 0xC000042B_u32 as _; +pub const STATUS_INCOMPATIBLE_DRIVER_BLOCKED: NTSTATUS = 0xC0000424_u32 as _; +pub const STATUS_INCOMPATIBLE_FILE_MAP: NTSTATUS = 0xC000004D_u32 as _; +pub const STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING: NTSTATUS = 0xC000019E_u32 as _; +pub const STATUS_INCORRECT_ACCOUNT_TYPE: NTSTATUS = 0xC000A089_u32 as _; +pub const STATUS_INDEX_OUT_OF_BOUNDS: NTSTATUS = 0xC00004D1_u32 as _; +pub const STATUS_INDOUBT_TRANSACTIONS_EXIST: NTSTATUS = 0xC019003A_u32 as _; +pub const STATUS_INFO_LENGTH_MISMATCH: NTSTATUS = 0xC0000004_u32 as _; +pub const STATUS_INSTANCE_NOT_AVAILABLE: NTSTATUS = 0xC00000AB_u32 as _; +pub const STATUS_INSTRUCTION_MISALIGNMENT: NTSTATUS = 0xC00000AA_u32 as _; +pub const STATUS_INSUFFICIENT_LOGON_INFO: NTSTATUS = 0xC0000250_u32 as _; +pub const STATUS_INSUFFICIENT_NVRAM_RESOURCES: NTSTATUS = 0xC0000454_u32 as _; +pub const STATUS_INSUFFICIENT_POWER: NTSTATUS = 0xC00002DE_u32 as _; +pub const STATUS_INSUFFICIENT_RESOURCES: NTSTATUS = 0xC000009A_u32 as _; +pub const STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE: NTSTATUS = 0xC0000416_u32 as _; +pub const STATUS_INSUFFICIENT_VIRTUAL_ADDR_RESOURCES: NTSTATUS = 0xC00004C2_u32 as _; +pub const STATUS_INSUFF_SERVER_RESOURCES: NTSTATUS = 0xC0000205_u32 as _; +pub const STATUS_INTEGER_DIVIDE_BY_ZERO: NTSTATUS = 0xC0000094_u32 as _; +pub const STATUS_INTEGER_OVERFLOW: NTSTATUS = 0xC0000095_u32 as _; +pub const STATUS_INTERMIXED_KERNEL_EA_OPERATION: NTSTATUS = 0xC0000471_u32 as _; +pub const STATUS_INTERNAL_DB_CORRUPTION: NTSTATUS = 0xC00000E4_u32 as _; +pub const STATUS_INTERNAL_DB_ERROR: NTSTATUS = 0xC0000158_u32 as _; +pub const STATUS_INTERNAL_ERROR: NTSTATUS = 0xC00000E5_u32 as _; +pub const STATUS_INTERRUPTED: NTSTATUS = 0xC0000515_u32 as _; +pub const STATUS_INTERRUPT_STILL_CONNECTED: NTSTATUS = 0x128_u32 as _; +pub const STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED: NTSTATUS = 0x127_u32 as _; +pub const STATUS_INVALID_ACCOUNT_NAME: NTSTATUS = 0xC0000062_u32 as _; +pub const STATUS_INVALID_ACE_CONDITION: NTSTATUS = 0xC00001A2_u32 as _; +pub const STATUS_INVALID_ACL: NTSTATUS = 0xC0000077_u32 as _; +pub const STATUS_INVALID_ADDRESS: NTSTATUS = 0xC0000141_u32 as _; +pub const STATUS_INVALID_ADDRESS_COMPONENT: NTSTATUS = 0xC0000207_u32 as _; +pub const STATUS_INVALID_ADDRESS_WILDCARD: NTSTATUS = 0xC0000208_u32 as _; +pub const STATUS_INVALID_BLOCK_LENGTH: NTSTATUS = 0xC0000173_u32 as _; +pub const STATUS_INVALID_BUFFER_SIZE: NTSTATUS = 0xC0000206_u32 as _; +pub const STATUS_INVALID_CAP: NTSTATUS = 0xC0000505_u32 as _; +pub const STATUS_INVALID_CID: NTSTATUS = 0xC000000B_u32 as _; +pub const STATUS_INVALID_COMPUTER_NAME: NTSTATUS = 0xC0000122_u32 as _; +pub const STATUS_INVALID_CONFIG_VALUE: NTSTATUS = 0xC00004E0_u32 as _; +pub const STATUS_INVALID_CONNECTION: NTSTATUS = 0xC0000140_u32 as _; +pub const STATUS_INVALID_CRUNTIME_PARAMETER: NTSTATUS = 0xC0000417_u32 as _; +pub const STATUS_INVALID_DEVICE_OBJECT_PARAMETER: NTSTATUS = 0xC0000369_u32 as _; +pub const STATUS_INVALID_DEVICE_REQUEST: NTSTATUS = 0xC0000010_u32 as _; +pub const STATUS_INVALID_DEVICE_STATE: NTSTATUS = 0xC0000184_u32 as _; +pub const STATUS_INVALID_DISPOSITION: NTSTATUS = 0xC0000026_u32 as _; +pub const STATUS_INVALID_DOMAIN_ROLE: NTSTATUS = 0xC00000DE_u32 as _; +pub const STATUS_INVALID_DOMAIN_STATE: NTSTATUS = 0xC00000DD_u32 as _; +pub const STATUS_INVALID_EA_FLAG: NTSTATUS = 0x80000015_u32 as _; +pub const STATUS_INVALID_EA_NAME: NTSTATUS = 0x80000013_u32 as _; +pub const STATUS_INVALID_EXCEPTION_HANDLER: NTSTATUS = 0xC00001A5_u32 as _; +pub const STATUS_INVALID_FIELD_IN_PARAMETER_LIST: NTSTATUS = 0xC0000475_u32 as _; +pub const STATUS_INVALID_FILE_FOR_SECTION: NTSTATUS = 0xC0000020_u32 as _; +pub const STATUS_INVALID_GROUP_ATTRIBUTES: NTSTATUS = 0xC00000A4_u32 as _; +pub const STATUS_INVALID_HANDLE: NTSTATUS = 0xC0000008_u32 as _; +pub const STATUS_INVALID_HW_PROFILE: NTSTATUS = 0xC0000260_u32 as _; +pub const STATUS_INVALID_IDN_NORMALIZATION: NTSTATUS = 0xC0000716_u32 as _; +pub const STATUS_INVALID_ID_AUTHORITY: NTSTATUS = 0xC0000084_u32 as _; +pub const STATUS_INVALID_IMAGE_FORMAT: NTSTATUS = 0xC000007B_u32 as _; +pub const STATUS_INVALID_IMAGE_HASH: NTSTATUS = 0xC0000428_u32 as _; +pub const STATUS_INVALID_IMAGE_LE_FORMAT: NTSTATUS = 0xC000012E_u32 as _; +pub const STATUS_INVALID_IMAGE_NE_FORMAT: NTSTATUS = 0xC000011B_u32 as _; +pub const STATUS_INVALID_IMAGE_NOT_MZ: NTSTATUS = 0xC000012F_u32 as _; +pub const STATUS_INVALID_IMAGE_PROTECT: NTSTATUS = 0xC0000130_u32 as _; +pub const STATUS_INVALID_IMAGE_WIN_16: NTSTATUS = 0xC0000131_u32 as _; +pub const STATUS_INVALID_IMAGE_WIN_32: NTSTATUS = 0xC0000359_u32 as _; +pub const STATUS_INVALID_IMAGE_WIN_64: NTSTATUS = 0xC000035A_u32 as _; +pub const STATUS_INVALID_IMPORT_OF_NON_DLL: NTSTATUS = 0xC000036F_u32 as _; +pub const STATUS_INVALID_INFO_CLASS: NTSTATUS = 0xC0000003_u32 as _; +pub const STATUS_INVALID_INITIATOR_TARGET_PATH: NTSTATUS = 0xC0000477_u32 as _; +pub const STATUS_INVALID_KERNEL_INFO_VERSION: NTSTATUS = 0xC000A004_u32 as _; +pub const STATUS_INVALID_LABEL: NTSTATUS = 0xC0000446_u32 as _; +pub const STATUS_INVALID_LDT_DESCRIPTOR: NTSTATUS = 0xC000011A_u32 as _; +pub const STATUS_INVALID_LDT_OFFSET: NTSTATUS = 0xC0000119_u32 as _; +pub const STATUS_INVALID_LDT_SIZE: NTSTATUS = 0xC0000118_u32 as _; +pub const STATUS_INVALID_LEVEL: NTSTATUS = 0xC0000148_u32 as _; +pub const STATUS_INVALID_LOCK_RANGE: NTSTATUS = 0xC00001A1_u32 as _; +pub const STATUS_INVALID_LOCK_SEQUENCE: NTSTATUS = 0xC000001E_u32 as _; +pub const STATUS_INVALID_LOGON_HOURS: NTSTATUS = 0xC000006F_u32 as _; +pub const STATUS_INVALID_LOGON_TYPE: NTSTATUS = 0xC000010B_u32 as _; +pub const STATUS_INVALID_MEMBER: NTSTATUS = 0xC000017B_u32 as _; +pub const STATUS_INVALID_MESSAGE: NTSTATUS = 0xC0000702_u32 as _; +pub const STATUS_INVALID_NETWORK_RESPONSE: NTSTATUS = 0xC00000C3_u32 as _; +pub const STATUS_INVALID_OFFSET_ALIGNMENT: NTSTATUS = 0xC0000474_u32 as _; +pub const STATUS_INVALID_OPLOCK_PROTOCOL: NTSTATUS = 0xC00000E3_u32 as _; +pub const STATUS_INVALID_OWNER: NTSTATUS = 0xC000005A_u32 as _; +pub const STATUS_INVALID_PACKAGE_SID_LENGTH: NTSTATUS = 0xC000A202_u32 as _; +pub const STATUS_INVALID_PAGE_PROTECTION: NTSTATUS = 0xC0000045_u32 as _; +pub const STATUS_INVALID_PARAMETER: NTSTATUS = 0xC000000D_u32 as _; +pub const STATUS_INVALID_PARAMETER_1: NTSTATUS = 0xC00000EF_u32 as _; +pub const STATUS_INVALID_PARAMETER_10: NTSTATUS = 0xC00000F8_u32 as _; +pub const STATUS_INVALID_PARAMETER_11: NTSTATUS = 0xC00000F9_u32 as _; +pub const STATUS_INVALID_PARAMETER_12: NTSTATUS = 0xC00000FA_u32 as _; +pub const STATUS_INVALID_PARAMETER_2: NTSTATUS = 0xC00000F0_u32 as _; +pub const STATUS_INVALID_PARAMETER_3: NTSTATUS = 0xC00000F1_u32 as _; +pub const STATUS_INVALID_PARAMETER_4: NTSTATUS = 0xC00000F2_u32 as _; +pub const STATUS_INVALID_PARAMETER_5: NTSTATUS = 0xC00000F3_u32 as _; +pub const STATUS_INVALID_PARAMETER_6: NTSTATUS = 0xC00000F4_u32 as _; +pub const STATUS_INVALID_PARAMETER_7: NTSTATUS = 0xC00000F5_u32 as _; +pub const STATUS_INVALID_PARAMETER_8: NTSTATUS = 0xC00000F6_u32 as _; +pub const STATUS_INVALID_PARAMETER_9: NTSTATUS = 0xC00000F7_u32 as _; +pub const STATUS_INVALID_PARAMETER_MIX: NTSTATUS = 0xC0000030_u32 as _; +pub const STATUS_INVALID_PEP_INFO_VERSION: NTSTATUS = 0xC000A005_u32 as _; +pub const STATUS_INVALID_PIPE_STATE: NTSTATUS = 0xC00000AD_u32 as _; +pub const STATUS_INVALID_PLUGPLAY_DEVICE_PATH: NTSTATUS = 0xC0000261_u32 as _; +pub const STATUS_INVALID_PORT_ATTRIBUTES: NTSTATUS = 0xC000002E_u32 as _; +pub const STATUS_INVALID_PORT_HANDLE: NTSTATUS = 0xC0000042_u32 as _; +pub const STATUS_INVALID_PRIMARY_GROUP: NTSTATUS = 0xC000005B_u32 as _; +pub const STATUS_INVALID_QUOTA_LOWER: NTSTATUS = 0xC0000031_u32 as _; +pub const STATUS_INVALID_READ_MODE: NTSTATUS = 0xC00000B4_u32 as _; +pub const STATUS_INVALID_RUNLEVEL_SETTING: NTSTATUS = 0xC000A142_u32 as _; +pub const STATUS_INVALID_SECURITY_DESCR: NTSTATUS = 0xC0000079_u32 as _; +pub const STATUS_INVALID_SERVER_STATE: NTSTATUS = 0xC00000DC_u32 as _; +pub const STATUS_INVALID_SESSION: NTSTATUS = 0xC0000455_u32 as _; +pub const STATUS_INVALID_SID: NTSTATUS = 0xC0000078_u32 as _; +pub const STATUS_INVALID_SIGNATURE: NTSTATUS = 0xC000A000_u32 as _; +pub const STATUS_INVALID_STATE_TRANSITION: NTSTATUS = 0xC000A003_u32 as _; +pub const STATUS_INVALID_SUB_AUTHORITY: NTSTATUS = 0xC0000076_u32 as _; +pub const STATUS_INVALID_SYSTEM_SERVICE: NTSTATUS = 0xC000001C_u32 as _; +pub const STATUS_INVALID_TASK_INDEX: NTSTATUS = 0xC0000501_u32 as _; +pub const STATUS_INVALID_TASK_NAME: NTSTATUS = 0xC0000500_u32 as _; +pub const STATUS_INVALID_THREAD: NTSTATUS = 0xC000071C_u32 as _; +pub const STATUS_INVALID_TOKEN: NTSTATUS = 0xC0000465_u32 as _; +pub const STATUS_INVALID_TRANSACTION: NTSTATUS = 0xC0190002_u32 as _; +pub const STATUS_INVALID_UNWIND_TARGET: NTSTATUS = 0xC0000029_u32 as _; +pub const STATUS_INVALID_USER_BUFFER: NTSTATUS = 0xC00000E8_u32 as _; +pub const STATUS_INVALID_USER_PRINCIPAL_NAME: NTSTATUS = 0xC000041C_u32 as _; +pub const STATUS_INVALID_VARIANT: NTSTATUS = 0xC0000232_u32 as _; +pub const STATUS_INVALID_VIEW_SIZE: NTSTATUS = 0xC000001F_u32 as _; +pub const STATUS_INVALID_VOLUME_LABEL: NTSTATUS = 0xC0000086_u32 as _; +pub const STATUS_INVALID_WEIGHT: NTSTATUS = 0xC0000458_u32 as _; +pub const STATUS_INVALID_WORKSTATION: NTSTATUS = 0xC0000070_u32 as _; +pub const STATUS_IN_PAGE_ERROR: NTSTATUS = 0xC0000006_u32 as _; +pub const STATUS_IORING_COMPLETION_QUEUE_TOO_BIG: NTSTATUS = 0xC0460005_u32 as _; +pub const STATUS_IORING_COMPLETION_QUEUE_TOO_FULL: NTSTATUS = 0xC0460008_u32 as _; +pub const STATUS_IORING_CORRUPT: NTSTATUS = 0xC0460007_u32 as _; +pub const STATUS_IORING_REQUIRED_FLAG_NOT_SUPPORTED: NTSTATUS = 0xC0460001_u32 as _; +pub const STATUS_IORING_SUBMISSION_QUEUE_FULL: NTSTATUS = 0xC0460002_u32 as _; +pub const STATUS_IORING_SUBMISSION_QUEUE_TOO_BIG: NTSTATUS = 0xC0460004_u32 as _; +pub const STATUS_IORING_SUBMIT_IN_PROGRESS: NTSTATUS = 0xC0460006_u32 as _; +pub const STATUS_IORING_VERSION_NOT_SUPPORTED: NTSTATUS = 0xC0460003_u32 as _; +pub const STATUS_IO_DEVICE_ERROR: NTSTATUS = 0xC0000185_u32 as _; +pub const STATUS_IO_DEVICE_INVALID_DATA: NTSTATUS = 0xC00001B0_u32 as _; +pub const STATUS_IO_OPERATION_TIMEOUT: NTSTATUS = 0xC000047D_u32 as _; +pub const STATUS_IO_PREEMPTED: NTSTATUS = 0xC0510001_u32 as _; +pub const STATUS_IO_PRIVILEGE_FAILED: NTSTATUS = 0xC0000137_u32 as _; +pub const STATUS_IO_REISSUE_AS_CACHED: NTSTATUS = 0xC0040039_u32 as _; +pub const STATUS_IO_REPARSE_DATA_INVALID: NTSTATUS = 0xC0000278_u32 as _; +pub const STATUS_IO_REPARSE_TAG_INVALID: NTSTATUS = 0xC0000276_u32 as _; +pub const STATUS_IO_REPARSE_TAG_MISMATCH: NTSTATUS = 0xC0000277_u32 as _; +pub const STATUS_IO_REPARSE_TAG_NOT_HANDLED: NTSTATUS = 0xC0000279_u32 as _; +pub const STATUS_IO_TIMEOUT: NTSTATUS = 0xC00000B5_u32 as _; +pub const STATUS_IO_UNALIGNED_WRITE: NTSTATUS = 0xC00001B1_u32 as _; +pub const STATUS_IPSEC_AUTH_FIREWALL_DROP: NTSTATUS = 0xC0360008_u32 as _; +pub const STATUS_IPSEC_BAD_SPI: NTSTATUS = 0xC0360001_u32 as _; +pub const STATUS_IPSEC_CLEAR_TEXT_DROP: NTSTATUS = 0xC0360007_u32 as _; +pub const STATUS_IPSEC_DOSP_BLOCK: NTSTATUS = 0xC0368000_u32 as _; +pub const STATUS_IPSEC_DOSP_INVALID_PACKET: NTSTATUS = 0xC0368002_u32 as _; +pub const STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED: NTSTATUS = 0xC0368005_u32 as _; +pub const STATUS_IPSEC_DOSP_MAX_ENTRIES: NTSTATUS = 0xC0368004_u32 as _; +pub const STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES: NTSTATUS = 0xC0368006_u32 as _; +pub const STATUS_IPSEC_DOSP_RECEIVED_MULTICAST: NTSTATUS = 0xC0368001_u32 as _; +pub const STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED: NTSTATUS = 0xC0368003_u32 as _; +pub const STATUS_IPSEC_INTEGRITY_CHECK_FAILED: NTSTATUS = 0xC0360006_u32 as _; +pub const STATUS_IPSEC_INVALID_PACKET: NTSTATUS = 0xC0360005_u32 as _; +pub const STATUS_IPSEC_QUEUE_OVERFLOW: NTSTATUS = 0xC000A010_u32 as _; +pub const STATUS_IPSEC_REPLAY_CHECK_FAILED: NTSTATUS = 0xC0360004_u32 as _; +pub const STATUS_IPSEC_SA_LIFETIME_EXPIRED: NTSTATUS = 0xC0360002_u32 as _; +pub const STATUS_IPSEC_THROTTLE_DROP: NTSTATUS = 0xC0360009_u32 as _; +pub const STATUS_IPSEC_WRONG_SA: NTSTATUS = 0xC0360003_u32 as _; +pub const STATUS_IP_ADDRESS_CONFLICT1: NTSTATUS = 0xC0000254_u32 as _; +pub const STATUS_IP_ADDRESS_CONFLICT2: NTSTATUS = 0xC0000255_u32 as _; +pub const STATUS_ISSUING_CA_UNTRUSTED: NTSTATUS = 0xC000038A_u32 as _; +pub const STATUS_ISSUING_CA_UNTRUSTED_KDC: NTSTATUS = 0xC000040D_u32 as _; +pub const STATUS_JOB_NOT_EMPTY: NTSTATUS = 0xC000050F_u32 as _; +pub const STATUS_JOB_NO_CONTAINER: NTSTATUS = 0xC0000509_u32 as _; +pub const STATUS_JOURNAL_DELETE_IN_PROGRESS: NTSTATUS = 0xC00002B7_u32 as _; +pub const STATUS_JOURNAL_ENTRY_DELETED: NTSTATUS = 0xC00002CF_u32 as _; +pub const STATUS_JOURNAL_NOT_ACTIVE: NTSTATUS = 0xC00002B8_u32 as _; +pub const STATUS_KDC_CERT_EXPIRED: NTSTATUS = 0xC000040E_u32 as _; +pub const STATUS_KDC_CERT_REVOKED: NTSTATUS = 0xC000040F_u32 as _; +pub const STATUS_KDC_INVALID_REQUEST: NTSTATUS = 0xC00002FB_u32 as _; +pub const STATUS_KDC_UNABLE_TO_REFER: NTSTATUS = 0xC00002FC_u32 as _; +pub const STATUS_KDC_UNKNOWN_ETYPE: NTSTATUS = 0xC00002FD_u32 as _; +pub const STATUS_KERNEL_APC: NTSTATUS = 0x100_u32 as _; +pub const STATUS_KERNEL_EXECUTABLE_MEMORY_WRITE: NTSTATUS = 0xC0000724_u32 as _; +pub const STATUS_KEY_DELETED: NTSTATUS = 0xC000017C_u32 as _; +pub const STATUS_KEY_HAS_CHILDREN: NTSTATUS = 0xC0000180_u32 as _; +pub const STATUS_LAPS_ENCRYPTION_REQUIRES_2016_DFL: NTSTATUS = 0xC000A08E_u32 as _; +pub const STATUS_LAPS_LEGACY_SCHEMA_MISSING: NTSTATUS = 0xC000A08C_u32 as _; +pub const STATUS_LAPS_SCHEMA_MISSING: NTSTATUS = 0xC000A08D_u32 as _; +pub const STATUS_LAST_ADMIN: NTSTATUS = 0xC0000069_u32 as _; +pub const STATUS_LICENSE_QUOTA_EXCEEDED: NTSTATUS = 0xC0000259_u32 as _; +pub const STATUS_LICENSE_VIOLATION: NTSTATUS = 0xC000026A_u32 as _; +pub const STATUS_LINK_FAILED: NTSTATUS = 0xC000013E_u32 as _; +pub const STATUS_LINK_TIMEOUT: NTSTATUS = 0xC000013F_u32 as _; +pub const STATUS_LM_CROSS_ENCRYPTION_REQUIRED: NTSTATUS = 0xC000017F_u32 as _; +pub const STATUS_LOCAL_DISCONNECT: NTSTATUS = 0xC000013B_u32 as _; +pub const STATUS_LOCAL_POLICY_MODIFICATION_NOT_SUPPORTED: NTSTATUS = 0xC000A08A_u32 as _; +pub const STATUS_LOCAL_USER_SESSION_KEY: NTSTATUS = 0x40000006_u32 as _; +pub const STATUS_LOCK_NOT_GRANTED: NTSTATUS = 0xC0000055_u32 as _; +pub const STATUS_LOGIN_TIME_RESTRICTION: NTSTATUS = 0xC0000247_u32 as _; +pub const STATUS_LOGIN_WKSTA_RESTRICTION: NTSTATUS = 0xC0000248_u32 as _; +pub const STATUS_LOGON_NOT_GRANTED: NTSTATUS = 0xC0000155_u32 as _; +pub const STATUS_LOGON_SERVER_CONFLICT: NTSTATUS = 0xC0000132_u32 as _; +pub const STATUS_LOGON_SESSION_COLLISION: NTSTATUS = 0xC0000105_u32 as _; +pub const STATUS_LOGON_SESSION_EXISTS: NTSTATUS = 0xC00000EE_u32 as _; +pub const STATUS_LOG_APPENDED_FLUSH_FAILED: NTSTATUS = 0xC01A002F_u32 as _; +pub const STATUS_LOG_ARCHIVE_IN_PROGRESS: NTSTATUS = 0xC01A0021_u32 as _; +pub const STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS: NTSTATUS = 0xC01A0020_u32 as _; +pub const STATUS_LOG_BLOCKS_EXHAUSTED: NTSTATUS = 0xC01A0006_u32 as _; +pub const STATUS_LOG_BLOCK_INCOMPLETE: NTSTATUS = 0xC01A0004_u32 as _; +pub const STATUS_LOG_BLOCK_INVALID: NTSTATUS = 0xC01A000A_u32 as _; +pub const STATUS_LOG_BLOCK_VERSION: NTSTATUS = 0xC01A0009_u32 as _; +pub const STATUS_LOG_CANT_DELETE: NTSTATUS = 0xC01A0011_u32 as _; +pub const STATUS_LOG_CLIENT_ALREADY_REGISTERED: NTSTATUS = 0xC01A0024_u32 as _; +pub const STATUS_LOG_CLIENT_NOT_REGISTERED: NTSTATUS = 0xC01A0025_u32 as _; +pub const STATUS_LOG_CONTAINER_LIMIT_EXCEEDED: NTSTATUS = 0xC01A0012_u32 as _; +pub const STATUS_LOG_CONTAINER_OPEN_FAILED: NTSTATUS = 0xC01A0029_u32 as _; +pub const STATUS_LOG_CONTAINER_READ_FAILED: NTSTATUS = 0xC01A0027_u32 as _; +pub const STATUS_LOG_CONTAINER_STATE_INVALID: NTSTATUS = 0xC01A002A_u32 as _; +pub const STATUS_LOG_CONTAINER_WRITE_FAILED: NTSTATUS = 0xC01A0028_u32 as _; +pub const STATUS_LOG_CORRUPTION_DETECTED: NTSTATUS = 0xC0190030_u32 as _; +pub const STATUS_LOG_DEDICATED: NTSTATUS = 0xC01A001F_u32 as _; +pub const STATUS_LOG_EPHEMERAL: NTSTATUS = 0xC01A0022_u32 as _; +pub const STATUS_LOG_FILE_FULL: NTSTATUS = 0xC0000188_u32 as _; +pub const STATUS_LOG_FULL: NTSTATUS = 0xC01A001D_u32 as _; +pub const STATUS_LOG_FULL_HANDLER_IN_PROGRESS: NTSTATUS = 0xC01A0026_u32 as _; +pub const STATUS_LOG_GROWTH_FAILED: NTSTATUS = 0xC0190019_u32 as _; +pub const STATUS_LOG_HARD_ERROR: NTSTATUS = 0x4000001A_u32 as _; +pub const STATUS_LOG_INCONSISTENT_SECURITY: NTSTATUS = 0xC01A002E_u32 as _; +pub const STATUS_LOG_INVALID_RANGE: NTSTATUS = 0xC01A0005_u32 as _; +pub const STATUS_LOG_METADATA_CORRUPT: NTSTATUS = 0xC01A000D_u32 as _; +pub const STATUS_LOG_METADATA_FLUSH_FAILED: NTSTATUS = 0xC01A002D_u32 as _; +pub const STATUS_LOG_METADATA_INCONSISTENT: NTSTATUS = 0xC01A000F_u32 as _; +pub const STATUS_LOG_METADATA_INVALID: NTSTATUS = 0xC01A000E_u32 as _; +pub const STATUS_LOG_MULTIPLEXED: NTSTATUS = 0xC01A001E_u32 as _; +pub const STATUS_LOG_NOT_ENOUGH_CONTAINERS: NTSTATUS = 0xC01A0023_u32 as _; +pub const STATUS_LOG_NO_RESTART: NTSTATUS = 0x401A000C_u32 as _; +pub const STATUS_LOG_PINNED: NTSTATUS = 0xC01A002C_u32 as _; +pub const STATUS_LOG_PINNED_ARCHIVE_TAIL: NTSTATUS = 0xC01A0018_u32 as _; +pub const STATUS_LOG_PINNED_RESERVATION: NTSTATUS = 0xC01A0030_u32 as _; +pub const STATUS_LOG_POLICY_ALREADY_INSTALLED: NTSTATUS = 0xC01A0014_u32 as _; +pub const STATUS_LOG_POLICY_CONFLICT: NTSTATUS = 0xC01A0017_u32 as _; +pub const STATUS_LOG_POLICY_INVALID: NTSTATUS = 0xC01A0016_u32 as _; +pub const STATUS_LOG_POLICY_NOT_INSTALLED: NTSTATUS = 0xC01A0015_u32 as _; +pub const STATUS_LOG_READ_CONTEXT_INVALID: NTSTATUS = 0xC01A0007_u32 as _; +pub const STATUS_LOG_READ_MODE_INVALID: NTSTATUS = 0xC01A000B_u32 as _; +pub const STATUS_LOG_RECORDS_RESERVED_INVALID: NTSTATUS = 0xC01A001A_u32 as _; +pub const STATUS_LOG_RECORD_NONEXISTENT: NTSTATUS = 0xC01A0019_u32 as _; +pub const STATUS_LOG_RESERVATION_INVALID: NTSTATUS = 0xC01A0010_u32 as _; +pub const STATUS_LOG_RESIZE_INVALID_SIZE: NTSTATUS = 0xC019000B_u32 as _; +pub const STATUS_LOG_RESTART_INVALID: NTSTATUS = 0xC01A0008_u32 as _; +pub const STATUS_LOG_SECTOR_INVALID: NTSTATUS = 0xC01A0001_u32 as _; +pub const STATUS_LOG_SECTOR_PARITY_INVALID: NTSTATUS = 0xC01A0002_u32 as _; +pub const STATUS_LOG_SECTOR_REMAPPED: NTSTATUS = 0xC01A0003_u32 as _; +pub const STATUS_LOG_SPACE_RESERVED_INVALID: NTSTATUS = 0xC01A001B_u32 as _; +pub const STATUS_LOG_START_OF_LOG: NTSTATUS = 0xC01A0013_u32 as _; +pub const STATUS_LOG_STATE_INVALID: NTSTATUS = 0xC01A002B_u32 as _; +pub const STATUS_LOG_TAIL_INVALID: NTSTATUS = 0xC01A001C_u32 as _; +pub const STATUS_LONGJUMP: NTSTATUS = 0x80000026_u32 as _; +pub const STATUS_LOST_MODE_LOGON_RESTRICTION: NTSTATUS = 0xC000030D_u32 as _; +pub const STATUS_LOST_WRITEBEHIND_DATA: NTSTATUS = 0xC0000222_u32 as _; +pub const STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR: NTSTATUS = 0xC000A082_u32 as _; +pub const STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED: NTSTATUS = 0xC000A080_u32 as _; +pub const STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR: NTSTATUS = 0xC000A081_u32 as _; +pub const STATUS_LPAC_ACCESS_DENIED: NTSTATUS = 0xC000A203_u32 as _; +pub const STATUS_LPC_HANDLE_COUNT_EXCEEDED: NTSTATUS = 0xC0000722_u32 as _; +pub const STATUS_LPC_INVALID_CONNECTION_USAGE: NTSTATUS = 0xC0000706_u32 as _; +pub const STATUS_LPC_RECEIVE_BUFFER_EXPECTED: NTSTATUS = 0xC0000705_u32 as _; +pub const STATUS_LPC_REPLY_LOST: NTSTATUS = 0xC0000253_u32 as _; +pub const STATUS_LPC_REQUESTS_NOT_ALLOWED: NTSTATUS = 0xC0000707_u32 as _; +pub const STATUS_LUIDS_EXHAUSTED: NTSTATUS = 0xC0000075_u32 as _; +pub const STATUS_MAGAZINE_NOT_PRESENT: NTSTATUS = 0xC0000286_u32 as _; +pub const STATUS_MAPPED_ALIGNMENT: NTSTATUS = 0xC0000220_u32 as _; +pub const STATUS_MAPPED_FILE_SIZE_ZERO: NTSTATUS = 0xC000011E_u32 as _; +pub const STATUS_MARKED_TO_DISALLOW_WRITES: NTSTATUS = 0xC000048D_u32 as _; +pub const STATUS_MARSHALL_OVERFLOW: NTSTATUS = 0xC0000231_u32 as _; +pub const STATUS_MAX_REFERRALS_EXCEEDED: NTSTATUS = 0xC00002F4_u32 as _; +pub const STATUS_MCA_EXCEPTION: NTSTATUS = 0xC0000713_u32 as _; +pub const STATUS_MCA_OCCURED: NTSTATUS = 0xC000036A_u32 as _; +pub const STATUS_MEDIA_CHANGED: NTSTATUS = 0x8000001C_u32 as _; +pub const STATUS_MEDIA_CHECK: NTSTATUS = 0x80000020_u32 as _; +pub const STATUS_MEDIA_WRITE_PROTECTED: NTSTATUS = 0xC00000A2_u32 as _; +pub const STATUS_MEMBERS_PRIMARY_GROUP: NTSTATUS = 0xC0000127_u32 as _; +pub const STATUS_MEMBER_IN_ALIAS: NTSTATUS = 0xC0000153_u32 as _; +pub const STATUS_MEMBER_IN_GROUP: NTSTATUS = 0xC0000067_u32 as _; +pub const STATUS_MEMBER_NOT_IN_ALIAS: NTSTATUS = 0xC0000152_u32 as _; +pub const STATUS_MEMBER_NOT_IN_GROUP: NTSTATUS = 0xC0000068_u32 as _; +pub const STATUS_MEMORY_NOT_ALLOCATED: NTSTATUS = 0xC00000A0_u32 as _; +pub const STATUS_MESSAGE_LOST: NTSTATUS = 0xC0000701_u32 as _; +pub const STATUS_MESSAGE_NOT_FOUND: NTSTATUS = 0xC0000109_u32 as _; +pub const STATUS_MESSAGE_RETRIEVED: NTSTATUS = 0x4000002E_u32 as _; +pub const STATUS_MFT_TOO_FRAGMENTED: NTSTATUS = 0xC0000304_u32 as _; +pub const STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION: NTSTATUS = 0xC0190024_u32 as _; +pub const STATUS_MISSING_SYSTEMFILE: NTSTATUS = 0xC0000143_u32 as _; +pub const STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM: NTSTATUS = 0xC01D0003_u32 as _; +pub const STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK: NTSTATUS = 0xC01D0009_u32 as _; +pub const STATUS_MONITOR_INVALID_MANUFACTURE_DATE: NTSTATUS = 0xC01D000A_u32 as _; +pub const STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK: NTSTATUS = 0xC01D0006_u32 as _; +pub const STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK: NTSTATUS = 0xC01D0004_u32 as _; +pub const STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK: NTSTATUS = 0xC01D0007_u32 as _; +pub const STATUS_MONITOR_NO_DESCRIPTOR: NTSTATUS = 0xC01D0001_u32 as _; +pub const STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA: NTSTATUS = 0xC01D0008_u32 as _; +pub const STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT: NTSTATUS = 0xC01D0002_u32 as _; +pub const STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED: NTSTATUS = 0xC01D0005_u32 as _; +pub const STATUS_MORE_ENTRIES: NTSTATUS = 0x105_u32 as _; +pub const STATUS_MORE_PROCESSING_REQUIRED: NTSTATUS = 0xC0000016_u32 as _; +pub const STATUS_MOUNT_POINT_NOT_RESOLVED: NTSTATUS = 0xC0000368_u32 as _; +pub const STATUS_MP_PROCESSOR_MISMATCH: NTSTATUS = 0x40000029_u32 as _; +pub const STATUS_MUI_FILE_NOT_FOUND: NTSTATUS = 0xC00B0001_u32 as _; +pub const STATUS_MUI_FILE_NOT_LOADED: NTSTATUS = 0xC00B0006_u32 as _; +pub const STATUS_MUI_INVALID_FILE: NTSTATUS = 0xC00B0002_u32 as _; +pub const STATUS_MUI_INVALID_LOCALE_NAME: NTSTATUS = 0xC00B0004_u32 as _; +pub const STATUS_MUI_INVALID_RC_CONFIG: NTSTATUS = 0xC00B0003_u32 as _; +pub const STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME: NTSTATUS = 0xC00B0005_u32 as _; +pub const STATUS_MULTIPLE_FAULT_VIOLATION: NTSTATUS = 0xC00002E8_u32 as _; +pub const STATUS_MUST_BE_KDC: NTSTATUS = 0xC00002F5_u32 as _; +pub const STATUS_MUTANT_LIMIT_EXCEEDED: NTSTATUS = 0xC0000191_u32 as _; +pub const STATUS_MUTANT_NOT_OWNED: NTSTATUS = 0xC0000046_u32 as _; +pub const STATUS_MUTUAL_AUTHENTICATION_FAILED: NTSTATUS = 0xC00002C3_u32 as _; +pub const STATUS_NAME_TOO_LONG: NTSTATUS = 0xC0000106_u32 as _; +pub const STATUS_NDIS_ADAPTER_NOT_FOUND: NTSTATUS = 0xC0230006_u32 as _; +pub const STATUS_NDIS_ADAPTER_NOT_READY: NTSTATUS = 0xC0230011_u32 as _; +pub const STATUS_NDIS_ADAPTER_REMOVED: NTSTATUS = 0xC0230018_u32 as _; +pub const STATUS_NDIS_ALREADY_MAPPED: NTSTATUS = 0xC023001D_u32 as _; +pub const STATUS_NDIS_BAD_CHARACTERISTICS: NTSTATUS = 0xC0230005_u32 as _; +pub const STATUS_NDIS_BAD_VERSION: NTSTATUS = 0xC0230004_u32 as _; +pub const STATUS_NDIS_BUFFER_TOO_SHORT: NTSTATUS = 0xC0230016_u32 as _; +pub const STATUS_NDIS_CLOSING: NTSTATUS = 0xC0230002_u32 as _; +pub const STATUS_NDIS_DEVICE_FAILED: NTSTATUS = 0xC0230008_u32 as _; +pub const STATUS_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE: NTSTATUS = 0xC0232006_u32 as _; +pub const STATUS_NDIS_DOT11_AP_BAND_NOT_ALLOWED: NTSTATUS = 0xC0232008_u32 as _; +pub const STATUS_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE: NTSTATUS = 0xC0232005_u32 as _; +pub const STATUS_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED: NTSTATUS = 0xC0232007_u32 as _; +pub const STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED: NTSTATUS = 0xC0232000_u32 as _; +pub const STATUS_NDIS_DOT11_MEDIA_IN_USE: NTSTATUS = 0xC0232001_u32 as _; +pub const STATUS_NDIS_DOT11_POWER_STATE_INVALID: NTSTATUS = 0xC0232002_u32 as _; +pub const STATUS_NDIS_ERROR_READING_FILE: NTSTATUS = 0xC023001C_u32 as _; +pub const STATUS_NDIS_FILE_NOT_FOUND: NTSTATUS = 0xC023001B_u32 as _; +pub const STATUS_NDIS_GROUP_ADDRESS_IN_USE: NTSTATUS = 0xC023001A_u32 as _; +pub const STATUS_NDIS_INDICATION_REQUIRED: NTSTATUS = 0x40230001_u32 as _; +pub const STATUS_NDIS_INTERFACE_NOT_FOUND: NTSTATUS = 0xC023002B_u32 as _; +pub const STATUS_NDIS_INVALID_ADDRESS: NTSTATUS = 0xC0230022_u32 as _; +pub const STATUS_NDIS_INVALID_DATA: NTSTATUS = 0xC0230015_u32 as _; +pub const STATUS_NDIS_INVALID_DEVICE_REQUEST: NTSTATUS = 0xC0230010_u32 as _; +pub const STATUS_NDIS_INVALID_LENGTH: NTSTATUS = 0xC0230014_u32 as _; +pub const STATUS_NDIS_INVALID_OID: NTSTATUS = 0xC0230017_u32 as _; +pub const STATUS_NDIS_INVALID_PACKET: NTSTATUS = 0xC023000F_u32 as _; +pub const STATUS_NDIS_INVALID_PORT: NTSTATUS = 0xC023002D_u32 as _; +pub const STATUS_NDIS_INVALID_PORT_STATE: NTSTATUS = 0xC023002E_u32 as _; +pub const STATUS_NDIS_LOW_POWER_STATE: NTSTATUS = 0xC023002F_u32 as _; +pub const STATUS_NDIS_MEDIA_DISCONNECTED: NTSTATUS = 0xC023001F_u32 as _; +pub const STATUS_NDIS_MULTICAST_EXISTS: NTSTATUS = 0xC023000A_u32 as _; +pub const STATUS_NDIS_MULTICAST_FULL: NTSTATUS = 0xC0230009_u32 as _; +pub const STATUS_NDIS_MULTICAST_NOT_FOUND: NTSTATUS = 0xC023000B_u32 as _; +pub const STATUS_NDIS_NOT_SUPPORTED: NTSTATUS = 0xC02300BB_u32 as _; +pub const STATUS_NDIS_NO_QUEUES: NTSTATUS = 0xC0230031_u32 as _; +pub const STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED: NTSTATUS = 0xC0231012_u32 as _; +pub const STATUS_NDIS_OFFLOAD_PATH_REJECTED: NTSTATUS = 0xC0231013_u32 as _; +pub const STATUS_NDIS_OFFLOAD_POLICY: NTSTATUS = 0xC023100F_u32 as _; +pub const STATUS_NDIS_OPEN_FAILED: NTSTATUS = 0xC0230007_u32 as _; +pub const STATUS_NDIS_PAUSED: NTSTATUS = 0xC023002A_u32 as _; +pub const STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL: NTSTATUS = 0xC0232004_u32 as _; +pub const STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL: NTSTATUS = 0xC0232003_u32 as _; +pub const STATUS_NDIS_REINIT_REQUIRED: NTSTATUS = 0xC0230030_u32 as _; +pub const STATUS_NDIS_REQUEST_ABORTED: NTSTATUS = 0xC023000C_u32 as _; +pub const STATUS_NDIS_RESET_IN_PROGRESS: NTSTATUS = 0xC023000D_u32 as _; +pub const STATUS_NDIS_RESOURCE_CONFLICT: NTSTATUS = 0xC023001E_u32 as _; +pub const STATUS_NDIS_UNSUPPORTED_MEDIA: NTSTATUS = 0xC0230019_u32 as _; +pub const STATUS_NDIS_UNSUPPORTED_REVISION: NTSTATUS = 0xC023002C_u32 as _; +pub const STATUS_ND_QUEUE_OVERFLOW: NTSTATUS = 0xC000A011_u32 as _; +pub const STATUS_NEEDS_REGISTRATION: NTSTATUS = 0xC0000489_u32 as _; +pub const STATUS_NEEDS_REMEDIATION: NTSTATUS = 0xC0000462_u32 as _; +pub const STATUS_NETLOGON_NOT_STARTED: NTSTATUS = 0xC0000192_u32 as _; +pub const STATUS_NETWORK_ACCESS_DENIED: NTSTATUS = 0xC00000CA_u32 as _; +pub const STATUS_NETWORK_ACCESS_DENIED_EDP: NTSTATUS = 0xC000048E_u32 as _; +pub const STATUS_NETWORK_AUTHENTICATION_PROMPT_CANCELED: NTSTATUS = 0xC05D0004_u32 as _; +pub const STATUS_NETWORK_BUSY: NTSTATUS = 0xC00000BF_u32 as _; +pub const STATUS_NETWORK_CREDENTIAL_CONFLICT: NTSTATUS = 0xC0000195_u32 as _; +pub const STATUS_NETWORK_NAME_DELETED: NTSTATUS = 0xC00000C9_u32 as _; +pub const STATUS_NETWORK_OPEN_RESTRICTION: NTSTATUS = 0xC0000201_u32 as _; +pub const STATUS_NETWORK_SESSION_EXPIRED: NTSTATUS = 0xC000035C_u32 as _; +pub const STATUS_NETWORK_UNREACHABLE: NTSTATUS = 0xC000023C_u32 as _; +pub const STATUS_NET_WRITE_FAULT: NTSTATUS = 0xC00000D2_u32 as _; +pub const STATUS_NOINTERFACE: NTSTATUS = 0xC00002B9_u32 as _; +pub const STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT: NTSTATUS = 0xC0000198_u32 as _; +pub const STATUS_NOLOGON_SERVER_TRUST_ACCOUNT: NTSTATUS = 0xC000019A_u32 as _; +pub const STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT: NTSTATUS = 0xC0000199_u32 as _; +pub const STATUS_NONCONTINUABLE_EXCEPTION: NTSTATUS = 0xC0000025_u32 as _; +pub const STATUS_NONEXISTENT_EA_ENTRY: NTSTATUS = 0xC0000051_u32 as _; +pub const STATUS_NONEXISTENT_SECTOR: NTSTATUS = 0xC0000015_u32 as _; +pub const STATUS_NONE_MAPPED: NTSTATUS = 0xC0000073_u32 as _; +pub const STATUS_NOTHING_TO_TERMINATE: NTSTATUS = 0x122_u32 as _; +pub const STATUS_NOTIFICATION_GUID_ALREADY_DEFINED: NTSTATUS = 0xC00001A4_u32 as _; +pub const STATUS_NOTIFY_CLEANUP: NTSTATUS = 0x10B_u32 as _; +pub const STATUS_NOTIFY_ENUM_DIR: NTSTATUS = 0x10C_u32 as _; +pub const STATUS_NOT_ALLOWED_ON_SYSTEM_FILE: NTSTATUS = 0xC00001A7_u32 as _; +pub const STATUS_NOT_ALL_ASSIGNED: NTSTATUS = 0x106_u32 as _; +pub const STATUS_NOT_APPCONTAINER: NTSTATUS = 0xC000A200_u32 as _; +pub const STATUS_NOT_A_CLOUD_FILE: NTSTATUS = 0xC000CF07_u32 as _; +pub const STATUS_NOT_A_CLOUD_SYNC_ROOT: NTSTATUS = 0xC000CF1E_u32 as _; +pub const STATUS_NOT_A_DAX_VOLUME: NTSTATUS = 0xC00004B1_u32 as _; +pub const STATUS_NOT_A_DEV_VOLUME: NTSTATUS = 0xC00004DD_u32 as _; +pub const STATUS_NOT_A_DIRECTORY: NTSTATUS = 0xC0000103_u32 as _; +pub const STATUS_NOT_A_REPARSE_POINT: NTSTATUS = 0xC0000275_u32 as _; +pub const STATUS_NOT_A_TIERED_VOLUME: NTSTATUS = 0xC000050D_u32 as _; +pub const STATUS_NOT_CAPABLE: NTSTATUS = 0xC0000429_u32 as _; +pub const STATUS_NOT_CLIENT_SESSION: NTSTATUS = 0xC0000217_u32 as _; +pub const STATUS_NOT_COMMITTED: NTSTATUS = 0xC000002D_u32 as _; +pub const STATUS_NOT_DAX_MAPPABLE: NTSTATUS = 0xC00004B2_u32 as _; +pub const STATUS_NOT_EXPORT_FORMAT: NTSTATUS = 0xC0000292_u32 as _; +pub const STATUS_NOT_FOUND: NTSTATUS = 0xC0000225_u32 as _; +pub const STATUS_NOT_GUI_PROCESS: NTSTATUS = 0xC0000506_u32 as _; +pub const STATUS_NOT_IMPLEMENTED: NTSTATUS = 0xC0000002_u32 as _; +pub const STATUS_NOT_LOCKED: NTSTATUS = 0xC000002A_u32 as _; +pub const STATUS_NOT_LOGON_PROCESS: NTSTATUS = 0xC00000ED_u32 as _; +pub const STATUS_NOT_MAPPED_DATA: NTSTATUS = 0xC0000088_u32 as _; +pub const STATUS_NOT_MAPPED_VIEW: NTSTATUS = 0xC0000019_u32 as _; +pub const STATUS_NOT_READ_FROM_COPY: NTSTATUS = 0xC000046A_u32 as _; +pub const STATUS_NOT_REDUNDANT_STORAGE: NTSTATUS = 0xC0000479_u32 as _; +pub const STATUS_NOT_REGISTRY_FILE: NTSTATUS = 0xC000015C_u32 as _; +pub const STATUS_NOT_SAFE_MODE_DRIVER: NTSTATUS = 0xC000035F_u32 as _; +pub const STATUS_NOT_SAME_DEVICE: NTSTATUS = 0xC00000D4_u32 as _; +pub const STATUS_NOT_SAME_OBJECT: NTSTATUS = 0xC00001AC_u32 as _; +pub const STATUS_NOT_SERVER_SESSION: NTSTATUS = 0xC0000216_u32 as _; +pub const STATUS_NOT_SNAPSHOT_VOLUME: NTSTATUS = 0xC0190047_u32 as _; +pub const STATUS_NOT_SUPPORTED: NTSTATUS = 0xC00000BB_u32 as _; +pub const STATUS_NOT_SUPPORTED_IN_APPCONTAINER: NTSTATUS = 0xC000A201_u32 as _; +pub const STATUS_NOT_SUPPORTED_ON_DAX: NTSTATUS = 0xC000049A_u32 as _; +pub const STATUS_NOT_SUPPORTED_ON_SBS: NTSTATUS = 0xC0000300_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_AUDITING: NTSTATUS = 0xC00004CD_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_BTT: NTSTATUS = 0xC00004B5_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_BYPASSIO: NTSTATUS = 0xC00004C7_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_CACHED_HANDLE: NTSTATUS = 0xC00004D5_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_COMPRESSION: NTSTATUS = 0xC00004CA_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_DEDUPLICATION: NTSTATUS = 0xC00004CC_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_ENCRYPTION: NTSTATUS = 0xC00004C9_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_MONITORING: NTSTATUS = 0xC00004CE_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_REPLICATION: NTSTATUS = 0xC00004CB_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_SNAPSHOT: NTSTATUS = 0xC00004CF_u32 as _; +pub const STATUS_NOT_SUPPORTED_WITH_VIRTUALIZATION: NTSTATUS = 0xC00004D0_u32 as _; +pub const STATUS_NOT_TINY_STREAM: NTSTATUS = 0xC0000226_u32 as _; +pub const STATUS_NO_ACE_CONDITION: NTSTATUS = 0x8000002F_u32 as _; +pub const STATUS_NO_APPLICABLE_APP_LICENSES_FOUND: NTSTATUS = 0xC0EA0001_u32 as _; +pub const STATUS_NO_APPLICATION_PACKAGE: NTSTATUS = 0xC00001AA_u32 as _; +pub const STATUS_NO_BROWSER_SERVERS_FOUND: NTSTATUS = 0xC000021C_u32 as _; +pub const STATUS_NO_BYPASSIO_DRIVER_SUPPORT: NTSTATUS = 0xC00004C8_u32 as _; +pub const STATUS_NO_CALLBACK_ACTIVE: NTSTATUS = 0xC0000258_u32 as _; +pub const STATUS_NO_DATA_DETECTED: NTSTATUS = 0x80000022_u32 as _; +pub const STATUS_NO_EAS_ON_FILE: NTSTATUS = 0xC0000052_u32 as _; +pub const STATUS_NO_EFS: NTSTATUS = 0xC000028E_u32 as _; +pub const STATUS_NO_EVENT_PAIR: NTSTATUS = 0xC000014E_u32 as _; +pub const STATUS_NO_GUID_TRANSLATION: NTSTATUS = 0xC000010C_u32 as _; +pub const STATUS_NO_IMPERSONATION_TOKEN: NTSTATUS = 0xC000005C_u32 as _; +pub const STATUS_NO_INHERITANCE: NTSTATUS = 0x8000000B_u32 as _; +pub const STATUS_NO_IP_ADDRESSES: NTSTATUS = 0xC00002F1_u32 as _; +pub const STATUS_NO_KERB_KEY: NTSTATUS = 0xC0000322_u32 as _; +pub const STATUS_NO_KEY: NTSTATUS = 0xC000090C_u32 as _; +pub const STATUS_NO_LDT: NTSTATUS = 0xC0000117_u32 as _; +pub const STATUS_NO_LINK_TRACKING_IN_TRANSACTION: NTSTATUS = 0xC0190059_u32 as _; +pub const STATUS_NO_LOGON_SERVERS: NTSTATUS = 0xC000005E_u32 as _; +pub const STATUS_NO_LOG_SPACE: NTSTATUS = 0xC000017D_u32 as _; +pub const STATUS_NO_MATCH: NTSTATUS = 0xC0000272_u32 as _; +pub const STATUS_NO_MEDIA: NTSTATUS = 0xC0000178_u32 as _; +pub const STATUS_NO_MEDIA_IN_DEVICE: NTSTATUS = 0xC0000013_u32 as _; +pub const STATUS_NO_MEMORY: NTSTATUS = 0xC0000017_u32 as _; +pub const STATUS_NO_MORE_EAS: NTSTATUS = 0x80000012_u32 as _; +pub const STATUS_NO_MORE_ENTRIES: NTSTATUS = 0x8000001A_u32 as _; +pub const STATUS_NO_MORE_FILES: NTSTATUS = 0x80000006_u32 as _; +pub const STATUS_NO_MORE_MATCHES: NTSTATUS = 0xC0000273_u32 as _; +pub const STATUS_NO_PAGEFILE: NTSTATUS = 0xC0000147_u32 as _; +pub const STATUS_NO_PA_DATA: NTSTATUS = 0xC00002F8_u32 as _; +pub const STATUS_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND: NTSTATUS = 0xC00004A5_u32 as _; +pub const STATUS_NO_QUOTAS_FOR_ACCOUNT: NTSTATUS = 0x10D_u32 as _; +pub const STATUS_NO_RANGES_PROCESSED: NTSTATUS = 0xC0000460_u32 as _; +pub const STATUS_NO_RECOVERY_POLICY: NTSTATUS = 0xC000028D_u32 as _; +pub const STATUS_NO_S4U_PROT_SUPPORT: NTSTATUS = 0xC000040A_u32 as _; +pub const STATUS_NO_SAVEPOINT_WITH_OPEN_FILES: NTSTATUS = 0xC0190048_u32 as _; +pub const STATUS_NO_SECRETS: NTSTATUS = 0xC0000371_u32 as _; +pub const STATUS_NO_SECURITY_CONTEXT: NTSTATUS = 0xC000042D_u32 as _; +pub const STATUS_NO_SECURITY_ON_OBJECT: NTSTATUS = 0xC00000D7_u32 as _; +pub const STATUS_NO_SPOOL_SPACE: NTSTATUS = 0xC00000C7_u32 as _; +pub const STATUS_NO_SUCH_ALIAS: NTSTATUS = 0xC0000151_u32 as _; +pub const STATUS_NO_SUCH_DEVICE: NTSTATUS = 0xC000000E_u32 as _; +pub const STATUS_NO_SUCH_DOMAIN: NTSTATUS = 0xC00000DF_u32 as _; +pub const STATUS_NO_SUCH_FILE: NTSTATUS = 0xC000000F_u32 as _; +pub const STATUS_NO_SUCH_GROUP: NTSTATUS = 0xC0000066_u32 as _; +pub const STATUS_NO_SUCH_MEMBER: NTSTATUS = 0xC000017A_u32 as _; +pub const STATUS_NO_SUCH_PACKAGE: NTSTATUS = 0xC00000FE_u32 as _; +pub const STATUS_NO_SUCH_PRIVILEGE: NTSTATUS = 0xC0000060_u32 as _; +pub const STATUS_NO_TGT_REPLY: NTSTATUS = 0xC00002EF_u32 as _; +pub const STATUS_NO_TOKEN: NTSTATUS = 0xC000007C_u32 as _; +pub const STATUS_NO_TRACKING_SERVICE: NTSTATUS = 0xC000029F_u32 as _; +pub const STATUS_NO_TRUST_LSA_SECRET: NTSTATUS = 0xC000018A_u32 as _; +pub const STATUS_NO_TRUST_SAM_ACCOUNT: NTSTATUS = 0xC000018B_u32 as _; +pub const STATUS_NO_TXF_METADATA: NTSTATUS = 0x80190029_u32 as _; +pub const STATUS_NO_UNICODE_TRANSLATION: NTSTATUS = 0xC0000717_u32 as _; +pub const STATUS_NO_USER_KEYS: NTSTATUS = 0xC0000290_u32 as _; +pub const STATUS_NO_USER_SESSION_KEY: NTSTATUS = 0xC0000202_u32 as _; +pub const STATUS_NO_WORK_DONE: NTSTATUS = 0x80000032_u32 as _; +pub const STATUS_NO_YIELD_PERFORMED: NTSTATUS = 0x40000024_u32 as _; +pub const STATUS_NTLM_BLOCKED: NTSTATUS = 0xC0000418_u32 as _; +pub const STATUS_NT_CROSS_ENCRYPTION_REQUIRED: NTSTATUS = 0xC000015D_u32 as _; +pub const STATUS_NULL_LM_PASSWORD: NTSTATUS = 0x4000000D_u32 as _; +pub const STATUS_OBJECTID_EXISTS: NTSTATUS = 0xC000022B_u32 as _; +pub const STATUS_OBJECTID_NOT_FOUND: NTSTATUS = 0xC00002F0_u32 as _; +pub const STATUS_OBJECT_IS_IMMUTABLE: NTSTATUS = 0xC00004BE_u32 as _; +pub const STATUS_OBJECT_NAME_COLLISION: NTSTATUS = 0xC0000035_u32 as _; +pub const STATUS_OBJECT_NAME_EXISTS: NTSTATUS = 0x40000000_u32 as _; +pub const STATUS_OBJECT_NAME_INVALID: NTSTATUS = 0xC0000033_u32 as _; +pub const STATUS_OBJECT_NAME_NOT_FOUND: NTSTATUS = 0xC0000034_u32 as _; +pub const STATUS_OBJECT_NOT_EXTERNALLY_BACKED: NTSTATUS = 0xC000046D_u32 as _; +pub const STATUS_OBJECT_NO_LONGER_EXISTS: NTSTATUS = 0xC0190021_u32 as _; +pub const STATUS_OBJECT_PATH_INVALID: NTSTATUS = 0xC0000039_u32 as _; +pub const STATUS_OBJECT_PATH_NOT_FOUND: NTSTATUS = 0xC000003A_u32 as _; +pub const STATUS_OBJECT_PATH_SYNTAX_BAD: NTSTATUS = 0xC000003B_u32 as _; +pub const STATUS_OBJECT_TYPE_MISMATCH: NTSTATUS = 0xC0000024_u32 as _; +pub const STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED: NTSTATUS = 0xC000A2A3_u32 as _; +pub const STATUS_OFFLOAD_READ_FLT_NOT_SUPPORTED: NTSTATUS = 0xC000A2A1_u32 as _; +pub const STATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED: NTSTATUS = 0xC000A2A4_u32 as _; +pub const STATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED: NTSTATUS = 0xC000A2A2_u32 as _; +pub const STATUS_ONLY_IF_CONNECTED: NTSTATUS = 0xC00002CC_u32 as _; +pub const STATUS_OPEN_FAILED: NTSTATUS = 0xC0000136_u32 as _; +pub const STATUS_OPERATION_IN_PROGRESS: NTSTATUS = 0xC0000476_u32 as _; +pub const STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION: NTSTATUS = 0xC019005A_u32 as _; +pub const STATUS_OPLOCK_BREAK_IN_PROGRESS: NTSTATUS = 0x108_u32 as _; +pub const STATUS_OPLOCK_HANDLE_CLOSED: NTSTATUS = 0x216_u32 as _; +pub const STATUS_OPLOCK_NOT_GRANTED: NTSTATUS = 0xC00000E2_u32 as _; +pub const STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE: NTSTATUS = 0x215_u32 as _; +pub const STATUS_ORDINAL_NOT_FOUND: NTSTATUS = 0xC0000138_u32 as _; +pub const STATUS_ORPHAN_NAME_EXHAUSTED: NTSTATUS = 0xC000080E_u32 as _; +pub const STATUS_PACKAGE_NOT_AVAILABLE: NTSTATUS = 0xC0000497_u32 as _; +pub const STATUS_PACKAGE_UPDATING: NTSTATUS = 0xC0000469_u32 as _; +pub const STATUS_PAGEFILE_CREATE_FAILED: NTSTATUS = 0xC0000146_u32 as _; +pub const STATUS_PAGEFILE_NOT_SUPPORTED: NTSTATUS = 0xC00004C5_u32 as _; +pub const STATUS_PAGEFILE_QUOTA: NTSTATUS = 0xC0000007_u32 as _; +pub const STATUS_PAGEFILE_QUOTA_EXCEEDED: NTSTATUS = 0xC000012C_u32 as _; +pub const STATUS_PAGE_FAULT_COPY_ON_WRITE: NTSTATUS = 0x112_u32 as _; +pub const STATUS_PAGE_FAULT_DEMAND_ZERO: NTSTATUS = 0x111_u32 as _; +pub const STATUS_PAGE_FAULT_GUARD_PAGE: NTSTATUS = 0x113_u32 as _; +pub const STATUS_PAGE_FAULT_PAGING_FILE: NTSTATUS = 0x114_u32 as _; +pub const STATUS_PAGE_FAULT_RETRY: NTSTATUS = 0x369_u32 as _; +pub const STATUS_PAGE_FAULT_TRANSITION: NTSTATUS = 0x110_u32 as _; +pub const STATUS_PARAMETER_QUOTA_EXCEEDED: NTSTATUS = 0xC0000410_u32 as _; +pub const STATUS_PARITY_ERROR: NTSTATUS = 0xC000002B_u32 as _; +pub const STATUS_PARTIAL_COPY: NTSTATUS = 0x8000000D_u32 as _; +pub const STATUS_PARTITION_FAILURE: NTSTATUS = 0xC0000172_u32 as _; +pub const STATUS_PARTITION_TERMINATING: NTSTATUS = 0xC00004A0_u32 as _; +pub const STATUS_PASSWORD_CHANGE_REQUIRED: NTSTATUS = 0xC000030C_u32 as _; +pub const STATUS_PASSWORD_RESTRICTION: NTSTATUS = 0xC000006C_u32 as _; +pub const STATUS_PATCH_CONFLICT: NTSTATUS = 0xC00004AC_u32 as _; +pub const STATUS_PATCH_DEFERRED: NTSTATUS = 0x40000037_u32 as _; +pub const STATUS_PATCH_NOT_REGISTERED: NTSTATUS = 0xC00004D4_u32 as _; +pub const STATUS_PATH_NOT_COVERED: NTSTATUS = 0xC0000257_u32 as _; +pub const STATUS_PCP_ATTESTATION_CHALLENGE_NOT_SET: NTSTATUS = 0xC0292012_u32 as _; +pub const STATUS_PCP_AUTHENTICATION_FAILED: NTSTATUS = 0xC0292008_u32 as _; +pub const STATUS_PCP_AUTHENTICATION_IGNORED: NTSTATUS = 0xC0292009_u32 as _; +pub const STATUS_PCP_BUFFER_LENGTH_MISMATCH: NTSTATUS = 0xC029201E_u32 as _; +pub const STATUS_PCP_BUFFER_TOO_SMALL: NTSTATUS = 0xC0292006_u32 as _; +pub const STATUS_PCP_CLAIM_TYPE_NOT_SUPPORTED: NTSTATUS = 0xC029201C_u32 as _; +pub const STATUS_PCP_DEVICE_NOT_FOUND: NTSTATUS = 0xC029200D_u32 as _; +pub const STATUS_PCP_DEVICE_NOT_READY: NTSTATUS = 0xC0292001_u32 as _; +pub const STATUS_PCP_ERROR_MASK: NTSTATUS = 0xC0292000_u32 as _; +pub const STATUS_PCP_FLAG_NOT_SUPPORTED: NTSTATUS = 0xC0292004_u32 as _; +pub const STATUS_PCP_IFX_RSA_KEY_CREATION_BLOCKED: NTSTATUS = 0xC029201F_u32 as _; +pub const STATUS_PCP_INTERNAL_ERROR: NTSTATUS = 0xC0292007_u32 as _; +pub const STATUS_PCP_INVALID_HANDLE: NTSTATUS = 0xC0292002_u32 as _; +pub const STATUS_PCP_INVALID_PARAMETER: NTSTATUS = 0xC0292003_u32 as _; +pub const STATUS_PCP_KEY_ALREADY_FINALIZED: NTSTATUS = 0xC0292014_u32 as _; +pub const STATUS_PCP_KEY_HANDLE_INVALIDATED: NTSTATUS = 0xC0292022_u32 as _; +pub const STATUS_PCP_KEY_NOT_AIK: NTSTATUS = 0xC0292019_u32 as _; +pub const STATUS_PCP_KEY_NOT_AUTHENTICATED: NTSTATUS = 0xC0292018_u32 as _; +pub const STATUS_PCP_KEY_NOT_FINALIZED: NTSTATUS = 0xC0292011_u32 as _; +pub const STATUS_PCP_KEY_NOT_LOADED: NTSTATUS = 0xC029200F_u32 as _; +pub const STATUS_PCP_KEY_NOT_SIGNING_KEY: NTSTATUS = 0xC029201A_u32 as _; +pub const STATUS_PCP_KEY_USAGE_POLICY_INVALID: NTSTATUS = 0xC0292016_u32 as _; +pub const STATUS_PCP_KEY_USAGE_POLICY_NOT_SUPPORTED: NTSTATUS = 0xC0292015_u32 as _; +pub const STATUS_PCP_LOCKED_OUT: NTSTATUS = 0xC029201B_u32 as _; +pub const STATUS_PCP_NOT_PCR_BOUND: NTSTATUS = 0xC0292013_u32 as _; +pub const STATUS_PCP_NOT_SUPPORTED: NTSTATUS = 0xC0292005_u32 as _; +pub const STATUS_PCP_NO_KEY_CERTIFICATION: NTSTATUS = 0xC0292010_u32 as _; +pub const STATUS_PCP_POLICY_NOT_FOUND: NTSTATUS = 0xC029200A_u32 as _; +pub const STATUS_PCP_PROFILE_NOT_FOUND: NTSTATUS = 0xC029200B_u32 as _; +pub const STATUS_PCP_RAW_POLICY_NOT_SUPPORTED: NTSTATUS = 0xC0292021_u32 as _; +pub const STATUS_PCP_SOFT_KEY_ERROR: NTSTATUS = 0xC0292017_u32 as _; +pub const STATUS_PCP_TICKET_MISSING: NTSTATUS = 0xC0292020_u32 as _; +pub const STATUS_PCP_TPM_VERSION_NOT_SUPPORTED: NTSTATUS = 0xC029201D_u32 as _; +pub const STATUS_PCP_UNSUPPORTED_PSS_SALT: NTSTATUS = 0x40292023_u32 as _; +pub const STATUS_PCP_VALIDATION_FAILED: NTSTATUS = 0xC029200C_u32 as _; +pub const STATUS_PCP_WRONG_PARENT: NTSTATUS = 0xC029200E_u32 as _; +pub const STATUS_PENDING: NTSTATUS = 0x103_u32 as _; +pub const STATUS_PER_USER_TRUST_QUOTA_EXCEEDED: NTSTATUS = 0xC0000401_u32 as _; +pub const STATUS_PIPE_BROKEN: NTSTATUS = 0xC000014B_u32 as _; +pub const STATUS_PIPE_BUSY: NTSTATUS = 0xC00000AE_u32 as _; +pub const STATUS_PIPE_CLOSING: NTSTATUS = 0xC00000B1_u32 as _; +pub const STATUS_PIPE_CONNECTED: NTSTATUS = 0xC00000B2_u32 as _; +pub const STATUS_PIPE_DISCONNECTED: NTSTATUS = 0xC00000B0_u32 as _; +pub const STATUS_PIPE_EMPTY: NTSTATUS = 0xC00000D9_u32 as _; +pub const STATUS_PIPE_LISTENING: NTSTATUS = 0xC00000B3_u32 as _; +pub const STATUS_PIPE_NOT_AVAILABLE: NTSTATUS = 0xC00000AC_u32 as _; +pub const STATUS_PKINIT_CLIENT_FAILURE: NTSTATUS = 0xC000038C_u32 as _; +pub const STATUS_PKINIT_FAILURE: NTSTATUS = 0xC0000320_u32 as _; +pub const STATUS_PKINIT_NAME_MISMATCH: NTSTATUS = 0xC00002F9_u32 as _; +pub const STATUS_PKU2U_CERT_FAILURE: NTSTATUS = 0xC000042F_u32 as _; +pub const STATUS_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND: NTSTATUS = 0xC0EB0005_u32 as _; +pub const STATUS_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED: NTSTATUS = 0xC0EB0004_u32 as _; +pub const STATUS_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED: NTSTATUS = 0xC0EB0003_u32 as _; +pub const STATUS_PLATFORM_MANIFEST_INVALID: NTSTATUS = 0xC0EB0002_u32 as _; +pub const STATUS_PLATFORM_MANIFEST_NOT_ACTIVE: NTSTATUS = 0xC0EB0006_u32 as _; +pub const STATUS_PLATFORM_MANIFEST_NOT_AUTHORIZED: NTSTATUS = 0xC0EB0001_u32 as _; +pub const STATUS_PLATFORM_MANIFEST_NOT_SIGNED: NTSTATUS = 0xC0EB0007_u32 as _; +pub const STATUS_PLUGPLAY_NO_DEVICE: NTSTATUS = 0xC000025E_u32 as _; +pub const STATUS_PLUGPLAY_QUERY_VETOED: NTSTATUS = 0x80000028_u32 as _; +pub const STATUS_PNP_BAD_MPS_TABLE: NTSTATUS = 0xC0040035_u32 as _; +pub const STATUS_PNP_DEVICE_CONFIGURATION_PENDING: NTSTATUS = 0xC0000495_u32 as _; +pub const STATUS_PNP_DRIVER_CONFIGURATION_INCOMPLETE: NTSTATUS = 0xC0000493_u32 as _; +pub const STATUS_PNP_DRIVER_CONFIGURATION_NOT_FOUND: NTSTATUS = 0xC0000492_u32 as _; +pub const STATUS_PNP_DRIVER_PACKAGE_NOT_FOUND: NTSTATUS = 0xC0000491_u32 as _; +pub const STATUS_PNP_FUNCTION_DRIVER_REQUIRED: NTSTATUS = 0xC0000494_u32 as _; +pub const STATUS_PNP_INVALID_ID: NTSTATUS = 0xC0040038_u32 as _; +pub const STATUS_PNP_IRQ_TRANSLATION_FAILED: NTSTATUS = 0xC0040037_u32 as _; +pub const STATUS_PNP_NO_COMPAT_DRIVERS: NTSTATUS = 0xC0000490_u32 as _; +pub const STATUS_PNP_REBOOT_REQUIRED: NTSTATUS = 0xC00002D2_u32 as _; +pub const STATUS_PNP_RESTART_ENUMERATION: NTSTATUS = 0xC00002CE_u32 as _; +pub const STATUS_PNP_TRANSLATION_FAILED: NTSTATUS = 0xC0040036_u32 as _; +pub const STATUS_POLICY_CONTROLLED_ACCOUNT: NTSTATUS = 0xC000A08B_u32 as _; +pub const STATUS_POLICY_OBJECT_NOT_FOUND: NTSTATUS = 0xC000029A_u32 as _; +pub const STATUS_POLICY_ONLY_IN_DS: NTSTATUS = 0xC000029B_u32 as _; +pub const STATUS_PORT_ALREADY_HAS_COMPLETION_LIST: NTSTATUS = 0xC000071A_u32 as _; +pub const STATUS_PORT_ALREADY_SET: NTSTATUS = 0xC0000048_u32 as _; +pub const STATUS_PORT_CLOSED: NTSTATUS = 0xC0000700_u32 as _; +pub const STATUS_PORT_CONNECTION_REFUSED: NTSTATUS = 0xC0000041_u32 as _; +pub const STATUS_PORT_DISCONNECTED: NTSTATUS = 0xC0000037_u32 as _; +pub const STATUS_PORT_DO_NOT_DISTURB: NTSTATUS = 0xC0000036_u32 as _; +pub const STATUS_PORT_MESSAGE_TOO_LONG: NTSTATUS = 0xC000002F_u32 as _; +pub const STATUS_PORT_NOT_SET: NTSTATUS = 0xC0000353_u32 as _; +pub const STATUS_PORT_UNREACHABLE: NTSTATUS = 0xC000023F_u32 as _; +pub const STATUS_POSSIBLE_DEADLOCK: NTSTATUS = 0xC0000194_u32 as _; +pub const STATUS_POWER_STATE_INVALID: NTSTATUS = 0xC00002D3_u32 as _; +pub const STATUS_PREDEFINED_HANDLE: NTSTATUS = 0x40000016_u32 as _; +pub const STATUS_PRENT4_MACHINE_ACCOUNT: NTSTATUS = 0xC0000357_u32 as _; +pub const STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED: NTSTATUS = 0x10E_u32 as _; +pub const STATUS_PRINT_CANCELLED: NTSTATUS = 0xC00000C8_u32 as _; +pub const STATUS_PRINT_QUEUE_FULL: NTSTATUS = 0xC00000C6_u32 as _; +pub const STATUS_PRIVILEGED_INSTRUCTION: NTSTATUS = 0xC0000096_u32 as _; +pub const STATUS_PRIVILEGE_NOT_HELD: NTSTATUS = 0xC0000061_u32 as _; +pub const STATUS_PROACTIVE_SCAN_IN_PROGRESS: NTSTATUS = 0xC000080F_u32 as _; +pub const STATUS_PROCEDURE_NOT_FOUND: NTSTATUS = 0xC000007A_u32 as _; +pub const STATUS_PROCESS_CLONED: NTSTATUS = 0x129_u32 as _; +pub const STATUS_PROCESS_IN_JOB: NTSTATUS = 0x124_u32 as _; +pub const STATUS_PROCESS_IS_PROTECTED: NTSTATUS = 0xC0000712_u32 as _; +pub const STATUS_PROCESS_IS_TERMINATING: NTSTATUS = 0xC000010A_u32 as _; +pub const STATUS_PROCESS_NOT_IN_JOB: NTSTATUS = 0x123_u32 as _; +pub const STATUS_PROFILING_AT_LIMIT: NTSTATUS = 0xC00000D3_u32 as _; +pub const STATUS_PROFILING_NOT_STARTED: NTSTATUS = 0xC00000B7_u32 as _; +pub const STATUS_PROFILING_NOT_STOPPED: NTSTATUS = 0xC00000B8_u32 as _; +pub const STATUS_PROPSET_NOT_FOUND: NTSTATUS = 0xC0000230_u32 as _; +pub const STATUS_PROTOCOL_NOT_SUPPORTED: NTSTATUS = 0xC000A013_u32 as _; +pub const STATUS_PROTOCOL_UNREACHABLE: NTSTATUS = 0xC000023E_u32 as _; +pub const STATUS_PTE_CHANGED: NTSTATUS = 0xC0000434_u32 as _; +pub const STATUS_PURGE_FAILED: NTSTATUS = 0xC0000435_u32 as _; +pub const STATUS_PWD_HISTORY_CONFLICT: NTSTATUS = 0xC000025C_u32 as _; +pub const STATUS_PWD_TOO_LONG: NTSTATUS = 0xC000027A_u32 as _; +pub const STATUS_PWD_TOO_RECENT: NTSTATUS = 0xC000025B_u32 as _; +pub const STATUS_PWD_TOO_SHORT: NTSTATUS = 0xC000025A_u32 as _; +pub const STATUS_QUERY_STORAGE_ERROR: NTSTATUS = 0x803A0001_u32 as _; +pub const STATUS_QUIC_ALPN_NEG_FAILURE: NTSTATUS = 0xC0240007_u32 as _; +pub const STATUS_QUIC_CONNECTION_IDLE: NTSTATUS = 0xC0240005_u32 as _; +pub const STATUS_QUIC_CONNECTION_TIMEOUT: NTSTATUS = 0xC0240006_u32 as _; +pub const STATUS_QUIC_HANDSHAKE_FAILURE: NTSTATUS = 0xC0240000_u32 as _; +pub const STATUS_QUIC_INTERNAL_ERROR: NTSTATUS = 0xC0240003_u32 as _; +pub const STATUS_QUIC_PROTOCOL_VIOLATION: NTSTATUS = 0xC0240004_u32 as _; +pub const STATUS_QUIC_USER_CANCELED: NTSTATUS = 0xC0240002_u32 as _; +pub const STATUS_QUIC_VER_NEG_FAILURE: NTSTATUS = 0xC0240001_u32 as _; +pub const STATUS_QUOTA_ACTIVITY: NTSTATUS = 0xC000048A_u32 as _; +pub const STATUS_QUOTA_EXCEEDED: NTSTATUS = 0xC0000044_u32 as _; +pub const STATUS_QUOTA_LIST_INCONSISTENT: NTSTATUS = 0xC0000266_u32 as _; +pub const STATUS_QUOTA_NOT_ENABLED: NTSTATUS = 0xC00001A9_u32 as _; +pub const STATUS_RANGE_LIST_CONFLICT: NTSTATUS = 0xC0000282_u32 as _; +pub const STATUS_RANGE_NOT_FOUND: NTSTATUS = 0xC000028C_u32 as _; +pub const STATUS_RANGE_NOT_LOCKED: NTSTATUS = 0xC000007E_u32 as _; +pub const STATUS_RDBSS_CONTINUE_OPERATION: NTSTATUS = 0xC0410002_u32 as _; +pub const STATUS_RDBSS_POST_OPERATION: NTSTATUS = 0xC0410003_u32 as _; +pub const STATUS_RDBSS_RESTART_OPERATION: NTSTATUS = 0xC0410001_u32 as _; +pub const STATUS_RDBSS_RETRY_LOOKUP: NTSTATUS = 0xC0410004_u32 as _; +pub const STATUS_RDP_PROTOCOL_ERROR: NTSTATUS = 0xC00A0032_u32 as _; +pub const STATUS_RECEIVE_EXPEDITED: NTSTATUS = 0x40000010_u32 as _; +pub const STATUS_RECEIVE_PARTIAL: NTSTATUS = 0x4000000F_u32 as _; +pub const STATUS_RECEIVE_PARTIAL_EXPEDITED: NTSTATUS = 0x40000011_u32 as _; +pub const STATUS_RECOVERABLE_BUGCHECK: NTSTATUS = 0x80000034_u32 as _; +pub const STATUS_RECOVERY_FAILURE: NTSTATUS = 0xC0000227_u32 as _; +pub const STATUS_RECOVERY_NOT_NEEDED: NTSTATUS = 0x40190034_u32 as _; +pub const STATUS_RECURSIVE_DISPATCH: NTSTATUS = 0xC0000704_u32 as _; +pub const STATUS_REDIRECTOR_HAS_OPEN_HANDLES: NTSTATUS = 0x80000023_u32 as _; +pub const STATUS_REDIRECTOR_NOT_STARTED: NTSTATUS = 0xC00000FB_u32 as _; +pub const STATUS_REDIRECTOR_PAUSED: NTSTATUS = 0xC00000D1_u32 as _; +pub const STATUS_REDIRECTOR_STARTED: NTSTATUS = 0xC00000FC_u32 as _; +pub const STATUS_REGISTRY_CORRUPT: NTSTATUS = 0xC000014C_u32 as _; +pub const STATUS_REGISTRY_HIVE_RECOVERED: NTSTATUS = 0x8000002A_u32 as _; +pub const STATUS_REGISTRY_IO_FAILED: NTSTATUS = 0xC000014D_u32 as _; +pub const STATUS_REGISTRY_QUOTA_LIMIT: NTSTATUS = 0xC0000256_u32 as _; +pub const STATUS_REGISTRY_RECOVERED: NTSTATUS = 0x40000009_u32 as _; +pub const STATUS_REG_NAT_CONSUMPTION: NTSTATUS = 0xC00002C9_u32 as _; +pub const STATUS_REINITIALIZATION_NEEDED: NTSTATUS = 0xC0000287_u32 as _; +pub const STATUS_REMOTE_DISCONNECT: NTSTATUS = 0xC000013C_u32 as _; +pub const STATUS_REMOTE_FILE_VERSION_MISMATCH: NTSTATUS = 0xC019000C_u32 as _; +pub const STATUS_REMOTE_NOT_LISTENING: NTSTATUS = 0xC00000BC_u32 as _; +pub const STATUS_REMOTE_RESOURCES: NTSTATUS = 0xC000013D_u32 as _; +pub const STATUS_REMOTE_SESSION_LIMIT: NTSTATUS = 0xC0000196_u32 as _; +pub const STATUS_REMOTE_STORAGE_MEDIA_ERROR: NTSTATUS = 0xC000029E_u32 as _; +pub const STATUS_REMOTE_STORAGE_NOT_ACTIVE: NTSTATUS = 0xC000029D_u32 as _; +pub const STATUS_REPAIR_NEEDED: NTSTATUS = 0xC00001A8_u32 as _; +pub const STATUS_REPARSE: NTSTATUS = 0x104_u32 as _; +pub const STATUS_REPARSE_ATTRIBUTE_CONFLICT: NTSTATUS = 0xC00002B2_u32 as _; +pub const STATUS_REPARSE_GLOBAL: NTSTATUS = 0x368_u32 as _; +pub const STATUS_REPARSE_OBJECT: NTSTATUS = 0x118_u32 as _; +pub const STATUS_REPARSE_POINT_ENCOUNTERED: NTSTATUS = 0xC000050B_u32 as _; +pub const STATUS_REPARSE_POINT_NOT_RESOLVED: NTSTATUS = 0xC0000280_u32 as _; +pub const STATUS_REPLY_MESSAGE_MISMATCH: NTSTATUS = 0xC000021F_u32 as _; +pub const STATUS_REQUEST_ABORTED: NTSTATUS = 0xC0000240_u32 as _; +pub const STATUS_REQUEST_CANCELED: NTSTATUS = 0xC0000703_u32 as _; +pub const STATUS_REQUEST_NOT_ACCEPTED: NTSTATUS = 0xC00000D0_u32 as _; +pub const STATUS_REQUEST_OUT_OF_SEQUENCE: NTSTATUS = 0xC000042A_u32 as _; +pub const STATUS_REQUEST_PAUSED: NTSTATUS = 0xC0000459_u32 as _; +pub const STATUS_RESIDENT_FILE_NOT_SUPPORTED: NTSTATUS = 0xC000047A_u32 as _; +pub const STATUS_RESOURCEMANAGER_NOT_FOUND: NTSTATUS = 0xC019004F_u32 as _; +pub const STATUS_RESOURCEMANAGER_READ_ONLY: NTSTATUS = 0x202_u32 as _; +pub const STATUS_RESOURCE_DATA_NOT_FOUND: NTSTATUS = 0xC0000089_u32 as _; +pub const STATUS_RESOURCE_ENUM_USER_STOP: NTSTATUS = 0xC00B0007_u32 as _; +pub const STATUS_RESOURCE_IN_USE: NTSTATUS = 0xC0000708_u32 as _; +pub const STATUS_RESOURCE_LANG_NOT_FOUND: NTSTATUS = 0xC0000204_u32 as _; +pub const STATUS_RESOURCE_NAME_NOT_FOUND: NTSTATUS = 0xC000008B_u32 as _; +pub const STATUS_RESOURCE_NOT_OWNED: NTSTATUS = 0xC0000264_u32 as _; +pub const STATUS_RESOURCE_REQUIREMENTS_CHANGED: NTSTATUS = 0x119_u32 as _; +pub const STATUS_RESOURCE_TYPE_NOT_FOUND: NTSTATUS = 0xC000008A_u32 as _; +pub const STATUS_RESTART_BOOT_APPLICATION: NTSTATUS = 0xC0000453_u32 as _; +pub const STATUS_RESUME_HIBERNATION: NTSTATUS = 0x4000002B_u32 as _; +pub const STATUS_RETRY: NTSTATUS = 0xC000022D_u32 as _; +pub const STATUS_RETURN_ADDRESS_HIJACK_ATTEMPT: NTSTATUS = 0x80000033_u32 as _; +pub const STATUS_REVISION_MISMATCH: NTSTATUS = 0xC0000059_u32 as _; +pub const STATUS_REVOCATION_OFFLINE_C: NTSTATUS = 0xC000038B_u32 as _; +pub const STATUS_REVOCATION_OFFLINE_KDC: NTSTATUS = 0xC000040C_u32 as _; +pub const STATUS_RING_NEWLY_EMPTY: NTSTATUS = 0x213_u32 as _; +pub const STATUS_RING_PREVIOUSLY_ABOVE_QUOTA: NTSTATUS = 0x212_u32 as _; +pub const STATUS_RING_PREVIOUSLY_EMPTY: NTSTATUS = 0x210_u32 as _; +pub const STATUS_RING_PREVIOUSLY_FULL: NTSTATUS = 0x211_u32 as _; +pub const STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT: NTSTATUS = 0x214_u32 as _; +pub const STATUS_RKF_ACTIVE_KEY: NTSTATUS = 0xC0400006_u32 as _; +pub const STATUS_RKF_BLOB_FULL: NTSTATUS = 0xC0400003_u32 as _; +pub const STATUS_RKF_DUPLICATE_KEY: NTSTATUS = 0xC0400002_u32 as _; +pub const STATUS_RKF_FILE_BLOCKED: NTSTATUS = 0xC0400005_u32 as _; +pub const STATUS_RKF_KEY_NOT_FOUND: NTSTATUS = 0xC0400001_u32 as _; +pub const STATUS_RKF_STORE_FULL: NTSTATUS = 0xC0400004_u32 as _; +pub const STATUS_RM_ALREADY_STARTED: NTSTATUS = 0x40190035_u32 as _; +pub const STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT: NTSTATUS = 0xC019005D_u32 as _; +pub const STATUS_RM_DISCONNECTED: NTSTATUS = 0xC0190032_u32 as _; +pub const STATUS_RM_METADATA_CORRUPT: NTSTATUS = 0xC0190006_u32 as _; +pub const STATUS_RM_NOT_ACTIVE: NTSTATUS = 0xC0190005_u32 as _; +pub const STATUS_ROLLBACK_TIMER_EXPIRED: NTSTATUS = 0xC019003C_u32 as _; +pub const STATUS_RTPM_CONTEXT_COMPLETE: NTSTATUS = 0x293001_u32 as _; +pub const STATUS_RTPM_CONTEXT_CONTINUE: NTSTATUS = 0x293000_u32 as _; +pub const STATUS_RTPM_INVALID_CONTEXT: NTSTATUS = 0xC0293004_u32 as _; +pub const STATUS_RTPM_NO_RESULT: NTSTATUS = 0xC0293002_u32 as _; +pub const STATUS_RTPM_PCR_READ_INCOMPLETE: NTSTATUS = 0xC0293003_u32 as _; +pub const STATUS_RTPM_UNSUPPORTED_CMD: NTSTATUS = 0xC0293005_u32 as _; +pub const STATUS_RUNLEVEL_SWITCH_AGENT_TIMEOUT: NTSTATUS = 0xC000A145_u32 as _; +pub const STATUS_RUNLEVEL_SWITCH_IN_PROGRESS: NTSTATUS = 0xC000A146_u32 as _; +pub const STATUS_RUNLEVEL_SWITCH_TIMEOUT: NTSTATUS = 0xC000A143_u32 as _; +pub const STATUS_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED: NTSTATUS = 0xC00004A7_u32 as _; +pub const STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET: NTSTATUS = 0xC00004A8_u32 as _; +pub const STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE: NTSTATUS = 0xC00004A9_u32 as _; +pub const STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER: NTSTATUS = 0xC00004AA_u32 as _; +pub const STATUS_RXACT_COMMITTED: NTSTATUS = 0x10A_u32 as _; +pub const STATUS_RXACT_COMMIT_FAILURE: NTSTATUS = 0xC000011D_u32 as _; +pub const STATUS_RXACT_COMMIT_NECESSARY: NTSTATUS = 0x80000018_u32 as _; +pub const STATUS_RXACT_INVALID_STATE: NTSTATUS = 0xC000011C_u32 as _; +pub const STATUS_RXACT_STATE_CREATED: NTSTATUS = 0x40000004_u32 as _; +pub const STATUS_SAM_INIT_FAILURE: NTSTATUS = 0xC00002E3_u32 as _; +pub const STATUS_SAM_NEED_BOOTKEY_FLOPPY: NTSTATUS = 0xC00002E0_u32 as _; +pub const STATUS_SAM_NEED_BOOTKEY_PASSWORD: NTSTATUS = 0xC00002DF_u32 as _; +pub const STATUS_SCRUB_DATA_DISABLED: NTSTATUS = 0xC0000478_u32 as _; +pub const STATUS_SECCORE_INVALID_COMMAND: NTSTATUS = 0xC0E80000_u32 as _; +pub const STATUS_SECONDARY_IC_PROVIDER_NOT_REGISTERED: NTSTATUS = 0xC000A121_u32 as _; +pub const STATUS_SECRET_TOO_LONG: NTSTATUS = 0xC0000157_u32 as _; +pub const STATUS_SECTION_DIRECT_MAP_ONLY: NTSTATUS = 0xC0000911_u32 as _; +pub const STATUS_SECTION_NOT_EXTENDED: NTSTATUS = 0xC0000087_u32 as _; +pub const STATUS_SECTION_NOT_IMAGE: NTSTATUS = 0xC0000049_u32 as _; +pub const STATUS_SECTION_PROTECTION: NTSTATUS = 0xC000004E_u32 as _; +pub const STATUS_SECTION_TOO_BIG: NTSTATUS = 0xC0000040_u32 as _; +pub const STATUS_SECUREBOOT_FILE_REPLACED: NTSTATUS = 0xC0430007_u32 as _; +pub const STATUS_SECUREBOOT_INVALID_POLICY: NTSTATUS = 0xC0430003_u32 as _; +pub const STATUS_SECUREBOOT_NOT_BASE_POLICY: NTSTATUS = 0xC043000F_u32 as _; +pub const STATUS_SECUREBOOT_NOT_ENABLED: NTSTATUS = 0x80430006_u32 as _; +pub const STATUS_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY: NTSTATUS = 0xC0430010_u32 as _; +pub const STATUS_SECUREBOOT_PLATFORM_ID_MISMATCH: NTSTATUS = 0xC043000B_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION: NTSTATUS = 0xC043000A_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_NOT_AUTHORIZED: NTSTATUS = 0xC0430008_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_NOT_SIGNED: NTSTATUS = 0xC0430005_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND: NTSTATUS = 0xC0430004_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_ROLLBACK_DETECTED: NTSTATUS = 0xC043000C_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_UNKNOWN: NTSTATUS = 0xC0430009_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_UPGRADE_MISMATCH: NTSTATUS = 0xC043000D_u32 as _; +pub const STATUS_SECUREBOOT_POLICY_VIOLATION: NTSTATUS = 0xC0430002_u32 as _; +pub const STATUS_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING: NTSTATUS = 0xC043000E_u32 as _; +pub const STATUS_SECUREBOOT_ROLLBACK_DETECTED: NTSTATUS = 0xC0430001_u32 as _; +pub const STATUS_SECURITY_STREAM_IS_INCONSISTENT: NTSTATUS = 0xC00001A0_u32 as _; +pub const STATUS_SEGMENT_NOTIFICATION: NTSTATUS = 0x40000005_u32 as _; +pub const STATUS_SEMAPHORE_LIMIT_EXCEEDED: NTSTATUS = 0xC0000047_u32 as _; +pub const STATUS_SERIAL_COUNTER_TIMEOUT: NTSTATUS = 0x4000000C_u32 as _; +pub const STATUS_SERIAL_MORE_WRITES: NTSTATUS = 0x40000008_u32 as _; +pub const STATUS_SERIAL_NO_DEVICE_INITED: NTSTATUS = 0xC0000150_u32 as _; +pub const STATUS_SERVER_DISABLED: NTSTATUS = 0xC0000080_u32 as _; +pub const STATUS_SERVER_HAS_OPEN_HANDLES: NTSTATUS = 0x80000024_u32 as _; +pub const STATUS_SERVER_NOT_DISABLED: NTSTATUS = 0xC0000081_u32 as _; +pub const STATUS_SERVER_SHUTDOWN_IN_PROGRESS: NTSTATUS = 0xC00002FF_u32 as _; +pub const STATUS_SERVER_SID_MISMATCH: NTSTATUS = 0xC00002A0_u32 as _; +pub const STATUS_SERVER_TRANSPORT_CONFLICT: NTSTATUS = 0xC00001B4_u32 as _; +pub const STATUS_SERVER_UNAVAILABLE: NTSTATUS = 0xC0000466_u32 as _; +pub const STATUS_SERVICES_FAILED_AUTOSTART: NTSTATUS = 0x4000A144_u32 as _; +pub const STATUS_SERVICE_NOTIFICATION: NTSTATUS = 0x40000018_u32 as _; +pub const STATUS_SESSION_KEY_TOO_SHORT: NTSTATUS = 0xC0000517_u32 as _; +pub const STATUS_SETMARK_DETECTED: NTSTATUS = 0x80000021_u32 as _; +pub const STATUS_SET_CONTEXT_DENIED: NTSTATUS = 0xC000060A_u32 as _; +pub const STATUS_SEVERITY_COERROR: u32 = 2u32; +pub const STATUS_SEVERITY_COFAIL: u32 = 3u32; +pub const STATUS_SEVERITY_ERROR: NTSTATUS_SEVERITY_CODE = 3u32; +pub const STATUS_SEVERITY_INFORMATIONAL: NTSTATUS_SEVERITY_CODE = 1u32; +pub const STATUS_SEVERITY_SUCCESS: NTSTATUS_SEVERITY_CODE = 0u32; +pub const STATUS_SEVERITY_WARNING: NTSTATUS_SEVERITY_CODE = 2u32; +pub const STATUS_SHARED_IRQ_BUSY: NTSTATUS = 0xC000016C_u32 as _; +pub const STATUS_SHARED_POLICY: NTSTATUS = 0xC0000299_u32 as _; +pub const STATUS_SHARE_UNAVAILABLE: NTSTATUS = 0xC0000480_u32 as _; +pub const STATUS_SHARING_PAUSED: NTSTATUS = 0xC00000CF_u32 as _; +pub const STATUS_SHARING_VIOLATION: NTSTATUS = 0xC0000043_u32 as _; +pub const STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME: NTSTATUS = 0xC000019F_u32 as _; +pub const STATUS_SHUTDOWN_IN_PROGRESS: NTSTATUS = 0xC00002FE_u32 as _; +pub const STATUS_SINGLE_STEP: NTSTATUS = 0x80000004_u32 as _; +pub const STATUS_SMARTCARD_CARD_BLOCKED: NTSTATUS = 0xC0000381_u32 as _; +pub const STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED: NTSTATUS = 0xC0000382_u32 as _; +pub const STATUS_SMARTCARD_CERT_EXPIRED: NTSTATUS = 0xC000038D_u32 as _; +pub const STATUS_SMARTCARD_CERT_REVOKED: NTSTATUS = 0xC0000389_u32 as _; +pub const STATUS_SMARTCARD_IO_ERROR: NTSTATUS = 0xC0000387_u32 as _; +pub const STATUS_SMARTCARD_LOGON_REQUIRED: NTSTATUS = 0xC00002FA_u32 as _; +pub const STATUS_SMARTCARD_NO_CARD: NTSTATUS = 0xC0000383_u32 as _; +pub const STATUS_SMARTCARD_NO_CERTIFICATE: NTSTATUS = 0xC0000385_u32 as _; +pub const STATUS_SMARTCARD_NO_KEYSET: NTSTATUS = 0xC0000386_u32 as _; +pub const STATUS_SMARTCARD_NO_KEY_CONTAINER: NTSTATUS = 0xC0000384_u32 as _; +pub const STATUS_SMARTCARD_SILENT_CONTEXT: NTSTATUS = 0xC000038F_u32 as _; +pub const STATUS_SMARTCARD_SUBSYSTEM_FAILURE: NTSTATUS = 0xC0000321_u32 as _; +pub const STATUS_SMARTCARD_WRONG_PIN: NTSTATUS = 0xC0000380_u32 as _; +pub const STATUS_SMB1_NOT_AVAILABLE: NTSTATUS = 0xC0000513_u32 as _; +pub const STATUS_SMB_BAD_CLUSTER_DIALECT: NTSTATUS = 0xC05D0001_u32 as _; +pub const STATUS_SMB_GUEST_LOGON_BLOCKED: NTSTATUS = 0xC05D0002_u32 as _; +pub const STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP: NTSTATUS = 0xC05D0000_u32 as _; +pub const STATUS_SMB_NO_SIGNING_ALGORITHM_OVERLAP: NTSTATUS = 0xC05D0003_u32 as _; +pub const STATUS_SMI_PRIMITIVE_INSTALLER_FAILED: NTSTATUS = 0xC0150025_u32 as _; +pub const STATUS_SMR_GARBAGE_COLLECTION_REQUIRED: NTSTATUS = 0xC0000514_u32 as _; +pub const STATUS_SOME_NOT_MAPPED: NTSTATUS = 0x107_u32 as _; +pub const STATUS_SOURCE_ELEMENT_EMPTY: NTSTATUS = 0xC0000283_u32 as _; +pub const STATUS_SPACES_ALLOCATION_SIZE_INVALID: NTSTATUS = 0xC0E7000E_u32 as _; +pub const STATUS_SPACES_CACHE_FULL: NTSTATUS = 0xC0E70026_u32 as _; +pub const STATUS_SPACES_COMPLETE: NTSTATUS = 0xE70002_u32 as _; +pub const STATUS_SPACES_CORRUPT_METADATA: NTSTATUS = 0xC0E70016_u32 as _; +pub const STATUS_SPACES_DRIVE_LOST_DATA: NTSTATUS = 0xC0E7001D_u32 as _; +pub const STATUS_SPACES_DRIVE_NOT_READY: NTSTATUS = 0xC0E7001B_u32 as _; +pub const STATUS_SPACES_DRIVE_OPERATIONAL_STATE_INVALID: NTSTATUS = 0xC0E70012_u32 as _; +pub const STATUS_SPACES_DRIVE_REDUNDANCY_INVALID: NTSTATUS = 0xC0E70006_u32 as _; +pub const STATUS_SPACES_DRIVE_SECTOR_SIZE_INVALID: NTSTATUS = 0xC0E70004_u32 as _; +pub const STATUS_SPACES_DRIVE_SPLIT: NTSTATUS = 0xC0E7001C_u32 as _; +pub const STATUS_SPACES_DRT_FULL: NTSTATUS = 0xC0E70017_u32 as _; +pub const STATUS_SPACES_ENCLOSURE_AWARE_INVALID: NTSTATUS = 0xC0E7000F_u32 as _; +pub const STATUS_SPACES_ENTRY_INCOMPLETE: NTSTATUS = 0xC0E7001E_u32 as _; +pub const STATUS_SPACES_ENTRY_INVALID: NTSTATUS = 0xC0E7001F_u32 as _; +pub const STATUS_SPACES_EXTENDED_ERROR: NTSTATUS = 0xC0E7000C_u32 as _; +pub const STATUS_SPACES_FAULT_DOMAIN_TYPE_INVALID: NTSTATUS = 0xC0E70001_u32 as _; +pub const STATUS_SPACES_FLUSH_METADATA: NTSTATUS = 0xC0E70025_u32 as _; +pub const STATUS_SPACES_INCONSISTENCY: NTSTATUS = 0xC0E70018_u32 as _; +pub const STATUS_SPACES_INTERLEAVE_LENGTH_INVALID: NTSTATUS = 0xC0E70009_u32 as _; +pub const STATUS_SPACES_LOG_NOT_READY: NTSTATUS = 0xC0E70019_u32 as _; +pub const STATUS_SPACES_MAP_REQUIRED: NTSTATUS = 0xC0E70014_u32 as _; +pub const STATUS_SPACES_MARK_DIRTY: NTSTATUS = 0xC0E70020_u32 as _; +pub const STATUS_SPACES_NOT_ENOUGH_DRIVES: NTSTATUS = 0xC0E7000B_u32 as _; +pub const STATUS_SPACES_NO_REDUNDANCY: NTSTATUS = 0xC0E7001A_u32 as _; +pub const STATUS_SPACES_NUMBER_OF_COLUMNS_INVALID: NTSTATUS = 0xC0E7000A_u32 as _; +pub const STATUS_SPACES_NUMBER_OF_DATA_COPIES_INVALID: NTSTATUS = 0xC0E70007_u32 as _; +pub const STATUS_SPACES_NUMBER_OF_GROUPS_INVALID: NTSTATUS = 0xC0E70011_u32 as _; +pub const STATUS_SPACES_PAUSE: NTSTATUS = 0xE70001_u32 as _; +pub const STATUS_SPACES_PD_INVALID_DATA: NTSTATUS = 0xC0E70024_u32 as _; +pub const STATUS_SPACES_PD_LENGTH_MISMATCH: NTSTATUS = 0xC0E70022_u32 as _; +pub const STATUS_SPACES_PD_NOT_FOUND: NTSTATUS = 0xC0E70021_u32 as _; +pub const STATUS_SPACES_PD_UNSUPPORTED_VERSION: NTSTATUS = 0xC0E70023_u32 as _; +pub const STATUS_SPACES_PROVISIONING_TYPE_INVALID: NTSTATUS = 0xC0E7000D_u32 as _; +pub const STATUS_SPACES_REDIRECT: NTSTATUS = 0xE70003_u32 as _; +pub const STATUS_SPACES_REPAIRED: NTSTATUS = 0xE70000_u32 as _; +pub const STATUS_SPACES_REPAIR_IN_PROGRESS: NTSTATUS = 0xC0E70027_u32 as _; +pub const STATUS_SPACES_RESILIENCY_TYPE_INVALID: NTSTATUS = 0xC0E70003_u32 as _; +pub const STATUS_SPACES_UNSUPPORTED_VERSION: NTSTATUS = 0xC0E70015_u32 as _; +pub const STATUS_SPACES_UPDATE_COLUMN_STATE: NTSTATUS = 0xC0E70013_u32 as _; +pub const STATUS_SPACES_WRITE_CACHE_SIZE_INVALID: NTSTATUS = 0xC0E70010_u32 as _; +pub const STATUS_SPARSE_FILE_NOT_SUPPORTED: NTSTATUS = 0xC00004C4_u32 as _; +pub const STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION: NTSTATUS = 0xC0190049_u32 as _; +pub const STATUS_SPECIAL_ACCOUNT: NTSTATUS = 0xC0000124_u32 as _; +pub const STATUS_SPECIAL_GROUP: NTSTATUS = 0xC0000125_u32 as _; +pub const STATUS_SPECIAL_USER: NTSTATUS = 0xC0000126_u32 as _; +pub const STATUS_STACK_BUFFER_OVERRUN: NTSTATUS = 0xC0000409_u32 as _; +pub const STATUS_STACK_OVERFLOW: NTSTATUS = 0xC00000FD_u32 as _; +pub const STATUS_STACK_OVERFLOW_READ: NTSTATUS = 0xC0000228_u32 as _; +pub const STATUS_STOPPED_ON_SYMLINK: NTSTATUS = 0x8000002D_u32 as _; +pub const STATUS_STORAGE_LOST_DATA_PERSISTENCE: NTSTATUS = 0xC000049E_u32 as _; +pub const STATUS_STORAGE_RESERVE_ALREADY_EXISTS: NTSTATUS = 0xC00004AF_u32 as _; +pub const STATUS_STORAGE_RESERVE_DOES_NOT_EXIST: NTSTATUS = 0xC00004AE_u32 as _; +pub const STATUS_STORAGE_RESERVE_ID_INVALID: NTSTATUS = 0xC00004AD_u32 as _; +pub const STATUS_STORAGE_RESERVE_NOT_EMPTY: NTSTATUS = 0xC00004B0_u32 as _; +pub const STATUS_STORAGE_STACK_ACCESS_DENIED: NTSTATUS = 0xC00004C1_u32 as _; +pub const STATUS_STORAGE_TOPOLOGY_ID_MISMATCH: NTSTATUS = 0xC0000486_u32 as _; +pub const STATUS_STOWED_EXCEPTION: NTSTATUS = 0xC000027B_u32 as _; +pub const STATUS_STREAM_MINIVERSION_NOT_FOUND: NTSTATUS = 0xC0190022_u32 as _; +pub const STATUS_STREAM_MINIVERSION_NOT_VALID: NTSTATUS = 0xC0190023_u32 as _; +pub const STATUS_STRICT_CFG_VIOLATION: NTSTATUS = 0xC0000606_u32 as _; +pub const STATUS_STRONG_CRYPTO_NOT_SUPPORTED: NTSTATUS = 0xC00002F6_u32 as _; +pub const STATUS_SUCCESS: NTSTATUS = 0x0_u32 as _; +pub const STATUS_SUSPEND_COUNT_EXCEEDED: NTSTATUS = 0xC000004A_u32 as _; +pub const STATUS_SVHDX_ERROR_NOT_AVAILABLE: NTSTATUS = 0xC05CFF00_u32 as _; +pub const STATUS_SVHDX_ERROR_STORED: NTSTATUS = 0xC05C0000_u32 as _; +pub const STATUS_SVHDX_NO_INITIATOR: NTSTATUS = 0xC05CFF0B_u32 as _; +pub const STATUS_SVHDX_RESERVATION_CONFLICT: NTSTATUS = 0xC05CFF07_u32 as _; +pub const STATUS_SVHDX_UNIT_ATTENTION_AVAILABLE: NTSTATUS = 0xC05CFF01_u32 as _; +pub const STATUS_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED: NTSTATUS = 0xC05CFF02_u32 as _; +pub const STATUS_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED: NTSTATUS = 0xC05CFF06_u32 as _; +pub const STATUS_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED: NTSTATUS = 0xC05CFF05_u32 as _; +pub const STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED: NTSTATUS = 0xC05CFF03_u32 as _; +pub const STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED: NTSTATUS = 0xC05CFF04_u32 as _; +pub const STATUS_SVHDX_VERSION_MISMATCH: NTSTATUS = 0xC05CFF09_u32 as _; +pub const STATUS_SVHDX_WRONG_FILE_TYPE: NTSTATUS = 0xC05CFF08_u32 as _; +pub const STATUS_SXS_ACTIVATION_CONTEXT_DISABLED: NTSTATUS = 0xC0150007_u32 as _; +pub const STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT: NTSTATUS = 0xC015001E_u32 as _; +pub const STATUS_SXS_ASSEMBLY_MISSING: NTSTATUS = 0xC015000C_u32 as _; +pub const STATUS_SXS_ASSEMBLY_NOT_FOUND: NTSTATUS = 0xC0150004_u32 as _; +pub const STATUS_SXS_CANT_GEN_ACTCTX: NTSTATUS = 0xC0150002_u32 as _; +pub const STATUS_SXS_COMPONENT_STORE_CORRUPT: NTSTATUS = 0xC015001A_u32 as _; +pub const STATUS_SXS_CORRUPTION: NTSTATUS = 0xC0150015_u32 as _; +pub const STATUS_SXS_CORRUPT_ACTIVATION_STACK: NTSTATUS = 0xC0150014_u32 as _; +pub const STATUS_SXS_EARLY_DEACTIVATION: NTSTATUS = 0xC015000F_u32 as _; +pub const STATUS_SXS_FILE_HASH_MISMATCH: NTSTATUS = 0xC015001B_u32 as _; +pub const STATUS_SXS_FILE_HASH_MISSING: NTSTATUS = 0xC0150027_u32 as _; +pub const STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY: NTSTATUS = 0xC015001F_u32 as _; +pub const STATUS_SXS_IDENTITIES_DIFFERENT: NTSTATUS = 0xC015001D_u32 as _; +pub const STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE: NTSTATUS = 0xC0150018_u32 as _; +pub const STATUS_SXS_IDENTITY_PARSE_ERROR: NTSTATUS = 0xC0150019_u32 as _; +pub const STATUS_SXS_INVALID_ACTCTXDATA_FORMAT: NTSTATUS = 0xC0150003_u32 as _; +pub const STATUS_SXS_INVALID_DEACTIVATION: NTSTATUS = 0xC0150010_u32 as _; +pub const STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME: NTSTATUS = 0xC0150017_u32 as _; +pub const STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE: NTSTATUS = 0xC0150016_u32 as _; +pub const STATUS_SXS_KEY_NOT_FOUND: NTSTATUS = 0xC0150008_u32 as _; +pub const STATUS_SXS_MANIFEST_FORMAT_ERROR: NTSTATUS = 0xC0150005_u32 as _; +pub const STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT: NTSTATUS = 0xC015001C_u32 as _; +pub const STATUS_SXS_MANIFEST_PARSE_ERROR: NTSTATUS = 0xC0150006_u32 as _; +pub const STATUS_SXS_MANIFEST_TOO_BIG: NTSTATUS = 0xC0150022_u32 as _; +pub const STATUS_SXS_MULTIPLE_DEACTIVATION: NTSTATUS = 0xC0150011_u32 as _; +pub const STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET: NTSTATUS = 0xC015000E_u32 as _; +pub const STATUS_SXS_PROCESS_TERMINATION_REQUESTED: NTSTATUS = 0xC0150013_u32 as _; +pub const STATUS_SXS_RELEASE_ACTIVATION_CONTEXT: NTSTATUS = 0x4015000D_u32 as _; +pub const STATUS_SXS_SECTION_NOT_FOUND: NTSTATUS = 0xC0150001_u32 as _; +pub const STATUS_SXS_SETTING_NOT_REGISTERED: NTSTATUS = 0xC0150023_u32 as _; +pub const STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY: NTSTATUS = 0xC0150012_u32 as _; +pub const STATUS_SXS_THREAD_QUERIES_DISABLED: NTSTATUS = 0xC015000B_u32 as _; +pub const STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE: NTSTATUS = 0xC0150024_u32 as _; +pub const STATUS_SXS_VERSION_CONFLICT: NTSTATUS = 0xC0150009_u32 as _; +pub const STATUS_SXS_WRONG_SECTION_TYPE: NTSTATUS = 0xC015000A_u32 as _; +pub const STATUS_SYMLINK_CLASS_DISABLED: NTSTATUS = 0xC0000715_u32 as _; +pub const STATUS_SYNCHRONIZATION_REQUIRED: NTSTATUS = 0xC0000134_u32 as _; +pub const STATUS_SYSTEM_DEVICE_NOT_FOUND: NTSTATUS = 0xC0000452_u32 as _; +pub const STATUS_SYSTEM_HIVE_TOO_LARGE: NTSTATUS = 0xC000036E_u32 as _; +pub const STATUS_SYSTEM_IMAGE_BAD_SIGNATURE: NTSTATUS = 0xC00002D1_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_INVALID_POLICY: NTSTATUS = 0xC0E90003_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED: NTSTATUS = 0xC0E90004_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_POLICY_VIOLATION: NTSTATUS = 0xC0E90002_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_REPUTATION_DANGEROUS_EXT: NTSTATUS = 0xC0E90009_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_REPUTATION_EXPLICIT_DENY_FILE: NTSTATUS = 0xC0E9000D_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_REPUTATION_MALICIOUS: NTSTATUS = 0xC0E90007_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_REPUTATION_OFFLINE: NTSTATUS = 0xC0E9000A_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_REPUTATION_PUA: NTSTATUS = 0xC0E90008_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_REPUTATION_UNATTAINABLE: NTSTATUS = 0xC0E9000C_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_REPUTATION_UNFRIENDLY_FILE: NTSTATUS = 0xC0E9000B_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_ROLLBACK_DETECTED: NTSTATUS = 0xC0E90001_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED: NTSTATUS = 0xC0E90006_u32 as _; +pub const STATUS_SYSTEM_INTEGRITY_TOO_MANY_POLICIES: NTSTATUS = 0xC0E90005_u32 as _; +pub const STATUS_SYSTEM_NEEDS_REMEDIATION: NTSTATUS = 0xC000047E_u32 as _; +pub const STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION: NTSTATUS = 0x40000031_u32 as _; +pub const STATUS_SYSTEM_POWERSTATE_TRANSITION: NTSTATUS = 0x4000002F_u32 as _; +pub const STATUS_SYSTEM_PROCESS_TERMINATED: NTSTATUS = 0xC000021A_u32 as _; +pub const STATUS_SYSTEM_SHUTDOWN: NTSTATUS = 0xC00002EB_u32 as _; +pub const STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED: NTSTATUS = 0xC000070E_u32 as _; +pub const STATUS_THREADPOOL_HANDLE_EXCEPTION: NTSTATUS = 0xC000070A_u32 as _; +pub const STATUS_THREADPOOL_RELEASED_DURING_OPERATION: NTSTATUS = 0xC000070F_u32 as _; +pub const STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED: NTSTATUS = 0xC000070D_u32 as _; +pub const STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED: NTSTATUS = 0xC000070C_u32 as _; +pub const STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED: NTSTATUS = 0xC000070B_u32 as _; +pub const STATUS_THREAD_ALREADY_IN_SESSION: NTSTATUS = 0xC0000456_u32 as _; +pub const STATUS_THREAD_ALREADY_IN_TASK: NTSTATUS = 0xC0000502_u32 as _; +pub const STATUS_THREAD_IS_TERMINATING: NTSTATUS = 0xC000004B_u32 as _; +pub const STATUS_THREAD_NOT_IN_PROCESS: NTSTATUS = 0xC000012A_u32 as _; +pub const STATUS_THREAD_NOT_IN_SESSION: NTSTATUS = 0xC0000457_u32 as _; +pub const STATUS_THREAD_NOT_RUNNING: NTSTATUS = 0xC0000516_u32 as _; +pub const STATUS_THREAD_WAS_SUSPENDED: NTSTATUS = 0x40000001_u32 as _; +pub const STATUS_TIMEOUT: NTSTATUS = 0x102_u32 as _; +pub const STATUS_TIMER_NOT_CANCELED: NTSTATUS = 0xC000000C_u32 as _; +pub const STATUS_TIMER_RESOLUTION_NOT_SET: NTSTATUS = 0xC0000245_u32 as _; +pub const STATUS_TIMER_RESUME_IGNORED: NTSTATUS = 0x40000025_u32 as _; +pub const STATUS_TIME_DIFFERENCE_AT_DC: NTSTATUS = 0xC0000133_u32 as _; +pub const STATUS_TM_IDENTITY_MISMATCH: NTSTATUS = 0xC019004A_u32 as _; +pub const STATUS_TM_INITIALIZATION_FAILED: NTSTATUS = 0xC0190004_u32 as _; +pub const STATUS_TM_VOLATILE: NTSTATUS = 0xC019003B_u32 as _; +pub const STATUS_TOKEN_ALREADY_IN_USE: NTSTATUS = 0xC000012B_u32 as _; +pub const STATUS_TOO_LATE: NTSTATUS = 0xC0000189_u32 as _; +pub const STATUS_TOO_MANY_ADDRESSES: NTSTATUS = 0xC0000209_u32 as _; +pub const STATUS_TOO_MANY_COMMANDS: NTSTATUS = 0xC00000C1_u32 as _; +pub const STATUS_TOO_MANY_CONTEXT_IDS: NTSTATUS = 0xC000015A_u32 as _; +pub const STATUS_TOO_MANY_GUIDS_REQUESTED: NTSTATUS = 0xC0000082_u32 as _; +pub const STATUS_TOO_MANY_LINKS: NTSTATUS = 0xC0000265_u32 as _; +pub const STATUS_TOO_MANY_LUIDS_REQUESTED: NTSTATUS = 0xC0000074_u32 as _; +pub const STATUS_TOO_MANY_NAMES: NTSTATUS = 0xC00000CD_u32 as _; +pub const STATUS_TOO_MANY_NODES: NTSTATUS = 0xC000020E_u32 as _; +pub const STATUS_TOO_MANY_OPENED_FILES: NTSTATUS = 0xC000011F_u32 as _; +pub const STATUS_TOO_MANY_PAGING_FILES: NTSTATUS = 0xC0000097_u32 as _; +pub const STATUS_TOO_MANY_PRINCIPALS: NTSTATUS = 0xC00002F7_u32 as _; +pub const STATUS_TOO_MANY_SECRETS: NTSTATUS = 0xC0000156_u32 as _; +pub const STATUS_TOO_MANY_SEGMENT_DESCRIPTORS: NTSTATUS = 0xC0000473_u32 as _; +pub const STATUS_TOO_MANY_SESSIONS: NTSTATUS = 0xC00000CE_u32 as _; +pub const STATUS_TOO_MANY_SIDS: NTSTATUS = 0xC000017E_u32 as _; +pub const STATUS_TOO_MANY_THREADS: NTSTATUS = 0xC0000129_u32 as _; +pub const STATUS_TPM_20_E_ASYMMETRIC: NTSTATUS = 0xC0290081_u32 as _; +pub const STATUS_TPM_20_E_ATTRIBUTES: NTSTATUS = 0xC0290082_u32 as _; +pub const STATUS_TPM_20_E_AUTHSIZE: NTSTATUS = 0xC0290144_u32 as _; +pub const STATUS_TPM_20_E_AUTH_CONTEXT: NTSTATUS = 0xC0290145_u32 as _; +pub const STATUS_TPM_20_E_AUTH_FAIL: NTSTATUS = 0xC029008E_u32 as _; +pub const STATUS_TPM_20_E_AUTH_MISSING: NTSTATUS = 0xC0290125_u32 as _; +pub const STATUS_TPM_20_E_AUTH_TYPE: NTSTATUS = 0xC0290124_u32 as _; +pub const STATUS_TPM_20_E_AUTH_UNAVAILABLE: NTSTATUS = 0xC029012F_u32 as _; +pub const STATUS_TPM_20_E_BAD_AUTH: NTSTATUS = 0xC02900A2_u32 as _; +pub const STATUS_TPM_20_E_BAD_CONTEXT: NTSTATUS = 0xC0290150_u32 as _; +pub const STATUS_TPM_20_E_BINDING: NTSTATUS = 0xC02900A5_u32 as _; +pub const STATUS_TPM_20_E_COMMAND_CODE: NTSTATUS = 0xC0290143_u32 as _; +pub const STATUS_TPM_20_E_COMMAND_SIZE: NTSTATUS = 0xC0290142_u32 as _; +pub const STATUS_TPM_20_E_CPHASH: NTSTATUS = 0xC0290151_u32 as _; +pub const STATUS_TPM_20_E_CURVE: NTSTATUS = 0xC02900A6_u32 as _; +pub const STATUS_TPM_20_E_DISABLED: NTSTATUS = 0xC0290120_u32 as _; +pub const STATUS_TPM_20_E_ECC_CURVE: NTSTATUS = 0xC0290123_u32 as _; +pub const STATUS_TPM_20_E_ECC_POINT: NTSTATUS = 0xC02900A7_u32 as _; +pub const STATUS_TPM_20_E_EXCLUSIVE: NTSTATUS = 0xC0290121_u32 as _; +pub const STATUS_TPM_20_E_EXPIRED: NTSTATUS = 0xC02900A3_u32 as _; +pub const STATUS_TPM_20_E_FAILURE: NTSTATUS = 0xC0290101_u32 as _; +pub const STATUS_TPM_20_E_HANDLE: NTSTATUS = 0xC029008B_u32 as _; +pub const STATUS_TPM_20_E_HASH: NTSTATUS = 0xC0290083_u32 as _; +pub const STATUS_TPM_20_E_HIERARCHY: NTSTATUS = 0xC0290085_u32 as _; +pub const STATUS_TPM_20_E_HMAC: NTSTATUS = 0xC0290119_u32 as _; +pub const STATUS_TPM_20_E_INITIALIZE: NTSTATUS = 0xC0290100_u32 as _; +pub const STATUS_TPM_20_E_INSUFFICIENT: NTSTATUS = 0xC029009A_u32 as _; +pub const STATUS_TPM_20_E_INTEGRITY: NTSTATUS = 0xC029009F_u32 as _; +pub const STATUS_TPM_20_E_KDF: NTSTATUS = 0xC029008C_u32 as _; +pub const STATUS_TPM_20_E_KEY: NTSTATUS = 0xC029009C_u32 as _; +pub const STATUS_TPM_20_E_KEY_SIZE: NTSTATUS = 0xC0290087_u32 as _; +pub const STATUS_TPM_20_E_MGF: NTSTATUS = 0xC0290088_u32 as _; +pub const STATUS_TPM_20_E_MODE: NTSTATUS = 0xC0290089_u32 as _; +pub const STATUS_TPM_20_E_NEEDS_TEST: NTSTATUS = 0xC0290153_u32 as _; +pub const STATUS_TPM_20_E_NONCE: NTSTATUS = 0xC029008F_u32 as _; +pub const STATUS_TPM_20_E_NO_RESULT: NTSTATUS = 0xC0290154_u32 as _; +pub const STATUS_TPM_20_E_NV_AUTHORIZATION: NTSTATUS = 0xC0290149_u32 as _; +pub const STATUS_TPM_20_E_NV_DEFINED: NTSTATUS = 0xC029014C_u32 as _; +pub const STATUS_TPM_20_E_NV_LOCKED: NTSTATUS = 0xC0290148_u32 as _; +pub const STATUS_TPM_20_E_NV_RANGE: NTSTATUS = 0xC0290146_u32 as _; +pub const STATUS_TPM_20_E_NV_SIZE: NTSTATUS = 0xC0290147_u32 as _; +pub const STATUS_TPM_20_E_NV_SPACE: NTSTATUS = 0xC029014B_u32 as _; +pub const STATUS_TPM_20_E_NV_UNINITIALIZED: NTSTATUS = 0xC029014A_u32 as _; +pub const STATUS_TPM_20_E_PARENT: NTSTATUS = 0xC0290152_u32 as _; +pub const STATUS_TPM_20_E_PCR: NTSTATUS = 0xC0290127_u32 as _; +pub const STATUS_TPM_20_E_PCR_CHANGED: NTSTATUS = 0xC0290128_u32 as _; +pub const STATUS_TPM_20_E_POLICY: NTSTATUS = 0xC0290126_u32 as _; +pub const STATUS_TPM_20_E_POLICY_CC: NTSTATUS = 0xC02900A4_u32 as _; +pub const STATUS_TPM_20_E_POLICY_FAIL: NTSTATUS = 0xC029009D_u32 as _; +pub const STATUS_TPM_20_E_PP: NTSTATUS = 0xC0290090_u32 as _; +pub const STATUS_TPM_20_E_PRIVATE: NTSTATUS = 0xC029010B_u32 as _; +pub const STATUS_TPM_20_E_RANGE: NTSTATUS = 0xC029008D_u32 as _; +pub const STATUS_TPM_20_E_REBOOT: NTSTATUS = 0xC0290130_u32 as _; +pub const STATUS_TPM_20_E_RESERVED_BITS: NTSTATUS = 0xC02900A1_u32 as _; +pub const STATUS_TPM_20_E_SCHEME: NTSTATUS = 0xC0290092_u32 as _; +pub const STATUS_TPM_20_E_SELECTOR: NTSTATUS = 0xC0290098_u32 as _; +pub const STATUS_TPM_20_E_SENSITIVE: NTSTATUS = 0xC0290155_u32 as _; +pub const STATUS_TPM_20_E_SEQUENCE: NTSTATUS = 0xC0290103_u32 as _; +pub const STATUS_TPM_20_E_SIGNATURE: NTSTATUS = 0xC029009B_u32 as _; +pub const STATUS_TPM_20_E_SIZE: NTSTATUS = 0xC0290095_u32 as _; +pub const STATUS_TPM_20_E_SYMMETRIC: NTSTATUS = 0xC0290096_u32 as _; +pub const STATUS_TPM_20_E_TAG: NTSTATUS = 0xC0290097_u32 as _; +pub const STATUS_TPM_20_E_TICKET: NTSTATUS = 0xC02900A0_u32 as _; +pub const STATUS_TPM_20_E_TOO_MANY_CONTEXTS: NTSTATUS = 0xC029012E_u32 as _; +pub const STATUS_TPM_20_E_TYPE: NTSTATUS = 0xC029008A_u32 as _; +pub const STATUS_TPM_20_E_UNBALANCED: NTSTATUS = 0xC0290131_u32 as _; +pub const STATUS_TPM_20_E_UPGRADE: NTSTATUS = 0xC029012D_u32 as _; +pub const STATUS_TPM_20_E_VALUE: NTSTATUS = 0xC0290084_u32 as _; +pub const STATUS_TPM_ACCESS_DENIED: NTSTATUS = 0xC0291004_u32 as _; +pub const STATUS_TPM_AREA_LOCKED: NTSTATUS = 0xC029003C_u32 as _; +pub const STATUS_TPM_AUDITFAILURE: NTSTATUS = 0xC0290004_u32 as _; +pub const STATUS_TPM_AUDITFAIL_SUCCESSFUL: NTSTATUS = 0xC0290031_u32 as _; +pub const STATUS_TPM_AUDITFAIL_UNSUCCESSFUL: NTSTATUS = 0xC0290030_u32 as _; +pub const STATUS_TPM_AUTH2FAIL: NTSTATUS = 0xC029001D_u32 as _; +pub const STATUS_TPM_AUTHFAIL: NTSTATUS = 0xC0290001_u32 as _; +pub const STATUS_TPM_AUTH_CONFLICT: NTSTATUS = 0xC029003B_u32 as _; +pub const STATUS_TPM_BADCONTEXT: NTSTATUS = 0xC029005A_u32 as _; +pub const STATUS_TPM_BADINDEX: NTSTATUS = 0xC0290002_u32 as _; +pub const STATUS_TPM_BADTAG: NTSTATUS = 0xC029001E_u32 as _; +pub const STATUS_TPM_BAD_ATTRIBUTES: NTSTATUS = 0xC0290042_u32 as _; +pub const STATUS_TPM_BAD_COUNTER: NTSTATUS = 0xC0290045_u32 as _; +pub const STATUS_TPM_BAD_DATASIZE: NTSTATUS = 0xC029002B_u32 as _; +pub const STATUS_TPM_BAD_DELEGATE: NTSTATUS = 0xC0290059_u32 as _; +pub const STATUS_TPM_BAD_HANDLE: NTSTATUS = 0xC0290058_u32 as _; +pub const STATUS_TPM_BAD_KEY_PROPERTY: NTSTATUS = 0xC0290028_u32 as _; +pub const STATUS_TPM_BAD_LOCALITY: NTSTATUS = 0xC029003D_u32 as _; +pub const STATUS_TPM_BAD_MIGRATION: NTSTATUS = 0xC0290029_u32 as _; +pub const STATUS_TPM_BAD_MODE: NTSTATUS = 0xC029002C_u32 as _; +pub const STATUS_TPM_BAD_ORDINAL: NTSTATUS = 0xC029000A_u32 as _; +pub const STATUS_TPM_BAD_PARAMETER: NTSTATUS = 0xC0290003_u32 as _; +pub const STATUS_TPM_BAD_PARAM_SIZE: NTSTATUS = 0xC0290019_u32 as _; +pub const STATUS_TPM_BAD_PRESENCE: NTSTATUS = 0xC029002D_u32 as _; +pub const STATUS_TPM_BAD_SCHEME: NTSTATUS = 0xC029002A_u32 as _; +pub const STATUS_TPM_BAD_SIGNATURE: NTSTATUS = 0xC0290062_u32 as _; +pub const STATUS_TPM_BAD_TYPE: NTSTATUS = 0xC0290034_u32 as _; +pub const STATUS_TPM_BAD_VERSION: NTSTATUS = 0xC029002E_u32 as _; +pub const STATUS_TPM_CLEAR_DISABLED: NTSTATUS = 0xC0290005_u32 as _; +pub const STATUS_TPM_COMMAND_BLOCKED: NTSTATUS = 0xC0290400_u32 as _; +pub const STATUS_TPM_COMMAND_CANCELED: NTSTATUS = 0xC0291001_u32 as _; +pub const STATUS_TPM_CONTEXT_GAP: NTSTATUS = 0xC0290047_u32 as _; +pub const STATUS_TPM_DAA_INPUT_DATA0: NTSTATUS = 0xC0290051_u32 as _; +pub const STATUS_TPM_DAA_INPUT_DATA1: NTSTATUS = 0xC0290052_u32 as _; +pub const STATUS_TPM_DAA_ISSUER_SETTINGS: NTSTATUS = 0xC0290053_u32 as _; +pub const STATUS_TPM_DAA_ISSUER_VALIDITY: NTSTATUS = 0xC0290056_u32 as _; +pub const STATUS_TPM_DAA_RESOURCES: NTSTATUS = 0xC0290050_u32 as _; +pub const STATUS_TPM_DAA_STAGE: NTSTATUS = 0xC0290055_u32 as _; +pub const STATUS_TPM_DAA_TPM_SETTINGS: NTSTATUS = 0xC0290054_u32 as _; +pub const STATUS_TPM_DAA_WRONG_W: NTSTATUS = 0xC0290057_u32 as _; +pub const STATUS_TPM_DEACTIVATED: NTSTATUS = 0xC0290006_u32 as _; +pub const STATUS_TPM_DECRYPT_ERROR: NTSTATUS = 0xC0290021_u32 as _; +pub const STATUS_TPM_DEFEND_LOCK_RUNNING: NTSTATUS = 0xC0290803_u32 as _; +pub const STATUS_TPM_DELEGATE_ADMIN: NTSTATUS = 0xC029004D_u32 as _; +pub const STATUS_TPM_DELEGATE_FAMILY: NTSTATUS = 0xC029004C_u32 as _; +pub const STATUS_TPM_DELEGATE_LOCK: NTSTATUS = 0xC029004B_u32 as _; +pub const STATUS_TPM_DISABLED: NTSTATUS = 0xC0290007_u32 as _; +pub const STATUS_TPM_DISABLED_CMD: NTSTATUS = 0xC0290008_u32 as _; +pub const STATUS_TPM_DOING_SELFTEST: NTSTATUS = 0xC0290802_u32 as _; +pub const STATUS_TPM_DUPLICATE_VHANDLE: NTSTATUS = 0xC0290402_u32 as _; +pub const STATUS_TPM_EMBEDDED_COMMAND_BLOCKED: NTSTATUS = 0xC0290403_u32 as _; +pub const STATUS_TPM_EMBEDDED_COMMAND_UNSUPPORTED: NTSTATUS = 0xC0290404_u32 as _; +pub const STATUS_TPM_ENCRYPT_ERROR: NTSTATUS = 0xC0290020_u32 as _; +pub const STATUS_TPM_ERROR_MASK: NTSTATUS = 0xC0290000_u32 as _; +pub const STATUS_TPM_FAIL: NTSTATUS = 0xC0290009_u32 as _; +pub const STATUS_TPM_FAILEDSELFTEST: NTSTATUS = 0xC029001C_u32 as _; +pub const STATUS_TPM_FAMILYCOUNT: NTSTATUS = 0xC0290040_u32 as _; +pub const STATUS_TPM_INAPPROPRIATE_ENC: NTSTATUS = 0xC029000E_u32 as _; +pub const STATUS_TPM_INAPPROPRIATE_SIG: NTSTATUS = 0xC0290027_u32 as _; +pub const STATUS_TPM_INSTALL_DISABLED: NTSTATUS = 0xC029000B_u32 as _; +pub const STATUS_TPM_INSUFFICIENT_BUFFER: NTSTATUS = 0xC0291005_u32 as _; +pub const STATUS_TPM_INVALID_AUTHHANDLE: NTSTATUS = 0xC0290022_u32 as _; +pub const STATUS_TPM_INVALID_FAMILY: NTSTATUS = 0xC0290037_u32 as _; +pub const STATUS_TPM_INVALID_HANDLE: NTSTATUS = 0xC0290401_u32 as _; +pub const STATUS_TPM_INVALID_KEYHANDLE: NTSTATUS = 0xC029000C_u32 as _; +pub const STATUS_TPM_INVALID_KEYUSAGE: NTSTATUS = 0xC0290024_u32 as _; +pub const STATUS_TPM_INVALID_PCR_INFO: NTSTATUS = 0xC0290010_u32 as _; +pub const STATUS_TPM_INVALID_POSTINIT: NTSTATUS = 0xC0290026_u32 as _; +pub const STATUS_TPM_INVALID_RESOURCE: NTSTATUS = 0xC0290035_u32 as _; +pub const STATUS_TPM_INVALID_STRUCTURE: NTSTATUS = 0xC0290043_u32 as _; +pub const STATUS_TPM_IOERROR: NTSTATUS = 0xC029001F_u32 as _; +pub const STATUS_TPM_KEYNOTFOUND: NTSTATUS = 0xC029000D_u32 as _; +pub const STATUS_TPM_KEY_NOTSUPPORTED: NTSTATUS = 0xC029003A_u32 as _; +pub const STATUS_TPM_KEY_OWNER_CONTROL: NTSTATUS = 0xC0290044_u32 as _; +pub const STATUS_TPM_MAXNVWRITES: NTSTATUS = 0xC0290048_u32 as _; +pub const STATUS_TPM_MA_AUTHORITY: NTSTATUS = 0xC029005F_u32 as _; +pub const STATUS_TPM_MA_DESTINATION: NTSTATUS = 0xC029005D_u32 as _; +pub const STATUS_TPM_MA_SOURCE: NTSTATUS = 0xC029005E_u32 as _; +pub const STATUS_TPM_MA_TICKET_SIGNATURE: NTSTATUS = 0xC029005C_u32 as _; +pub const STATUS_TPM_MIGRATEFAIL: NTSTATUS = 0xC029000F_u32 as _; +pub const STATUS_TPM_NEEDS_SELFTEST: NTSTATUS = 0xC0290801_u32 as _; +pub const STATUS_TPM_NOCONTEXTSPACE: NTSTATUS = 0xC0290063_u32 as _; +pub const STATUS_TPM_NOOPERATOR: NTSTATUS = 0xC0290049_u32 as _; +pub const STATUS_TPM_NOSPACE: NTSTATUS = 0xC0290011_u32 as _; +pub const STATUS_TPM_NOSRK: NTSTATUS = 0xC0290012_u32 as _; +pub const STATUS_TPM_NOTFIPS: NTSTATUS = 0xC0290036_u32 as _; +pub const STATUS_TPM_NOTLOCAL: NTSTATUS = 0xC0290033_u32 as _; +pub const STATUS_TPM_NOTRESETABLE: NTSTATUS = 0xC0290032_u32 as _; +pub const STATUS_TPM_NOTSEALED_BLOB: NTSTATUS = 0xC0290013_u32 as _; +pub const STATUS_TPM_NOT_FOUND: NTSTATUS = 0xC0291003_u32 as _; +pub const STATUS_TPM_NOT_FULLWRITE: NTSTATUS = 0xC0290046_u32 as _; +pub const STATUS_TPM_NO_ENDORSEMENT: NTSTATUS = 0xC0290023_u32 as _; +pub const STATUS_TPM_NO_NV_PERMISSION: NTSTATUS = 0xC0290038_u32 as _; +pub const STATUS_TPM_NO_WRAP_TRANSPORT: NTSTATUS = 0xC029002F_u32 as _; +pub const STATUS_TPM_OWNER_CONTROL: NTSTATUS = 0xC029004F_u32 as _; +pub const STATUS_TPM_OWNER_SET: NTSTATUS = 0xC0290014_u32 as _; +pub const STATUS_TPM_PERMANENTEK: NTSTATUS = 0xC0290061_u32 as _; +pub const STATUS_TPM_PER_NOWRITE: NTSTATUS = 0xC029003F_u32 as _; +pub const STATUS_TPM_PPI_FUNCTION_UNSUPPORTED: NTSTATUS = 0xC0291006_u32 as _; +pub const STATUS_TPM_READ_ONLY: NTSTATUS = 0xC029003E_u32 as _; +pub const STATUS_TPM_REQUIRES_SIGN: NTSTATUS = 0xC0290039_u32 as _; +pub const STATUS_TPM_RESOURCEMISSING: NTSTATUS = 0xC029004A_u32 as _; +pub const STATUS_TPM_RESOURCES: NTSTATUS = 0xC0290015_u32 as _; +pub const STATUS_TPM_RETRY: NTSTATUS = 0xC0290800_u32 as _; +pub const STATUS_TPM_SHA_ERROR: NTSTATUS = 0xC029001B_u32 as _; +pub const STATUS_TPM_SHA_THREAD: NTSTATUS = 0xC029001A_u32 as _; +pub const STATUS_TPM_SHORTRANDOM: NTSTATUS = 0xC0290016_u32 as _; +pub const STATUS_TPM_SIZE: NTSTATUS = 0xC0290017_u32 as _; +pub const STATUS_TPM_TOOMANYCONTEXTS: NTSTATUS = 0xC029005B_u32 as _; +pub const STATUS_TPM_TOO_MANY_CONTEXTS: NTSTATUS = 0xC0291002_u32 as _; +pub const STATUS_TPM_TRANSPORT_NOTEXCLUSIVE: NTSTATUS = 0xC029004E_u32 as _; +pub const STATUS_TPM_WRITE_LOCKED: NTSTATUS = 0xC0290041_u32 as _; +pub const STATUS_TPM_WRONGPCRVAL: NTSTATUS = 0xC0290018_u32 as _; +pub const STATUS_TPM_WRONG_ENTITYTYPE: NTSTATUS = 0xC0290025_u32 as _; +pub const STATUS_TPM_ZERO_EXHAUST_ENABLED: NTSTATUS = 0xC0294000_u32 as _; +pub const STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE: NTSTATUS = 0xC0190040_u32 as _; +pub const STATUS_TRANSACTIONAL_CONFLICT: NTSTATUS = 0xC0190001_u32 as _; +pub const STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED: NTSTATUS = 0xC019003F_u32 as _; +pub const STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH: NTSTATUS = 0xC019005C_u32 as _; +pub const STATUS_TRANSACTIONMANAGER_NOT_FOUND: NTSTATUS = 0xC0190051_u32 as _; +pub const STATUS_TRANSACTIONMANAGER_NOT_ONLINE: NTSTATUS = 0xC0190052_u32 as _; +pub const STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION: NTSTATUS = 0xC0190053_u32 as _; +pub const STATUS_TRANSACTIONS_NOT_FROZEN: NTSTATUS = 0xC0190045_u32 as _; +pub const STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE: NTSTATUS = 0xC019000A_u32 as _; +pub const STATUS_TRANSACTION_ABORTED: NTSTATUS = 0xC000020F_u32 as _; +pub const STATUS_TRANSACTION_ALREADY_ABORTED: NTSTATUS = 0xC0190015_u32 as _; +pub const STATUS_TRANSACTION_ALREADY_COMMITTED: NTSTATUS = 0xC0190016_u32 as _; +pub const STATUS_TRANSACTION_FREEZE_IN_PROGRESS: NTSTATUS = 0xC0190046_u32 as _; +pub const STATUS_TRANSACTION_INTEGRITY_VIOLATED: NTSTATUS = 0xC019005B_u32 as _; +pub const STATUS_TRANSACTION_INVALID_ID: NTSTATUS = 0xC0000214_u32 as _; +pub const STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER: NTSTATUS = 0xC0190017_u32 as _; +pub const STATUS_TRANSACTION_INVALID_TYPE: NTSTATUS = 0xC0000215_u32 as _; +pub const STATUS_TRANSACTION_MUST_WRITETHROUGH: NTSTATUS = 0xC019005E_u32 as _; +pub const STATUS_TRANSACTION_NOT_ACTIVE: NTSTATUS = 0xC0190003_u32 as _; +pub const STATUS_TRANSACTION_NOT_ENLISTED: NTSTATUS = 0xC0190061_u32 as _; +pub const STATUS_TRANSACTION_NOT_FOUND: NTSTATUS = 0xC019004E_u32 as _; +pub const STATUS_TRANSACTION_NOT_JOINED: NTSTATUS = 0xC0190007_u32 as _; +pub const STATUS_TRANSACTION_NOT_REQUESTED: NTSTATUS = 0xC0190014_u32 as _; +pub const STATUS_TRANSACTION_NOT_ROOT: NTSTATUS = 0xC0190054_u32 as _; +pub const STATUS_TRANSACTION_NO_MATCH: NTSTATUS = 0xC0000212_u32 as _; +pub const STATUS_TRANSACTION_NO_RELEASE: NTSTATUS = 0xC0000211_u32 as _; +pub const STATUS_TRANSACTION_NO_SUPERIOR: NTSTATUS = 0xC019005F_u32 as _; +pub const STATUS_TRANSACTION_OBJECT_EXPIRED: NTSTATUS = 0xC0190055_u32 as _; +pub const STATUS_TRANSACTION_PROPAGATION_FAILED: NTSTATUS = 0xC0190010_u32 as _; +pub const STATUS_TRANSACTION_RECORD_TOO_LONG: NTSTATUS = 0xC0190058_u32 as _; +pub const STATUS_TRANSACTION_REQUEST_NOT_VALID: NTSTATUS = 0xC0190013_u32 as _; +pub const STATUS_TRANSACTION_REQUIRED_PROMOTION: NTSTATUS = 0xC0190043_u32 as _; +pub const STATUS_TRANSACTION_RESPONDED: NTSTATUS = 0xC0000213_u32 as _; +pub const STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED: NTSTATUS = 0xC0190057_u32 as _; +pub const STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET: NTSTATUS = 0x80190042_u32 as _; +pub const STATUS_TRANSACTION_SUPERIOR_EXISTS: NTSTATUS = 0xC0190012_u32 as _; +pub const STATUS_TRANSACTION_TIMED_OUT: NTSTATUS = 0xC0000210_u32 as _; +pub const STATUS_TRANSLATION_COMPLETE: NTSTATUS = 0x120_u32 as _; +pub const STATUS_TRANSPORT_FULL: NTSTATUS = 0xC00002CA_u32 as _; +pub const STATUS_TRIGGERED_EXECUTABLE_MEMORY_WRITE: NTSTATUS = 0xC0000726_u32 as _; +pub const STATUS_TRIM_READ_ZERO_NOT_SUPPORTED: NTSTATUS = 0xC0000472_u32 as _; +pub const STATUS_TRUSTED_DOMAIN_FAILURE: NTSTATUS = 0xC000018C_u32 as _; +pub const STATUS_TRUSTED_RELATIONSHIP_FAILURE: NTSTATUS = 0xC000018D_u32 as _; +pub const STATUS_TRUST_FAILURE: NTSTATUS = 0xC0000190_u32 as _; +pub const STATUS_TS_INCOMPATIBLE_SESSIONS: NTSTATUS = 0xC00A0039_u32 as _; +pub const STATUS_TS_VIDEO_SUBSYSTEM_ERROR: NTSTATUS = 0xC00A003A_u32 as _; +pub const STATUS_TXF_ATTRIBUTE_CORRUPT: NTSTATUS = 0xC019003D_u32 as _; +pub const STATUS_TXF_DIR_NOT_EMPTY: NTSTATUS = 0xC0190039_u32 as _; +pub const STATUS_TXF_METADATA_ALREADY_PRESENT: NTSTATUS = 0x80190041_u32 as _; +pub const STATUS_UNABLE_TO_DECOMMIT_VM: NTSTATUS = 0xC000002C_u32 as _; +pub const STATUS_UNABLE_TO_DELETE_SECTION: NTSTATUS = 0xC000001B_u32 as _; +pub const STATUS_UNABLE_TO_FREE_VM: NTSTATUS = 0xC000001A_u32 as _; +pub const STATUS_UNABLE_TO_LOCK_MEDIA: NTSTATUS = 0xC0000175_u32 as _; +pub const STATUS_UNABLE_TO_UNLOAD_MEDIA: NTSTATUS = 0xC0000176_u32 as _; +pub const STATUS_UNDEFINED_CHARACTER: NTSTATUS = 0xC0000163_u32 as _; +pub const STATUS_UNDEFINED_SCOPE: NTSTATUS = 0xC0000504_u32 as _; +pub const STATUS_UNEXPECTED_IO_ERROR: NTSTATUS = 0xC00000E9_u32 as _; +pub const STATUS_UNEXPECTED_MM_CREATE_ERR: NTSTATUS = 0xC00000EA_u32 as _; +pub const STATUS_UNEXPECTED_MM_EXTEND_ERR: NTSTATUS = 0xC00000EC_u32 as _; +pub const STATUS_UNEXPECTED_MM_MAP_ERROR: NTSTATUS = 0xC00000EB_u32 as _; +pub const STATUS_UNEXPECTED_NETWORK_ERROR: NTSTATUS = 0xC00000C4_u32 as _; +pub const STATUS_UNFINISHED_CONTEXT_DELETED: NTSTATUS = 0xC00002EE_u32 as _; +pub const STATUS_UNHANDLED_EXCEPTION: NTSTATUS = 0xC0000144_u32 as _; +pub const STATUS_UNKNOWN_REVISION: NTSTATUS = 0xC0000058_u32 as _; +pub const STATUS_UNMAPPABLE_CHARACTER: NTSTATUS = 0xC0000162_u32 as _; +pub const STATUS_UNRECOGNIZED_MEDIA: NTSTATUS = 0xC0000014_u32 as _; +pub const STATUS_UNRECOGNIZED_VOLUME: NTSTATUS = 0xC000014F_u32 as _; +pub const STATUS_UNSATISFIED_DEPENDENCIES: NTSTATUS = 0xC00004B9_u32 as _; +pub const STATUS_UNSUCCESSFUL: NTSTATUS = 0xC0000001_u32 as _; +pub const STATUS_UNSUPPORTED_COMPRESSION: NTSTATUS = 0xC000025F_u32 as _; +pub const STATUS_UNSUPPORTED_PAGING_MODE: NTSTATUS = 0xC00004BB_u32 as _; +pub const STATUS_UNSUPPORTED_PREAUTH: NTSTATUS = 0xC0000351_u32 as _; +pub const STATUS_UNTRUSTED_MOUNT_POINT: NTSTATUS = 0xC00004BC_u32 as _; +pub const STATUS_UNWIND: NTSTATUS = 0xC0000027_u32 as _; +pub const STATUS_UNWIND_CONSOLIDATE: NTSTATUS = 0x80000029_u32 as _; +pub const STATUS_USER2USER_REQUIRED: NTSTATUS = 0xC0000408_u32 as _; +pub const STATUS_USER_APC: NTSTATUS = 0xC0_u32 as _; +pub const STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED: NTSTATUS = 0xC0000403_u32 as _; +pub const STATUS_USER_EXISTS: NTSTATUS = 0xC0000063_u32 as _; +pub const STATUS_USER_MAPPED_FILE: NTSTATUS = 0xC0000243_u32 as _; +pub const STATUS_USER_SESSION_DELETED: NTSTATUS = 0xC0000203_u32 as _; +pub const STATUS_VALIDATE_CONTINUE: NTSTATUS = 0xC0000271_u32 as _; +pub const STATUS_VALID_CATALOG_HASH: NTSTATUS = 0x12D_u32 as _; +pub const STATUS_VALID_IMAGE_HASH: NTSTATUS = 0x12C_u32 as _; +pub const STATUS_VALID_STRONG_CODE_HASH: NTSTATUS = 0x12E_u32 as _; +pub const STATUS_VARIABLE_NOT_FOUND: NTSTATUS = 0xC0000100_u32 as _; +pub const STATUS_VDM_DISALLOWED: NTSTATUS = 0xC0000414_u32 as _; +pub const STATUS_VDM_HARD_ERROR: NTSTATUS = 0xC000021D_u32 as _; +pub const STATUS_VERIFIER_STOP: NTSTATUS = 0xC0000421_u32 as _; +pub const STATUS_VERIFY_REQUIRED: NTSTATUS = 0x80000016_u32 as _; +pub const STATUS_VHDSET_BACKING_STORAGE_NOT_FOUND: NTSTATUS = 0xC05CFF0C_u32 as _; +pub const STATUS_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE: NTSTATUS = 0xC03A0033_u32 as _; +pub const STATUS_VHD_BITMAP_MISMATCH: NTSTATUS = 0xC03A000C_u32 as _; +pub const STATUS_VHD_BLOCK_ALLOCATION_FAILURE: NTSTATUS = 0xC03A0009_u32 as _; +pub const STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT: NTSTATUS = 0xC03A000A_u32 as _; +pub const STATUS_VHD_CHANGE_TRACKING_DISABLED: NTSTATUS = 0xC03A002A_u32 as _; +pub const STATUS_VHD_CHILD_PARENT_ID_MISMATCH: NTSTATUS = 0xC03A000E_u32 as _; +pub const STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH: NTSTATUS = 0xC03A0017_u32 as _; +pub const STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH: NTSTATUS = 0xC03A000F_u32 as _; +pub const STATUS_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE: NTSTATUS = 0xC03A0032_u32 as _; +pub const STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED: NTSTATUS = 0xC03A0018_u32 as _; +pub const STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT: NTSTATUS = 0xC03A0019_u32 as _; +pub const STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH: NTSTATUS = 0xC03A0002_u32 as _; +pub const STATUS_VHD_DRIVE_FOOTER_CORRUPT: NTSTATUS = 0xC03A0003_u32 as _; +pub const STATUS_VHD_DRIVE_FOOTER_MISSING: NTSTATUS = 0xC03A0001_u32 as _; +pub const STATUS_VHD_FORMAT_UNKNOWN: NTSTATUS = 0xC03A0004_u32 as _; +pub const STATUS_VHD_FORMAT_UNSUPPORTED_VERSION: NTSTATUS = 0xC03A0005_u32 as _; +pub const STATUS_VHD_INVALID_BLOCK_SIZE: NTSTATUS = 0xC03A000B_u32 as _; +pub const STATUS_VHD_INVALID_CHANGE_TRACKING_ID: NTSTATUS = 0xC03A0029_u32 as _; +pub const STATUS_VHD_INVALID_FILE_SIZE: NTSTATUS = 0xC03A0013_u32 as _; +pub const STATUS_VHD_INVALID_SIZE: NTSTATUS = 0xC03A0012_u32 as _; +pub const STATUS_VHD_INVALID_STATE: NTSTATUS = 0xC03A001C_u32 as _; +pub const STATUS_VHD_INVALID_TYPE: NTSTATUS = 0xC03A001B_u32 as _; +pub const STATUS_VHD_METADATA_FULL: NTSTATUS = 0xC03A0028_u32 as _; +pub const STATUS_VHD_METADATA_READ_FAILURE: NTSTATUS = 0xC03A0010_u32 as _; +pub const STATUS_VHD_METADATA_WRITE_FAILURE: NTSTATUS = 0xC03A0011_u32 as _; +pub const STATUS_VHD_MISSING_CHANGE_TRACKING_INFORMATION: NTSTATUS = 0xC03A0030_u32 as _; +pub const STATUS_VHD_PARENT_VHD_ACCESS_DENIED: NTSTATUS = 0xC03A0016_u32 as _; +pub const STATUS_VHD_PARENT_VHD_NOT_FOUND: NTSTATUS = 0xC03A000D_u32 as _; +pub const STATUS_VHD_RESIZE_WOULD_TRUNCATE_DATA: NTSTATUS = 0xC03A0031_u32 as _; +pub const STATUS_VHD_SHARED: NTSTATUS = 0xC05CFF0A_u32 as _; +pub const STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH: NTSTATUS = 0xC03A0006_u32 as _; +pub const STATUS_VHD_SPARSE_HEADER_CORRUPT: NTSTATUS = 0xC03A0008_u32 as _; +pub const STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION: NTSTATUS = 0xC03A0007_u32 as _; +pub const STATUS_VHD_UNEXPECTED_ID: NTSTATUS = 0xC03A0034_u32 as _; +pub const STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST: NTSTATUS = 0x401B00EC_u32 as _; +pub const STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD: NTSTATUS = 0xC01B00EA_u32 as _; +pub const STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED: NTSTATUS = 0x801B00EB_u32 as _; +pub const STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED: NTSTATUS = 0xC037000E_u32 as _; +pub const STATUS_VID_DUPLICATE_HANDLER: NTSTATUS = 0xC0370001_u32 as _; +pub const STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT: NTSTATUS = 0xC037001E_u32 as _; +pub const STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT: NTSTATUS = 0xC037000C_u32 as _; +pub const STATUS_VID_HANDLER_NOT_PRESENT: NTSTATUS = 0xC0370004_u32 as _; +pub const STATUS_VID_INSUFFICIENT_RESOURCES_HV_DEPOSIT: NTSTATUS = 0xC037002D_u32 as _; +pub const STATUS_VID_INSUFFICIENT_RESOURCES_PHYSICAL_BUFFER: NTSTATUS = 0xC037002C_u32 as _; +pub const STATUS_VID_INSUFFICIENT_RESOURCES_RESERVE: NTSTATUS = 0xC037002B_u32 as _; +pub const STATUS_VID_INSUFFICIENT_RESOURCES_WITHDRAW: NTSTATUS = 0xC037002F_u32 as _; +pub const STATUS_VID_INVALID_CHILD_GPA_PAGE_SET: NTSTATUS = 0xC0370022_u32 as _; +pub const STATUS_VID_INVALID_GPA_RANGE_HANDLE: NTSTATUS = 0xC0370015_u32 as _; +pub const STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE: NTSTATUS = 0xC0370012_u32 as _; +pub const STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE: NTSTATUS = 0xC0370014_u32 as _; +pub const STATUS_VID_INVALID_NUMA_NODE_INDEX: NTSTATUS = 0xC0370010_u32 as _; +pub const STATUS_VID_INVALID_NUMA_SETTINGS: NTSTATUS = 0xC037000F_u32 as _; +pub const STATUS_VID_INVALID_OBJECT_NAME: NTSTATUS = 0xC0370005_u32 as _; +pub const STATUS_VID_INVALID_PPM_HANDLE: NTSTATUS = 0xC0370018_u32 as _; +pub const STATUS_VID_INVALID_PROCESSOR_STATE: NTSTATUS = 0xC037001D_u32 as _; +pub const STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED: NTSTATUS = 0xC037001F_u32 as _; +pub const STATUS_VID_MBPS_ARE_LOCKED: NTSTATUS = 0xC0370019_u32 as _; +pub const STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE: NTSTATUS = 0xC0370025_u32 as _; +pub const STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT: NTSTATUS = 0xC0370026_u32 as _; +pub const STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET: NTSTATUS = 0xC0370020_u32 as _; +pub const STATUS_VID_MB_STILL_REFERENCED: NTSTATUS = 0xC037000D_u32 as _; +pub const STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED: NTSTATUS = 0xC0370017_u32 as _; +pub const STATUS_VID_MEMORY_TYPE_NOT_SUPPORTED: NTSTATUS = 0xC037002E_u32 as _; +pub const STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS: NTSTATUS = 0xC037000B_u32 as _; +pub const STATUS_VID_MESSAGE_QUEUE_CLOSED: NTSTATUS = 0xC037001A_u32 as _; +pub const STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG: NTSTATUS = 0xC0370007_u32 as _; +pub const STATUS_VID_MMIO_RANGE_DESTROYED: NTSTATUS = 0xC0370021_u32 as _; +pub const STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED: NTSTATUS = 0xC0370011_u32 as _; +pub const STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE: NTSTATUS = 0xC0370016_u32 as _; +pub const STATUS_VID_PAGE_RANGE_OVERFLOW: NTSTATUS = 0xC0370013_u32 as _; +pub const STATUS_VID_PARTITION_ALREADY_EXISTS: NTSTATUS = 0xC0370008_u32 as _; +pub const STATUS_VID_PARTITION_DOES_NOT_EXIST: NTSTATUS = 0xC0370009_u32 as _; +pub const STATUS_VID_PARTITION_NAME_NOT_FOUND: NTSTATUS = 0xC037000A_u32 as _; +pub const STATUS_VID_PARTITION_NAME_TOO_LONG: NTSTATUS = 0xC0370006_u32 as _; +pub const STATUS_VID_PROCESS_ALREADY_SET: NTSTATUS = 0xC0370030_u32 as _; +pub const STATUS_VID_QUEUE_FULL: NTSTATUS = 0xC0370003_u32 as _; +pub const STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED: NTSTATUS = 0x80370001_u32 as _; +pub const STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED: NTSTATUS = 0xC0370023_u32 as _; +pub const STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL: NTSTATUS = 0xC0370024_u32 as _; +pub const STATUS_VID_SAVED_STATE_CORRUPT: NTSTATUS = 0xC0370027_u32 as _; +pub const STATUS_VID_SAVED_STATE_INCOMPATIBLE: NTSTATUS = 0xC0370029_u32 as _; +pub const STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM: NTSTATUS = 0xC0370028_u32 as _; +pub const STATUS_VID_STOP_PENDING: NTSTATUS = 0xC037001C_u32 as _; +pub const STATUS_VID_TOO_MANY_HANDLERS: NTSTATUS = 0xC0370002_u32 as _; +pub const STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED: NTSTATUS = 0xC037001B_u32 as _; +pub const STATUS_VID_VTL_ACCESS_DENIED: NTSTATUS = 0xC037002A_u32 as _; +pub const STATUS_VIRTDISK_DISK_ALREADY_OWNED: NTSTATUS = 0xC03A001E_u32 as _; +pub const STATUS_VIRTDISK_DISK_ONLINE_AND_WRITABLE: NTSTATUS = 0xC03A001F_u32 as _; +pub const STATUS_VIRTDISK_NOT_VIRTUAL_DISK: NTSTATUS = 0xC03A0015_u32 as _; +pub const STATUS_VIRTDISK_PROVIDER_NOT_FOUND: NTSTATUS = 0xC03A0014_u32 as _; +pub const STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE: NTSTATUS = 0xC03A001D_u32 as _; +pub const STATUS_VIRTUAL_CIRCUIT_CLOSED: NTSTATUS = 0xC00000D6_u32 as _; +pub const STATUS_VIRTUAL_DISK_LIMITATION: NTSTATUS = 0xC03A001A_u32 as _; +pub const STATUS_VIRUS_DELETED: NTSTATUS = 0xC0000907_u32 as _; +pub const STATUS_VIRUS_INFECTED: NTSTATUS = 0xC0000906_u32 as _; +pub const STATUS_VOLMGR_ALL_DISKS_FAILED: NTSTATUS = 0xC0380029_u32 as _; +pub const STATUS_VOLMGR_BAD_BOOT_DISK: NTSTATUS = 0xC038004F_u32 as _; +pub const STATUS_VOLMGR_DATABASE_FULL: NTSTATUS = 0xC0380001_u32 as _; +pub const STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE: NTSTATUS = 0xC038004E_u32 as _; +pub const STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED: NTSTATUS = 0xC0380002_u32 as _; +pub const STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC: NTSTATUS = 0xC0380003_u32 as _; +pub const STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME: NTSTATUS = 0xC0380005_u32 as _; +pub const STATUS_VOLMGR_DISK_DUPLICATE: NTSTATUS = 0xC0380006_u32 as _; +pub const STATUS_VOLMGR_DISK_DYNAMIC: NTSTATUS = 0xC0380007_u32 as _; +pub const STATUS_VOLMGR_DISK_ID_INVALID: NTSTATUS = 0xC0380008_u32 as _; +pub const STATUS_VOLMGR_DISK_INVALID: NTSTATUS = 0xC0380009_u32 as _; +pub const STATUS_VOLMGR_DISK_LAST_VOTER: NTSTATUS = 0xC038000A_u32 as _; +pub const STATUS_VOLMGR_DISK_LAYOUT_INVALID: NTSTATUS = 0xC038000B_u32 as _; +pub const STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS: NTSTATUS = 0xC038000C_u32 as _; +pub const STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED: NTSTATUS = 0xC038000D_u32 as _; +pub const STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL: NTSTATUS = 0xC038000E_u32 as _; +pub const STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS: NTSTATUS = 0xC038000F_u32 as _; +pub const STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS: NTSTATUS = 0xC0380010_u32 as _; +pub const STATUS_VOLMGR_DISK_MISSING: NTSTATUS = 0xC0380011_u32 as _; +pub const STATUS_VOLMGR_DISK_NOT_EMPTY: NTSTATUS = 0xC0380012_u32 as _; +pub const STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE: NTSTATUS = 0xC0380013_u32 as _; +pub const STATUS_VOLMGR_DISK_REVECTORING_FAILED: NTSTATUS = 0xC0380014_u32 as _; +pub const STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID: NTSTATUS = 0xC0380015_u32 as _; +pub const STATUS_VOLMGR_DISK_SET_NOT_CONTAINED: NTSTATUS = 0xC0380016_u32 as _; +pub const STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS: NTSTATUS = 0xC0380017_u32 as _; +pub const STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES: NTSTATUS = 0xC0380018_u32 as _; +pub const STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED: NTSTATUS = 0xC0380019_u32 as _; +pub const STATUS_VOLMGR_EXTENT_ALREADY_USED: NTSTATUS = 0xC038001A_u32 as _; +pub const STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS: NTSTATUS = 0xC038001B_u32 as _; +pub const STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION: NTSTATUS = 0xC038001C_u32 as _; +pub const STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED: NTSTATUS = 0xC038001D_u32 as _; +pub const STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION: NTSTATUS = 0xC038001E_u32 as _; +pub const STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH: NTSTATUS = 0xC038001F_u32 as _; +pub const STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED: NTSTATUS = 0xC0380020_u32 as _; +pub const STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION: NTSTATUS = 0x80380002_u32 as _; +pub const STATUS_VOLMGR_INCOMPLETE_REGENERATION: NTSTATUS = 0x80380001_u32 as _; +pub const STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID: NTSTATUS = 0xC0380021_u32 as _; +pub const STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS: NTSTATUS = 0xC0380022_u32 as _; +pub const STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE: NTSTATUS = 0xC0380024_u32 as _; +pub const STATUS_VOLMGR_MEMBER_INDEX_INVALID: NTSTATUS = 0xC0380025_u32 as _; +pub const STATUS_VOLMGR_MEMBER_IN_SYNC: NTSTATUS = 0xC0380023_u32 as _; +pub const STATUS_VOLMGR_MEMBER_MISSING: NTSTATUS = 0xC0380026_u32 as _; +pub const STATUS_VOLMGR_MEMBER_NOT_DETACHED: NTSTATUS = 0xC0380027_u32 as _; +pub const STATUS_VOLMGR_MEMBER_REGENERATING: NTSTATUS = 0xC0380028_u32 as _; +pub const STATUS_VOLMGR_MIRROR_NOT_SUPPORTED: NTSTATUS = 0xC038005B_u32 as _; +pub const STATUS_VOLMGR_NOTIFICATION_RESET: NTSTATUS = 0xC038002C_u32 as _; +pub const STATUS_VOLMGR_NOT_PRIMARY_PACK: NTSTATUS = 0xC0380052_u32 as _; +pub const STATUS_VOLMGR_NO_REGISTERED_USERS: NTSTATUS = 0xC038002A_u32 as _; +pub const STATUS_VOLMGR_NO_SUCH_USER: NTSTATUS = 0xC038002B_u32 as _; +pub const STATUS_VOLMGR_NO_VALID_LOG_COPIES: NTSTATUS = 0xC0380058_u32 as _; +pub const STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID: NTSTATUS = 0xC038005A_u32 as _; +pub const STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID: NTSTATUS = 0xC0380055_u32 as _; +pub const STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID: NTSTATUS = 0xC0380054_u32 as _; +pub const STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID: NTSTATUS = 0xC038004D_u32 as _; +pub const STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID: NTSTATUS = 0xC038002D_u32 as _; +pub const STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID: NTSTATUS = 0xC038002E_u32 as _; +pub const STATUS_VOLMGR_PACK_CONFIG_OFFLINE: NTSTATUS = 0xC0380050_u32 as _; +pub const STATUS_VOLMGR_PACK_CONFIG_ONLINE: NTSTATUS = 0xC0380051_u32 as _; +pub const STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED: NTSTATUS = 0xC0380004_u32 as _; +pub const STATUS_VOLMGR_PACK_DUPLICATE: NTSTATUS = 0xC038002F_u32 as _; +pub const STATUS_VOLMGR_PACK_HAS_QUORUM: NTSTATUS = 0xC0380034_u32 as _; +pub const STATUS_VOLMGR_PACK_ID_INVALID: NTSTATUS = 0xC0380030_u32 as _; +pub const STATUS_VOLMGR_PACK_INVALID: NTSTATUS = 0xC0380031_u32 as _; +pub const STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED: NTSTATUS = 0xC0380053_u32 as _; +pub const STATUS_VOLMGR_PACK_NAME_INVALID: NTSTATUS = 0xC0380032_u32 as _; +pub const STATUS_VOLMGR_PACK_OFFLINE: NTSTATUS = 0xC0380033_u32 as _; +pub const STATUS_VOLMGR_PACK_WITHOUT_QUORUM: NTSTATUS = 0xC0380035_u32 as _; +pub const STATUS_VOLMGR_PARTITION_STYLE_INVALID: NTSTATUS = 0xC0380036_u32 as _; +pub const STATUS_VOLMGR_PARTITION_UPDATE_FAILED: NTSTATUS = 0xC0380037_u32 as _; +pub const STATUS_VOLMGR_PLEX_INDEX_DUPLICATE: NTSTATUS = 0xC0380039_u32 as _; +pub const STATUS_VOLMGR_PLEX_INDEX_INVALID: NTSTATUS = 0xC038003A_u32 as _; +pub const STATUS_VOLMGR_PLEX_IN_SYNC: NTSTATUS = 0xC0380038_u32 as _; +pub const STATUS_VOLMGR_PLEX_LAST_ACTIVE: NTSTATUS = 0xC038003B_u32 as _; +pub const STATUS_VOLMGR_PLEX_MISSING: NTSTATUS = 0xC038003C_u32 as _; +pub const STATUS_VOLMGR_PLEX_NOT_RAID5: NTSTATUS = 0xC038003F_u32 as _; +pub const STATUS_VOLMGR_PLEX_NOT_SIMPLE: NTSTATUS = 0xC0380040_u32 as _; +pub const STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED: NTSTATUS = 0xC0380057_u32 as _; +pub const STATUS_VOLMGR_PLEX_REGENERATING: NTSTATUS = 0xC038003D_u32 as _; +pub const STATUS_VOLMGR_PLEX_TYPE_INVALID: NTSTATUS = 0xC038003E_u32 as _; +pub const STATUS_VOLMGR_PRIMARY_PACK_PRESENT: NTSTATUS = 0xC0380059_u32 as _; +pub const STATUS_VOLMGR_RAID5_NOT_SUPPORTED: NTSTATUS = 0xC038005C_u32 as _; +pub const STATUS_VOLMGR_STRUCTURE_SIZE_INVALID: NTSTATUS = 0xC0380041_u32 as _; +pub const STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS: NTSTATUS = 0xC0380042_u32 as _; +pub const STATUS_VOLMGR_TRANSACTION_IN_PROGRESS: NTSTATUS = 0xC0380043_u32 as _; +pub const STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE: NTSTATUS = 0xC0380044_u32 as _; +pub const STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK: NTSTATUS = 0xC0380045_u32 as _; +pub const STATUS_VOLMGR_VOLUME_ID_INVALID: NTSTATUS = 0xC0380046_u32 as _; +pub const STATUS_VOLMGR_VOLUME_LENGTH_INVALID: NTSTATUS = 0xC0380047_u32 as _; +pub const STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE: NTSTATUS = 0xC0380048_u32 as _; +pub const STATUS_VOLMGR_VOLUME_MIRRORED: NTSTATUS = 0xC0380056_u32 as _; +pub const STATUS_VOLMGR_VOLUME_NOT_MIRRORED: NTSTATUS = 0xC0380049_u32 as _; +pub const STATUS_VOLMGR_VOLUME_NOT_RETAINED: NTSTATUS = 0xC038004A_u32 as _; +pub const STATUS_VOLMGR_VOLUME_OFFLINE: NTSTATUS = 0xC038004B_u32 as _; +pub const STATUS_VOLMGR_VOLUME_RETAINED: NTSTATUS = 0xC038004C_u32 as _; +pub const STATUS_VOLSNAP_ACTIVATION_TIMEOUT: NTSTATUS = 0xC0500004_u32 as _; +pub const STATUS_VOLSNAP_BOOTFILE_NOT_VALID: NTSTATUS = 0xC0500003_u32 as _; +pub const STATUS_VOLSNAP_HIBERNATE_READY: NTSTATUS = 0x125_u32 as _; +pub const STATUS_VOLSNAP_NO_BYPASSIO_WITH_SNAPSHOT: NTSTATUS = 0xC0500005_u32 as _; +pub const STATUS_VOLSNAP_PREPARE_HIBERNATE: NTSTATUS = 0xC0000407_u32 as _; +pub const STATUS_VOLUME_DIRTY: NTSTATUS = 0xC0000806_u32 as _; +pub const STATUS_VOLUME_DISMOUNTED: NTSTATUS = 0xC000026E_u32 as _; +pub const STATUS_VOLUME_MOUNTED: NTSTATUS = 0x109_u32 as _; +pub const STATUS_VOLUME_NOT_CLUSTER_ALIGNED: NTSTATUS = 0xC00004A4_u32 as _; +pub const STATUS_VOLUME_NOT_SUPPORTED: NTSTATUS = 0xC00004C6_u32 as _; +pub const STATUS_VOLUME_NOT_UPGRADED: NTSTATUS = 0xC000029C_u32 as _; +pub const STATUS_VOLUME_UPGRADE_DISABLED: NTSTATUS = 0xC00004DB_u32 as _; +pub const STATUS_VOLUME_UPGRADE_DISABLED_TILL_OS_DOWNGRADE_EXPIRED: NTSTATUS = 0xC00004DC_u32 as _; +pub const STATUS_VOLUME_UPGRADE_NOT_NEEDED: NTSTATUS = 0xC00004D9_u32 as _; +pub const STATUS_VOLUME_UPGRADE_PENDING: NTSTATUS = 0xC00004DA_u32 as _; +pub const STATUS_VOLUME_WRITE_ACCESS_DENIED: NTSTATUS = 0xC00004D3_u32 as _; +pub const STATUS_VRF_VOLATILE_CFG_AND_IO_ENABLED: NTSTATUS = 0xC0000C08_u32 as _; +pub const STATUS_VRF_VOLATILE_NMI_REGISTERED: NTSTATUS = 0xC0000C0E_u32 as _; +pub const STATUS_VRF_VOLATILE_NOT_RUNNABLE_SYSTEM: NTSTATUS = 0xC0000C0B_u32 as _; +pub const STATUS_VRF_VOLATILE_NOT_STOPPABLE: NTSTATUS = 0xC0000C09_u32 as _; +pub const STATUS_VRF_VOLATILE_NOT_SUPPORTED_RULECLASS: NTSTATUS = 0xC0000C0C_u32 as _; +pub const STATUS_VRF_VOLATILE_PROTECTED_DRIVER: NTSTATUS = 0xC0000C0D_u32 as _; +pub const STATUS_VRF_VOLATILE_SAFE_MODE: NTSTATUS = 0xC0000C0A_u32 as _; +pub const STATUS_VRF_VOLATILE_SETTINGS_CONFLICT: NTSTATUS = 0xC0000C0F_u32 as _; +pub const STATUS_VSM_DMA_PROTECTION_NOT_IN_USE: NTSTATUS = 0xC0450001_u32 as _; +pub const STATUS_VSM_NOT_INITIALIZED: NTSTATUS = 0xC0450000_u32 as _; +pub const STATUS_WAIT_0: NTSTATUS = 0x0_u32 as _; +pub const STATUS_WAIT_1: NTSTATUS = 0x1_u32 as _; +pub const STATUS_WAIT_2: NTSTATUS = 0x2_u32 as _; +pub const STATUS_WAIT_3: NTSTATUS = 0x3_u32 as _; +pub const STATUS_WAIT_63: NTSTATUS = 0x3F_u32 as _; +pub const STATUS_WAIT_FOR_OPLOCK: NTSTATUS = 0x367_u32 as _; +pub const STATUS_WAKE_SYSTEM: NTSTATUS = 0x40000294_u32 as _; +pub const STATUS_WAKE_SYSTEM_DEBUGGER: NTSTATUS = 0x80000007_u32 as _; +pub const STATUS_WAS_LOCKED: NTSTATUS = 0x40000019_u32 as _; +pub const STATUS_WAS_UNLOCKED: NTSTATUS = 0x40000017_u32 as _; +pub const STATUS_WEAK_WHFBKEY_BLOCKED: NTSTATUS = 0xC00001B3_u32 as _; +pub const STATUS_WIM_NOT_BOOTABLE: NTSTATUS = 0xC0000487_u32 as _; +pub const STATUS_WMI_ALREADY_DISABLED: NTSTATUS = 0xC0000302_u32 as _; +pub const STATUS_WMI_ALREADY_ENABLED: NTSTATUS = 0xC0000303_u32 as _; +pub const STATUS_WMI_GUID_DISCONNECTED: NTSTATUS = 0xC0000301_u32 as _; +pub const STATUS_WMI_GUID_NOT_FOUND: NTSTATUS = 0xC0000295_u32 as _; +pub const STATUS_WMI_INSTANCE_NOT_FOUND: NTSTATUS = 0xC0000296_u32 as _; +pub const STATUS_WMI_ITEMID_NOT_FOUND: NTSTATUS = 0xC0000297_u32 as _; +pub const STATUS_WMI_NOT_SUPPORTED: NTSTATUS = 0xC00002DD_u32 as _; +pub const STATUS_WMI_READ_ONLY: NTSTATUS = 0xC00002C6_u32 as _; +pub const STATUS_WMI_SET_FAILURE: NTSTATUS = 0xC00002C7_u32 as _; +pub const STATUS_WMI_TRY_AGAIN: NTSTATUS = 0xC0000298_u32 as _; +pub const STATUS_WOF_FILE_RESOURCE_TABLE_CORRUPT: NTSTATUS = 0xC000A2A7_u32 as _; +pub const STATUS_WOF_WIM_HEADER_CORRUPT: NTSTATUS = 0xC000A2A5_u32 as _; +pub const STATUS_WOF_WIM_RESOURCE_TABLE_CORRUPT: NTSTATUS = 0xC000A2A6_u32 as _; +pub const STATUS_WORKING_SET_LIMIT_RANGE: NTSTATUS = 0x40000002_u32 as _; +pub const STATUS_WORKING_SET_QUOTA: NTSTATUS = 0xC00000A1_u32 as _; +pub const STATUS_WOW_ASSERTION: NTSTATUS = 0xC0009898_u32 as _; +pub const STATUS_WRONG_COMPARTMENT: NTSTATUS = 0xC000A085_u32 as _; +pub const STATUS_WRONG_CREDENTIAL_HANDLE: NTSTATUS = 0xC00002F2_u32 as _; +pub const STATUS_WRONG_EFS: NTSTATUS = 0xC000028F_u32 as _; +pub const STATUS_WRONG_PASSWORD_CORE: NTSTATUS = 0xC0000149_u32 as _; +pub const STATUS_WRONG_VOLUME: NTSTATUS = 0xC0000012_u32 as _; +pub const STATUS_WX86_BREAKPOINT: NTSTATUS = 0x4000001F_u32 as _; +pub const STATUS_WX86_CONTINUE: NTSTATUS = 0x4000001D_u32 as _; +pub const STATUS_WX86_CREATEWX86TIB: NTSTATUS = 0x40000028_u32 as _; +pub const STATUS_WX86_EXCEPTION_CHAIN: NTSTATUS = 0x40000022_u32 as _; +pub const STATUS_WX86_EXCEPTION_CONTINUE: NTSTATUS = 0x40000020_u32 as _; +pub const STATUS_WX86_EXCEPTION_LASTCHANCE: NTSTATUS = 0x40000021_u32 as _; +pub const STATUS_WX86_FLOAT_STACK_CHECK: NTSTATUS = 0xC0000270_u32 as _; +pub const STATUS_WX86_INTERNAL_ERROR: NTSTATUS = 0xC000026F_u32 as _; +pub const STATUS_WX86_SINGLE_STEP: NTSTATUS = 0x4000001E_u32 as _; +pub const STATUS_WX86_UNSIMULATE: NTSTATUS = 0x4000001C_u32 as _; +pub const STATUS_XMLDSIG_ERROR: NTSTATUS = 0xC000A084_u32 as _; +pub const STATUS_XML_ENCODING_MISMATCH: NTSTATUS = 0xC0150021_u32 as _; +pub const STATUS_XML_PARSE_ERROR: NTSTATUS = 0xC000A083_u32 as _; +pub const STG_E_ABNORMALAPIEXIT: windows_sys::core::HRESULT = 0x800300FA_u32 as _; +pub const STG_E_ACCESSDENIED: windows_sys::core::HRESULT = 0x80030005_u32 as _; +pub const STG_E_BADBASEADDRESS: windows_sys::core::HRESULT = 0x80030110_u32 as _; +pub const STG_E_CANTSAVE: windows_sys::core::HRESULT = 0x80030103_u32 as _; +pub const STG_E_CSS_AUTHENTICATION_FAILURE: windows_sys::core::HRESULT = 0x80030306_u32 as _; +pub const STG_E_CSS_KEY_NOT_ESTABLISHED: windows_sys::core::HRESULT = 0x80030308_u32 as _; +pub const STG_E_CSS_KEY_NOT_PRESENT: windows_sys::core::HRESULT = 0x80030307_u32 as _; +pub const STG_E_CSS_REGION_MISMATCH: windows_sys::core::HRESULT = 0x8003030A_u32 as _; +pub const STG_E_CSS_SCRAMBLED_SECTOR: windows_sys::core::HRESULT = 0x80030309_u32 as _; +pub const STG_E_DEVICE_UNRESPONSIVE: windows_sys::core::HRESULT = 0x8003020A_u32 as _; +pub const STG_E_DISKISWRITEPROTECTED: windows_sys::core::HRESULT = 0x80030013_u32 as _; +pub const STG_E_DOCFILECORRUPT: windows_sys::core::HRESULT = 0x80030109_u32 as _; +pub const STG_E_DOCFILETOOLARGE: windows_sys::core::HRESULT = 0x80030111_u32 as _; +pub const STG_E_EXTANTMARSHALLINGS: windows_sys::core::HRESULT = 0x80030108_u32 as _; +pub const STG_E_FILEALREADYEXISTS: windows_sys::core::HRESULT = 0x80030050_u32 as _; +pub const STG_E_FILENOTFOUND: windows_sys::core::HRESULT = 0x80030002_u32 as _; +pub const STG_E_FIRMWARE_IMAGE_INVALID: windows_sys::core::HRESULT = 0x80030209_u32 as _; +pub const STG_E_FIRMWARE_SLOT_INVALID: windows_sys::core::HRESULT = 0x80030208_u32 as _; +pub const STG_E_INCOMPLETE: windows_sys::core::HRESULT = 0x80030201_u32 as _; +pub const STG_E_INSUFFICIENTMEMORY: windows_sys::core::HRESULT = 0x80030008_u32 as _; +pub const STG_E_INUSE: windows_sys::core::HRESULT = 0x80030100_u32 as _; +pub const STG_E_INVALIDFLAG: windows_sys::core::HRESULT = 0x800300FF_u32 as _; +pub const STG_E_INVALIDFUNCTION: windows_sys::core::HRESULT = 0x80030001_u32 as _; +pub const STG_E_INVALIDHANDLE: windows_sys::core::HRESULT = 0x80030006_u32 as _; +pub const STG_E_INVALIDHEADER: windows_sys::core::HRESULT = 0x800300FB_u32 as _; +pub const STG_E_INVALIDNAME: windows_sys::core::HRESULT = 0x800300FC_u32 as _; +pub const STG_E_INVALIDPARAMETER: windows_sys::core::HRESULT = 0x80030057_u32 as _; +pub const STG_E_INVALIDPOINTER: windows_sys::core::HRESULT = 0x80030009_u32 as _; +pub const STG_E_LOCKVIOLATION: windows_sys::core::HRESULT = 0x80030021_u32 as _; +pub const STG_E_MEDIUMFULL: windows_sys::core::HRESULT = 0x80030070_u32 as _; +pub const STG_E_NOMOREFILES: windows_sys::core::HRESULT = 0x80030012_u32 as _; +pub const STG_E_NOTCURRENT: windows_sys::core::HRESULT = 0x80030101_u32 as _; +pub const STG_E_NOTFILEBASEDSTORAGE: windows_sys::core::HRESULT = 0x80030107_u32 as _; +pub const STG_E_NOTSIMPLEFORMAT: windows_sys::core::HRESULT = 0x80030112_u32 as _; +pub const STG_E_OLDDLL: windows_sys::core::HRESULT = 0x80030105_u32 as _; +pub const STG_E_OLDFORMAT: windows_sys::core::HRESULT = 0x80030104_u32 as _; +pub const STG_E_PATHNOTFOUND: windows_sys::core::HRESULT = 0x80030003_u32 as _; +pub const STG_E_PROPSETMISMATCHED: windows_sys::core::HRESULT = 0x800300F0_u32 as _; +pub const STG_E_READFAULT: windows_sys::core::HRESULT = 0x8003001E_u32 as _; +pub const STG_E_RESETS_EXHAUSTED: windows_sys::core::HRESULT = 0x8003030B_u32 as _; +pub const STG_E_REVERTED: windows_sys::core::HRESULT = 0x80030102_u32 as _; +pub const STG_E_SEEKERROR: windows_sys::core::HRESULT = 0x80030019_u32 as _; +pub const STG_E_SHAREREQUIRED: windows_sys::core::HRESULT = 0x80030106_u32 as _; +pub const STG_E_SHAREVIOLATION: windows_sys::core::HRESULT = 0x80030020_u32 as _; +pub const STG_E_STATUS_COPY_PROTECTION_FAILURE: windows_sys::core::HRESULT = 0x80030305_u32 as _; +pub const STG_E_TERMINATED: windows_sys::core::HRESULT = 0x80030202_u32 as _; +pub const STG_E_TOOMANYOPENFILES: windows_sys::core::HRESULT = 0x80030004_u32 as _; +pub const STG_E_UNIMPLEMENTEDFUNCTION: windows_sys::core::HRESULT = 0x800300FE_u32 as _; +pub const STG_E_UNKNOWN: windows_sys::core::HRESULT = 0x800300FD_u32 as _; +pub const STG_E_WRITEFAULT: windows_sys::core::HRESULT = 0x8003001D_u32 as _; +pub const STG_S_BLOCK: windows_sys::core::HRESULT = 0x30201_u32 as _; +pub const STG_S_CANNOTCONSOLIDATE: windows_sys::core::HRESULT = 0x30206_u32 as _; +pub const STG_S_CONSOLIDATIONFAILED: windows_sys::core::HRESULT = 0x30205_u32 as _; +pub const STG_S_CONVERTED: windows_sys::core::HRESULT = 0x30200_u32 as _; +pub const STG_S_MONITORING: windows_sys::core::HRESULT = 0x30203_u32 as _; +pub const STG_S_MULTIPLEOPENS: windows_sys::core::HRESULT = 0x30204_u32 as _; +pub const STG_S_POWER_CYCLE_REQUIRED: windows_sys::core::HRESULT = 0x30207_u32 as _; +pub const STG_S_RETRYNOW: windows_sys::core::HRESULT = 0x30202_u32 as _; +pub const STILL_ACTIVE: NTSTATUS = 0x103_u32 as _; +pub const STORE_ERROR_LICENSE_REVOKED: i32 = 15864i32; +pub const STORE_ERROR_PENDING_COM_TRANSACTION: i32 = 15863i32; +pub const STORE_ERROR_UNLICENSED: i32 = 15861i32; +pub const STORE_ERROR_UNLICENSED_USER: i32 = 15862i32; +pub const STRICT: u32 = 1u32; +pub const SUCCESS: u32 = 0u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEMTIME { + pub wYear: u16, + pub wMonth: u16, + pub wDayOfWeek: u16, + pub wDay: u16, + pub wHour: u16, + pub wMinute: u16, + pub wSecond: u16, + pub wMilliseconds: u16, +} +pub const S_APPLICATION_ACTIVATION_ERROR_HANDLED_BY_DIALOG: windows_sys::core::HRESULT = 0x270259_u32 as _; +pub const S_FALSE: windows_sys::core::HRESULT = 0x1_u32 as _; +pub const S_OK: windows_sys::core::HRESULT = 0x0_u32 as _; +pub const S_STORE_LAUNCHED_FOR_REMEDIATION: windows_sys::core::HRESULT = 0x270258_u32 as _; +pub const TBSIMP_E_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x80290200_u32 as _; +pub const TBSIMP_E_CLEANUP_FAILED: windows_sys::core::HRESULT = 0x80290201_u32 as _; +pub const TBSIMP_E_COMMAND_CANCELED: windows_sys::core::HRESULT = 0x8029020B_u32 as _; +pub const TBSIMP_E_COMMAND_FAILED: windows_sys::core::HRESULT = 0x80290211_u32 as _; +pub const TBSIMP_E_DUPLICATE_VHANDLE: windows_sys::core::HRESULT = 0x80290206_u32 as _; +pub const TBSIMP_E_HASH_BAD_KEY: windows_sys::core::HRESULT = 0x80290205_u32 as _; +pub const TBSIMP_E_HASH_TABLE_FULL: windows_sys::core::HRESULT = 0x80290216_u32 as _; +pub const TBSIMP_E_INVALID_CONTEXT_HANDLE: windows_sys::core::HRESULT = 0x80290202_u32 as _; +pub const TBSIMP_E_INVALID_CONTEXT_PARAM: windows_sys::core::HRESULT = 0x80290203_u32 as _; +pub const TBSIMP_E_INVALID_OUTPUT_POINTER: windows_sys::core::HRESULT = 0x80290207_u32 as _; +pub const TBSIMP_E_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x80290208_u32 as _; +pub const TBSIMP_E_INVALID_RESOURCE: windows_sys::core::HRESULT = 0x80290214_u32 as _; +pub const TBSIMP_E_LIST_NOT_FOUND: windows_sys::core::HRESULT = 0x8029020E_u32 as _; +pub const TBSIMP_E_LIST_NO_MORE_ITEMS: windows_sys::core::HRESULT = 0x8029020D_u32 as _; +pub const TBSIMP_E_NOTHING_TO_UNLOAD: windows_sys::core::HRESULT = 0x80290215_u32 as _; +pub const TBSIMP_E_NOT_ENOUGH_SPACE: windows_sys::core::HRESULT = 0x8029020F_u32 as _; +pub const TBSIMP_E_NOT_ENOUGH_TPM_CONTEXTS: windows_sys::core::HRESULT = 0x80290210_u32 as _; +pub const TBSIMP_E_NO_EVENT_LOG: windows_sys::core::HRESULT = 0x8029021B_u32 as _; +pub const TBSIMP_E_OUT_OF_MEMORY: windows_sys::core::HRESULT = 0x8029020C_u32 as _; +pub const TBSIMP_E_PPI_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80290219_u32 as _; +pub const TBSIMP_E_RESOURCE_EXPIRED: windows_sys::core::HRESULT = 0x80290213_u32 as _; +pub const TBSIMP_E_RPC_INIT_FAILED: windows_sys::core::HRESULT = 0x80290209_u32 as _; +pub const TBSIMP_E_SCHEDULER_NOT_RUNNING: windows_sys::core::HRESULT = 0x8029020A_u32 as _; +pub const TBSIMP_E_TOO_MANY_RESOURCES: windows_sys::core::HRESULT = 0x80290218_u32 as _; +pub const TBSIMP_E_TOO_MANY_TBS_CONTEXTS: windows_sys::core::HRESULT = 0x80290217_u32 as _; +pub const TBSIMP_E_TPM_ERROR: windows_sys::core::HRESULT = 0x80290204_u32 as _; +pub const TBSIMP_E_TPM_INCOMPATIBLE: windows_sys::core::HRESULT = 0x8029021A_u32 as _; +pub const TBSIMP_E_UNKNOWN_ORDINAL: windows_sys::core::HRESULT = 0x80290212_u32 as _; +pub const TBS_E_ACCESS_DENIED: windows_sys::core::HRESULT = 0x80284012_u32 as _; +pub const TBS_E_BAD_PARAMETER: windows_sys::core::HRESULT = 0x80284002_u32 as _; +pub const TBS_E_BUFFER_TOO_LARGE: windows_sys::core::HRESULT = 0x8028400E_u32 as _; +pub const TBS_E_COMMAND_CANCELED: windows_sys::core::HRESULT = 0x8028400D_u32 as _; +pub const TBS_E_INSUFFICIENT_BUFFER: windows_sys::core::HRESULT = 0x80284005_u32 as _; +pub const TBS_E_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80284001_u32 as _; +pub const TBS_E_INVALID_CONTEXT: windows_sys::core::HRESULT = 0x80284004_u32 as _; +pub const TBS_E_INVALID_CONTEXT_PARAM: windows_sys::core::HRESULT = 0x80284007_u32 as _; +pub const TBS_E_INVALID_OUTPUT_POINTER: windows_sys::core::HRESULT = 0x80284003_u32 as _; +pub const TBS_E_IOERROR: windows_sys::core::HRESULT = 0x80284006_u32 as _; +pub const TBS_E_NO_EVENT_LOG: windows_sys::core::HRESULT = 0x80284011_u32 as _; +pub const TBS_E_OWNERAUTH_NOT_FOUND: windows_sys::core::HRESULT = 0x80284015_u32 as _; +pub const TBS_E_PPI_FUNCTION_UNSUPPORTED: windows_sys::core::HRESULT = 0x80284014_u32 as _; +pub const TBS_E_PPI_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8028400C_u32 as _; +pub const TBS_E_PROVISIONING_INCOMPLETE: windows_sys::core::HRESULT = 0x80284016_u32 as _; +pub const TBS_E_PROVISIONING_NOT_ALLOWED: windows_sys::core::HRESULT = 0x80284013_u32 as _; +pub const TBS_E_SERVICE_DISABLED: windows_sys::core::HRESULT = 0x80284010_u32 as _; +pub const TBS_E_SERVICE_NOT_RUNNING: windows_sys::core::HRESULT = 0x80284008_u32 as _; +pub const TBS_E_SERVICE_START_PENDING: windows_sys::core::HRESULT = 0x8028400B_u32 as _; +pub const TBS_E_TOO_MANY_RESOURCES: windows_sys::core::HRESULT = 0x8028400A_u32 as _; +pub const TBS_E_TOO_MANY_TBS_CONTEXTS: windows_sys::core::HRESULT = 0x80284009_u32 as _; +pub const TBS_E_TPM_NOT_FOUND: windows_sys::core::HRESULT = 0x8028400F_u32 as _; +pub const TPC_E_INITIALIZE_FAIL: windows_sys::core::HRESULT = 0x80040223_u32 as _; +pub const TPC_E_INVALID_CONFIGURATION: windows_sys::core::HRESULT = 0x80040239_u32 as _; +pub const TPC_E_INVALID_DATA_FROM_RECOGNIZER: windows_sys::core::HRESULT = 0x8004023A_u32 as _; +pub const TPC_E_INVALID_INPUT_RECT: windows_sys::core::HRESULT = 0x80040219_u32 as _; +pub const TPC_E_INVALID_PACKET_DESCRIPTION: windows_sys::core::HRESULT = 0x80040233_u32 as _; +pub const TPC_E_INVALID_PROPERTY: windows_sys::core::HRESULT = 0x80040241_u32 as _; +pub const TPC_E_INVALID_RIGHTS: windows_sys::core::HRESULT = 0x80040236_u32 as _; +pub const TPC_E_INVALID_STROKE: windows_sys::core::HRESULT = 0x80040222_u32 as _; +pub const TPC_E_NOT_RELEVANT: windows_sys::core::HRESULT = 0x80040232_u32 as _; +pub const TPC_E_NO_DEFAULT_TABLET: windows_sys::core::HRESULT = 0x80040212_u32 as _; +pub const TPC_E_OUT_OF_ORDER_CALL: windows_sys::core::HRESULT = 0x80040237_u32 as _; +pub const TPC_E_QUEUE_FULL: windows_sys::core::HRESULT = 0x80040238_u32 as _; +pub const TPC_E_RECOGNIZER_NOT_REGISTERED: windows_sys::core::HRESULT = 0x80040235_u32 as _; +pub const TPC_E_UNKNOWN_PROPERTY: windows_sys::core::HRESULT = 0x8004021B_u32 as _; +pub const TPC_S_INTERRUPTED: windows_sys::core::HRESULT = 0x40253_u32 as _; +pub const TPC_S_NO_DATA_TO_PROCESS: windows_sys::core::HRESULT = 0x40254_u32 as _; +pub const TPC_S_TRUNCATED: windows_sys::core::HRESULT = 0x40252_u32 as _; +pub const TPMAPI_E_ACCESS_DENIED: windows_sys::core::HRESULT = 0x80290108_u32 as _; +pub const TPMAPI_E_AUTHORIZATION_FAILED: windows_sys::core::HRESULT = 0x80290109_u32 as _; +pub const TPMAPI_E_AUTHORIZATION_REVOKED: windows_sys::core::HRESULT = 0x80290126_u32 as _; +pub const TPMAPI_E_AUTHORIZING_KEY_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80290128_u32 as _; +pub const TPMAPI_E_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x80290106_u32 as _; +pub const TPMAPI_E_EMPTY_TCG_LOG: windows_sys::core::HRESULT = 0x8029011A_u32 as _; +pub const TPMAPI_E_ENCRYPTION_FAILED: windows_sys::core::HRESULT = 0x80290110_u32 as _; +pub const TPMAPI_E_ENDORSEMENT_AUTH_NOT_NULL: windows_sys::core::HRESULT = 0x80290125_u32 as _; +pub const TPMAPI_E_FIPS_RNG_CHECK_FAILED: windows_sys::core::HRESULT = 0x80290119_u32 as _; +pub const TPMAPI_E_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80290107_u32 as _; +pub const TPMAPI_E_INVALID_AUTHORIZATION_SIGNATURE: windows_sys::core::HRESULT = 0x80290129_u32 as _; +pub const TPMAPI_E_INVALID_CONTEXT_HANDLE: windows_sys::core::HRESULT = 0x8029010A_u32 as _; +pub const TPMAPI_E_INVALID_CONTEXT_PARAMS: windows_sys::core::HRESULT = 0x80290115_u32 as _; +pub const TPMAPI_E_INVALID_DELEGATE_BLOB: windows_sys::core::HRESULT = 0x80290114_u32 as _; +pub const TPMAPI_E_INVALID_ENCODING: windows_sys::core::HRESULT = 0x8029010E_u32 as _; +pub const TPMAPI_E_INVALID_KEY_BLOB: windows_sys::core::HRESULT = 0x80290116_u32 as _; +pub const TPMAPI_E_INVALID_KEY_PARAMS: windows_sys::core::HRESULT = 0x80290111_u32 as _; +pub const TPMAPI_E_INVALID_KEY_SIZE: windows_sys::core::HRESULT = 0x8029010F_u32 as _; +pub const TPMAPI_E_INVALID_MIGRATION_AUTHORIZATION_BLOB: windows_sys::core::HRESULT = 0x80290112_u32 as _; +pub const TPMAPI_E_INVALID_OUTPUT_POINTER: windows_sys::core::HRESULT = 0x80290103_u32 as _; +pub const TPMAPI_E_INVALID_OWNER_AUTH: windows_sys::core::HRESULT = 0x80290118_u32 as _; +pub const TPMAPI_E_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x80290104_u32 as _; +pub const TPMAPI_E_INVALID_PCR_DATA: windows_sys::core::HRESULT = 0x80290117_u32 as _; +pub const TPMAPI_E_INVALID_PCR_INDEX: windows_sys::core::HRESULT = 0x80290113_u32 as _; +pub const TPMAPI_E_INVALID_POLICYAUTH_BLOB_TYPE: windows_sys::core::HRESULT = 0x8029012E_u32 as _; +pub const TPMAPI_E_INVALID_STATE: windows_sys::core::HRESULT = 0x80290100_u32 as _; +pub const TPMAPI_E_INVALID_TCG_LOG_ENTRY: windows_sys::core::HRESULT = 0x8029011B_u32 as _; +pub const TPMAPI_E_INVALID_TPM_VERSION: windows_sys::core::HRESULT = 0x8029012D_u32 as _; +pub const TPMAPI_E_MALFORMED_AUTHORIZATION_KEY: windows_sys::core::HRESULT = 0x80290127_u32 as _; +pub const TPMAPI_E_MALFORMED_AUTHORIZATION_OTHER: windows_sys::core::HRESULT = 0x8029012B_u32 as _; +pub const TPMAPI_E_MALFORMED_AUTHORIZATION_POLICY: windows_sys::core::HRESULT = 0x8029012A_u32 as _; +pub const TPMAPI_E_MESSAGE_TOO_LARGE: windows_sys::core::HRESULT = 0x8029010D_u32 as _; +pub const TPMAPI_E_NOT_ENOUGH_DATA: windows_sys::core::HRESULT = 0x80290101_u32 as _; +pub const TPMAPI_E_NO_AUTHORIZATION_CHAIN_FOUND: windows_sys::core::HRESULT = 0x80290122_u32 as _; +pub const TPMAPI_E_NV_BITS_NOT_DEFINED: windows_sys::core::HRESULT = 0x8029011F_u32 as _; +pub const TPMAPI_E_NV_BITS_NOT_READY: windows_sys::core::HRESULT = 0x80290120_u32 as _; +pub const TPMAPI_E_OUT_OF_MEMORY: windows_sys::core::HRESULT = 0x80290105_u32 as _; +pub const TPMAPI_E_OWNER_AUTH_NOT_NULL: windows_sys::core::HRESULT = 0x80290124_u32 as _; +pub const TPMAPI_E_POLICY_DENIES_OPERATION: windows_sys::core::HRESULT = 0x8029011E_u32 as _; +pub const TPMAPI_E_SEALING_KEY_CHANGED: windows_sys::core::HRESULT = 0x8029012C_u32 as _; +pub const TPMAPI_E_SEALING_KEY_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80290121_u32 as _; +pub const TPMAPI_E_SVN_COUNTER_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x80290123_u32 as _; +pub const TPMAPI_E_TBS_COMMUNICATION_ERROR: windows_sys::core::HRESULT = 0x8029010B_u32 as _; +pub const TPMAPI_E_TCG_INVALID_DIGEST_ENTRY: windows_sys::core::HRESULT = 0x8029011D_u32 as _; +pub const TPMAPI_E_TCG_SEPARATOR_ABSENT: windows_sys::core::HRESULT = 0x8029011C_u32 as _; +pub const TPMAPI_E_TOO_MUCH_DATA: windows_sys::core::HRESULT = 0x80290102_u32 as _; +pub const TPMAPI_E_TPM_COMMAND_ERROR: windows_sys::core::HRESULT = 0x8029010C_u32 as _; +pub const TPM_20_E_ASYMMETRIC: windows_sys::core::HRESULT = 0x80280081_u32 as _; +pub const TPM_20_E_ATTRIBUTES: windows_sys::core::HRESULT = 0x80280082_u32 as _; +pub const TPM_20_E_AUTHSIZE: windows_sys::core::HRESULT = 0x80280144_u32 as _; +pub const TPM_20_E_AUTH_CONTEXT: windows_sys::core::HRESULT = 0x80280145_u32 as _; +pub const TPM_20_E_AUTH_FAIL: windows_sys::core::HRESULT = 0x8028008E_u32 as _; +pub const TPM_20_E_AUTH_MISSING: windows_sys::core::HRESULT = 0x80280125_u32 as _; +pub const TPM_20_E_AUTH_TYPE: windows_sys::core::HRESULT = 0x80280124_u32 as _; +pub const TPM_20_E_AUTH_UNAVAILABLE: windows_sys::core::HRESULT = 0x8028012F_u32 as _; +pub const TPM_20_E_BAD_AUTH: windows_sys::core::HRESULT = 0x802800A2_u32 as _; +pub const TPM_20_E_BAD_CONTEXT: windows_sys::core::HRESULT = 0x80280150_u32 as _; +pub const TPM_20_E_BINDING: windows_sys::core::HRESULT = 0x802800A5_u32 as _; +pub const TPM_20_E_CANCELED: windows_sys::core::HRESULT = 0x80280909_u32 as _; +pub const TPM_20_E_COMMAND_CODE: windows_sys::core::HRESULT = 0x80280143_u32 as _; +pub const TPM_20_E_COMMAND_SIZE: windows_sys::core::HRESULT = 0x80280142_u32 as _; +pub const TPM_20_E_CONTEXT_GAP: windows_sys::core::HRESULT = 0x80280901_u32 as _; +pub const TPM_20_E_CPHASH: windows_sys::core::HRESULT = 0x80280151_u32 as _; +pub const TPM_20_E_CURVE: windows_sys::core::HRESULT = 0x802800A6_u32 as _; +pub const TPM_20_E_DISABLED: windows_sys::core::HRESULT = 0x80280120_u32 as _; +pub const TPM_20_E_ECC_CURVE: windows_sys::core::HRESULT = 0x80280123_u32 as _; +pub const TPM_20_E_ECC_POINT: windows_sys::core::HRESULT = 0x802800A7_u32 as _; +pub const TPM_20_E_EXCLUSIVE: windows_sys::core::HRESULT = 0x80280121_u32 as _; +pub const TPM_20_E_EXPIRED: windows_sys::core::HRESULT = 0x802800A3_u32 as _; +pub const TPM_20_E_FAILURE: windows_sys::core::HRESULT = 0x80280101_u32 as _; +pub const TPM_20_E_HANDLE: windows_sys::core::HRESULT = 0x8028008B_u32 as _; +pub const TPM_20_E_HASH: windows_sys::core::HRESULT = 0x80280083_u32 as _; +pub const TPM_20_E_HIERARCHY: windows_sys::core::HRESULT = 0x80280085_u32 as _; +pub const TPM_20_E_HMAC: windows_sys::core::HRESULT = 0x80280119_u32 as _; +pub const TPM_20_E_INITIALIZE: windows_sys::core::HRESULT = 0x80280100_u32 as _; +pub const TPM_20_E_INSUFFICIENT: windows_sys::core::HRESULT = 0x8028009A_u32 as _; +pub const TPM_20_E_INTEGRITY: windows_sys::core::HRESULT = 0x8028009F_u32 as _; +pub const TPM_20_E_KDF: windows_sys::core::HRESULT = 0x8028008C_u32 as _; +pub const TPM_20_E_KEY: windows_sys::core::HRESULT = 0x8028009C_u32 as _; +pub const TPM_20_E_KEY_SIZE: windows_sys::core::HRESULT = 0x80280087_u32 as _; +pub const TPM_20_E_LOCALITY: windows_sys::core::HRESULT = 0x80280907_u32 as _; +pub const TPM_20_E_LOCKOUT: windows_sys::core::HRESULT = 0x80280921_u32 as _; +pub const TPM_20_E_MEMORY: windows_sys::core::HRESULT = 0x80280904_u32 as _; +pub const TPM_20_E_MGF: windows_sys::core::HRESULT = 0x80280088_u32 as _; +pub const TPM_20_E_MODE: windows_sys::core::HRESULT = 0x80280089_u32 as _; +pub const TPM_20_E_NEEDS_TEST: windows_sys::core::HRESULT = 0x80280153_u32 as _; +pub const TPM_20_E_NONCE: windows_sys::core::HRESULT = 0x8028008F_u32 as _; +pub const TPM_20_E_NO_RESULT: windows_sys::core::HRESULT = 0x80280154_u32 as _; +pub const TPM_20_E_NV_AUTHORIZATION: windows_sys::core::HRESULT = 0x80280149_u32 as _; +pub const TPM_20_E_NV_DEFINED: windows_sys::core::HRESULT = 0x8028014C_u32 as _; +pub const TPM_20_E_NV_LOCKED: windows_sys::core::HRESULT = 0x80280148_u32 as _; +pub const TPM_20_E_NV_RANGE: windows_sys::core::HRESULT = 0x80280146_u32 as _; +pub const TPM_20_E_NV_RATE: windows_sys::core::HRESULT = 0x80280920_u32 as _; +pub const TPM_20_E_NV_SIZE: windows_sys::core::HRESULT = 0x80280147_u32 as _; +pub const TPM_20_E_NV_SPACE: windows_sys::core::HRESULT = 0x8028014B_u32 as _; +pub const TPM_20_E_NV_UNAVAILABLE: windows_sys::core::HRESULT = 0x80280923_u32 as _; +pub const TPM_20_E_NV_UNINITIALIZED: windows_sys::core::HRESULT = 0x8028014A_u32 as _; +pub const TPM_20_E_OBJECT_HANDLES: windows_sys::core::HRESULT = 0x80280906_u32 as _; +pub const TPM_20_E_OBJECT_MEMORY: windows_sys::core::HRESULT = 0x80280902_u32 as _; +pub const TPM_20_E_PARENT: windows_sys::core::HRESULT = 0x80280152_u32 as _; +pub const TPM_20_E_PCR: windows_sys::core::HRESULT = 0x80280127_u32 as _; +pub const TPM_20_E_PCR_CHANGED: windows_sys::core::HRESULT = 0x80280128_u32 as _; +pub const TPM_20_E_POLICY: windows_sys::core::HRESULT = 0x80280126_u32 as _; +pub const TPM_20_E_POLICY_CC: windows_sys::core::HRESULT = 0x802800A4_u32 as _; +pub const TPM_20_E_POLICY_FAIL: windows_sys::core::HRESULT = 0x8028009D_u32 as _; +pub const TPM_20_E_PP: windows_sys::core::HRESULT = 0x80280090_u32 as _; +pub const TPM_20_E_PRIVATE: windows_sys::core::HRESULT = 0x8028010B_u32 as _; +pub const TPM_20_E_RANGE: windows_sys::core::HRESULT = 0x8028008D_u32 as _; +pub const TPM_20_E_REBOOT: windows_sys::core::HRESULT = 0x80280130_u32 as _; +pub const TPM_20_E_RESERVED_BITS: windows_sys::core::HRESULT = 0x802800A1_u32 as _; +pub const TPM_20_E_RETRY: windows_sys::core::HRESULT = 0x80280922_u32 as _; +pub const TPM_20_E_SCHEME: windows_sys::core::HRESULT = 0x80280092_u32 as _; +pub const TPM_20_E_SELECTOR: windows_sys::core::HRESULT = 0x80280098_u32 as _; +pub const TPM_20_E_SENSITIVE: windows_sys::core::HRESULT = 0x80280155_u32 as _; +pub const TPM_20_E_SEQUENCE: windows_sys::core::HRESULT = 0x80280103_u32 as _; +pub const TPM_20_E_SESSION_HANDLES: windows_sys::core::HRESULT = 0x80280905_u32 as _; +pub const TPM_20_E_SESSION_MEMORY: windows_sys::core::HRESULT = 0x80280903_u32 as _; +pub const TPM_20_E_SIGNATURE: windows_sys::core::HRESULT = 0x8028009B_u32 as _; +pub const TPM_20_E_SIZE: windows_sys::core::HRESULT = 0x80280095_u32 as _; +pub const TPM_20_E_SYMMETRIC: windows_sys::core::HRESULT = 0x80280096_u32 as _; +pub const TPM_20_E_TAG: windows_sys::core::HRESULT = 0x80280097_u32 as _; +pub const TPM_20_E_TESTING: windows_sys::core::HRESULT = 0x8028090A_u32 as _; +pub const TPM_20_E_TICKET: windows_sys::core::HRESULT = 0x802800A0_u32 as _; +pub const TPM_20_E_TOO_MANY_CONTEXTS: windows_sys::core::HRESULT = 0x8028012E_u32 as _; +pub const TPM_20_E_TYPE: windows_sys::core::HRESULT = 0x8028008A_u32 as _; +pub const TPM_20_E_UNBALANCED: windows_sys::core::HRESULT = 0x80280131_u32 as _; +pub const TPM_20_E_UPGRADE: windows_sys::core::HRESULT = 0x8028012D_u32 as _; +pub const TPM_20_E_VALUE: windows_sys::core::HRESULT = 0x80280084_u32 as _; +pub const TPM_20_E_YIELDED: windows_sys::core::HRESULT = 0x80280908_u32 as _; +pub const TPM_E_AREA_LOCKED: windows_sys::core::HRESULT = 0x8028003C_u32 as _; +pub const TPM_E_ATTESTATION_CHALLENGE_NOT_SET: windows_sys::core::HRESULT = 0x80290412_u32 as _; +pub const TPM_E_AUDITFAILURE: windows_sys::core::HRESULT = 0x80280004_u32 as _; +pub const TPM_E_AUDITFAIL_SUCCESSFUL: windows_sys::core::HRESULT = 0x80280031_u32 as _; +pub const TPM_E_AUDITFAIL_UNSUCCESSFUL: windows_sys::core::HRESULT = 0x80280030_u32 as _; +pub const TPM_E_AUTH2FAIL: windows_sys::core::HRESULT = 0x8028001D_u32 as _; +pub const TPM_E_AUTHFAIL: windows_sys::core::HRESULT = 0x80280001_u32 as _; +pub const TPM_E_AUTH_CONFLICT: windows_sys::core::HRESULT = 0x8028003B_u32 as _; +pub const TPM_E_BADCONTEXT: windows_sys::core::HRESULT = 0x8028005A_u32 as _; +pub const TPM_E_BADINDEX: windows_sys::core::HRESULT = 0x80280002_u32 as _; +pub const TPM_E_BADTAG: windows_sys::core::HRESULT = 0x8028001E_u32 as _; +pub const TPM_E_BAD_ATTRIBUTES: windows_sys::core::HRESULT = 0x80280042_u32 as _; +pub const TPM_E_BAD_COUNTER: windows_sys::core::HRESULT = 0x80280045_u32 as _; +pub const TPM_E_BAD_DATASIZE: windows_sys::core::HRESULT = 0x8028002B_u32 as _; +pub const TPM_E_BAD_DELEGATE: windows_sys::core::HRESULT = 0x80280059_u32 as _; +pub const TPM_E_BAD_HANDLE: windows_sys::core::HRESULT = 0x80280058_u32 as _; +pub const TPM_E_BAD_KEY_PROPERTY: windows_sys::core::HRESULT = 0x80280028_u32 as _; +pub const TPM_E_BAD_LOCALITY: windows_sys::core::HRESULT = 0x8028003D_u32 as _; +pub const TPM_E_BAD_MIGRATION: windows_sys::core::HRESULT = 0x80280029_u32 as _; +pub const TPM_E_BAD_MODE: windows_sys::core::HRESULT = 0x8028002C_u32 as _; +pub const TPM_E_BAD_ORDINAL: windows_sys::core::HRESULT = 0x8028000A_u32 as _; +pub const TPM_E_BAD_PARAMETER: windows_sys::core::HRESULT = 0x80280003_u32 as _; +pub const TPM_E_BAD_PARAM_SIZE: windows_sys::core::HRESULT = 0x80280019_u32 as _; +pub const TPM_E_BAD_PRESENCE: windows_sys::core::HRESULT = 0x8028002D_u32 as _; +pub const TPM_E_BAD_SCHEME: windows_sys::core::HRESULT = 0x8028002A_u32 as _; +pub const TPM_E_BAD_SIGNATURE: windows_sys::core::HRESULT = 0x80280062_u32 as _; +pub const TPM_E_BAD_TYPE: windows_sys::core::HRESULT = 0x80280034_u32 as _; +pub const TPM_E_BAD_VERSION: windows_sys::core::HRESULT = 0x8028002E_u32 as _; +pub const TPM_E_BUFFER_LENGTH_MISMATCH: windows_sys::core::HRESULT = 0x8029041E_u32 as _; +pub const TPM_E_CLAIM_TYPE_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8029041C_u32 as _; +pub const TPM_E_CLEAR_DISABLED: windows_sys::core::HRESULT = 0x80280005_u32 as _; +pub const TPM_E_COMMAND_BLOCKED: windows_sys::core::HRESULT = 0x80280400_u32 as _; +pub const TPM_E_CONTEXT_GAP: windows_sys::core::HRESULT = 0x80280047_u32 as _; +pub const TPM_E_DAA_INPUT_DATA0: windows_sys::core::HRESULT = 0x80280051_u32 as _; +pub const TPM_E_DAA_INPUT_DATA1: windows_sys::core::HRESULT = 0x80280052_u32 as _; +pub const TPM_E_DAA_ISSUER_SETTINGS: windows_sys::core::HRESULT = 0x80280053_u32 as _; +pub const TPM_E_DAA_ISSUER_VALIDITY: windows_sys::core::HRESULT = 0x80280056_u32 as _; +pub const TPM_E_DAA_RESOURCES: windows_sys::core::HRESULT = 0x80280050_u32 as _; +pub const TPM_E_DAA_STAGE: windows_sys::core::HRESULT = 0x80280055_u32 as _; +pub const TPM_E_DAA_TPM_SETTINGS: windows_sys::core::HRESULT = 0x80280054_u32 as _; +pub const TPM_E_DAA_WRONG_W: windows_sys::core::HRESULT = 0x80280057_u32 as _; +pub const TPM_E_DEACTIVATED: windows_sys::core::HRESULT = 0x80280006_u32 as _; +pub const TPM_E_DECRYPT_ERROR: windows_sys::core::HRESULT = 0x80280021_u32 as _; +pub const TPM_E_DEFEND_LOCK_RUNNING: windows_sys::core::HRESULT = 0x80280803_u32 as _; +pub const TPM_E_DELEGATE_ADMIN: windows_sys::core::HRESULT = 0x8028004D_u32 as _; +pub const TPM_E_DELEGATE_FAMILY: windows_sys::core::HRESULT = 0x8028004C_u32 as _; +pub const TPM_E_DELEGATE_LOCK: windows_sys::core::HRESULT = 0x8028004B_u32 as _; +pub const TPM_E_DISABLED: windows_sys::core::HRESULT = 0x80280007_u32 as _; +pub const TPM_E_DISABLED_CMD: windows_sys::core::HRESULT = 0x80280008_u32 as _; +pub const TPM_E_DOING_SELFTEST: windows_sys::core::HRESULT = 0x80280802_u32 as _; +pub const TPM_E_DUPLICATE_VHANDLE: windows_sys::core::HRESULT = 0x80280402_u32 as _; +pub const TPM_E_EMBEDDED_COMMAND_BLOCKED: windows_sys::core::HRESULT = 0x80280403_u32 as _; +pub const TPM_E_EMBEDDED_COMMAND_UNSUPPORTED: windows_sys::core::HRESULT = 0x80280404_u32 as _; +pub const TPM_E_ENCRYPT_ERROR: windows_sys::core::HRESULT = 0x80280020_u32 as _; +pub const TPM_E_ERROR_MASK: windows_sys::core::HRESULT = 0x80280000_u32 as _; +pub const TPM_E_FAIL: windows_sys::core::HRESULT = 0x80280009_u32 as _; +pub const TPM_E_FAILEDSELFTEST: windows_sys::core::HRESULT = 0x8028001C_u32 as _; +pub const TPM_E_FAMILYCOUNT: windows_sys::core::HRESULT = 0x80280040_u32 as _; +pub const TPM_E_INAPPROPRIATE_ENC: windows_sys::core::HRESULT = 0x8028000E_u32 as _; +pub const TPM_E_INAPPROPRIATE_SIG: windows_sys::core::HRESULT = 0x80280027_u32 as _; +pub const TPM_E_INSTALL_DISABLED: windows_sys::core::HRESULT = 0x8028000B_u32 as _; +pub const TPM_E_INVALID_AUTHHANDLE: windows_sys::core::HRESULT = 0x80280022_u32 as _; +pub const TPM_E_INVALID_FAMILY: windows_sys::core::HRESULT = 0x80280037_u32 as _; +pub const TPM_E_INVALID_HANDLE: windows_sys::core::HRESULT = 0x80280401_u32 as _; +pub const TPM_E_INVALID_KEYHANDLE: windows_sys::core::HRESULT = 0x8028000C_u32 as _; +pub const TPM_E_INVALID_KEYUSAGE: windows_sys::core::HRESULT = 0x80280024_u32 as _; +pub const TPM_E_INVALID_OWNER_AUTH: windows_sys::core::HRESULT = 0x80290601_u32 as _; +pub const TPM_E_INVALID_PCR_INFO: windows_sys::core::HRESULT = 0x80280010_u32 as _; +pub const TPM_E_INVALID_POSTINIT: windows_sys::core::HRESULT = 0x80280026_u32 as _; +pub const TPM_E_INVALID_RESOURCE: windows_sys::core::HRESULT = 0x80280035_u32 as _; +pub const TPM_E_INVALID_STRUCTURE: windows_sys::core::HRESULT = 0x80280043_u32 as _; +pub const TPM_E_IOERROR: windows_sys::core::HRESULT = 0x8028001F_u32 as _; +pub const TPM_E_KEYNOTFOUND: windows_sys::core::HRESULT = 0x8028000D_u32 as _; +pub const TPM_E_KEY_ALREADY_FINALIZED: windows_sys::core::HRESULT = 0x80290414_u32 as _; +pub const TPM_E_KEY_NOTSUPPORTED: windows_sys::core::HRESULT = 0x8028003A_u32 as _; +pub const TPM_E_KEY_NOT_AUTHENTICATED: windows_sys::core::HRESULT = 0x80290418_u32 as _; +pub const TPM_E_KEY_NOT_FINALIZED: windows_sys::core::HRESULT = 0x80290411_u32 as _; +pub const TPM_E_KEY_NOT_LOADED: windows_sys::core::HRESULT = 0x8029040F_u32 as _; +pub const TPM_E_KEY_NOT_SIGNING_KEY: windows_sys::core::HRESULT = 0x8029041A_u32 as _; +pub const TPM_E_KEY_OWNER_CONTROL: windows_sys::core::HRESULT = 0x80280044_u32 as _; +pub const TPM_E_KEY_USAGE_POLICY_INVALID: windows_sys::core::HRESULT = 0x80290416_u32 as _; +pub const TPM_E_KEY_USAGE_POLICY_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80290415_u32 as _; +pub const TPM_E_LOCKED_OUT: windows_sys::core::HRESULT = 0x8029041B_u32 as _; +pub const TPM_E_MAXNVWRITES: windows_sys::core::HRESULT = 0x80280048_u32 as _; +pub const TPM_E_MA_AUTHORITY: windows_sys::core::HRESULT = 0x8028005F_u32 as _; +pub const TPM_E_MA_DESTINATION: windows_sys::core::HRESULT = 0x8028005D_u32 as _; +pub const TPM_E_MA_SOURCE: windows_sys::core::HRESULT = 0x8028005E_u32 as _; +pub const TPM_E_MA_TICKET_SIGNATURE: windows_sys::core::HRESULT = 0x8028005C_u32 as _; +pub const TPM_E_MIGRATEFAIL: windows_sys::core::HRESULT = 0x8028000F_u32 as _; +pub const TPM_E_NEEDS_SELFTEST: windows_sys::core::HRESULT = 0x80280801_u32 as _; +pub const TPM_E_NOCONTEXTSPACE: windows_sys::core::HRESULT = 0x80280063_u32 as _; +pub const TPM_E_NOOPERATOR: windows_sys::core::HRESULT = 0x80280049_u32 as _; +pub const TPM_E_NOSPACE: windows_sys::core::HRESULT = 0x80280011_u32 as _; +pub const TPM_E_NOSRK: windows_sys::core::HRESULT = 0x80280012_u32 as _; +pub const TPM_E_NOTFIPS: windows_sys::core::HRESULT = 0x80280036_u32 as _; +pub const TPM_E_NOTLOCAL: windows_sys::core::HRESULT = 0x80280033_u32 as _; +pub const TPM_E_NOTRESETABLE: windows_sys::core::HRESULT = 0x80280032_u32 as _; +pub const TPM_E_NOTSEALED_BLOB: windows_sys::core::HRESULT = 0x80280013_u32 as _; +pub const TPM_E_NOT_FULLWRITE: windows_sys::core::HRESULT = 0x80280046_u32 as _; +pub const TPM_E_NOT_PCR_BOUND: windows_sys::core::HRESULT = 0x80290413_u32 as _; +pub const TPM_E_NO_ENDORSEMENT: windows_sys::core::HRESULT = 0x80280023_u32 as _; +pub const TPM_E_NO_KEY_CERTIFICATION: windows_sys::core::HRESULT = 0x80290410_u32 as _; +pub const TPM_E_NO_NV_PERMISSION: windows_sys::core::HRESULT = 0x80280038_u32 as _; +pub const TPM_E_NO_WRAP_TRANSPORT: windows_sys::core::HRESULT = 0x8028002F_u32 as _; +pub const TPM_E_OWNER_CONTROL: windows_sys::core::HRESULT = 0x8028004F_u32 as _; +pub const TPM_E_OWNER_SET: windows_sys::core::HRESULT = 0x80280014_u32 as _; +pub const TPM_E_PCP_AUTHENTICATION_FAILED: windows_sys::core::HRESULT = 0x80290408_u32 as _; +pub const TPM_E_PCP_AUTHENTICATION_IGNORED: windows_sys::core::HRESULT = 0x80290409_u32 as _; +pub const TPM_E_PCP_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x80290406_u32 as _; +pub const TPM_E_PCP_DEVICE_NOT_READY: windows_sys::core::HRESULT = 0x80290401_u32 as _; +pub const TPM_E_PCP_ERROR_MASK: windows_sys::core::HRESULT = 0x80290400_u32 as _; +pub const TPM_E_PCP_FLAG_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80290404_u32 as _; +pub const TPM_E_PCP_IFX_RSA_KEY_CREATION_BLOCKED: windows_sys::core::HRESULT = 0x8029041F_u32 as _; +pub const TPM_E_PCP_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80290407_u32 as _; +pub const TPM_E_PCP_INVALID_HANDLE: windows_sys::core::HRESULT = 0x80290402_u32 as _; +pub const TPM_E_PCP_INVALID_PARAMETER: windows_sys::core::HRESULT = 0x80290403_u32 as _; +pub const TPM_E_PCP_KEY_HANDLE_INVALIDATED: windows_sys::core::HRESULT = 0x80290422_u32 as _; +pub const TPM_E_PCP_KEY_NOT_AIK: windows_sys::core::HRESULT = 0x80290419_u32 as _; +pub const TPM_E_PCP_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80290405_u32 as _; +pub const TPM_E_PCP_PLATFORM_CLAIM_MAY_BE_OUTDATED: windows_sys::core::HRESULT = 0x40290424_u32 as _; +pub const TPM_E_PCP_PLATFORM_CLAIM_OUTDATED: windows_sys::core::HRESULT = 0x40290425_u32 as _; +pub const TPM_E_PCP_PLATFORM_CLAIM_REBOOT: windows_sys::core::HRESULT = 0x40290426_u32 as _; +pub const TPM_E_PCP_POLICY_NOT_FOUND: windows_sys::core::HRESULT = 0x8029040A_u32 as _; +pub const TPM_E_PCP_PROFILE_NOT_FOUND: windows_sys::core::HRESULT = 0x8029040B_u32 as _; +pub const TPM_E_PCP_RAW_POLICY_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80290421_u32 as _; +pub const TPM_E_PCP_TICKET_MISSING: windows_sys::core::HRESULT = 0x80290420_u32 as _; +pub const TPM_E_PCP_UNSUPPORTED_PSS_SALT: windows_sys::core::HRESULT = 0x40290423_u32 as _; +pub const TPM_E_PCP_VALIDATION_FAILED: windows_sys::core::HRESULT = 0x8029040C_u32 as _; +pub const TPM_E_PCP_WRONG_PARENT: windows_sys::core::HRESULT = 0x8029040E_u32 as _; +pub const TPM_E_PERMANENTEK: windows_sys::core::HRESULT = 0x80280061_u32 as _; +pub const TPM_E_PER_NOWRITE: windows_sys::core::HRESULT = 0x8028003F_u32 as _; +pub const TPM_E_PPI_ACPI_FAILURE: windows_sys::core::HRESULT = 0x80290300_u32 as _; +pub const TPM_E_PPI_BIOS_FAILURE: windows_sys::core::HRESULT = 0x80290302_u32 as _; +pub const TPM_E_PPI_BLOCKED_IN_BIOS: windows_sys::core::HRESULT = 0x80290304_u32 as _; +pub const TPM_E_PPI_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x80290303_u32 as _; +pub const TPM_E_PPI_USER_ABORT: windows_sys::core::HRESULT = 0x80290301_u32 as _; +pub const TPM_E_PROVISIONING_INCOMPLETE: windows_sys::core::HRESULT = 0x80290600_u32 as _; +pub const TPM_E_READ_ONLY: windows_sys::core::HRESULT = 0x8028003E_u32 as _; +pub const TPM_E_REQUIRES_SIGN: windows_sys::core::HRESULT = 0x80280039_u32 as _; +pub const TPM_E_RESOURCEMISSING: windows_sys::core::HRESULT = 0x8028004A_u32 as _; +pub const TPM_E_RESOURCES: windows_sys::core::HRESULT = 0x80280015_u32 as _; +pub const TPM_E_RETRY: windows_sys::core::HRESULT = 0x80280800_u32 as _; +pub const TPM_E_SHA_ERROR: windows_sys::core::HRESULT = 0x8028001B_u32 as _; +pub const TPM_E_SHA_THREAD: windows_sys::core::HRESULT = 0x8028001A_u32 as _; +pub const TPM_E_SHORTRANDOM: windows_sys::core::HRESULT = 0x80280016_u32 as _; +pub const TPM_E_SIZE: windows_sys::core::HRESULT = 0x80280017_u32 as _; +pub const TPM_E_SOFT_KEY_ERROR: windows_sys::core::HRESULT = 0x80290417_u32 as _; +pub const TPM_E_TOOMANYCONTEXTS: windows_sys::core::HRESULT = 0x8028005B_u32 as _; +pub const TPM_E_TOO_MUCH_DATA: windows_sys::core::HRESULT = 0x80290602_u32 as _; +pub const TPM_E_TPM_GENERATED_EPS: windows_sys::core::HRESULT = 0x80290603_u32 as _; +pub const TPM_E_TRANSPORT_NOTEXCLUSIVE: windows_sys::core::HRESULT = 0x8028004E_u32 as _; +pub const TPM_E_VERSION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x8029041D_u32 as _; +pub const TPM_E_WRITE_LOCKED: windows_sys::core::HRESULT = 0x80280041_u32 as _; +pub const TPM_E_WRONGPCRVAL: windows_sys::core::HRESULT = 0x80280018_u32 as _; +pub const TPM_E_WRONG_ENTITYTYPE: windows_sys::core::HRESULT = 0x80280025_u32 as _; +pub const TPM_E_ZERO_EXHAUST_ENABLED: windows_sys::core::HRESULT = 0x80290500_u32 as _; +pub const TRUE: windows_sys::core::BOOL = 1i32; +pub const TRUST_E_ACTION_UNKNOWN: windows_sys::core::HRESULT = 0x800B0002_u32 as _; +pub const TRUST_E_BAD_DIGEST: windows_sys::core::HRESULT = 0x80096010_u32 as _; +pub const TRUST_E_BASIC_CONSTRAINTS: windows_sys::core::HRESULT = 0x80096019_u32 as _; +pub const TRUST_E_CERT_SIGNATURE: windows_sys::core::HRESULT = 0x80096004_u32 as _; +pub const TRUST_E_COUNTER_SIGNER: windows_sys::core::HRESULT = 0x80096003_u32 as _; +pub const TRUST_E_EXPLICIT_DISTRUST: windows_sys::core::HRESULT = 0x800B0111_u32 as _; +pub const TRUST_E_FAIL: windows_sys::core::HRESULT = 0x800B010B_u32 as _; +pub const TRUST_E_FINANCIAL_CRITERIA: windows_sys::core::HRESULT = 0x8009601E_u32 as _; +pub const TRUST_E_MALFORMED_SIGNATURE: windows_sys::core::HRESULT = 0x80096011_u32 as _; +pub const TRUST_E_NOSIGNATURE: windows_sys::core::HRESULT = 0x800B0100_u32 as _; +pub const TRUST_E_NO_SIGNER_CERT: windows_sys::core::HRESULT = 0x80096002_u32 as _; +pub const TRUST_E_PROVIDER_UNKNOWN: windows_sys::core::HRESULT = 0x800B0001_u32 as _; +pub const TRUST_E_SUBJECT_FORM_UNKNOWN: windows_sys::core::HRESULT = 0x800B0003_u32 as _; +pub const TRUST_E_SUBJECT_NOT_TRUSTED: windows_sys::core::HRESULT = 0x800B0004_u32 as _; +pub const TRUST_E_SYSTEM_ERROR: windows_sys::core::HRESULT = 0x80096001_u32 as _; +pub const TRUST_E_TIME_STAMP: windows_sys::core::HRESULT = 0x80096005_u32 as _; +pub const TYPE_E_AMBIGUOUSNAME: windows_sys::core::HRESULT = 0x8002802C_u32 as _; +pub const TYPE_E_BADMODULEKIND: windows_sys::core::HRESULT = 0x800288BD_u32 as _; +pub const TYPE_E_BUFFERTOOSMALL: windows_sys::core::HRESULT = 0x80028016_u32 as _; +pub const TYPE_E_CANTCREATETMPFILE: windows_sys::core::HRESULT = 0x80028CA3_u32 as _; +pub const TYPE_E_CANTLOADLIBRARY: windows_sys::core::HRESULT = 0x80029C4A_u32 as _; +pub const TYPE_E_CIRCULARTYPE: windows_sys::core::HRESULT = 0x80029C84_u32 as _; +pub const TYPE_E_DLLFUNCTIONNOTFOUND: windows_sys::core::HRESULT = 0x8002802F_u32 as _; +pub const TYPE_E_DUPLICATEID: windows_sys::core::HRESULT = 0x800288C6_u32 as _; +pub const TYPE_E_ELEMENTNOTFOUND: windows_sys::core::HRESULT = 0x8002802B_u32 as _; +pub const TYPE_E_FIELDNOTFOUND: windows_sys::core::HRESULT = 0x80028017_u32 as _; +pub const TYPE_E_INCONSISTENTPROPFUNCS: windows_sys::core::HRESULT = 0x80029C83_u32 as _; +pub const TYPE_E_INVALIDID: windows_sys::core::HRESULT = 0x800288CF_u32 as _; +pub const TYPE_E_INVALIDSTATE: windows_sys::core::HRESULT = 0x80028029_u32 as _; +pub const TYPE_E_INVDATAREAD: windows_sys::core::HRESULT = 0x80028018_u32 as _; +pub const TYPE_E_IOERROR: windows_sys::core::HRESULT = 0x80028CA2_u32 as _; +pub const TYPE_E_LIBNOTREGISTERED: windows_sys::core::HRESULT = 0x8002801D_u32 as _; +pub const TYPE_E_NAMECONFLICT: windows_sys::core::HRESULT = 0x8002802D_u32 as _; +pub const TYPE_E_OUTOFBOUNDS: windows_sys::core::HRESULT = 0x80028CA1_u32 as _; +pub const TYPE_E_QUALIFIEDNAMEDISALLOWED: windows_sys::core::HRESULT = 0x80028028_u32 as _; +pub const TYPE_E_REGISTRYACCESS: windows_sys::core::HRESULT = 0x8002801C_u32 as _; +pub const TYPE_E_SIZETOOBIG: windows_sys::core::HRESULT = 0x800288C5_u32 as _; +pub const TYPE_E_TYPEMISMATCH: windows_sys::core::HRESULT = 0x80028CA0_u32 as _; +pub const TYPE_E_UNDEFINEDTYPE: windows_sys::core::HRESULT = 0x80028027_u32 as _; +pub const TYPE_E_UNKNOWNLCID: windows_sys::core::HRESULT = 0x8002802E_u32 as _; +pub const TYPE_E_UNSUPFORMAT: windows_sys::core::HRESULT = 0x80028019_u32 as _; +pub const TYPE_E_WRONGTYPEKIND: windows_sys::core::HRESULT = 0x8002802A_u32 as _; +pub const UCEERR_BLOCKSFULL: windows_sys::core::HRESULT = 0x88980409_u32 as _; +pub const UCEERR_CHANNELSYNCABANDONED: windows_sys::core::HRESULT = 0x88980414_u32 as _; +pub const UCEERR_CHANNELSYNCTIMEDOUT: windows_sys::core::HRESULT = 0x88980413_u32 as _; +pub const UCEERR_COMMANDTRANSPORTDENIED: windows_sys::core::HRESULT = 0x88980418_u32 as _; +pub const UCEERR_CONNECTIONIDLOOKUPFAILED: windows_sys::core::HRESULT = 0x88980408_u32 as _; +pub const UCEERR_CTXSTACKFRSTTARGETNULL: windows_sys::core::HRESULT = 0x88980407_u32 as _; +pub const UCEERR_FEEDBACK_UNSUPPORTED: windows_sys::core::HRESULT = 0x88980417_u32 as _; +pub const UCEERR_GRAPHICSSTREAMALREADYOPEN: windows_sys::core::HRESULT = 0x88980420_u32 as _; +pub const UCEERR_GRAPHICSSTREAMUNAVAILABLE: windows_sys::core::HRESULT = 0x88980419_u32 as _; +pub const UCEERR_HANDLELOOKUPFAILED: windows_sys::core::HRESULT = 0x88980405_u32 as _; +pub const UCEERR_ILLEGALHANDLE: windows_sys::core::HRESULT = 0x88980404_u32 as _; +pub const UCEERR_ILLEGALPACKET: windows_sys::core::HRESULT = 0x88980402_u32 as _; +pub const UCEERR_ILLEGALRECORDTYPE: windows_sys::core::HRESULT = 0x8898040C_u32 as _; +pub const UCEERR_INVALIDPACKETHEADER: windows_sys::core::HRESULT = 0x88980400_u32 as _; +pub const UCEERR_MALFORMEDPACKET: windows_sys::core::HRESULT = 0x88980403_u32 as _; +pub const UCEERR_MEMORYFAILURE: windows_sys::core::HRESULT = 0x8898040A_u32 as _; +pub const UCEERR_MISSINGBEGINCOMMAND: windows_sys::core::HRESULT = 0x88980412_u32 as _; +pub const UCEERR_MISSINGENDCOMMAND: windows_sys::core::HRESULT = 0x88980411_u32 as _; +pub const UCEERR_NO_MULTIPLE_WORKER_THREADS: windows_sys::core::HRESULT = 0x8898040F_u32 as _; +pub const UCEERR_OUTOFHANDLES: windows_sys::core::HRESULT = 0x8898040D_u32 as _; +pub const UCEERR_PACKETRECORDOUTOFRANGE: windows_sys::core::HRESULT = 0x8898040B_u32 as _; +pub const UCEERR_PARTITION_ZOMBIED: windows_sys::core::HRESULT = 0x88980423_u32 as _; +pub const UCEERR_REMOTINGNOTSUPPORTED: windows_sys::core::HRESULT = 0x88980410_u32 as _; +pub const UCEERR_RENDERTHREADFAILURE: windows_sys::core::HRESULT = 0x88980406_u32 as _; +pub const UCEERR_TRANSPORTDISCONNECTED: windows_sys::core::HRESULT = 0x88980421_u32 as _; +pub const UCEERR_TRANSPORTOVERLOADED: windows_sys::core::HRESULT = 0x88980422_u32 as _; +pub const UCEERR_TRANSPORTUNAVAILABLE: windows_sys::core::HRESULT = 0x88980416_u32 as _; +pub const UCEERR_UNCHANGABLE_UPDATE_ATTEMPTED: windows_sys::core::HRESULT = 0x8898040E_u32 as _; +pub const UCEERR_UNKNOWNPACKET: windows_sys::core::HRESULT = 0x88980401_u32 as _; +pub const UCEERR_UNSUPPORTEDTRANSPORTVERSION: windows_sys::core::HRESULT = 0x88980415_u32 as _; +pub const UI_E_AMBIGUOUS_MATCH: windows_sys::core::HRESULT = 0x802A000A_u32 as _; +pub const UI_E_BOOLEAN_EXPECTED: windows_sys::core::HRESULT = 0x802A0008_u32 as _; +pub const UI_E_CREATE_FAILED: windows_sys::core::HRESULT = 0x802A0001_u32 as _; +pub const UI_E_DIFFERENT_OWNER: windows_sys::core::HRESULT = 0x802A0009_u32 as _; +pub const UI_E_END_KEYFRAME_NOT_DETERMINED: windows_sys::core::HRESULT = 0x802A0104_u32 as _; +pub const UI_E_FP_OVERFLOW: windows_sys::core::HRESULT = 0x802A000B_u32 as _; +pub const UI_E_ILLEGAL_REENTRANCY: windows_sys::core::HRESULT = 0x802A0003_u32 as _; +pub const UI_E_INVALID_DIMENSION: windows_sys::core::HRESULT = 0x802A010B_u32 as _; +pub const UI_E_INVALID_OUTPUT: windows_sys::core::HRESULT = 0x802A0007_u32 as _; +pub const UI_E_LOOPS_OVERLAP: windows_sys::core::HRESULT = 0x802A0105_u32 as _; +pub const UI_E_OBJECT_SEALED: windows_sys::core::HRESULT = 0x802A0004_u32 as _; +pub const UI_E_PRIMITIVE_OUT_OF_BOUNDS: windows_sys::core::HRESULT = 0x802A010C_u32 as _; +pub const UI_E_SHUTDOWN_CALLED: windows_sys::core::HRESULT = 0x802A0002_u32 as _; +pub const UI_E_START_KEYFRAME_AFTER_END: windows_sys::core::HRESULT = 0x802A0103_u32 as _; +pub const UI_E_STORYBOARD_ACTIVE: windows_sys::core::HRESULT = 0x802A0101_u32 as _; +pub const UI_E_STORYBOARD_NOT_PLAYING: windows_sys::core::HRESULT = 0x802A0102_u32 as _; +pub const UI_E_TIMER_CLIENT_ALREADY_CONNECTED: windows_sys::core::HRESULT = 0x802A010A_u32 as _; +pub const UI_E_TIME_BEFORE_LAST_UPDATE: windows_sys::core::HRESULT = 0x802A0109_u32 as _; +pub const UI_E_TRANSITION_ALREADY_USED: windows_sys::core::HRESULT = 0x802A0106_u32 as _; +pub const UI_E_TRANSITION_ECLIPSED: windows_sys::core::HRESULT = 0x802A0108_u32 as _; +pub const UI_E_TRANSITION_NOT_IN_STORYBOARD: windows_sys::core::HRESULT = 0x802A0107_u32 as _; +pub const UI_E_VALUE_NOT_DETERMINED: windows_sys::core::HRESULT = 0x802A0006_u32 as _; +pub const UI_E_VALUE_NOT_SET: windows_sys::core::HRESULT = 0x802A0005_u32 as _; +pub const UI_E_WINDOW_CLOSED: windows_sys::core::HRESULT = 0x802A0201_u32 as _; +pub const UI_E_WRONG_THREAD: windows_sys::core::HRESULT = 0x802A000C_u32 as _; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UNICODE_STRING { + pub Length: u16, + pub MaximumLength: u16, + pub Buffer: windows_sys::core::PWSTR, +} +impl Default for UNICODE_STRING { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const UTC_E_ACTION_NOT_SUPPORTED_IN_DESTINATION: windows_sys::core::HRESULT = 0x87C51044_u32 as _; +pub const UTC_E_AGENT_DIAGNOSTICS_TOO_LARGE: windows_sys::core::HRESULT = 0x87C51055_u32 as _; +pub const UTC_E_ALTERNATIVE_TRACE_CANNOT_PREEMPT: windows_sys::core::HRESULT = 0x87C51002_u32 as _; +pub const UTC_E_AOT_NOT_RUNNING: windows_sys::core::HRESULT = 0x87C51003_u32 as _; +pub const UTC_E_API_BUSY: windows_sys::core::HRESULT = 0x87C5102B_u32 as _; +pub const UTC_E_API_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x87C5103C_u32 as _; +pub const UTC_E_API_RESULT_UNAVAILABLE: windows_sys::core::HRESULT = 0x87C51028_u32 as _; +pub const UTC_E_BINARY_MISSING: windows_sys::core::HRESULT = 0x87C51034_u32 as _; +pub const UTC_E_CANNOT_LOAD_SCENARIO_EDITOR_XML: windows_sys::core::HRESULT = 0x87C5101F_u32 as _; +pub const UTC_E_CERT_REV_FAILED: windows_sys::core::HRESULT = 0x87C5103F_u32 as _; +pub const UTC_E_CHILD_PROCESS_FAILED: windows_sys::core::HRESULT = 0x87C5101D_u32 as _; +pub const UTC_E_COMMAND_LINE_NOT_AUTHORIZED: windows_sys::core::HRESULT = 0x87C5101E_u32 as _; +pub const UTC_E_DELAY_TERMINATED: windows_sys::core::HRESULT = 0x87C51025_u32 as _; +pub const UTC_E_DEVICE_TICKET_ERROR: windows_sys::core::HRESULT = 0x87C51026_u32 as _; +pub const UTC_E_DIAGRULES_SCHEMAVERSION_MISMATCH: windows_sys::core::HRESULT = 0x87C5100A_u32 as _; +pub const UTC_E_ESCALATION_ALREADY_RUNNING: windows_sys::core::HRESULT = 0x87C5100F_u32 as _; +pub const UTC_E_ESCALATION_CANCELLED_AT_SHUTDOWN: windows_sys::core::HRESULT = 0x87C5105A_u32 as _; +pub const UTC_E_ESCALATION_DIRECTORY_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x87C5102F_u32 as _; +pub const UTC_E_ESCALATION_NOT_AUTHORIZED: windows_sys::core::HRESULT = 0x87C5101B_u32 as _; +pub const UTC_E_ESCALATION_TIMED_OUT: windows_sys::core::HRESULT = 0x87C51020_u32 as _; +pub const UTC_E_EVENTLOG_ENTRY_MALFORMED: windows_sys::core::HRESULT = 0x87C51009_u32 as _; +pub const UTC_E_EXCLUSIVITY_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x87C5102D_u32 as _; +pub const UTC_E_EXE_TERMINATED: windows_sys::core::HRESULT = 0x87C5101A_u32 as _; +pub const UTC_E_FAILED_TO_RECEIVE_AGENT_DIAGNOSTICS: windows_sys::core::HRESULT = 0x87C51056_u32 as _; +pub const UTC_E_FAILED_TO_RESOLVE_CONTAINER_ID: windows_sys::core::HRESULT = 0x87C51036_u32 as _; +pub const UTC_E_FAILED_TO_START_NDISCAP: windows_sys::core::HRESULT = 0x87C51040_u32 as _; +pub const UTC_E_FILTER_FUNCTION_RESTRICTED: windows_sys::core::HRESULT = 0x87C51048_u32 as _; +pub const UTC_E_FILTER_ILLEGAL_EVAL: windows_sys::core::HRESULT = 0x87C51053_u32 as _; +pub const UTC_E_FILTER_INVALID_COMMAND: windows_sys::core::HRESULT = 0x87C51052_u32 as _; +pub const UTC_E_FILTER_INVALID_FUNCTION: windows_sys::core::HRESULT = 0x87C51050_u32 as _; +pub const UTC_E_FILTER_INVALID_FUNCTION_PARAMS: windows_sys::core::HRESULT = 0x87C51051_u32 as _; +pub const UTC_E_FILTER_INVALID_TYPE: windows_sys::core::HRESULT = 0x87C51046_u32 as _; +pub const UTC_E_FILTER_MISSING_ATTRIBUTE: windows_sys::core::HRESULT = 0x87C51045_u32 as _; +pub const UTC_E_FILTER_VARIABLE_NOT_FOUND: windows_sys::core::HRESULT = 0x87C51047_u32 as _; +pub const UTC_E_FILTER_VERSION_MISMATCH: windows_sys::core::HRESULT = 0x87C51049_u32 as _; +pub const UTC_E_FORWARDER_ALREADY_DISABLED: windows_sys::core::HRESULT = 0x87C51008_u32 as _; +pub const UTC_E_FORWARDER_ALREADY_ENABLED: windows_sys::core::HRESULT = 0x87C51007_u32 as _; +pub const UTC_E_FORWARDER_PRODUCER_MISMATCH: windows_sys::core::HRESULT = 0x87C51012_u32 as _; +pub const UTC_E_GETFILEINFOACTION_FILE_NOT_APPROVED: windows_sys::core::HRESULT = 0x87C5105B_u32 as _; +pub const UTC_E_GETFILE_EXTERNAL_PATH_NOT_APPROVED: windows_sys::core::HRESULT = 0x87C5103D_u32 as _; +pub const UTC_E_GETFILE_FILE_PATH_NOT_APPROVED: windows_sys::core::HRESULT = 0x87C5102E_u32 as _; +pub const UTC_E_INSUFFICIENT_SPACE_TO_START_TRACE: windows_sys::core::HRESULT = 0x87C51059_u32 as _; +pub const UTC_E_INTENTIONAL_SCRIPT_FAILURE: windows_sys::core::HRESULT = 0x87C51013_u32 as _; +pub const UTC_E_INVALID_AGGREGATION_STRUCT: windows_sys::core::HRESULT = 0x87C51043_u32 as _; +pub const UTC_E_INVALID_CUSTOM_FILTER: windows_sys::core::HRESULT = 0x87C5100C_u32 as _; +pub const UTC_E_INVALID_FILTER: windows_sys::core::HRESULT = 0x87C51019_u32 as _; +pub const UTC_E_KERNELDUMP_LIMIT_REACHED: windows_sys::core::HRESULT = 0x87C51041_u32 as _; +pub const UTC_E_MISSING_AGGREGATE_EVENT_TAG: windows_sys::core::HRESULT = 0x87C51042_u32 as _; +pub const UTC_E_MULTIPLE_TIME_TRIGGER_ON_SINGLE_STATE: windows_sys::core::HRESULT = 0x87C51033_u32 as _; +pub const UTC_E_NO_WER_LOGGER_SUPPORTED: windows_sys::core::HRESULT = 0x87C51015_u32 as _; +pub const UTC_E_PERFTRACK_ALREADY_TRACING: windows_sys::core::HRESULT = 0x87C51010_u32 as _; +pub const UTC_E_REACHED_MAX_ESCALATIONS: windows_sys::core::HRESULT = 0x87C51011_u32 as _; +pub const UTC_E_REESCALATED_TOO_QUICKLY: windows_sys::core::HRESULT = 0x87C5100E_u32 as _; +pub const UTC_E_RPC_TIMEOUT: windows_sys::core::HRESULT = 0x87C51029_u32 as _; +pub const UTC_E_RPC_WAIT_FAILED: windows_sys::core::HRESULT = 0x87C5102A_u32 as _; +pub const UTC_E_SCENARIODEF_NOT_FOUND: windows_sys::core::HRESULT = 0x87C51005_u32 as _; +pub const UTC_E_SCENARIODEF_SCHEMAVERSION_MISMATCH: windows_sys::core::HRESULT = 0x87C51018_u32 as _; +pub const UTC_E_SCENARIO_HAS_NO_ACTIONS: windows_sys::core::HRESULT = 0x87C51057_u32 as _; +pub const UTC_E_SCENARIO_THROTTLED: windows_sys::core::HRESULT = 0x87C5103B_u32 as _; +pub const UTC_E_SCRIPT_MISSING: windows_sys::core::HRESULT = 0x87C5103A_u32 as _; +pub const UTC_E_SCRIPT_TERMINATED: windows_sys::core::HRESULT = 0x87C5100B_u32 as _; +pub const UTC_E_SCRIPT_TYPE_INVALID: windows_sys::core::HRESULT = 0x87C51004_u32 as _; +pub const UTC_E_SETREGKEYACTION_TYPE_NOT_APPROVED: windows_sys::core::HRESULT = 0x87C5105C_u32 as _; +pub const UTC_E_SETUP_NOT_AUTHORIZED: windows_sys::core::HRESULT = 0x87C5101C_u32 as _; +pub const UTC_E_SETUP_TIMED_OUT: windows_sys::core::HRESULT = 0x87C51021_u32 as _; +pub const UTC_E_SIF_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x87C51024_u32 as _; +pub const UTC_E_SQM_INIT_FAILED: windows_sys::core::HRESULT = 0x87C51014_u32 as _; +pub const UTC_E_THROTTLED: windows_sys::core::HRESULT = 0x87C51038_u32 as _; +pub const UTC_E_TIME_TRIGGER_INVALID_TIME_RANGE: windows_sys::core::HRESULT = 0x87C51032_u32 as _; +pub const UTC_E_TIME_TRIGGER_ONLY_VALID_ON_SINGLE_TRANSITION: windows_sys::core::HRESULT = 0x87C51031_u32 as _; +pub const UTC_E_TIME_TRIGGER_ON_START_INVALID: windows_sys::core::HRESULT = 0x87C51030_u32 as _; +pub const UTC_E_TOGGLE_TRACE_STARTED: windows_sys::core::HRESULT = 0x87C51001_u32 as _; +pub const UTC_E_TRACEPROFILE_NOT_FOUND: windows_sys::core::HRESULT = 0x87C51006_u32 as _; +pub const UTC_E_TRACERS_DONT_EXIST: windows_sys::core::HRESULT = 0x87C51016_u32 as _; +pub const UTC_E_TRACE_BUFFER_LIMIT_EXCEEDED: windows_sys::core::HRESULT = 0x87C51027_u32 as _; +pub const UTC_E_TRACE_MIN_DURATION_REQUIREMENT_NOT_MET: windows_sys::core::HRESULT = 0x87C5102C_u32 as _; +pub const UTC_E_TRACE_NOT_RUNNING: windows_sys::core::HRESULT = 0x87C5100D_u32 as _; +pub const UTC_E_TRACE_THROTTLED: windows_sys::core::HRESULT = 0x87C5105D_u32 as _; +pub const UTC_E_TRIGGER_MISMATCH: windows_sys::core::HRESULT = 0x87C51022_u32 as _; +pub const UTC_E_TRIGGER_NOT_FOUND: windows_sys::core::HRESULT = 0x87C51023_u32 as _; +pub const UTC_E_TRY_GET_SCENARIO_TIMEOUT_EXCEEDED: windows_sys::core::HRESULT = 0x87C5103E_u32 as _; +pub const UTC_E_TTTRACER_RETURNED_ERROR: windows_sys::core::HRESULT = 0x87C51054_u32 as _; +pub const UTC_E_TTTRACER_STORAGE_FULL: windows_sys::core::HRESULT = 0x87C51058_u32 as _; +pub const UTC_E_UNABLE_TO_RESOLVE_SESSION: windows_sys::core::HRESULT = 0x87C51037_u32 as _; +pub const UTC_E_UNAPPROVED_SCRIPT: windows_sys::core::HRESULT = 0x87C51039_u32 as _; +pub const UTC_E_WINRT_INIT_FAILED: windows_sys::core::HRESULT = 0x87C51017_u32 as _; +pub type VARIANT_BOOL = i16; +pub const VARIANT_FALSE: VARIANT_BOOL = 0i16; +pub const VARIANT_TRUE: VARIANT_BOOL = -1i16; +pub const VIEW_E_DRAW: windows_sys::core::HRESULT = 0x80040140_u32 as _; +pub const VIEW_E_FIRST: i32 = -2147221184i32; +pub const VIEW_E_LAST: i32 = -2147221169i32; +pub const VIEW_S_ALREADY_FROZEN: windows_sys::core::HRESULT = 0x40140_u32 as _; +pub const VIEW_S_FIRST: i32 = 262464i32; +pub const VIEW_S_LAST: i32 = 262479i32; +pub const VM_SAVED_STATE_DUMP_E_GUEST_MEMORY_NOT_FOUND: windows_sys::core::HRESULT = 0xC0370501_u32 as _; +pub const VM_SAVED_STATE_DUMP_E_INVALID_VP_STATE: windows_sys::core::HRESULT = 0xC0370506_u32 as _; +pub const VM_SAVED_STATE_DUMP_E_NESTED_VIRTUALIZATION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0xC0370503_u32 as _; +pub const VM_SAVED_STATE_DUMP_E_NO_VP_FOUND_IN_PARTITION_STATE: windows_sys::core::HRESULT = 0xC0370502_u32 as _; +pub const VM_SAVED_STATE_DUMP_E_PARTITION_STATE_NOT_FOUND: windows_sys::core::HRESULT = 0xC0370500_u32 as _; +pub const VM_SAVED_STATE_DUMP_E_VA_NOT_MAPPED: windows_sys::core::HRESULT = 0xC0370505_u32 as _; +pub const VM_SAVED_STATE_DUMP_E_VP_VTL_NOT_ENABLED: windows_sys::core::HRESULT = 0xC0370509_u32 as _; +pub const VM_SAVED_STATE_DUMP_E_WINDOWS_KERNEL_IMAGE_NOT_FOUND: windows_sys::core::HRESULT = 0xC0370504_u32 as _; +pub const VOLMGR_KSR_BYPASS: NTSTATUS = 0x80380003_u32 as _; +pub const VOLMGR_KSR_ERROR: NTSTATUS = 0x80380001_u32 as _; +pub const VOLMGR_KSR_READ_ERROR: NTSTATUS = 0x80380002_u32 as _; +pub const WAIT_ABANDONED: WAIT_EVENT = 128u32; +pub const WAIT_ABANDONED_0: WAIT_EVENT = 128u32; +pub type WAIT_EVENT = u32; +pub const WAIT_FAILED: WAIT_EVENT = 4294967295u32; +pub const WAIT_IO_COMPLETION: WAIT_EVENT = 192u32; +pub const WAIT_OBJECT_0: WAIT_EVENT = 0u32; +pub const WAIT_TIMEOUT: WAIT_EVENT = 258u32; +pub const WARNING_IPSEC_MM_POLICY_PRUNED: i32 = 13024i32; +pub const WARNING_IPSEC_QM_POLICY_PRUNED: i32 = 13025i32; +pub const WARNING_NO_MD5_MIGRATION: u32 = 946u32; +pub const WBREAK_E_BUFFER_TOO_SMALL: windows_sys::core::HRESULT = 0x80041783_u32 as _; +pub const WBREAK_E_END_OF_TEXT: windows_sys::core::HRESULT = 0x80041780_u32 as _; +pub const WBREAK_E_INIT_FAILED: windows_sys::core::HRESULT = 0x80041785_u32 as _; +pub const WBREAK_E_QUERY_ONLY: windows_sys::core::HRESULT = 0x80041782_u32 as _; +pub const WEB_E_INVALID_JSON_NUMBER: windows_sys::core::HRESULT = 0x83750008_u32 as _; +pub const WEB_E_INVALID_JSON_STRING: windows_sys::core::HRESULT = 0x83750007_u32 as _; +pub const WEB_E_INVALID_XML: windows_sys::core::HRESULT = 0x83750002_u32 as _; +pub const WEB_E_JSON_VALUE_NOT_FOUND: windows_sys::core::HRESULT = 0x83750009_u32 as _; +pub const WEB_E_MISSING_REQUIRED_ATTRIBUTE: windows_sys::core::HRESULT = 0x83750004_u32 as _; +pub const WEB_E_MISSING_REQUIRED_ELEMENT: windows_sys::core::HRESULT = 0x83750003_u32 as _; +pub const WEB_E_RESOURCE_TOO_LARGE: windows_sys::core::HRESULT = 0x83750006_u32 as _; +pub const WEB_E_UNEXPECTED_CONTENT: windows_sys::core::HRESULT = 0x83750005_u32 as _; +pub const WEB_E_UNSUPPORTED_FORMAT: windows_sys::core::HRESULT = 0x83750001_u32 as _; +pub const WEP_E_BUFFER_TOO_LARGE: windows_sys::core::HRESULT = 0x88010009_u32 as _; +pub const WEP_E_FIXED_DATA_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x88010002_u32 as _; +pub const WEP_E_HARDWARE_NOT_COMPLIANT: windows_sys::core::HRESULT = 0x88010003_u32 as _; +pub const WEP_E_LOCK_NOT_CONFIGURED: windows_sys::core::HRESULT = 0x88010004_u32 as _; +pub const WEP_E_NOT_PROVISIONED_ON_ALL_VOLUMES: windows_sys::core::HRESULT = 0x88010001_u32 as _; +pub const WEP_E_NO_LICENSE: windows_sys::core::HRESULT = 0x88010006_u32 as _; +pub const WEP_E_OS_NOT_PROTECTED: windows_sys::core::HRESULT = 0x88010007_u32 as _; +pub const WEP_E_PROTECTION_SUSPENDED: windows_sys::core::HRESULT = 0x88010005_u32 as _; +pub const WEP_E_UNEXPECTED_FAIL: windows_sys::core::HRESULT = 0x88010008_u32 as _; +pub const WER_E_ALREADY_REPORTING: windows_sys::core::HRESULT = 0x801B8004_u32 as _; +pub const WER_E_CANCELED: windows_sys::core::HRESULT = 0x801B8001_u32 as _; +pub const WER_E_CRASH_FAILURE: windows_sys::core::HRESULT = 0x801B8000_u32 as _; +pub const WER_E_DUMP_THROTTLED: windows_sys::core::HRESULT = 0x801B8005_u32 as _; +pub const WER_E_INSUFFICIENT_CONSENT: windows_sys::core::HRESULT = 0x801B8006_u32 as _; +pub const WER_E_NETWORK_FAILURE: windows_sys::core::HRESULT = 0x801B8002_u32 as _; +pub const WER_E_NOT_INITIALIZED: windows_sys::core::HRESULT = 0x801B8003_u32 as _; +pub const WER_E_TOO_HEAVY: windows_sys::core::HRESULT = 0x801B8007_u32 as _; +pub const WER_S_ASSERT_CONTINUE: windows_sys::core::HRESULT = 0x1B000A_u32 as _; +pub const WER_S_DISABLED: windows_sys::core::HRESULT = 0x1B0003_u32 as _; +pub const WER_S_DISABLED_ARCHIVE: windows_sys::core::HRESULT = 0x1B0006_u32 as _; +pub const WER_S_DISABLED_QUEUE: windows_sys::core::HRESULT = 0x1B0005_u32 as _; +pub const WER_S_IGNORE_ALL_ASSERTS: windows_sys::core::HRESULT = 0x1B0009_u32 as _; +pub const WER_S_IGNORE_ASSERT_INSTANCE: windows_sys::core::HRESULT = 0x1B0008_u32 as _; +pub const WER_S_REPORT_ASYNC: windows_sys::core::HRESULT = 0x1B0007_u32 as _; +pub const WER_S_REPORT_DEBUG: windows_sys::core::HRESULT = 0x1B0000_u32 as _; +pub const WER_S_REPORT_QUEUED: windows_sys::core::HRESULT = 0x1B0002_u32 as _; +pub const WER_S_REPORT_UPLOADED: windows_sys::core::HRESULT = 0x1B0001_u32 as _; +pub const WER_S_REPORT_UPLOADED_CAB: windows_sys::core::HRESULT = 0x1B000C_u32 as _; +pub const WER_S_SUSPENDED_UPLOAD: windows_sys::core::HRESULT = 0x1B0004_u32 as _; +pub const WER_S_THROTTLED: windows_sys::core::HRESULT = 0x1B000B_u32 as _; +pub const WHV_E_GPA_RANGE_NOT_FOUND: windows_sys::core::HRESULT = 0x80370305_u32 as _; +pub const WHV_E_INSUFFICIENT_BUFFER: windows_sys::core::HRESULT = 0x80370301_u32 as _; +pub const WHV_E_INVALID_PARTITION_CONFIG: windows_sys::core::HRESULT = 0x80370304_u32 as _; +pub const WHV_E_INVALID_VP_REGISTER_NAME: windows_sys::core::HRESULT = 0x80370309_u32 as _; +pub const WHV_E_INVALID_VP_STATE: windows_sys::core::HRESULT = 0x80370308_u32 as _; +pub const WHV_E_UNKNOWN_CAPABILITY: windows_sys::core::HRESULT = 0x80370300_u32 as _; +pub const WHV_E_UNKNOWN_PROPERTY: windows_sys::core::HRESULT = 0x80370302_u32 as _; +pub const WHV_E_UNSUPPORTED_HYPERVISOR_CONFIG: windows_sys::core::HRESULT = 0x80370303_u32 as _; +pub const WHV_E_UNSUPPORTED_PROCESSOR_CONFIG: windows_sys::core::HRESULT = 0x80370310_u32 as _; +pub const WHV_E_VP_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x80370306_u32 as _; +pub const WHV_E_VP_DOES_NOT_EXIST: windows_sys::core::HRESULT = 0x80370307_u32 as _; +pub type WIN32_ERROR = u32; +pub const WINCODEC_ERR_ALREADYLOCKED: windows_sys::core::HRESULT = 0x88982F0D_u32 as _; +pub const WINCODEC_ERR_BADHEADER: windows_sys::core::HRESULT = 0x88982F61_u32 as _; +pub const WINCODEC_ERR_BADIMAGE: windows_sys::core::HRESULT = 0x88982F60_u32 as _; +pub const WINCODEC_ERR_BADMETADATAHEADER: windows_sys::core::HRESULT = 0x88982F63_u32 as _; +pub const WINCODEC_ERR_BADSTREAMDATA: windows_sys::core::HRESULT = 0x88982F70_u32 as _; +pub const WINCODEC_ERR_CODECNOTHUMBNAIL: windows_sys::core::HRESULT = 0x88982F44_u32 as _; +pub const WINCODEC_ERR_CODECPRESENT: windows_sys::core::HRESULT = 0x88982F43_u32 as _; +pub const WINCODEC_ERR_CODECTOOMANYSCANLINES: windows_sys::core::HRESULT = 0x88982F46_u32 as _; +pub const WINCODEC_ERR_COMPONENTINITIALIZEFAILURE: windows_sys::core::HRESULT = 0x88982F8B_u32 as _; +pub const WINCODEC_ERR_COMPONENTNOTFOUND: windows_sys::core::HRESULT = 0x88982F50_u32 as _; +pub const WINCODEC_ERR_DUPLICATEMETADATAPRESENT: windows_sys::core::HRESULT = 0x88982F8D_u32 as _; +pub const WINCODEC_ERR_FRAMEMISSING: windows_sys::core::HRESULT = 0x88982F62_u32 as _; +pub const WINCODEC_ERR_IMAGESIZEOUTOFRANGE: windows_sys::core::HRESULT = 0x88982F51_u32 as _; +pub const WINCODEC_ERR_INSUFFICIENTBUFFER: windows_sys::core::HRESULT = 0x88982F8C_u32 as _; +pub const WINCODEC_ERR_INTERNALERROR: windows_sys::core::HRESULT = 0x88982F48_u32 as _; +pub const WINCODEC_ERR_INVALIDJPEGSCANINDEX: windows_sys::core::HRESULT = 0x88982F96_u32 as _; +pub const WINCODEC_ERR_INVALIDPROGRESSIVELEVEL: windows_sys::core::HRESULT = 0x88982F95_u32 as _; +pub const WINCODEC_ERR_INVALIDQUERYCHARACTER: windows_sys::core::HRESULT = 0x88982F93_u32 as _; +pub const WINCODEC_ERR_INVALIDQUERYREQUEST: windows_sys::core::HRESULT = 0x88982F90_u32 as _; +pub const WINCODEC_ERR_INVALIDREGISTRATION: windows_sys::core::HRESULT = 0x88982F8A_u32 as _; +pub const WINCODEC_ERR_NOTINITIALIZED: windows_sys::core::HRESULT = 0x88982F0C_u32 as _; +pub const WINCODEC_ERR_PALETTEUNAVAILABLE: windows_sys::core::HRESULT = 0x88982F45_u32 as _; +pub const WINCODEC_ERR_PROPERTYNOTFOUND: windows_sys::core::HRESULT = 0x88982F40_u32 as _; +pub const WINCODEC_ERR_PROPERTYNOTSUPPORTED: windows_sys::core::HRESULT = 0x88982F41_u32 as _; +pub const WINCODEC_ERR_PROPERTYSIZE: windows_sys::core::HRESULT = 0x88982F42_u32 as _; +pub const WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE: windows_sys::core::HRESULT = 0x88982F8E_u32 as _; +pub const WINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT: windows_sys::core::HRESULT = 0x88982F92_u32 as _; +pub const WINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS: windows_sys::core::HRESULT = 0x88982F49_u32 as _; +pub const WINCODEC_ERR_STREAMNOTAVAILABLE: windows_sys::core::HRESULT = 0x88982F73_u32 as _; +pub const WINCODEC_ERR_STREAMREAD: windows_sys::core::HRESULT = 0x88982F72_u32 as _; +pub const WINCODEC_ERR_STREAMWRITE: windows_sys::core::HRESULT = 0x88982F71_u32 as _; +pub const WINCODEC_ERR_TOOMUCHMETADATA: windows_sys::core::HRESULT = 0x88982F52_u32 as _; +pub const WINCODEC_ERR_UNEXPECTEDMETADATATYPE: windows_sys::core::HRESULT = 0x88982F91_u32 as _; +pub const WINCODEC_ERR_UNEXPECTEDSIZE: windows_sys::core::HRESULT = 0x88982F8F_u32 as _; +pub const WINCODEC_ERR_UNKNOWNIMAGEFORMAT: windows_sys::core::HRESULT = 0x88982F07_u32 as _; +pub const WINCODEC_ERR_UNSUPPORTEDOPERATION: windows_sys::core::HRESULT = 0x88982F81_u32 as _; +pub const WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT: windows_sys::core::HRESULT = 0x88982F80_u32 as _; +pub const WINCODEC_ERR_UNSUPPORTEDVERSION: windows_sys::core::HRESULT = 0x88982F0B_u32 as _; +pub const WINCODEC_ERR_VALUEOUTOFRANGE: windows_sys::core::HRESULT = 0x88982F05_u32 as _; +pub const WINCODEC_ERR_WIN32ERROR: windows_sys::core::HRESULT = 0x88982F94_u32 as _; +pub const WINCODEC_ERR_WRONGSTATE: windows_sys::core::HRESULT = 0x88982F04_u32 as _; +pub const WININET_E_ASYNC_THREAD_FAILED: windows_sys::core::HRESULT = 0x80072F0F_u32 as _; +pub const WININET_E_BAD_AUTO_PROXY_SCRIPT: windows_sys::core::HRESULT = 0x80072F86_u32 as _; +pub const WININET_E_BAD_OPTION_LENGTH: windows_sys::core::HRESULT = 0x80072EEA_u32 as _; +pub const WININET_E_BAD_REGISTRY_PARAMETER: windows_sys::core::HRESULT = 0x80072EF6_u32 as _; +pub const WININET_E_CANNOT_CONNECT: windows_sys::core::HRESULT = 0x80072EFD_u32 as _; +pub const WININET_E_CHG_POST_IS_NON_SECURE: windows_sys::core::HRESULT = 0x80072F0A_u32 as _; +pub const WININET_E_CLIENT_AUTH_CERT_NEEDED: windows_sys::core::HRESULT = 0x80072F0C_u32 as _; +pub const WININET_E_CLIENT_AUTH_NOT_SETUP: windows_sys::core::HRESULT = 0x80072F0E_u32 as _; +pub const WININET_E_CONNECTION_ABORTED: windows_sys::core::HRESULT = 0x80072EFE_u32 as _; +pub const WININET_E_CONNECTION_RESET: windows_sys::core::HRESULT = 0x80072EFF_u32 as _; +pub const WININET_E_COOKIE_DECLINED: windows_sys::core::HRESULT = 0x80072F82_u32 as _; +pub const WININET_E_COOKIE_NEEDS_CONFIRMATION: windows_sys::core::HRESULT = 0x80072F81_u32 as _; +pub const WININET_E_DECODING_FAILED: windows_sys::core::HRESULT = 0x80072F8F_u32 as _; +pub const WININET_E_DIALOG_PENDING: windows_sys::core::HRESULT = 0x80072F11_u32 as _; +pub const WININET_E_DISCONNECTED: windows_sys::core::HRESULT = 0x80072F83_u32 as _; +pub const WININET_E_DOWNLEVEL_SERVER: windows_sys::core::HRESULT = 0x80072F77_u32 as _; +pub const WININET_E_EXTENDED_ERROR: windows_sys::core::HRESULT = 0x80072EE3_u32 as _; +pub const WININET_E_FAILED_DUETOSECURITYCHECK: windows_sys::core::HRESULT = 0x80072F8B_u32 as _; +pub const WININET_E_FORCE_RETRY: windows_sys::core::HRESULT = 0x80072F00_u32 as _; +pub const WININET_E_HANDLE_EXISTS: windows_sys::core::HRESULT = 0x80072F04_u32 as _; +pub const WININET_E_HEADER_ALREADY_EXISTS: windows_sys::core::HRESULT = 0x80072F7B_u32 as _; +pub const WININET_E_HEADER_NOT_FOUND: windows_sys::core::HRESULT = 0x80072F76_u32 as _; +pub const WININET_E_HTTPS_HTTP_SUBMIT_REDIR: windows_sys::core::HRESULT = 0x80072F14_u32 as _; +pub const WININET_E_HTTPS_TO_HTTP_ON_REDIR: windows_sys::core::HRESULT = 0x80072F08_u32 as _; +pub const WININET_E_HTTP_TO_HTTPS_ON_REDIR: windows_sys::core::HRESULT = 0x80072F07_u32 as _; +pub const WININET_E_INCORRECT_FORMAT: windows_sys::core::HRESULT = 0x80072EFB_u32 as _; +pub const WININET_E_INCORRECT_HANDLE_STATE: windows_sys::core::HRESULT = 0x80072EF3_u32 as _; +pub const WININET_E_INCORRECT_HANDLE_TYPE: windows_sys::core::HRESULT = 0x80072EF2_u32 as _; +pub const WININET_E_INCORRECT_PASSWORD: windows_sys::core::HRESULT = 0x80072EEE_u32 as _; +pub const WININET_E_INCORRECT_USER_NAME: windows_sys::core::HRESULT = 0x80072EED_u32 as _; +pub const WININET_E_INTERNAL_ERROR: windows_sys::core::HRESULT = 0x80072EE4_u32 as _; +pub const WININET_E_INVALID_CA: windows_sys::core::HRESULT = 0x80072F0D_u32 as _; +pub const WININET_E_INVALID_HEADER: windows_sys::core::HRESULT = 0x80072F79_u32 as _; +pub const WININET_E_INVALID_OPERATION: windows_sys::core::HRESULT = 0x80072EF0_u32 as _; +pub const WININET_E_INVALID_OPTION: windows_sys::core::HRESULT = 0x80072EE9_u32 as _; +pub const WININET_E_INVALID_PROXY_REQUEST: windows_sys::core::HRESULT = 0x80072F01_u32 as _; +pub const WININET_E_INVALID_QUERY_REQUEST: windows_sys::core::HRESULT = 0x80072F7A_u32 as _; +pub const WININET_E_INVALID_SERVER_RESPONSE: windows_sys::core::HRESULT = 0x80072F78_u32 as _; +pub const WININET_E_INVALID_URL: windows_sys::core::HRESULT = 0x80072EE5_u32 as _; +pub const WININET_E_ITEM_NOT_FOUND: windows_sys::core::HRESULT = 0x80072EFC_u32 as _; +pub const WININET_E_LOGIN_FAILURE: windows_sys::core::HRESULT = 0x80072EEF_u32 as _; +pub const WININET_E_LOGIN_FAILURE_DISPLAY_ENTITY_BODY: windows_sys::core::HRESULT = 0x80072F8E_u32 as _; +pub const WININET_E_MIXED_SECURITY: windows_sys::core::HRESULT = 0x80072F09_u32 as _; +pub const WININET_E_NAME_NOT_RESOLVED: windows_sys::core::HRESULT = 0x80072EE7_u32 as _; +pub const WININET_E_NEED_UI: windows_sys::core::HRESULT = 0x80072F02_u32 as _; +pub const WININET_E_NOT_INITIALIZED: windows_sys::core::HRESULT = 0x80072F8C_u32 as _; +pub const WININET_E_NOT_PROXY_REQUEST: windows_sys::core::HRESULT = 0x80072EF4_u32 as _; +pub const WININET_E_NOT_REDIRECTED: windows_sys::core::HRESULT = 0x80072F80_u32 as _; +pub const WININET_E_NO_CALLBACK: windows_sys::core::HRESULT = 0x80072EF9_u32 as _; +pub const WININET_E_NO_CONTEXT: windows_sys::core::HRESULT = 0x80072EF8_u32 as _; +pub const WININET_E_NO_DIRECT_ACCESS: windows_sys::core::HRESULT = 0x80072EF7_u32 as _; +pub const WININET_E_NO_NEW_CONTAINERS: windows_sys::core::HRESULT = 0x80072F13_u32 as _; +pub const WININET_E_OPERATION_CANCELLED: windows_sys::core::HRESULT = 0x80072EF1_u32 as _; +pub const WININET_E_OPTION_NOT_SETTABLE: windows_sys::core::HRESULT = 0x80072EEB_u32 as _; +pub const WININET_E_OUT_OF_HANDLES: windows_sys::core::HRESULT = 0x80072EE1_u32 as _; +pub const WININET_E_POST_IS_NON_SECURE: windows_sys::core::HRESULT = 0x80072F0B_u32 as _; +pub const WININET_E_PROTOCOL_NOT_FOUND: windows_sys::core::HRESULT = 0x80072EE8_u32 as _; +pub const WININET_E_PROXY_SERVER_UNREACHABLE: windows_sys::core::HRESULT = 0x80072F85_u32 as _; +pub const WININET_E_REDIRECT_FAILED: windows_sys::core::HRESULT = 0x80072F7C_u32 as _; +pub const WININET_E_REDIRECT_NEEDS_CONFIRMATION: windows_sys::core::HRESULT = 0x80072F88_u32 as _; +pub const WININET_E_REDIRECT_SCHEME_CHANGE: windows_sys::core::HRESULT = 0x80072F10_u32 as _; +pub const WININET_E_REGISTRY_VALUE_NOT_FOUND: windows_sys::core::HRESULT = 0x80072EF5_u32 as _; +pub const WININET_E_REQUEST_PENDING: windows_sys::core::HRESULT = 0x80072EFA_u32 as _; +pub const WININET_E_RETRY_DIALOG: windows_sys::core::HRESULT = 0x80072F12_u32 as _; +pub const WININET_E_SECURITY_CHANNEL_ERROR: windows_sys::core::HRESULT = 0x80072F7D_u32 as _; +pub const WININET_E_SEC_CERT_CN_INVALID: windows_sys::core::HRESULT = 0x80072F06_u32 as _; +pub const WININET_E_SEC_CERT_DATE_INVALID: windows_sys::core::HRESULT = 0x80072F05_u32 as _; +pub const WININET_E_SEC_CERT_ERRORS: windows_sys::core::HRESULT = 0x80072F17_u32 as _; +pub const WININET_E_SEC_CERT_REVOKED: windows_sys::core::HRESULT = 0x80072F8A_u32 as _; +pub const WININET_E_SEC_CERT_REV_FAILED: windows_sys::core::HRESULT = 0x80072F19_u32 as _; +pub const WININET_E_SEC_INVALID_CERT: windows_sys::core::HRESULT = 0x80072F89_u32 as _; +pub const WININET_E_SERVER_UNREACHABLE: windows_sys::core::HRESULT = 0x80072F84_u32 as _; +pub const WININET_E_SHUTDOWN: windows_sys::core::HRESULT = 0x80072EEC_u32 as _; +pub const WININET_E_TCPIP_NOT_INSTALLED: windows_sys::core::HRESULT = 0x80072F7F_u32 as _; +pub const WININET_E_TIMEOUT: windows_sys::core::HRESULT = 0x80072EE2_u32 as _; +pub const WININET_E_UNABLE_TO_CACHE_FILE: windows_sys::core::HRESULT = 0x80072F7E_u32 as _; +pub const WININET_E_UNABLE_TO_DOWNLOAD_SCRIPT: windows_sys::core::HRESULT = 0x80072F87_u32 as _; +pub const WININET_E_UNRECOGNIZED_SCHEME: windows_sys::core::HRESULT = 0x80072EE6_u32 as _; +pub const WINML_ERR_INVALID_BINDING: windows_sys::core::HRESULT = 0x88900002_u32 as _; +pub const WINML_ERR_INVALID_DEVICE: windows_sys::core::HRESULT = 0x88900001_u32 as _; +pub const WINML_ERR_SIZE_MISMATCH: windows_sys::core::HRESULT = 0x88900004_u32 as _; +pub const WINML_ERR_VALUE_NOTFOUND: windows_sys::core::HRESULT = 0x88900003_u32 as _; +pub const WINVER: u32 = 1280u32; +pub const WINVER_MAXVER: u32 = 2560u32; +pub type WPARAM = usize; +pub const WPN_E_ACCESS_DENIED: windows_sys::core::HRESULT = 0x803E0117_u32 as _; +pub const WPN_E_ALL_URL_NOT_COMPLETED: windows_sys::core::HRESULT = 0x803E0203_u32 as _; +pub const WPN_E_CALLBACK_ALREADY_REGISTERED: windows_sys::core::HRESULT = 0x803E0206_u32 as _; +pub const WPN_E_CHANNEL_CLOSED: windows_sys::core::HRESULT = 0x803E0100_u32 as _; +pub const WPN_E_CHANNEL_REQUEST_NOT_COMPLETE: windows_sys::core::HRESULT = 0x803E0101_u32 as _; +pub const WPN_E_CLOUD_AUTH_UNAVAILABLE: windows_sys::core::HRESULT = 0x803E011A_u32 as _; +pub const WPN_E_CLOUD_DISABLED: windows_sys::core::HRESULT = 0x803E0109_u32 as _; +pub const WPN_E_CLOUD_DISABLED_FOR_APP: windows_sys::core::HRESULT = 0x803E020B_u32 as _; +pub const WPN_E_CLOUD_INCAPABLE: windows_sys::core::HRESULT = 0x803E0110_u32 as _; +pub const WPN_E_CLOUD_SERVICE_UNAVAILABLE: windows_sys::core::HRESULT = 0x803E011B_u32 as _; +pub const WPN_E_DEV_ID_SIZE: windows_sys::core::HRESULT = 0x803E0120_u32 as _; +pub const WPN_E_DUPLICATE_CHANNEL: windows_sys::core::HRESULT = 0x803E0104_u32 as _; +pub const WPN_E_DUPLICATE_REGISTRATION: windows_sys::core::HRESULT = 0x803E0118_u32 as _; +pub const WPN_E_FAILED_LOCK_SCREEN_UPDATE_INTIALIZATION: windows_sys::core::HRESULT = 0x803E011C_u32 as _; +pub const WPN_E_GROUP_ALPHANUMERIC: windows_sys::core::HRESULT = 0x803E020A_u32 as _; +pub const WPN_E_GROUP_SIZE: windows_sys::core::HRESULT = 0x803E0209_u32 as _; +pub const WPN_E_IMAGE_NOT_FOUND_IN_CACHE: windows_sys::core::HRESULT = 0x803E0202_u32 as _; +pub const WPN_E_INTERNET_INCAPABLE: windows_sys::core::HRESULT = 0x803E0113_u32 as _; +pub const WPN_E_INVALID_APP: windows_sys::core::HRESULT = 0x803E0102_u32 as _; +pub const WPN_E_INVALID_CLOUD_IMAGE: windows_sys::core::HRESULT = 0x803E0204_u32 as _; +pub const WPN_E_INVALID_HTTP_STATUS_CODE: windows_sys::core::HRESULT = 0x803E012B_u32 as _; +pub const WPN_E_NOTIFICATION_DISABLED: windows_sys::core::HRESULT = 0x803E0111_u32 as _; +pub const WPN_E_NOTIFICATION_HIDDEN: windows_sys::core::HRESULT = 0x803E0107_u32 as _; +pub const WPN_E_NOTIFICATION_ID_MATCHED: windows_sys::core::HRESULT = 0x803E0205_u32 as _; +pub const WPN_E_NOTIFICATION_INCAPABLE: windows_sys::core::HRESULT = 0x803E0112_u32 as _; +pub const WPN_E_NOTIFICATION_NOT_POSTED: windows_sys::core::HRESULT = 0x803E0108_u32 as _; +pub const WPN_E_NOTIFICATION_POSTED: windows_sys::core::HRESULT = 0x803E0106_u32 as _; +pub const WPN_E_NOTIFICATION_SIZE: windows_sys::core::HRESULT = 0x803E0115_u32 as _; +pub const WPN_E_NOTIFICATION_TYPE_DISABLED: windows_sys::core::HRESULT = 0x803E0114_u32 as _; +pub const WPN_E_OUTSTANDING_CHANNEL_REQUEST: windows_sys::core::HRESULT = 0x803E0103_u32 as _; +pub const WPN_E_OUT_OF_SESSION: windows_sys::core::HRESULT = 0x803E0200_u32 as _; +pub const WPN_E_PLATFORM_UNAVAILABLE: windows_sys::core::HRESULT = 0x803E0105_u32 as _; +pub const WPN_E_POWER_SAVE: windows_sys::core::HRESULT = 0x803E0201_u32 as _; +pub const WPN_E_PUSH_NOTIFICATION_INCAPABLE: windows_sys::core::HRESULT = 0x803E0119_u32 as _; +pub const WPN_E_STORAGE_LOCKED: windows_sys::core::HRESULT = 0x803E0208_u32 as _; +pub const WPN_E_TAG_ALPHANUMERIC: windows_sys::core::HRESULT = 0x803E012A_u32 as _; +pub const WPN_E_TAG_SIZE: windows_sys::core::HRESULT = 0x803E0116_u32 as _; +pub const WPN_E_TOAST_NOTIFICATION_DROPPED: windows_sys::core::HRESULT = 0x803E0207_u32 as _; +pub const WS_E_ADDRESS_IN_USE: windows_sys::core::HRESULT = 0x803D000B_u32 as _; +pub const WS_E_ADDRESS_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x803D000C_u32 as _; +pub const WS_E_ENDPOINT_ACCESS_DENIED: windows_sys::core::HRESULT = 0x803D0005_u32 as _; +pub const WS_E_ENDPOINT_ACTION_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803D0011_u32 as _; +pub const WS_E_ENDPOINT_DISCONNECTED: windows_sys::core::HRESULT = 0x803D0014_u32 as _; +pub const WS_E_ENDPOINT_FAILURE: windows_sys::core::HRESULT = 0x803D000F_u32 as _; +pub const WS_E_ENDPOINT_FAULT_RECEIVED: windows_sys::core::HRESULT = 0x803D0013_u32 as _; +pub const WS_E_ENDPOINT_NOT_AVAILABLE: windows_sys::core::HRESULT = 0x803D000E_u32 as _; +pub const WS_E_ENDPOINT_NOT_FOUND: windows_sys::core::HRESULT = 0x803D000D_u32 as _; +pub const WS_E_ENDPOINT_TOO_BUSY: windows_sys::core::HRESULT = 0x803D0012_u32 as _; +pub const WS_E_ENDPOINT_UNREACHABLE: windows_sys::core::HRESULT = 0x803D0010_u32 as _; +pub const WS_E_INVALID_ENDPOINT_URL: windows_sys::core::HRESULT = 0x803D0020_u32 as _; +pub const WS_E_INVALID_FORMAT: windows_sys::core::HRESULT = 0x803D0000_u32 as _; +pub const WS_E_INVALID_OPERATION: windows_sys::core::HRESULT = 0x803D0003_u32 as _; +pub const WS_E_NOT_SUPPORTED: windows_sys::core::HRESULT = 0x803D0017_u32 as _; +pub const WS_E_NO_TRANSLATION_AVAILABLE: windows_sys::core::HRESULT = 0x803D0009_u32 as _; +pub const WS_E_NUMERIC_OVERFLOW: windows_sys::core::HRESULT = 0x803D0002_u32 as _; +pub const WS_E_OBJECT_FAULTED: windows_sys::core::HRESULT = 0x803D0001_u32 as _; +pub const WS_E_OPERATION_ABANDONED: windows_sys::core::HRESULT = 0x803D0007_u32 as _; +pub const WS_E_OPERATION_ABORTED: windows_sys::core::HRESULT = 0x803D0004_u32 as _; +pub const WS_E_OPERATION_TIMED_OUT: windows_sys::core::HRESULT = 0x803D0006_u32 as _; +pub const WS_E_OTHER: windows_sys::core::HRESULT = 0x803D0021_u32 as _; +pub const WS_E_PROXY_ACCESS_DENIED: windows_sys::core::HRESULT = 0x803D0016_u32 as _; +pub const WS_E_PROXY_FAILURE: windows_sys::core::HRESULT = 0x803D0015_u32 as _; +pub const WS_E_PROXY_REQUIRES_BASIC_AUTH: windows_sys::core::HRESULT = 0x803D0018_u32 as _; +pub const WS_E_PROXY_REQUIRES_DIGEST_AUTH: windows_sys::core::HRESULT = 0x803D0019_u32 as _; +pub const WS_E_PROXY_REQUIRES_NEGOTIATE_AUTH: windows_sys::core::HRESULT = 0x803D001B_u32 as _; +pub const WS_E_PROXY_REQUIRES_NTLM_AUTH: windows_sys::core::HRESULT = 0x803D001A_u32 as _; +pub const WS_E_QUOTA_EXCEEDED: windows_sys::core::HRESULT = 0x803D0008_u32 as _; +pub const WS_E_SECURITY_SYSTEM_FAILURE: windows_sys::core::HRESULT = 0x803D0023_u32 as _; +pub const WS_E_SECURITY_TOKEN_EXPIRED: windows_sys::core::HRESULT = 0x803D0022_u32 as _; +pub const WS_E_SECURITY_VERIFICATION_FAILURE: windows_sys::core::HRESULT = 0x803D000A_u32 as _; +pub const WS_E_SERVER_REQUIRES_BASIC_AUTH: windows_sys::core::HRESULT = 0x803D001C_u32 as _; +pub const WS_E_SERVER_REQUIRES_DIGEST_AUTH: windows_sys::core::HRESULT = 0x803D001D_u32 as _; +pub const WS_E_SERVER_REQUIRES_NEGOTIATE_AUTH: windows_sys::core::HRESULT = 0x803D001F_u32 as _; +pub const WS_E_SERVER_REQUIRES_NTLM_AUTH: windows_sys::core::HRESULT = 0x803D001E_u32 as _; +pub const WS_S_ASYNC: windows_sys::core::HRESULT = 0x3D0000_u32 as _; +pub const WS_S_END: windows_sys::core::HRESULT = 0x3D0001_u32 as _; +pub const XACT_E_ABORTED: windows_sys::core::HRESULT = 0x8004D019_u32 as _; +pub const XACT_E_ABORTING: windows_sys::core::HRESULT = 0x8004D029_u32 as _; +pub const XACT_E_ALREADYINPROGRESS: windows_sys::core::HRESULT = 0x8004D018_u32 as _; +pub const XACT_E_ALREADYOTHERSINGLEPHASE: windows_sys::core::HRESULT = 0x8004D000_u32 as _; +pub const XACT_E_CANTRETAIN: windows_sys::core::HRESULT = 0x8004D001_u32 as _; +pub const XACT_E_CLERKEXISTS: windows_sys::core::HRESULT = 0x8004D081_u32 as _; +pub const XACT_E_CLERKNOTFOUND: windows_sys::core::HRESULT = 0x8004D080_u32 as _; +pub const XACT_E_COMMITFAILED: windows_sys::core::HRESULT = 0x8004D002_u32 as _; +pub const XACT_E_COMMITPREVENTED: windows_sys::core::HRESULT = 0x8004D003_u32 as _; +pub const XACT_E_CONNECTION_DENIED: windows_sys::core::HRESULT = 0x8004D01D_u32 as _; +pub const XACT_E_CONNECTION_DOWN: windows_sys::core::HRESULT = 0x8004D01C_u32 as _; +pub const XACT_E_DEST_TMNOTAVAILABLE: windows_sys::core::HRESULT = 0x8004D022_u32 as _; +pub const XACT_E_FIRST: u32 = 2147799040u32; +pub const XACT_E_HEURISTICABORT: windows_sys::core::HRESULT = 0x8004D004_u32 as _; +pub const XACT_E_HEURISTICCOMMIT: windows_sys::core::HRESULT = 0x8004D005_u32 as _; +pub const XACT_E_HEURISTICDAMAGE: windows_sys::core::HRESULT = 0x8004D006_u32 as _; +pub const XACT_E_HEURISTICDANGER: windows_sys::core::HRESULT = 0x8004D007_u32 as _; +pub const XACT_E_INDOUBT: windows_sys::core::HRESULT = 0x8004D016_u32 as _; +pub const XACT_E_INVALIDCOOKIE: windows_sys::core::HRESULT = 0x8004D015_u32 as _; +pub const XACT_E_INVALIDLSN: windows_sys::core::HRESULT = 0x8004D084_u32 as _; +pub const XACT_E_ISOLATIONLEVEL: windows_sys::core::HRESULT = 0x8004D008_u32 as _; +pub const XACT_E_LAST: u32 = 2147799083u32; +pub const XACT_E_LOGFULL: windows_sys::core::HRESULT = 0x8004D01A_u32 as _; +pub const XACT_E_LU_TX_DISABLED: windows_sys::core::HRESULT = 0x8004D02C_u32 as _; +pub const XACT_E_NETWORK_TX_DISABLED: windows_sys::core::HRESULT = 0x8004D024_u32 as _; +pub const XACT_E_NOASYNC: windows_sys::core::HRESULT = 0x8004D009_u32 as _; +pub const XACT_E_NOENLIST: windows_sys::core::HRESULT = 0x8004D00A_u32 as _; +pub const XACT_E_NOIMPORTOBJECT: windows_sys::core::HRESULT = 0x8004D014_u32 as _; +pub const XACT_E_NOISORETAIN: windows_sys::core::HRESULT = 0x8004D00B_u32 as _; +pub const XACT_E_NORESOURCE: windows_sys::core::HRESULT = 0x8004D00C_u32 as _; +pub const XACT_E_NOTCURRENT: windows_sys::core::HRESULT = 0x8004D00D_u32 as _; +pub const XACT_E_NOTIMEOUT: windows_sys::core::HRESULT = 0x8004D017_u32 as _; +pub const XACT_E_NOTRANSACTION: windows_sys::core::HRESULT = 0x8004D00E_u32 as _; +pub const XACT_E_NOTSUPPORTED: windows_sys::core::HRESULT = 0x8004D00F_u32 as _; +pub const XACT_E_PARTNER_NETWORK_TX_DISABLED: windows_sys::core::HRESULT = 0x8004D025_u32 as _; +pub const XACT_E_PULL_COMM_FAILURE: windows_sys::core::HRESULT = 0x8004D02B_u32 as _; +pub const XACT_E_PUSH_COMM_FAILURE: windows_sys::core::HRESULT = 0x8004D02A_u32 as _; +pub const XACT_E_RECOVERYINPROGRESS: windows_sys::core::HRESULT = 0x8004D082_u32 as _; +pub const XACT_E_REENLISTTIMEOUT: windows_sys::core::HRESULT = 0x8004D01E_u32 as _; +pub const XACT_E_REPLAYREQUEST: windows_sys::core::HRESULT = 0x8004D085_u32 as _; +pub const XACT_E_TIP_CONNECT_FAILED: windows_sys::core::HRESULT = 0x8004D01F_u32 as _; +pub const XACT_E_TIP_DISABLED: windows_sys::core::HRESULT = 0x8004D023_u32 as _; +pub const XACT_E_TIP_PROTOCOL_ERROR: windows_sys::core::HRESULT = 0x8004D020_u32 as _; +pub const XACT_E_TIP_PULL_FAILED: windows_sys::core::HRESULT = 0x8004D021_u32 as _; +pub const XACT_E_TMNOTAVAILABLE: windows_sys::core::HRESULT = 0x8004D01B_u32 as _; +pub const XACT_E_TRANSACTIONCLOSED: windows_sys::core::HRESULT = 0x8004D083_u32 as _; +pub const XACT_E_UNABLE_TO_LOAD_DTC_PROXY: windows_sys::core::HRESULT = 0x8004D028_u32 as _; +pub const XACT_E_UNABLE_TO_READ_DTC_CONFIG: windows_sys::core::HRESULT = 0x8004D027_u32 as _; +pub const XACT_E_UNKNOWNRMGRID: windows_sys::core::HRESULT = 0x8004D010_u32 as _; +pub const XACT_E_WRONGSTATE: windows_sys::core::HRESULT = 0x8004D011_u32 as _; +pub const XACT_E_WRONGUOW: windows_sys::core::HRESULT = 0x8004D012_u32 as _; +pub const XACT_E_XA_TX_DISABLED: windows_sys::core::HRESULT = 0x8004D026_u32 as _; +pub const XACT_E_XTIONEXISTS: windows_sys::core::HRESULT = 0x8004D013_u32 as _; +pub const XACT_S_ABORTING: windows_sys::core::HRESULT = 0x4D008_u32 as _; +pub const XACT_S_ALLNORETAIN: windows_sys::core::HRESULT = 0x4D007_u32 as _; +pub const XACT_S_ASYNC: windows_sys::core::HRESULT = 0x4D000_u32 as _; +pub const XACT_S_DEFECT: windows_sys::core::HRESULT = 0x4D001_u32 as _; +pub const XACT_S_FIRST: u32 = 315392u32; +pub const XACT_S_LAST: u32 = 315408u32; +pub const XACT_S_LASTRESOURCEMANAGER: windows_sys::core::HRESULT = 0x4D010_u32 as _; +pub const XACT_S_LOCALLY_OK: windows_sys::core::HRESULT = 0x4D00A_u32 as _; +pub const XACT_S_MADECHANGESCONTENT: windows_sys::core::HRESULT = 0x4D005_u32 as _; +pub const XACT_S_MADECHANGESINFORM: windows_sys::core::HRESULT = 0x4D006_u32 as _; +pub const XACT_S_OKINFORM: windows_sys::core::HRESULT = 0x4D004_u32 as _; +pub const XACT_S_READONLY: windows_sys::core::HRESULT = 0x4D002_u32 as _; +pub const XACT_S_SINGLEPHASE: windows_sys::core::HRESULT = 0x4D009_u32 as _; +pub const XACT_S_SOMENORETAIN: windows_sys::core::HRESULT = 0x4D003_u32 as _; +pub const XENROLL_E_CANNOT_ADD_ROOT_CERT: windows_sys::core::HRESULT = 0x80095001_u32 as _; +pub const XENROLL_E_KEYSPEC_SMIME_MISMATCH: windows_sys::core::HRESULT = 0x80095005_u32 as _; +pub const XENROLL_E_KEY_NOT_EXPORTABLE: windows_sys::core::HRESULT = 0x80095000_u32 as _; +pub const XENROLL_E_RESPONSE_KA_HASH_MISMATCH: windows_sys::core::HRESULT = 0x80095004_u32 as _; +pub const XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND: windows_sys::core::HRESULT = 0x80095002_u32 as _; +pub const XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH: windows_sys::core::HRESULT = 0x80095003_u32 as _; +pub const _WIN32_IE_MAXVER: u32 = 2560u32; +pub const _WIN32_MAXVER: u32 = 2560u32; +pub const _WIN32_WINDOWS_MAXVER: u32 = 2560u32; +pub const _WIN32_WINNT_MAXVER: u32 = 2560u32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Gaming/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Gaming/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..350c91c063505f1ba7034408e6f6afbaa79b5c53 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Gaming/mod.rs @@ -0,0 +1,99 @@ +windows_link::link!("api-ms-win-gaming-tcui-l1-1-1.dll" "system" fn CheckGamingPrivilegeSilently(privilegeid : u32, scope : windows_sys::core::HSTRING, policy : windows_sys::core::HSTRING, hasprivilege : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn CheckGamingPrivilegeSilentlyForUser(user : * mut core::ffi::c_void, privilegeid : u32, scope : windows_sys::core::HSTRING, policy : windows_sys::core::HSTRING, hasprivilege : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-1.dll" "system" fn CheckGamingPrivilegeWithUI(privilegeid : u32, scope : windows_sys::core::HSTRING, policy : windows_sys::core::HSTRING, friendlymessage : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn CheckGamingPrivilegeWithUIForUser(user : * mut core::ffi::c_void, privilegeid : u32, scope : windows_sys::core::HSTRING, policy : windows_sys::core::HSTRING, friendlymessage : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-expandedresources-l1-1-0.dll" "system" fn GetExpandedResourceExclusiveCpuCount(exclusivecpucount : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-deviceinformation-l1-1-0.dll" "system" fn GetGamingDeviceModelInformation(information : *mut GAMING_DEVICE_MODEL_INFORMATION) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-expandedresources-l1-1-0.dll" "system" fn HasExpandedResources(hasexpandedresources : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ProcessPendingGameUI(waitforcompletion : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-expandedresources-l1-1-0.dll" "system" fn ReleaseExclusiveCpuSets() -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowChangeFriendRelationshipUI(targetuserxuid : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowChangeFriendRelationshipUIForUser(user : * mut core::ffi::c_void, targetuserxuid : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowCustomizeUserProfileUI(completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowCustomizeUserProfileUIForUser(user : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowFindFriendsUI(completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowFindFriendsUIForUser(user : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowGameInfoUI(titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowGameInfoUIForUser(user : * mut core::ffi::c_void, titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowGameInviteUI(serviceconfigurationid : windows_sys::core::HSTRING, sessiontemplatename : windows_sys::core::HSTRING, sessionid : windows_sys::core::HSTRING, invitationdisplaytext : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowGameInviteUIForUser(user : * mut core::ffi::c_void, serviceconfigurationid : windows_sys::core::HSTRING, sessiontemplatename : windows_sys::core::HSTRING, sessionid : windows_sys::core::HSTRING, invitationdisplaytext : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-3.dll" "system" fn ShowGameInviteUIWithContext(serviceconfigurationid : windows_sys::core::HSTRING, sessiontemplatename : windows_sys::core::HSTRING, sessionid : windows_sys::core::HSTRING, invitationdisplaytext : windows_sys::core::HSTRING, customactivationcontext : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-3.dll" "system" fn ShowGameInviteUIWithContextForUser(user : * mut core::ffi::c_void, serviceconfigurationid : windows_sys::core::HSTRING, sessiontemplatename : windows_sys::core::HSTRING, sessionid : windows_sys::core::HSTRING, invitationdisplaytext : windows_sys::core::HSTRING, customactivationcontext : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowPlayerPickerUI(promptdisplaytext : windows_sys::core::HSTRING, xuids : *const windows_sys::core::HSTRING, xuidscount : usize, preselectedxuids : *const windows_sys::core::HSTRING, preselectedxuidscount : usize, minselectioncount : usize, maxselectioncount : usize, completionroutine : PlayerPickerUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowPlayerPickerUIForUser(user : * mut core::ffi::c_void, promptdisplaytext : windows_sys::core::HSTRING, xuids : *const windows_sys::core::HSTRING, xuidscount : usize, preselectedxuids : *const windows_sys::core::HSTRING, preselectedxuidscount : usize, minselectioncount : usize, maxselectioncount : usize, completionroutine : PlayerPickerUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowProfileCardUI(targetuserxuid : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowProfileCardUIForUser(user : * mut core::ffi::c_void, targetuserxuid : windows_sys::core::HSTRING, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowTitleAchievementsUI(titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowTitleAchievementsUIForUser(user : * mut core::ffi::c_void, titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowUserSettingsUI(completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowUserSettingsUIForUser(user : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn TryCancelPendingGameUI() -> windows_sys::core::BOOL); +pub const GAMESTATS_OPEN_CREATED: GAMESTATS_OPEN_RESULT = 0i32; +pub const GAMESTATS_OPEN_OPENED: GAMESTATS_OPEN_RESULT = 1i32; +pub const GAMESTATS_OPEN_OPENONLY: GAMESTATS_OPEN_TYPE = 1i32; +pub const GAMESTATS_OPEN_OPENORCREATE: GAMESTATS_OPEN_TYPE = 0i32; +pub type GAMESTATS_OPEN_RESULT = i32; +pub type GAMESTATS_OPEN_TYPE = i32; +pub type GAME_INSTALL_SCOPE = i32; +pub type GAMING_DEVICE_DEVICE_ID = i32; +pub const GAMING_DEVICE_DEVICE_ID_NONE: GAMING_DEVICE_DEVICE_ID = 0i32; +pub const GAMING_DEVICE_DEVICE_ID_XBOX_ONE: GAMING_DEVICE_DEVICE_ID = 1988865574i32; +pub const GAMING_DEVICE_DEVICE_ID_XBOX_ONE_S: GAMING_DEVICE_DEVICE_ID = 712204761i32; +pub const GAMING_DEVICE_DEVICE_ID_XBOX_ONE_X: GAMING_DEVICE_DEVICE_ID = 1523980231i32; +pub const GAMING_DEVICE_DEVICE_ID_XBOX_ONE_X_DEVKIT: GAMING_DEVICE_DEVICE_ID = 284675555i32; +pub const GAMING_DEVICE_DEVICE_ID_XBOX_SERIES_S: GAMING_DEVICE_DEVICE_ID = 489159355i32; +pub const GAMING_DEVICE_DEVICE_ID_XBOX_SERIES_X: GAMING_DEVICE_DEVICE_ID = 796540415i32; +pub const GAMING_DEVICE_DEVICE_ID_XBOX_SERIES_X_DEVKIT: GAMING_DEVICE_DEVICE_ID = -561359263i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct GAMING_DEVICE_MODEL_INFORMATION { + pub vendorId: GAMING_DEVICE_VENDOR_ID, + pub deviceId: GAMING_DEVICE_DEVICE_ID, +} +pub type GAMING_DEVICE_VENDOR_ID = i32; +pub const GAMING_DEVICE_VENDOR_ID_MICROSOFT: GAMING_DEVICE_VENDOR_ID = -1024700366i32; +pub const GAMING_DEVICE_VENDOR_ID_NONE: GAMING_DEVICE_VENDOR_ID = 0i32; +pub const GIS_ALL_USERS: GAME_INSTALL_SCOPE = 3i32; +pub const GIS_CURRENT_USER: GAME_INSTALL_SCOPE = 2i32; +pub const GIS_NOT_INSTALLED: GAME_INSTALL_SCOPE = 1i32; +pub const GameExplorer: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9a5ea990_3034_4d6f_9128_01f3c61022bc); +pub const GameStatistics: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdbc85a2c_c0dc_4961_b6e2_d28b62c11ad4); +pub type GameUICompletionRoutine = Option; +pub const ID_GDF_THUMBNAIL_STR: windows_sys::core::PCWSTR = windows_sys::core::w!("__GDF_THUMBNAIL"); +pub const ID_GDF_XML_STR: windows_sys::core::PCWSTR = windows_sys::core::w!("__GDF_XML"); +pub type KnownGamingPrivileges = i32; +pub type PlayerPickerUICompletionRoutine = Option; +pub type XBL_IDP_AUTH_TOKEN_STATUS = i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_LOAD_MSA_ACCOUNT_FAILED: XBL_IDP_AUTH_TOKEN_STATUS = 3i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_MSA_INTERRUPT: XBL_IDP_AUTH_TOKEN_STATUS = 5i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_NO_ACCOUNT_SET: XBL_IDP_AUTH_TOKEN_STATUS = 2i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_OFFLINE_NO_CONSENT: XBL_IDP_AUTH_TOKEN_STATUS = 6i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_OFFLINE_SUCCESS: XBL_IDP_AUTH_TOKEN_STATUS = 1i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_SUCCESS: XBL_IDP_AUTH_TOKEN_STATUS = 0i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_UNKNOWN: XBL_IDP_AUTH_TOKEN_STATUS = -1i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_VIEW_NOT_SET: XBL_IDP_AUTH_TOKEN_STATUS = 7i32; +pub const XBL_IDP_AUTH_TOKEN_STATUS_XBOX_VETO: XBL_IDP_AUTH_TOKEN_STATUS = 4i32; +pub const XPRIVILEGE_ADD_FRIEND: KnownGamingPrivileges = 255i32; +pub const XPRIVILEGE_BROADCAST: KnownGamingPrivileges = 190i32; +pub const XPRIVILEGE_CLOUD_GAMING_JOIN_SESSION: KnownGamingPrivileges = 208i32; +pub const XPRIVILEGE_CLOUD_GAMING_MANAGE_SESSION: KnownGamingPrivileges = 207i32; +pub const XPRIVILEGE_CLOUD_SAVED_GAMES: KnownGamingPrivileges = 209i32; +pub const XPRIVILEGE_COMMUNICATIONS: KnownGamingPrivileges = 252i32; +pub const XPRIVILEGE_COMMUNICATION_VOICE_INGAME: KnownGamingPrivileges = 205i32; +pub const XPRIVILEGE_COMMUNICATION_VOICE_SKYPE: KnownGamingPrivileges = 206i32; +pub const XPRIVILEGE_GAME_DVR: KnownGamingPrivileges = 198i32; +pub const XPRIVILEGE_MULTIPLAYER_PARTIES: KnownGamingPrivileges = 203i32; +pub const XPRIVILEGE_MULTIPLAYER_SESSIONS: KnownGamingPrivileges = 254i32; +pub const XPRIVILEGE_PREMIUM_CONTENT: KnownGamingPrivileges = 214i32; +pub const XPRIVILEGE_PREMIUM_VIDEO: KnownGamingPrivileges = 224i32; +pub const XPRIVILEGE_PROFILE_VIEWING: KnownGamingPrivileges = 249i32; +pub const XPRIVILEGE_PURCHASE_CONTENT: KnownGamingPrivileges = 245i32; +pub const XPRIVILEGE_SHARE_CONTENT: KnownGamingPrivileges = 211i32; +pub const XPRIVILEGE_SHARE_KINECT_CONTENT: KnownGamingPrivileges = 199i32; +pub const XPRIVILEGE_SOCIAL_NETWORK_SHARING: KnownGamingPrivileges = 220i32; +pub const XPRIVILEGE_SUBSCRIPTION_CONTENT: KnownGamingPrivileges = 219i32; +pub const XPRIVILEGE_USER_CREATED_CONTENT: KnownGamingPrivileges = 247i32; +pub const XPRIVILEGE_VIDEO_COMMUNICATIONS: KnownGamingPrivileges = 235i32; +pub const XPRIVILEGE_VIEW_FRIENDS_LIST: KnownGamingPrivileges = 197i32; +pub const XblIdpAuthManager: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xce23534b_56d8_4978_86a2_7ee570640468); +pub const XblIdpAuthTokenResult: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9f493441_744a_410c_ae2b_9a22f7c7731f); diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Globalization/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Globalization/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..d129ea6877dbb38df3ec27660e0b5df259fbadf3 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Globalization/mod.rs @@ -0,0 +1,5285 @@ +windows_link::link!("kernel32.dll" "system" fn AdjustCalendarDate(lpcaldatetime : *mut CALDATETIME, calunit : CALDATETIME_DATEUNIT, amount : i32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn CompareStringA(locale : u32, dwcmpflags : u32, lpstring1 : *const i8, cchcount1 : i32, lpstring2 : *const i8, cchcount2 : i32) -> COMPARESTRING_RESULT); +windows_link::link!("kernel32.dll" "system" fn CompareStringEx(lplocalename : windows_sys::core::PCWSTR, dwcmpflags : COMPARE_STRING_FLAGS, lpstring1 : windows_sys::core::PCWSTR, cchcount1 : i32, lpstring2 : windows_sys::core::PCWSTR, cchcount2 : i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const core::ffi::c_void, lparam : super::Foundation:: LPARAM) -> COMPARESTRING_RESULT); +windows_link::link!("kernel32.dll" "system" fn CompareStringOrdinal(lpstring1 : windows_sys::core::PCWSTR, cchcount1 : i32, lpstring2 : windows_sys::core::PCWSTR, cchcount2 : i32, bignorecase : windows_sys::core::BOOL) -> COMPARESTRING_RESULT); +windows_link::link!("kernel32.dll" "system" fn CompareStringW(locale : u32, dwcmpflags : u32, lpstring1 : windows_sys::core::PCWSTR, cchcount1 : i32, lpstring2 : windows_sys::core::PCWSTR, cchcount2 : i32) -> COMPARESTRING_RESULT); +windows_link::link!("kernel32.dll" "system" fn ConvertCalDateTimeToSystemTime(lpcaldatetime : *const CALDATETIME, lpsystime : *mut super::Foundation:: SYSTEMTIME) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn ConvertDefaultLocale(locale : u32) -> u32); +windows_link::link!("kernel32.dll" "system" fn ConvertSystemTimeToCalDateTime(lpsystime : *const super::Foundation:: SYSTEMTIME, calid : u32, lpcaldatetime : *mut CALDATETIME) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumCalendarInfoA(lpcalinfoenumproc : CALINFO_ENUMPROCA, locale : u32, calendar : u32, caltype : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumCalendarInfoExA(lpcalinfoenumprocex : CALINFO_ENUMPROCEXA, locale : u32, calendar : u32, caltype : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumCalendarInfoExEx(pcalinfoenumprocexex : CALINFO_ENUMPROCEXEX, lplocalename : windows_sys::core::PCWSTR, calendar : u32, lpreserved : windows_sys::core::PCWSTR, caltype : u32, lparam : super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumCalendarInfoExW(lpcalinfoenumprocex : CALINFO_ENUMPROCEXW, locale : u32, calendar : u32, caltype : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumCalendarInfoW(lpcalinfoenumproc : CALINFO_ENUMPROCW, locale : u32, calendar : u32, caltype : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumDateFormatsA(lpdatefmtenumproc : DATEFMT_ENUMPROCA, locale : u32, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumDateFormatsExA(lpdatefmtenumprocex : DATEFMT_ENUMPROCEXA, locale : u32, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumDateFormatsExEx(lpdatefmtenumprocexex : DATEFMT_ENUMPROCEXEX, lplocalename : windows_sys::core::PCWSTR, dwflags : ENUM_DATE_FORMATS_FLAGS, lparam : super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumDateFormatsExW(lpdatefmtenumprocex : DATEFMT_ENUMPROCEXW, locale : u32, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumDateFormatsW(lpdatefmtenumproc : DATEFMT_ENUMPROCW, locale : u32, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumLanguageGroupLocalesA(lplanggrouplocaleenumproc : LANGGROUPLOCALE_ENUMPROCA, languagegroup : u32, dwflags : u32, lparam : isize) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumLanguageGroupLocalesW(lplanggrouplocaleenumproc : LANGGROUPLOCALE_ENUMPROCW, languagegroup : u32, dwflags : u32, lparam : isize) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemCodePagesA(lpcodepageenumproc : CODEPAGE_ENUMPROCA, dwflags : ENUM_SYSTEM_CODE_PAGES_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemCodePagesW(lpcodepageenumproc : CODEPAGE_ENUMPROCW, dwflags : ENUM_SYSTEM_CODE_PAGES_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemGeoID(geoclass : u32, parentgeoid : i32, lpgeoenumproc : GEO_ENUMPROC) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemGeoNames(geoclass : u32, geoenumproc : GEO_ENUMNAMEPROC, data : super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemLanguageGroupsA(lplanguagegroupenumproc : LANGUAGEGROUP_ENUMPROCA, dwflags : ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam : isize) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemLanguageGroupsW(lplanguagegroupenumproc : LANGUAGEGROUP_ENUMPROCW, dwflags : ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam : isize) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemLocalesA(lplocaleenumproc : LOCALE_ENUMPROCA, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemLocalesEx(lplocaleenumprocex : LOCALE_ENUMPROCEX, dwflags : u32, lparam : super::Foundation:: LPARAM, lpreserved : *const core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumSystemLocalesW(lplocaleenumproc : LOCALE_ENUMPROCW, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumTimeFormatsA(lptimefmtenumproc : TIMEFMT_ENUMPROCA, locale : u32, dwflags : TIME_FORMAT_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumTimeFormatsEx(lptimefmtenumprocex : TIMEFMT_ENUMPROCEX, lplocalename : windows_sys::core::PCWSTR, dwflags : u32, lparam : super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumTimeFormatsW(lptimefmtenumproc : TIMEFMT_ENUMPROCW, locale : u32, dwflags : TIME_FORMAT_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumUILanguagesA(lpuilanguageenumproc : UILANGUAGE_ENUMPROCA, dwflags : u32, lparam : isize) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn EnumUILanguagesW(lpuilanguageenumproc : UILANGUAGE_ENUMPROCW, dwflags : u32, lparam : isize) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn FindNLSString(locale : u32, dwfindnlsstringflags : u32, lpstringsource : windows_sys::core::PCWSTR, cchsource : i32, lpstringvalue : windows_sys::core::PCWSTR, cchvalue : i32, pcchfound : *mut i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn FindNLSStringEx(lplocalename : windows_sys::core::PCWSTR, dwfindnlsstringflags : u32, lpstringsource : windows_sys::core::PCWSTR, cchsource : i32, lpstringvalue : windows_sys::core::PCWSTR, cchvalue : i32, pcchfound : *mut i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const core::ffi::c_void, sorthandle : super::Foundation:: LPARAM) -> i32); +windows_link::link!("kernel32.dll" "system" fn FindStringOrdinal(dwfindstringordinalflags : u32, lpstringsource : windows_sys::core::PCWSTR, cchsource : i32, lpstringvalue : windows_sys::core::PCWSTR, cchvalue : i32, bignorecase : windows_sys::core::BOOL) -> i32); +windows_link::link!("kernel32.dll" "system" fn FoldStringA(dwmapflags : FOLD_STRING_MAP_FLAGS, lpsrcstr : windows_sys::core::PCSTR, cchsrc : i32, lpdeststr : windows_sys::core::PSTR, cchdest : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn FoldStringW(dwmapflags : FOLD_STRING_MAP_FLAGS, lpsrcstr : windows_sys::core::PCWSTR, cchsrc : i32, lpdeststr : windows_sys::core::PWSTR, cchdest : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetACP() -> u32); +windows_link::link!("kernel32.dll" "system" fn GetCPInfo(codepage : u32, lpcpinfo : *mut CPINFO) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetCPInfoExA(codepage : u32, dwflags : u32, lpcpinfoex : *mut CPINFOEXA) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetCPInfoExW(codepage : u32, dwflags : u32, lpcpinfoex : *mut CPINFOEXW) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetCalendarDateFormatEx(lpszlocale : windows_sys::core::PCWSTR, dwflags : u32, lpcaldatetime : *const CALDATETIME, lpformat : windows_sys::core::PCWSTR, lpdatestr : windows_sys::core::PWSTR, cchdate : i32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetCalendarInfoA(locale : u32, calendar : u32, caltype : u32, lpcaldata : windows_sys::core::PSTR, cchdata : i32, lpvalue : *mut u32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetCalendarInfoEx(lplocalename : windows_sys::core::PCWSTR, calendar : u32, lpreserved : windows_sys::core::PCWSTR, caltype : u32, lpcaldata : windows_sys::core::PWSTR, cchdata : i32, lpvalue : *mut u32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetCalendarInfoW(locale : u32, calendar : u32, caltype : u32, lpcaldata : windows_sys::core::PWSTR, cchdata : i32, lpvalue : *mut u32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetCalendarSupportedDateRange(calendar : u32, lpcalmindatetime : *mut CALDATETIME, lpcalmaxdatetime : *mut CALDATETIME) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetCurrencyFormatA(locale : u32, dwflags : u32, lpvalue : windows_sys::core::PCSTR, lpformat : *const CURRENCYFMTA, lpcurrencystr : windows_sys::core::PSTR, cchcurrency : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetCurrencyFormatEx(lplocalename : windows_sys::core::PCWSTR, dwflags : u32, lpvalue : windows_sys::core::PCWSTR, lpformat : *const CURRENCYFMTW, lpcurrencystr : windows_sys::core::PWSTR, cchcurrency : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetCurrencyFormatW(locale : u32, dwflags : u32, lpvalue : windows_sys::core::PCWSTR, lpformat : *const CURRENCYFMTW, lpcurrencystr : windows_sys::core::PWSTR, cchcurrency : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetDateFormatA(locale : u32, dwflags : u32, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : windows_sys::core::PCSTR, lpdatestr : windows_sys::core::PSTR, cchdate : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetDateFormatEx(lplocalename : windows_sys::core::PCWSTR, dwflags : ENUM_DATE_FORMATS_FLAGS, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : windows_sys::core::PCWSTR, lpdatestr : windows_sys::core::PWSTR, cchdate : i32, lpcalendar : windows_sys::core::PCWSTR) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetDateFormatW(locale : u32, dwflags : u32, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : windows_sys::core::PCWSTR, lpdatestr : windows_sys::core::PWSTR, cchdate : i32) -> i32); +windows_link::link!("bcp47mrm.dll" "system" fn GetDistanceOfClosestLanguageInList(pszlanguage : windows_sys::core::PCWSTR, pszlanguageslist : windows_sys::core::PCWSTR, wchlistdelimiter : u16, pclosestdistance : *mut f64) -> windows_sys::core::HRESULT); +windows_link::link!("kernel32.dll" "system" fn GetDurationFormat(locale : u32, dwflags : u32, lpduration : *const super::Foundation:: SYSTEMTIME, ullduration : u64, lpformat : windows_sys::core::PCWSTR, lpdurationstr : windows_sys::core::PWSTR, cchduration : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetDurationFormatEx(lplocalename : windows_sys::core::PCWSTR, dwflags : u32, lpduration : *const super::Foundation:: SYSTEMTIME, ullduration : u64, lpformat : windows_sys::core::PCWSTR, lpdurationstr : windows_sys::core::PWSTR, cchduration : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetFileMUIInfo(dwflags : u32, pcwszfilepath : windows_sys::core::PCWSTR, pfilemuiinfo : *mut FILEMUIINFO, pcbfilemuiinfo : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetFileMUIPath(dwflags : u32, pcwszfilepath : windows_sys::core::PCWSTR, pwszlanguage : windows_sys::core::PWSTR, pcchlanguage : *mut u32, pwszfilemuipath : windows_sys::core::PWSTR, pcchfilemuipath : *mut u32, pululenumerator : *mut u64) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetGeoInfoA(location : i32, geotype : SYSGEOTYPE, lpgeodata : windows_sys::core::PSTR, cchdata : i32, langid : u16) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetGeoInfoEx(location : windows_sys::core::PCWSTR, geotype : SYSGEOTYPE, geodata : windows_sys::core::PWSTR, geodatacount : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetGeoInfoW(location : i32, geotype : SYSGEOTYPE, lpgeodata : windows_sys::core::PWSTR, cchdata : i32, langid : u16) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetLocaleInfoA(locale : u32, lctype : u32, lplcdata : windows_sys::core::PSTR, cchdata : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetLocaleInfoEx(lplocalename : windows_sys::core::PCWSTR, lctype : u32, lplcdata : windows_sys::core::PWSTR, cchdata : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetLocaleInfoW(locale : u32, lctype : u32, lplcdata : windows_sys::core::PWSTR, cchdata : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetNLSVersion(function : u32, locale : u32, lpversioninformation : *mut NLSVERSIONINFO) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetNLSVersionEx(function : u32, lplocalename : windows_sys::core::PCWSTR, lpversioninformation : *mut NLSVERSIONINFOEX) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetNumberFormatA(locale : u32, dwflags : u32, lpvalue : windows_sys::core::PCSTR, lpformat : *const NUMBERFMTA, lpnumberstr : windows_sys::core::PSTR, cchnumber : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetNumberFormatEx(lplocalename : windows_sys::core::PCWSTR, dwflags : u32, lpvalue : windows_sys::core::PCWSTR, lpformat : *const NUMBERFMTW, lpnumberstr : windows_sys::core::PWSTR, cchnumber : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetNumberFormatW(locale : u32, dwflags : u32, lpvalue : windows_sys::core::PCWSTR, lpformat : *const NUMBERFMTW, lpnumberstr : windows_sys::core::PWSTR, cchnumber : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetOEMCP() -> u32); +windows_link::link!("kernel32.dll" "system" fn GetProcessPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_sys::core::PWSTR, pcchlanguagesbuffer : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetStringScripts(dwflags : u32, lpstring : windows_sys::core::PCWSTR, cchstring : i32, lpscripts : windows_sys::core::PWSTR, cchscripts : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetStringTypeA(locale : u32, dwinfotype : u32, lpsrcstr : windows_sys::core::PCSTR, cchsrc : i32, lpchartype : *mut u16) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetStringTypeExA(locale : u32, dwinfotype : u32, lpsrcstr : windows_sys::core::PCSTR, cchsrc : i32, lpchartype : *mut u16) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetStringTypeExW(locale : u32, dwinfotype : u32, lpsrcstr : windows_sys::core::PCWSTR, cchsrc : i32, lpchartype : *mut u16) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetStringTypeW(dwinfotype : u32, lpsrcstr : windows_sys::core::PCWSTR, cchsrc : i32, lpchartype : *mut u16) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetSystemDefaultLCID() -> u32); +windows_link::link!("kernel32.dll" "system" fn GetSystemDefaultLangID() -> u16); +windows_link::link!("kernel32.dll" "system" fn GetSystemDefaultLocaleName(lplocalename : windows_sys::core::PWSTR, cchlocalename : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetSystemDefaultUILanguage() -> u16); +windows_link::link!("kernel32.dll" "system" fn GetSystemPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_sys::core::PWSTR, pcchlanguagesbuffer : *mut u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetTextCharset(hdc : super::Graphics::Gdi:: HDC) -> i32); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetTextCharsetInfo(hdc : super::Graphics::Gdi:: HDC, lpsig : *mut FONTSIGNATURE, dwflags : u32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetThreadLocale() -> u32); +windows_link::link!("kernel32.dll" "system" fn GetThreadPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_sys::core::PWSTR, pcchlanguagesbuffer : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetThreadUILanguage() -> u16); +windows_link::link!("kernel32.dll" "system" fn GetTimeFormatA(locale : u32, dwflags : u32, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : windows_sys::core::PCSTR, lptimestr : windows_sys::core::PSTR, cchtime : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetTimeFormatEx(lplocalename : windows_sys::core::PCWSTR, dwflags : TIME_FORMAT_FLAGS, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : windows_sys::core::PCWSTR, lptimestr : windows_sys::core::PWSTR, cchtime : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetTimeFormatW(locale : u32, dwflags : u32, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : windows_sys::core::PCWSTR, lptimestr : windows_sys::core::PWSTR, cchtime : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetUILanguageInfo(dwflags : u32, pwmszlanguage : windows_sys::core::PCWSTR, pwszfallbacklanguages : windows_sys::core::PWSTR, pcchfallbacklanguages : *mut u32, pattributes : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetUserDefaultGeoName(geoname : windows_sys::core::PWSTR, geonamecount : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetUserDefaultLCID() -> u32); +windows_link::link!("kernel32.dll" "system" fn GetUserDefaultLangID() -> u16); +windows_link::link!("kernel32.dll" "system" fn GetUserDefaultLocaleName(lplocalename : windows_sys::core::PWSTR, cchlocalename : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetUserDefaultUILanguage() -> u16); +windows_link::link!("kernel32.dll" "system" fn GetUserGeoID(geoclass : SYSGEOCLASS) -> i32); +windows_link::link!("kernel32.dll" "system" fn GetUserPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : windows_sys::core::PWSTR, pcchlanguagesbuffer : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("normaliz.dll" "system" fn IdnToAscii(dwflags : u32, lpunicodecharstr : windows_sys::core::PCWSTR, cchunicodechar : i32, lpasciicharstr : windows_sys::core::PWSTR, cchasciichar : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn IdnToNameprepUnicode(dwflags : u32, lpunicodecharstr : windows_sys::core::PCWSTR, cchunicodechar : i32, lpnameprepcharstr : windows_sys::core::PWSTR, cchnameprepchar : i32) -> i32); +windows_link::link!("normaliz.dll" "system" fn IdnToUnicode(dwflags : u32, lpasciicharstr : windows_sys::core::PCWSTR, cchasciichar : i32, lpunicodecharstr : windows_sys::core::PWSTR, cchunicodechar : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn IsCalendarLeapYear(calid : u32, year : u32, era : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsDBCSLeadByte(testchar : u8) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsDBCSLeadByteEx(codepage : u32, testchar : u8) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsNLSDefinedString(function : u32, dwflags : u32, lpversioninformation : *const NLSVERSIONINFO, lpstring : windows_sys::core::PCWSTR, cchstr : i32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsNormalizedString(normform : NORM_FORM, lpstring : windows_sys::core::PCWSTR, cwlength : i32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn IsTextUnicode(lpv : *const core::ffi::c_void, isize : i32, lpiresult : *mut IS_TEXT_UNICODE_RESULT) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsValidCodePage(codepage : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsValidLanguageGroup(languagegroup : u32, dwflags : ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsValidLocale(locale : u32, dwflags : IS_VALID_LOCALE_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsValidLocaleName(lplocalename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn IsValidNLSVersion(function : u32, lplocalename : windows_sys::core::PCWSTR, lpversioninformation : *const NLSVERSIONINFOEX) -> u32); +windows_link::link!("bcp47mrm.dll" "system" fn IsWellFormedTag(psztag : windows_sys::core::PCWSTR) -> u8); +windows_link::link!("kernel32.dll" "system" fn LCIDToLocaleName(locale : u32, lpname : windows_sys::core::PWSTR, cchname : i32, dwflags : u32) -> i32); +windows_link::link!("kernel32.dll" "system" fn LCMapStringA(locale : u32, dwmapflags : u32, lpsrcstr : windows_sys::core::PCSTR, cchsrc : i32, lpdeststr : windows_sys::core::PSTR, cchdest : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn LCMapStringEx(lplocalename : windows_sys::core::PCWSTR, dwmapflags : u32, lpsrcstr : windows_sys::core::PCWSTR, cchsrc : i32, lpdeststr : windows_sys::core::PWSTR, cchdest : i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const core::ffi::c_void, sorthandle : super::Foundation:: LPARAM) -> i32); +windows_link::link!("kernel32.dll" "system" fn LCMapStringW(locale : u32, dwmapflags : u32, lpsrcstr : windows_sys::core::PCWSTR, cchsrc : i32, lpdeststr : windows_sys::core::PWSTR, cchdest : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn LocaleNameToLCID(lpname : windows_sys::core::PCWSTR, dwflags : u32) -> u32); +windows_link::link!("elscore.dll" "system" fn MappingDoAction(pbag : *mut MAPPING_PROPERTY_BAG, dwrangeindex : u32, pszactionid : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +windows_link::link!("elscore.dll" "system" fn MappingFreePropertyBag(pbag : *const MAPPING_PROPERTY_BAG) -> windows_sys::core::HRESULT); +windows_link::link!("elscore.dll" "system" fn MappingFreeServices(pserviceinfo : *const MAPPING_SERVICE_INFO) -> windows_sys::core::HRESULT); +windows_link::link!("elscore.dll" "system" fn MappingGetServices(poptions : *const MAPPING_ENUM_OPTIONS, prgservices : *mut *mut MAPPING_SERVICE_INFO, pdwservicescount : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("elscore.dll" "system" fn MappingRecognizeText(pserviceinfo : *const MAPPING_SERVICE_INFO, psztext : windows_sys::core::PCWSTR, dwlength : u32, dwindex : u32, poptions : *const MAPPING_OPTIONS, pbag : *mut MAPPING_PROPERTY_BAG) -> windows_sys::core::HRESULT); +windows_link::link!("kernel32.dll" "system" fn MultiByteToWideChar(codepage : u32, dwflags : MULTI_BYTE_TO_WIDE_CHAR_FLAGS, lpmultibytestr : windows_sys::core::PCSTR, cbmultibyte : i32, lpwidecharstr : windows_sys::core::PWSTR, cchwidechar : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn NormalizeString(normform : NORM_FORM, lpsrcstring : windows_sys::core::PCWSTR, cwsrclength : i32, lpdststring : windows_sys::core::PWSTR, cwdstlength : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn NotifyUILanguageChange(dwflags : u32, pcwstrnewlanguage : windows_sys::core::PCWSTR, pcwstrpreviouslanguage : windows_sys::core::PCWSTR, dwreserved : u32, pdwstatusrtrn : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn ResolveLocaleName(lpnametoresolve : windows_sys::core::PCWSTR, lplocalename : windows_sys::core::PWSTR, cchlocalename : i32) -> i32); +windows_link::link!("kernel32.dll" "system" fn RestoreThreadPreferredUILanguages(snapshot : HSAVEDUILANGUAGES)); +windows_link::link!("usp10.dll" "system" fn ScriptApplyDigitSubstitution(psds : *const SCRIPT_DIGITSUBSTITUTE, psc : *mut SCRIPT_CONTROL, pss : *mut SCRIPT_STATE) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptApplyLogicalWidth(pidx : *const i32, cchars : i32, cglyphs : i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, piadvance : *const i32, psa : *const SCRIPT_ANALYSIS, pabc : *mut super::Graphics::Gdi:: ABC, pijustify : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptBreak(pwcchars : windows_sys::core::PCWSTR, cchars : i32, psa : *const SCRIPT_ANALYSIS, psla : *mut SCRIPT_LOGATTR) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptCPtoX(icp : i32, ftrailing : windows_sys::core::BOOL, cchars : i32, cglyphs : i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, piadvance : *const i32, psa : *const SCRIPT_ANALYSIS, pix : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptCacheGetHeight(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, tmheight : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptFreeCache(psc : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptGetCMap(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, pwcinchars : windows_sys::core::PCWSTR, cchars : i32, dwflags : u32, pwoutglyphs : *mut u16) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptGetFontAlternateGlyphs(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, tagfeature : u32, wglyphid : u16, cmaxalternates : i32, palternateglyphs : *mut u16, pcalternates : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptGetFontFeatureTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, cmaxtags : i32, pfeaturetags : *mut u32, pctags : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptGetFontLanguageTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, cmaxtags : i32, plangsystags : *mut u32, pctags : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptGetFontProperties(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, sfp : *mut SCRIPT_FONTPROPERTIES) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptGetFontScriptTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, cmaxtags : i32, pscripttags : *mut u32, pctags : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptGetGlyphABCWidth(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, wglyph : u16, pabc : *mut super::Graphics::Gdi:: ABC) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptGetLogicalWidths(psa : *const SCRIPT_ANALYSIS, cchars : i32, cglyphs : i32, piglyphwidth : *const i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, pidx : *const i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptGetProperties(ppsp : *mut *mut *mut SCRIPT_PROPERTIES, pinumscripts : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptIsComplex(pwcinchars : windows_sys::core::PCWSTR, cinchars : i32, dwflags : SCRIPT_IS_COMPLEX_FLAGS) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptItemize(pwcinchars : windows_sys::core::PCWSTR, cinchars : i32, cmaxitems : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pitems : *mut SCRIPT_ITEM, pcitems : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptItemizeOpenType(pwcinchars : windows_sys::core::PCWSTR, cinchars : i32, cmaxitems : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pitems : *mut SCRIPT_ITEM, pscripttags : *mut u32, pcitems : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptJustify(psva : *const SCRIPT_VISATTR, piadvance : *const i32, cglyphs : i32, idx : i32, iminkashida : i32, pijustify : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptLayout(cruns : i32, pblevel : *const u8, pivisualtological : *mut i32, pilogicaltovisual : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptPlace(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, pwglyphs : *const u16, cglyphs : i32, psva : *const SCRIPT_VISATTR, psa : *mut SCRIPT_ANALYSIS, piadvance : *mut i32, pgoffset : *mut GOFFSET, pabc : *mut super::Graphics::Gdi:: ABC) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptPlaceOpenType(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *mut SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, rcrangechars : *const i32, rprangeproperties : *const *const TEXTRANGE_PROPERTIES, cranges : i32, pwcchars : windows_sys::core::PCWSTR, pwlogclust : *const u16, pcharprops : *const SCRIPT_CHARPROP, cchars : i32, pwglyphs : *const u16, pglyphprops : *const SCRIPT_GLYPHPROP, cglyphs : i32, piadvance : *mut i32, pgoffset : *mut GOFFSET, pabc : *mut super::Graphics::Gdi:: ABC) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptPositionSingleGlyph(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, tagfeature : u32, lparameter : i32, wglyphid : u16, iadvance : i32, goffset : GOFFSET, pioutadvance : *mut i32, poutgoffset : *mut GOFFSET) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptRecordDigitSubstitution(locale : u32, psds : *mut SCRIPT_DIGITSUBSTITUTE) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptShape(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, pwcchars : windows_sys::core::PCWSTR, cchars : i32, cmaxglyphs : i32, psa : *mut SCRIPT_ANALYSIS, pwoutglyphs : *mut u16, pwlogclust : *mut u16, psva : *mut SCRIPT_VISATTR, pcglyphs : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptShapeOpenType(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *mut SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, rcrangechars : *const i32, rprangeproperties : *const *const TEXTRANGE_PROPERTIES, cranges : i32, pwcchars : windows_sys::core::PCWSTR, cchars : i32, cmaxglyphs : i32, pwlogclust : *mut u16, pcharprops : *mut SCRIPT_CHARPROP, pwoutglyphs : *mut u16, poutglyphprops : *mut SCRIPT_GLYPHPROP, pcglyphs : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptStringAnalyse(hdc : super::Graphics::Gdi:: HDC, pstring : *const core::ffi::c_void, cstring : i32, cglyphs : i32, icharset : i32, dwflags : u32, ireqwidth : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pidx : *const i32, ptabdef : *const SCRIPT_TABDEF, pbinclass : *const u8, pssa : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptStringCPtoX(ssa : *const core::ffi::c_void, icp : i32, ftrailing : windows_sys::core::BOOL, px : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptStringFree(pssa : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptStringGetLogicalWidths(ssa : *const core::ffi::c_void, pidx : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptStringGetOrder(ssa : *const core::ffi::c_void, puorder : *mut u32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptStringOut(ssa : *const core::ffi::c_void, ix : i32, iy : i32, uoptions : super::Graphics::Gdi:: ETO_OPTIONS, prc : *const super::Foundation:: RECT, iminsel : i32, imaxsel : i32, fdisabled : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptStringValidate(ssa : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptStringXtoCP(ssa : *const core::ffi::c_void, ix : i32, pich : *mut i32, pitrailing : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptString_pLogAttr(ssa : *const core::ffi::c_void) -> *mut SCRIPT_LOGATTR); +windows_link::link!("usp10.dll" "system" fn ScriptString_pSize(ssa : *const core::ffi::c_void) -> *mut super::Foundation:: SIZE); +windows_link::link!("usp10.dll" "system" fn ScriptString_pcOutChars(ssa : *const core::ffi::c_void) -> *mut i32); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptSubstituteSingleGlyph(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, tagfeature : u32, lparameter : i32, wglyphid : u16, pwoutglyphid : *mut u16) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("usp10.dll" "system" fn ScriptTextOut(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, x : i32, y : i32, fuoptions : u32, lprc : *const super::Foundation:: RECT, psa : *const SCRIPT_ANALYSIS, pwcreserved : windows_sys::core::PCWSTR, ireserved : i32, pwglyphs : *const u16, cglyphs : i32, piadvance : *const i32, pijustify : *const i32, pgoffset : *const GOFFSET) -> windows_sys::core::HRESULT); +windows_link::link!("usp10.dll" "system" fn ScriptXtoCP(ix : i32, cchars : i32, cglyphs : i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, piadvance : *const i32, psa : *const SCRIPT_ANALYSIS, picp : *mut i32, pitrailing : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("kernel32.dll" "system" fn SetCalendarInfoA(locale : u32, calendar : u32, caltype : u32, lpcaldata : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetCalendarInfoW(locale : u32, calendar : u32, caltype : u32, lpcaldata : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetLocaleInfoA(locale : u32, lctype : u32, lplcdata : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetLocaleInfoW(locale : u32, lctype : u32, lplcdata : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetProcessPreferredUILanguages(dwflags : u32, pwszlanguagesbuffer : windows_sys::core::PCWSTR, pulnumlanguages : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetThreadLocale(locale : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetThreadPreferredUILanguages(dwflags : u32, pwszlanguagesbuffer : windows_sys::core::PCWSTR, pulnumlanguages : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetThreadPreferredUILanguages2(flags : u32, languages : windows_sys::core::PCWSTR, numlanguagesset : *mut u32, snapshot : *mut HSAVEDUILANGUAGES) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetThreadUILanguage(langid : u16) -> u16); +windows_link::link!("kernel32.dll" "system" fn SetUserGeoID(geoid : i32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetUserGeoName(geoname : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("gdi32.dll" "system" fn TranslateCharsetInfo(lpsrc : *mut u32, lpcs : *mut CHARSETINFO, dwflags : TRANSLATE_CHARSET_INFO_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("icuuc.dll" "C" fn UCNV_FROM_U_CALLBACK_ESCAPE(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn UCNV_FROM_U_CALLBACK_SKIP(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn UCNV_FROM_U_CALLBACK_STOP(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn UCNV_FROM_U_CALLBACK_SUBSTITUTE(context : *const core::ffi::c_void, fromuargs : *mut UConverterFromUnicodeArgs, codeunits : *const u16, length : i32, codepoint : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn UCNV_TO_U_CALLBACK_ESCAPE(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_sys::core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn UCNV_TO_U_CALLBACK_SKIP(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_sys::core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn UCNV_TO_U_CALLBACK_STOP(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_sys::core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn UCNV_TO_U_CALLBACK_SUBSTITUTE(context : *const core::ffi::c_void, touargs : *mut UConverterToUnicodeArgs, codeunits : windows_sys::core::PCSTR, length : i32, reason : UConverterCallbackReason, err : *mut UErrorCode)); +windows_link::link!("kernel32.dll" "system" fn UpdateCalendarDayOfWeek(lpcaldatetime : *mut CALDATETIME) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn VerifyScripts(dwflags : u32, lplocalescripts : windows_sys::core::PCWSTR, cchlocalescripts : i32, lptestscripts : windows_sys::core::PCWSTR, cchtestscripts : i32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn WideCharToMultiByte(codepage : u32, dwflags : u32, lpwidecharstr : windows_sys::core::PCWSTR, cchwidechar : i32, lpmultibytestr : windows_sys::core::PSTR, cbmultibyte : i32, lpdefaultchar : windows_sys::core::PCSTR, lpuseddefaultchar : *mut windows_sys::core::BOOL) -> i32); +windows_link::link!("kernel32.dll" "system" fn lstrcatA(lpstring1 : windows_sys::core::PSTR, lpstring2 : windows_sys::core::PCSTR) -> windows_sys::core::PSTR); +windows_link::link!("kernel32.dll" "system" fn lstrcatW(lpstring1 : windows_sys::core::PWSTR, lpstring2 : windows_sys::core::PCWSTR) -> windows_sys::core::PWSTR); +windows_link::link!("kernel32.dll" "system" fn lstrcmpA(lpstring1 : windows_sys::core::PCSTR, lpstring2 : windows_sys::core::PCSTR) -> i32); +windows_link::link!("kernel32.dll" "system" fn lstrcmpW(lpstring1 : windows_sys::core::PCWSTR, lpstring2 : windows_sys::core::PCWSTR) -> i32); +windows_link::link!("kernel32.dll" "system" fn lstrcmpiA(lpstring1 : windows_sys::core::PCSTR, lpstring2 : windows_sys::core::PCSTR) -> i32); +windows_link::link!("kernel32.dll" "system" fn lstrcmpiW(lpstring1 : windows_sys::core::PCWSTR, lpstring2 : windows_sys::core::PCWSTR) -> i32); +windows_link::link!("kernel32.dll" "system" fn lstrcpyA(lpstring1 : windows_sys::core::PSTR, lpstring2 : windows_sys::core::PCSTR) -> windows_sys::core::PSTR); +windows_link::link!("kernel32.dll" "system" fn lstrcpyW(lpstring1 : windows_sys::core::PWSTR, lpstring2 : windows_sys::core::PCWSTR) -> windows_sys::core::PWSTR); +windows_link::link!("kernel32.dll" "system" fn lstrcpynA(lpstring1 : windows_sys::core::PSTR, lpstring2 : windows_sys::core::PCSTR, imaxlength : i32) -> windows_sys::core::PSTR); +windows_link::link!("kernel32.dll" "system" fn lstrcpynW(lpstring1 : windows_sys::core::PWSTR, lpstring2 : windows_sys::core::PCWSTR, imaxlength : i32) -> windows_sys::core::PWSTR); +windows_link::link!("kernel32.dll" "system" fn lstrlenA(lpstring : windows_sys::core::PCSTR) -> i32); +windows_link::link!("kernel32.dll" "system" fn lstrlenW(lpstring : windows_sys::core::PCWSTR) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_UCharsToChars(us : *const u16, cs : windows_sys::core::PCSTR, length : i32)); +windows_link::link!("icuuc.dll" "C" fn u_austrcpy(dst : windows_sys::core::PCSTR, src : *const u16) -> windows_sys::core::PSTR); +windows_link::link!("icuuc.dll" "C" fn u_austrncpy(dst : windows_sys::core::PCSTR, src : *const u16, n : i32) -> windows_sys::core::PSTR); +windows_link::link!("icuuc.dll" "C" fn u_catclose(catd : *mut UResourceBundle)); +windows_link::link!("icuuc.dll" "C" fn u_catgets(catd : *mut UResourceBundle, set_num : i32, msg_num : i32, s : *const u16, len : *mut i32, ec : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_catopen(name : windows_sys::core::PCSTR, locale : windows_sys::core::PCSTR, ec : *mut UErrorCode) -> *mut UResourceBundle); +windows_link::link!("icuuc.dll" "C" fn u_charAge(c : i32, versionarray : *mut u8)); +windows_link::link!("icuuc.dll" "C" fn u_charDigitValue(c : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_charDirection(c : i32) -> UCharDirection); +windows_link::link!("icuuc.dll" "C" fn u_charFromName(namechoice : UCharNameChoice, name : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_charMirror(c : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_charName(code : i32, namechoice : UCharNameChoice, buffer : windows_sys::core::PCSTR, bufferlength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_charType(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_charsToUChars(cs : windows_sys::core::PCSTR, us : *mut u16, length : i32)); +windows_link::link!("icuuc.dll" "C" fn u_cleanup()); +windows_link::link!("icuuc.dll" "C" fn u_countChar32(s : *const u16, length : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_digit(ch : i32, radix : i8) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_enumCharNames(start : i32, limit : i32, r#fn : *mut UEnumCharNamesFn, context : *mut core::ffi::c_void, namechoice : UCharNameChoice, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn u_enumCharTypes(enumrange : *mut UCharEnumTypeRange, context : *const core::ffi::c_void)); +windows_link::link!("icuuc.dll" "C" fn u_errorName(code : UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn u_foldCase(c : i32, options : u32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_forDigit(digit : i32, radix : i8) -> i32); +windows_link::link!("icuin.dll" "C" fn u_formatMessage(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, status : *mut UErrorCode, ...) -> i32); +windows_link::link!("icuin.dll" "C" fn u_formatMessageWithError(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, parseerror : *mut UParseError, status : *mut UErrorCode, ...) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_getBidiPairedBracket(c : i32) -> i32); +windows_link::link!("icu.dll" "C" fn u_getBinaryPropertySet(property : UProperty, perrorcode : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuuc.dll" "C" fn u_getCombiningClass(c : i32) -> u8); +windows_link::link!("icuuc.dll" "C" fn u_getDataVersion(dataversionfillin : *mut u8, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn u_getFC_NFKC_Closure(c : i32, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn u_getIntPropertyMap(property : UProperty, perrorcode : *mut UErrorCode) -> *mut UCPMap); +windows_link::link!("icuuc.dll" "C" fn u_getIntPropertyMaxValue(which : UProperty) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_getIntPropertyMinValue(which : UProperty) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_getIntPropertyValue(c : i32, which : UProperty) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_getNumericValue(c : i32) -> f64); +windows_link::link!("icuuc.dll" "C" fn u_getPropertyEnum(alias : windows_sys::core::PCSTR) -> UProperty); +windows_link::link!("icuuc.dll" "C" fn u_getPropertyName(property : UProperty, namechoice : UPropertyNameChoice) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn u_getPropertyValueEnum(property : UProperty, alias : windows_sys::core::PCSTR) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_getPropertyValueName(property : UProperty, value : i32, namechoice : UPropertyNameChoice) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn u_getUnicodeVersion(versionarray : *mut u8)); +windows_link::link!("icuuc.dll" "C" fn u_getVersion(versionarray : *mut u8)); +windows_link::link!("icuuc.dll" "C" fn u_hasBinaryProperty(c : i32, which : UProperty) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_init(status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn u_isIDIgnorable(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isIDPart(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isIDStart(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isISOControl(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isJavaIDPart(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isJavaIDStart(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isJavaSpaceChar(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isMirrored(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isUAlphabetic(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isULowercase(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isUUppercase(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isUWhiteSpace(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isWhitespace(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isalnum(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isalpha(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isbase(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isblank(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_iscntrl(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isdefined(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isdigit(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isgraph(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_islower(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isprint(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_ispunct(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isspace(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_istitle(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isupper(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_isxdigit(c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_memcasecmp(s1 : *const u16, s2 : *const u16, length : i32, options : u32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_memchr(s : *const u16, c : u16, count : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_memchr32(s : *const u16, c : i32, count : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_memcmp(buf1 : *const u16, buf2 : *const u16, count : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_memcmpCodePointOrder(s1 : *const u16, s2 : *const u16, count : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_memcpy(dest : *mut u16, src : *const u16, count : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_memmove(dest : *mut u16, src : *const u16, count : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_memrchr(s : *const u16, c : u16, count : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_memrchr32(s : *const u16, c : i32, count : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_memset(dest : *mut u16, c : u16, count : i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn u_parseMessage(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, status : *mut UErrorCode, ...)); +windows_link::link!("icuin.dll" "C" fn u_parseMessageWithError(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, parseerror : *mut UParseError, status : *mut UErrorCode, ...)); +windows_link::link!("icuuc.dll" "C" fn u_setMemoryFunctions(context : *const core::ffi::c_void, a : *mut UMemAllocFn, r : *mut UMemReallocFn, f : *mut UMemFreeFn, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn u_shapeArabic(source : *const u16, sourcelength : i32, dest : *mut u16, destsize : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strCaseCompare(s1 : *const u16, length1 : i32, s2 : *const u16, length2 : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strCompare(s1 : *const u16, length1 : i32, s2 : *const u16, length2 : i32, codepointorder : i8) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strCompareIter(iter1 : *mut UCharIterator, iter2 : *mut UCharIterator, codepointorder : i8) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strFindFirst(s : *const u16, length : i32, substring : *const u16, sublength : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFindLast(s : *const u16, length : i32, substring : *const u16, sublength : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFoldCase(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strFromJavaModifiedUTF8WithSub(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_sys::core::PCSTR, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFromUTF32(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : *const i32, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFromUTF32WithSub(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : *const i32, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFromUTF8(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_sys::core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFromUTF8Lenient(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_sys::core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFromUTF8WithSub(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_sys::core::PCSTR, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strFromWCS(dest : *mut u16, destcapacity : i32, pdestlength : *mut i32, src : windows_sys::core::PCWSTR, srclength : i32, perrorcode : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strHasMoreChar32Than(s : *const u16, length : i32, number : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn u_strToJavaModifiedUTF8(dest : windows_sys::core::PCSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> windows_sys::core::PSTR); +windows_link::link!("icuuc.dll" "C" fn u_strToLower(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, locale : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strToTitle(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, titleiter : *mut UBreakIterator, locale : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strToUTF32(dest : *mut i32, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> *mut i32); +windows_link::link!("icuuc.dll" "C" fn u_strToUTF32WithSub(dest : *mut i32, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> *mut i32); +windows_link::link!("icuuc.dll" "C" fn u_strToUTF8(dest : windows_sys::core::PCSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> windows_sys::core::PSTR); +windows_link::link!("icuuc.dll" "C" fn u_strToUTF8WithSub(dest : windows_sys::core::PCSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, subchar : i32, pnumsubstitutions : *mut i32, perrorcode : *mut UErrorCode) -> windows_sys::core::PSTR); +windows_link::link!("icuuc.dll" "C" fn u_strToUpper(dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, locale : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strToWCS(dest : windows_sys::core::PCWSTR, destcapacity : i32, pdestlength : *mut i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> windows_sys::core::PWSTR); +windows_link::link!("icuuc.dll" "C" fn u_strcasecmp(s1 : *const u16, s2 : *const u16, options : u32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strcat(dst : *mut u16, src : *const u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strchr(s : *const u16, c : u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strchr32(s : *const u16, c : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strcmp(s1 : *const u16, s2 : *const u16) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strcmpCodePointOrder(s1 : *const u16, s2 : *const u16) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strcpy(dst : *mut u16, src : *const u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strcspn(string : *const u16, matchset : *const u16) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strlen(s : *const u16) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strncasecmp(s1 : *const u16, s2 : *const u16, n : i32, options : u32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strncat(dst : *mut u16, src : *const u16, n : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strncmp(ucs1 : *const u16, ucs2 : *const u16, n : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strncmpCodePointOrder(s1 : *const u16, s2 : *const u16, n : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strncpy(dst : *mut u16, src : *const u16, n : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strpbrk(string : *const u16, matchset : *const u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strrchr(s : *const u16, c : u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strrchr32(s : *const u16, c : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strrstr(s : *const u16, substring : *const u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strspn(string : *const u16, matchset : *const u16) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_strstr(s : *const u16, substring : *const u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_strtok_r(src : *mut u16, delim : *const u16, savestate : *mut *mut u16) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_tolower(c : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_totitle(c : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_toupper(c : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_uastrcpy(dst : *mut u16, src : windows_sys::core::PCSTR) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_uastrncpy(dst : *mut u16, src : windows_sys::core::PCSTR, n : i32) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn u_unescape(src : windows_sys::core::PCSTR, dest : *mut u16, destcapacity : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_unescapeAt(charat : UNESCAPE_CHAR_AT, offset : *mut i32, length : i32, context : *mut core::ffi::c_void) -> i32); +windows_link::link!("icuuc.dll" "C" fn u_versionFromString(versionarray : *mut u8, versionstring : windows_sys::core::PCSTR)); +windows_link::link!("icuuc.dll" "C" fn u_versionFromUString(versionarray : *mut u8, versionstring : *const u16)); +windows_link::link!("icuuc.dll" "C" fn u_versionToString(versionarray : *const u8, versionstring : windows_sys::core::PCSTR)); +windows_link::link!("icuin.dll" "C" fn u_vformatMessage(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, ap : *mut i8, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn u_vformatMessageWithError(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, result : *mut u16, resultlength : i32, parseerror : *mut UParseError, ap : *mut i8, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn u_vparseMessage(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, ap : *mut i8, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn u_vparseMessageWithError(locale : windows_sys::core::PCSTR, pattern : *const u16, patternlength : i32, source : *const u16, sourcelength : i32, ap : *mut i8, parseerror : *mut UParseError, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_close(pbidi : *mut UBiDi)); +windows_link::link!("icuuc.dll" "C" fn ubidi_countParagraphs(pbidi : *mut UBiDi) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_countRuns(pbidi : *mut UBiDi, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getBaseDirection(text : *const u16, length : i32) -> UBiDiDirection); +windows_link::link!("icuuc.dll" "C" fn ubidi_getClassCallback(pbidi : *mut UBiDi, r#fn : *mut UBiDiClassCallback, context : *const *const core::ffi::c_void)); +windows_link::link!("icuuc.dll" "C" fn ubidi_getCustomizedClass(pbidi : *mut UBiDi, c : i32) -> UCharDirection); +windows_link::link!("icuuc.dll" "C" fn ubidi_getDirection(pbidi : *const UBiDi) -> UBiDiDirection); +windows_link::link!("icuuc.dll" "C" fn ubidi_getLength(pbidi : *const UBiDi) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getLevelAt(pbidi : *const UBiDi, charindex : i32) -> u8); +windows_link::link!("icuuc.dll" "C" fn ubidi_getLevels(pbidi : *mut UBiDi, perrorcode : *mut UErrorCode) -> *mut u8); +windows_link::link!("icuuc.dll" "C" fn ubidi_getLogicalIndex(pbidi : *mut UBiDi, visualindex : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getLogicalMap(pbidi : *mut UBiDi, indexmap : *mut i32, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_getLogicalRun(pbidi : *const UBiDi, logicalposition : i32, plogicallimit : *mut i32, plevel : *mut u8)); +windows_link::link!("icuuc.dll" "C" fn ubidi_getParaLevel(pbidi : *const UBiDi) -> u8); +windows_link::link!("icuuc.dll" "C" fn ubidi_getParagraph(pbidi : *const UBiDi, charindex : i32, pparastart : *mut i32, pparalimit : *mut i32, pparalevel : *mut u8, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getParagraphByIndex(pbidi : *const UBiDi, paraindex : i32, pparastart : *mut i32, pparalimit : *mut i32, pparalevel : *mut u8, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_getProcessedLength(pbidi : *const UBiDi) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getReorderingMode(pbidi : *mut UBiDi) -> UBiDiReorderingMode); +windows_link::link!("icuuc.dll" "C" fn ubidi_getReorderingOptions(pbidi : *mut UBiDi) -> u32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getResultLength(pbidi : *const UBiDi) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getText(pbidi : *const UBiDi) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn ubidi_getVisualIndex(pbidi : *mut UBiDi, logicalindex : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_getVisualMap(pbidi : *mut UBiDi, indexmap : *mut i32, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_getVisualRun(pbidi : *mut UBiDi, runindex : i32, plogicalstart : *mut i32, plength : *mut i32) -> UBiDiDirection); +windows_link::link!("icuuc.dll" "C" fn ubidi_invertMap(srcmap : *const i32, destmap : *mut i32, length : i32)); +windows_link::link!("icuuc.dll" "C" fn ubidi_isInverse(pbidi : *mut UBiDi) -> i8); +windows_link::link!("icuuc.dll" "C" fn ubidi_isOrderParagraphsLTR(pbidi : *mut UBiDi) -> i8); +windows_link::link!("icuuc.dll" "C" fn ubidi_open() -> *mut UBiDi); +windows_link::link!("icuuc.dll" "C" fn ubidi_openSized(maxlength : i32, maxruncount : i32, perrorcode : *mut UErrorCode) -> *mut UBiDi); +windows_link::link!("icuuc.dll" "C" fn ubidi_orderParagraphsLTR(pbidi : *mut UBiDi, orderparagraphsltr : i8)); +windows_link::link!("icuuc.dll" "C" fn ubidi_reorderLogical(levels : *const u8, length : i32, indexmap : *mut i32)); +windows_link::link!("icuuc.dll" "C" fn ubidi_reorderVisual(levels : *const u8, length : i32, indexmap : *mut i32)); +windows_link::link!("icuuc.dll" "C" fn ubidi_setClassCallback(pbidi : *mut UBiDi, newfn : UBiDiClassCallback, newcontext : *const core::ffi::c_void, oldfn : *mut UBiDiClassCallback, oldcontext : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_setContext(pbidi : *mut UBiDi, prologue : *const u16, prolength : i32, epilogue : *const u16, epilength : i32, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_setInverse(pbidi : *mut UBiDi, isinverse : i8)); +windows_link::link!("icuuc.dll" "C" fn ubidi_setLine(pparabidi : *const UBiDi, start : i32, limit : i32, plinebidi : *mut UBiDi, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_setPara(pbidi : *mut UBiDi, text : *const u16, length : i32, paralevel : u8, embeddinglevels : *mut u8, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_setReorderingMode(pbidi : *mut UBiDi, reorderingmode : UBiDiReorderingMode)); +windows_link::link!("icuuc.dll" "C" fn ubidi_setReorderingOptions(pbidi : *mut UBiDi, reorderingoptions : u32)); +windows_link::link!("icuuc.dll" "C" fn ubidi_writeReordered(pbidi : *mut UBiDi, dest : *mut u16, destsize : i32, options : u16, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubidi_writeReverse(src : *const u16, srclength : i32, dest : *mut u16, destsize : i32, options : u16, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubiditransform_close(pbiditransform : *mut UBiDiTransform)); +windows_link::link!("icuuc.dll" "C" fn ubiditransform_open(perrorcode : *mut UErrorCode) -> *mut UBiDiTransform); +windows_link::link!("icuuc.dll" "C" fn ubiditransform_transform(pbiditransform : *mut UBiDiTransform, src : *const u16, srclength : i32, dest : *mut u16, destsize : i32, inparalevel : u8, inorder : UBiDiOrder, outparalevel : u8, outorder : UBiDiOrder, domirroring : UBiDiMirroring, shapingoptions : u32, perrorcode : *mut UErrorCode) -> u32); +windows_link::link!("icuuc.dll" "C" fn ublock_getCode(c : i32) -> UBlockCode); +windows_link::link!("icuuc.dll" "C" fn ubrk_close(bi : *mut UBreakIterator)); +windows_link::link!("icuuc.dll" "C" fn ubrk_countAvailable() -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_current(bi : *const UBreakIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_first(bi : *mut UBreakIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_following(bi : *mut UBreakIterator, offset : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_getAvailable(index : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ubrk_getBinaryRules(bi : *mut UBreakIterator, binaryrules : *mut u8, rulescapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_getLocaleByType(bi : *const UBreakIterator, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ubrk_getRuleStatus(bi : *mut UBreakIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_getRuleStatusVec(bi : *mut UBreakIterator, fillinvec : *mut i32, capacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_isBoundary(bi : *mut UBreakIterator, offset : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn ubrk_last(bi : *mut UBreakIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_next(bi : *mut UBreakIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_open(r#type : UBreakIteratorType, locale : windows_sys::core::PCSTR, text : *const u16, textlength : i32, status : *mut UErrorCode) -> *mut UBreakIterator); +windows_link::link!("icuuc.dll" "C" fn ubrk_openBinaryRules(binaryrules : *const u8, ruleslength : i32, text : *const u16, textlength : i32, status : *mut UErrorCode) -> *mut UBreakIterator); +windows_link::link!("icuuc.dll" "C" fn ubrk_openRules(rules : *const u16, ruleslength : i32, text : *const u16, textlength : i32, parseerr : *mut UParseError, status : *mut UErrorCode) -> *mut UBreakIterator); +windows_link::link!("icuuc.dll" "C" fn ubrk_preceding(bi : *mut UBreakIterator, offset : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_previous(bi : *mut UBreakIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn ubrk_refreshUText(bi : *mut UBreakIterator, text : *mut UText, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubrk_safeClone(bi : *const UBreakIterator, stackbuffer : *mut core::ffi::c_void, pbuffersize : *mut i32, status : *mut UErrorCode) -> *mut UBreakIterator); +windows_link::link!("icuuc.dll" "C" fn ubrk_setText(bi : *mut UBreakIterator, text : *const u16, textlength : i32, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ubrk_setUText(bi : *mut UBreakIterator, text : *mut UText, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_add(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields, amount : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_clear(calendar : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn ucal_clearField(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields)); +windows_link::link!("icuin.dll" "C" fn ucal_clone(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn ucal_close(cal : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn ucal_countAvailable() -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_equivalentTo(cal1 : *const *const core::ffi::c_void, cal2 : *const *const core::ffi::c_void) -> i8); +windows_link::link!("icuin.dll" "C" fn ucal_get(cal : *const *const core::ffi::c_void, field : UCalendarDateFields, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getAttribute(cal : *const *const core::ffi::c_void, attr : UCalendarAttribute) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getAvailable(localeindex : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucal_getCanonicalTimeZoneID(id : *const u16, len : i32, result : *mut u16, resultcapacity : i32, issystemid : *mut i8, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getDSTSavings(zoneid : *const u16, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getDayOfWeekType(cal : *const *const core::ffi::c_void, dayofweek : UCalendarDaysOfWeek, status : *mut UErrorCode) -> UCalendarWeekdayType); +windows_link::link!("icuin.dll" "C" fn ucal_getDefaultTimeZone(result : *mut u16, resultcapacity : i32, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getFieldDifference(cal : *mut *mut core::ffi::c_void, target : f64, field : UCalendarDateFields, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getGregorianChange(cal : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> f64); +windows_link::link!("icu.dll" "C" fn ucal_getHostTimeZone(result : *mut u16, resultcapacity : i32, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getKeywordValuesForLocale(key : windows_sys::core::PCSTR, locale : windows_sys::core::PCSTR, commonlyused : i8, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucal_getLimit(cal : *const *const core::ffi::c_void, field : UCalendarDateFields, r#type : UCalendarLimitType, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getLocaleByType(cal : *const *const core::ffi::c_void, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucal_getMillis(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> f64); +windows_link::link!("icuin.dll" "C" fn ucal_getNow() -> f64); +windows_link::link!("icuin.dll" "C" fn ucal_getTZDataVersion(status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucal_getTimeZoneDisplayName(cal : *const *const core::ffi::c_void, r#type : UCalendarDisplayNameType, locale : windows_sys::core::PCSTR, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getTimeZoneID(cal : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getTimeZoneIDForWindowsID(winid : *const u16, len : i32, region : windows_sys::core::PCSTR, id : *mut u16, idcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getTimeZoneTransitionDate(cal : *const *const core::ffi::c_void, r#type : UTimeZoneTransitionType, transition : *mut f64, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn ucal_getType(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucal_getWeekendTransition(cal : *const *const core::ffi::c_void, dayofweek : UCalendarDaysOfWeek, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_getWindowsTimeZoneID(id : *const u16, len : i32, winid : *mut u16, winidcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucal_inDaylightTime(cal : *const *const core::ffi::c_void, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn ucal_isSet(cal : *const *const core::ffi::c_void, field : UCalendarDateFields) -> i8); +windows_link::link!("icuin.dll" "C" fn ucal_isWeekend(cal : *const *const core::ffi::c_void, date : f64, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn ucal_open(zoneid : *const u16, len : i32, locale : windows_sys::core::PCSTR, r#type : UCalendarType, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn ucal_openCountryTimeZones(country : windows_sys::core::PCSTR, ec : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucal_openTimeZoneIDEnumeration(zonetype : USystemTimeZoneType, region : windows_sys::core::PCSTR, rawoffset : *const i32, ec : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucal_openTimeZones(ec : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucal_roll(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields, amount : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_set(cal : *mut *mut core::ffi::c_void, field : UCalendarDateFields, value : i32)); +windows_link::link!("icuin.dll" "C" fn ucal_setAttribute(cal : *mut *mut core::ffi::c_void, attr : UCalendarAttribute, newvalue : i32)); +windows_link::link!("icuin.dll" "C" fn ucal_setDate(cal : *mut *mut core::ffi::c_void, year : i32, month : i32, date : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_setDateTime(cal : *mut *mut core::ffi::c_void, year : i32, month : i32, date : i32, hour : i32, minute : i32, second : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_setDefaultTimeZone(zoneid : *const u16, ec : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_setGregorianChange(cal : *mut *mut core::ffi::c_void, date : f64, perrorcode : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_setMillis(cal : *mut *mut core::ffi::c_void, datetime : f64, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucal_setTimeZone(cal : *mut *mut core::ffi::c_void, zoneid : *const u16, len : i32, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucasemap_close(csm : *mut UCaseMap)); +windows_link::link!("icuuc.dll" "C" fn ucasemap_getBreakIterator(csm : *const UCaseMap) -> *mut UBreakIterator); +windows_link::link!("icuuc.dll" "C" fn ucasemap_getLocale(csm : *const UCaseMap) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucasemap_getOptions(csm : *const UCaseMap) -> u32); +windows_link::link!("icuuc.dll" "C" fn ucasemap_open(locale : windows_sys::core::PCSTR, options : u32, perrorcode : *mut UErrorCode) -> *mut UCaseMap); +windows_link::link!("icuuc.dll" "C" fn ucasemap_setBreakIterator(csm : *mut UCaseMap, itertoadopt : *mut UBreakIterator, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucasemap_setLocale(csm : *mut UCaseMap, locale : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucasemap_setOptions(csm : *mut UCaseMap, options : u32, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucasemap_toTitle(csm : *mut UCaseMap, dest : *mut u16, destcapacity : i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucasemap_utf8FoldCase(csm : *const UCaseMap, dest : windows_sys::core::PCSTR, destcapacity : i32, src : windows_sys::core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucasemap_utf8ToLower(csm : *const UCaseMap, dest : windows_sys::core::PCSTR, destcapacity : i32, src : windows_sys::core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucasemap_utf8ToTitle(csm : *mut UCaseMap, dest : windows_sys::core::PCSTR, destcapacity : i32, src : windows_sys::core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucasemap_utf8ToUpper(csm : *const UCaseMap, dest : windows_sys::core::PCSTR, destcapacity : i32, src : windows_sys::core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn ucfpos_close(ucfpos : *mut UConstrainedFieldPosition)); +windows_link::link!("icu.dll" "C" fn ucfpos_constrainCategory(ucfpos : *mut UConstrainedFieldPosition, category : i32, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn ucfpos_constrainField(ucfpos : *mut UConstrainedFieldPosition, category : i32, field : i32, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn ucfpos_getCategory(ucfpos : *const UConstrainedFieldPosition, ec : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn ucfpos_getField(ucfpos : *const UConstrainedFieldPosition, ec : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn ucfpos_getIndexes(ucfpos : *const UConstrainedFieldPosition, pstart : *mut i32, plimit : *mut i32, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn ucfpos_getInt64IterationContext(ucfpos : *const UConstrainedFieldPosition, ec : *mut UErrorCode) -> i64); +windows_link::link!("icu.dll" "C" fn ucfpos_matchesField(ucfpos : *const UConstrainedFieldPosition, category : i32, field : i32, ec : *mut UErrorCode) -> i8); +windows_link::link!("icu.dll" "C" fn ucfpos_open(ec : *mut UErrorCode) -> *mut UConstrainedFieldPosition); +windows_link::link!("icu.dll" "C" fn ucfpos_reset(ucfpos : *mut UConstrainedFieldPosition, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn ucfpos_setInt64IterationContext(ucfpos : *mut UConstrainedFieldPosition, context : i64, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn ucfpos_setState(ucfpos : *mut UConstrainedFieldPosition, category : i32, field : i32, start : i32, limit : i32, ec : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_cbFromUWriteBytes(args : *mut UConverterFromUnicodeArgs, source : windows_sys::core::PCSTR, length : i32, offsetindex : i32, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_cbFromUWriteSub(args : *mut UConverterFromUnicodeArgs, offsetindex : i32, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_cbFromUWriteUChars(args : *mut UConverterFromUnicodeArgs, source : *const *const u16, sourcelimit : *const u16, offsetindex : i32, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_cbToUWriteSub(args : *mut UConverterToUnicodeArgs, offsetindex : i32, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_cbToUWriteUChars(args : *mut UConverterToUnicodeArgs, source : *const u16, length : i32, offsetindex : i32, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_close(converter : *mut UConverter)); +windows_link::link!("icuuc.dll" "C" fn ucnv_compareNames(name1 : windows_sys::core::PCSTR, name2 : windows_sys::core::PCSTR) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_convert(toconvertername : windows_sys::core::PCSTR, fromconvertername : windows_sys::core::PCSTR, target : windows_sys::core::PCSTR, targetcapacity : i32, source : windows_sys::core::PCSTR, sourcelength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_convertEx(targetcnv : *mut UConverter, sourcecnv : *mut UConverter, target : *mut *mut i8, targetlimit : windows_sys::core::PCSTR, source : *const *const i8, sourcelimit : windows_sys::core::PCSTR, pivotstart : *mut u16, pivotsource : *mut *mut u16, pivottarget : *mut *mut u16, pivotlimit : *const u16, reset : i8, flush : i8, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_countAliases(alias : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> u16); +windows_link::link!("icuuc.dll" "C" fn ucnv_countAvailable() -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_countStandards() -> u16); +windows_link::link!("icuuc.dll" "C" fn ucnv_detectUnicodeSignature(source : windows_sys::core::PCSTR, sourcelength : i32, signaturelength : *mut i32, perrorcode : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_fixFileSeparator(cnv : *const UConverter, source : *mut u16, sourcelen : i32)); +windows_link::link!("icuuc.dll" "C" fn ucnv_flushCache() -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_fromAlgorithmic(cnv : *mut UConverter, algorithmictype : UConverterType, target : windows_sys::core::PCSTR, targetcapacity : i32, source : windows_sys::core::PCSTR, sourcelength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_fromUChars(cnv : *mut UConverter, dest : windows_sys::core::PCSTR, destcapacity : i32, src : *const u16, srclength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_fromUCountPending(cnv : *const UConverter, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_fromUnicode(converter : *mut UConverter, target : *mut *mut i8, targetlimit : windows_sys::core::PCSTR, source : *const *const u16, sourcelimit : *const u16, offsets : *mut i32, flush : i8, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getAlias(alias : windows_sys::core::PCSTR, n : u16, perrorcode : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_getAliases(alias : windows_sys::core::PCSTR, aliases : *const *const i8, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getAvailableName(n : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_getCCSID(converter : *const UConverter, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_getCanonicalName(alias : windows_sys::core::PCSTR, standard : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_getDefaultName() -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_getDisplayName(converter : *const UConverter, displaylocale : windows_sys::core::PCSTR, displayname : *mut u16, displaynamecapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_getFromUCallBack(converter : *const UConverter, action : *mut UConverterFromUCallback, context : *const *const core::ffi::c_void)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getInvalidChars(converter : *const UConverter, errbytes : windows_sys::core::PCSTR, len : *mut i8, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getInvalidUChars(converter : *const UConverter, erruchars : *mut u16, len : *mut i8, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getMaxCharSize(converter : *const UConverter) -> i8); +windows_link::link!("icuuc.dll" "C" fn ucnv_getMinCharSize(converter : *const UConverter) -> i8); +windows_link::link!("icuuc.dll" "C" fn ucnv_getName(converter : *const UConverter, err : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_getNextUChar(converter : *mut UConverter, source : *const *const i8, sourcelimit : windows_sys::core::PCSTR, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_getPlatform(converter : *const UConverter, err : *mut UErrorCode) -> UConverterPlatform); +windows_link::link!("icuuc.dll" "C" fn ucnv_getStandard(n : u16, perrorcode : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_getStandardName(name : windows_sys::core::PCSTR, standard : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ucnv_getStarters(converter : *const UConverter, starters : *mut i8, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getSubstChars(converter : *const UConverter, subchars : windows_sys::core::PCSTR, len : *mut i8, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getToUCallBack(converter : *const UConverter, action : *mut UConverterToUCallback, context : *const *const core::ffi::c_void)); +windows_link::link!("icuuc.dll" "C" fn ucnv_getType(converter : *const UConverter) -> UConverterType); +windows_link::link!("icuuc.dll" "C" fn ucnv_getUnicodeSet(cnv : *const UConverter, setfillin : *mut USet, whichset : UConverterUnicodeSet, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_isAmbiguous(cnv : *const UConverter) -> i8); +windows_link::link!("icuuc.dll" "C" fn ucnv_isFixedWidth(cnv : *mut UConverter, status : *mut UErrorCode) -> i8); +windows_link::link!("icuuc.dll" "C" fn ucnv_open(convertername : windows_sys::core::PCSTR, err : *mut UErrorCode) -> *mut UConverter); +windows_link::link!("icuuc.dll" "C" fn ucnv_openAllNames(perrorcode : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn ucnv_openCCSID(codepage : i32, platform : UConverterPlatform, err : *mut UErrorCode) -> *mut UConverter); +windows_link::link!("icuuc.dll" "C" fn ucnv_openPackage(packagename : windows_sys::core::PCSTR, convertername : windows_sys::core::PCSTR, err : *mut UErrorCode) -> *mut UConverter); +windows_link::link!("icuuc.dll" "C" fn ucnv_openStandardNames(convname : windows_sys::core::PCSTR, standard : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn ucnv_openU(name : *const u16, err : *mut UErrorCode) -> *mut UConverter); +windows_link::link!("icuuc.dll" "C" fn ucnv_reset(converter : *mut UConverter)); +windows_link::link!("icuuc.dll" "C" fn ucnv_resetFromUnicode(converter : *mut UConverter)); +windows_link::link!("icuuc.dll" "C" fn ucnv_resetToUnicode(converter : *mut UConverter)); +windows_link::link!("icuuc.dll" "C" fn ucnv_safeClone(cnv : *const UConverter, stackbuffer : *mut core::ffi::c_void, pbuffersize : *mut i32, status : *mut UErrorCode) -> *mut UConverter); +windows_link::link!("icuuc.dll" "C" fn ucnv_setDefaultName(name : windows_sys::core::PCSTR)); +windows_link::link!("icuuc.dll" "C" fn ucnv_setFallback(cnv : *mut UConverter, usesfallback : i8)); +windows_link::link!("icuuc.dll" "C" fn ucnv_setFromUCallBack(converter : *mut UConverter, newaction : UConverterFromUCallback, newcontext : *const core::ffi::c_void, oldaction : *mut UConverterFromUCallback, oldcontext : *const *const core::ffi::c_void, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_setSubstChars(converter : *mut UConverter, subchars : windows_sys::core::PCSTR, len : i8, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_setSubstString(cnv : *mut UConverter, s : *const u16, length : i32, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_setToUCallBack(converter : *mut UConverter, newaction : UConverterToUCallback, newcontext : *const core::ffi::c_void, oldaction : *mut UConverterToUCallback, oldcontext : *const *const core::ffi::c_void, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_toAlgorithmic(algorithmictype : UConverterType, cnv : *mut UConverter, target : windows_sys::core::PCSTR, targetcapacity : i32, source : windows_sys::core::PCSTR, sourcelength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_toUChars(cnv : *mut UConverter, dest : *mut u16, destcapacity : i32, src : windows_sys::core::PCSTR, srclength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_toUCountPending(cnv : *const UConverter, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucnv_toUnicode(converter : *mut UConverter, target : *mut *mut u16, targetlimit : *const u16, source : *const *const i8, sourcelimit : windows_sys::core::PCSTR, offsets : *mut i32, flush : i8, err : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucnv_usesFallback(cnv : *const UConverter) -> i8); +windows_link::link!("icuuc.dll" "C" fn ucnvsel_close(sel : *mut UConverterSelector)); +windows_link::link!("icuuc.dll" "C" fn ucnvsel_open(converterlist : *const *const i8, converterlistsize : i32, excludedcodepoints : *const USet, whichset : UConverterUnicodeSet, status : *mut UErrorCode) -> *mut UConverterSelector); +windows_link::link!("icuuc.dll" "C" fn ucnvsel_openFromSerialized(buffer : *const core::ffi::c_void, length : i32, status : *mut UErrorCode) -> *mut UConverterSelector); +windows_link::link!("icuuc.dll" "C" fn ucnvsel_selectForString(sel : *const UConverterSelector, s : *const u16, length : i32, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn ucnvsel_selectForUTF8(sel : *const UConverterSelector, s : windows_sys::core::PCSTR, length : i32, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn ucnvsel_serialize(sel : *const UConverterSelector, buffer : *mut core::ffi::c_void, buffercapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_cloneBinary(coll : *const UCollator, buffer : *mut u8, capacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_close(coll : *mut UCollator)); +windows_link::link!("icuin.dll" "C" fn ucol_closeElements(elems : *mut UCollationElements)); +windows_link::link!("icuin.dll" "C" fn ucol_countAvailable() -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_equal(coll : *const UCollator, source : *const u16, sourcelength : i32, target : *const u16, targetlength : i32) -> i8); +windows_link::link!("icuin.dll" "C" fn ucol_getAttribute(coll : *const UCollator, attr : UColAttribute, status : *mut UErrorCode) -> UColAttributeValue); +windows_link::link!("icuin.dll" "C" fn ucol_getAvailable(localeindex : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucol_getBound(source : *const u8, sourcelength : i32, boundtype : UColBoundMode, nooflevels : u32, result : *mut u8, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getContractionsAndExpansions(coll : *const UCollator, contractions : *mut USet, expansions : *mut USet, addprefixes : i8, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucol_getDisplayName(objloc : windows_sys::core::PCSTR, disploc : windows_sys::core::PCSTR, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getEquivalentReorderCodes(reordercode : i32, dest : *mut i32, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getFunctionalEquivalent(result : windows_sys::core::PCSTR, resultcapacity : i32, keyword : windows_sys::core::PCSTR, locale : windows_sys::core::PCSTR, isavailable : *mut i8, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getKeywordValues(keyword : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucol_getKeywordValuesForLocale(key : windows_sys::core::PCSTR, locale : windows_sys::core::PCSTR, commonlyused : i8, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucol_getKeywords(status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucol_getLocaleByType(coll : *const UCollator, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucol_getMaxExpansion(elems : *const UCollationElements, order : i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getMaxVariable(coll : *const UCollator) -> UColReorderCode); +windows_link::link!("icuin.dll" "C" fn ucol_getOffset(elems : *const UCollationElements) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getReorderCodes(coll : *const UCollator, dest : *mut i32, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getRules(coll : *const UCollator, length : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn ucol_getRulesEx(coll : *const UCollator, delta : UColRuleOption, buffer : *mut u16, bufferlen : i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getSortKey(coll : *const UCollator, source : *const u16, sourcelength : i32, result : *mut u8, resultlength : i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_getStrength(coll : *const UCollator) -> UColAttributeValue); +windows_link::link!("icuin.dll" "C" fn ucol_getTailoredSet(coll : *const UCollator, status : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuin.dll" "C" fn ucol_getUCAVersion(coll : *const UCollator, info : *mut u8)); +windows_link::link!("icuin.dll" "C" fn ucol_getVariableTop(coll : *const UCollator, status : *mut UErrorCode) -> u32); +windows_link::link!("icuin.dll" "C" fn ucol_getVersion(coll : *const UCollator, info : *mut u8)); +windows_link::link!("icuin.dll" "C" fn ucol_greater(coll : *const UCollator, source : *const u16, sourcelength : i32, target : *const u16, targetlength : i32) -> i8); +windows_link::link!("icuin.dll" "C" fn ucol_greaterOrEqual(coll : *const UCollator, source : *const u16, sourcelength : i32, target : *const u16, targetlength : i32) -> i8); +windows_link::link!("icuin.dll" "C" fn ucol_keyHashCode(key : *const u8, length : i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_mergeSortkeys(src1 : *const u8, src1length : i32, src2 : *const u8, src2length : i32, dest : *mut u8, destcapacity : i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_next(elems : *mut UCollationElements, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_nextSortKeyPart(coll : *const UCollator, iter : *mut UCharIterator, state : *mut u32, dest : *mut u8, count : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_open(loc : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UCollator); +windows_link::link!("icuin.dll" "C" fn ucol_openAvailableLocales(status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucol_openBinary(bin : *const u8, length : i32, base : *const UCollator, status : *mut UErrorCode) -> *mut UCollator); +windows_link::link!("icuin.dll" "C" fn ucol_openElements(coll : *const UCollator, text : *const u16, textlength : i32, status : *mut UErrorCode) -> *mut UCollationElements); +windows_link::link!("icuin.dll" "C" fn ucol_openRules(rules : *const u16, ruleslength : i32, normalizationmode : UColAttributeValue, strength : UColAttributeValue, parseerror : *mut UParseError, status : *mut UErrorCode) -> *mut UCollator); +windows_link::link!("icuin.dll" "C" fn ucol_previous(elems : *mut UCollationElements, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_primaryOrder(order : i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_reset(elems : *mut UCollationElements)); +windows_link::link!("icuin.dll" "C" fn ucol_safeClone(coll : *const UCollator, stackbuffer : *mut core::ffi::c_void, pbuffersize : *mut i32, status : *mut UErrorCode) -> *mut UCollator); +windows_link::link!("icuin.dll" "C" fn ucol_secondaryOrder(order : i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ucol_setAttribute(coll : *mut UCollator, attr : UColAttribute, value : UColAttributeValue, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucol_setMaxVariable(coll : *mut UCollator, group : UColReorderCode, perrorcode : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucol_setOffset(elems : *mut UCollationElements, offset : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucol_setReorderCodes(coll : *mut UCollator, reordercodes : *const i32, reordercodeslength : i32, perrorcode : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucol_setStrength(coll : *mut UCollator, strength : UColAttributeValue)); +windows_link::link!("icuin.dll" "C" fn ucol_setText(elems : *mut UCollationElements, text : *const u16, textlength : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucol_strcoll(coll : *const UCollator, source : *const u16, sourcelength : i32, target : *const u16, targetlength : i32) -> UCollationResult); +windows_link::link!("icuin.dll" "C" fn ucol_strcollIter(coll : *const UCollator, siter : *mut UCharIterator, titer : *mut UCharIterator, status : *mut UErrorCode) -> UCollationResult); +windows_link::link!("icuin.dll" "C" fn ucol_strcollUTF8(coll : *const UCollator, source : windows_sys::core::PCSTR, sourcelength : i32, target : windows_sys::core::PCSTR, targetlength : i32, status : *mut UErrorCode) -> UCollationResult); +windows_link::link!("icuin.dll" "C" fn ucol_tertiaryOrder(order : i32) -> i32); +windows_link::link!("icu.dll" "C" fn ucpmap_get(map : *const UCPMap, c : i32) -> u32); +windows_link::link!("icu.dll" "C" fn ucpmap_getRange(map : *const UCPMap, start : i32, option : UCPMapRangeOption, surrogatevalue : u32, filter : *mut UCPMapValueFilter, context : *const core::ffi::c_void, pvalue : *mut u32) -> i32); +windows_link::link!("icu.dll" "C" fn ucptrie_close(trie : *mut UCPTrie)); +windows_link::link!("icu.dll" "C" fn ucptrie_get(trie : *const UCPTrie, c : i32) -> u32); +windows_link::link!("icu.dll" "C" fn ucptrie_getRange(trie : *const UCPTrie, start : i32, option : UCPMapRangeOption, surrogatevalue : u32, filter : *mut UCPMapValueFilter, context : *const core::ffi::c_void, pvalue : *mut u32) -> i32); +windows_link::link!("icu.dll" "C" fn ucptrie_getType(trie : *const UCPTrie) -> UCPTrieType); +windows_link::link!("icu.dll" "C" fn ucptrie_getValueWidth(trie : *const UCPTrie) -> UCPTrieValueWidth); +windows_link::link!("icu.dll" "C" fn ucptrie_internalSmallIndex(trie : *const UCPTrie, c : i32) -> i32); +windows_link::link!("icu.dll" "C" fn ucptrie_internalSmallU8Index(trie : *const UCPTrie, lt1 : i32, t2 : u8, t3 : u8) -> i32); +windows_link::link!("icu.dll" "C" fn ucptrie_internalU8PrevIndex(trie : *const UCPTrie, c : i32, start : *const u8, src : *const u8) -> i32); +windows_link::link!("icu.dll" "C" fn ucptrie_openFromBinary(r#type : UCPTrieType, valuewidth : UCPTrieValueWidth, data : *const core::ffi::c_void, length : i32, pactuallength : *mut i32, perrorcode : *mut UErrorCode) -> *mut UCPTrie); +windows_link::link!("icu.dll" "C" fn ucptrie_toBinary(trie : *const UCPTrie, data : *mut core::ffi::c_void, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucsdet_close(ucsd : *mut UCharsetDetector)); +windows_link::link!("icuin.dll" "C" fn ucsdet_detect(ucsd : *mut UCharsetDetector, status : *mut UErrorCode) -> *mut UCharsetMatch); +windows_link::link!("icuin.dll" "C" fn ucsdet_detectAll(ucsd : *mut UCharsetDetector, matchesfound : *mut i32, status : *mut UErrorCode) -> *mut *mut UCharsetMatch); +windows_link::link!("icuin.dll" "C" fn ucsdet_enableInputFilter(ucsd : *mut UCharsetDetector, filter : i8) -> i8); +windows_link::link!("icuin.dll" "C" fn ucsdet_getAllDetectableCharsets(ucsd : *const UCharsetDetector, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn ucsdet_getConfidence(ucsm : *const UCharsetMatch, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucsdet_getLanguage(ucsm : *const UCharsetMatch, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucsdet_getName(ucsm : *const UCharsetMatch, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ucsdet_getUChars(ucsm : *const UCharsetMatch, buf : *mut u16, cap : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ucsdet_isInputFilterEnabled(ucsd : *const UCharsetDetector) -> i8); +windows_link::link!("icuin.dll" "C" fn ucsdet_open(status : *mut UErrorCode) -> *mut UCharsetDetector); +windows_link::link!("icuin.dll" "C" fn ucsdet_setDeclaredEncoding(ucsd : *mut UCharsetDetector, encoding : windows_sys::core::PCSTR, length : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ucsdet_setText(ucsd : *mut UCharsetDetector, textin : windows_sys::core::PCSTR, len : i32, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ucurr_countCurrencies(locale : windows_sys::core::PCSTR, date : f64, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucurr_forLocale(locale : windows_sys::core::PCSTR, buff : *mut u16, buffcapacity : i32, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucurr_forLocaleAndDate(locale : windows_sys::core::PCSTR, date : f64, index : i32, buff : *mut u16, buffcapacity : i32, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucurr_getDefaultFractionDigits(currency : *const u16, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucurr_getDefaultFractionDigitsForUsage(currency : *const u16, usage : UCurrencyUsage, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucurr_getKeywordValuesForLocale(key : windows_sys::core::PCSTR, locale : windows_sys::core::PCSTR, commonlyused : i8, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn ucurr_getName(currency : *const u16, locale : windows_sys::core::PCSTR, namestyle : UCurrNameStyle, ischoiceformat : *mut i8, len : *mut i32, ec : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn ucurr_getNumericCode(currency : *const u16) -> i32); +windows_link::link!("icuuc.dll" "C" fn ucurr_getPluralName(currency : *const u16, locale : windows_sys::core::PCSTR, ischoiceformat : *mut i8, pluralcount : windows_sys::core::PCSTR, len : *mut i32, ec : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn ucurr_getRoundingIncrement(currency : *const u16, ec : *mut UErrorCode) -> f64); +windows_link::link!("icuuc.dll" "C" fn ucurr_getRoundingIncrementForUsage(currency : *const u16, usage : UCurrencyUsage, ec : *mut UErrorCode) -> f64); +windows_link::link!("icuuc.dll" "C" fn ucurr_isAvailable(isocode : *const u16, from : f64, to : f64, errorcode : *mut UErrorCode) -> i8); +windows_link::link!("icuuc.dll" "C" fn ucurr_openISOCurrencies(currtype : u32, perrorcode : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn ucurr_register(isocode : *const u16, locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut core::ffi::c_void); +windows_link::link!("icuuc.dll" "C" fn ucurr_unregister(key : *mut core::ffi::c_void, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn udat_adoptNumberFormat(fmt : *mut *mut core::ffi::c_void, numberformattoadopt : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn udat_adoptNumberFormatForFields(fmt : *mut *mut core::ffi::c_void, fields : *const u16, numberformattoset : *mut *mut core::ffi::c_void, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn udat_applyPattern(format : *mut *mut core::ffi::c_void, localized : i8, pattern : *const u16, patternlength : i32)); +windows_link::link!("icuin.dll" "C" fn udat_clone(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udat_close(format : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn udat_countAvailable() -> i32); +windows_link::link!("icuin.dll" "C" fn udat_countSymbols(fmt : *const *const core::ffi::c_void, r#type : UDateFormatSymbolType) -> i32); +windows_link::link!("icuin.dll" "C" fn udat_format(format : *const *const core::ffi::c_void, datetoformat : f64, result : *mut u16, resultlength : i32, position : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udat_formatCalendar(format : *const *const core::ffi::c_void, calendar : *mut *mut core::ffi::c_void, result : *mut u16, capacity : i32, position : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udat_formatCalendarForFields(format : *const *const core::ffi::c_void, calendar : *mut *mut core::ffi::c_void, result : *mut u16, capacity : i32, fpositer : *mut UFieldPositionIterator, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udat_formatForFields(format : *const *const core::ffi::c_void, datetoformat : f64, result : *mut u16, resultlength : i32, fpositer : *mut UFieldPositionIterator, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udat_get2DigitYearStart(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> f64); +windows_link::link!("icuin.dll" "C" fn udat_getAvailable(localeindex : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn udat_getBooleanAttribute(fmt : *const *const core::ffi::c_void, attr : UDateFormatBooleanAttribute, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn udat_getCalendar(fmt : *const *const core::ffi::c_void) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udat_getContext(fmt : *const *const core::ffi::c_void, r#type : UDisplayContextType, status : *mut UErrorCode) -> UDisplayContext); +windows_link::link!("icuin.dll" "C" fn udat_getLocaleByType(fmt : *const *const core::ffi::c_void, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn udat_getNumberFormat(fmt : *const *const core::ffi::c_void) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udat_getNumberFormatForField(fmt : *const *const core::ffi::c_void, field : u16) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udat_getSymbols(fmt : *const *const core::ffi::c_void, r#type : UDateFormatSymbolType, symbolindex : i32, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udat_isLenient(fmt : *const *const core::ffi::c_void) -> i8); +windows_link::link!("icuin.dll" "C" fn udat_open(timestyle : UDateFormatStyle, datestyle : UDateFormatStyle, locale : windows_sys::core::PCSTR, tzid : *const u16, tzidlength : i32, pattern : *const u16, patternlength : i32, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udat_parse(format : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> f64); +windows_link::link!("icuin.dll" "C" fn udat_parseCalendar(format : *const *const core::ffi::c_void, calendar : *mut *mut core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn udat_set2DigitYearStart(fmt : *mut *mut core::ffi::c_void, d : f64, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn udat_setBooleanAttribute(fmt : *mut *mut core::ffi::c_void, attr : UDateFormatBooleanAttribute, newvalue : i8, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn udat_setCalendar(fmt : *mut *mut core::ffi::c_void, calendartoset : *const *const core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn udat_setContext(fmt : *mut *mut core::ffi::c_void, value : UDisplayContext, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn udat_setLenient(fmt : *mut *mut core::ffi::c_void, islenient : i8)); +windows_link::link!("icuin.dll" "C" fn udat_setNumberFormat(fmt : *mut *mut core::ffi::c_void, numberformattoset : *const *const core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn udat_setSymbols(format : *mut *mut core::ffi::c_void, r#type : UDateFormatSymbolType, symbolindex : i32, value : *mut u16, valuelength : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn udat_toCalendarDateField(field : UDateFormatField) -> UCalendarDateFields); +windows_link::link!("icuin.dll" "C" fn udat_toPattern(fmt : *const *const core::ffi::c_void, localized : i8, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_addPattern(dtpg : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, r#override : i8, conflictingpattern : *mut u16, capacity : i32, plength : *mut i32, perrorcode : *mut UErrorCode) -> UDateTimePatternConflict); +windows_link::link!("icuin.dll" "C" fn udatpg_clone(dtpg : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udatpg_close(dtpg : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn udatpg_getAppendItemFormat(dtpg : *const *const core::ffi::c_void, field : UDateTimePatternField, plength : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn udatpg_getAppendItemName(dtpg : *const *const core::ffi::c_void, field : UDateTimePatternField, plength : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn udatpg_getBaseSkeleton(unuseddtpg : *mut *mut core::ffi::c_void, pattern : *const u16, length : i32, baseskeleton : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_getBestPattern(dtpg : *mut *mut core::ffi::c_void, skeleton : *const u16, length : i32, bestpattern : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_getBestPatternWithOptions(dtpg : *mut *mut core::ffi::c_void, skeleton : *const u16, length : i32, options : UDateTimePatternMatchOptions, bestpattern : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_getDateTimeFormat(dtpg : *const *const core::ffi::c_void, plength : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn udatpg_getDecimal(dtpg : *const *const core::ffi::c_void, plength : *mut i32) -> *mut u16); +windows_link::link!("icu.dll" "C" fn udatpg_getFieldDisplayName(dtpg : *const *const core::ffi::c_void, field : UDateTimePatternField, width : UDateTimePGDisplayWidth, fieldname : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_getPatternForSkeleton(dtpg : *const *const core::ffi::c_void, skeleton : *const u16, skeletonlength : i32, plength : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn udatpg_getSkeleton(unuseddtpg : *mut *mut core::ffi::c_void, pattern : *const u16, length : i32, skeleton : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_open(locale : windows_sys::core::PCSTR, perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udatpg_openBaseSkeletons(dtpg : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn udatpg_openEmpty(perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn udatpg_openSkeletons(dtpg : *const *const core::ffi::c_void, perrorcode : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn udatpg_replaceFieldTypes(dtpg : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, skeleton : *const u16, skeletonlength : i32, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_replaceFieldTypesWithOptions(dtpg : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, skeleton : *const u16, skeletonlength : i32, options : UDateTimePatternMatchOptions, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udatpg_setAppendItemFormat(dtpg : *mut *mut core::ffi::c_void, field : UDateTimePatternField, value : *const u16, length : i32)); +windows_link::link!("icuin.dll" "C" fn udatpg_setAppendItemName(dtpg : *mut *mut core::ffi::c_void, field : UDateTimePatternField, value : *const u16, length : i32)); +windows_link::link!("icuin.dll" "C" fn udatpg_setDateTimeFormat(dtpg : *const *const core::ffi::c_void, dtformat : *const u16, length : i32)); +windows_link::link!("icuin.dll" "C" fn udatpg_setDecimal(dtpg : *mut *mut core::ffi::c_void, decimal : *const u16, length : i32)); +windows_link::link!("icuin.dll" "C" fn udtitvfmt_close(formatter : *mut UDateIntervalFormat)); +windows_link::link!("icu.dll" "C" fn udtitvfmt_closeResult(uresult : *mut UFormattedDateInterval)); +windows_link::link!("icuin.dll" "C" fn udtitvfmt_format(formatter : *const UDateIntervalFormat, fromdate : f64, todate : f64, result : *mut u16, resultcapacity : i32, position : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn udtitvfmt_open(locale : windows_sys::core::PCSTR, skeleton : *const u16, skeletonlength : i32, tzid : *const u16, tzidlength : i32, status : *mut UErrorCode) -> *mut UDateIntervalFormat); +windows_link::link!("icu.dll" "C" fn udtitvfmt_openResult(ec : *mut UErrorCode) -> *mut UFormattedDateInterval); +windows_link::link!("icu.dll" "C" fn udtitvfmt_resultAsValue(uresult : *const UFormattedDateInterval, ec : *mut UErrorCode) -> *mut UFormattedValue); +windows_link::link!("icuuc.dll" "C" fn uenum_close(en : *mut UEnumeration)); +windows_link::link!("icuuc.dll" "C" fn uenum_count(en : *mut UEnumeration, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uenum_next(en : *mut UEnumeration, resultlength : *mut i32, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uenum_openCharStringsEnumeration(strings : *const *const i8, count : i32, ec : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn uenum_openUCharStringsEnumeration(strings : *const *const u16, count : i32, ec : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn uenum_reset(en : *mut UEnumeration, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn uenum_unext(en : *mut UEnumeration, resultlength : *mut i32, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn ufieldpositer_close(fpositer : *mut UFieldPositionIterator)); +windows_link::link!("icuin.dll" "C" fn ufieldpositer_next(fpositer : *mut UFieldPositionIterator, beginindex : *mut i32, endindex : *mut i32) -> i32); +windows_link::link!("icuin.dll" "C" fn ufieldpositer_open(status : *mut UErrorCode) -> *mut UFieldPositionIterator); +windows_link::link!("icuin.dll" "C" fn ufmt_close(fmt : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn ufmt_getArrayItemByIndex(fmt : *mut *mut core::ffi::c_void, n : i32, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn ufmt_getArrayLength(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ufmt_getDate(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> f64); +windows_link::link!("icuin.dll" "C" fn ufmt_getDecNumChars(fmt : *mut *mut core::ffi::c_void, len : *mut i32, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ufmt_getDouble(fmt : *mut *mut core::ffi::c_void, status : *mut UErrorCode) -> f64); +windows_link::link!("icuin.dll" "C" fn ufmt_getInt64(fmt : *mut *mut core::ffi::c_void, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn ufmt_getLong(fmt : *mut *mut core::ffi::c_void, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ufmt_getObject(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn ufmt_getType(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> UFormattableType); +windows_link::link!("icuin.dll" "C" fn ufmt_getUChars(fmt : *mut *mut core::ffi::c_void, len : *mut i32, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn ufmt_isNumeric(fmt : *const *const core::ffi::c_void) -> i8); +windows_link::link!("icuin.dll" "C" fn ufmt_open(status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icu.dll" "C" fn ufmtval_getString(ufmtval : *const UFormattedValue, plength : *mut i32, ec : *mut UErrorCode) -> *mut u16); +windows_link::link!("icu.dll" "C" fn ufmtval_nextPosition(ufmtval : *const UFormattedValue, ucfpos : *mut UConstrainedFieldPosition, ec : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn ugender_getInstance(locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UGenderInfo); +windows_link::link!("icuin.dll" "C" fn ugender_getListGender(genderinfo : *const UGenderInfo, genders : *const UGender, size : i32, status : *mut UErrorCode) -> UGender); +windows_link::link!("icuuc.dll" "C" fn uidna_close(idna : *mut UIDNA)); +windows_link::link!("icuuc.dll" "C" fn uidna_labelToASCII(idna : *const UIDNA, label : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_labelToASCII_UTF8(idna : *const UIDNA, label : windows_sys::core::PCSTR, length : i32, dest : windows_sys::core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_labelToUnicode(idna : *const UIDNA, label : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_labelToUnicodeUTF8(idna : *const UIDNA, label : windows_sys::core::PCSTR, length : i32, dest : windows_sys::core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_nameToASCII(idna : *const UIDNA, name : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_nameToASCII_UTF8(idna : *const UIDNA, name : windows_sys::core::PCSTR, length : i32, dest : windows_sys::core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_nameToUnicode(idna : *const UIDNA, name : *const u16, length : i32, dest : *mut u16, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_nameToUnicodeUTF8(idna : *const UIDNA, name : windows_sys::core::PCSTR, length : i32, dest : windows_sys::core::PCSTR, capacity : i32, pinfo : *mut UIDNAInfo, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uidna_openUTS46(options : u32, perrorcode : *mut UErrorCode) -> *mut UIDNA); +windows_link::link!("icuuc.dll" "C" fn uiter_current32(iter : *mut UCharIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn uiter_getState(iter : *const UCharIterator) -> u32); +windows_link::link!("icuuc.dll" "C" fn uiter_next32(iter : *mut UCharIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn uiter_previous32(iter : *mut UCharIterator) -> i32); +windows_link::link!("icuuc.dll" "C" fn uiter_setState(iter : *mut UCharIterator, state : u32, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn uiter_setString(iter : *mut UCharIterator, s : *const u16, length : i32)); +windows_link::link!("icuuc.dll" "C" fn uiter_setUTF16BE(iter : *mut UCharIterator, s : windows_sys::core::PCSTR, length : i32)); +windows_link::link!("icuuc.dll" "C" fn uiter_setUTF8(iter : *mut UCharIterator, s : windows_sys::core::PCSTR, length : i32)); +windows_link::link!("icuuc.dll" "C" fn uldn_close(ldn : *mut ULocaleDisplayNames)); +windows_link::link!("icuuc.dll" "C" fn uldn_getContext(ldn : *const ULocaleDisplayNames, r#type : UDisplayContextType, perrorcode : *mut UErrorCode) -> UDisplayContext); +windows_link::link!("icuuc.dll" "C" fn uldn_getDialectHandling(ldn : *const ULocaleDisplayNames) -> UDialectHandling); +windows_link::link!("icuuc.dll" "C" fn uldn_getLocale(ldn : *const ULocaleDisplayNames) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uldn_keyDisplayName(ldn : *const ULocaleDisplayNames, key : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uldn_keyValueDisplayName(ldn : *const ULocaleDisplayNames, key : windows_sys::core::PCSTR, value : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uldn_languageDisplayName(ldn : *const ULocaleDisplayNames, lang : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uldn_localeDisplayName(ldn : *const ULocaleDisplayNames, locale : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uldn_open(locale : windows_sys::core::PCSTR, dialecthandling : UDialectHandling, perrorcode : *mut UErrorCode) -> *mut ULocaleDisplayNames); +windows_link::link!("icuuc.dll" "C" fn uldn_openForContext(locale : windows_sys::core::PCSTR, contexts : *mut UDisplayContext, length : i32, perrorcode : *mut UErrorCode) -> *mut ULocaleDisplayNames); +windows_link::link!("icuuc.dll" "C" fn uldn_regionDisplayName(ldn : *const ULocaleDisplayNames, region : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uldn_scriptCodeDisplayName(ldn : *const ULocaleDisplayNames, scriptcode : UScriptCode, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uldn_scriptDisplayName(ldn : *const ULocaleDisplayNames, script : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uldn_variantDisplayName(ldn : *const ULocaleDisplayNames, variant : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ulistfmt_close(listfmt : *mut UListFormatter)); +windows_link::link!("icu.dll" "C" fn ulistfmt_closeResult(uresult : *mut UFormattedList)); +windows_link::link!("icuuc.dll" "C" fn ulistfmt_format(listfmt : *const UListFormatter, strings : *const *const u16, stringlengths : *const i32, stringcount : i32, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn ulistfmt_formatStringsToResult(listfmt : *const UListFormatter, strings : *const *const u16, stringlengths : *const i32, stringcount : i32, uresult : *mut UFormattedList, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn ulistfmt_open(locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UListFormatter); +windows_link::link!("icu.dll" "C" fn ulistfmt_openForType(locale : windows_sys::core::PCSTR, r#type : UListFormatterType, width : UListFormatterWidth, status : *mut UErrorCode) -> *mut UListFormatter); +windows_link::link!("icu.dll" "C" fn ulistfmt_openResult(ec : *mut UErrorCode) -> *mut UFormattedList); +windows_link::link!("icu.dll" "C" fn ulistfmt_resultAsValue(uresult : *const UFormattedList, ec : *mut UErrorCode) -> *mut UFormattedValue); +windows_link::link!("icuuc.dll" "C" fn uloc_acceptLanguage(result : windows_sys::core::PCSTR, resultavailable : i32, outresult : *mut UAcceptResult, acceptlist : *const *const i8, acceptlistcount : i32, availablelocales : *mut UEnumeration, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_acceptLanguageFromHTTP(result : windows_sys::core::PCSTR, resultavailable : i32, outresult : *mut UAcceptResult, httpacceptlanguage : windows_sys::core::PCSTR, availablelocales : *mut UEnumeration, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_addLikelySubtags(localeid : windows_sys::core::PCSTR, maximizedlocaleid : windows_sys::core::PCSTR, maximizedlocaleidcapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_canonicalize(localeid : windows_sys::core::PCSTR, name : windows_sys::core::PCSTR, namecapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_countAvailable() -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_forLanguageTag(langtag : windows_sys::core::PCSTR, localeid : windows_sys::core::PCSTR, localeidcapacity : i32, parsedlength : *mut i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getAvailable(n : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uloc_getBaseName(localeid : windows_sys::core::PCSTR, name : windows_sys::core::PCSTR, namecapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getCharacterOrientation(localeid : windows_sys::core::PCSTR, status : *mut UErrorCode) -> ULayoutType); +windows_link::link!("icuuc.dll" "C" fn uloc_getCountry(localeid : windows_sys::core::PCSTR, country : windows_sys::core::PCSTR, countrycapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getDefault() -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uloc_getDisplayCountry(locale : windows_sys::core::PCSTR, displaylocale : windows_sys::core::PCSTR, country : *mut u16, countrycapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getDisplayKeyword(keyword : windows_sys::core::PCSTR, displaylocale : windows_sys::core::PCSTR, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getDisplayKeywordValue(locale : windows_sys::core::PCSTR, keyword : windows_sys::core::PCSTR, displaylocale : windows_sys::core::PCSTR, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getDisplayLanguage(locale : windows_sys::core::PCSTR, displaylocale : windows_sys::core::PCSTR, language : *mut u16, languagecapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getDisplayName(localeid : windows_sys::core::PCSTR, inlocaleid : windows_sys::core::PCSTR, result : *mut u16, maxresultsize : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getDisplayScript(locale : windows_sys::core::PCSTR, displaylocale : windows_sys::core::PCSTR, script : *mut u16, scriptcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getDisplayVariant(locale : windows_sys::core::PCSTR, displaylocale : windows_sys::core::PCSTR, variant : *mut u16, variantcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getISO3Country(localeid : windows_sys::core::PCSTR) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uloc_getISO3Language(localeid : windows_sys::core::PCSTR) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uloc_getISOCountries() -> *mut *mut i8); +windows_link::link!("icuuc.dll" "C" fn uloc_getISOLanguages() -> *mut *mut i8); +windows_link::link!("icuuc.dll" "C" fn uloc_getKeywordValue(localeid : windows_sys::core::PCSTR, keywordname : windows_sys::core::PCSTR, buffer : windows_sys::core::PCSTR, buffercapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getLCID(localeid : windows_sys::core::PCSTR) -> u32); +windows_link::link!("icuuc.dll" "C" fn uloc_getLanguage(localeid : windows_sys::core::PCSTR, language : windows_sys::core::PCSTR, languagecapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getLineOrientation(localeid : windows_sys::core::PCSTR, status : *mut UErrorCode) -> ULayoutType); +windows_link::link!("icuuc.dll" "C" fn uloc_getLocaleForLCID(hostid : u32, locale : windows_sys::core::PCSTR, localecapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getName(localeid : windows_sys::core::PCSTR, name : windows_sys::core::PCSTR, namecapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getParent(localeid : windows_sys::core::PCSTR, parent : windows_sys::core::PCSTR, parentcapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getScript(localeid : windows_sys::core::PCSTR, script : windows_sys::core::PCSTR, scriptcapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_getVariant(localeid : windows_sys::core::PCSTR, variant : windows_sys::core::PCSTR, variantcapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_isRightToLeft(locale : windows_sys::core::PCSTR) -> i8); +windows_link::link!("icuuc.dll" "C" fn uloc_minimizeSubtags(localeid : windows_sys::core::PCSTR, minimizedlocaleid : windows_sys::core::PCSTR, minimizedlocaleidcapacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn uloc_openAvailableByType(r#type : ULocAvailableType, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn uloc_openKeywords(localeid : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn uloc_setDefault(localeid : windows_sys::core::PCSTR, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn uloc_setKeywordValue(keywordname : windows_sys::core::PCSTR, keywordvalue : windows_sys::core::PCSTR, buffer : windows_sys::core::PCSTR, buffercapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_toLanguageTag(localeid : windows_sys::core::PCSTR, langtag : windows_sys::core::PCSTR, langtagcapacity : i32, strict : i8, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uloc_toLegacyKey(keyword : windows_sys::core::PCSTR) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uloc_toLegacyType(keyword : windows_sys::core::PCSTR, value : windows_sys::core::PCSTR) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uloc_toUnicodeLocaleKey(keyword : windows_sys::core::PCSTR) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uloc_toUnicodeLocaleType(keyword : windows_sys::core::PCSTR, value : windows_sys::core::PCSTR) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn ulocdata_close(uld : *mut ULocaleData)); +windows_link::link!("icuin.dll" "C" fn ulocdata_getCLDRVersion(versionarray : *mut u8, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ulocdata_getDelimiter(uld : *mut ULocaleData, r#type : ULocaleDataDelimiterType, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ulocdata_getExemplarSet(uld : *mut ULocaleData, fillin : *mut USet, options : u32, extype : ULocaleDataExemplarSetType, status : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuin.dll" "C" fn ulocdata_getLocaleDisplayPattern(uld : *mut ULocaleData, pattern : *mut u16, patterncapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ulocdata_getLocaleSeparator(uld : *mut ULocaleData, separator : *mut u16, separatorcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ulocdata_getMeasurementSystem(localeid : windows_sys::core::PCSTR, status : *mut UErrorCode) -> UMeasurementSystem); +windows_link::link!("icuin.dll" "C" fn ulocdata_getNoSubstitute(uld : *mut ULocaleData) -> i8); +windows_link::link!("icuin.dll" "C" fn ulocdata_getPaperSize(localeid : windows_sys::core::PCSTR, height : *mut i32, width : *mut i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ulocdata_open(localeid : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut ULocaleData); +windows_link::link!("icuin.dll" "C" fn ulocdata_setNoSubstitute(uld : *mut ULocaleData, setting : i8)); +windows_link::link!("icuin.dll" "C" fn umsg_applyPattern(fmt : *mut *mut core::ffi::c_void, pattern : *const u16, patternlength : i32, parseerror : *mut UParseError, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn umsg_autoQuoteApostrophe(pattern : *const u16, patternlength : i32, dest : *mut u16, destcapacity : i32, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn umsg_clone(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn umsg_close(format : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn umsg_format(fmt : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, status : *mut UErrorCode, ...) -> i32); +windows_link::link!("icuin.dll" "C" fn umsg_getLocale(fmt : *const *const core::ffi::c_void) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn umsg_open(pattern : *const u16, patternlength : i32, locale : windows_sys::core::PCSTR, parseerror : *mut UParseError, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn umsg_parse(fmt : *const *const core::ffi::c_void, source : *const u16, sourcelength : i32, count : *mut i32, status : *mut UErrorCode, ...)); +windows_link::link!("icuin.dll" "C" fn umsg_setLocale(fmt : *mut *mut core::ffi::c_void, locale : windows_sys::core::PCSTR)); +windows_link::link!("icuin.dll" "C" fn umsg_toPattern(fmt : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn umsg_vformat(fmt : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, ap : *mut i8, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn umsg_vparse(fmt : *const *const core::ffi::c_void, source : *const u16, sourcelength : i32, count : *mut i32, ap : *mut i8, status : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn umutablecptrie_buildImmutable(trie : *mut UMutableCPTrie, r#type : UCPTrieType, valuewidth : UCPTrieValueWidth, perrorcode : *mut UErrorCode) -> *mut UCPTrie); +windows_link::link!("icu.dll" "C" fn umutablecptrie_clone(other : *const UMutableCPTrie, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); +windows_link::link!("icu.dll" "C" fn umutablecptrie_close(trie : *mut UMutableCPTrie)); +windows_link::link!("icu.dll" "C" fn umutablecptrie_fromUCPMap(map : *const UCPMap, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); +windows_link::link!("icu.dll" "C" fn umutablecptrie_fromUCPTrie(trie : *const UCPTrie, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); +windows_link::link!("icu.dll" "C" fn umutablecptrie_get(trie : *const UMutableCPTrie, c : i32) -> u32); +windows_link::link!("icu.dll" "C" fn umutablecptrie_getRange(trie : *const UMutableCPTrie, start : i32, option : UCPMapRangeOption, surrogatevalue : u32, filter : *mut UCPMapValueFilter, context : *const core::ffi::c_void, pvalue : *mut u32) -> i32); +windows_link::link!("icu.dll" "C" fn umutablecptrie_open(initialvalue : u32, errorvalue : u32, perrorcode : *mut UErrorCode) -> *mut UMutableCPTrie); +windows_link::link!("icu.dll" "C" fn umutablecptrie_set(trie : *mut UMutableCPTrie, c : i32, value : u32, perrorcode : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn umutablecptrie_setRange(trie : *mut UMutableCPTrie, start : i32, end : i32, value : u32, perrorcode : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn unorm2_append(norm2 : *const UNormalizer2, first : *mut u16, firstlength : i32, firstcapacity : i32, second : *const u16, secondlength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn unorm2_close(norm2 : *mut UNormalizer2)); +windows_link::link!("icuuc.dll" "C" fn unorm2_composePair(norm2 : *const UNormalizer2, a : i32, b : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn unorm2_getCombiningClass(norm2 : *const UNormalizer2, c : i32) -> u8); +windows_link::link!("icuuc.dll" "C" fn unorm2_getDecomposition(norm2 : *const UNormalizer2, c : i32, decomposition : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn unorm2_getInstance(packagename : windows_sys::core::PCSTR, name : windows_sys::core::PCSTR, mode : UNormalization2Mode, perrorcode : *mut UErrorCode) -> *mut UNormalizer2); +windows_link::link!("icuuc.dll" "C" fn unorm2_getNFCInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); +windows_link::link!("icuuc.dll" "C" fn unorm2_getNFDInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); +windows_link::link!("icuuc.dll" "C" fn unorm2_getNFKCCasefoldInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); +windows_link::link!("icuuc.dll" "C" fn unorm2_getNFKCInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); +windows_link::link!("icuuc.dll" "C" fn unorm2_getNFKDInstance(perrorcode : *mut UErrorCode) -> *mut UNormalizer2); +windows_link::link!("icuuc.dll" "C" fn unorm2_getRawDecomposition(norm2 : *const UNormalizer2, c : i32, decomposition : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn unorm2_hasBoundaryAfter(norm2 : *const UNormalizer2, c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn unorm2_hasBoundaryBefore(norm2 : *const UNormalizer2, c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn unorm2_isInert(norm2 : *const UNormalizer2, c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn unorm2_isNormalized(norm2 : *const UNormalizer2, s : *const u16, length : i32, perrorcode : *mut UErrorCode) -> i8); +windows_link::link!("icuuc.dll" "C" fn unorm2_normalize(norm2 : *const UNormalizer2, src : *const u16, length : i32, dest : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn unorm2_normalizeSecondAndAppend(norm2 : *const UNormalizer2, first : *mut u16, firstlength : i32, firstcapacity : i32, second : *const u16, secondlength : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn unorm2_openFiltered(norm2 : *const UNormalizer2, filterset : *const USet, perrorcode : *mut UErrorCode) -> *mut UNormalizer2); +windows_link::link!("icuuc.dll" "C" fn unorm2_quickCheck(norm2 : *const UNormalizer2, s : *const u16, length : i32, perrorcode : *mut UErrorCode) -> UNormalizationCheckResult); +windows_link::link!("icuuc.dll" "C" fn unorm2_spanQuickCheckYes(norm2 : *const UNormalizer2, s : *const u16, length : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn unorm_compare(s1 : *const u16, length1 : i32, s2 : *const u16, length2 : i32, options : u32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_applyPattern(format : *mut *mut core::ffi::c_void, localized : i8, pattern : *const u16, patternlength : i32, parseerror : *mut UParseError, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn unum_clone(fmt : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn unum_close(fmt : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn unum_countAvailable() -> i32); +windows_link::link!("icuin.dll" "C" fn unum_format(fmt : *const *const core::ffi::c_void, number : i32, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_formatDecimal(fmt : *const *const core::ffi::c_void, number : windows_sys::core::PCSTR, length : i32, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_formatDouble(fmt : *const *const core::ffi::c_void, number : f64, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_formatDoubleCurrency(fmt : *const *const core::ffi::c_void, number : f64, currency : *mut u16, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_formatDoubleForFields(format : *const *const core::ffi::c_void, number : f64, result : *mut u16, resultlength : i32, fpositer : *mut UFieldPositionIterator, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_formatInt64(fmt : *const *const core::ffi::c_void, number : i64, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_formatUFormattable(fmt : *const *const core::ffi::c_void, number : *const *const core::ffi::c_void, result : *mut u16, resultlength : i32, pos : *mut UFieldPosition, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_getAttribute(fmt : *const *const core::ffi::c_void, attr : UNumberFormatAttribute) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_getAvailable(localeindex : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn unum_getContext(fmt : *const *const core::ffi::c_void, r#type : UDisplayContextType, status : *mut UErrorCode) -> UDisplayContext); +windows_link::link!("icuin.dll" "C" fn unum_getDoubleAttribute(fmt : *const *const core::ffi::c_void, attr : UNumberFormatAttribute) -> f64); +windows_link::link!("icuin.dll" "C" fn unum_getLocaleByType(fmt : *const *const core::ffi::c_void, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn unum_getSymbol(fmt : *const *const core::ffi::c_void, symbol : UNumberFormatSymbol, buffer : *mut u16, size : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_getTextAttribute(fmt : *const *const core::ffi::c_void, tag : UNumberFormatTextAttribute, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_open(style : UNumberFormatStyle, pattern : *const u16, patternlength : i32, locale : windows_sys::core::PCSTR, parseerr : *mut UParseError, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn unum_parse(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_parseDecimal(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, outbuf : windows_sys::core::PCSTR, outbuflength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unum_parseDouble(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> f64); +windows_link::link!("icuin.dll" "C" fn unum_parseDoubleCurrency(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, currency : *mut u16, status : *mut UErrorCode) -> f64); +windows_link::link!("icuin.dll" "C" fn unum_parseInt64(fmt : *const *const core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn unum_parseToUFormattable(fmt : *const *const core::ffi::c_void, result : *mut *mut core::ffi::c_void, text : *const u16, textlength : i32, parsepos : *mut i32, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn unum_setAttribute(fmt : *mut *mut core::ffi::c_void, attr : UNumberFormatAttribute, newvalue : i32)); +windows_link::link!("icuin.dll" "C" fn unum_setContext(fmt : *mut *mut core::ffi::c_void, value : UDisplayContext, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn unum_setDoubleAttribute(fmt : *mut *mut core::ffi::c_void, attr : UNumberFormatAttribute, newvalue : f64)); +windows_link::link!("icuin.dll" "C" fn unum_setSymbol(fmt : *mut *mut core::ffi::c_void, symbol : UNumberFormatSymbol, value : *const u16, length : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn unum_setTextAttribute(fmt : *mut *mut core::ffi::c_void, tag : UNumberFormatTextAttribute, newvalue : *const u16, newvaluelength : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn unum_toPattern(fmt : *const *const core::ffi::c_void, ispatternlocalized : i8, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn unumf_close(uformatter : *mut UNumberFormatter)); +windows_link::link!("icu.dll" "C" fn unumf_closeResult(uresult : *mut UFormattedNumber)); +windows_link::link!("icu.dll" "C" fn unumf_formatDecimal(uformatter : *const UNumberFormatter, value : windows_sys::core::PCSTR, valuelen : i32, uresult : *mut UFormattedNumber, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn unumf_formatDouble(uformatter : *const UNumberFormatter, value : f64, uresult : *mut UFormattedNumber, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn unumf_formatInt(uformatter : *const UNumberFormatter, value : i64, uresult : *mut UFormattedNumber, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn unumf_openForSkeletonAndLocale(skeleton : *const u16, skeletonlen : i32, locale : windows_sys::core::PCSTR, ec : *mut UErrorCode) -> *mut UNumberFormatter); +windows_link::link!("icu.dll" "C" fn unumf_openForSkeletonAndLocaleWithError(skeleton : *const u16, skeletonlen : i32, locale : windows_sys::core::PCSTR, perror : *mut UParseError, ec : *mut UErrorCode) -> *mut UNumberFormatter); +windows_link::link!("icu.dll" "C" fn unumf_openResult(ec : *mut UErrorCode) -> *mut UFormattedNumber); +windows_link::link!("icu.dll" "C" fn unumf_resultAsValue(uresult : *const UFormattedNumber, ec : *mut UErrorCode) -> *mut UFormattedValue); +windows_link::link!("icu.dll" "C" fn unumf_resultGetAllFieldPositions(uresult : *const UFormattedNumber, ufpositer : *mut UFieldPositionIterator, ec : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn unumf_resultNextFieldPosition(uresult : *const UFormattedNumber, ufpos : *mut UFieldPosition, ec : *mut UErrorCode) -> i8); +windows_link::link!("icu.dll" "C" fn unumf_resultToString(uresult : *const UFormattedNumber, buffer : *mut u16, buffercapacity : i32, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unumsys_close(unumsys : *mut UNumberingSystem)); +windows_link::link!("icuin.dll" "C" fn unumsys_getDescription(unumsys : *const UNumberingSystem, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn unumsys_getName(unumsys : *const UNumberingSystem) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn unumsys_getRadix(unumsys : *const UNumberingSystem) -> i32); +windows_link::link!("icuin.dll" "C" fn unumsys_isAlgorithmic(unumsys : *const UNumberingSystem) -> i8); +windows_link::link!("icuin.dll" "C" fn unumsys_open(locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UNumberingSystem); +windows_link::link!("icuin.dll" "C" fn unumsys_openAvailableNames(status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn unumsys_openByName(name : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UNumberingSystem); +windows_link::link!("icuin.dll" "C" fn uplrules_close(uplrules : *mut UPluralRules)); +windows_link::link!("icuin.dll" "C" fn uplrules_getKeywords(uplrules : *const UPluralRules, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn uplrules_open(locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UPluralRules); +windows_link::link!("icuin.dll" "C" fn uplrules_openForType(locale : windows_sys::core::PCSTR, r#type : UPluralType, status : *mut UErrorCode) -> *mut UPluralRules); +windows_link::link!("icuin.dll" "C" fn uplrules_select(uplrules : *const UPluralRules, number : f64, keyword : *mut u16, capacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn uplrules_selectFormatted(uplrules : *const UPluralRules, number : *const UFormattedNumber, keyword : *mut u16, capacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_appendReplacement(regexp : *mut URegularExpression, replacementtext : *const u16, replacementlength : i32, destbuf : *mut *mut u16, destcapacity : *mut i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_appendReplacementUText(regexp : *mut URegularExpression, replacementtext : *mut UText, dest : *mut UText, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_appendTail(regexp : *mut URegularExpression, destbuf : *mut *mut u16, destcapacity : *mut i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_appendTailUText(regexp : *mut URegularExpression, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuin.dll" "C" fn uregex_clone(regexp : *const URegularExpression, status : *mut UErrorCode) -> *mut URegularExpression); +windows_link::link!("icuin.dll" "C" fn uregex_close(regexp : *mut URegularExpression)); +windows_link::link!("icuin.dll" "C" fn uregex_end(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_end64(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn uregex_find(regexp : *mut URegularExpression, startindex : i32, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_find64(regexp : *mut URegularExpression, startindex : i64, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_findNext(regexp : *mut URegularExpression, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_flags(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_getFindProgressCallback(regexp : *const URegularExpression, callback : *mut URegexFindProgressCallback, context : *const *const core::ffi::c_void, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_getMatchCallback(regexp : *const URegularExpression, callback : *mut URegexMatchCallback, context : *const *const core::ffi::c_void, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_getStackLimit(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_getText(regexp : *mut URegularExpression, textlength : *mut i32, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn uregex_getTimeLimit(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_getUText(regexp : *mut URegularExpression, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuin.dll" "C" fn uregex_group(regexp : *mut URegularExpression, groupnum : i32, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_groupCount(regexp : *mut URegularExpression, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_groupNumberFromCName(regexp : *mut URegularExpression, groupname : windows_sys::core::PCSTR, namelength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_groupNumberFromName(regexp : *mut URegularExpression, groupname : *const u16, namelength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_groupUText(regexp : *mut URegularExpression, groupnum : i32, dest : *mut UText, grouplength : *mut i64, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuin.dll" "C" fn uregex_hasAnchoringBounds(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_hasTransparentBounds(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_hitEnd(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_lookingAt(regexp : *mut URegularExpression, startindex : i32, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_lookingAt64(regexp : *mut URegularExpression, startindex : i64, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_matches(regexp : *mut URegularExpression, startindex : i32, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_matches64(regexp : *mut URegularExpression, startindex : i64, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_open(pattern : *const u16, patternlength : i32, flags : u32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut URegularExpression); +windows_link::link!("icuin.dll" "C" fn uregex_openC(pattern : windows_sys::core::PCSTR, flags : u32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut URegularExpression); +windows_link::link!("icuin.dll" "C" fn uregex_openUText(pattern : *mut UText, flags : u32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut URegularExpression); +windows_link::link!("icuin.dll" "C" fn uregex_pattern(regexp : *const URegularExpression, patlength : *mut i32, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn uregex_patternUText(regexp : *const URegularExpression, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuin.dll" "C" fn uregex_refreshUText(regexp : *mut URegularExpression, text : *mut UText, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_regionEnd(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_regionEnd64(regexp : *const URegularExpression, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn uregex_regionStart(regexp : *const URegularExpression, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_regionStart64(regexp : *const URegularExpression, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn uregex_replaceAll(regexp : *mut URegularExpression, replacementtext : *const u16, replacementlength : i32, destbuf : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_replaceAllUText(regexp : *mut URegularExpression, replacement : *mut UText, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuin.dll" "C" fn uregex_replaceFirst(regexp : *mut URegularExpression, replacementtext : *const u16, replacementlength : i32, destbuf : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_replaceFirstUText(regexp : *mut URegularExpression, replacement : *mut UText, dest : *mut UText, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuin.dll" "C" fn uregex_requireEnd(regexp : *const URegularExpression, status : *mut UErrorCode) -> i8); +windows_link::link!("icuin.dll" "C" fn uregex_reset(regexp : *mut URegularExpression, index : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_reset64(regexp : *mut URegularExpression, index : i64, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setFindProgressCallback(regexp : *mut URegularExpression, callback : URegexFindProgressCallback, context : *const core::ffi::c_void, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setMatchCallback(regexp : *mut URegularExpression, callback : URegexMatchCallback, context : *const core::ffi::c_void, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setRegion(regexp : *mut URegularExpression, regionstart : i32, regionlimit : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setRegion64(regexp : *mut URegularExpression, regionstart : i64, regionlimit : i64, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setRegionAndStart(regexp : *mut URegularExpression, regionstart : i64, regionlimit : i64, startindex : i64, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setStackLimit(regexp : *mut URegularExpression, limit : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setText(regexp : *mut URegularExpression, text : *const u16, textlength : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setTimeLimit(regexp : *mut URegularExpression, limit : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_setUText(regexp : *mut URegularExpression, text : *mut UText, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_split(regexp : *mut URegularExpression, destbuf : *mut u16, destcapacity : i32, requiredcapacity : *mut i32, destfields : *mut *mut u16, destfieldscapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_splitUText(regexp : *mut URegularExpression, destfields : *mut *mut UText, destfieldscapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_start(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uregex_start64(regexp : *mut URegularExpression, groupnum : i32, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn uregex_useAnchoringBounds(regexp : *mut URegularExpression, b : i8, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregex_useTransparentBounds(regexp : *mut URegularExpression, b : i8, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uregion_areEqual(uregion : *const URegion, otherregion : *const URegion) -> i8); +windows_link::link!("icuin.dll" "C" fn uregion_contains(uregion : *const URegion, otherregion : *const URegion) -> i8); +windows_link::link!("icuin.dll" "C" fn uregion_getAvailable(r#type : URegionType, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn uregion_getContainedRegions(uregion : *const URegion, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn uregion_getContainedRegionsOfType(uregion : *const URegion, r#type : URegionType, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn uregion_getContainingRegion(uregion : *const URegion) -> *mut URegion); +windows_link::link!("icuin.dll" "C" fn uregion_getContainingRegionOfType(uregion : *const URegion, r#type : URegionType) -> *mut URegion); +windows_link::link!("icuin.dll" "C" fn uregion_getNumericCode(uregion : *const URegion) -> i32); +windows_link::link!("icuin.dll" "C" fn uregion_getPreferredValues(uregion : *const URegion, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn uregion_getRegionCode(uregion : *const URegion) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn uregion_getRegionFromCode(regioncode : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut URegion); +windows_link::link!("icuin.dll" "C" fn uregion_getRegionFromNumericCode(code : i32, status : *mut UErrorCode) -> *mut URegion); +windows_link::link!("icuin.dll" "C" fn uregion_getType(uregion : *const URegion) -> URegionType); +windows_link::link!("icuin.dll" "C" fn ureldatefmt_close(reldatefmt : *mut URelativeDateTimeFormatter)); +windows_link::link!("icu.dll" "C" fn ureldatefmt_closeResult(ufrdt : *mut UFormattedRelativeDateTime)); +windows_link::link!("icuin.dll" "C" fn ureldatefmt_combineDateAndTime(reldatefmt : *const URelativeDateTimeFormatter, relativedatestring : *const u16, relativedatestringlen : i32, timestring : *const u16, timestringlen : i32, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ureldatefmt_format(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn ureldatefmt_formatNumeric(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icu.dll" "C" fn ureldatefmt_formatNumericToResult(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut UFormattedRelativeDateTime, status : *mut UErrorCode)); +windows_link::link!("icu.dll" "C" fn ureldatefmt_formatToResult(reldatefmt : *const URelativeDateTimeFormatter, offset : f64, unit : URelativeDateTimeUnit, result : *mut UFormattedRelativeDateTime, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn ureldatefmt_open(locale : windows_sys::core::PCSTR, nftoadopt : *mut *mut core::ffi::c_void, width : UDateRelativeDateTimeFormatterStyle, capitalizationcontext : UDisplayContext, status : *mut UErrorCode) -> *mut URelativeDateTimeFormatter); +windows_link::link!("icu.dll" "C" fn ureldatefmt_openResult(ec : *mut UErrorCode) -> *mut UFormattedRelativeDateTime); +windows_link::link!("icu.dll" "C" fn ureldatefmt_resultAsValue(ufrdt : *const UFormattedRelativeDateTime, ec : *mut UErrorCode) -> *mut UFormattedValue); +windows_link::link!("icuuc.dll" "C" fn ures_close(resourcebundle : *mut UResourceBundle)); +windows_link::link!("icuuc.dll" "C" fn ures_getBinary(resourcebundle : *const UResourceBundle, len : *mut i32, status : *mut UErrorCode) -> *mut u8); +windows_link::link!("icuuc.dll" "C" fn ures_getByIndex(resourcebundle : *const UResourceBundle, indexr : i32, fillin : *mut UResourceBundle, status : *mut UErrorCode) -> *mut UResourceBundle); +windows_link::link!("icuuc.dll" "C" fn ures_getByKey(resourcebundle : *const UResourceBundle, key : windows_sys::core::PCSTR, fillin : *mut UResourceBundle, status : *mut UErrorCode) -> *mut UResourceBundle); +windows_link::link!("icuuc.dll" "C" fn ures_getInt(resourcebundle : *const UResourceBundle, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn ures_getIntVector(resourcebundle : *const UResourceBundle, len : *mut i32, status : *mut UErrorCode) -> *mut i32); +windows_link::link!("icuuc.dll" "C" fn ures_getKey(resourcebundle : *const UResourceBundle) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ures_getLocaleByType(resourcebundle : *const UResourceBundle, r#type : ULocDataLocaleType, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ures_getNextResource(resourcebundle : *mut UResourceBundle, fillin : *mut UResourceBundle, status : *mut UErrorCode) -> *mut UResourceBundle); +windows_link::link!("icuuc.dll" "C" fn ures_getNextString(resourcebundle : *mut UResourceBundle, len : *mut i32, key : *const *const i8, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn ures_getSize(resourcebundle : *const UResourceBundle) -> i32); +windows_link::link!("icuuc.dll" "C" fn ures_getString(resourcebundle : *const UResourceBundle, len : *mut i32, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn ures_getStringByIndex(resourcebundle : *const UResourceBundle, indexs : i32, len : *mut i32, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn ures_getStringByKey(resb : *const UResourceBundle, key : windows_sys::core::PCSTR, len : *mut i32, status : *mut UErrorCode) -> *mut u16); +windows_link::link!("icuuc.dll" "C" fn ures_getType(resourcebundle : *const UResourceBundle) -> UResType); +windows_link::link!("icuuc.dll" "C" fn ures_getUInt(resourcebundle : *const UResourceBundle, status : *mut UErrorCode) -> u32); +windows_link::link!("icuuc.dll" "C" fn ures_getUTF8String(resb : *const UResourceBundle, dest : windows_sys::core::PCSTR, length : *mut i32, forcecopy : i8, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ures_getUTF8StringByIndex(resb : *const UResourceBundle, stringindex : i32, dest : windows_sys::core::PCSTR, plength : *mut i32, forcecopy : i8, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ures_getUTF8StringByKey(resb : *const UResourceBundle, key : windows_sys::core::PCSTR, dest : windows_sys::core::PCSTR, plength : *mut i32, forcecopy : i8, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn ures_getVersion(resb : *const UResourceBundle, versioninfo : *mut u8)); +windows_link::link!("icuuc.dll" "C" fn ures_hasNext(resourcebundle : *const UResourceBundle) -> i8); +windows_link::link!("icuuc.dll" "C" fn ures_open(packagename : windows_sys::core::PCSTR, locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UResourceBundle); +windows_link::link!("icuuc.dll" "C" fn ures_openAvailableLocales(packagename : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuuc.dll" "C" fn ures_openDirect(packagename : windows_sys::core::PCSTR, locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UResourceBundle); +windows_link::link!("icuuc.dll" "C" fn ures_openU(packagename : *const u16, locale : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UResourceBundle); +windows_link::link!("icuuc.dll" "C" fn ures_resetIterator(resourcebundle : *mut UResourceBundle)); +windows_link::link!("icuuc.dll" "C" fn uscript_breaksBetweenLetters(script : UScriptCode) -> i8); +windows_link::link!("icuuc.dll" "C" fn uscript_getCode(nameorabbrorlocale : windows_sys::core::PCSTR, fillin : *mut UScriptCode, capacity : i32, err : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uscript_getName(scriptcode : UScriptCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uscript_getSampleString(script : UScriptCode, dest : *mut u16, capacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uscript_getScript(codepoint : i32, err : *mut UErrorCode) -> UScriptCode); +windows_link::link!("icuuc.dll" "C" fn uscript_getScriptExtensions(c : i32, scripts : *mut UScriptCode, capacity : i32, errorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uscript_getShortName(scriptcode : UScriptCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn uscript_getUsage(script : UScriptCode) -> UScriptUsage); +windows_link::link!("icuuc.dll" "C" fn uscript_hasScript(c : i32, sc : UScriptCode) -> i8); +windows_link::link!("icuuc.dll" "C" fn uscript_isCased(script : UScriptCode) -> i8); +windows_link::link!("icuuc.dll" "C" fn uscript_isRightToLeft(script : UScriptCode) -> i8); +windows_link::link!("icuin.dll" "C" fn usearch_close(searchiter : *mut UStringSearch)); +windows_link::link!("icuin.dll" "C" fn usearch_first(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_following(strsrch : *mut UStringSearch, position : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_getAttribute(strsrch : *const UStringSearch, attribute : USearchAttribute) -> USearchAttributeValue); +windows_link::link!("icuin.dll" "C" fn usearch_getBreakIterator(strsrch : *const UStringSearch) -> *mut UBreakIterator); +windows_link::link!("icuin.dll" "C" fn usearch_getCollator(strsrch : *const UStringSearch) -> *mut UCollator); +windows_link::link!("icuin.dll" "C" fn usearch_getMatchedLength(strsrch : *const UStringSearch) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_getMatchedStart(strsrch : *const UStringSearch) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_getMatchedText(strsrch : *const UStringSearch, result : *mut u16, resultcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_getOffset(strsrch : *const UStringSearch) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_getPattern(strsrch : *const UStringSearch, length : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn usearch_getText(strsrch : *const UStringSearch, length : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn usearch_last(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_next(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_open(pattern : *const u16, patternlength : i32, text : *const u16, textlength : i32, locale : windows_sys::core::PCSTR, breakiter : *mut UBreakIterator, status : *mut UErrorCode) -> *mut UStringSearch); +windows_link::link!("icuin.dll" "C" fn usearch_openFromCollator(pattern : *const u16, patternlength : i32, text : *const u16, textlength : i32, collator : *const UCollator, breakiter : *mut UBreakIterator, status : *mut UErrorCode) -> *mut UStringSearch); +windows_link::link!("icuin.dll" "C" fn usearch_preceding(strsrch : *mut UStringSearch, position : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_previous(strsrch : *mut UStringSearch, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn usearch_reset(strsrch : *mut UStringSearch)); +windows_link::link!("icuin.dll" "C" fn usearch_setAttribute(strsrch : *mut UStringSearch, attribute : USearchAttribute, value : USearchAttributeValue, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn usearch_setBreakIterator(strsrch : *mut UStringSearch, breakiter : *mut UBreakIterator, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn usearch_setCollator(strsrch : *mut UStringSearch, collator : *const UCollator, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn usearch_setOffset(strsrch : *mut UStringSearch, position : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn usearch_setPattern(strsrch : *mut UStringSearch, pattern : *const u16, patternlength : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn usearch_setText(strsrch : *mut UStringSearch, text : *const u16, textlength : i32, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn uset_add(set : *mut USet, c : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_addAll(set : *mut USet, additionalset : *const USet)); +windows_link::link!("icuuc.dll" "C" fn uset_addAllCodePoints(set : *mut USet, str : *const u16, strlen : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_addRange(set : *mut USet, start : i32, end : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_addString(set : *mut USet, str : *const u16, strlen : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_applyIntPropertyValue(set : *mut USet, prop : UProperty, value : i32, ec : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn uset_applyPattern(set : *mut USet, pattern : *const u16, patternlength : i32, options : u32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_applyPropertyAlias(set : *mut USet, prop : *const u16, proplength : i32, value : *const u16, valuelength : i32, ec : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn uset_charAt(set : *const USet, charindex : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_clear(set : *mut USet)); +windows_link::link!("icuuc.dll" "C" fn uset_clone(set : *const USet) -> *mut USet); +windows_link::link!("icuuc.dll" "C" fn uset_cloneAsThawed(set : *const USet) -> *mut USet); +windows_link::link!("icuuc.dll" "C" fn uset_close(set : *mut USet)); +windows_link::link!("icuuc.dll" "C" fn uset_closeOver(set : *mut USet, attributes : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_compact(set : *mut USet)); +windows_link::link!("icuuc.dll" "C" fn uset_complement(set : *mut USet)); +windows_link::link!("icuuc.dll" "C" fn uset_complementAll(set : *mut USet, complement : *const USet)); +windows_link::link!("icuuc.dll" "C" fn uset_contains(set : *const USet, c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_containsAll(set1 : *const USet, set2 : *const USet) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_containsAllCodePoints(set : *const USet, str : *const u16, strlen : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_containsNone(set1 : *const USet, set2 : *const USet) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_containsRange(set : *const USet, start : i32, end : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_containsSome(set1 : *const USet, set2 : *const USet) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_containsString(set : *const USet, str : *const u16, strlen : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_equals(set1 : *const USet, set2 : *const USet) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_freeze(set : *mut USet)); +windows_link::link!("icuuc.dll" "C" fn uset_getItem(set : *const USet, itemindex : i32, start : *mut i32, end : *mut i32, str : *mut u16, strcapacity : i32, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_getItemCount(set : *const USet) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_getSerializedRange(set : *const USerializedSet, rangeindex : i32, pstart : *mut i32, pend : *mut i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_getSerializedRangeCount(set : *const USerializedSet) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_getSerializedSet(fillset : *mut USerializedSet, src : *const u16, srclength : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_indexOf(set : *const USet, c : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_isEmpty(set : *const USet) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_isFrozen(set : *const USet) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_open(start : i32, end : i32) -> *mut USet); +windows_link::link!("icuuc.dll" "C" fn uset_openEmpty() -> *mut USet); +windows_link::link!("icuuc.dll" "C" fn uset_openPattern(pattern : *const u16, patternlength : i32, ec : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuuc.dll" "C" fn uset_openPatternOptions(pattern : *const u16, patternlength : i32, options : u32, ec : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuuc.dll" "C" fn uset_remove(set : *mut USet, c : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_removeAll(set : *mut USet, removeset : *const USet)); +windows_link::link!("icuuc.dll" "C" fn uset_removeAllStrings(set : *mut USet)); +windows_link::link!("icuuc.dll" "C" fn uset_removeRange(set : *mut USet, start : i32, end : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_removeString(set : *mut USet, str : *const u16, strlen : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_resemblesPattern(pattern : *const u16, patternlength : i32, pos : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_retain(set : *mut USet, start : i32, end : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_retainAll(set : *mut USet, retain : *const USet)); +windows_link::link!("icuuc.dll" "C" fn uset_serialize(set : *const USet, dest : *mut u16, destcapacity : i32, perrorcode : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_serializedContains(set : *const USerializedSet, c : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn uset_set(set : *mut USet, start : i32, end : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_setSerializedToOne(fillset : *mut USerializedSet, c : i32)); +windows_link::link!("icuuc.dll" "C" fn uset_size(set : *const USet) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_span(set : *const USet, s : *const u16, length : i32, spancondition : USetSpanCondition) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_spanBack(set : *const USet, s : *const u16, length : i32, spancondition : USetSpanCondition) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_spanBackUTF8(set : *const USet, s : windows_sys::core::PCSTR, length : i32, spancondition : USetSpanCondition) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_spanUTF8(set : *const USet, s : windows_sys::core::PCSTR, length : i32, spancondition : USetSpanCondition) -> i32); +windows_link::link!("icuuc.dll" "C" fn uset_toPattern(set : *const USet, result : *mut u16, resultcapacity : i32, escapeunprintable : i8, ec : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_areConfusable(sc : *const USpoofChecker, id1 : *const u16, length1 : i32, id2 : *const u16, length2 : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_areConfusableUTF8(sc : *const USpoofChecker, id1 : windows_sys::core::PCSTR, length1 : i32, id2 : windows_sys::core::PCSTR, length2 : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_check(sc : *const USpoofChecker, id : *const u16, length : i32, position : *mut i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_check2(sc : *const USpoofChecker, id : *const u16, length : i32, checkresult : *mut USpoofCheckResult, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_check2UTF8(sc : *const USpoofChecker, id : windows_sys::core::PCSTR, length : i32, checkresult : *mut USpoofCheckResult, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_checkUTF8(sc : *const USpoofChecker, id : windows_sys::core::PCSTR, length : i32, position : *mut i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_clone(sc : *const USpoofChecker, status : *mut UErrorCode) -> *mut USpoofChecker); +windows_link::link!("icuin.dll" "C" fn uspoof_close(sc : *mut USpoofChecker)); +windows_link::link!("icuin.dll" "C" fn uspoof_closeCheckResult(checkresult : *mut USpoofCheckResult)); +windows_link::link!("icuin.dll" "C" fn uspoof_getAllowedChars(sc : *const USpoofChecker, status : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuin.dll" "C" fn uspoof_getAllowedLocales(sc : *mut USpoofChecker, status : *mut UErrorCode) -> windows_sys::core::PCSTR); +windows_link::link!("icuin.dll" "C" fn uspoof_getCheckResultChecks(checkresult : *const USpoofCheckResult, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_getCheckResultNumerics(checkresult : *const USpoofCheckResult, status : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuin.dll" "C" fn uspoof_getCheckResultRestrictionLevel(checkresult : *const USpoofCheckResult, status : *mut UErrorCode) -> URestrictionLevel); +windows_link::link!("icuin.dll" "C" fn uspoof_getChecks(sc : *const USpoofChecker, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_getInclusionSet(status : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuin.dll" "C" fn uspoof_getRecommendedSet(status : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuin.dll" "C" fn uspoof_getRestrictionLevel(sc : *const USpoofChecker) -> URestrictionLevel); +windows_link::link!("icuin.dll" "C" fn uspoof_getSkeleton(sc : *const USpoofChecker, r#type : u32, id : *const u16, length : i32, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_getSkeletonUTF8(sc : *const USpoofChecker, r#type : u32, id : windows_sys::core::PCSTR, length : i32, dest : windows_sys::core::PCSTR, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_open(status : *mut UErrorCode) -> *mut USpoofChecker); +windows_link::link!("icuin.dll" "C" fn uspoof_openCheckResult(status : *mut UErrorCode) -> *mut USpoofCheckResult); +windows_link::link!("icuin.dll" "C" fn uspoof_openFromSerialized(data : *const core::ffi::c_void, length : i32, pactuallength : *mut i32, perrorcode : *mut UErrorCode) -> *mut USpoofChecker); +windows_link::link!("icuin.dll" "C" fn uspoof_openFromSource(confusables : windows_sys::core::PCSTR, confusableslen : i32, confusableswholescript : windows_sys::core::PCSTR, confusableswholescriptlen : i32, errtype : *mut i32, pe : *mut UParseError, status : *mut UErrorCode) -> *mut USpoofChecker); +windows_link::link!("icuin.dll" "C" fn uspoof_serialize(sc : *mut USpoofChecker, data : *mut core::ffi::c_void, capacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn uspoof_setAllowedChars(sc : *mut USpoofChecker, chars : *const USet, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uspoof_setAllowedLocales(sc : *mut USpoofChecker, localeslist : windows_sys::core::PCSTR, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uspoof_setChecks(sc : *mut USpoofChecker, checks : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn uspoof_setRestrictionLevel(sc : *mut USpoofChecker, restrictionlevel : URestrictionLevel)); +windows_link::link!("icuuc.dll" "C" fn usprep_close(profile : *mut UStringPrepProfile)); +windows_link::link!("icuuc.dll" "C" fn usprep_open(path : windows_sys::core::PCSTR, filename : windows_sys::core::PCSTR, status : *mut UErrorCode) -> *mut UStringPrepProfile); +windows_link::link!("icuuc.dll" "C" fn usprep_openByType(r#type : UStringPrepProfileType, status : *mut UErrorCode) -> *mut UStringPrepProfile); +windows_link::link!("icuuc.dll" "C" fn usprep_prepare(prep : *const UStringPrepProfile, src : *const u16, srclength : i32, dest : *mut u16, destcapacity : i32, options : i32, parseerror : *mut UParseError, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_char32At(ut : *mut UText, nativeindex : i64) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_clone(dest : *mut UText, src : *const UText, deep : i8, readonly : i8, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuuc.dll" "C" fn utext_close(ut : *mut UText) -> *mut UText); +windows_link::link!("icuuc.dll" "C" fn utext_copy(ut : *mut UText, nativestart : i64, nativelimit : i64, destindex : i64, r#move : i8, status : *mut UErrorCode)); +windows_link::link!("icuuc.dll" "C" fn utext_current32(ut : *mut UText) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_equals(a : *const UText, b : *const UText) -> i8); +windows_link::link!("icuuc.dll" "C" fn utext_extract(ut : *mut UText, nativestart : i64, nativelimit : i64, dest : *mut u16, destcapacity : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_freeze(ut : *mut UText)); +windows_link::link!("icuuc.dll" "C" fn utext_getNativeIndex(ut : *const UText) -> i64); +windows_link::link!("icuuc.dll" "C" fn utext_getPreviousNativeIndex(ut : *mut UText) -> i64); +windows_link::link!("icuuc.dll" "C" fn utext_hasMetaData(ut : *const UText) -> i8); +windows_link::link!("icuuc.dll" "C" fn utext_isLengthExpensive(ut : *const UText) -> i8); +windows_link::link!("icuuc.dll" "C" fn utext_isWritable(ut : *const UText) -> i8); +windows_link::link!("icuuc.dll" "C" fn utext_moveIndex32(ut : *mut UText, delta : i32) -> i8); +windows_link::link!("icuuc.dll" "C" fn utext_nativeLength(ut : *mut UText) -> i64); +windows_link::link!("icuuc.dll" "C" fn utext_next32(ut : *mut UText) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_next32From(ut : *mut UText, nativeindex : i64) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_openUChars(ut : *mut UText, s : *const u16, length : i64, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuuc.dll" "C" fn utext_openUTF8(ut : *mut UText, s : windows_sys::core::PCSTR, length : i64, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuuc.dll" "C" fn utext_previous32(ut : *mut UText) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_previous32From(ut : *mut UText, nativeindex : i64) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_replace(ut : *mut UText, nativestart : i64, nativelimit : i64, replacementtext : *const u16, replacementlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuuc.dll" "C" fn utext_setNativeIndex(ut : *mut UText, nativeindex : i64)); +windows_link::link!("icuuc.dll" "C" fn utext_setup(ut : *mut UText, extraspace : i32, status : *mut UErrorCode) -> *mut UText); +windows_link::link!("icuuc.dll" "C" fn utf8_appendCharSafeBody(s : *mut u8, i : i32, length : i32, c : i32, piserror : *mut i8) -> i32); +windows_link::link!("icuuc.dll" "C" fn utf8_back1SafeBody(s : *const u8, start : i32, i : i32) -> i32); +windows_link::link!("icuuc.dll" "C" fn utf8_nextCharSafeBody(s : *const u8, pi : *mut i32, length : i32, c : i32, strict : i8) -> i32); +windows_link::link!("icuuc.dll" "C" fn utf8_prevCharSafeBody(s : *const u8, start : i32, pi : *mut i32, c : i32, strict : i8) -> i32); +windows_link::link!("icuin.dll" "C" fn utmscale_fromInt64(othertime : i64, timescale : UDateTimeScale, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn utmscale_getTimeScaleValue(timescale : UDateTimeScale, value : UTimeScaleValue, status : *mut UErrorCode) -> i64); +windows_link::link!("icuin.dll" "C" fn utmscale_toInt64(universaltime : i64, timescale : UDateTimeScale, status : *mut UErrorCode) -> i64); +windows_link::link!("icuuc.dll" "C" fn utrace_format(outbuf : windows_sys::core::PCSTR, capacity : i32, indent : i32, fmt : windows_sys::core::PCSTR, ...) -> i32); +windows_link::link!("icuuc.dll" "C" fn utrace_functionName(fnnumber : i32) -> windows_sys::core::PCSTR); +windows_link::link!("icuuc.dll" "C" fn utrace_getFunctions(context : *const *const core::ffi::c_void, e : *mut UTraceEntry, x : *mut UTraceExit, d : *mut UTraceData)); +windows_link::link!("icuuc.dll" "C" fn utrace_getLevel() -> i32); +windows_link::link!("icuuc.dll" "C" fn utrace_setFunctions(context : *const core::ffi::c_void, e : UTraceEntry, x : UTraceExit, d : UTraceData)); +windows_link::link!("icuuc.dll" "C" fn utrace_setLevel(tracelevel : i32)); +windows_link::link!("icuuc.dll" "C" fn utrace_vformat(outbuf : windows_sys::core::PCSTR, capacity : i32, indent : i32, fmt : windows_sys::core::PCSTR, args : *mut i8) -> i32); +windows_link::link!("icuin.dll" "C" fn utrans_clone(trans : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn utrans_close(trans : *mut *mut core::ffi::c_void)); +windows_link::link!("icuin.dll" "C" fn utrans_countAvailableIDs() -> i32); +windows_link::link!("icuin.dll" "C" fn utrans_getSourceSet(trans : *const *const core::ffi::c_void, ignorefilter : i8, fillin : *mut USet, status : *mut UErrorCode) -> *mut USet); +windows_link::link!("icuin.dll" "C" fn utrans_getUnicodeID(trans : *const *const core::ffi::c_void, resultlength : *mut i32) -> *mut u16); +windows_link::link!("icuin.dll" "C" fn utrans_openIDs(perrorcode : *mut UErrorCode) -> *mut UEnumeration); +windows_link::link!("icuin.dll" "C" fn utrans_openInverse(trans : *const *const core::ffi::c_void, status : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn utrans_openU(id : *const u16, idlength : i32, dir : UTransDirection, rules : *const u16, ruleslength : i32, parseerror : *mut UParseError, perrorcode : *mut UErrorCode) -> *mut *mut core::ffi::c_void); +windows_link::link!("icuin.dll" "C" fn utrans_register(adoptedtrans : *mut *mut core::ffi::c_void, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn utrans_setFilter(trans : *mut *mut core::ffi::c_void, filterpattern : *const u16, filterpatternlen : i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn utrans_toRules(trans : *const *const core::ffi::c_void, escapeunprintable : i8, result : *mut u16, resultlength : i32, status : *mut UErrorCode) -> i32); +windows_link::link!("icuin.dll" "C" fn utrans_trans(trans : *const *const core::ffi::c_void, rep : *mut *mut core::ffi::c_void, repfunc : *const UReplaceableCallbacks, start : i32, limit : *mut i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn utrans_transIncremental(trans : *const *const core::ffi::c_void, rep : *mut *mut core::ffi::c_void, repfunc : *const UReplaceableCallbacks, pos : *mut UTransPosition, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn utrans_transIncrementalUChars(trans : *const *const core::ffi::c_void, text : *mut u16, textlength : *mut i32, textcapacity : i32, pos : *mut UTransPosition, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn utrans_transUChars(trans : *const *const core::ffi::c_void, text : *mut u16, textlength : *mut i32, textcapacity : i32, start : i32, limit : *mut i32, status : *mut UErrorCode)); +windows_link::link!("icuin.dll" "C" fn utrans_unregisterID(id : *const u16, idlength : i32)); +pub const ALL_SERVICES: u32 = 0u32; +pub const ALL_SERVICE_TYPES: u32 = 0u32; +pub const C1_ALPHA: u32 = 256u32; +pub const C1_BLANK: u32 = 64u32; +pub const C1_CNTRL: u32 = 32u32; +pub const C1_DEFINED: u32 = 512u32; +pub const C1_DIGIT: u32 = 4u32; +pub const C1_LOWER: u32 = 2u32; +pub const C1_PUNCT: u32 = 16u32; +pub const C1_SPACE: u32 = 8u32; +pub const C1_UPPER: u32 = 1u32; +pub const C1_XDIGIT: u32 = 128u32; +pub const C2_ARABICNUMBER: u32 = 6u32; +pub const C2_BLOCKSEPARATOR: u32 = 8u32; +pub const C2_COMMONSEPARATOR: u32 = 7u32; +pub const C2_EUROPENUMBER: u32 = 3u32; +pub const C2_EUROPESEPARATOR: u32 = 4u32; +pub const C2_EUROPETERMINATOR: u32 = 5u32; +pub const C2_LEFTTORIGHT: u32 = 1u32; +pub const C2_NOTAPPLICABLE: u32 = 0u32; +pub const C2_OTHERNEUTRAL: u32 = 11u32; +pub const C2_RIGHTTOLEFT: u32 = 2u32; +pub const C2_SEGMENTSEPARATOR: u32 = 9u32; +pub const C2_WHITESPACE: u32 = 10u32; +pub const C3_ALPHA: u32 = 32768u32; +pub const C3_DIACRITIC: u32 = 2u32; +pub const C3_FULLWIDTH: u32 = 128u32; +pub const C3_HALFWIDTH: u32 = 64u32; +pub const C3_HIGHSURROGATE: u32 = 2048u32; +pub const C3_HIRAGANA: u32 = 32u32; +pub const C3_IDEOGRAPH: u32 = 256u32; +pub const C3_KASHIDA: u32 = 512u32; +pub const C3_KATAKANA: u32 = 16u32; +pub const C3_LEXICAL: u32 = 1024u32; +pub const C3_LOWSURROGATE: u32 = 4096u32; +pub const C3_NONSPACING: u32 = 1u32; +pub const C3_NOTAPPLICABLE: u32 = 0u32; +pub const C3_SYMBOL: u32 = 8u32; +pub const C3_VOWELMARK: u32 = 4u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct CALDATETIME { + pub CalId: u32, + pub Era: u32, + pub Year: u32, + pub Month: u32, + pub Day: u32, + pub DayOfWeek: u32, + pub Hour: u32, + pub Minute: u32, + pub Second: u32, + pub Tick: u32, +} +pub type CALDATETIME_DATEUNIT = i32; +pub type CALINFO_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type CALINFO_ENUMPROCEXA = Option windows_sys::core::BOOL>; +pub type CALINFO_ENUMPROCEXEX = Option windows_sys::core::BOOL>; +pub type CALINFO_ENUMPROCEXW = Option windows_sys::core::BOOL>; +pub type CALINFO_ENUMPROCW = Option windows_sys::core::BOOL>; +pub const CAL_GREGORIAN: u32 = 1u32; +pub const CAL_GREGORIAN_ARABIC: u32 = 10u32; +pub const CAL_GREGORIAN_ME_FRENCH: u32 = 9u32; +pub const CAL_GREGORIAN_US: u32 = 2u32; +pub const CAL_GREGORIAN_XLIT_ENGLISH: u32 = 11u32; +pub const CAL_GREGORIAN_XLIT_FRENCH: u32 = 12u32; +pub const CAL_HEBREW: u32 = 8u32; +pub const CAL_HIJRI: u32 = 6u32; +pub const CAL_ICALINTVALUE: u32 = 1u32; +pub const CAL_ITWODIGITYEARMAX: u32 = 48u32; +pub const CAL_IYEAROFFSETRANGE: u32 = 3u32; +pub const CAL_JAPAN: u32 = 3u32; +pub const CAL_KOREA: u32 = 5u32; +pub const CAL_NOUSEROVERRIDE: u32 = 2147483648u32; +pub const CAL_PERSIAN: u32 = 22u32; +pub const CAL_RETURN_GENITIVE_NAMES: u32 = 268435456u32; +pub const CAL_RETURN_NUMBER: u32 = 536870912u32; +pub const CAL_SABBREVDAYNAME1: u32 = 14u32; +pub const CAL_SABBREVDAYNAME2: u32 = 15u32; +pub const CAL_SABBREVDAYNAME3: u32 = 16u32; +pub const CAL_SABBREVDAYNAME4: u32 = 17u32; +pub const CAL_SABBREVDAYNAME5: u32 = 18u32; +pub const CAL_SABBREVDAYNAME6: u32 = 19u32; +pub const CAL_SABBREVDAYNAME7: u32 = 20u32; +pub const CAL_SABBREVERASTRING: u32 = 57u32; +pub const CAL_SABBREVMONTHNAME1: u32 = 34u32; +pub const CAL_SABBREVMONTHNAME10: u32 = 43u32; +pub const CAL_SABBREVMONTHNAME11: u32 = 44u32; +pub const CAL_SABBREVMONTHNAME12: u32 = 45u32; +pub const CAL_SABBREVMONTHNAME13: u32 = 46u32; +pub const CAL_SABBREVMONTHNAME2: u32 = 35u32; +pub const CAL_SABBREVMONTHNAME3: u32 = 36u32; +pub const CAL_SABBREVMONTHNAME4: u32 = 37u32; +pub const CAL_SABBREVMONTHNAME5: u32 = 38u32; +pub const CAL_SABBREVMONTHNAME6: u32 = 39u32; +pub const CAL_SABBREVMONTHNAME7: u32 = 40u32; +pub const CAL_SABBREVMONTHNAME8: u32 = 41u32; +pub const CAL_SABBREVMONTHNAME9: u32 = 42u32; +pub const CAL_SCALNAME: u32 = 2u32; +pub const CAL_SDAYNAME1: u32 = 7u32; +pub const CAL_SDAYNAME2: u32 = 8u32; +pub const CAL_SDAYNAME3: u32 = 9u32; +pub const CAL_SDAYNAME4: u32 = 10u32; +pub const CAL_SDAYNAME5: u32 = 11u32; +pub const CAL_SDAYNAME6: u32 = 12u32; +pub const CAL_SDAYNAME7: u32 = 13u32; +pub const CAL_SENGLISHABBREVERANAME: u32 = 60u32; +pub const CAL_SENGLISHERANAME: u32 = 59u32; +pub const CAL_SERASTRING: u32 = 4u32; +pub const CAL_SJAPANESEERAFIRSTYEAR: u32 = 61u32; +pub const CAL_SLONGDATE: u32 = 6u32; +pub const CAL_SMONTHDAY: u32 = 56u32; +pub const CAL_SMONTHNAME1: u32 = 21u32; +pub const CAL_SMONTHNAME10: u32 = 30u32; +pub const CAL_SMONTHNAME11: u32 = 31u32; +pub const CAL_SMONTHNAME12: u32 = 32u32; +pub const CAL_SMONTHNAME13: u32 = 33u32; +pub const CAL_SMONTHNAME2: u32 = 22u32; +pub const CAL_SMONTHNAME3: u32 = 23u32; +pub const CAL_SMONTHNAME4: u32 = 24u32; +pub const CAL_SMONTHNAME5: u32 = 25u32; +pub const CAL_SMONTHNAME6: u32 = 26u32; +pub const CAL_SMONTHNAME7: u32 = 27u32; +pub const CAL_SMONTHNAME8: u32 = 28u32; +pub const CAL_SMONTHNAME9: u32 = 29u32; +pub const CAL_SRELATIVELONGDATE: u32 = 58u32; +pub const CAL_SSHORTDATE: u32 = 5u32; +pub const CAL_SSHORTESTDAYNAME1: u32 = 49u32; +pub const CAL_SSHORTESTDAYNAME2: u32 = 50u32; +pub const CAL_SSHORTESTDAYNAME3: u32 = 51u32; +pub const CAL_SSHORTESTDAYNAME4: u32 = 52u32; +pub const CAL_SSHORTESTDAYNAME5: u32 = 53u32; +pub const CAL_SSHORTESTDAYNAME6: u32 = 54u32; +pub const CAL_SSHORTESTDAYNAME7: u32 = 55u32; +pub const CAL_SYEARMONTH: u32 = 47u32; +pub const CAL_TAIWAN: u32 = 4u32; +pub const CAL_THAI: u32 = 7u32; +pub const CAL_UMALQURA: u32 = 23u32; +pub const CAL_USE_CP_ACP: u32 = 1073741824u32; +pub const CANITER_SKIP_ZEROES: u32 = 1u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct CHARSETINFO { + pub ciCharset: u32, + pub ciACP: u32, + pub fs: FONTSIGNATURE, +} +pub const CMLangConvertCharset: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd66d6f99_cdaa_11d0_b822_00c04fc9b31f); +pub const CMLangString: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc04d65cf_b70d_11d0_b188_00aa0038c969); +pub const CMultiLanguage: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x275c23e2_3747_11d0_9fea_00aa003f8646); +pub type CODEPAGE_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type CODEPAGE_ENUMPROCW = Option windows_sys::core::BOOL>; +pub type COMPARESTRING_RESULT = i32; +pub const COMPARE_STRING: SYSNLS_FUNCTION = 1i32; +pub type COMPARE_STRING_FLAGS = u32; +pub type CORRECTIVE_ACTION = i32; +pub const CORRECTIVE_ACTION_DELETE: CORRECTIVE_ACTION = 3i32; +pub const CORRECTIVE_ACTION_GET_SUGGESTIONS: CORRECTIVE_ACTION = 1i32; +pub const CORRECTIVE_ACTION_NONE: CORRECTIVE_ACTION = 0i32; +pub const CORRECTIVE_ACTION_REPLACE: CORRECTIVE_ACTION = 2i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CPINFO { + pub MaxCharSize: u32, + pub DefaultChar: [u8; 2], + pub LeadByte: [u8; 12], +} +impl Default for CPINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CPINFOEXA { + pub MaxCharSize: u32, + pub DefaultChar: [u8; 2], + pub LeadByte: [u8; 12], + pub UnicodeDefaultChar: u16, + pub CodePage: u32, + pub CodePageName: [i8; 260], +} +impl Default for CPINFOEXA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CPINFOEXW { + pub MaxCharSize: u32, + pub DefaultChar: [u8; 2], + pub LeadByte: [u8; 12], + pub UnicodeDefaultChar: u16, + pub CodePage: u32, + pub CodePageName: [u16; 260], +} +impl Default for CPINFOEXW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const CPIOD_FORCE_PROMPT: i32 = -2147483648i32; +pub const CPIOD_PEEK: i32 = 1073741824i32; +pub const CP_ACP: u32 = 0u32; +pub const CP_INSTALLED: ENUM_SYSTEM_CODE_PAGES_FLAGS = 1u32; +pub const CP_MACCP: u32 = 2u32; +pub const CP_OEMCP: u32 = 1u32; +pub const CP_SUPPORTED: ENUM_SYSTEM_CODE_PAGES_FLAGS = 2u32; +pub const CP_SYMBOL: u32 = 42u32; +pub const CP_THREAD_ACP: u32 = 3u32; +pub const CP_UTF7: u32 = 65000u32; +pub const CP_UTF8: u32 = 65001u32; +pub const CSTR_EQUAL: COMPARESTRING_RESULT = 2i32; +pub const CSTR_GREATER_THAN: COMPARESTRING_RESULT = 3i32; +pub const CSTR_LESS_THAN: COMPARESTRING_RESULT = 1i32; +pub const CTRY_ALBANIA: u32 = 355u32; +pub const CTRY_ALGERIA: u32 = 213u32; +pub const CTRY_ARGENTINA: u32 = 54u32; +pub const CTRY_ARMENIA: u32 = 374u32; +pub const CTRY_AUSTRALIA: u32 = 61u32; +pub const CTRY_AUSTRIA: u32 = 43u32; +pub const CTRY_AZERBAIJAN: u32 = 994u32; +pub const CTRY_BAHRAIN: u32 = 973u32; +pub const CTRY_BELARUS: u32 = 375u32; +pub const CTRY_BELGIUM: u32 = 32u32; +pub const CTRY_BELIZE: u32 = 501u32; +pub const CTRY_BOLIVIA: u32 = 591u32; +pub const CTRY_BRAZIL: u32 = 55u32; +pub const CTRY_BRUNEI_DARUSSALAM: u32 = 673u32; +pub const CTRY_BULGARIA: u32 = 359u32; +pub const CTRY_CANADA: u32 = 2u32; +pub const CTRY_CARIBBEAN: u32 = 1u32; +pub const CTRY_CHILE: u32 = 56u32; +pub const CTRY_COLOMBIA: u32 = 57u32; +pub const CTRY_COSTA_RICA: u32 = 506u32; +pub const CTRY_CROATIA: u32 = 385u32; +pub const CTRY_CZECH: u32 = 420u32; +pub const CTRY_DEFAULT: u32 = 0u32; +pub const CTRY_DENMARK: u32 = 45u32; +pub const CTRY_DOMINICAN_REPUBLIC: u32 = 1u32; +pub const CTRY_ECUADOR: u32 = 593u32; +pub const CTRY_EGYPT: u32 = 20u32; +pub const CTRY_EL_SALVADOR: u32 = 503u32; +pub const CTRY_ESTONIA: u32 = 372u32; +pub const CTRY_FAEROE_ISLANDS: u32 = 298u32; +pub const CTRY_FINLAND: u32 = 358u32; +pub const CTRY_FRANCE: u32 = 33u32; +pub const CTRY_GEORGIA: u32 = 995u32; +pub const CTRY_GERMANY: u32 = 49u32; +pub const CTRY_GREECE: u32 = 30u32; +pub const CTRY_GUATEMALA: u32 = 502u32; +pub const CTRY_HONDURAS: u32 = 504u32; +pub const CTRY_HONG_KONG: u32 = 852u32; +pub const CTRY_HUNGARY: u32 = 36u32; +pub const CTRY_ICELAND: u32 = 354u32; +pub const CTRY_INDIA: u32 = 91u32; +pub const CTRY_INDONESIA: u32 = 62u32; +pub const CTRY_IRAN: u32 = 981u32; +pub const CTRY_IRAQ: u32 = 964u32; +pub const CTRY_IRELAND: u32 = 353u32; +pub const CTRY_ISRAEL: u32 = 972u32; +pub const CTRY_ITALY: u32 = 39u32; +pub const CTRY_JAMAICA: u32 = 1u32; +pub const CTRY_JAPAN: u32 = 81u32; +pub const CTRY_JORDAN: u32 = 962u32; +pub const CTRY_KAZAKSTAN: u32 = 7u32; +pub const CTRY_KENYA: u32 = 254u32; +pub const CTRY_KUWAIT: u32 = 965u32; +pub const CTRY_KYRGYZSTAN: u32 = 996u32; +pub const CTRY_LATVIA: u32 = 371u32; +pub const CTRY_LEBANON: u32 = 961u32; +pub const CTRY_LIBYA: u32 = 218u32; +pub const CTRY_LIECHTENSTEIN: u32 = 41u32; +pub const CTRY_LITHUANIA: u32 = 370u32; +pub const CTRY_LUXEMBOURG: u32 = 352u32; +pub const CTRY_MACAU: u32 = 853u32; +pub const CTRY_MACEDONIA: u32 = 389u32; +pub const CTRY_MALAYSIA: u32 = 60u32; +pub const CTRY_MALDIVES: u32 = 960u32; +pub const CTRY_MEXICO: u32 = 52u32; +pub const CTRY_MONACO: u32 = 33u32; +pub const CTRY_MONGOLIA: u32 = 976u32; +pub const CTRY_MOROCCO: u32 = 212u32; +pub const CTRY_NETHERLANDS: u32 = 31u32; +pub const CTRY_NEW_ZEALAND: u32 = 64u32; +pub const CTRY_NICARAGUA: u32 = 505u32; +pub const CTRY_NORWAY: u32 = 47u32; +pub const CTRY_OMAN: u32 = 968u32; +pub const CTRY_PAKISTAN: u32 = 92u32; +pub const CTRY_PANAMA: u32 = 507u32; +pub const CTRY_PARAGUAY: u32 = 595u32; +pub const CTRY_PERU: u32 = 51u32; +pub const CTRY_PHILIPPINES: u32 = 63u32; +pub const CTRY_POLAND: u32 = 48u32; +pub const CTRY_PORTUGAL: u32 = 351u32; +pub const CTRY_PRCHINA: u32 = 86u32; +pub const CTRY_PUERTO_RICO: u32 = 1u32; +pub const CTRY_QATAR: u32 = 974u32; +pub const CTRY_ROMANIA: u32 = 40u32; +pub const CTRY_RUSSIA: u32 = 7u32; +pub const CTRY_SAUDI_ARABIA: u32 = 966u32; +pub const CTRY_SERBIA: u32 = 381u32; +pub const CTRY_SINGAPORE: u32 = 65u32; +pub const CTRY_SLOVAK: u32 = 421u32; +pub const CTRY_SLOVENIA: u32 = 386u32; +pub const CTRY_SOUTH_AFRICA: u32 = 27u32; +pub const CTRY_SOUTH_KOREA: u32 = 82u32; +pub const CTRY_SPAIN: u32 = 34u32; +pub const CTRY_SWEDEN: u32 = 46u32; +pub const CTRY_SWITZERLAND: u32 = 41u32; +pub const CTRY_SYRIA: u32 = 963u32; +pub const CTRY_TAIWAN: u32 = 886u32; +pub const CTRY_TATARSTAN: u32 = 7u32; +pub const CTRY_THAILAND: u32 = 66u32; +pub const CTRY_TRINIDAD_Y_TOBAGO: u32 = 1u32; +pub const CTRY_TUNISIA: u32 = 216u32; +pub const CTRY_TURKEY: u32 = 90u32; +pub const CTRY_UAE: u32 = 971u32; +pub const CTRY_UKRAINE: u32 = 380u32; +pub const CTRY_UNITED_KINGDOM: u32 = 44u32; +pub const CTRY_UNITED_STATES: u32 = 1u32; +pub const CTRY_URUGUAY: u32 = 598u32; +pub const CTRY_UZBEKISTAN: u32 = 7u32; +pub const CTRY_VENEZUELA: u32 = 58u32; +pub const CTRY_VIET_NAM: u32 = 84u32; +pub const CTRY_YEMEN: u32 = 967u32; +pub const CTRY_ZIMBABWE: u32 = 263u32; +pub const CT_CTYPE1: u32 = 1u32; +pub const CT_CTYPE2: u32 = 2u32; +pub const CT_CTYPE3: u32 = 4u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CURRENCYFMTA { + pub NumDigits: u32, + pub LeadingZero: u32, + pub Grouping: u32, + pub lpDecimalSep: windows_sys::core::PSTR, + pub lpThousandSep: windows_sys::core::PSTR, + pub NegativeOrder: u32, + pub PositiveOrder: u32, + pub lpCurrencySymbol: windows_sys::core::PSTR, +} +impl Default for CURRENCYFMTA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CURRENCYFMTW { + pub NumDigits: u32, + pub LeadingZero: u32, + pub Grouping: u32, + pub lpDecimalSep: windows_sys::core::PWSTR, + pub lpThousandSep: windows_sys::core::PWSTR, + pub NegativeOrder: u32, + pub PositiveOrder: u32, + pub lpCurrencySymbol: windows_sys::core::PWSTR, +} +impl Default for CURRENCYFMTW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type DATEFMT_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type DATEFMT_ENUMPROCEXA = Option windows_sys::core::BOOL>; +pub type DATEFMT_ENUMPROCEXEX = Option windows_sys::core::BOOL>; +pub type DATEFMT_ENUMPROCEXW = Option windows_sys::core::BOOL>; +pub type DATEFMT_ENUMPROCW = Option windows_sys::core::BOOL>; +pub const DATE_AUTOLAYOUT: ENUM_DATE_FORMATS_FLAGS = 64u32; +pub const DATE_LONGDATE: ENUM_DATE_FORMATS_FLAGS = 2u32; +pub const DATE_LTRREADING: ENUM_DATE_FORMATS_FLAGS = 16u32; +pub const DATE_MONTHDAY: ENUM_DATE_FORMATS_FLAGS = 128u32; +pub const DATE_RTLREADING: ENUM_DATE_FORMATS_FLAGS = 32u32; +pub const DATE_SHORTDATE: ENUM_DATE_FORMATS_FLAGS = 1u32; +pub const DATE_USE_ALT_CALENDAR: ENUM_DATE_FORMATS_FLAGS = 4u32; +pub const DATE_YEARMONTH: ENUM_DATE_FORMATS_FLAGS = 8u32; +pub const DayUnit: CALDATETIME_DATEUNIT = 4i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct DetectEncodingInfo { + pub nLangID: u32, + pub nCodePage: u32, + pub nDocPercent: i32, + pub nConfidence: i32, +} +pub const ELS_GUID_LANGUAGE_DETECTION: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcf7e00b1_909b_4d95_a8f4_611f7c377702); +pub const ELS_GUID_SCRIPT_DETECTION: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2d64b439_6caf_4f6b_b688_e5d0f4faa7d7); +pub const ELS_GUID_TRANSLITERATION_BENGALI_TO_LATIN: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf4dfd825_91a4_489f_855e_9ad9bee55727); +pub const ELS_GUID_TRANSLITERATION_CYRILLIC_TO_LATIN: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3dd12a98_5afd_4903_a13f_e17e6c0bfe01); +pub const ELS_GUID_TRANSLITERATION_DEVANAGARI_TO_LATIN: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc4a4dcfe_2661_4d02_9835_f48187109803); +pub const ELS_GUID_TRANSLITERATION_HANGUL_DECOMPOSITION: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4ba2a721_e43d_41b7_b330_536ae1e48863); +pub const ELS_GUID_TRANSLITERATION_HANS_TO_HANT: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3caccdc8_5590_42dc_9a7b_b5a6b5b3b63b); +pub const ELS_GUID_TRANSLITERATION_HANT_TO_HANS: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa3a8333b_f4fc_42f6_a0c4_0462fe7317cb); +pub const ELS_GUID_TRANSLITERATION_MALAYALAM_TO_LATIN: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd8b983b1_f8bf_4a2b_bcd5_5b5ea20613e1); +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct ENUMTEXTMETRICA { + pub etmNewTextMetricEx: NEWTEXTMETRICEXA, + pub etmAxesList: super::Graphics::Gdi::AXESLISTA, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct ENUMTEXTMETRICW { + pub etmNewTextMetricEx: NEWTEXTMETRICEXW, + pub etmAxesList: super::Graphics::Gdi::AXESLISTW, +} +pub const ENUM_ALL_CALENDARS: u32 = 4294967295u32; +pub type ENUM_DATE_FORMATS_FLAGS = u32; +pub type ENUM_SYSTEM_CODE_PAGES_FLAGS = u32; +pub type ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS = u32; +pub const EraUnit: CALDATETIME_DATEUNIT = 0i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct FILEMUIINFO { + pub dwSize: u32, + pub dwVersion: u32, + pub dwFileType: u32, + pub pChecksum: [u8; 16], + pub pServiceChecksum: [u8; 16], + pub dwLanguageNameOffset: u32, + pub dwTypeIDMainSize: u32, + pub dwTypeIDMainOffset: u32, + pub dwTypeNameMainOffset: u32, + pub dwTypeIDMUISize: u32, + pub dwTypeIDMUIOffset: u32, + pub dwTypeNameMUIOffset: u32, + pub abBuffer: [u8; 8], +} +impl Default for FILEMUIINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const FIND_ENDSWITH: u32 = 2097152u32; +pub const FIND_FROMEND: u32 = 8388608u32; +pub const FIND_FROMSTART: u32 = 4194304u32; +pub const FIND_STARTSWITH: u32 = 1048576u32; +pub type FOLD_STRING_MAP_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct FONTSIGNATURE { + pub fsUsb: [u32; 4], + pub fsCsb: [u32; 2], +} +impl Default for FONTSIGNATURE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const GEOCLASS_ALL: SYSGEOCLASS = 0i32; +pub const GEOCLASS_NATION: SYSGEOCLASS = 16i32; +pub const GEOCLASS_REGION: SYSGEOCLASS = 14i32; +pub const GEOID_NOT_AVAILABLE: i32 = -1i32; +pub const GEO_CURRENCYCODE: SYSGEOTYPE = 15i32; +pub const GEO_CURRENCYSYMBOL: SYSGEOTYPE = 16i32; +pub const GEO_DIALINGCODE: SYSGEOTYPE = 14i32; +pub type GEO_ENUMNAMEPROC = Option windows_sys::core::BOOL>; +pub type GEO_ENUMPROC = Option windows_sys::core::BOOL>; +pub const GEO_FRIENDLYNAME: SYSGEOTYPE = 8i32; +pub const GEO_ID: SYSGEOTYPE = 18i32; +pub const GEO_ISO2: SYSGEOTYPE = 4i32; +pub const GEO_ISO3: SYSGEOTYPE = 5i32; +pub const GEO_ISO_UN_NUMBER: SYSGEOTYPE = 12i32; +pub const GEO_LATITUDE: SYSGEOTYPE = 2i32; +pub const GEO_LCID: SYSGEOTYPE = 7i32; +pub const GEO_LONGITUDE: SYSGEOTYPE = 3i32; +pub const GEO_NAME: SYSGEOTYPE = 17i32; +pub const GEO_NATION: SYSGEOTYPE = 1i32; +pub const GEO_OFFICIALLANGUAGES: SYSGEOTYPE = 11i32; +pub const GEO_OFFICIALNAME: SYSGEOTYPE = 9i32; +pub const GEO_PARENT: SYSGEOTYPE = 13i32; +pub const GEO_RFC1766: SYSGEOTYPE = 6i32; +pub const GEO_TIMEZONES: SYSGEOTYPE = 10i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct GOFFSET { + pub du: i32, + pub dv: i32, +} +pub const GSS_ALLOW_INHERITED_COMMON: u32 = 1u32; +pub const HIGHLEVEL_SERVICE_TYPES: u32 = 1u32; +pub const HIGH_SURROGATE_END: u32 = 56319u32; +pub const HIGH_SURROGATE_START: u32 = 55296u32; +pub type HSAVEDUILANGUAGES = *mut core::ffi::c_void; +pub const HourUnit: CALDATETIME_DATEUNIT = 5i32; +pub const IDN_ALLOW_UNASSIGNED: u32 = 1u32; +pub const IDN_EMAIL_ADDRESS: u32 = 4u32; +pub const IDN_RAW_PUNYCODE: u32 = 8u32; +pub const IDN_USE_STD3_ASCII_RULES: u32 = 2u32; +pub const IS_TEXT_UNICODE_ASCII16: IS_TEXT_UNICODE_RESULT = 1u32; +pub const IS_TEXT_UNICODE_CONTROLS: IS_TEXT_UNICODE_RESULT = 4u32; +pub const IS_TEXT_UNICODE_ILLEGAL_CHARS: IS_TEXT_UNICODE_RESULT = 256u32; +pub const IS_TEXT_UNICODE_NOT_ASCII_MASK: IS_TEXT_UNICODE_RESULT = 61440u32; +pub const IS_TEXT_UNICODE_NOT_UNICODE_MASK: IS_TEXT_UNICODE_RESULT = 3840u32; +pub const IS_TEXT_UNICODE_NULL_BYTES: IS_TEXT_UNICODE_RESULT = 4096u32; +pub const IS_TEXT_UNICODE_ODD_LENGTH: IS_TEXT_UNICODE_RESULT = 512u32; +pub type IS_TEXT_UNICODE_RESULT = u32; +pub const IS_TEXT_UNICODE_REVERSE_ASCII16: IS_TEXT_UNICODE_RESULT = 16u32; +pub const IS_TEXT_UNICODE_REVERSE_CONTROLS: IS_TEXT_UNICODE_RESULT = 64u32; +pub const IS_TEXT_UNICODE_REVERSE_MASK: IS_TEXT_UNICODE_RESULT = 240u32; +pub const IS_TEXT_UNICODE_REVERSE_SIGNATURE: IS_TEXT_UNICODE_RESULT = 128u32; +pub const IS_TEXT_UNICODE_REVERSE_STATISTICS: IS_TEXT_UNICODE_RESULT = 32u32; +pub const IS_TEXT_UNICODE_SIGNATURE: IS_TEXT_UNICODE_RESULT = 8u32; +pub const IS_TEXT_UNICODE_STATISTICS: IS_TEXT_UNICODE_RESULT = 2u32; +pub const IS_TEXT_UNICODE_UNICODE_MASK: IS_TEXT_UNICODE_RESULT = 15u32; +pub type IS_VALID_LOCALE_FLAGS = u32; +pub type LANGGROUPLOCALE_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type LANGGROUPLOCALE_ENUMPROCW = Option windows_sys::core::BOOL>; +pub type LANGUAGEGROUP_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type LANGUAGEGROUP_ENUMPROCW = Option windows_sys::core::BOOL>; +pub const LANG_SYSTEM_DEFAULT: i32 = 2048i32; +pub const LANG_USER_DEFAULT: i32 = 1024i32; +pub const LCID_ALTERNATE_SORTS: u32 = 4u32; +pub const LCID_INSTALLED: IS_VALID_LOCALE_FLAGS = 1u32; +pub const LCID_SUPPORTED: IS_VALID_LOCALE_FLAGS = 2u32; +pub const LCMAP_BYTEREV: u32 = 2048u32; +pub const LCMAP_FULLWIDTH: u32 = 8388608u32; +pub const LCMAP_HALFWIDTH: u32 = 4194304u32; +pub const LCMAP_HASH: u32 = 262144u32; +pub const LCMAP_HIRAGANA: u32 = 1048576u32; +pub const LCMAP_KATAKANA: u32 = 2097152u32; +pub const LCMAP_LINGUISTIC_CASING: u32 = 16777216u32; +pub const LCMAP_LOWERCASE: u32 = 256u32; +pub const LCMAP_SIMPLIFIED_CHINESE: u32 = 33554432u32; +pub const LCMAP_SORTHANDLE: u32 = 536870912u32; +pub const LCMAP_SORTKEY: u32 = 1024u32; +pub const LCMAP_TITLECASE: u32 = 768u32; +pub const LCMAP_TRADITIONAL_CHINESE: u32 = 67108864u32; +pub const LCMAP_UPPERCASE: u32 = 512u32; +pub const LGRPID_ARABIC: u32 = 13u32; +pub const LGRPID_ARMENIAN: u32 = 17u32; +pub const LGRPID_BALTIC: u32 = 3u32; +pub const LGRPID_CENTRAL_EUROPE: u32 = 2u32; +pub const LGRPID_CYRILLIC: u32 = 5u32; +pub const LGRPID_GEORGIAN: u32 = 16u32; +pub const LGRPID_GREEK: u32 = 4u32; +pub const LGRPID_HEBREW: u32 = 12u32; +pub const LGRPID_INDIC: u32 = 15u32; +pub const LGRPID_INSTALLED: ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS = 1u32; +pub const LGRPID_JAPANESE: u32 = 7u32; +pub const LGRPID_KOREAN: u32 = 8u32; +pub const LGRPID_SIMPLIFIED_CHINESE: u32 = 10u32; +pub const LGRPID_SUPPORTED: ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS = 2u32; +pub const LGRPID_THAI: u32 = 11u32; +pub const LGRPID_TRADITIONAL_CHINESE: u32 = 9u32; +pub const LGRPID_TURKIC: u32 = 6u32; +pub const LGRPID_TURKISH: u32 = 6u32; +pub const LGRPID_VIETNAMESE: u32 = 14u32; +pub const LGRPID_WESTERN_EUROPE: u32 = 1u32; +pub const LINGUISTIC_IGNORECASE: COMPARE_STRING_FLAGS = 16u32; +pub const LINGUISTIC_IGNOREDIACRITIC: COMPARE_STRING_FLAGS = 32u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LOCALESIGNATURE { + pub lsUsb: [u32; 4], + pub lsCsbDefault: [u32; 2], + pub lsCsbSupported: [u32; 2], +} +impl Default for LOCALESIGNATURE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const LOCALE_ALL: u32 = 0u32; +pub const LOCALE_ALLOW_NEUTRAL_NAMES: u32 = 134217728u32; +pub const LOCALE_ALTERNATE_SORTS: u32 = 4u32; +pub type LOCALE_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type LOCALE_ENUMPROCEX = Option windows_sys::core::BOOL>; +pub type LOCALE_ENUMPROCW = Option windows_sys::core::BOOL>; +pub const LOCALE_FONTSIGNATURE: u32 = 88u32; +pub const LOCALE_ICALENDARTYPE: u32 = 4105u32; +pub const LOCALE_ICENTURY: u32 = 36u32; +pub const LOCALE_ICONSTRUCTEDLOCALE: u32 = 125u32; +pub const LOCALE_ICOUNTRY: u32 = 5u32; +pub const LOCALE_ICURRDIGITS: u32 = 25u32; +pub const LOCALE_ICURRENCY: u32 = 27u32; +pub const LOCALE_IDATE: u32 = 33u32; +pub const LOCALE_IDAYLZERO: u32 = 38u32; +pub const LOCALE_IDEFAULTANSICODEPAGE: u32 = 4100u32; +pub const LOCALE_IDEFAULTCODEPAGE: u32 = 11u32; +pub const LOCALE_IDEFAULTCOUNTRY: u32 = 10u32; +pub const LOCALE_IDEFAULTEBCDICCODEPAGE: u32 = 4114u32; +pub const LOCALE_IDEFAULTLANGUAGE: u32 = 9u32; +pub const LOCALE_IDEFAULTMACCODEPAGE: u32 = 4113u32; +pub const LOCALE_IDIALINGCODE: u32 = 5u32; +pub const LOCALE_IDIGITS: u32 = 17u32; +pub const LOCALE_IDIGITSUBSTITUTION: u32 = 4116u32; +pub const LOCALE_IFIRSTDAYOFWEEK: u32 = 4108u32; +pub const LOCALE_IFIRSTWEEKOFYEAR: u32 = 4109u32; +pub const LOCALE_IGEOID: u32 = 91u32; +pub const LOCALE_IINTLCURRDIGITS: u32 = 26u32; +pub const LOCALE_ILANGUAGE: u32 = 1u32; +pub const LOCALE_ILDATE: u32 = 34u32; +pub const LOCALE_ILZERO: u32 = 18u32; +pub const LOCALE_IMEASURE: u32 = 13u32; +pub const LOCALE_IMONLZERO: u32 = 39u32; +pub const LOCALE_INEGATIVEPERCENT: u32 = 116u32; +pub const LOCALE_INEGCURR: u32 = 28u32; +pub const LOCALE_INEGNUMBER: u32 = 4112u32; +pub const LOCALE_INEGSEPBYSPACE: u32 = 87u32; +pub const LOCALE_INEGSIGNPOSN: u32 = 83u32; +pub const LOCALE_INEGSYMPRECEDES: u32 = 86u32; +pub const LOCALE_INEUTRAL: u32 = 113u32; +pub const LOCALE_IOPTIONALCALENDAR: u32 = 4107u32; +pub const LOCALE_IPAPERSIZE: u32 = 4106u32; +pub const LOCALE_IPOSITIVEPERCENT: u32 = 117u32; +pub const LOCALE_IPOSSEPBYSPACE: u32 = 85u32; +pub const LOCALE_IPOSSIGNPOSN: u32 = 82u32; +pub const LOCALE_IPOSSYMPRECEDES: u32 = 84u32; +pub const LOCALE_IREADINGLAYOUT: u32 = 112u32; +pub const LOCALE_ITIME: u32 = 35u32; +pub const LOCALE_ITIMEMARKPOSN: u32 = 4101u32; +pub const LOCALE_ITLZERO: u32 = 37u32; +pub const LOCALE_IUSEUTF8LEGACYACP: u32 = 1638u32; +pub const LOCALE_IUSEUTF8LEGACYOEMCP: u32 = 2457u32; +pub const LOCALE_NAME_INVARIANT: windows_sys::core::PCWSTR = windows_sys::core::w!(""); +pub const LOCALE_NAME_SYSTEM_DEFAULT: windows_sys::core::PCWSTR = windows_sys::core::w!("!x-sys-default-locale"); +pub const LOCALE_NEUTRALDATA: u32 = 16u32; +pub const LOCALE_NOUSEROVERRIDE: u32 = 2147483648u32; +pub const LOCALE_REPLACEMENT: u32 = 8u32; +pub const LOCALE_RETURN_GENITIVE_NAMES: u32 = 268435456u32; +pub const LOCALE_RETURN_NUMBER: u32 = 536870912u32; +pub const LOCALE_S1159: u32 = 40u32; +pub const LOCALE_S2359: u32 = 41u32; +pub const LOCALE_SABBREVCTRYNAME: u32 = 7u32; +pub const LOCALE_SABBREVDAYNAME1: u32 = 49u32; +pub const LOCALE_SABBREVDAYNAME2: u32 = 50u32; +pub const LOCALE_SABBREVDAYNAME3: u32 = 51u32; +pub const LOCALE_SABBREVDAYNAME4: u32 = 52u32; +pub const LOCALE_SABBREVDAYNAME5: u32 = 53u32; +pub const LOCALE_SABBREVDAYNAME6: u32 = 54u32; +pub const LOCALE_SABBREVDAYNAME7: u32 = 55u32; +pub const LOCALE_SABBREVLANGNAME: u32 = 3u32; +pub const LOCALE_SABBREVMONTHNAME1: u32 = 68u32; +pub const LOCALE_SABBREVMONTHNAME10: u32 = 77u32; +pub const LOCALE_SABBREVMONTHNAME11: u32 = 78u32; +pub const LOCALE_SABBREVMONTHNAME12: u32 = 79u32; +pub const LOCALE_SABBREVMONTHNAME13: u32 = 4111u32; +pub const LOCALE_SABBREVMONTHNAME2: u32 = 69u32; +pub const LOCALE_SABBREVMONTHNAME3: u32 = 70u32; +pub const LOCALE_SABBREVMONTHNAME4: u32 = 71u32; +pub const LOCALE_SABBREVMONTHNAME5: u32 = 72u32; +pub const LOCALE_SABBREVMONTHNAME6: u32 = 73u32; +pub const LOCALE_SABBREVMONTHNAME7: u32 = 74u32; +pub const LOCALE_SABBREVMONTHNAME8: u32 = 75u32; +pub const LOCALE_SABBREVMONTHNAME9: u32 = 76u32; +pub const LOCALE_SAM: u32 = 40u32; +pub const LOCALE_SCONSOLEFALLBACKNAME: u32 = 110u32; +pub const LOCALE_SCOUNTRY: u32 = 6u32; +pub const LOCALE_SCURRENCY: u32 = 20u32; +pub const LOCALE_SDATE: u32 = 29u32; +pub const LOCALE_SDAYNAME1: u32 = 42u32; +pub const LOCALE_SDAYNAME2: u32 = 43u32; +pub const LOCALE_SDAYNAME3: u32 = 44u32; +pub const LOCALE_SDAYNAME4: u32 = 45u32; +pub const LOCALE_SDAYNAME5: u32 = 46u32; +pub const LOCALE_SDAYNAME6: u32 = 47u32; +pub const LOCALE_SDAYNAME7: u32 = 48u32; +pub const LOCALE_SDECIMAL: u32 = 14u32; +pub const LOCALE_SDURATION: u32 = 93u32; +pub const LOCALE_SENGCOUNTRY: u32 = 4098u32; +pub const LOCALE_SENGCURRNAME: u32 = 4103u32; +pub const LOCALE_SENGLANGUAGE: u32 = 4097u32; +pub const LOCALE_SENGLISHCOUNTRYNAME: u32 = 4098u32; +pub const LOCALE_SENGLISHDISPLAYNAME: u32 = 114u32; +pub const LOCALE_SENGLISHLANGUAGENAME: u32 = 4097u32; +pub const LOCALE_SGROUPING: u32 = 16u32; +pub const LOCALE_SINTLSYMBOL: u32 = 21u32; +pub const LOCALE_SISO3166CTRYNAME: u32 = 90u32; +pub const LOCALE_SISO3166CTRYNAME2: u32 = 104u32; +pub const LOCALE_SISO639LANGNAME: u32 = 89u32; +pub const LOCALE_SISO639LANGNAME2: u32 = 103u32; +pub const LOCALE_SKEYBOARDSTOINSTALL: u32 = 94u32; +pub const LOCALE_SLANGDISPLAYNAME: u32 = 111u32; +pub const LOCALE_SLANGUAGE: u32 = 2u32; +pub const LOCALE_SLIST: u32 = 12u32; +pub const LOCALE_SLOCALIZEDCOUNTRYNAME: u32 = 6u32; +pub const LOCALE_SLOCALIZEDDISPLAYNAME: u32 = 2u32; +pub const LOCALE_SLOCALIZEDLANGUAGENAME: u32 = 111u32; +pub const LOCALE_SLONGDATE: u32 = 32u32; +pub const LOCALE_SMONDECIMALSEP: u32 = 22u32; +pub const LOCALE_SMONGROUPING: u32 = 24u32; +pub const LOCALE_SMONTHDAY: u32 = 120u32; +pub const LOCALE_SMONTHNAME1: u32 = 56u32; +pub const LOCALE_SMONTHNAME10: u32 = 65u32; +pub const LOCALE_SMONTHNAME11: u32 = 66u32; +pub const LOCALE_SMONTHNAME12: u32 = 67u32; +pub const LOCALE_SMONTHNAME13: u32 = 4110u32; +pub const LOCALE_SMONTHNAME2: u32 = 57u32; +pub const LOCALE_SMONTHNAME3: u32 = 58u32; +pub const LOCALE_SMONTHNAME4: u32 = 59u32; +pub const LOCALE_SMONTHNAME5: u32 = 60u32; +pub const LOCALE_SMONTHNAME6: u32 = 61u32; +pub const LOCALE_SMONTHNAME7: u32 = 62u32; +pub const LOCALE_SMONTHNAME8: u32 = 63u32; +pub const LOCALE_SMONTHNAME9: u32 = 64u32; +pub const LOCALE_SMONTHOUSANDSEP: u32 = 23u32; +pub const LOCALE_SNAME: u32 = 92u32; +pub const LOCALE_SNAN: u32 = 105u32; +pub const LOCALE_SNATIVECOUNTRYNAME: u32 = 8u32; +pub const LOCALE_SNATIVECTRYNAME: u32 = 8u32; +pub const LOCALE_SNATIVECURRNAME: u32 = 4104u32; +pub const LOCALE_SNATIVEDIGITS: u32 = 19u32; +pub const LOCALE_SNATIVEDISPLAYNAME: u32 = 115u32; +pub const LOCALE_SNATIVELANGNAME: u32 = 4u32; +pub const LOCALE_SNATIVELANGUAGENAME: u32 = 4u32; +pub const LOCALE_SNEGATIVESIGN: u32 = 81u32; +pub const LOCALE_SNEGINFINITY: u32 = 107u32; +pub const LOCALE_SOPENTYPELANGUAGETAG: u32 = 122u32; +pub const LOCALE_SPARENT: u32 = 109u32; +pub const LOCALE_SPECIFICDATA: u32 = 32u32; +pub const LOCALE_SPERCENT: u32 = 118u32; +pub const LOCALE_SPERMILLE: u32 = 119u32; +pub const LOCALE_SPM: u32 = 41u32; +pub const LOCALE_SPOSINFINITY: u32 = 106u32; +pub const LOCALE_SPOSITIVESIGN: u32 = 80u32; +pub const LOCALE_SRELATIVELONGDATE: u32 = 124u32; +pub const LOCALE_SSCRIPTS: u32 = 108u32; +pub const LOCALE_SSHORTDATE: u32 = 31u32; +pub const LOCALE_SSHORTESTAM: u32 = 126u32; +pub const LOCALE_SSHORTESTDAYNAME1: u32 = 96u32; +pub const LOCALE_SSHORTESTDAYNAME2: u32 = 97u32; +pub const LOCALE_SSHORTESTDAYNAME3: u32 = 98u32; +pub const LOCALE_SSHORTESTDAYNAME4: u32 = 99u32; +pub const LOCALE_SSHORTESTDAYNAME5: u32 = 100u32; +pub const LOCALE_SSHORTESTDAYNAME6: u32 = 101u32; +pub const LOCALE_SSHORTESTDAYNAME7: u32 = 102u32; +pub const LOCALE_SSHORTESTPM: u32 = 127u32; +pub const LOCALE_SSHORTTIME: u32 = 121u32; +pub const LOCALE_SSORTLOCALE: u32 = 123u32; +pub const LOCALE_SSORTNAME: u32 = 4115u32; +pub const LOCALE_STHOUSAND: u32 = 15u32; +pub const LOCALE_STIME: u32 = 30u32; +pub const LOCALE_STIMEFORMAT: u32 = 4099u32; +pub const LOCALE_SUPPLEMENTAL: u32 = 2u32; +pub const LOCALE_SYEARMONTH: u32 = 4102u32; +pub const LOCALE_SYSTEM_DEFAULT: u32 = 2048u32; +pub const LOCALE_USER_DEFAULT: u32 = 1024u32; +pub const LOCALE_USE_CP_ACP: u32 = 1073741824u32; +pub const LOCALE_WINDOWS: u32 = 1u32; +pub const LOWLEVEL_SERVICE_TYPES: u32 = 2u32; +pub const LOW_SURROGATE_END: u32 = 57343u32; +pub const LOW_SURROGATE_START: u32 = 56320u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MAPPING_DATA_RANGE { + pub dwStartIndex: u32, + pub dwEndIndex: u32, + pub pszDescription: windows_sys::core::PWSTR, + pub dwDescriptionLength: u32, + pub pData: *mut core::ffi::c_void, + pub dwDataSize: u32, + pub pszContentType: windows_sys::core::PWSTR, + pub prgActionIds: *mut windows_sys::core::PWSTR, + pub dwActionsCount: u32, + pub prgActionDisplayNames: *mut windows_sys::core::PWSTR, +} +impl Default for MAPPING_DATA_RANGE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MAPPING_ENUM_OPTIONS { + pub Size: usize, + pub pszCategory: windows_sys::core::PWSTR, + pub pszInputLanguage: windows_sys::core::PWSTR, + pub pszOutputLanguage: windows_sys::core::PWSTR, + pub pszInputScript: windows_sys::core::PWSTR, + pub pszOutputScript: windows_sys::core::PWSTR, + pub pszInputContentType: windows_sys::core::PWSTR, + pub pszOutputContentType: windows_sys::core::PWSTR, + pub pGuid: *mut windows_sys::core::GUID, + pub _bitfield: u32, +} +impl Default for MAPPING_ENUM_OPTIONS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MAPPING_OPTIONS { + pub Size: usize, + pub pszInputLanguage: windows_sys::core::PWSTR, + pub pszOutputLanguage: windows_sys::core::PWSTR, + pub pszInputScript: windows_sys::core::PWSTR, + pub pszOutputScript: windows_sys::core::PWSTR, + pub pszInputContentType: windows_sys::core::PWSTR, + pub pszOutputContentType: windows_sys::core::PWSTR, + pub pszUILanguage: windows_sys::core::PWSTR, + pub pfnRecognizeCallback: PFN_MAPPINGCALLBACKPROC, + pub pRecognizeCallerData: *mut core::ffi::c_void, + pub dwRecognizeCallerDataSize: u32, + pub pfnActionCallback: PFN_MAPPINGCALLBACKPROC, + pub pActionCallerData: *mut core::ffi::c_void, + pub dwActionCallerDataSize: u32, + pub dwServiceFlag: u32, + pub _bitfield: u32, +} +impl Default for MAPPING_OPTIONS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MAPPING_PROPERTY_BAG { + pub Size: usize, + pub prgResultRanges: *mut MAPPING_DATA_RANGE, + pub dwRangesCount: u32, + pub pServiceData: *mut core::ffi::c_void, + pub dwServiceDataSize: u32, + pub pCallerData: *mut core::ffi::c_void, + pub dwCallerDataSize: u32, + pub pContext: *mut core::ffi::c_void, +} +impl Default for MAPPING_PROPERTY_BAG { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MAPPING_SERVICE_INFO { + pub Size: usize, + pub pszCopyright: windows_sys::core::PWSTR, + pub wMajorVersion: u16, + pub wMinorVersion: u16, + pub wBuildVersion: u16, + pub wStepVersion: u16, + pub dwInputContentTypesCount: u32, + pub prgInputContentTypes: *mut windows_sys::core::PWSTR, + pub dwOutputContentTypesCount: u32, + pub prgOutputContentTypes: *mut windows_sys::core::PWSTR, + pub dwInputLanguagesCount: u32, + pub prgInputLanguages: *mut windows_sys::core::PWSTR, + pub dwOutputLanguagesCount: u32, + pub prgOutputLanguages: *mut windows_sys::core::PWSTR, + pub dwInputScriptsCount: u32, + pub prgInputScripts: *mut windows_sys::core::PWSTR, + pub dwOutputScriptsCount: u32, + pub prgOutputScripts: *mut windows_sys::core::PWSTR, + pub guid: windows_sys::core::GUID, + pub pszCategory: windows_sys::core::PWSTR, + pub pszDescription: windows_sys::core::PWSTR, + pub dwPrivateDataSize: u32, + pub pPrivateData: *mut core::ffi::c_void, + pub pContext: *mut core::ffi::c_void, + pub _bitfield: u32, +} +impl Default for MAPPING_SERVICE_INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const MAP_COMPOSITE: FOLD_STRING_MAP_FLAGS = 64u32; +pub const MAP_EXPAND_LIGATURES: FOLD_STRING_MAP_FLAGS = 8192u32; +pub const MAP_FOLDCZONE: FOLD_STRING_MAP_FLAGS = 16u32; +pub const MAP_FOLDDIGITS: FOLD_STRING_MAP_FLAGS = 128u32; +pub const MAP_PRECOMPOSED: FOLD_STRING_MAP_FLAGS = 32u32; +pub const MAX_DEFAULTCHAR: u32 = 2u32; +pub const MAX_LEADBYTES: u32 = 12u32; +pub const MAX_LOCALE_NAME: u32 = 32u32; +pub const MAX_MIMECP_NAME: u32 = 64u32; +pub const MAX_MIMECSET_NAME: u32 = 50u32; +pub const MAX_MIMEFACE_NAME: u32 = 32u32; +pub const MAX_RFC1766_NAME: u32 = 6u32; +pub const MAX_SCRIPT_NAME: u32 = 48u32; +pub const MB_COMPOSITE: MULTI_BYTE_TO_WIDE_CHAR_FLAGS = 2u32; +pub const MB_ERR_INVALID_CHARS: MULTI_BYTE_TO_WIDE_CHAR_FLAGS = 8u32; +pub const MB_PRECOMPOSED: MULTI_BYTE_TO_WIDE_CHAR_FLAGS = 1u32; +pub const MB_USEGLYPHCHARS: MULTI_BYTE_TO_WIDE_CHAR_FLAGS = 4u32; +pub type MIMECONTF = i32; +pub const MIMECONTF_BROWSER: MIMECONTF = 2i32; +pub const MIMECONTF_EXPORT: MIMECONTF = 1024i32; +pub const MIMECONTF_IMPORT: MIMECONTF = 8i32; +pub const MIMECONTF_MAILNEWS: MIMECONTF = 1i32; +pub const MIMECONTF_MIME_IE4: MIMECONTF = 268435456i32; +pub const MIMECONTF_MIME_LATEST: MIMECONTF = 536870912i32; +pub const MIMECONTF_MIME_REGISTRY: MIMECONTF = 1073741824i32; +pub const MIMECONTF_MINIMAL: MIMECONTF = 4i32; +pub const MIMECONTF_PRIVCONVERTER: MIMECONTF = 65536i32; +pub const MIMECONTF_SAVABLE_BROWSER: MIMECONTF = 512i32; +pub const MIMECONTF_SAVABLE_MAILNEWS: MIMECONTF = 256i32; +pub const MIMECONTF_VALID: MIMECONTF = 131072i32; +pub const MIMECONTF_VALID_NLS: MIMECONTF = 262144i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MIMECPINFO { + pub dwFlags: u32, + pub uiCodePage: u32, + pub uiFamilyCodePage: u32, + pub wszDescription: [u16; 64], + pub wszWebCharset: [u16; 50], + pub wszHeaderCharset: [u16; 50], + pub wszBodyCharset: [u16; 50], + pub wszFixedWidthFont: [u16; 32], + pub wszProportionalFont: [u16; 32], + pub bGDICharset: u8, +} +impl Default for MIMECPINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MIMECSETINFO { + pub uiCodePage: u32, + pub uiInternetEncoding: u32, + pub wszCharset: [u16; 50], +} +impl Default for MIMECSETINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const MIN_SPELLING_NTDDI: u32 = 100794368u32; +pub type MLCONVCHAR = i32; +pub const MLCONVCHARF_AUTODETECT: MLCONVCHAR = 1i32; +pub const MLCONVCHARF_DETECTJPN: MLCONVCHAR = 32i32; +pub const MLCONVCHARF_ENTITIZE: MLCONVCHAR = 2i32; +pub const MLCONVCHARF_NAME_ENTITIZE: MLCONVCHAR = 4i32; +pub const MLCONVCHARF_NCR_ENTITIZE: MLCONVCHAR = 2i32; +pub const MLCONVCHARF_NOBESTFITCHARS: MLCONVCHAR = 16i32; +pub const MLCONVCHARF_USEDEFCHAR: MLCONVCHAR = 8i32; +pub type MLCP = i32; +pub type MLDETECTCP = i32; +pub const MLDETECTCP_7BIT: MLDETECTCP = 1i32; +pub const MLDETECTCP_8BIT: MLDETECTCP = 2i32; +pub const MLDETECTCP_DBCS: MLDETECTCP = 4i32; +pub const MLDETECTCP_HTML: MLDETECTCP = 8i32; +pub const MLDETECTCP_NONE: MLDETECTCP = 0i32; +pub const MLDETECTCP_NUMBER: MLDETECTCP = 16i32; +pub const MLDETECTF_BROWSER: MLCP = 2i32; +pub const MLDETECTF_EURO_UTF8: MLCP = 128i32; +pub const MLDETECTF_FILTER_SPECIALCHAR: MLCP = 64i32; +pub const MLDETECTF_MAILNEWS: MLCP = 1i32; +pub const MLDETECTF_PREFERRED_ONLY: MLCP = 32i32; +pub const MLDETECTF_PRESERVE_ORDER: MLCP = 16i32; +pub const MLDETECTF_VALID: MLCP = 4i32; +pub const MLDETECTF_VALID_NLS: MLCP = 8i32; +pub type MLSTR_FLAGS = i32; +pub const MLSTR_READ: MLSTR_FLAGS = 1i32; +pub const MLSTR_WRITE: MLSTR_FLAGS = 2i32; +pub const MUI_COMPLEX_SCRIPT_FILTER: u32 = 512u32; +pub const MUI_CONSOLE_FILTER: u32 = 256u32; +pub const MUI_FILEINFO_VERSION: u32 = 1u32; +pub const MUI_FILETYPE_LANGUAGE_NEUTRAL_MAIN: u32 = 2u32; +pub const MUI_FILETYPE_LANGUAGE_NEUTRAL_MUI: u32 = 4u32; +pub const MUI_FILETYPE_NOT_LANGUAGE_NEUTRAL: u32 = 1u32; +pub const MUI_FORMAT_INF_COMPAT: u32 = 2u32; +pub const MUI_FORMAT_REG_COMPAT: u32 = 1u32; +pub const MUI_FULL_LANGUAGE: u32 = 1u32; +pub const MUI_IMMUTABLE_LOOKUP: u32 = 16u32; +pub const MUI_LANGUAGE_EXACT: u32 = 16u32; +pub const MUI_LANGUAGE_ID: u32 = 4u32; +pub const MUI_LANGUAGE_INSTALLED: u32 = 32u32; +pub const MUI_LANGUAGE_LICENSED: u32 = 64u32; +pub const MUI_LANGUAGE_NAME: u32 = 8u32; +pub const MUI_LANG_NEUTRAL_PE_FILE: u32 = 256u32; +pub const MUI_LIP_LANGUAGE: u32 = 4u32; +pub const MUI_MACHINE_LANGUAGE_SETTINGS: u32 = 1024u32; +pub const MUI_MERGE_SYSTEM_FALLBACK: u32 = 16u32; +pub const MUI_MERGE_USER_FALLBACK: u32 = 32u32; +pub const MUI_NON_LANG_NEUTRAL_FILE: u32 = 512u32; +pub const MUI_PARTIAL_LANGUAGE: u32 = 2u32; +pub const MUI_QUERY_CHECKSUM: u32 = 2u32; +pub const MUI_QUERY_LANGUAGE_NAME: u32 = 4u32; +pub const MUI_QUERY_RESOURCE_TYPES: u32 = 8u32; +pub const MUI_QUERY_TYPE: u32 = 1u32; +pub const MUI_RESET_FILTERS: u32 = 1u32; +pub const MUI_SKIP_STRING_CACHE: u32 = 8u32; +pub const MUI_THREAD_LANGUAGES: u32 = 64u32; +pub const MUI_USER_PREFERRED_UI_LANGUAGES: u32 = 16u32; +pub const MUI_USE_INSTALLED_LANGUAGES: u32 = 32u32; +pub const MUI_USE_SEARCH_ALL_LANGUAGES: u32 = 64u32; +pub const MUI_VERIFY_FILE_EXISTS: u32 = 4u32; +pub type MULTI_BYTE_TO_WIDE_CHAR_FLAGS = u32; +pub const MinuteUnit: CALDATETIME_DATEUNIT = 6i32; +pub const MonthUnit: CALDATETIME_DATEUNIT = 2i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct NEWTEXTMETRICEXA { + pub ntmTm: super::Graphics::Gdi::NEWTEXTMETRICA, + pub ntmFontSig: FONTSIGNATURE, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct NEWTEXTMETRICEXW { + pub ntmTm: super::Graphics::Gdi::NEWTEXTMETRICW, + pub ntmFontSig: FONTSIGNATURE, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NLSVERSIONINFO { + pub dwNLSVersionInfoSize: u32, + pub dwNLSVersion: u32, + pub dwDefinedVersion: u32, + pub dwEffectiveId: u32, + pub guidCustomVersion: windows_sys::core::GUID, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NLSVERSIONINFOEX { + pub dwNLSVersionInfoSize: u32, + pub dwNLSVersion: u32, + pub dwDefinedVersion: u32, + pub dwEffectiveId: u32, + pub guidCustomVersion: windows_sys::core::GUID, +} +pub const NLS_CP_CPINFO: u32 = 268435456u32; +pub const NLS_CP_MBTOWC: u32 = 1073741824u32; +pub const NLS_CP_WCTOMB: u32 = 2147483648u32; +pub type NORM_FORM = i32; +pub const NORM_IGNORECASE: COMPARE_STRING_FLAGS = 1u32; +pub const NORM_IGNOREKANATYPE: COMPARE_STRING_FLAGS = 65536u32; +pub const NORM_IGNORENONSPACE: COMPARE_STRING_FLAGS = 2u32; +pub const NORM_IGNORESYMBOLS: COMPARE_STRING_FLAGS = 4u32; +pub const NORM_IGNOREWIDTH: COMPARE_STRING_FLAGS = 131072u32; +pub const NORM_LINGUISTIC_CASING: COMPARE_STRING_FLAGS = 134217728u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NUMBERFMTA { + pub NumDigits: u32, + pub LeadingZero: u32, + pub Grouping: u32, + pub lpDecimalSep: windows_sys::core::PSTR, + pub lpThousandSep: windows_sys::core::PSTR, + pub NegativeOrder: u32, +} +impl Default for NUMBERFMTA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NUMBERFMTW { + pub NumDigits: u32, + pub LeadingZero: u32, + pub Grouping: u32, + pub lpDecimalSep: windows_sys::core::PWSTR, + pub lpThousandSep: windows_sys::core::PWSTR, + pub NegativeOrder: u32, +} +impl Default for NUMBERFMTW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const NUMSYS_NAME_CAPACITY: u32 = 8u32; +pub const NormalizationC: NORM_FORM = 1i32; +pub const NormalizationD: NORM_FORM = 2i32; +pub const NormalizationKC: NORM_FORM = 5i32; +pub const NormalizationKD: NORM_FORM = 6i32; +pub const NormalizationOther: NORM_FORM = 0i32; +pub const OFFLINE_SERVICES: u32 = 2u32; +pub const ONLINE_SERVICES: u32 = 1u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct OPENTYPE_FEATURE_RECORD { + pub tagFeature: u32, + pub lParameter: i32, +} +pub type PFN_MAPPINGCALLBACKPROC = Option; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RFC1766INFO { + pub lcid: u32, + pub wszRfc1766: [u16; 6], + pub wszLocaleName: [u16; 32], +} +impl Default for RFC1766INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type SCRIPTCONTF = i32; +pub const SCRIPTCONTF_FIXED_FONT: SCRIPTFONTCONTF = 1i32; +pub const SCRIPTCONTF_PROPORTIONAL_FONT: SCRIPTFONTCONTF = 2i32; +pub const SCRIPTCONTF_SCRIPT_HIDE: SCRIPTFONTCONTF = 131072i32; +pub const SCRIPTCONTF_SCRIPT_SYSTEM: SCRIPTFONTCONTF = 262144i32; +pub const SCRIPTCONTF_SCRIPT_USER: SCRIPTFONTCONTF = 65536i32; +pub type SCRIPTFONTCONTF = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SCRIPTFONTINFO { + pub scripts: i64, + pub wszFont: [u16; 32], +} +impl Default for SCRIPTFONTINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SCRIPTINFO { + pub ScriptId: u8, + pub uiCodePage: u32, + pub wszDescription: [u16; 48], + pub wszFixedWidthFont: [u16; 32], + pub wszProportionalFont: [u16; 32], +} +impl Default for SCRIPTINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_ANALYSIS { + pub _bitfield: u16, + pub s: SCRIPT_STATE, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_CHARPROP { + pub _bitfield: u16, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_CONTROL { + pub _bitfield: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_DIGITSUBSTITUTE { + pub _bitfield1: u32, + pub _bitfield2: u32, + pub dwReserved: u32, +} +pub const SCRIPT_DIGITSUBSTITUTE_CONTEXT: u32 = 0u32; +pub const SCRIPT_DIGITSUBSTITUTE_NATIONAL: u32 = 2u32; +pub const SCRIPT_DIGITSUBSTITUTE_NONE: u32 = 1u32; +pub const SCRIPT_DIGITSUBSTITUTE_TRADITIONAL: u32 = 3u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_FONTPROPERTIES { + pub cBytes: i32, + pub wgBlank: u16, + pub wgDefault: u16, + pub wgInvalid: u16, + pub wgKashida: u16, + pub iKashidaWidth: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_GLYPHPROP { + pub sva: SCRIPT_VISATTR, + pub reserved: u16, +} +pub type SCRIPT_IS_COMPLEX_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_ITEM { + pub iCharPos: i32, + pub a: SCRIPT_ANALYSIS, +} +pub type SCRIPT_JUSTIFY = i32; +pub const SCRIPT_JUSTIFY_ARABIC_ALEF: SCRIPT_JUSTIFY = 9i32; +pub const SCRIPT_JUSTIFY_ARABIC_BA: SCRIPT_JUSTIFY = 12i32; +pub const SCRIPT_JUSTIFY_ARABIC_BARA: SCRIPT_JUSTIFY = 13i32; +pub const SCRIPT_JUSTIFY_ARABIC_BLANK: SCRIPT_JUSTIFY = 1i32; +pub const SCRIPT_JUSTIFY_ARABIC_HA: SCRIPT_JUSTIFY = 10i32; +pub const SCRIPT_JUSTIFY_ARABIC_KASHIDA: SCRIPT_JUSTIFY = 8i32; +pub const SCRIPT_JUSTIFY_ARABIC_NORMAL: SCRIPT_JUSTIFY = 7i32; +pub const SCRIPT_JUSTIFY_ARABIC_RA: SCRIPT_JUSTIFY = 11i32; +pub const SCRIPT_JUSTIFY_ARABIC_SEEN: SCRIPT_JUSTIFY = 14i32; +pub const SCRIPT_JUSTIFY_ARABIC_SEEN_M: SCRIPT_JUSTIFY = 15i32; +pub const SCRIPT_JUSTIFY_BLANK: SCRIPT_JUSTIFY = 4i32; +pub const SCRIPT_JUSTIFY_CHARACTER: SCRIPT_JUSTIFY = 2i32; +pub const SCRIPT_JUSTIFY_NONE: SCRIPT_JUSTIFY = 0i32; +pub const SCRIPT_JUSTIFY_RESERVED1: SCRIPT_JUSTIFY = 3i32; +pub const SCRIPT_JUSTIFY_RESERVED2: SCRIPT_JUSTIFY = 5i32; +pub const SCRIPT_JUSTIFY_RESERVED3: SCRIPT_JUSTIFY = 6i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_LOGATTR { + pub _bitfield: u8, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_PROPERTIES { + pub _bitfield1: u32, + pub _bitfield2: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_STATE { + pub _bitfield: u16, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SCRIPT_TABDEF { + pub cTabStops: i32, + pub iScale: i32, + pub pTabStops: *mut i32, + pub iTabOrigin: i32, +} +impl Default for SCRIPT_TABDEF { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const SCRIPT_TAG_UNKNOWN: u32 = 0u32; +pub const SCRIPT_UNDEFINED: u32 = 0u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SCRIPT_VISATTR { + pub _bitfield: u16, +} +pub const SGCM_RTL: u32 = 1u32; +pub const SIC_ASCIIDIGIT: SCRIPT_IS_COMPLEX_FLAGS = 2u32; +pub const SIC_COMPLEX: SCRIPT_IS_COMPLEX_FLAGS = 1u32; +pub const SIC_NEUTRAL: SCRIPT_IS_COMPLEX_FLAGS = 4u32; +pub const SORTING_PARADIGM_ICU: u32 = 16777216u32; +pub const SORTING_PARADIGM_NLS: u32 = 0u32; +pub const SORT_DIGITSASNUMBERS: COMPARE_STRING_FLAGS = 8u32; +pub const SORT_STRINGSORT: COMPARE_STRING_FLAGS = 4096u32; +pub const SSA_BREAK: u32 = 64u32; +pub const SSA_CLIP: u32 = 4u32; +pub const SSA_DONTGLYPH: u32 = 1073741824u32; +pub const SSA_DZWG: u32 = 16u32; +pub const SSA_FALLBACK: u32 = 32u32; +pub const SSA_FIT: u32 = 8u32; +pub const SSA_FULLMEASURE: u32 = 67108864u32; +pub const SSA_GCP: u32 = 512u32; +pub const SSA_GLYPHS: u32 = 128u32; +pub const SSA_HIDEHOTKEY: u32 = 8192u32; +pub const SSA_HOTKEY: u32 = 1024u32; +pub const SSA_HOTKEYONLY: u32 = 9216u32; +pub const SSA_LAYOUTRTL: u32 = 536870912u32; +pub const SSA_LINK: u32 = 4096u32; +pub const SSA_LPKANSIFALLBACK: u32 = 134217728u32; +pub const SSA_METAFILE: u32 = 2048u32; +pub const SSA_NOKASHIDA: u32 = 2147483648u32; +pub const SSA_PASSWORD: u32 = 1u32; +pub const SSA_PIDX: u32 = 268435456u32; +pub const SSA_RTL: u32 = 256u32; +pub const SSA_TAB: u32 = 2u32; +pub type SYSGEOCLASS = i32; +pub type SYSGEOTYPE = i32; +pub type SYSNLS_FUNCTION = i32; +pub const SecondUnit: CALDATETIME_DATEUNIT = 7i32; +pub const SpellCheckerFactory: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7ab36653_1796_484b_bdfa_e74f1db7c1dc); +pub const TCI_SRCCHARSET: TRANSLATE_CHARSET_INFO_FLAGS = 1u32; +pub const TCI_SRCCODEPAGE: TRANSLATE_CHARSET_INFO_FLAGS = 2u32; +pub const TCI_SRCFONTSIG: TRANSLATE_CHARSET_INFO_FLAGS = 3u32; +pub const TCI_SRCLOCALE: TRANSLATE_CHARSET_INFO_FLAGS = 4096u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TEXTRANGE_PROPERTIES { + pub potfRecords: *mut OPENTYPE_FEATURE_RECORD, + pub cotfRecords: i32, +} +impl Default for TEXTRANGE_PROPERTIES { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TIMEFMT_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type TIMEFMT_ENUMPROCEX = Option windows_sys::core::BOOL>; +pub type TIMEFMT_ENUMPROCW = Option windows_sys::core::BOOL>; +pub const TIME_FORCE24HOURFORMAT: TIME_FORMAT_FLAGS = 8u32; +pub type TIME_FORMAT_FLAGS = u32; +pub const TIME_NOMINUTESORSECONDS: TIME_FORMAT_FLAGS = 1u32; +pub const TIME_NOSECONDS: TIME_FORMAT_FLAGS = 2u32; +pub const TIME_NOTIMEMARKER: TIME_FORMAT_FLAGS = 4u32; +pub type TRANSLATE_CHARSET_INFO_FLAGS = u32; +pub const TickUnit: CALDATETIME_DATEUNIT = 8i32; +pub const U16_MAX_LENGTH: u32 = 2u32; +pub const U8_LEAD3_T1_BITS: windows_sys::core::PCSTR = windows_sys::core::s!(" 000000000000\u{10}00"); +pub const U8_LEAD4_T1_BITS: windows_sys::core::PCSTR = windows_sys::core::s!("\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{1e}\u{f}\u{f}\u{f}\u{0}\u{0}\u{0}\u{0}"); +pub const U8_MAX_LENGTH: u32 = 4u32; +pub type UAcceptResult = i32; +pub type UAlphabeticIndexLabelType = i32; +pub const UBIDI_DEFAULT_LTR: u32 = 254u32; +pub const UBIDI_DEFAULT_RTL: u32 = 255u32; +pub const UBIDI_DO_MIRRORING: u32 = 2u32; +pub const UBIDI_INSERT_LRM_FOR_NUMERIC: u32 = 4u32; +pub const UBIDI_KEEP_BASE_COMBINING: u32 = 1u32; +pub const UBIDI_LEVEL_OVERRIDE: u32 = 128u32; +pub const UBIDI_LOGICAL: UBiDiOrder = 0i32; +pub const UBIDI_LTR: UBiDiDirection = 0i32; +pub const UBIDI_MAP_NOWHERE: i32 = -1i32; +pub const UBIDI_MAX_EXPLICIT_LEVEL: u32 = 125u32; +pub const UBIDI_MIRRORING_OFF: UBiDiMirroring = 0i32; +pub const UBIDI_MIRRORING_ON: UBiDiMirroring = 1i32; +pub const UBIDI_MIXED: UBiDiDirection = 2i32; +pub const UBIDI_NEUTRAL: UBiDiDirection = 3i32; +pub const UBIDI_OPTION_DEFAULT: UBiDiReorderingOption = 0i32; +pub const UBIDI_OPTION_INSERT_MARKS: UBiDiReorderingOption = 1i32; +pub const UBIDI_OPTION_REMOVE_CONTROLS: UBiDiReorderingOption = 2i32; +pub const UBIDI_OPTION_STREAMING: UBiDiReorderingOption = 4i32; +pub const UBIDI_OUTPUT_REVERSE: u32 = 16u32; +pub const UBIDI_REMOVE_BIDI_CONTROLS: u32 = 8u32; +pub const UBIDI_REORDER_DEFAULT: UBiDiReorderingMode = 0i32; +pub const UBIDI_REORDER_GROUP_NUMBERS_WITH_R: UBiDiReorderingMode = 2i32; +pub const UBIDI_REORDER_INVERSE_FOR_NUMBERS_SPECIAL: UBiDiReorderingMode = 6i32; +pub const UBIDI_REORDER_INVERSE_LIKE_DIRECT: UBiDiReorderingMode = 5i32; +pub const UBIDI_REORDER_INVERSE_NUMBERS_AS_L: UBiDiReorderingMode = 4i32; +pub const UBIDI_REORDER_NUMBERS_SPECIAL: UBiDiReorderingMode = 1i32; +pub const UBIDI_REORDER_RUNS_ONLY: UBiDiReorderingMode = 3i32; +pub const UBIDI_RTL: UBiDiDirection = 1i32; +pub const UBIDI_VISUAL: UBiDiOrder = 1i32; +pub const UBLOCK_ADLAM: UBlockCode = 263i32; +pub const UBLOCK_AEGEAN_NUMBERS: UBlockCode = 119i32; +pub const UBLOCK_AHOM: UBlockCode = 253i32; +pub const UBLOCK_ALCHEMICAL_SYMBOLS: UBlockCode = 208i32; +pub const UBLOCK_ALPHABETIC_PRESENTATION_FORMS: UBlockCode = 80i32; +pub const UBLOCK_ANATOLIAN_HIEROGLYPHS: UBlockCode = 254i32; +pub const UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION: UBlockCode = 126i32; +pub const UBLOCK_ANCIENT_GREEK_NUMBERS: UBlockCode = 127i32; +pub const UBLOCK_ANCIENT_SYMBOLS: UBlockCode = 165i32; +pub const UBLOCK_ARABIC: UBlockCode = 12i32; +pub const UBLOCK_ARABIC_EXTENDED_A: UBlockCode = 210i32; +pub const UBLOCK_ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS: UBlockCode = 211i32; +pub const UBLOCK_ARABIC_PRESENTATION_FORMS_A: UBlockCode = 81i32; +pub const UBLOCK_ARABIC_PRESENTATION_FORMS_B: UBlockCode = 85i32; +pub const UBLOCK_ARABIC_SUPPLEMENT: UBlockCode = 128i32; +pub const UBLOCK_ARMENIAN: UBlockCode = 10i32; +pub const UBLOCK_ARROWS: UBlockCode = 46i32; +pub const UBLOCK_AVESTAN: UBlockCode = 188i32; +pub const UBLOCK_BALINESE: UBlockCode = 147i32; +pub const UBLOCK_BAMUM: UBlockCode = 177i32; +pub const UBLOCK_BAMUM_SUPPLEMENT: UBlockCode = 202i32; +pub const UBLOCK_BASIC_LATIN: UBlockCode = 1i32; +pub const UBLOCK_BASSA_VAH: UBlockCode = 221i32; +pub const UBLOCK_BATAK: UBlockCode = 199i32; +pub const UBLOCK_BENGALI: UBlockCode = 16i32; +pub const UBLOCK_BHAIKSUKI: UBlockCode = 264i32; +pub const UBLOCK_BLOCK_ELEMENTS: UBlockCode = 53i32; +pub const UBLOCK_BOPOMOFO: UBlockCode = 64i32; +pub const UBLOCK_BOPOMOFO_EXTENDED: UBlockCode = 67i32; +pub const UBLOCK_BOX_DRAWING: UBlockCode = 52i32; +pub const UBLOCK_BRAHMI: UBlockCode = 201i32; +pub const UBLOCK_BRAILLE_PATTERNS: UBlockCode = 57i32; +pub const UBLOCK_BUGINESE: UBlockCode = 129i32; +pub const UBLOCK_BUHID: UBlockCode = 100i32; +pub const UBLOCK_BYZANTINE_MUSICAL_SYMBOLS: UBlockCode = 91i32; +pub const UBLOCK_CARIAN: UBlockCode = 168i32; +pub const UBLOCK_CAUCASIAN_ALBANIAN: UBlockCode = 222i32; +pub const UBLOCK_CHAKMA: UBlockCode = 212i32; +pub const UBLOCK_CHAM: UBlockCode = 164i32; +pub const UBLOCK_CHEROKEE: UBlockCode = 32i32; +pub const UBLOCK_CHEROKEE_SUPPLEMENT: UBlockCode = 255i32; +pub const UBLOCK_CHESS_SYMBOLS: UBlockCode = 281i32; +pub const UBLOCK_CHORASMIAN: UBlockCode = 301i32; +pub const UBLOCK_CJK_COMPATIBILITY: UBlockCode = 69i32; +pub const UBLOCK_CJK_COMPATIBILITY_FORMS: UBlockCode = 83i32; +pub const UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS: UBlockCode = 79i32; +pub const UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT: UBlockCode = 95i32; +pub const UBLOCK_CJK_RADICALS_SUPPLEMENT: UBlockCode = 58i32; +pub const UBLOCK_CJK_STROKES: UBlockCode = 130i32; +pub const UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION: UBlockCode = 61i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS: UBlockCode = 71i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A: UBlockCode = 70i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B: UBlockCode = 94i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C: UBlockCode = 197i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D: UBlockCode = 209i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E: UBlockCode = 256i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F: UBlockCode = 274i32; +pub const UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G: UBlockCode = 302i32; +pub const UBLOCK_COMBINING_DIACRITICAL_MARKS: UBlockCode = 7i32; +pub const UBLOCK_COMBINING_DIACRITICAL_MARKS_EXTENDED: UBlockCode = 224i32; +pub const UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT: UBlockCode = 131i32; +pub const UBLOCK_COMBINING_HALF_MARKS: UBlockCode = 82i32; +pub const UBLOCK_COMBINING_MARKS_FOR_SYMBOLS: UBlockCode = 43i32; +pub const UBLOCK_COMMON_INDIC_NUMBER_FORMS: UBlockCode = 178i32; +pub const UBLOCK_CONTROL_PICTURES: UBlockCode = 49i32; +pub const UBLOCK_COPTIC: UBlockCode = 132i32; +pub const UBLOCK_COPTIC_EPACT_NUMBERS: UBlockCode = 223i32; +pub const UBLOCK_COUNTING_ROD_NUMERALS: UBlockCode = 154i32; +pub const UBLOCK_CUNEIFORM: UBlockCode = 152i32; +pub const UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION: UBlockCode = 153i32; +pub const UBLOCK_CURRENCY_SYMBOLS: UBlockCode = 42i32; +pub const UBLOCK_CYPRIOT_SYLLABARY: UBlockCode = 123i32; +pub const UBLOCK_CYRILLIC: UBlockCode = 9i32; +pub const UBLOCK_CYRILLIC_EXTENDED_A: UBlockCode = 158i32; +pub const UBLOCK_CYRILLIC_EXTENDED_B: UBlockCode = 160i32; +pub const UBLOCK_CYRILLIC_EXTENDED_C: UBlockCode = 265i32; +pub const UBLOCK_CYRILLIC_SUPPLEMENT: UBlockCode = 97i32; +pub const UBLOCK_CYRILLIC_SUPPLEMENTARY: UBlockCode = 97i32; +pub const UBLOCK_DESERET: UBlockCode = 90i32; +pub const UBLOCK_DEVANAGARI: UBlockCode = 15i32; +pub const UBLOCK_DEVANAGARI_EXTENDED: UBlockCode = 179i32; +pub const UBLOCK_DINGBATS: UBlockCode = 56i32; +pub const UBLOCK_DIVES_AKURU: UBlockCode = 303i32; +pub const UBLOCK_DOGRA: UBlockCode = 282i32; +pub const UBLOCK_DOMINO_TILES: UBlockCode = 171i32; +pub const UBLOCK_DUPLOYAN: UBlockCode = 225i32; +pub const UBLOCK_EARLY_DYNASTIC_CUNEIFORM: UBlockCode = 257i32; +pub const UBLOCK_EGYPTIAN_HIEROGLYPHS: UBlockCode = 194i32; +pub const UBLOCK_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS: UBlockCode = 292i32; +pub const UBLOCK_ELBASAN: UBlockCode = 226i32; +pub const UBLOCK_ELYMAIC: UBlockCode = 293i32; +pub const UBLOCK_EMOTICONS: UBlockCode = 206i32; +pub const UBLOCK_ENCLOSED_ALPHANUMERICS: UBlockCode = 51i32; +pub const UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT: UBlockCode = 195i32; +pub const UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS: UBlockCode = 68i32; +pub const UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT: UBlockCode = 196i32; +pub const UBLOCK_ETHIOPIC: UBlockCode = 31i32; +pub const UBLOCK_ETHIOPIC_EXTENDED: UBlockCode = 133i32; +pub const UBLOCK_ETHIOPIC_EXTENDED_A: UBlockCode = 200i32; +pub const UBLOCK_ETHIOPIC_SUPPLEMENT: UBlockCode = 134i32; +pub const UBLOCK_GENERAL_PUNCTUATION: UBlockCode = 40i32; +pub const UBLOCK_GEOMETRIC_SHAPES: UBlockCode = 54i32; +pub const UBLOCK_GEOMETRIC_SHAPES_EXTENDED: UBlockCode = 227i32; +pub const UBLOCK_GEORGIAN: UBlockCode = 29i32; +pub const UBLOCK_GEORGIAN_EXTENDED: UBlockCode = 283i32; +pub const UBLOCK_GEORGIAN_SUPPLEMENT: UBlockCode = 135i32; +pub const UBLOCK_GLAGOLITIC: UBlockCode = 136i32; +pub const UBLOCK_GLAGOLITIC_SUPPLEMENT: UBlockCode = 266i32; +pub const UBLOCK_GOTHIC: UBlockCode = 89i32; +pub const UBLOCK_GRANTHA: UBlockCode = 228i32; +pub const UBLOCK_GREEK: UBlockCode = 8i32; +pub const UBLOCK_GREEK_EXTENDED: UBlockCode = 39i32; +pub const UBLOCK_GUJARATI: UBlockCode = 18i32; +pub const UBLOCK_GUNJALA_GONDI: UBlockCode = 284i32; +pub const UBLOCK_GURMUKHI: UBlockCode = 17i32; +pub const UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS: UBlockCode = 87i32; +pub const UBLOCK_HANGUL_COMPATIBILITY_JAMO: UBlockCode = 65i32; +pub const UBLOCK_HANGUL_JAMO: UBlockCode = 30i32; +pub const UBLOCK_HANGUL_JAMO_EXTENDED_A: UBlockCode = 180i32; +pub const UBLOCK_HANGUL_JAMO_EXTENDED_B: UBlockCode = 185i32; +pub const UBLOCK_HANGUL_SYLLABLES: UBlockCode = 74i32; +pub const UBLOCK_HANIFI_ROHINGYA: UBlockCode = 285i32; +pub const UBLOCK_HANUNOO: UBlockCode = 99i32; +pub const UBLOCK_HATRAN: UBlockCode = 258i32; +pub const UBLOCK_HEBREW: UBlockCode = 11i32; +pub const UBLOCK_HIGH_PRIVATE_USE_SURROGATES: UBlockCode = 76i32; +pub const UBLOCK_HIGH_SURROGATES: UBlockCode = 75i32; +pub const UBLOCK_HIRAGANA: UBlockCode = 62i32; +pub const UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS: UBlockCode = 60i32; +pub const UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION: UBlockCode = 267i32; +pub const UBLOCK_IMPERIAL_ARAMAIC: UBlockCode = 186i32; +pub const UBLOCK_INDIC_SIYAQ_NUMBERS: UBlockCode = 286i32; +pub const UBLOCK_INSCRIPTIONAL_PAHLAVI: UBlockCode = 190i32; +pub const UBLOCK_INSCRIPTIONAL_PARTHIAN: UBlockCode = 189i32; +pub const UBLOCK_INVALID_CODE: UBlockCode = -1i32; +pub const UBLOCK_IPA_EXTENSIONS: UBlockCode = 5i32; +pub const UBLOCK_JAVANESE: UBlockCode = 181i32; +pub const UBLOCK_KAITHI: UBlockCode = 193i32; +pub const UBLOCK_KANA_EXTENDED_A: UBlockCode = 275i32; +pub const UBLOCK_KANA_SUPPLEMENT: UBlockCode = 203i32; +pub const UBLOCK_KANBUN: UBlockCode = 66i32; +pub const UBLOCK_KANGXI_RADICALS: UBlockCode = 59i32; +pub const UBLOCK_KANNADA: UBlockCode = 22i32; +pub const UBLOCK_KATAKANA: UBlockCode = 63i32; +pub const UBLOCK_KATAKANA_PHONETIC_EXTENSIONS: UBlockCode = 107i32; +pub const UBLOCK_KAYAH_LI: UBlockCode = 162i32; +pub const UBLOCK_KHAROSHTHI: UBlockCode = 137i32; +pub const UBLOCK_KHITAN_SMALL_SCRIPT: UBlockCode = 304i32; +pub const UBLOCK_KHMER: UBlockCode = 36i32; +pub const UBLOCK_KHMER_SYMBOLS: UBlockCode = 113i32; +pub const UBLOCK_KHOJKI: UBlockCode = 229i32; +pub const UBLOCK_KHUDAWADI: UBlockCode = 230i32; +pub const UBLOCK_LAO: UBlockCode = 26i32; +pub const UBLOCK_LATIN_1_SUPPLEMENT: UBlockCode = 2i32; +pub const UBLOCK_LATIN_EXTENDED_A: UBlockCode = 3i32; +pub const UBLOCK_LATIN_EXTENDED_ADDITIONAL: UBlockCode = 38i32; +pub const UBLOCK_LATIN_EXTENDED_B: UBlockCode = 4i32; +pub const UBLOCK_LATIN_EXTENDED_C: UBlockCode = 148i32; +pub const UBLOCK_LATIN_EXTENDED_D: UBlockCode = 149i32; +pub const UBLOCK_LATIN_EXTENDED_E: UBlockCode = 231i32; +pub const UBLOCK_LEPCHA: UBlockCode = 156i32; +pub const UBLOCK_LETTERLIKE_SYMBOLS: UBlockCode = 44i32; +pub const UBLOCK_LIMBU: UBlockCode = 111i32; +pub const UBLOCK_LINEAR_A: UBlockCode = 232i32; +pub const UBLOCK_LINEAR_B_IDEOGRAMS: UBlockCode = 118i32; +pub const UBLOCK_LINEAR_B_SYLLABARY: UBlockCode = 117i32; +pub const UBLOCK_LISU: UBlockCode = 176i32; +pub const UBLOCK_LISU_SUPPLEMENT: UBlockCode = 305i32; +pub const UBLOCK_LOW_SURROGATES: UBlockCode = 77i32; +pub const UBLOCK_LYCIAN: UBlockCode = 167i32; +pub const UBLOCK_LYDIAN: UBlockCode = 169i32; +pub const UBLOCK_MAHAJANI: UBlockCode = 233i32; +pub const UBLOCK_MAHJONG_TILES: UBlockCode = 170i32; +pub const UBLOCK_MAKASAR: UBlockCode = 287i32; +pub const UBLOCK_MALAYALAM: UBlockCode = 23i32; +pub const UBLOCK_MANDAIC: UBlockCode = 198i32; +pub const UBLOCK_MANICHAEAN: UBlockCode = 234i32; +pub const UBLOCK_MARCHEN: UBlockCode = 268i32; +pub const UBLOCK_MASARAM_GONDI: UBlockCode = 276i32; +pub const UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS: UBlockCode = 93i32; +pub const UBLOCK_MATHEMATICAL_OPERATORS: UBlockCode = 47i32; +pub const UBLOCK_MAYAN_NUMERALS: UBlockCode = 288i32; +pub const UBLOCK_MEDEFAIDRIN: UBlockCode = 289i32; +pub const UBLOCK_MEETEI_MAYEK: UBlockCode = 184i32; +pub const UBLOCK_MEETEI_MAYEK_EXTENSIONS: UBlockCode = 213i32; +pub const UBLOCK_MENDE_KIKAKUI: UBlockCode = 235i32; +pub const UBLOCK_MEROITIC_CURSIVE: UBlockCode = 214i32; +pub const UBLOCK_MEROITIC_HIEROGLYPHS: UBlockCode = 215i32; +pub const UBLOCK_MIAO: UBlockCode = 216i32; +pub const UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A: UBlockCode = 102i32; +pub const UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B: UBlockCode = 105i32; +pub const UBLOCK_MISCELLANEOUS_SYMBOLS: UBlockCode = 55i32; +pub const UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS: UBlockCode = 115i32; +pub const UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS: UBlockCode = 205i32; +pub const UBLOCK_MISCELLANEOUS_TECHNICAL: UBlockCode = 48i32; +pub const UBLOCK_MODI: UBlockCode = 236i32; +pub const UBLOCK_MODIFIER_TONE_LETTERS: UBlockCode = 138i32; +pub const UBLOCK_MONGOLIAN: UBlockCode = 37i32; +pub const UBLOCK_MONGOLIAN_SUPPLEMENT: UBlockCode = 269i32; +pub const UBLOCK_MRO: UBlockCode = 237i32; +pub const UBLOCK_MULTANI: UBlockCode = 259i32; +pub const UBLOCK_MUSICAL_SYMBOLS: UBlockCode = 92i32; +pub const UBLOCK_MYANMAR: UBlockCode = 28i32; +pub const UBLOCK_MYANMAR_EXTENDED_A: UBlockCode = 182i32; +pub const UBLOCK_MYANMAR_EXTENDED_B: UBlockCode = 238i32; +pub const UBLOCK_NABATAEAN: UBlockCode = 239i32; +pub const UBLOCK_NANDINAGARI: UBlockCode = 294i32; +pub const UBLOCK_NEWA: UBlockCode = 270i32; +pub const UBLOCK_NEW_TAI_LUE: UBlockCode = 139i32; +pub const UBLOCK_NKO: UBlockCode = 146i32; +pub const UBLOCK_NO_BLOCK: UBlockCode = 0i32; +pub const UBLOCK_NUMBER_FORMS: UBlockCode = 45i32; +pub const UBLOCK_NUSHU: UBlockCode = 277i32; +pub const UBLOCK_NYIAKENG_PUACHUE_HMONG: UBlockCode = 295i32; +pub const UBLOCK_OGHAM: UBlockCode = 34i32; +pub const UBLOCK_OLD_HUNGARIAN: UBlockCode = 260i32; +pub const UBLOCK_OLD_ITALIC: UBlockCode = 88i32; +pub const UBLOCK_OLD_NORTH_ARABIAN: UBlockCode = 240i32; +pub const UBLOCK_OLD_PERMIC: UBlockCode = 241i32; +pub const UBLOCK_OLD_PERSIAN: UBlockCode = 140i32; +pub const UBLOCK_OLD_SOGDIAN: UBlockCode = 290i32; +pub const UBLOCK_OLD_SOUTH_ARABIAN: UBlockCode = 187i32; +pub const UBLOCK_OLD_TURKIC: UBlockCode = 191i32; +pub const UBLOCK_OL_CHIKI: UBlockCode = 157i32; +pub const UBLOCK_OPTICAL_CHARACTER_RECOGNITION: UBlockCode = 50i32; +pub const UBLOCK_ORIYA: UBlockCode = 19i32; +pub const UBLOCK_ORNAMENTAL_DINGBATS: UBlockCode = 242i32; +pub const UBLOCK_OSAGE: UBlockCode = 271i32; +pub const UBLOCK_OSMANYA: UBlockCode = 122i32; +pub const UBLOCK_OTTOMAN_SIYAQ_NUMBERS: UBlockCode = 296i32; +pub const UBLOCK_PAHAWH_HMONG: UBlockCode = 243i32; +pub const UBLOCK_PALMYRENE: UBlockCode = 244i32; +pub const UBLOCK_PAU_CIN_HAU: UBlockCode = 245i32; +pub const UBLOCK_PHAGS_PA: UBlockCode = 150i32; +pub const UBLOCK_PHAISTOS_DISC: UBlockCode = 166i32; +pub const UBLOCK_PHOENICIAN: UBlockCode = 151i32; +pub const UBLOCK_PHONETIC_EXTENSIONS: UBlockCode = 114i32; +pub const UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT: UBlockCode = 141i32; +pub const UBLOCK_PLAYING_CARDS: UBlockCode = 204i32; +pub const UBLOCK_PRIVATE_USE: UBlockCode = 78i32; +pub const UBLOCK_PRIVATE_USE_AREA: UBlockCode = 78i32; +pub const UBLOCK_PSALTER_PAHLAVI: UBlockCode = 246i32; +pub const UBLOCK_REJANG: UBlockCode = 163i32; +pub const UBLOCK_RUMI_NUMERAL_SYMBOLS: UBlockCode = 192i32; +pub const UBLOCK_RUNIC: UBlockCode = 35i32; +pub const UBLOCK_SAMARITAN: UBlockCode = 172i32; +pub const UBLOCK_SAURASHTRA: UBlockCode = 161i32; +pub const UBLOCK_SHARADA: UBlockCode = 217i32; +pub const UBLOCK_SHAVIAN: UBlockCode = 121i32; +pub const UBLOCK_SHORTHAND_FORMAT_CONTROLS: UBlockCode = 247i32; +pub const UBLOCK_SIDDHAM: UBlockCode = 248i32; +pub const UBLOCK_SINHALA: UBlockCode = 24i32; +pub const UBLOCK_SINHALA_ARCHAIC_NUMBERS: UBlockCode = 249i32; +pub const UBLOCK_SMALL_FORM_VARIANTS: UBlockCode = 84i32; +pub const UBLOCK_SMALL_KANA_EXTENSION: UBlockCode = 297i32; +pub const UBLOCK_SOGDIAN: UBlockCode = 291i32; +pub const UBLOCK_SORA_SOMPENG: UBlockCode = 218i32; +pub const UBLOCK_SOYOMBO: UBlockCode = 278i32; +pub const UBLOCK_SPACING_MODIFIER_LETTERS: UBlockCode = 6i32; +pub const UBLOCK_SPECIALS: UBlockCode = 86i32; +pub const UBLOCK_SUNDANESE: UBlockCode = 155i32; +pub const UBLOCK_SUNDANESE_SUPPLEMENT: UBlockCode = 219i32; +pub const UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS: UBlockCode = 41i32; +pub const UBLOCK_SUPPLEMENTAL_ARROWS_A: UBlockCode = 103i32; +pub const UBLOCK_SUPPLEMENTAL_ARROWS_B: UBlockCode = 104i32; +pub const UBLOCK_SUPPLEMENTAL_ARROWS_C: UBlockCode = 250i32; +pub const UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS: UBlockCode = 106i32; +pub const UBLOCK_SUPPLEMENTAL_PUNCTUATION: UBlockCode = 142i32; +pub const UBLOCK_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS: UBlockCode = 261i32; +pub const UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A: UBlockCode = 109i32; +pub const UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B: UBlockCode = 110i32; +pub const UBLOCK_SUTTON_SIGNWRITING: UBlockCode = 262i32; +pub const UBLOCK_SYLOTI_NAGRI: UBlockCode = 143i32; +pub const UBLOCK_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A: UBlockCode = 298i32; +pub const UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING: UBlockCode = 306i32; +pub const UBLOCK_SYRIAC: UBlockCode = 13i32; +pub const UBLOCK_SYRIAC_SUPPLEMENT: UBlockCode = 279i32; +pub const UBLOCK_TAGALOG: UBlockCode = 98i32; +pub const UBLOCK_TAGBANWA: UBlockCode = 101i32; +pub const UBLOCK_TAGS: UBlockCode = 96i32; +pub const UBLOCK_TAI_LE: UBlockCode = 112i32; +pub const UBLOCK_TAI_THAM: UBlockCode = 174i32; +pub const UBLOCK_TAI_VIET: UBlockCode = 183i32; +pub const UBLOCK_TAI_XUAN_JING_SYMBOLS: UBlockCode = 124i32; +pub const UBLOCK_TAKRI: UBlockCode = 220i32; +pub const UBLOCK_TAMIL: UBlockCode = 20i32; +pub const UBLOCK_TAMIL_SUPPLEMENT: UBlockCode = 299i32; +pub const UBLOCK_TANGUT: UBlockCode = 272i32; +pub const UBLOCK_TANGUT_COMPONENTS: UBlockCode = 273i32; +pub const UBLOCK_TANGUT_SUPPLEMENT: UBlockCode = 307i32; +pub const UBLOCK_TELUGU: UBlockCode = 21i32; +pub const UBLOCK_THAANA: UBlockCode = 14i32; +pub const UBLOCK_THAI: UBlockCode = 25i32; +pub const UBLOCK_TIBETAN: UBlockCode = 27i32; +pub const UBLOCK_TIFINAGH: UBlockCode = 144i32; +pub const UBLOCK_TIRHUTA: UBlockCode = 251i32; +pub const UBLOCK_TRANSPORT_AND_MAP_SYMBOLS: UBlockCode = 207i32; +pub const UBLOCK_UGARITIC: UBlockCode = 120i32; +pub const UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS: UBlockCode = 33i32; +pub const UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED: UBlockCode = 173i32; +pub const UBLOCK_VAI: UBlockCode = 159i32; +pub const UBLOCK_VARIATION_SELECTORS: UBlockCode = 108i32; +pub const UBLOCK_VARIATION_SELECTORS_SUPPLEMENT: UBlockCode = 125i32; +pub const UBLOCK_VEDIC_EXTENSIONS: UBlockCode = 175i32; +pub const UBLOCK_VERTICAL_FORMS: UBlockCode = 145i32; +pub const UBLOCK_WANCHO: UBlockCode = 300i32; +pub const UBLOCK_WARANG_CITI: UBlockCode = 252i32; +pub const UBLOCK_YEZIDI: UBlockCode = 308i32; +pub const UBLOCK_YIJING_HEXAGRAM_SYMBOLS: UBlockCode = 116i32; +pub const UBLOCK_YI_RADICALS: UBlockCode = 73i32; +pub const UBLOCK_YI_SYLLABLES: UBlockCode = 72i32; +pub const UBLOCK_ZANABAZAR_SQUARE: UBlockCode = 280i32; +pub const UBRK_CHARACTER: UBreakIteratorType = 0i32; +pub const UBRK_LINE: UBreakIteratorType = 2i32; +pub const UBRK_LINE_HARD: ULineBreakTag = 100i32; +pub const UBRK_LINE_HARD_LIMIT: ULineBreakTag = 200i32; +pub const UBRK_LINE_SOFT: ULineBreakTag = 0i32; +pub const UBRK_LINE_SOFT_LIMIT: ULineBreakTag = 100i32; +pub const UBRK_SENTENCE: UBreakIteratorType = 3i32; +pub const UBRK_SENTENCE_SEP: USentenceBreakTag = 100i32; +pub const UBRK_SENTENCE_SEP_LIMIT: USentenceBreakTag = 200i32; +pub const UBRK_SENTENCE_TERM: USentenceBreakTag = 0i32; +pub const UBRK_SENTENCE_TERM_LIMIT: USentenceBreakTag = 100i32; +pub const UBRK_WORD: UBreakIteratorType = 1i32; +pub const UBRK_WORD_IDEO: UWordBreak = 400i32; +pub const UBRK_WORD_IDEO_LIMIT: UWordBreak = 500i32; +pub const UBRK_WORD_KANA: UWordBreak = 300i32; +pub const UBRK_WORD_KANA_LIMIT: UWordBreak = 400i32; +pub const UBRK_WORD_LETTER: UWordBreak = 200i32; +pub const UBRK_WORD_LETTER_LIMIT: UWordBreak = 300i32; +pub const UBRK_WORD_NONE: UWordBreak = 0i32; +pub const UBRK_WORD_NONE_LIMIT: UWordBreak = 100i32; +pub const UBRK_WORD_NUMBER: UWordBreak = 100i32; +pub const UBRK_WORD_NUMBER_LIMIT: UWordBreak = 200i32; +pub type UBiDi = isize; +pub type UBiDiClassCallback = Option UCharDirection>; +pub type UBiDiDirection = i32; +pub type UBiDiMirroring = i32; +pub type UBiDiOrder = i32; +pub type UBiDiReorderingMode = i32; +pub type UBiDiReorderingOption = i32; +pub type UBiDiTransform = isize; +pub type UBidiPairedBracketType = i32; +pub type UBlockCode = i32; +pub type UBreakIterator = isize; +pub type UBreakIteratorType = i32; +pub const UCAL_ACTUAL_MAXIMUM: UCalendarLimitType = 5i32; +pub const UCAL_ACTUAL_MINIMUM: UCalendarLimitType = 4i32; +pub const UCAL_AM: UCalendarAMPMs = 0i32; +pub const UCAL_AM_PM: UCalendarDateFields = 9i32; +pub const UCAL_APRIL: UCalendarMonths = 3i32; +pub const UCAL_AUGUST: UCalendarMonths = 7i32; +pub const UCAL_DATE: UCalendarDateFields = 5i32; +pub const UCAL_DAY_OF_MONTH: UCalendarDateFields = 5i32; +pub const UCAL_DAY_OF_WEEK: UCalendarDateFields = 7i32; +pub const UCAL_DAY_OF_WEEK_IN_MONTH: UCalendarDateFields = 8i32; +pub const UCAL_DAY_OF_YEAR: UCalendarDateFields = 6i32; +pub const UCAL_DECEMBER: UCalendarMonths = 11i32; +pub const UCAL_DEFAULT: UCalendarType = 0i32; +pub const UCAL_DOW_LOCAL: UCalendarDateFields = 18i32; +pub const UCAL_DST: UCalendarDisplayNameType = 2i32; +pub const UCAL_DST_OFFSET: UCalendarDateFields = 16i32; +pub const UCAL_ERA: UCalendarDateFields = 0i32; +pub const UCAL_EXTENDED_YEAR: UCalendarDateFields = 19i32; +pub const UCAL_FEBRUARY: UCalendarMonths = 1i32; +pub const UCAL_FIELD_COUNT: UCalendarDateFields = 23i32; +pub const UCAL_FIRST_DAY_OF_WEEK: UCalendarAttribute = 1i32; +pub const UCAL_FRIDAY: UCalendarDaysOfWeek = 6i32; +pub const UCAL_GREATEST_MINIMUM: UCalendarLimitType = 2i32; +pub const UCAL_GREGORIAN: UCalendarType = 1i32; +pub const UCAL_HOUR: UCalendarDateFields = 10i32; +pub const UCAL_HOUR_OF_DAY: UCalendarDateFields = 11i32; +pub const UCAL_IS_LEAP_MONTH: UCalendarDateFields = 22i32; +pub const UCAL_JANUARY: UCalendarMonths = 0i32; +pub const UCAL_JULIAN_DAY: UCalendarDateFields = 20i32; +pub const UCAL_JULY: UCalendarMonths = 6i32; +pub const UCAL_JUNE: UCalendarMonths = 5i32; +pub const UCAL_LEAST_MAXIMUM: UCalendarLimitType = 3i32; +pub const UCAL_LENIENT: UCalendarAttribute = 0i32; +pub const UCAL_MARCH: UCalendarMonths = 2i32; +pub const UCAL_MAXIMUM: UCalendarLimitType = 1i32; +pub const UCAL_MAY: UCalendarMonths = 4i32; +pub const UCAL_MILLISECOND: UCalendarDateFields = 14i32; +pub const UCAL_MILLISECONDS_IN_DAY: UCalendarDateFields = 21i32; +pub const UCAL_MINIMAL_DAYS_IN_FIRST_WEEK: UCalendarAttribute = 2i32; +pub const UCAL_MINIMUM: UCalendarLimitType = 0i32; +pub const UCAL_MINUTE: UCalendarDateFields = 12i32; +pub const UCAL_MONDAY: UCalendarDaysOfWeek = 2i32; +pub const UCAL_MONTH: UCalendarDateFields = 2i32; +pub const UCAL_NOVEMBER: UCalendarMonths = 10i32; +pub const UCAL_OCTOBER: UCalendarMonths = 9i32; +pub const UCAL_PM: UCalendarAMPMs = 1i32; +pub const UCAL_REPEATED_WALL_TIME: UCalendarAttribute = 3i32; +pub const UCAL_SATURDAY: UCalendarDaysOfWeek = 7i32; +pub const UCAL_SECOND: UCalendarDateFields = 13i32; +pub const UCAL_SEPTEMBER: UCalendarMonths = 8i32; +pub const UCAL_SHORT_DST: UCalendarDisplayNameType = 3i32; +pub const UCAL_SHORT_STANDARD: UCalendarDisplayNameType = 1i32; +pub const UCAL_SKIPPED_WALL_TIME: UCalendarAttribute = 4i32; +pub const UCAL_STANDARD: UCalendarDisplayNameType = 0i32; +pub const UCAL_SUNDAY: UCalendarDaysOfWeek = 1i32; +pub const UCAL_THURSDAY: UCalendarDaysOfWeek = 5i32; +pub const UCAL_TRADITIONAL: UCalendarType = 0i32; +pub const UCAL_TUESDAY: UCalendarDaysOfWeek = 3i32; +pub const UCAL_TZ_TRANSITION_NEXT: UTimeZoneTransitionType = 0i32; +pub const UCAL_TZ_TRANSITION_NEXT_INCLUSIVE: UTimeZoneTransitionType = 1i32; +pub const UCAL_TZ_TRANSITION_PREVIOUS: UTimeZoneTransitionType = 2i32; +pub const UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE: UTimeZoneTransitionType = 3i32; +pub const UCAL_UNDECIMBER: UCalendarMonths = 12i32; +pub const UCAL_UNKNOWN_ZONE_ID: windows_sys::core::PCSTR = windows_sys::core::s!("Etc/Unknown"); +pub const UCAL_WALLTIME_FIRST: UCalendarWallTimeOption = 1i32; +pub const UCAL_WALLTIME_LAST: UCalendarWallTimeOption = 0i32; +pub const UCAL_WALLTIME_NEXT_VALID: UCalendarWallTimeOption = 2i32; +pub const UCAL_WEDNESDAY: UCalendarDaysOfWeek = 4i32; +pub const UCAL_WEEKDAY: UCalendarWeekdayType = 0i32; +pub const UCAL_WEEKEND: UCalendarWeekdayType = 1i32; +pub const UCAL_WEEKEND_CEASE: UCalendarWeekdayType = 3i32; +pub const UCAL_WEEKEND_ONSET: UCalendarWeekdayType = 2i32; +pub const UCAL_WEEK_OF_MONTH: UCalendarDateFields = 4i32; +pub const UCAL_WEEK_OF_YEAR: UCalendarDateFields = 3i32; +pub const UCAL_YEAR: UCalendarDateFields = 1i32; +pub const UCAL_YEAR_WOY: UCalendarDateFields = 17i32; +pub const UCAL_ZONE_OFFSET: UCalendarDateFields = 15i32; +pub const UCAL_ZONE_TYPE_ANY: USystemTimeZoneType = 0i32; +pub const UCAL_ZONE_TYPE_CANONICAL: USystemTimeZoneType = 1i32; +pub const UCAL_ZONE_TYPE_CANONICAL_LOCATION: USystemTimeZoneType = 2i32; +pub const UCHAR_AGE: UProperty = 16384i32; +pub const UCHAR_ALPHABETIC: UProperty = 0i32; +pub const UCHAR_ASCII_HEX_DIGIT: UProperty = 1i32; +pub const UCHAR_BIDI_CLASS: UProperty = 4096i32; +pub const UCHAR_BIDI_CONTROL: UProperty = 2i32; +pub const UCHAR_BIDI_MIRRORED: UProperty = 3i32; +pub const UCHAR_BIDI_MIRRORING_GLYPH: UProperty = 16385i32; +pub const UCHAR_BIDI_PAIRED_BRACKET: UProperty = 16397i32; +pub const UCHAR_BIDI_PAIRED_BRACKET_TYPE: UProperty = 4117i32; +pub const UCHAR_BINARY_START: UProperty = 0i32; +pub const UCHAR_BLOCK: UProperty = 4097i32; +pub const UCHAR_CANONICAL_COMBINING_CLASS: UProperty = 4098i32; +pub const UCHAR_CASED: UProperty = 49i32; +pub const UCHAR_CASE_FOLDING: UProperty = 16386i32; +pub const UCHAR_CASE_IGNORABLE: UProperty = 50i32; +pub const UCHAR_CASE_SENSITIVE: UProperty = 34i32; +pub const UCHAR_CHANGES_WHEN_CASEFOLDED: UProperty = 54i32; +pub const UCHAR_CHANGES_WHEN_CASEMAPPED: UProperty = 55i32; +pub const UCHAR_CHANGES_WHEN_LOWERCASED: UProperty = 51i32; +pub const UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED: UProperty = 56i32; +pub const UCHAR_CHANGES_WHEN_TITLECASED: UProperty = 53i32; +pub const UCHAR_CHANGES_WHEN_UPPERCASED: UProperty = 52i32; +pub const UCHAR_DASH: UProperty = 4i32; +pub const UCHAR_DECOMPOSITION_TYPE: UProperty = 4099i32; +pub const UCHAR_DEFAULT_IGNORABLE_CODE_POINT: UProperty = 5i32; +pub const UCHAR_DEPRECATED: UProperty = 6i32; +pub const UCHAR_DIACRITIC: UProperty = 7i32; +pub const UCHAR_DOUBLE_START: UProperty = 12288i32; +pub const UCHAR_EAST_ASIAN_WIDTH: UProperty = 4100i32; +pub const UCHAR_EMOJI: UProperty = 57i32; +pub const UCHAR_EMOJI_COMPONENT: UProperty = 61i32; +pub const UCHAR_EMOJI_MODIFIER: UProperty = 59i32; +pub const UCHAR_EMOJI_MODIFIER_BASE: UProperty = 60i32; +pub const UCHAR_EMOJI_PRESENTATION: UProperty = 58i32; +pub const UCHAR_EXTENDED_PICTOGRAPHIC: UProperty = 64i32; +pub const UCHAR_EXTENDER: UProperty = 8i32; +pub const UCHAR_FULL_COMPOSITION_EXCLUSION: UProperty = 9i32; +pub const UCHAR_GENERAL_CATEGORY: UProperty = 4101i32; +pub const UCHAR_GENERAL_CATEGORY_MASK: UProperty = 8192i32; +pub const UCHAR_GRAPHEME_BASE: UProperty = 10i32; +pub const UCHAR_GRAPHEME_CLUSTER_BREAK: UProperty = 4114i32; +pub const UCHAR_GRAPHEME_EXTEND: UProperty = 11i32; +pub const UCHAR_GRAPHEME_LINK: UProperty = 12i32; +pub const UCHAR_HANGUL_SYLLABLE_TYPE: UProperty = 4107i32; +pub const UCHAR_HEX_DIGIT: UProperty = 13i32; +pub const UCHAR_HYPHEN: UProperty = 14i32; +pub const UCHAR_IDEOGRAPHIC: UProperty = 17i32; +pub const UCHAR_IDS_BINARY_OPERATOR: UProperty = 18i32; +pub const UCHAR_IDS_TRINARY_OPERATOR: UProperty = 19i32; +pub const UCHAR_ID_CONTINUE: UProperty = 15i32; +pub const UCHAR_ID_START: UProperty = 16i32; +pub const UCHAR_INDIC_POSITIONAL_CATEGORY: UProperty = 4118i32; +pub const UCHAR_INDIC_SYLLABIC_CATEGORY: UProperty = 4119i32; +pub const UCHAR_INT_START: UProperty = 4096i32; +pub const UCHAR_INVALID_CODE: UProperty = -1i32; +pub const UCHAR_JOINING_GROUP: UProperty = 4102i32; +pub const UCHAR_JOINING_TYPE: UProperty = 4103i32; +pub const UCHAR_JOIN_CONTROL: UProperty = 20i32; +pub const UCHAR_LEAD_CANONICAL_COMBINING_CLASS: UProperty = 4112i32; +pub const UCHAR_LINE_BREAK: UProperty = 4104i32; +pub const UCHAR_LOGICAL_ORDER_EXCEPTION: UProperty = 21i32; +pub const UCHAR_LOWERCASE: UProperty = 22i32; +pub const UCHAR_LOWERCASE_MAPPING: UProperty = 16388i32; +pub const UCHAR_MASK_START: UProperty = 8192i32; +pub const UCHAR_MATH: UProperty = 23i32; +pub const UCHAR_MAX_VALUE: u32 = 1114111u32; +pub const UCHAR_MIN_VALUE: u32 = 0u32; +pub const UCHAR_NAME: UProperty = 16389i32; +pub const UCHAR_NFC_INERT: UProperty = 39i32; +pub const UCHAR_NFC_QUICK_CHECK: UProperty = 4110i32; +pub const UCHAR_NFD_INERT: UProperty = 37i32; +pub const UCHAR_NFD_QUICK_CHECK: UProperty = 4108i32; +pub const UCHAR_NFKC_INERT: UProperty = 40i32; +pub const UCHAR_NFKC_QUICK_CHECK: UProperty = 4111i32; +pub const UCHAR_NFKD_INERT: UProperty = 38i32; +pub const UCHAR_NFKD_QUICK_CHECK: UProperty = 4109i32; +pub const UCHAR_NONCHARACTER_CODE_POINT: UProperty = 24i32; +pub const UCHAR_NUMERIC_TYPE: UProperty = 4105i32; +pub const UCHAR_NUMERIC_VALUE: UProperty = 12288i32; +pub const UCHAR_OTHER_PROPERTY_START: UProperty = 28672i32; +pub const UCHAR_PATTERN_SYNTAX: UProperty = 42i32; +pub const UCHAR_PATTERN_WHITE_SPACE: UProperty = 43i32; +pub const UCHAR_POSIX_ALNUM: UProperty = 44i32; +pub const UCHAR_POSIX_BLANK: UProperty = 45i32; +pub const UCHAR_POSIX_GRAPH: UProperty = 46i32; +pub const UCHAR_POSIX_PRINT: UProperty = 47i32; +pub const UCHAR_POSIX_XDIGIT: UProperty = 48i32; +pub const UCHAR_PREPENDED_CONCATENATION_MARK: UProperty = 63i32; +pub const UCHAR_QUOTATION_MARK: UProperty = 25i32; +pub const UCHAR_RADICAL: UProperty = 26i32; +pub const UCHAR_REGIONAL_INDICATOR: UProperty = 62i32; +pub const UCHAR_SCRIPT: UProperty = 4106i32; +pub const UCHAR_SCRIPT_EXTENSIONS: UProperty = 28672i32; +pub const UCHAR_SEGMENT_STARTER: UProperty = 41i32; +pub const UCHAR_SENTENCE_BREAK: UProperty = 4115i32; +pub const UCHAR_SIMPLE_CASE_FOLDING: UProperty = 16390i32; +pub const UCHAR_SIMPLE_LOWERCASE_MAPPING: UProperty = 16391i32; +pub const UCHAR_SIMPLE_TITLECASE_MAPPING: UProperty = 16392i32; +pub const UCHAR_SIMPLE_UPPERCASE_MAPPING: UProperty = 16393i32; +pub const UCHAR_SOFT_DOTTED: UProperty = 27i32; +pub const UCHAR_STRING_START: UProperty = 16384i32; +pub const UCHAR_S_TERM: UProperty = 35i32; +pub const UCHAR_TERMINAL_PUNCTUATION: UProperty = 28i32; +pub const UCHAR_TITLECASE_MAPPING: UProperty = 16394i32; +pub const UCHAR_TRAIL_CANONICAL_COMBINING_CLASS: UProperty = 4113i32; +pub const UCHAR_UNIFIED_IDEOGRAPH: UProperty = 29i32; +pub const UCHAR_UPPERCASE: UProperty = 30i32; +pub const UCHAR_UPPERCASE_MAPPING: UProperty = 16396i32; +pub const UCHAR_VARIATION_SELECTOR: UProperty = 36i32; +pub const UCHAR_VERTICAL_ORIENTATION: UProperty = 4120i32; +pub const UCHAR_WHITE_SPACE: UProperty = 31i32; +pub const UCHAR_WORD_BREAK: UProperty = 4116i32; +pub const UCHAR_XID_CONTINUE: UProperty = 32i32; +pub const UCHAR_XID_START: UProperty = 33i32; +pub const UCLN_NO_AUTO_CLEANUP: u32 = 1u32; +pub const UCNV_BOCU1: UConverterType = 28i32; +pub const UCNV_CESU8: UConverterType = 31i32; +pub const UCNV_CLONE: UConverterCallbackReason = 5i32; +pub const UCNV_CLOSE: UConverterCallbackReason = 4i32; +pub const UCNV_COMPOUND_TEXT: UConverterType = 33i32; +pub const UCNV_DBCS: UConverterType = 1i32; +pub const UCNV_EBCDIC_STATEFUL: UConverterType = 9i32; +pub const UCNV_ESCAPE_C: windows_sys::core::PCSTR = windows_sys::core::s!("C"); +pub const UCNV_ESCAPE_CSS2: windows_sys::core::PCSTR = windows_sys::core::s!("S"); +pub const UCNV_ESCAPE_JAVA: windows_sys::core::PCSTR = windows_sys::core::s!("J"); +pub const UCNV_ESCAPE_UNICODE: windows_sys::core::PCSTR = windows_sys::core::s!("U"); +pub const UCNV_ESCAPE_XML_DEC: windows_sys::core::PCSTR = windows_sys::core::s!("D"); +pub const UCNV_ESCAPE_XML_HEX: windows_sys::core::PCSTR = windows_sys::core::s!("X"); +pub const UCNV_HZ: UConverterType = 23i32; +pub const UCNV_IBM: UConverterPlatform = 0i32; +pub const UCNV_ILLEGAL: UConverterCallbackReason = 1i32; +pub const UCNV_IMAP_MAILBOX: UConverterType = 32i32; +pub const UCNV_IRREGULAR: UConverterCallbackReason = 2i32; +pub const UCNV_ISCII: UConverterType = 25i32; +pub const UCNV_ISO_2022: UConverterType = 10i32; +pub const UCNV_LATIN_1: UConverterType = 3i32; +pub const UCNV_LMBCS_1: UConverterType = 11i32; +pub const UCNV_LMBCS_11: UConverterType = 18i32; +pub const UCNV_LMBCS_16: UConverterType = 19i32; +pub const UCNV_LMBCS_17: UConverterType = 20i32; +pub const UCNV_LMBCS_18: UConverterType = 21i32; +pub const UCNV_LMBCS_19: UConverterType = 22i32; +pub const UCNV_LMBCS_2: UConverterType = 12i32; +pub const UCNV_LMBCS_3: UConverterType = 13i32; +pub const UCNV_LMBCS_4: UConverterType = 14i32; +pub const UCNV_LMBCS_5: UConverterType = 15i32; +pub const UCNV_LMBCS_6: UConverterType = 16i32; +pub const UCNV_LMBCS_8: UConverterType = 17i32; +pub const UCNV_LMBCS_LAST: UConverterType = 22i32; +pub const UCNV_LOCALE_OPTION_STRING: windows_sys::core::PCSTR = windows_sys::core::s!(",locale="); +pub const UCNV_MAX_CONVERTER_NAME_LENGTH: u32 = 60u32; +pub const UCNV_MBCS: UConverterType = 2i32; +pub const UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES: UConverterType = 34i32; +pub const UCNV_OPTION_SEP_STRING: windows_sys::core::PCSTR = windows_sys::core::s!(","); +pub const UCNV_RESET: UConverterCallbackReason = 3i32; +pub const UCNV_ROUNDTRIP_AND_FALLBACK_SET: UConverterUnicodeSet = 1i32; +pub const UCNV_ROUNDTRIP_SET: UConverterUnicodeSet = 0i32; +pub const UCNV_SBCS: UConverterType = 0i32; +pub const UCNV_SCSU: UConverterType = 24i32; +pub const UCNV_SI: u32 = 15u32; +pub const UCNV_SKIP_STOP_ON_ILLEGAL: windows_sys::core::PCSTR = windows_sys::core::s!("i"); +pub const UCNV_SO: u32 = 14u32; +pub const UCNV_SUB_STOP_ON_ILLEGAL: windows_sys::core::PCSTR = windows_sys::core::s!("i"); +pub const UCNV_SWAP_LFNL_OPTION_STRING: windows_sys::core::PCSTR = windows_sys::core::s!(",swaplfnl"); +pub const UCNV_UNASSIGNED: UConverterCallbackReason = 0i32; +pub const UCNV_UNKNOWN: UConverterPlatform = -1i32; +pub const UCNV_UNSUPPORTED_CONVERTER: UConverterType = -1i32; +pub const UCNV_US_ASCII: UConverterType = 26i32; +pub const UCNV_UTF16: UConverterType = 29i32; +pub const UCNV_UTF16_BigEndian: UConverterType = 5i32; +pub const UCNV_UTF16_LittleEndian: UConverterType = 6i32; +pub const UCNV_UTF32: UConverterType = 30i32; +pub const UCNV_UTF32_BigEndian: UConverterType = 7i32; +pub const UCNV_UTF32_LittleEndian: UConverterType = 8i32; +pub const UCNV_UTF7: UConverterType = 27i32; +pub const UCNV_UTF8: UConverterType = 4i32; +pub const UCNV_VALUE_SEP_STRING: windows_sys::core::PCSTR = windows_sys::core::s!("="); +pub const UCNV_VERSION_OPTION_STRING: windows_sys::core::PCSTR = windows_sys::core::s!(",version="); +pub const UCOL_ALTERNATE_HANDLING: UColAttribute = 1i32; +pub const UCOL_ATTRIBUTE_COUNT: UColAttribute = 8i32; +pub const UCOL_BOUND_LOWER: UColBoundMode = 0i32; +pub const UCOL_BOUND_UPPER: UColBoundMode = 1i32; +pub const UCOL_BOUND_UPPER_LONG: UColBoundMode = 2i32; +pub const UCOL_CASE_FIRST: UColAttribute = 2i32; +pub const UCOL_CASE_LEVEL: UColAttribute = 3i32; +pub const UCOL_CE_STRENGTH_LIMIT: UColAttributeValue = 3i32; +pub const UCOL_DECOMPOSITION_MODE: UColAttribute = 4i32; +pub const UCOL_DEFAULT: UColAttributeValue = -1i32; +pub const UCOL_DEFAULT_STRENGTH: UColAttributeValue = 2i32; +pub const UCOL_EQUAL: UCollationResult = 0i32; +pub const UCOL_FRENCH_COLLATION: UColAttribute = 0i32; +pub const UCOL_FULL_RULES: UColRuleOption = 1i32; +pub const UCOL_GREATER: UCollationResult = 1i32; +pub const UCOL_IDENTICAL: UColAttributeValue = 15i32; +pub const UCOL_LESS: UCollationResult = -1i32; +pub const UCOL_LOWER_FIRST: UColAttributeValue = 24i32; +pub const UCOL_NON_IGNORABLE: UColAttributeValue = 21i32; +pub const UCOL_NORMALIZATION_MODE: UColAttribute = 4i32; +pub const UCOL_NUMERIC_COLLATION: UColAttribute = 7i32; +pub const UCOL_OFF: UColAttributeValue = 16i32; +pub const UCOL_ON: UColAttributeValue = 17i32; +pub const UCOL_PRIMARY: UColAttributeValue = 0i32; +pub const UCOL_QUATERNARY: UColAttributeValue = 3i32; +pub const UCOL_REORDER_CODE_CURRENCY: UColReorderCode = 4099i32; +pub const UCOL_REORDER_CODE_DEFAULT: UColReorderCode = -1i32; +pub const UCOL_REORDER_CODE_DIGIT: UColReorderCode = 4100i32; +pub const UCOL_REORDER_CODE_FIRST: UColReorderCode = 4096i32; +pub const UCOL_REORDER_CODE_NONE: UColReorderCode = 103i32; +pub const UCOL_REORDER_CODE_OTHERS: UColReorderCode = 103i32; +pub const UCOL_REORDER_CODE_PUNCTUATION: UColReorderCode = 4097i32; +pub const UCOL_REORDER_CODE_SPACE: UColReorderCode = 4096i32; +pub const UCOL_REORDER_CODE_SYMBOL: UColReorderCode = 4098i32; +pub const UCOL_SECONDARY: UColAttributeValue = 1i32; +pub const UCOL_SHIFTED: UColAttributeValue = 20i32; +pub const UCOL_STRENGTH: UColAttribute = 5i32; +pub const UCOL_STRENGTH_LIMIT: UColAttributeValue = 16i32; +pub const UCOL_TAILORING_ONLY: UColRuleOption = 0i32; +pub const UCOL_TERTIARY: UColAttributeValue = 2i32; +pub const UCOL_UPPER_FIRST: UColAttributeValue = 25i32; +pub const UCONFIG_ENABLE_PLUGINS: u32 = 0u32; +pub const UCONFIG_FORMAT_FASTPATHS_49: u32 = 1u32; +pub const UCONFIG_HAVE_PARSEALLINPUT: u32 = 1u32; +pub const UCONFIG_NO_BREAK_ITERATION: u32 = 1u32; +pub const UCONFIG_NO_COLLATION: u32 = 1u32; +pub const UCONFIG_NO_CONVERSION: u32 = 0u32; +pub const UCONFIG_NO_FILE_IO: u32 = 0u32; +pub const UCONFIG_NO_FILTERED_BREAK_ITERATION: u32 = 0u32; +pub const UCONFIG_NO_FORMATTING: u32 = 1u32; +pub const UCONFIG_NO_IDNA: u32 = 1u32; +pub const UCONFIG_NO_LEGACY_CONVERSION: u32 = 1u32; +pub const UCONFIG_NO_NORMALIZATION: u32 = 0u32; +pub const UCONFIG_NO_REGULAR_EXPRESSIONS: u32 = 1u32; +pub const UCONFIG_NO_SERVICE: u32 = 0u32; +pub const UCONFIG_NO_TRANSLITERATION: u32 = 1u32; +pub const UCONFIG_ONLY_COLLATION: u32 = 0u32; +pub const UCONFIG_ONLY_HTML_CONVERSION: u32 = 0u32; +pub const UCPMAP_RANGE_FIXED_ALL_SURROGATES: UCPMapRangeOption = 2i32; +pub const UCPMAP_RANGE_FIXED_LEAD_SURROGATES: UCPMapRangeOption = 1i32; +pub const UCPMAP_RANGE_NORMAL: UCPMapRangeOption = 0i32; +pub type UCPMap = isize; +pub type UCPMapRangeOption = i32; +pub type UCPMapValueFilter = Option u32>; +pub const UCPTRIE_ERROR_VALUE_NEG_DATA_OFFSET: i32 = 1i32; +pub const UCPTRIE_FAST_DATA_BLOCK_LENGTH: i32 = 64i32; +pub const UCPTRIE_FAST_DATA_MASK: i32 = 63i32; +pub const UCPTRIE_FAST_SHIFT: i32 = 6i32; +pub const UCPTRIE_HIGH_VALUE_NEG_DATA_OFFSET: i32 = 2i32; +pub const UCPTRIE_SMALL_MAX: i32 = 4095i32; +pub const UCPTRIE_TYPE_ANY: UCPTrieType = -1i32; +pub const UCPTRIE_TYPE_FAST: UCPTrieType = 0i32; +pub const UCPTRIE_TYPE_SMALL: UCPTrieType = 1i32; +pub const UCPTRIE_VALUE_BITS_16: UCPTrieValueWidth = 0i32; +pub const UCPTRIE_VALUE_BITS_32: UCPTrieValueWidth = 1i32; +pub const UCPTRIE_VALUE_BITS_8: UCPTrieValueWidth = 2i32; +pub const UCPTRIE_VALUE_BITS_ANY: UCPTrieValueWidth = -1i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UCPTrie { + pub index: *const u16, + pub data: UCPTrieData, + pub indexLength: i32, + pub dataLength: i32, + pub highStart: i32, + pub shifted12HighStart: u16, + pub r#type: i8, + pub valueWidth: i8, + pub reserved32: u32, + pub reserved16: u16, + pub index3NullOffset: u16, + pub dataNullOffset: i32, + pub nullValue: u32, +} +impl Default for UCPTrie { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union UCPTrieData { + pub ptr0: *const core::ffi::c_void, + pub ptr16: *const u16, + pub ptr32: *const u32, + pub ptr8: *const u8, +} +impl Default for UCPTrieData { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type UCPTrieType = i32; +pub type UCPTrieValueWidth = i32; +pub const UCURR_ALL: UCurrCurrencyType = 2147483647i32; +pub const UCURR_COMMON: UCurrCurrencyType = 1i32; +pub const UCURR_DEPRECATED: UCurrCurrencyType = 4i32; +pub const UCURR_LONG_NAME: UCurrNameStyle = 1i32; +pub const UCURR_NARROW_SYMBOL_NAME: UCurrNameStyle = 2i32; +pub const UCURR_NON_DEPRECATED: UCurrCurrencyType = 8i32; +pub const UCURR_SYMBOL_NAME: UCurrNameStyle = 0i32; +pub const UCURR_UNCOMMON: UCurrCurrencyType = 2i32; +pub const UCURR_USAGE_CASH: UCurrencyUsage = 1i32; +pub const UCURR_USAGE_STANDARD: UCurrencyUsage = 0i32; +pub type UCalendarAMPMs = i32; +pub type UCalendarAttribute = i32; +pub type UCalendarDateFields = i32; +pub type UCalendarDaysOfWeek = i32; +pub type UCalendarDisplayNameType = i32; +pub type UCalendarLimitType = i32; +pub type UCalendarMonths = i32; +pub type UCalendarType = i32; +pub type UCalendarWallTimeOption = i32; +pub type UCalendarWeekdayType = i32; +pub type UCaseMap = isize; +pub type UCharCategory = i32; +pub type UCharDirection = i32; +pub type UCharEnumTypeRange = Option i8>; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UCharIterator { + pub context: *const core::ffi::c_void, + pub length: i32, + pub start: i32, + pub index: i32, + pub limit: i32, + pub reservedField: i32, + pub getIndex: UCharIteratorGetIndex, + pub r#move: UCharIteratorMove, + pub hasNext: UCharIteratorHasNext, + pub hasPrevious: UCharIteratorHasPrevious, + pub current: UCharIteratorCurrent, + pub next: UCharIteratorNext, + pub previous: UCharIteratorPrevious, + pub reservedFn: UCharIteratorReserved, + pub getState: UCharIteratorGetState, + pub setState: UCharIteratorSetState, +} +impl Default for UCharIterator { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type UCharIteratorCurrent = Option i32>; +pub type UCharIteratorGetIndex = Option i32>; +pub type UCharIteratorGetState = Option u32>; +pub type UCharIteratorHasNext = Option i8>; +pub type UCharIteratorHasPrevious = Option i8>; +pub type UCharIteratorMove = Option i32>; +pub type UCharIteratorNext = Option i32>; +pub type UCharIteratorOrigin = i32; +pub type UCharIteratorPrevious = Option i32>; +pub type UCharIteratorReserved = Option i32>; +pub type UCharIteratorSetState = Option; +pub type UCharNameChoice = i32; +pub type UCharsetDetector = isize; +pub type UCharsetMatch = isize; +pub type UColAttribute = i32; +pub type UColAttributeValue = i32; +pub type UColBoundMode = i32; +pub type UColReorderCode = i32; +pub type UColRuleOption = i32; +pub type UCollationElements = isize; +pub type UCollationResult = i32; +pub type UCollator = isize; +pub type UConstrainedFieldPosition = isize; +pub type UConverter = isize; +pub type UConverterCallbackReason = i32; +pub type UConverterFromUCallback = Option; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UConverterFromUnicodeArgs { + pub size: u16, + pub flush: i8, + pub converter: *mut UConverter, + pub source: *const u16, + pub sourceLimit: *const u16, + pub target: windows_sys::core::PSTR, + pub targetLimit: windows_sys::core::PCSTR, + pub offsets: *mut i32, +} +impl Default for UConverterFromUnicodeArgs { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type UConverterPlatform = i32; +pub type UConverterSelector = isize; +pub type UConverterToUCallback = Option; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UConverterToUnicodeArgs { + pub size: u16, + pub flush: i8, + pub converter: *mut UConverter, + pub source: windows_sys::core::PCSTR, + pub sourceLimit: windows_sys::core::PCSTR, + pub target: *mut u16, + pub targetLimit: *const u16, + pub offsets: *mut i32, +} +impl Default for UConverterToUnicodeArgs { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type UConverterType = i32; +pub type UConverterUnicodeSet = i32; +pub type UCurrCurrencyType = i32; +pub type UCurrNameStyle = i32; +pub type UCurrencySpacing = i32; +pub type UCurrencyUsage = i32; +pub const UDATPG_ABBREVIATED: UDateTimePGDisplayWidth = 1i32; +pub const UDATPG_BASE_CONFLICT: UDateTimePatternConflict = 1i32; +pub const UDATPG_CONFLICT: UDateTimePatternConflict = 2i32; +pub const UDATPG_DAYPERIOD_FIELD: UDateTimePatternField = 10i32; +pub const UDATPG_DAY_FIELD: UDateTimePatternField = 9i32; +pub const UDATPG_DAY_OF_WEEK_IN_MONTH_FIELD: UDateTimePatternField = 8i32; +pub const UDATPG_DAY_OF_YEAR_FIELD: UDateTimePatternField = 7i32; +pub const UDATPG_ERA_FIELD: UDateTimePatternField = 0i32; +pub const UDATPG_FIELD_COUNT: UDateTimePatternField = 16i32; +pub const UDATPG_FRACTIONAL_SECOND_FIELD: UDateTimePatternField = 14i32; +pub const UDATPG_HOUR_FIELD: UDateTimePatternField = 11i32; +pub const UDATPG_MATCH_ALL_FIELDS_LENGTH: UDateTimePatternMatchOptions = 65535i32; +pub const UDATPG_MATCH_HOUR_FIELD_LENGTH: UDateTimePatternMatchOptions = 2048i32; +pub const UDATPG_MATCH_NO_OPTIONS: UDateTimePatternMatchOptions = 0i32; +pub const UDATPG_MINUTE_FIELD: UDateTimePatternField = 12i32; +pub const UDATPG_MONTH_FIELD: UDateTimePatternField = 3i32; +pub const UDATPG_NARROW: UDateTimePGDisplayWidth = 2i32; +pub const UDATPG_NO_CONFLICT: UDateTimePatternConflict = 0i32; +pub const UDATPG_QUARTER_FIELD: UDateTimePatternField = 2i32; +pub const UDATPG_SECOND_FIELD: UDateTimePatternField = 13i32; +pub const UDATPG_WEEKDAY_FIELD: UDateTimePatternField = 6i32; +pub const UDATPG_WEEK_OF_MONTH_FIELD: UDateTimePatternField = 5i32; +pub const UDATPG_WEEK_OF_YEAR_FIELD: UDateTimePatternField = 4i32; +pub const UDATPG_WIDE: UDateTimePGDisplayWidth = 0i32; +pub const UDATPG_YEAR_FIELD: UDateTimePatternField = 1i32; +pub const UDATPG_ZONE_FIELD: UDateTimePatternField = 15i32; +pub const UDAT_ABBR_GENERIC_TZ: windows_sys::core::PCSTR = windows_sys::core::s!("v"); +pub const UDAT_ABBR_MONTH: windows_sys::core::PCSTR = windows_sys::core::s!("MMM"); +pub const UDAT_ABBR_MONTH_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("MMMd"); +pub const UDAT_ABBR_MONTH_WEEKDAY_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("MMMEd"); +pub const UDAT_ABBR_QUARTER: windows_sys::core::PCSTR = windows_sys::core::s!("QQQ"); +pub const UDAT_ABBR_SPECIFIC_TZ: windows_sys::core::PCSTR = windows_sys::core::s!("z"); +pub const UDAT_ABBR_UTC_TZ: windows_sys::core::PCSTR = windows_sys::core::s!("ZZZZ"); +pub const UDAT_ABBR_WEEKDAY: windows_sys::core::PCSTR = windows_sys::core::s!("E"); +pub const UDAT_ABSOLUTE_DAY: UDateAbsoluteUnit = 7i32; +pub const UDAT_ABSOLUTE_FRIDAY: UDateAbsoluteUnit = 5i32; +pub const UDAT_ABSOLUTE_MONDAY: UDateAbsoluteUnit = 1i32; +pub const UDAT_ABSOLUTE_MONTH: UDateAbsoluteUnit = 9i32; +pub const UDAT_ABSOLUTE_NOW: UDateAbsoluteUnit = 11i32; +pub const UDAT_ABSOLUTE_SATURDAY: UDateAbsoluteUnit = 6i32; +pub const UDAT_ABSOLUTE_SUNDAY: UDateAbsoluteUnit = 0i32; +pub const UDAT_ABSOLUTE_THURSDAY: UDateAbsoluteUnit = 4i32; +pub const UDAT_ABSOLUTE_TUESDAY: UDateAbsoluteUnit = 2i32; +pub const UDAT_ABSOLUTE_UNIT_COUNT: UDateAbsoluteUnit = 12i32; +pub const UDAT_ABSOLUTE_WEDNESDAY: UDateAbsoluteUnit = 3i32; +pub const UDAT_ABSOLUTE_WEEK: UDateAbsoluteUnit = 8i32; +pub const UDAT_ABSOLUTE_YEAR: UDateAbsoluteUnit = 10i32; +pub const UDAT_AM_PMS: UDateFormatSymbolType = 5i32; +pub const UDAT_AM_PM_FIELD: UDateFormatField = 14i32; +pub const UDAT_AM_PM_MIDNIGHT_NOON_FIELD: UDateFormatField = 35i32; +pub const UDAT_BOOLEAN_ATTRIBUTE_COUNT: UDateFormatBooleanAttribute = 4i32; +pub const UDAT_CYCLIC_YEARS_ABBREVIATED: UDateFormatSymbolType = 23i32; +pub const UDAT_CYCLIC_YEARS_NARROW: UDateFormatSymbolType = 24i32; +pub const UDAT_CYCLIC_YEARS_WIDE: UDateFormatSymbolType = 22i32; +pub const UDAT_DATE_FIELD: UDateFormatField = 3i32; +pub const UDAT_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("d"); +pub const UDAT_DAY_OF_WEEK_FIELD: UDateFormatField = 9i32; +pub const UDAT_DAY_OF_WEEK_IN_MONTH_FIELD: UDateFormatField = 11i32; +pub const UDAT_DAY_OF_YEAR_FIELD: UDateFormatField = 10i32; +pub const UDAT_DEFAULT: UDateFormatStyle = 2i32; +pub const UDAT_DIRECTION_COUNT: UDateDirection = 6i32; +pub const UDAT_DIRECTION_LAST: UDateDirection = 1i32; +pub const UDAT_DIRECTION_LAST_2: UDateDirection = 0i32; +pub const UDAT_DIRECTION_NEXT: UDateDirection = 3i32; +pub const UDAT_DIRECTION_NEXT_2: UDateDirection = 4i32; +pub const UDAT_DIRECTION_PLAIN: UDateDirection = 5i32; +pub const UDAT_DIRECTION_THIS: UDateDirection = 2i32; +pub const UDAT_DOW_LOCAL_FIELD: UDateFormatField = 19i32; +pub const UDAT_ERAS: UDateFormatSymbolType = 0i32; +pub const UDAT_ERA_FIELD: UDateFormatField = 0i32; +pub const UDAT_ERA_NAMES: UDateFormatSymbolType = 7i32; +pub const UDAT_EXTENDED_YEAR_FIELD: UDateFormatField = 20i32; +pub const UDAT_FLEXIBLE_DAY_PERIOD_FIELD: UDateFormatField = 36i32; +pub const UDAT_FRACTIONAL_SECOND_FIELD: UDateFormatField = 8i32; +pub const UDAT_FULL: UDateFormatStyle = 0i32; +pub const UDAT_FULL_RELATIVE: UDateFormatStyle = 128i32; +pub const UDAT_GENERIC_TZ: windows_sys::core::PCSTR = windows_sys::core::s!("vvvv"); +pub const UDAT_HOUR: windows_sys::core::PCSTR = windows_sys::core::s!("j"); +pub const UDAT_HOUR0_FIELD: UDateFormatField = 16i32; +pub const UDAT_HOUR1_FIELD: UDateFormatField = 15i32; +pub const UDAT_HOUR24: windows_sys::core::PCSTR = windows_sys::core::s!("H"); +pub const UDAT_HOUR24_MINUTE: windows_sys::core::PCSTR = windows_sys::core::s!("Hm"); +pub const UDAT_HOUR24_MINUTE_SECOND: windows_sys::core::PCSTR = windows_sys::core::s!("Hms"); +pub const UDAT_HOUR_MINUTE: windows_sys::core::PCSTR = windows_sys::core::s!("jm"); +pub const UDAT_HOUR_MINUTE_SECOND: windows_sys::core::PCSTR = windows_sys::core::s!("jms"); +pub const UDAT_HOUR_OF_DAY0_FIELD: UDateFormatField = 5i32; +pub const UDAT_HOUR_OF_DAY1_FIELD: UDateFormatField = 4i32; +pub const UDAT_JULIAN_DAY_FIELD: UDateFormatField = 21i32; +pub const UDAT_LOCALIZED_CHARS: UDateFormatSymbolType = 6i32; +pub const UDAT_LOCATION_TZ: windows_sys::core::PCSTR = windows_sys::core::s!("VVVV"); +pub const UDAT_LONG: UDateFormatStyle = 1i32; +pub const UDAT_LONG_RELATIVE: UDateFormatStyle = 129i32; +pub const UDAT_MEDIUM: UDateFormatStyle = 2i32; +pub const UDAT_MEDIUM_RELATIVE: UDateFormatStyle = 130i32; +pub const UDAT_MILLISECONDS_IN_DAY_FIELD: UDateFormatField = 22i32; +pub const UDAT_MINUTE: windows_sys::core::PCSTR = windows_sys::core::s!("m"); +pub const UDAT_MINUTE_FIELD: UDateFormatField = 6i32; +pub const UDAT_MINUTE_SECOND: windows_sys::core::PCSTR = windows_sys::core::s!("ms"); +pub const UDAT_MONTH: windows_sys::core::PCSTR = windows_sys::core::s!("MMMM"); +pub const UDAT_MONTHS: UDateFormatSymbolType = 1i32; +pub const UDAT_MONTH_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("MMMMd"); +pub const UDAT_MONTH_FIELD: UDateFormatField = 2i32; +pub const UDAT_MONTH_WEEKDAY_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("MMMMEEEEd"); +pub const UDAT_NARROW_MONTHS: UDateFormatSymbolType = 8i32; +pub const UDAT_NARROW_WEEKDAYS: UDateFormatSymbolType = 9i32; +pub const UDAT_NONE: UDateFormatStyle = -1i32; +pub const UDAT_NUM_MONTH: windows_sys::core::PCSTR = windows_sys::core::s!("M"); +pub const UDAT_NUM_MONTH_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("Md"); +pub const UDAT_NUM_MONTH_WEEKDAY_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("MEd"); +pub const UDAT_PARSE_ALLOW_NUMERIC: UDateFormatBooleanAttribute = 1i32; +pub const UDAT_PARSE_ALLOW_WHITESPACE: UDateFormatBooleanAttribute = 0i32; +pub const UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH: UDateFormatBooleanAttribute = 3i32; +pub const UDAT_PARSE_PARTIAL_LITERAL_MATCH: UDateFormatBooleanAttribute = 2i32; +pub const UDAT_PATTERN: UDateFormatStyle = -2i32; +pub const UDAT_QUARTER: windows_sys::core::PCSTR = windows_sys::core::s!("QQQQ"); +pub const UDAT_QUARTERS: UDateFormatSymbolType = 16i32; +pub const UDAT_QUARTER_FIELD: UDateFormatField = 27i32; +pub const UDAT_RELATIVE: UDateFormatStyle = 128i32; +pub const UDAT_RELATIVE_DAYS: UDateRelativeUnit = 3i32; +pub const UDAT_RELATIVE_HOURS: UDateRelativeUnit = 2i32; +pub const UDAT_RELATIVE_MINUTES: UDateRelativeUnit = 1i32; +pub const UDAT_RELATIVE_MONTHS: UDateRelativeUnit = 5i32; +pub const UDAT_RELATIVE_SECONDS: UDateRelativeUnit = 0i32; +pub const UDAT_RELATIVE_UNIT_COUNT: UDateRelativeUnit = 7i32; +pub const UDAT_RELATIVE_WEEKS: UDateRelativeUnit = 4i32; +pub const UDAT_RELATIVE_YEARS: UDateRelativeUnit = 6i32; +pub const UDAT_REL_LITERAL_FIELD: URelativeDateTimeFormatterField = 0i32; +pub const UDAT_REL_NUMERIC_FIELD: URelativeDateTimeFormatterField = 1i32; +pub const UDAT_REL_UNIT_DAY: URelativeDateTimeUnit = 4i32; +pub const UDAT_REL_UNIT_FRIDAY: URelativeDateTimeUnit = 13i32; +pub const UDAT_REL_UNIT_HOUR: URelativeDateTimeUnit = 5i32; +pub const UDAT_REL_UNIT_MINUTE: URelativeDateTimeUnit = 6i32; +pub const UDAT_REL_UNIT_MONDAY: URelativeDateTimeUnit = 9i32; +pub const UDAT_REL_UNIT_MONTH: URelativeDateTimeUnit = 2i32; +pub const UDAT_REL_UNIT_QUARTER: URelativeDateTimeUnit = 1i32; +pub const UDAT_REL_UNIT_SATURDAY: URelativeDateTimeUnit = 14i32; +pub const UDAT_REL_UNIT_SECOND: URelativeDateTimeUnit = 7i32; +pub const UDAT_REL_UNIT_SUNDAY: URelativeDateTimeUnit = 8i32; +pub const UDAT_REL_UNIT_THURSDAY: URelativeDateTimeUnit = 12i32; +pub const UDAT_REL_UNIT_TUESDAY: URelativeDateTimeUnit = 10i32; +pub const UDAT_REL_UNIT_WEDNESDAY: URelativeDateTimeUnit = 11i32; +pub const UDAT_REL_UNIT_WEEK: URelativeDateTimeUnit = 3i32; +pub const UDAT_REL_UNIT_YEAR: URelativeDateTimeUnit = 0i32; +pub const UDAT_SECOND: windows_sys::core::PCSTR = windows_sys::core::s!("s"); +pub const UDAT_SECOND_FIELD: UDateFormatField = 7i32; +pub const UDAT_SHORT: UDateFormatStyle = 3i32; +pub const UDAT_SHORTER_WEEKDAYS: UDateFormatSymbolType = 20i32; +pub const UDAT_SHORT_MONTHS: UDateFormatSymbolType = 2i32; +pub const UDAT_SHORT_QUARTERS: UDateFormatSymbolType = 17i32; +pub const UDAT_SHORT_RELATIVE: UDateFormatStyle = 131i32; +pub const UDAT_SHORT_WEEKDAYS: UDateFormatSymbolType = 4i32; +pub const UDAT_SPECIFIC_TZ: windows_sys::core::PCSTR = windows_sys::core::s!("zzzz"); +pub const UDAT_STANDALONE_DAY_FIELD: UDateFormatField = 25i32; +pub const UDAT_STANDALONE_MONTHS: UDateFormatSymbolType = 10i32; +pub const UDAT_STANDALONE_MONTH_FIELD: UDateFormatField = 26i32; +pub const UDAT_STANDALONE_NARROW_MONTHS: UDateFormatSymbolType = 12i32; +pub const UDAT_STANDALONE_NARROW_WEEKDAYS: UDateFormatSymbolType = 15i32; +pub const UDAT_STANDALONE_QUARTERS: UDateFormatSymbolType = 18i32; +pub const UDAT_STANDALONE_QUARTER_FIELD: UDateFormatField = 28i32; +pub const UDAT_STANDALONE_SHORTER_WEEKDAYS: UDateFormatSymbolType = 21i32; +pub const UDAT_STANDALONE_SHORT_MONTHS: UDateFormatSymbolType = 11i32; +pub const UDAT_STANDALONE_SHORT_QUARTERS: UDateFormatSymbolType = 19i32; +pub const UDAT_STANDALONE_SHORT_WEEKDAYS: UDateFormatSymbolType = 14i32; +pub const UDAT_STANDALONE_WEEKDAYS: UDateFormatSymbolType = 13i32; +pub const UDAT_STYLE_LONG: UDateRelativeDateTimeFormatterStyle = 0i32; +pub const UDAT_STYLE_NARROW: UDateRelativeDateTimeFormatterStyle = 2i32; +pub const UDAT_STYLE_SHORT: UDateRelativeDateTimeFormatterStyle = 1i32; +pub const UDAT_TIMEZONE_FIELD: UDateFormatField = 17i32; +pub const UDAT_TIMEZONE_GENERIC_FIELD: UDateFormatField = 24i32; +pub const UDAT_TIMEZONE_ISO_FIELD: UDateFormatField = 32i32; +pub const UDAT_TIMEZONE_ISO_LOCAL_FIELD: UDateFormatField = 33i32; +pub const UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD: UDateFormatField = 31i32; +pub const UDAT_TIMEZONE_RFC_FIELD: UDateFormatField = 23i32; +pub const UDAT_TIMEZONE_SPECIAL_FIELD: UDateFormatField = 29i32; +pub const UDAT_WEEKDAY: windows_sys::core::PCSTR = windows_sys::core::s!("EEEE"); +pub const UDAT_WEEKDAYS: UDateFormatSymbolType = 3i32; +pub const UDAT_WEEK_OF_MONTH_FIELD: UDateFormatField = 13i32; +pub const UDAT_WEEK_OF_YEAR_FIELD: UDateFormatField = 12i32; +pub const UDAT_YEAR: windows_sys::core::PCSTR = windows_sys::core::s!("y"); +pub const UDAT_YEAR_ABBR_MONTH: windows_sys::core::PCSTR = windows_sys::core::s!("yMMM"); +pub const UDAT_YEAR_ABBR_MONTH_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("yMMMd"); +pub const UDAT_YEAR_ABBR_MONTH_WEEKDAY_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("yMMMEd"); +pub const UDAT_YEAR_ABBR_QUARTER: windows_sys::core::PCSTR = windows_sys::core::s!("yQQQ"); +pub const UDAT_YEAR_FIELD: UDateFormatField = 1i32; +pub const UDAT_YEAR_MONTH: windows_sys::core::PCSTR = windows_sys::core::s!("yMMMM"); +pub const UDAT_YEAR_MONTH_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("yMMMMd"); +pub const UDAT_YEAR_MONTH_WEEKDAY_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("yMMMMEEEEd"); +pub const UDAT_YEAR_NAME_FIELD: UDateFormatField = 30i32; +pub const UDAT_YEAR_NUM_MONTH: windows_sys::core::PCSTR = windows_sys::core::s!("yM"); +pub const UDAT_YEAR_NUM_MONTH_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("yMd"); +pub const UDAT_YEAR_NUM_MONTH_WEEKDAY_DAY: windows_sys::core::PCSTR = windows_sys::core::s!("yMEd"); +pub const UDAT_YEAR_QUARTER: windows_sys::core::PCSTR = windows_sys::core::s!("yQQQQ"); +pub const UDAT_YEAR_WOY_FIELD: UDateFormatField = 18i32; +pub const UDAT_ZODIAC_NAMES_ABBREVIATED: UDateFormatSymbolType = 26i32; +pub const UDAT_ZODIAC_NAMES_NARROW: UDateFormatSymbolType = 27i32; +pub const UDAT_ZODIAC_NAMES_WIDE: UDateFormatSymbolType = 25i32; +pub const UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE: UDisplayContext = 258i32; +pub const UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE: UDisplayContext = 257i32; +pub const UDISPCTX_CAPITALIZATION_FOR_STANDALONE: UDisplayContext = 260i32; +pub const UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU: UDisplayContext = 259i32; +pub const UDISPCTX_CAPITALIZATION_NONE: UDisplayContext = 256i32; +pub const UDISPCTX_DIALECT_NAMES: UDisplayContext = 1i32; +pub const UDISPCTX_LENGTH_FULL: UDisplayContext = 512i32; +pub const UDISPCTX_LENGTH_SHORT: UDisplayContext = 513i32; +pub const UDISPCTX_NO_SUBSTITUTE: UDisplayContext = 769i32; +pub const UDISPCTX_STANDARD_NAMES: UDisplayContext = 0i32; +pub const UDISPCTX_SUBSTITUTE: UDisplayContext = 768i32; +pub const UDISPCTX_TYPE_CAPITALIZATION: UDisplayContextType = 1i32; +pub const UDISPCTX_TYPE_DIALECT_HANDLING: UDisplayContextType = 0i32; +pub const UDISPCTX_TYPE_DISPLAY_LENGTH: UDisplayContextType = 2i32; +pub const UDISPCTX_TYPE_SUBSTITUTE_HANDLING: UDisplayContextType = 3i32; +pub const UDTS_DB2_TIME: UDateTimeScale = 8i32; +pub const UDTS_DOTNET_DATE_TIME: UDateTimeScale = 4i32; +pub const UDTS_EXCEL_TIME: UDateTimeScale = 7i32; +pub const UDTS_ICU4C_TIME: UDateTimeScale = 2i32; +pub const UDTS_JAVA_TIME: UDateTimeScale = 0i32; +pub const UDTS_MAC_OLD_TIME: UDateTimeScale = 5i32; +pub const UDTS_MAC_TIME: UDateTimeScale = 6i32; +pub const UDTS_UNIX_MICROSECONDS_TIME: UDateTimeScale = 9i32; +pub const UDTS_UNIX_TIME: UDateTimeScale = 1i32; +pub const UDTS_WINDOWS_FILE_TIME: UDateTimeScale = 3i32; +pub type UDateAbsoluteUnit = i32; +pub type UDateDirection = i32; +pub type UDateFormatBooleanAttribute = i32; +pub type UDateFormatField = i32; +pub type UDateFormatStyle = i32; +pub type UDateFormatSymbolType = i32; +pub type UDateFormatSymbols = isize; +pub type UDateIntervalFormat = isize; +pub type UDateRelativeDateTimeFormatterStyle = i32; +pub type UDateRelativeUnit = i32; +pub type UDateTimePGDisplayWidth = i32; +pub type UDateTimePatternConflict = i32; +pub type UDateTimePatternField = i32; +pub type UDateTimePatternMatchOptions = i32; +pub type UDateTimeScale = i32; +pub type UDecompositionType = i32; +pub type UDialectHandling = i32; +pub type UDisplayContext = i32; +pub type UDisplayContextType = i32; +pub type UEastAsianWidth = i32; +pub type UEnumCharNamesFn = Option i8>; +pub type UEnumeration = isize; +pub type UErrorCode = i32; +pub const UFIELD_CATEGORY_DATE: UFieldCategory = 1i32; +pub const UFIELD_CATEGORY_DATE_INTERVAL: UFieldCategory = 5i32; +pub const UFIELD_CATEGORY_DATE_INTERVAL_SPAN: UFieldCategory = 4101i32; +pub const UFIELD_CATEGORY_LIST: UFieldCategory = 3i32; +pub const UFIELD_CATEGORY_LIST_SPAN: UFieldCategory = 4099i32; +pub const UFIELD_CATEGORY_NUMBER: UFieldCategory = 2i32; +pub const UFIELD_CATEGORY_RELATIVE_DATETIME: UFieldCategory = 4i32; +pub const UFIELD_CATEGORY_UNDEFINED: UFieldCategory = 0i32; +pub const UFMT_ARRAY: UFormattableType = 4i32; +pub const UFMT_DATE: UFormattableType = 0i32; +pub const UFMT_DOUBLE: UFormattableType = 1i32; +pub const UFMT_INT64: UFormattableType = 5i32; +pub const UFMT_LONG: UFormattableType = 2i32; +pub const UFMT_OBJECT: UFormattableType = 6i32; +pub const UFMT_STRING: UFormattableType = 3i32; +pub type UFieldCategory = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UFieldPosition { + pub field: i32, + pub beginIndex: i32, + pub endIndex: i32, +} +pub type UFieldPositionIterator = isize; +pub type UFormattableType = i32; +pub type UFormattedDateInterval = isize; +pub type UFormattedList = isize; +pub type UFormattedNumber = isize; +pub type UFormattedNumberRange = isize; +pub type UFormattedRelativeDateTime = isize; +pub type UFormattedValue = isize; +pub const UGENDER_FEMALE: UGender = 1i32; +pub const UGENDER_MALE: UGender = 0i32; +pub const UGENDER_OTHER: UGender = 2i32; +pub type UGender = i32; +pub type UGenderInfo = isize; +pub type UGraphemeClusterBreak = i32; +pub type UHangulSyllableType = i32; +pub type UHashtable = isize; +pub type UIDNA = isize; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UIDNAInfo { + pub size: i16, + pub isTransitionalDifferent: i8, + pub reservedB3: i8, + pub errors: u32, + pub reservedI2: i32, + pub reservedI3: i32, +} +pub const UIDNA_CHECK_BIDI: i32 = 4i32; +pub const UIDNA_CHECK_CONTEXTJ: i32 = 8i32; +pub const UIDNA_CHECK_CONTEXTO: i32 = 64i32; +pub const UIDNA_DEFAULT: i32 = 0i32; +pub const UIDNA_ERROR_BIDI: i32 = 2048i32; +pub const UIDNA_ERROR_CONTEXTJ: i32 = 4096i32; +pub const UIDNA_ERROR_CONTEXTO_DIGITS: i32 = 16384i32; +pub const UIDNA_ERROR_CONTEXTO_PUNCTUATION: i32 = 8192i32; +pub const UIDNA_ERROR_DISALLOWED: i32 = 128i32; +pub const UIDNA_ERROR_DOMAIN_NAME_TOO_LONG: i32 = 4i32; +pub const UIDNA_ERROR_EMPTY_LABEL: i32 = 1i32; +pub const UIDNA_ERROR_HYPHEN_3_4: i32 = 32i32; +pub const UIDNA_ERROR_INVALID_ACE_LABEL: i32 = 1024i32; +pub const UIDNA_ERROR_LABEL_HAS_DOT: i32 = 512i32; +pub const UIDNA_ERROR_LABEL_TOO_LONG: i32 = 2i32; +pub const UIDNA_ERROR_LEADING_COMBINING_MARK: i32 = 64i32; +pub const UIDNA_ERROR_LEADING_HYPHEN: i32 = 8i32; +pub const UIDNA_ERROR_PUNYCODE: i32 = 256i32; +pub const UIDNA_ERROR_TRAILING_HYPHEN: i32 = 16i32; +pub const UIDNA_NONTRANSITIONAL_TO_ASCII: i32 = 16i32; +pub const UIDNA_NONTRANSITIONAL_TO_UNICODE: i32 = 32i32; +pub const UIDNA_USE_STD3_RULES: i32 = 2i32; +pub type UILANGUAGE_ENUMPROCA = Option windows_sys::core::BOOL>; +pub type UILANGUAGE_ENUMPROCW = Option windows_sys::core::BOOL>; +pub const UITER_CURRENT: UCharIteratorOrigin = 1i32; +pub const UITER_LENGTH: UCharIteratorOrigin = 4i32; +pub const UITER_LIMIT: UCharIteratorOrigin = 2i32; +pub const UITER_START: UCharIteratorOrigin = 0i32; +pub const UITER_UNKNOWN_INDEX: i32 = -2i32; +pub const UITER_ZERO: UCharIteratorOrigin = 3i32; +pub type UIndicPositionalCategory = i32; +pub type UIndicSyllabicCategory = i32; +pub type UJoiningGroup = i32; +pub type UJoiningType = i32; +pub const ULDN_DIALECT_NAMES: UDialectHandling = 1i32; +pub const ULDN_STANDARD_NAMES: UDialectHandling = 0i32; +pub const ULISTFMT_ELEMENT_FIELD: UListFormatterField = 1i32; +pub const ULISTFMT_LITERAL_FIELD: UListFormatterField = 0i32; +pub const ULISTFMT_TYPE_AND: UListFormatterType = 0i32; +pub const ULISTFMT_TYPE_OR: UListFormatterType = 1i32; +pub const ULISTFMT_TYPE_UNITS: UListFormatterType = 2i32; +pub const ULISTFMT_WIDTH_NARROW: UListFormatterWidth = 2i32; +pub const ULISTFMT_WIDTH_SHORT: UListFormatterWidth = 1i32; +pub const ULISTFMT_WIDTH_WIDE: UListFormatterWidth = 0i32; +pub const ULOCDATA_ALT_QUOTATION_END: ULocaleDataDelimiterType = 3i32; +pub const ULOCDATA_ALT_QUOTATION_START: ULocaleDataDelimiterType = 2i32; +pub const ULOCDATA_ES_AUXILIARY: ULocaleDataExemplarSetType = 1i32; +pub const ULOCDATA_ES_INDEX: ULocaleDataExemplarSetType = 2i32; +pub const ULOCDATA_ES_PUNCTUATION: ULocaleDataExemplarSetType = 3i32; +pub const ULOCDATA_ES_STANDARD: ULocaleDataExemplarSetType = 0i32; +pub const ULOCDATA_QUOTATION_END: ULocaleDataDelimiterType = 1i32; +pub const ULOCDATA_QUOTATION_START: ULocaleDataDelimiterType = 0i32; +pub const ULOC_ACCEPT_FAILED: UAcceptResult = 0i32; +pub const ULOC_ACCEPT_FALLBACK: UAcceptResult = 2i32; +pub const ULOC_ACCEPT_VALID: UAcceptResult = 1i32; +pub const ULOC_ACTUAL_LOCALE: ULocDataLocaleType = 0i32; +pub const ULOC_AVAILABLE_DEFAULT: ULocAvailableType = 0i32; +pub const ULOC_AVAILABLE_ONLY_LEGACY_ALIASES: ULocAvailableType = 1i32; +pub const ULOC_AVAILABLE_WITH_LEGACY_ALIASES: ULocAvailableType = 2i32; +pub const ULOC_CANADA: windows_sys::core::PCSTR = windows_sys::core::s!("en_CA"); +pub const ULOC_CANADA_FRENCH: windows_sys::core::PCSTR = windows_sys::core::s!("fr_CA"); +pub const ULOC_CHINA: windows_sys::core::PCSTR = windows_sys::core::s!("zh_CN"); +pub const ULOC_CHINESE: windows_sys::core::PCSTR = windows_sys::core::s!("zh"); +pub const ULOC_COUNTRY_CAPACITY: u32 = 4u32; +pub const ULOC_ENGLISH: windows_sys::core::PCSTR = windows_sys::core::s!("en"); +pub const ULOC_FRANCE: windows_sys::core::PCSTR = windows_sys::core::s!("fr_FR"); +pub const ULOC_FRENCH: windows_sys::core::PCSTR = windows_sys::core::s!("fr"); +pub const ULOC_FULLNAME_CAPACITY: u32 = 157u32; +pub const ULOC_GERMAN: windows_sys::core::PCSTR = windows_sys::core::s!("de"); +pub const ULOC_GERMANY: windows_sys::core::PCSTR = windows_sys::core::s!("de_DE"); +pub const ULOC_ITALIAN: windows_sys::core::PCSTR = windows_sys::core::s!("it"); +pub const ULOC_ITALY: windows_sys::core::PCSTR = windows_sys::core::s!("it_IT"); +pub const ULOC_JAPAN: windows_sys::core::PCSTR = windows_sys::core::s!("ja_JP"); +pub const ULOC_JAPANESE: windows_sys::core::PCSTR = windows_sys::core::s!("ja"); +pub const ULOC_KEYWORDS_CAPACITY: u32 = 96u32; +pub const ULOC_KEYWORD_AND_VALUES_CAPACITY: u32 = 100u32; +pub const ULOC_KEYWORD_ASSIGN_UNICODE: u32 = 61u32; +pub const ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE: u32 = 59u32; +pub const ULOC_KEYWORD_SEPARATOR_UNICODE: u32 = 64u32; +pub const ULOC_KOREA: windows_sys::core::PCSTR = windows_sys::core::s!("ko_KR"); +pub const ULOC_KOREAN: windows_sys::core::PCSTR = windows_sys::core::s!("ko"); +pub const ULOC_LANG_CAPACITY: u32 = 12u32; +pub const ULOC_LAYOUT_BTT: ULayoutType = 3i32; +pub const ULOC_LAYOUT_LTR: ULayoutType = 0i32; +pub const ULOC_LAYOUT_RTL: ULayoutType = 1i32; +pub const ULOC_LAYOUT_TTB: ULayoutType = 2i32; +pub const ULOC_LAYOUT_UNKNOWN: ULayoutType = 4i32; +pub const ULOC_PRC: windows_sys::core::PCSTR = windows_sys::core::s!("zh_CN"); +pub const ULOC_SCRIPT_CAPACITY: u32 = 6u32; +pub const ULOC_SIMPLIFIED_CHINESE: windows_sys::core::PCSTR = windows_sys::core::s!("zh_CN"); +pub const ULOC_TAIWAN: windows_sys::core::PCSTR = windows_sys::core::s!("zh_TW"); +pub const ULOC_TRADITIONAL_CHINESE: windows_sys::core::PCSTR = windows_sys::core::s!("zh_TW"); +pub const ULOC_UK: windows_sys::core::PCSTR = windows_sys::core::s!("en_GB"); +pub const ULOC_US: windows_sys::core::PCSTR = windows_sys::core::s!("en_US"); +pub const ULOC_VALID_LOCALE: ULocDataLocaleType = 1i32; +pub type ULayoutType = i32; +pub type ULineBreak = i32; +pub type ULineBreakTag = i32; +pub type UListFormatter = isize; +pub type UListFormatterField = i32; +pub type UListFormatterType = i32; +pub type UListFormatterWidth = i32; +pub type ULocAvailableType = i32; +pub type ULocDataLocaleType = i32; +pub type ULocaleData = isize; +pub type ULocaleDataDelimiterType = i32; +pub type ULocaleDataExemplarSetType = i32; +pub type ULocaleDisplayNames = isize; +pub const UMEASFMT_WIDTH_COUNT: UMeasureFormatWidth = 4i32; +pub const UMEASFMT_WIDTH_NARROW: UMeasureFormatWidth = 2i32; +pub const UMEASFMT_WIDTH_NUMERIC: UMeasureFormatWidth = 3i32; +pub const UMEASFMT_WIDTH_SHORT: UMeasureFormatWidth = 1i32; +pub const UMEASFMT_WIDTH_WIDE: UMeasureFormatWidth = 0i32; +pub const UMSGPAT_APOS_DOUBLE_OPTIONAL: UMessagePatternApostropheMode = 0i32; +pub const UMSGPAT_APOS_DOUBLE_REQUIRED: UMessagePatternApostropheMode = 1i32; +pub const UMSGPAT_ARG_NAME_NOT_NUMBER: i32 = -1i32; +pub const UMSGPAT_ARG_NAME_NOT_VALID: i32 = -2i32; +pub const UMSGPAT_ARG_TYPE_CHOICE: UMessagePatternArgType = 2i32; +pub const UMSGPAT_ARG_TYPE_NONE: UMessagePatternArgType = 0i32; +pub const UMSGPAT_ARG_TYPE_PLURAL: UMessagePatternArgType = 3i32; +pub const UMSGPAT_ARG_TYPE_SELECT: UMessagePatternArgType = 4i32; +pub const UMSGPAT_ARG_TYPE_SELECTORDINAL: UMessagePatternArgType = 5i32; +pub const UMSGPAT_ARG_TYPE_SIMPLE: UMessagePatternArgType = 1i32; +pub const UMSGPAT_PART_TYPE_ARG_DOUBLE: UMessagePatternPartType = 13i32; +pub const UMSGPAT_PART_TYPE_ARG_INT: UMessagePatternPartType = 12i32; +pub const UMSGPAT_PART_TYPE_ARG_LIMIT: UMessagePatternPartType = 6i32; +pub const UMSGPAT_PART_TYPE_ARG_NAME: UMessagePatternPartType = 8i32; +pub const UMSGPAT_PART_TYPE_ARG_NUMBER: UMessagePatternPartType = 7i32; +pub const UMSGPAT_PART_TYPE_ARG_SELECTOR: UMessagePatternPartType = 11i32; +pub const UMSGPAT_PART_TYPE_ARG_START: UMessagePatternPartType = 5i32; +pub const UMSGPAT_PART_TYPE_ARG_STYLE: UMessagePatternPartType = 10i32; +pub const UMSGPAT_PART_TYPE_ARG_TYPE: UMessagePatternPartType = 9i32; +pub const UMSGPAT_PART_TYPE_INSERT_CHAR: UMessagePatternPartType = 3i32; +pub const UMSGPAT_PART_TYPE_MSG_LIMIT: UMessagePatternPartType = 1i32; +pub const UMSGPAT_PART_TYPE_MSG_START: UMessagePatternPartType = 0i32; +pub const UMSGPAT_PART_TYPE_REPLACE_NUMBER: UMessagePatternPartType = 4i32; +pub const UMSGPAT_PART_TYPE_SKIP_SYNTAX: UMessagePatternPartType = 2i32; +pub const UMS_SI: UMeasurementSystem = 0i32; +pub const UMS_UK: UMeasurementSystem = 2i32; +pub const UMS_US: UMeasurementSystem = 1i32; +pub type UMeasureFormatWidth = i32; +pub type UMeasurementSystem = i32; +pub type UMemAllocFn = Option *mut core::ffi::c_void>; +pub type UMemFreeFn = Option; +pub type UMemReallocFn = Option *mut core::ffi::c_void>; +pub type UMessagePatternApostropheMode = i32; +pub type UMessagePatternArgType = i32; +pub type UMessagePatternPartType = i32; +pub type UMutableCPTrie = isize; +pub type UNESCAPE_CHAR_AT = Option u16>; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UNICODERANGE { + pub wcFrom: u16, + pub wcTo: u16, +} +pub const UNISCRIBE_OPENTYPE: u32 = 256u32; +pub const UNORM2_COMPOSE: UNormalization2Mode = 0i32; +pub const UNORM2_COMPOSE_CONTIGUOUS: UNormalization2Mode = 3i32; +pub const UNORM2_DECOMPOSE: UNormalization2Mode = 1i32; +pub const UNORM2_FCD: UNormalization2Mode = 2i32; +pub const UNORM_DEFAULT: UNormalizationMode = 4i32; +pub const UNORM_FCD: UNormalizationMode = 6i32; +pub const UNORM_INPUT_IS_FCD: u32 = 131072u32; +pub const UNORM_MAYBE: UNormalizationCheckResult = 2i32; +pub const UNORM_MODE_COUNT: UNormalizationMode = 7i32; +pub const UNORM_NFC: UNormalizationMode = 4i32; +pub const UNORM_NFD: UNormalizationMode = 2i32; +pub const UNORM_NFKC: UNormalizationMode = 5i32; +pub const UNORM_NFKD: UNormalizationMode = 3i32; +pub const UNORM_NO: UNormalizationCheckResult = 0i32; +pub const UNORM_NONE: UNormalizationMode = 1i32; +pub const UNORM_YES: UNormalizationCheckResult = 1i32; +pub const UNUM_CASH_CURRENCY: UNumberFormatStyle = 13i32; +pub const UNUM_COMPACT_FIELD: UNumberFormatFields = 12i32; +pub const UNUM_CURRENCY: UNumberFormatStyle = 2i32; +pub const UNUM_CURRENCY_ACCOUNTING: UNumberFormatStyle = 12i32; +pub const UNUM_CURRENCY_CODE: UNumberFormatTextAttribute = 5i32; +pub const UNUM_CURRENCY_FIELD: UNumberFormatFields = 7i32; +pub const UNUM_CURRENCY_INSERT: UCurrencySpacing = 2i32; +pub const UNUM_CURRENCY_ISO: UNumberFormatStyle = 10i32; +pub const UNUM_CURRENCY_MATCH: UCurrencySpacing = 0i32; +pub const UNUM_CURRENCY_PLURAL: UNumberFormatStyle = 11i32; +pub const UNUM_CURRENCY_SPACING_COUNT: UCurrencySpacing = 3i32; +pub const UNUM_CURRENCY_STANDARD: UNumberFormatStyle = 16i32; +pub const UNUM_CURRENCY_SURROUNDING_MATCH: UCurrencySpacing = 1i32; +pub const UNUM_CURRENCY_SYMBOL: UNumberFormatSymbol = 8i32; +pub const UNUM_CURRENCY_USAGE: UNumberFormatAttribute = 23i32; +pub const UNUM_DECIMAL: UNumberFormatStyle = 1i32; +pub const UNUM_DECIMAL_ALWAYS_SHOWN: UNumberFormatAttribute = 2i32; +pub const UNUM_DECIMAL_COMPACT_LONG: UNumberFormatStyle = 15i32; +pub const UNUM_DECIMAL_COMPACT_SHORT: UNumberFormatStyle = 14i32; +pub const UNUM_DECIMAL_SEPARATOR_ALWAYS: UNumberDecimalSeparatorDisplay = 1i32; +pub const UNUM_DECIMAL_SEPARATOR_AUTO: UNumberDecimalSeparatorDisplay = 0i32; +pub const UNUM_DECIMAL_SEPARATOR_COUNT: UNumberDecimalSeparatorDisplay = 2i32; +pub const UNUM_DECIMAL_SEPARATOR_FIELD: UNumberFormatFields = 2i32; +pub const UNUM_DECIMAL_SEPARATOR_SYMBOL: UNumberFormatSymbol = 0i32; +pub const UNUM_DEFAULT: UNumberFormatStyle = 1i32; +pub const UNUM_DEFAULT_RULESET: UNumberFormatTextAttribute = 6i32; +pub const UNUM_DIGIT_SYMBOL: UNumberFormatSymbol = 5i32; +pub const UNUM_DURATION: UNumberFormatStyle = 7i32; +pub const UNUM_EIGHT_DIGIT_SYMBOL: UNumberFormatSymbol = 25i32; +pub const UNUM_EXPONENTIAL_SYMBOL: UNumberFormatSymbol = 11i32; +pub const UNUM_EXPONENT_FIELD: UNumberFormatFields = 5i32; +pub const UNUM_EXPONENT_MULTIPLICATION_SYMBOL: UNumberFormatSymbol = 27i32; +pub const UNUM_EXPONENT_SIGN_FIELD: UNumberFormatFields = 4i32; +pub const UNUM_EXPONENT_SYMBOL_FIELD: UNumberFormatFields = 3i32; +pub const UNUM_FIVE_DIGIT_SYMBOL: UNumberFormatSymbol = 22i32; +pub const UNUM_FORMAT_ATTRIBUTE_VALUE_HIDDEN: UNumberFormatAttributeValue = 0i32; +pub const UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS: UNumberFormatAttribute = 4096i32; +pub const UNUM_FORMAT_WIDTH: UNumberFormatAttribute = 13i32; +pub const UNUM_FOUR_DIGIT_SYMBOL: UNumberFormatSymbol = 21i32; +pub const UNUM_FRACTION_DIGITS: UNumberFormatAttribute = 8i32; +pub const UNUM_FRACTION_FIELD: UNumberFormatFields = 1i32; +pub const UNUM_GROUPING_AUTO: UNumberGroupingStrategy = 2i32; +pub const UNUM_GROUPING_MIN2: UNumberGroupingStrategy = 1i32; +pub const UNUM_GROUPING_OFF: UNumberGroupingStrategy = 0i32; +pub const UNUM_GROUPING_ON_ALIGNED: UNumberGroupingStrategy = 3i32; +pub const UNUM_GROUPING_SEPARATOR_FIELD: UNumberFormatFields = 6i32; +pub const UNUM_GROUPING_SEPARATOR_SYMBOL: UNumberFormatSymbol = 1i32; +pub const UNUM_GROUPING_SIZE: UNumberFormatAttribute = 10i32; +pub const UNUM_GROUPING_THOUSANDS: UNumberGroupingStrategy = 4i32; +pub const UNUM_GROUPING_USED: UNumberFormatAttribute = 1i32; +pub const UNUM_IDENTITY_FALLBACK_APPROXIMATELY: UNumberRangeIdentityFallback = 2i32; +pub const UNUM_IDENTITY_FALLBACK_APPROXIMATELY_OR_SINGLE_VALUE: UNumberRangeIdentityFallback = 1i32; +pub const UNUM_IDENTITY_FALLBACK_RANGE: UNumberRangeIdentityFallback = 3i32; +pub const UNUM_IDENTITY_FALLBACK_SINGLE_VALUE: UNumberRangeIdentityFallback = 0i32; +pub const UNUM_IDENTITY_RESULT_EQUAL_AFTER_ROUNDING: UNumberRangeIdentityResult = 1i32; +pub const UNUM_IDENTITY_RESULT_EQUAL_BEFORE_ROUNDING: UNumberRangeIdentityResult = 0i32; +pub const UNUM_IDENTITY_RESULT_NOT_EQUAL: UNumberRangeIdentityResult = 2i32; +pub const UNUM_IGNORE: UNumberFormatStyle = 0i32; +pub const UNUM_INFINITY_SYMBOL: UNumberFormatSymbol = 14i32; +pub const UNUM_INTEGER_DIGITS: UNumberFormatAttribute = 5i32; +pub const UNUM_INTEGER_FIELD: UNumberFormatFields = 0i32; +pub const UNUM_INTL_CURRENCY_SYMBOL: UNumberFormatSymbol = 9i32; +pub const UNUM_LENIENT_PARSE: UNumberFormatAttribute = 19i32; +pub const UNUM_LONG: UNumberCompactStyle = 1i32; +pub const UNUM_MAX_FRACTION_DIGITS: UNumberFormatAttribute = 6i32; +pub const UNUM_MAX_INTEGER_DIGITS: UNumberFormatAttribute = 3i32; +pub const UNUM_MAX_SIGNIFICANT_DIGITS: UNumberFormatAttribute = 18i32; +pub const UNUM_MEASURE_UNIT_FIELD: UNumberFormatFields = 11i32; +pub const UNUM_MINIMUM_GROUPING_DIGITS: UNumberFormatAttribute = 22i32; +pub const UNUM_MINUS_SIGN_SYMBOL: UNumberFormatSymbol = 6i32; +pub const UNUM_MIN_FRACTION_DIGITS: UNumberFormatAttribute = 7i32; +pub const UNUM_MIN_INTEGER_DIGITS: UNumberFormatAttribute = 4i32; +pub const UNUM_MIN_SIGNIFICANT_DIGITS: UNumberFormatAttribute = 17i32; +pub const UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL: UNumberFormatSymbol = 17i32; +pub const UNUM_MONETARY_SEPARATOR_SYMBOL: UNumberFormatSymbol = 10i32; +pub const UNUM_MULTIPLIER: UNumberFormatAttribute = 9i32; +pub const UNUM_NAN_SYMBOL: UNumberFormatSymbol = 15i32; +pub const UNUM_NEGATIVE_PREFIX: UNumberFormatTextAttribute = 2i32; +pub const UNUM_NEGATIVE_SUFFIX: UNumberFormatTextAttribute = 3i32; +pub const UNUM_NINE_DIGIT_SYMBOL: UNumberFormatSymbol = 26i32; +pub const UNUM_NUMBERING_SYSTEM: UNumberFormatStyle = 8i32; +pub const UNUM_ONE_DIGIT_SYMBOL: UNumberFormatSymbol = 18i32; +pub const UNUM_ORDINAL: UNumberFormatStyle = 6i32; +pub const UNUM_PADDING_CHARACTER: UNumberFormatTextAttribute = 4i32; +pub const UNUM_PADDING_POSITION: UNumberFormatAttribute = 14i32; +pub const UNUM_PAD_AFTER_PREFIX: UNumberFormatPadPosition = 1i32; +pub const UNUM_PAD_AFTER_SUFFIX: UNumberFormatPadPosition = 3i32; +pub const UNUM_PAD_BEFORE_PREFIX: UNumberFormatPadPosition = 0i32; +pub const UNUM_PAD_BEFORE_SUFFIX: UNumberFormatPadPosition = 2i32; +pub const UNUM_PAD_ESCAPE_SYMBOL: UNumberFormatSymbol = 13i32; +pub const UNUM_PARSE_ALL_INPUT: UNumberFormatAttribute = 20i32; +pub const UNUM_PARSE_CASE_SENSITIVE: UNumberFormatAttribute = 4099i32; +pub const UNUM_PARSE_DECIMAL_MARK_REQUIRED: UNumberFormatAttribute = 4098i32; +pub const UNUM_PARSE_INT_ONLY: UNumberFormatAttribute = 0i32; +pub const UNUM_PARSE_NO_EXPONENT: UNumberFormatAttribute = 4097i32; +pub const UNUM_PATTERN_DECIMAL: UNumberFormatStyle = 0i32; +pub const UNUM_PATTERN_RULEBASED: UNumberFormatStyle = 9i32; +pub const UNUM_PATTERN_SEPARATOR_SYMBOL: UNumberFormatSymbol = 2i32; +pub const UNUM_PERCENT: UNumberFormatStyle = 3i32; +pub const UNUM_PERCENT_FIELD: UNumberFormatFields = 8i32; +pub const UNUM_PERCENT_SYMBOL: UNumberFormatSymbol = 3i32; +pub const UNUM_PERMILL_FIELD: UNumberFormatFields = 9i32; +pub const UNUM_PERMILL_SYMBOL: UNumberFormatSymbol = 12i32; +pub const UNUM_PLUS_SIGN_SYMBOL: UNumberFormatSymbol = 7i32; +pub const UNUM_POSITIVE_PREFIX: UNumberFormatTextAttribute = 0i32; +pub const UNUM_POSITIVE_SUFFIX: UNumberFormatTextAttribute = 1i32; +pub const UNUM_PUBLIC_RULESETS: UNumberFormatTextAttribute = 7i32; +pub const UNUM_RANGE_COLLAPSE_ALL: UNumberRangeCollapse = 3i32; +pub const UNUM_RANGE_COLLAPSE_AUTO: UNumberRangeCollapse = 0i32; +pub const UNUM_RANGE_COLLAPSE_NONE: UNumberRangeCollapse = 1i32; +pub const UNUM_RANGE_COLLAPSE_UNIT: UNumberRangeCollapse = 2i32; +pub const UNUM_ROUNDING_INCREMENT: UNumberFormatAttribute = 12i32; +pub const UNUM_ROUNDING_MODE: UNumberFormatAttribute = 11i32; +pub const UNUM_ROUND_CEILING: UNumberFormatRoundingMode = 0i32; +pub const UNUM_ROUND_DOWN: UNumberFormatRoundingMode = 2i32; +pub const UNUM_ROUND_FLOOR: UNumberFormatRoundingMode = 1i32; +pub const UNUM_ROUND_HALFDOWN: UNumberFormatRoundingMode = 5i32; +pub const UNUM_ROUND_HALFEVEN: UNumberFormatRoundingMode = 4i32; +pub const UNUM_ROUND_HALFUP: UNumberFormatRoundingMode = 6i32; +pub const UNUM_ROUND_UNNECESSARY: UNumberFormatRoundingMode = 7i32; +pub const UNUM_ROUND_UP: UNumberFormatRoundingMode = 3i32; +pub const UNUM_SCALE: UNumberFormatAttribute = 21i32; +pub const UNUM_SCIENTIFIC: UNumberFormatStyle = 4i32; +pub const UNUM_SECONDARY_GROUPING_SIZE: UNumberFormatAttribute = 15i32; +pub const UNUM_SEVEN_DIGIT_SYMBOL: UNumberFormatSymbol = 24i32; +pub const UNUM_SHORT: UNumberCompactStyle = 0i32; +pub const UNUM_SIGNIFICANT_DIGITS_USED: UNumberFormatAttribute = 16i32; +pub const UNUM_SIGNIFICANT_DIGIT_SYMBOL: UNumberFormatSymbol = 16i32; +pub const UNUM_SIGN_ACCOUNTING: UNumberSignDisplay = 3i32; +pub const UNUM_SIGN_ACCOUNTING_ALWAYS: UNumberSignDisplay = 4i32; +pub const UNUM_SIGN_ACCOUNTING_EXCEPT_ZERO: UNumberSignDisplay = 6i32; +pub const UNUM_SIGN_ALWAYS: UNumberSignDisplay = 1i32; +pub const UNUM_SIGN_ALWAYS_SHOWN: UNumberFormatAttribute = 4100i32; +pub const UNUM_SIGN_AUTO: UNumberSignDisplay = 0i32; +pub const UNUM_SIGN_COUNT: UNumberSignDisplay = 7i32; +pub const UNUM_SIGN_EXCEPT_ZERO: UNumberSignDisplay = 5i32; +pub const UNUM_SIGN_FIELD: UNumberFormatFields = 10i32; +pub const UNUM_SIGN_NEVER: UNumberSignDisplay = 2i32; +pub const UNUM_SIX_DIGIT_SYMBOL: UNumberFormatSymbol = 23i32; +pub const UNUM_SPELLOUT: UNumberFormatStyle = 5i32; +pub const UNUM_THREE_DIGIT_SYMBOL: UNumberFormatSymbol = 20i32; +pub const UNUM_TWO_DIGIT_SYMBOL: UNumberFormatSymbol = 19i32; +pub const UNUM_UNIT_WIDTH_COUNT: UNumberUnitWidth = 5i32; +pub const UNUM_UNIT_WIDTH_FULL_NAME: UNumberUnitWidth = 2i32; +pub const UNUM_UNIT_WIDTH_HIDDEN: UNumberUnitWidth = 4i32; +pub const UNUM_UNIT_WIDTH_ISO_CODE: UNumberUnitWidth = 3i32; +pub const UNUM_UNIT_WIDTH_NARROW: UNumberUnitWidth = 0i32; +pub const UNUM_UNIT_WIDTH_SHORT: UNumberUnitWidth = 1i32; +pub const UNUM_ZERO_DIGIT_SYMBOL: UNumberFormatSymbol = 4i32; +pub type UNormalization2Mode = i32; +pub type UNormalizationCheckResult = i32; +pub type UNormalizationMode = i32; +pub type UNormalizer2 = isize; +pub type UNumberCompactStyle = i32; +pub type UNumberDecimalSeparatorDisplay = i32; +pub type UNumberFormatAttribute = i32; +pub type UNumberFormatAttributeValue = i32; +pub type UNumberFormatFields = i32; +pub type UNumberFormatPadPosition = i32; +pub type UNumberFormatRoundingMode = i32; +pub type UNumberFormatStyle = i32; +pub type UNumberFormatSymbol = i32; +pub type UNumberFormatTextAttribute = i32; +pub type UNumberFormatter = isize; +pub type UNumberGroupingStrategy = i32; +pub type UNumberRangeCollapse = i32; +pub type UNumberRangeIdentityFallback = i32; +pub type UNumberRangeIdentityResult = i32; +pub type UNumberSignDisplay = i32; +pub type UNumberUnitWidth = i32; +pub type UNumberingSystem = isize; +pub type UNumericType = i32; +pub const UPLURAL_TYPE_CARDINAL: UPluralType = 0i32; +pub const UPLURAL_TYPE_ORDINAL: UPluralType = 1i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UParseError { + pub line: i32, + pub offset: i32, + pub preContext: [u16; 16], + pub postContext: [u16; 16], +} +impl Default for UParseError { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type UPluralRules = isize; +pub type UPluralType = i32; +pub type UProperty = i32; +pub type UPropertyNameChoice = i32; +pub const UREGEX_CASE_INSENSITIVE: URegexpFlag = 2i32; +pub const UREGEX_COMMENTS: URegexpFlag = 4i32; +pub const UREGEX_DOTALL: URegexpFlag = 32i32; +pub const UREGEX_ERROR_ON_UNKNOWN_ESCAPES: URegexpFlag = 512i32; +pub const UREGEX_LITERAL: URegexpFlag = 16i32; +pub const UREGEX_MULTILINE: URegexpFlag = 8i32; +pub const UREGEX_UNIX_LINES: URegexpFlag = 1i32; +pub const UREGEX_UWORD: URegexpFlag = 256i32; +pub const URES_ALIAS: UResType = 3i32; +pub const URES_ARRAY: UResType = 8i32; +pub const URES_BINARY: UResType = 1i32; +pub const URES_INT: UResType = 7i32; +pub const URES_INT_VECTOR: UResType = 14i32; +pub const URES_NONE: UResType = -1i32; +pub const URES_STRING: UResType = 0i32; +pub const URES_TABLE: UResType = 2i32; +pub const URGN_CONTINENT: URegionType = 3i32; +pub const URGN_DEPRECATED: URegionType = 6i32; +pub const URGN_GROUPING: URegionType = 5i32; +pub const URGN_SUBCONTINENT: URegionType = 4i32; +pub const URGN_TERRITORY: URegionType = 1i32; +pub const URGN_UNKNOWN: URegionType = 0i32; +pub const URGN_WORLD: URegionType = 2i32; +pub type URegexFindProgressCallback = Option i8>; +pub type URegexMatchCallback = Option i8>; +pub type URegexpFlag = i32; +pub type URegion = isize; +pub type URegionType = i32; +pub type URegularExpression = isize; +pub type URelativeDateTimeFormatter = isize; +pub type URelativeDateTimeFormatterField = i32; +pub type URelativeDateTimeUnit = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UReplaceableCallbacks { + pub length: isize, + pub charAt: isize, + pub char32At: isize, + pub replace: isize, + pub extract: isize, + pub copy: isize, +} +pub type UResType = i32; +pub type UResourceBundle = isize; +pub type URestrictionLevel = i32; +pub const USCRIPT_ADLAM: UScriptCode = 167i32; +pub const USCRIPT_AFAKA: UScriptCode = 147i32; +pub const USCRIPT_AHOM: UScriptCode = 161i32; +pub const USCRIPT_ANATOLIAN_HIEROGLYPHS: UScriptCode = 156i32; +pub const USCRIPT_ARABIC: UScriptCode = 2i32; +pub const USCRIPT_ARMENIAN: UScriptCode = 3i32; +pub const USCRIPT_AVESTAN: UScriptCode = 117i32; +pub const USCRIPT_BALINESE: UScriptCode = 62i32; +pub const USCRIPT_BAMUM: UScriptCode = 130i32; +pub const USCRIPT_BASSA_VAH: UScriptCode = 134i32; +pub const USCRIPT_BATAK: UScriptCode = 63i32; +pub const USCRIPT_BENGALI: UScriptCode = 4i32; +pub const USCRIPT_BHAIKSUKI: UScriptCode = 168i32; +pub const USCRIPT_BLISSYMBOLS: UScriptCode = 64i32; +pub const USCRIPT_BOOK_PAHLAVI: UScriptCode = 124i32; +pub const USCRIPT_BOPOMOFO: UScriptCode = 5i32; +pub const USCRIPT_BRAHMI: UScriptCode = 65i32; +pub const USCRIPT_BRAILLE: UScriptCode = 46i32; +pub const USCRIPT_BUGINESE: UScriptCode = 55i32; +pub const USCRIPT_BUHID: UScriptCode = 44i32; +pub const USCRIPT_CANADIAN_ABORIGINAL: UScriptCode = 40i32; +pub const USCRIPT_CARIAN: UScriptCode = 104i32; +pub const USCRIPT_CAUCASIAN_ALBANIAN: UScriptCode = 159i32; +pub const USCRIPT_CHAKMA: UScriptCode = 118i32; +pub const USCRIPT_CHAM: UScriptCode = 66i32; +pub const USCRIPT_CHEROKEE: UScriptCode = 6i32; +pub const USCRIPT_CHORASMIAN: UScriptCode = 189i32; +pub const USCRIPT_CIRTH: UScriptCode = 67i32; +pub const USCRIPT_COMMON: UScriptCode = 0i32; +pub const USCRIPT_COPTIC: UScriptCode = 7i32; +pub const USCRIPT_CUNEIFORM: UScriptCode = 101i32; +pub const USCRIPT_CYPRIOT: UScriptCode = 47i32; +pub const USCRIPT_CYRILLIC: UScriptCode = 8i32; +pub const USCRIPT_DEMOTIC_EGYPTIAN: UScriptCode = 69i32; +pub const USCRIPT_DESERET: UScriptCode = 9i32; +pub const USCRIPT_DEVANAGARI: UScriptCode = 10i32; +pub const USCRIPT_DIVES_AKURU: UScriptCode = 190i32; +pub const USCRIPT_DOGRA: UScriptCode = 178i32; +pub const USCRIPT_DUPLOYAN: UScriptCode = 135i32; +pub const USCRIPT_EASTERN_SYRIAC: UScriptCode = 97i32; +pub const USCRIPT_EGYPTIAN_HIEROGLYPHS: UScriptCode = 71i32; +pub const USCRIPT_ELBASAN: UScriptCode = 136i32; +pub const USCRIPT_ELYMAIC: UScriptCode = 185i32; +pub const USCRIPT_ESTRANGELO_SYRIAC: UScriptCode = 95i32; +pub const USCRIPT_ETHIOPIC: UScriptCode = 11i32; +pub const USCRIPT_GEORGIAN: UScriptCode = 12i32; +pub const USCRIPT_GLAGOLITIC: UScriptCode = 56i32; +pub const USCRIPT_GOTHIC: UScriptCode = 13i32; +pub const USCRIPT_GRANTHA: UScriptCode = 137i32; +pub const USCRIPT_GREEK: UScriptCode = 14i32; +pub const USCRIPT_GUJARATI: UScriptCode = 15i32; +pub const USCRIPT_GUNJALA_GONDI: UScriptCode = 179i32; +pub const USCRIPT_GURMUKHI: UScriptCode = 16i32; +pub const USCRIPT_HAN: UScriptCode = 17i32; +pub const USCRIPT_HANGUL: UScriptCode = 18i32; +pub const USCRIPT_HANIFI_ROHINGYA: UScriptCode = 182i32; +pub const USCRIPT_HANUNOO: UScriptCode = 43i32; +pub const USCRIPT_HAN_WITH_BOPOMOFO: UScriptCode = 172i32; +pub const USCRIPT_HARAPPAN_INDUS: UScriptCode = 77i32; +pub const USCRIPT_HATRAN: UScriptCode = 162i32; +pub const USCRIPT_HEBREW: UScriptCode = 19i32; +pub const USCRIPT_HIERATIC_EGYPTIAN: UScriptCode = 70i32; +pub const USCRIPT_HIRAGANA: UScriptCode = 20i32; +pub const USCRIPT_IMPERIAL_ARAMAIC: UScriptCode = 116i32; +pub const USCRIPT_INHERITED: UScriptCode = 1i32; +pub const USCRIPT_INSCRIPTIONAL_PAHLAVI: UScriptCode = 122i32; +pub const USCRIPT_INSCRIPTIONAL_PARTHIAN: UScriptCode = 125i32; +pub const USCRIPT_INVALID_CODE: UScriptCode = -1i32; +pub const USCRIPT_JAMO: UScriptCode = 173i32; +pub const USCRIPT_JAPANESE: UScriptCode = 105i32; +pub const USCRIPT_JAVANESE: UScriptCode = 78i32; +pub const USCRIPT_JURCHEN: UScriptCode = 148i32; +pub const USCRIPT_KAITHI: UScriptCode = 120i32; +pub const USCRIPT_KANNADA: UScriptCode = 21i32; +pub const USCRIPT_KATAKANA: UScriptCode = 22i32; +pub const USCRIPT_KATAKANA_OR_HIRAGANA: UScriptCode = 54i32; +pub const USCRIPT_KAYAH_LI: UScriptCode = 79i32; +pub const USCRIPT_KHAROSHTHI: UScriptCode = 57i32; +pub const USCRIPT_KHITAN_SMALL_SCRIPT: UScriptCode = 191i32; +pub const USCRIPT_KHMER: UScriptCode = 23i32; +pub const USCRIPT_KHOJKI: UScriptCode = 157i32; +pub const USCRIPT_KHUDAWADI: UScriptCode = 145i32; +pub const USCRIPT_KHUTSURI: UScriptCode = 72i32; +pub const USCRIPT_KOREAN: UScriptCode = 119i32; +pub const USCRIPT_KPELLE: UScriptCode = 138i32; +pub const USCRIPT_LANNA: UScriptCode = 106i32; +pub const USCRIPT_LAO: UScriptCode = 24i32; +pub const USCRIPT_LATIN: UScriptCode = 25i32; +pub const USCRIPT_LATIN_FRAKTUR: UScriptCode = 80i32; +pub const USCRIPT_LATIN_GAELIC: UScriptCode = 81i32; +pub const USCRIPT_LEPCHA: UScriptCode = 82i32; +pub const USCRIPT_LIMBU: UScriptCode = 48i32; +pub const USCRIPT_LINEAR_A: UScriptCode = 83i32; +pub const USCRIPT_LINEAR_B: UScriptCode = 49i32; +pub const USCRIPT_LISU: UScriptCode = 131i32; +pub const USCRIPT_LOMA: UScriptCode = 139i32; +pub const USCRIPT_LYCIAN: UScriptCode = 107i32; +pub const USCRIPT_LYDIAN: UScriptCode = 108i32; +pub const USCRIPT_MAHAJANI: UScriptCode = 160i32; +pub const USCRIPT_MAKASAR: UScriptCode = 180i32; +pub const USCRIPT_MALAYALAM: UScriptCode = 26i32; +pub const USCRIPT_MANDAEAN: UScriptCode = 84i32; +pub const USCRIPT_MANDAIC: UScriptCode = 84i32; +pub const USCRIPT_MANICHAEAN: UScriptCode = 121i32; +pub const USCRIPT_MARCHEN: UScriptCode = 169i32; +pub const USCRIPT_MASARAM_GONDI: UScriptCode = 175i32; +pub const USCRIPT_MATHEMATICAL_NOTATION: UScriptCode = 128i32; +pub const USCRIPT_MAYAN_HIEROGLYPHS: UScriptCode = 85i32; +pub const USCRIPT_MEDEFAIDRIN: UScriptCode = 181i32; +pub const USCRIPT_MEITEI_MAYEK: UScriptCode = 115i32; +pub const USCRIPT_MENDE: UScriptCode = 140i32; +pub const USCRIPT_MEROITIC: UScriptCode = 86i32; +pub const USCRIPT_MEROITIC_CURSIVE: UScriptCode = 141i32; +pub const USCRIPT_MEROITIC_HIEROGLYPHS: UScriptCode = 86i32; +pub const USCRIPT_MIAO: UScriptCode = 92i32; +pub const USCRIPT_MODI: UScriptCode = 163i32; +pub const USCRIPT_MONGOLIAN: UScriptCode = 27i32; +pub const USCRIPT_MOON: UScriptCode = 114i32; +pub const USCRIPT_MRO: UScriptCode = 149i32; +pub const USCRIPT_MULTANI: UScriptCode = 164i32; +pub const USCRIPT_MYANMAR: UScriptCode = 28i32; +pub const USCRIPT_NABATAEAN: UScriptCode = 143i32; +pub const USCRIPT_NAKHI_GEBA: UScriptCode = 132i32; +pub const USCRIPT_NANDINAGARI: UScriptCode = 187i32; +pub const USCRIPT_NEWA: UScriptCode = 170i32; +pub const USCRIPT_NEW_TAI_LUE: UScriptCode = 59i32; +pub const USCRIPT_NKO: UScriptCode = 87i32; +pub const USCRIPT_NUSHU: UScriptCode = 150i32; +pub const USCRIPT_NYIAKENG_PUACHUE_HMONG: UScriptCode = 186i32; +pub const USCRIPT_OGHAM: UScriptCode = 29i32; +pub const USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC: UScriptCode = 68i32; +pub const USCRIPT_OLD_HUNGARIAN: UScriptCode = 76i32; +pub const USCRIPT_OLD_ITALIC: UScriptCode = 30i32; +pub const USCRIPT_OLD_NORTH_ARABIAN: UScriptCode = 142i32; +pub const USCRIPT_OLD_PERMIC: UScriptCode = 89i32; +pub const USCRIPT_OLD_PERSIAN: UScriptCode = 61i32; +pub const USCRIPT_OLD_SOGDIAN: UScriptCode = 184i32; +pub const USCRIPT_OLD_SOUTH_ARABIAN: UScriptCode = 133i32; +pub const USCRIPT_OL_CHIKI: UScriptCode = 109i32; +pub const USCRIPT_ORIYA: UScriptCode = 31i32; +pub const USCRIPT_ORKHON: UScriptCode = 88i32; +pub const USCRIPT_OSAGE: UScriptCode = 171i32; +pub const USCRIPT_OSMANYA: UScriptCode = 50i32; +pub const USCRIPT_PAHAWH_HMONG: UScriptCode = 75i32; +pub const USCRIPT_PALMYRENE: UScriptCode = 144i32; +pub const USCRIPT_PAU_CIN_HAU: UScriptCode = 165i32; +pub const USCRIPT_PHAGS_PA: UScriptCode = 90i32; +pub const USCRIPT_PHOENICIAN: UScriptCode = 91i32; +pub const USCRIPT_PHONETIC_POLLARD: UScriptCode = 92i32; +pub const USCRIPT_PSALTER_PAHLAVI: UScriptCode = 123i32; +pub const USCRIPT_REJANG: UScriptCode = 110i32; +pub const USCRIPT_RONGORONGO: UScriptCode = 93i32; +pub const USCRIPT_RUNIC: UScriptCode = 32i32; +pub const USCRIPT_SAMARITAN: UScriptCode = 126i32; +pub const USCRIPT_SARATI: UScriptCode = 94i32; +pub const USCRIPT_SAURASHTRA: UScriptCode = 111i32; +pub const USCRIPT_SHARADA: UScriptCode = 151i32; +pub const USCRIPT_SHAVIAN: UScriptCode = 51i32; +pub const USCRIPT_SIDDHAM: UScriptCode = 166i32; +pub const USCRIPT_SIGN_WRITING: UScriptCode = 112i32; +pub const USCRIPT_SIMPLIFIED_HAN: UScriptCode = 73i32; +pub const USCRIPT_SINDHI: UScriptCode = 145i32; +pub const USCRIPT_SINHALA: UScriptCode = 33i32; +pub const USCRIPT_SOGDIAN: UScriptCode = 183i32; +pub const USCRIPT_SORA_SOMPENG: UScriptCode = 152i32; +pub const USCRIPT_SOYOMBO: UScriptCode = 176i32; +pub const USCRIPT_SUNDANESE: UScriptCode = 113i32; +pub const USCRIPT_SYLOTI_NAGRI: UScriptCode = 58i32; +pub const USCRIPT_SYMBOLS: UScriptCode = 129i32; +pub const USCRIPT_SYMBOLS_EMOJI: UScriptCode = 174i32; +pub const USCRIPT_SYRIAC: UScriptCode = 34i32; +pub const USCRIPT_TAGALOG: UScriptCode = 42i32; +pub const USCRIPT_TAGBANWA: UScriptCode = 45i32; +pub const USCRIPT_TAI_LE: UScriptCode = 52i32; +pub const USCRIPT_TAI_VIET: UScriptCode = 127i32; +pub const USCRIPT_TAKRI: UScriptCode = 153i32; +pub const USCRIPT_TAMIL: UScriptCode = 35i32; +pub const USCRIPT_TANGUT: UScriptCode = 154i32; +pub const USCRIPT_TELUGU: UScriptCode = 36i32; +pub const USCRIPT_TENGWAR: UScriptCode = 98i32; +pub const USCRIPT_THAANA: UScriptCode = 37i32; +pub const USCRIPT_THAI: UScriptCode = 38i32; +pub const USCRIPT_TIBETAN: UScriptCode = 39i32; +pub const USCRIPT_TIFINAGH: UScriptCode = 60i32; +pub const USCRIPT_TIRHUTA: UScriptCode = 158i32; +pub const USCRIPT_TRADITIONAL_HAN: UScriptCode = 74i32; +pub const USCRIPT_UCAS: UScriptCode = 40i32; +pub const USCRIPT_UGARITIC: UScriptCode = 53i32; +pub const USCRIPT_UNKNOWN: UScriptCode = 103i32; +pub const USCRIPT_UNWRITTEN_LANGUAGES: UScriptCode = 102i32; +pub const USCRIPT_USAGE_ASPIRATIONAL: UScriptUsage = 4i32; +pub const USCRIPT_USAGE_EXCLUDED: UScriptUsage = 2i32; +pub const USCRIPT_USAGE_LIMITED_USE: UScriptUsage = 3i32; +pub const USCRIPT_USAGE_NOT_ENCODED: UScriptUsage = 0i32; +pub const USCRIPT_USAGE_RECOMMENDED: UScriptUsage = 5i32; +pub const USCRIPT_USAGE_UNKNOWN: UScriptUsage = 1i32; +pub const USCRIPT_VAI: UScriptCode = 99i32; +pub const USCRIPT_VISIBLE_SPEECH: UScriptCode = 100i32; +pub const USCRIPT_WANCHO: UScriptCode = 188i32; +pub const USCRIPT_WARANG_CITI: UScriptCode = 146i32; +pub const USCRIPT_WESTERN_SYRIAC: UScriptCode = 96i32; +pub const USCRIPT_WOLEAI: UScriptCode = 155i32; +pub const USCRIPT_YEZIDI: UScriptCode = 192i32; +pub const USCRIPT_YI: UScriptCode = 41i32; +pub const USCRIPT_ZANABAZAR_SQUARE: UScriptCode = 177i32; +pub const USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD: USearchAttributeValue = 4i32; +pub const USEARCH_DEFAULT: USearchAttributeValue = -1i32; +pub const USEARCH_DONE: i32 = -1i32; +pub const USEARCH_ELEMENT_COMPARISON: USearchAttribute = 2i32; +pub const USEARCH_OFF: USearchAttributeValue = 0i32; +pub const USEARCH_ON: USearchAttributeValue = 1i32; +pub const USEARCH_OVERLAP: USearchAttribute = 0i32; +pub const USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD: USearchAttributeValue = 3i32; +pub const USEARCH_STANDARD_ELEMENT_COMPARISON: USearchAttributeValue = 2i32; +pub const USET_ADD_CASE_MAPPINGS: i32 = 4i32; +pub const USET_CASE_INSENSITIVE: i32 = 2i32; +pub const USET_IGNORE_SPACE: i32 = 1i32; +pub const USET_SERIALIZED_STATIC_ARRAY_CAPACITY: i32 = 8i32; +pub const USET_SPAN_CONTAINED: USetSpanCondition = 1i32; +pub const USET_SPAN_NOT_CONTAINED: USetSpanCondition = 0i32; +pub const USET_SPAN_SIMPLE: USetSpanCondition = 2i32; +pub const USPOOF_ALL_CHECKS: USpoofChecks = 65535i32; +pub const USPOOF_ASCII: URestrictionLevel = 268435456i32; +pub const USPOOF_AUX_INFO: USpoofChecks = 1073741824i32; +pub const USPOOF_CHAR_LIMIT: USpoofChecks = 64i32; +pub const USPOOF_CONFUSABLE: USpoofChecks = 7i32; +pub const USPOOF_HIDDEN_OVERLAY: USpoofChecks = 256i32; +pub const USPOOF_HIGHLY_RESTRICTIVE: URestrictionLevel = 805306368i32; +pub const USPOOF_INVISIBLE: USpoofChecks = 32i32; +pub const USPOOF_MINIMALLY_RESTRICTIVE: URestrictionLevel = 1342177280i32; +pub const USPOOF_MIXED_NUMBERS: USpoofChecks = 128i32; +pub const USPOOF_MIXED_SCRIPT_CONFUSABLE: USpoofChecks = 2i32; +pub const USPOOF_MODERATELY_RESTRICTIVE: URestrictionLevel = 1073741824i32; +pub const USPOOF_RESTRICTION_LEVEL: USpoofChecks = 16i32; +pub const USPOOF_RESTRICTION_LEVEL_MASK: URestrictionLevel = 2130706432i32; +pub const USPOOF_SINGLE_SCRIPT_CONFUSABLE: USpoofChecks = 1i32; +pub const USPOOF_SINGLE_SCRIPT_RESTRICTIVE: URestrictionLevel = 536870912i32; +pub const USPOOF_UNRESTRICTIVE: URestrictionLevel = 1610612736i32; +pub const USPOOF_WHOLE_SCRIPT_CONFUSABLE: USpoofChecks = 4i32; +pub const USPREP_ALLOW_UNASSIGNED: u32 = 1u32; +pub const USPREP_DEFAULT: u32 = 0u32; +pub const USPREP_RFC3491_NAMEPREP: UStringPrepProfileType = 0i32; +pub const USPREP_RFC3530_NFS4_CIS_PREP: UStringPrepProfileType = 3i32; +pub const USPREP_RFC3530_NFS4_CS_PREP: UStringPrepProfileType = 1i32; +pub const USPREP_RFC3530_NFS4_CS_PREP_CI: UStringPrepProfileType = 2i32; +pub const USPREP_RFC3530_NFS4_MIXED_PREP_PREFIX: UStringPrepProfileType = 4i32; +pub const USPREP_RFC3530_NFS4_MIXED_PREP_SUFFIX: UStringPrepProfileType = 5i32; +pub const USPREP_RFC3722_ISCSI: UStringPrepProfileType = 6i32; +pub const USPREP_RFC3920_NODEPREP: UStringPrepProfileType = 7i32; +pub const USPREP_RFC3920_RESOURCEPREP: UStringPrepProfileType = 8i32; +pub const USPREP_RFC4011_MIB: UStringPrepProfileType = 9i32; +pub const USPREP_RFC4013_SASLPREP: UStringPrepProfileType = 10i32; +pub const USPREP_RFC4505_TRACE: UStringPrepProfileType = 11i32; +pub const USPREP_RFC4518_LDAP: UStringPrepProfileType = 12i32; +pub const USPREP_RFC4518_LDAP_CI: UStringPrepProfileType = 13i32; +pub const USP_E_SCRIPT_NOT_IN_FONT: windows_sys::core::HRESULT = 0x80040200_u32 as _; +pub const USTRINGTRIE_BUILD_FAST: UStringTrieBuildOption = 0i32; +pub const USTRINGTRIE_BUILD_SMALL: UStringTrieBuildOption = 1i32; +pub const USTRINGTRIE_FINAL_VALUE: UStringTrieResult = 2i32; +pub const USTRINGTRIE_INTERMEDIATE_VALUE: UStringTrieResult = 3i32; +pub const USTRINGTRIE_NO_MATCH: UStringTrieResult = 0i32; +pub const USTRINGTRIE_NO_VALUE: UStringTrieResult = 1i32; +pub type UScriptCode = i32; +pub type UScriptUsage = i32; +pub type USearch = isize; +pub type USearchAttribute = i32; +pub type USearchAttributeValue = i32; +pub type USentenceBreak = i32; +pub type USentenceBreakTag = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct USerializedSet { + pub array: *const u16, + pub bmpLength: i32, + pub length: i32, + pub staticArray: [u16; 8], +} +impl Default for USerializedSet { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type USet = isize; +pub type USetSpanCondition = i32; +pub type USpoofCheckResult = isize; +pub type USpoofChecker = isize; +pub type USpoofChecks = i32; +pub type UStringCaseMapper = Option i32>; +pub type UStringPrepProfile = isize; +pub type UStringPrepProfileType = i32; +pub type UStringSearch = isize; +pub type UStringTrieBuildOption = i32; +pub type UStringTrieResult = i32; +pub type USystemTimeZoneType = i32; +pub const UTEXT_MAGIC: i32 = 878368812i32; +pub const UTEXT_PROVIDER_HAS_META_DATA: i32 = 4i32; +pub const UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE: i32 = 1i32; +pub const UTEXT_PROVIDER_OWNS_TEXT: i32 = 5i32; +pub const UTEXT_PROVIDER_STABLE_CHUNKS: i32 = 2i32; +pub const UTEXT_PROVIDER_WRITABLE: i32 = 3i32; +pub const UTF16_MAX_CHAR_LENGTH: u32 = 2u32; +pub const UTF32_MAX_CHAR_LENGTH: u32 = 1u32; +pub const UTF8_ERROR_VALUE_1: u32 = 21u32; +pub const UTF8_ERROR_VALUE_2: u32 = 159u32; +pub const UTF8_MAX_CHAR_LENGTH: u32 = 4u32; +pub const UTF_ERROR_VALUE: u32 = 65535u32; +pub const UTF_MAX_CHAR_LENGTH: u32 = 2u32; +pub const UTF_SIZE: u32 = 16u32; +pub const UTRACE_COLLATION_START: UTraceFunctionNumber = 8192i32; +pub const UTRACE_CONVERSION_START: UTraceFunctionNumber = 4096i32; +pub const UTRACE_ERROR: UTraceLevel = 0i32; +pub const UTRACE_FUNCTION_START: UTraceFunctionNumber = 0i32; +pub const UTRACE_INFO: UTraceLevel = 7i32; +pub const UTRACE_OFF: UTraceLevel = -1i32; +pub const UTRACE_OPEN_CLOSE: UTraceLevel = 5i32; +pub const UTRACE_UCNV_CLONE: UTraceFunctionNumber = 4099i32; +pub const UTRACE_UCNV_CLOSE: UTraceFunctionNumber = 4100i32; +pub const UTRACE_UCNV_FLUSH_CACHE: UTraceFunctionNumber = 4101i32; +pub const UTRACE_UCNV_LOAD: UTraceFunctionNumber = 4102i32; +pub const UTRACE_UCNV_OPEN: UTraceFunctionNumber = 4096i32; +pub const UTRACE_UCNV_OPEN_ALGORITHMIC: UTraceFunctionNumber = 4098i32; +pub const UTRACE_UCNV_OPEN_PACKAGE: UTraceFunctionNumber = 4097i32; +pub const UTRACE_UCNV_UNLOAD: UTraceFunctionNumber = 4103i32; +pub const UTRACE_UCOL_CLOSE: UTraceFunctionNumber = 8193i32; +pub const UTRACE_UCOL_GETLOCALE: UTraceFunctionNumber = 8196i32; +pub const UTRACE_UCOL_GET_SORTKEY: UTraceFunctionNumber = 8195i32; +pub const UTRACE_UCOL_NEXTSORTKEYPART: UTraceFunctionNumber = 8197i32; +pub const UTRACE_UCOL_OPEN: UTraceFunctionNumber = 8192i32; +pub const UTRACE_UCOL_OPEN_FROM_SHORT_STRING: UTraceFunctionNumber = 8199i32; +pub const UTRACE_UCOL_STRCOLL: UTraceFunctionNumber = 8194i32; +pub const UTRACE_UCOL_STRCOLLITER: UTraceFunctionNumber = 8198i32; +pub const UTRACE_UCOL_STRCOLLUTF8: UTraceFunctionNumber = 8200i32; +pub const UTRACE_UDATA_BUNDLE: UTraceFunctionNumber = 12289i32; +pub const UTRACE_UDATA_DATA_FILE: UTraceFunctionNumber = 12290i32; +pub const UTRACE_UDATA_RESOURCE: UTraceFunctionNumber = 12288i32; +pub const UTRACE_UDATA_RES_FILE: UTraceFunctionNumber = 12291i32; +pub const UTRACE_UDATA_START: UTraceFunctionNumber = 12288i32; +pub const UTRACE_U_CLEANUP: UTraceFunctionNumber = 1i32; +pub const UTRACE_U_INIT: UTraceFunctionNumber = 0i32; +pub const UTRACE_VERBOSE: UTraceLevel = 9i32; +pub const UTRACE_WARNING: UTraceLevel = 3i32; +pub const UTRANS_FORWARD: UTransDirection = 0i32; +pub const UTRANS_REVERSE: UTransDirection = 1i32; +pub const UTSV_EPOCH_OFFSET_VALUE: UTimeScaleValue = 1i32; +pub const UTSV_FROM_MAX_VALUE: UTimeScaleValue = 3i32; +pub const UTSV_FROM_MIN_VALUE: UTimeScaleValue = 2i32; +pub const UTSV_TO_MAX_VALUE: UTimeScaleValue = 5i32; +pub const UTSV_TO_MIN_VALUE: UTimeScaleValue = 4i32; +pub const UTSV_UNITS_VALUE: UTimeScaleValue = 0i32; +pub const UTZFMT_PARSE_OPTION_ALL_STYLES: UTimeZoneFormatParseOption = 1i32; +pub const UTZFMT_PARSE_OPTION_NONE: UTimeZoneFormatParseOption = 0i32; +pub const UTZFMT_PARSE_OPTION_TZ_DATABASE_ABBREVIATIONS: UTimeZoneFormatParseOption = 2i32; +pub const UTZFMT_PAT_COUNT: UTimeZoneFormatGMTOffsetPatternType = 6i32; +pub const UTZFMT_PAT_NEGATIVE_H: UTimeZoneFormatGMTOffsetPatternType = 5i32; +pub const UTZFMT_PAT_NEGATIVE_HM: UTimeZoneFormatGMTOffsetPatternType = 2i32; +pub const UTZFMT_PAT_NEGATIVE_HMS: UTimeZoneFormatGMTOffsetPatternType = 3i32; +pub const UTZFMT_PAT_POSITIVE_H: UTimeZoneFormatGMTOffsetPatternType = 4i32; +pub const UTZFMT_PAT_POSITIVE_HM: UTimeZoneFormatGMTOffsetPatternType = 0i32; +pub const UTZFMT_PAT_POSITIVE_HMS: UTimeZoneFormatGMTOffsetPatternType = 1i32; +pub const UTZFMT_STYLE_EXEMPLAR_LOCATION: UTimeZoneFormatStyle = 19i32; +pub const UTZFMT_STYLE_GENERIC_LOCATION: UTimeZoneFormatStyle = 0i32; +pub const UTZFMT_STYLE_GENERIC_LONG: UTimeZoneFormatStyle = 1i32; +pub const UTZFMT_STYLE_GENERIC_SHORT: UTimeZoneFormatStyle = 2i32; +pub const UTZFMT_STYLE_ISO_BASIC_FIXED: UTimeZoneFormatStyle = 9i32; +pub const UTZFMT_STYLE_ISO_BASIC_FULL: UTimeZoneFormatStyle = 11i32; +pub const UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED: UTimeZoneFormatStyle = 10i32; +pub const UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL: UTimeZoneFormatStyle = 12i32; +pub const UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT: UTimeZoneFormatStyle = 8i32; +pub const UTZFMT_STYLE_ISO_BASIC_SHORT: UTimeZoneFormatStyle = 7i32; +pub const UTZFMT_STYLE_ISO_EXTENDED_FIXED: UTimeZoneFormatStyle = 13i32; +pub const UTZFMT_STYLE_ISO_EXTENDED_FULL: UTimeZoneFormatStyle = 15i32; +pub const UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED: UTimeZoneFormatStyle = 14i32; +pub const UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL: UTimeZoneFormatStyle = 16i32; +pub const UTZFMT_STYLE_LOCALIZED_GMT: UTimeZoneFormatStyle = 5i32; +pub const UTZFMT_STYLE_LOCALIZED_GMT_SHORT: UTimeZoneFormatStyle = 6i32; +pub const UTZFMT_STYLE_SPECIFIC_LONG: UTimeZoneFormatStyle = 3i32; +pub const UTZFMT_STYLE_SPECIFIC_SHORT: UTimeZoneFormatStyle = 4i32; +pub const UTZFMT_STYLE_ZONE_ID: UTimeZoneFormatStyle = 17i32; +pub const UTZFMT_STYLE_ZONE_ID_SHORT: UTimeZoneFormatStyle = 18i32; +pub const UTZFMT_TIME_TYPE_DAYLIGHT: UTimeZoneFormatTimeType = 2i32; +pub const UTZFMT_TIME_TYPE_STANDARD: UTimeZoneFormatTimeType = 1i32; +pub const UTZFMT_TIME_TYPE_UNKNOWN: UTimeZoneFormatTimeType = 0i32; +pub const UTZNM_EXEMPLAR_LOCATION: UTimeZoneNameType = 64i32; +pub const UTZNM_LONG_DAYLIGHT: UTimeZoneNameType = 4i32; +pub const UTZNM_LONG_GENERIC: UTimeZoneNameType = 1i32; +pub const UTZNM_LONG_STANDARD: UTimeZoneNameType = 2i32; +pub const UTZNM_SHORT_DAYLIGHT: UTimeZoneNameType = 32i32; +pub const UTZNM_SHORT_GENERIC: UTimeZoneNameType = 8i32; +pub const UTZNM_SHORT_STANDARD: UTimeZoneNameType = 16i32; +pub const UTZNM_UNKNOWN: UTimeZoneNameType = 0i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UText { + pub magic: u32, + pub flags: i32, + pub providerProperties: i32, + pub sizeOfStruct: i32, + pub chunkNativeLimit: i64, + pub extraSize: i32, + pub nativeIndexingLimit: i32, + pub chunkNativeStart: i64, + pub chunkOffset: i32, + pub chunkLength: i32, + pub chunkContents: *const u16, + pub pFuncs: *const UTextFuncs, + pub pExtra: *mut core::ffi::c_void, + pub context: *const core::ffi::c_void, + pub p: *const core::ffi::c_void, + pub q: *const core::ffi::c_void, + pub r: *const core::ffi::c_void, + pub privP: *mut core::ffi::c_void, + pub a: i64, + pub b: i32, + pub c: i32, + pub privA: i64, + pub privB: i32, + pub privC: i32, +} +impl Default for UText { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type UTextAccess = Option i8>; +pub type UTextClone = Option *mut UText>; +pub type UTextClose = Option; +pub type UTextCopy = Option; +pub type UTextExtract = Option i32>; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UTextFuncs { + pub tableSize: i32, + pub reserved1: i32, + pub reserved2: i32, + pub reserved3: i32, + pub clone: UTextClone, + pub nativeLength: UTextNativeLength, + pub access: UTextAccess, + pub extract: UTextExtract, + pub replace: UTextReplace, + pub copy: UTextCopy, + pub mapOffsetToNative: UTextMapOffsetToNative, + pub mapNativeIndexToUTF16: UTextMapNativeIndexToUTF16, + pub close: UTextClose, + pub spare1: UTextClose, + pub spare2: UTextClose, + pub spare3: UTextClose, +} +pub type UTextMapNativeIndexToUTF16 = Option i32>; +pub type UTextMapOffsetToNative = Option i64>; +pub type UTextNativeLength = Option i64>; +pub type UTextReplace = Option i32>; +pub type UTimeScaleValue = i32; +pub type UTimeZoneFormatGMTOffsetPatternType = i32; +pub type UTimeZoneFormatParseOption = i32; +pub type UTimeZoneFormatStyle = i32; +pub type UTimeZoneFormatTimeType = i32; +pub type UTimeZoneNameType = i32; +pub type UTimeZoneTransitionType = i32; +pub type UTraceData = Option; +pub type UTraceEntry = Option; +pub type UTraceExit = Option; +pub type UTraceFunctionNumber = i32; +pub type UTraceLevel = i32; +pub type UTransDirection = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UTransPosition { + pub contextStart: i32, + pub contextLimit: i32, + pub start: i32, + pub limit: i32, +} +pub type UVerticalOrientation = i32; +pub type UWordBreak = i32; +pub type UWordBreakValues = i32; +pub const U_ALPHAINDEX_INFLOW: UAlphabeticIndexLabelType = 2i32; +pub const U_ALPHAINDEX_NORMAL: UAlphabeticIndexLabelType = 0i32; +pub const U_ALPHAINDEX_OVERFLOW: UAlphabeticIndexLabelType = 3i32; +pub const U_ALPHAINDEX_UNDERFLOW: UAlphabeticIndexLabelType = 1i32; +pub const U_AMBIGUOUS_ALIAS_WARNING: UErrorCode = -122i32; +pub const U_ARABIC_NUMBER: UCharDirection = 5i32; +pub const U_ARGUMENT_TYPE_MISMATCH: UErrorCode = 65804i32; +pub const U_ASCII_FAMILY: u32 = 0u32; +pub const U_BAD_VARIABLE_DEFINITION: UErrorCode = 65536i32; +pub const U_BLOCK_SEPARATOR: UCharDirection = 7i32; +pub const U_BOUNDARY_NEUTRAL: UCharDirection = 18i32; +pub const U_BPT_CLOSE: UBidiPairedBracketType = 2i32; +pub const U_BPT_NONE: UBidiPairedBracketType = 0i32; +pub const U_BPT_OPEN: UBidiPairedBracketType = 1i32; +pub const U_BRK_ASSIGN_ERROR: UErrorCode = 66053i32; +pub const U_BRK_ERROR_START: UErrorCode = 66048i32; +pub const U_BRK_HEX_DIGITS_EXPECTED: UErrorCode = 66049i32; +pub const U_BRK_INIT_ERROR: UErrorCode = 66058i32; +pub const U_BRK_INTERNAL_ERROR: UErrorCode = 66048i32; +pub const U_BRK_MALFORMED_RULE_TAG: UErrorCode = 66061i32; +pub const U_BRK_MISMATCHED_PAREN: UErrorCode = 66055i32; +pub const U_BRK_NEW_LINE_IN_QUOTED_STRING: UErrorCode = 66056i32; +pub const U_BRK_RULE_EMPTY_SET: UErrorCode = 66059i32; +pub const U_BRK_RULE_SYNTAX: UErrorCode = 66051i32; +pub const U_BRK_SEMICOLON_EXPECTED: UErrorCode = 66050i32; +pub const U_BRK_UNCLOSED_SET: UErrorCode = 66052i32; +pub const U_BRK_UNDEFINED_VARIABLE: UErrorCode = 66057i32; +pub const U_BRK_UNRECOGNIZED_OPTION: UErrorCode = 66060i32; +pub const U_BRK_VARIABLE_REDFINITION: UErrorCode = 66054i32; +pub const U_BUFFER_OVERFLOW_ERROR: UErrorCode = 15i32; +pub const U_CE_NOT_FOUND_ERROR: UErrorCode = 21i32; +pub const U_CHAR16_IS_TYPEDEF: u32 = 1u32; +pub const U_CHARSET_FAMILY: u32 = 1u32; +pub const U_CHARSET_IS_UTF8: u32 = 1u32; +pub const U_CHAR_CATEGORY_COUNT: UCharCategory = 30i32; +pub const U_CHAR_NAME_ALIAS: UCharNameChoice = 3i32; +pub const U_CHECK_DYLOAD: u32 = 1u32; +pub const U_COLLATOR_VERSION_MISMATCH: UErrorCode = 28i32; +pub const U_COMBINED_IMPLEMENTATION: u32 = 1u32; +pub const U_COMBINING_SPACING_MARK: UCharCategory = 8i32; +pub const U_COMMON_NUMBER_SEPARATOR: UCharDirection = 6i32; +pub const U_COMPARE_CODE_POINT_ORDER: u32 = 32768u32; +pub const U_COMPARE_IGNORE_CASE: u32 = 65536u32; +pub const U_CONNECTOR_PUNCTUATION: UCharCategory = 22i32; +pub const U_CONTROL_CHAR: UCharCategory = 15i32; +pub const U_COPYRIGHT_STRING_LENGTH: u32 = 128u32; +pub const U_CPLUSPLUS_VERSION: u32 = 0u32; +pub const U_CURRENCY_SYMBOL: UCharCategory = 25i32; +pub const U_DASH_PUNCTUATION: UCharCategory = 19i32; +pub const U_DEBUG: u32 = 1u32; +pub const U_DECIMAL_DIGIT_NUMBER: UCharCategory = 9i32; +pub const U_DECIMAL_NUMBER_SYNTAX_ERROR: UErrorCode = 65808i32; +pub const U_DEFAULT_KEYWORD_MISSING: UErrorCode = 65807i32; +pub const U_DEFAULT_SHOW_DRAFT: u32 = 0u32; +pub const U_DEFINE_FALSE_AND_TRUE: u32 = 1u32; +pub const U_DIFFERENT_UCA_VERSION: UErrorCode = -121i32; +pub const U_DIR_NON_SPACING_MARK: UCharDirection = 17i32; +pub const U_DISABLE_RENAMING: u32 = 1u32; +pub const U_DT_CANONICAL: UDecompositionType = 1i32; +pub const U_DT_CIRCLE: UDecompositionType = 3i32; +pub const U_DT_COMPAT: UDecompositionType = 2i32; +pub const U_DT_FINAL: UDecompositionType = 4i32; +pub const U_DT_FONT: UDecompositionType = 5i32; +pub const U_DT_FRACTION: UDecompositionType = 6i32; +pub const U_DT_INITIAL: UDecompositionType = 7i32; +pub const U_DT_ISOLATED: UDecompositionType = 8i32; +pub const U_DT_MEDIAL: UDecompositionType = 9i32; +pub const U_DT_NARROW: UDecompositionType = 10i32; +pub const U_DT_NOBREAK: UDecompositionType = 11i32; +pub const U_DT_NONE: UDecompositionType = 0i32; +pub const U_DT_SMALL: UDecompositionType = 12i32; +pub const U_DT_SQUARE: UDecompositionType = 13i32; +pub const U_DT_SUB: UDecompositionType = 14i32; +pub const U_DT_SUPER: UDecompositionType = 15i32; +pub const U_DT_VERTICAL: UDecompositionType = 16i32; +pub const U_DT_WIDE: UDecompositionType = 17i32; +pub const U_DUPLICATE_KEYWORD: UErrorCode = 65805i32; +pub const U_EA_AMBIGUOUS: UEastAsianWidth = 1i32; +pub const U_EA_FULLWIDTH: UEastAsianWidth = 3i32; +pub const U_EA_HALFWIDTH: UEastAsianWidth = 2i32; +pub const U_EA_NARROW: UEastAsianWidth = 4i32; +pub const U_EA_NEUTRAL: UEastAsianWidth = 0i32; +pub const U_EA_WIDE: UEastAsianWidth = 5i32; +pub const U_EBCDIC_FAMILY: u32 = 1u32; +pub const U_EDITS_NO_RESET: u32 = 8192u32; +pub const U_ENABLE_DYLOAD: u32 = 1u32; +pub const U_ENABLE_TRACING: u32 = 0u32; +pub const U_ENCLOSING_MARK: UCharCategory = 7i32; +pub const U_END_PUNCTUATION: UCharCategory = 21i32; +pub const U_ENUM_OUT_OF_SYNC_ERROR: UErrorCode = 25i32; +pub const U_ERROR_WARNING_START: UErrorCode = -128i32; +pub const U_EUROPEAN_NUMBER: UCharDirection = 2i32; +pub const U_EUROPEAN_NUMBER_SEPARATOR: UCharDirection = 3i32; +pub const U_EUROPEAN_NUMBER_TERMINATOR: UCharDirection = 4i32; +pub const U_EXTENDED_CHAR_NAME: UCharNameChoice = 2i32; +pub const U_FILE_ACCESS_ERROR: UErrorCode = 4i32; +pub const U_FINAL_PUNCTUATION: UCharCategory = 29i32; +pub const U_FIRST_STRONG_ISOLATE: UCharDirection = 19i32; +pub const U_FMT_PARSE_ERROR_START: UErrorCode = 65792i32; +pub const U_FOLD_CASE_DEFAULT: u32 = 0u32; +pub const U_FOLD_CASE_EXCLUDE_SPECIAL_I: u32 = 1u32; +pub const U_FORMAT_CHAR: UCharCategory = 16i32; +pub const U_FORMAT_INEXACT_ERROR: UErrorCode = 65809i32; +pub const U_GCB_CONTROL: UGraphemeClusterBreak = 1i32; +pub const U_GCB_CR: UGraphemeClusterBreak = 2i32; +pub const U_GCB_EXTEND: UGraphemeClusterBreak = 3i32; +pub const U_GCB_E_BASE: UGraphemeClusterBreak = 13i32; +pub const U_GCB_E_BASE_GAZ: UGraphemeClusterBreak = 14i32; +pub const U_GCB_E_MODIFIER: UGraphemeClusterBreak = 15i32; +pub const U_GCB_GLUE_AFTER_ZWJ: UGraphemeClusterBreak = 16i32; +pub const U_GCB_L: UGraphemeClusterBreak = 4i32; +pub const U_GCB_LF: UGraphemeClusterBreak = 5i32; +pub const U_GCB_LV: UGraphemeClusterBreak = 6i32; +pub const U_GCB_LVT: UGraphemeClusterBreak = 7i32; +pub const U_GCB_OTHER: UGraphemeClusterBreak = 0i32; +pub const U_GCB_PREPEND: UGraphemeClusterBreak = 11i32; +pub const U_GCB_REGIONAL_INDICATOR: UGraphemeClusterBreak = 12i32; +pub const U_GCB_SPACING_MARK: UGraphemeClusterBreak = 10i32; +pub const U_GCB_T: UGraphemeClusterBreak = 8i32; +pub const U_GCB_V: UGraphemeClusterBreak = 9i32; +pub const U_GCB_ZWJ: UGraphemeClusterBreak = 17i32; +pub const U_GCC_MAJOR_MINOR: u32 = 0u32; +pub const U_GENERAL_OTHER_TYPES: UCharCategory = 0i32; +pub const U_HAVE_CHAR16_T: u32 = 1u32; +pub const U_HAVE_DEBUG_LOCATION_NEW: u32 = 1u32; +pub const U_HAVE_INTTYPES_H: u32 = 1u32; +pub const U_HAVE_LIB_SUFFIX: u32 = 1u32; +pub const U_HAVE_PLACEMENT_NEW: u32 = 0u32; +pub const U_HAVE_RBNF: u32 = 0u32; +pub const U_HAVE_RVALUE_REFERENCES: u32 = 1u32; +pub const U_HAVE_STDINT_H: u32 = 1u32; +pub const U_HAVE_STD_STRING: u32 = 0u32; +pub const U_HAVE_WCHAR_H: u32 = 0u32; +pub const U_HAVE_WCSCPY: u32 = 0u32; +pub const U_HIDE_DEPRECATED_API: u32 = 1u32; +pub const U_HIDE_DRAFT_API: u32 = 1u32; +pub const U_HIDE_INTERNAL_API: u32 = 1u32; +pub const U_HIDE_OBSOLETE_API: u32 = 1u32; +pub const U_HIDE_OBSOLETE_UTF_OLD_H: u32 = 0u32; +pub const U_HST_LEADING_JAMO: UHangulSyllableType = 1i32; +pub const U_HST_LVT_SYLLABLE: UHangulSyllableType = 5i32; +pub const U_HST_LV_SYLLABLE: UHangulSyllableType = 4i32; +pub const U_HST_NOT_APPLICABLE: UHangulSyllableType = 0i32; +pub const U_HST_TRAILING_JAMO: UHangulSyllableType = 3i32; +pub const U_HST_VOWEL_JAMO: UHangulSyllableType = 2i32; +pub const U_ICUDATA_TYPE_LETTER: windows_sys::core::PCSTR = windows_sys::core::s!("e"); +pub const U_ICU_DATA_KEY: windows_sys::core::PCSTR = windows_sys::core::s!("DataVersion"); +pub const U_ICU_VERSION_BUNDLE: windows_sys::core::PCSTR = windows_sys::core::s!("icuver"); +pub const U_IDNA_ACE_PREFIX_ERROR: UErrorCode = 66564i32; +pub const U_IDNA_CHECK_BIDI_ERROR: UErrorCode = 66562i32; +pub const U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR: UErrorCode = 66568i32; +pub const U_IDNA_ERROR_START: UErrorCode = 66560i32; +pub const U_IDNA_LABEL_TOO_LONG_ERROR: UErrorCode = 66566i32; +pub const U_IDNA_PROHIBITED_ERROR: UErrorCode = 66560i32; +pub const U_IDNA_STD3_ASCII_RULES_ERROR: UErrorCode = 66563i32; +pub const U_IDNA_UNASSIGNED_ERROR: UErrorCode = 66561i32; +pub const U_IDNA_VERIFICATION_ERROR: UErrorCode = 66565i32; +pub const U_IDNA_ZERO_LENGTH_LABEL_ERROR: UErrorCode = 66567i32; +pub const U_ILLEGAL_ARGUMENT_ERROR: UErrorCode = 1i32; +pub const U_ILLEGAL_CHARACTER: UErrorCode = 65567i32; +pub const U_ILLEGAL_CHAR_FOUND: UErrorCode = 12i32; +pub const U_ILLEGAL_CHAR_IN_SEGMENT: UErrorCode = 65564i32; +pub const U_ILLEGAL_ESCAPE_SEQUENCE: UErrorCode = 18i32; +pub const U_ILLEGAL_PAD_POSITION: UErrorCode = 65800i32; +pub const U_INDEX_OUTOFBOUNDS_ERROR: UErrorCode = 8i32; +pub const U_INITIAL_PUNCTUATION: UCharCategory = 28i32; +pub const U_INPC_BOTTOM: UIndicPositionalCategory = 1i32; +pub const U_INPC_BOTTOM_AND_LEFT: UIndicPositionalCategory = 2i32; +pub const U_INPC_BOTTOM_AND_RIGHT: UIndicPositionalCategory = 3i32; +pub const U_INPC_LEFT: UIndicPositionalCategory = 4i32; +pub const U_INPC_LEFT_AND_RIGHT: UIndicPositionalCategory = 5i32; +pub const U_INPC_NA: UIndicPositionalCategory = 0i32; +pub const U_INPC_OVERSTRUCK: UIndicPositionalCategory = 6i32; +pub const U_INPC_RIGHT: UIndicPositionalCategory = 7i32; +pub const U_INPC_TOP: UIndicPositionalCategory = 8i32; +pub const U_INPC_TOP_AND_BOTTOM: UIndicPositionalCategory = 9i32; +pub const U_INPC_TOP_AND_BOTTOM_AND_LEFT: UIndicPositionalCategory = 15i32; +pub const U_INPC_TOP_AND_BOTTOM_AND_RIGHT: UIndicPositionalCategory = 10i32; +pub const U_INPC_TOP_AND_LEFT: UIndicPositionalCategory = 11i32; +pub const U_INPC_TOP_AND_LEFT_AND_RIGHT: UIndicPositionalCategory = 12i32; +pub const U_INPC_TOP_AND_RIGHT: UIndicPositionalCategory = 13i32; +pub const U_INPC_VISUAL_ORDER_LEFT: UIndicPositionalCategory = 14i32; +pub const U_INSC_AVAGRAHA: UIndicSyllabicCategory = 1i32; +pub const U_INSC_BINDU: UIndicSyllabicCategory = 2i32; +pub const U_INSC_BRAHMI_JOINING_NUMBER: UIndicSyllabicCategory = 3i32; +pub const U_INSC_CANTILLATION_MARK: UIndicSyllabicCategory = 4i32; +pub const U_INSC_CONSONANT: UIndicSyllabicCategory = 5i32; +pub const U_INSC_CONSONANT_DEAD: UIndicSyllabicCategory = 6i32; +pub const U_INSC_CONSONANT_FINAL: UIndicSyllabicCategory = 7i32; +pub const U_INSC_CONSONANT_HEAD_LETTER: UIndicSyllabicCategory = 8i32; +pub const U_INSC_CONSONANT_INITIAL_POSTFIXED: UIndicSyllabicCategory = 9i32; +pub const U_INSC_CONSONANT_KILLER: UIndicSyllabicCategory = 10i32; +pub const U_INSC_CONSONANT_MEDIAL: UIndicSyllabicCategory = 11i32; +pub const U_INSC_CONSONANT_PLACEHOLDER: UIndicSyllabicCategory = 12i32; +pub const U_INSC_CONSONANT_PRECEDING_REPHA: UIndicSyllabicCategory = 13i32; +pub const U_INSC_CONSONANT_PREFIXED: UIndicSyllabicCategory = 14i32; +pub const U_INSC_CONSONANT_SUBJOINED: UIndicSyllabicCategory = 15i32; +pub const U_INSC_CONSONANT_SUCCEEDING_REPHA: UIndicSyllabicCategory = 16i32; +pub const U_INSC_CONSONANT_WITH_STACKER: UIndicSyllabicCategory = 17i32; +pub const U_INSC_GEMINATION_MARK: UIndicSyllabicCategory = 18i32; +pub const U_INSC_INVISIBLE_STACKER: UIndicSyllabicCategory = 19i32; +pub const U_INSC_JOINER: UIndicSyllabicCategory = 20i32; +pub const U_INSC_MODIFYING_LETTER: UIndicSyllabicCategory = 21i32; +pub const U_INSC_NON_JOINER: UIndicSyllabicCategory = 22i32; +pub const U_INSC_NUKTA: UIndicSyllabicCategory = 23i32; +pub const U_INSC_NUMBER: UIndicSyllabicCategory = 24i32; +pub const U_INSC_NUMBER_JOINER: UIndicSyllabicCategory = 25i32; +pub const U_INSC_OTHER: UIndicSyllabicCategory = 0i32; +pub const U_INSC_PURE_KILLER: UIndicSyllabicCategory = 26i32; +pub const U_INSC_REGISTER_SHIFTER: UIndicSyllabicCategory = 27i32; +pub const U_INSC_SYLLABLE_MODIFIER: UIndicSyllabicCategory = 28i32; +pub const U_INSC_TONE_LETTER: UIndicSyllabicCategory = 29i32; +pub const U_INSC_TONE_MARK: UIndicSyllabicCategory = 30i32; +pub const U_INSC_VIRAMA: UIndicSyllabicCategory = 31i32; +pub const U_INSC_VISARGA: UIndicSyllabicCategory = 32i32; +pub const U_INSC_VOWEL: UIndicSyllabicCategory = 33i32; +pub const U_INSC_VOWEL_DEPENDENT: UIndicSyllabicCategory = 34i32; +pub const U_INSC_VOWEL_INDEPENDENT: UIndicSyllabicCategory = 35i32; +pub const U_INTERNAL_PROGRAM_ERROR: UErrorCode = 5i32; +pub const U_INTERNAL_TRANSLITERATOR_ERROR: UErrorCode = 65568i32; +pub const U_INVALID_CHAR_FOUND: UErrorCode = 10i32; +pub const U_INVALID_FORMAT_ERROR: UErrorCode = 3i32; +pub const U_INVALID_FUNCTION: UErrorCode = 65570i32; +pub const U_INVALID_ID: UErrorCode = 65569i32; +pub const U_INVALID_PROPERTY_PATTERN: UErrorCode = 65561i32; +pub const U_INVALID_RBT_SYNTAX: UErrorCode = 65560i32; +pub const U_INVALID_STATE_ERROR: UErrorCode = 27i32; +pub const U_INVALID_TABLE_FILE: UErrorCode = 14i32; +pub const U_INVALID_TABLE_FORMAT: UErrorCode = 13i32; +pub const U_INVARIANT_CONVERSION_ERROR: UErrorCode = 26i32; +pub const U_IOSTREAM_SOURCE: u32 = 199711u32; +pub const U_IS_BIG_ENDIAN: u32 = 0u32; +pub const U_JG_AFRICAN_FEH: UJoiningGroup = 86i32; +pub const U_JG_AFRICAN_NOON: UJoiningGroup = 87i32; +pub const U_JG_AFRICAN_QAF: UJoiningGroup = 88i32; +pub const U_JG_AIN: UJoiningGroup = 1i32; +pub const U_JG_ALAPH: UJoiningGroup = 2i32; +pub const U_JG_ALEF: UJoiningGroup = 3i32; +pub const U_JG_BEH: UJoiningGroup = 4i32; +pub const U_JG_BETH: UJoiningGroup = 5i32; +pub const U_JG_BURUSHASKI_YEH_BARREE: UJoiningGroup = 54i32; +pub const U_JG_DAL: UJoiningGroup = 6i32; +pub const U_JG_DALATH_RISH: UJoiningGroup = 7i32; +pub const U_JG_E: UJoiningGroup = 8i32; +pub const U_JG_FARSI_YEH: UJoiningGroup = 55i32; +pub const U_JG_FE: UJoiningGroup = 51i32; +pub const U_JG_FEH: UJoiningGroup = 9i32; +pub const U_JG_FINAL_SEMKATH: UJoiningGroup = 10i32; +pub const U_JG_GAF: UJoiningGroup = 11i32; +pub const U_JG_GAMAL: UJoiningGroup = 12i32; +pub const U_JG_HAH: UJoiningGroup = 13i32; +pub const U_JG_HAMZA_ON_HEH_GOAL: UJoiningGroup = 14i32; +pub const U_JG_HANIFI_ROHINGYA_KINNA_YA: UJoiningGroup = 100i32; +pub const U_JG_HANIFI_ROHINGYA_PA: UJoiningGroup = 101i32; +pub const U_JG_HE: UJoiningGroup = 15i32; +pub const U_JG_HEH: UJoiningGroup = 16i32; +pub const U_JG_HEH_GOAL: UJoiningGroup = 17i32; +pub const U_JG_HETH: UJoiningGroup = 18i32; +pub const U_JG_KAF: UJoiningGroup = 19i32; +pub const U_JG_KAPH: UJoiningGroup = 20i32; +pub const U_JG_KHAPH: UJoiningGroup = 52i32; +pub const U_JG_KNOTTED_HEH: UJoiningGroup = 21i32; +pub const U_JG_LAM: UJoiningGroup = 22i32; +pub const U_JG_LAMADH: UJoiningGroup = 23i32; +pub const U_JG_MALAYALAM_BHA: UJoiningGroup = 89i32; +pub const U_JG_MALAYALAM_JA: UJoiningGroup = 90i32; +pub const U_JG_MALAYALAM_LLA: UJoiningGroup = 91i32; +pub const U_JG_MALAYALAM_LLLA: UJoiningGroup = 92i32; +pub const U_JG_MALAYALAM_NGA: UJoiningGroup = 93i32; +pub const U_JG_MALAYALAM_NNA: UJoiningGroup = 94i32; +pub const U_JG_MALAYALAM_NNNA: UJoiningGroup = 95i32; +pub const U_JG_MALAYALAM_NYA: UJoiningGroup = 96i32; +pub const U_JG_MALAYALAM_RA: UJoiningGroup = 97i32; +pub const U_JG_MALAYALAM_SSA: UJoiningGroup = 98i32; +pub const U_JG_MALAYALAM_TTA: UJoiningGroup = 99i32; +pub const U_JG_MANICHAEAN_ALEPH: UJoiningGroup = 58i32; +pub const U_JG_MANICHAEAN_AYIN: UJoiningGroup = 59i32; +pub const U_JG_MANICHAEAN_BETH: UJoiningGroup = 60i32; +pub const U_JG_MANICHAEAN_DALETH: UJoiningGroup = 61i32; +pub const U_JG_MANICHAEAN_DHAMEDH: UJoiningGroup = 62i32; +pub const U_JG_MANICHAEAN_FIVE: UJoiningGroup = 63i32; +pub const U_JG_MANICHAEAN_GIMEL: UJoiningGroup = 64i32; +pub const U_JG_MANICHAEAN_HETH: UJoiningGroup = 65i32; +pub const U_JG_MANICHAEAN_HUNDRED: UJoiningGroup = 66i32; +pub const U_JG_MANICHAEAN_KAPH: UJoiningGroup = 67i32; +pub const U_JG_MANICHAEAN_LAMEDH: UJoiningGroup = 68i32; +pub const U_JG_MANICHAEAN_MEM: UJoiningGroup = 69i32; +pub const U_JG_MANICHAEAN_NUN: UJoiningGroup = 70i32; +pub const U_JG_MANICHAEAN_ONE: UJoiningGroup = 71i32; +pub const U_JG_MANICHAEAN_PE: UJoiningGroup = 72i32; +pub const U_JG_MANICHAEAN_QOPH: UJoiningGroup = 73i32; +pub const U_JG_MANICHAEAN_RESH: UJoiningGroup = 74i32; +pub const U_JG_MANICHAEAN_SADHE: UJoiningGroup = 75i32; +pub const U_JG_MANICHAEAN_SAMEKH: UJoiningGroup = 76i32; +pub const U_JG_MANICHAEAN_TAW: UJoiningGroup = 77i32; +pub const U_JG_MANICHAEAN_TEN: UJoiningGroup = 78i32; +pub const U_JG_MANICHAEAN_TETH: UJoiningGroup = 79i32; +pub const U_JG_MANICHAEAN_THAMEDH: UJoiningGroup = 80i32; +pub const U_JG_MANICHAEAN_TWENTY: UJoiningGroup = 81i32; +pub const U_JG_MANICHAEAN_WAW: UJoiningGroup = 82i32; +pub const U_JG_MANICHAEAN_YODH: UJoiningGroup = 83i32; +pub const U_JG_MANICHAEAN_ZAYIN: UJoiningGroup = 84i32; +pub const U_JG_MEEM: UJoiningGroup = 24i32; +pub const U_JG_MIM: UJoiningGroup = 25i32; +pub const U_JG_NOON: UJoiningGroup = 26i32; +pub const U_JG_NO_JOINING_GROUP: UJoiningGroup = 0i32; +pub const U_JG_NUN: UJoiningGroup = 27i32; +pub const U_JG_NYA: UJoiningGroup = 56i32; +pub const U_JG_PE: UJoiningGroup = 28i32; +pub const U_JG_QAF: UJoiningGroup = 29i32; +pub const U_JG_QAPH: UJoiningGroup = 30i32; +pub const U_JG_REH: UJoiningGroup = 31i32; +pub const U_JG_REVERSED_PE: UJoiningGroup = 32i32; +pub const U_JG_ROHINGYA_YEH: UJoiningGroup = 57i32; +pub const U_JG_SAD: UJoiningGroup = 33i32; +pub const U_JG_SADHE: UJoiningGroup = 34i32; +pub const U_JG_SEEN: UJoiningGroup = 35i32; +pub const U_JG_SEMKATH: UJoiningGroup = 36i32; +pub const U_JG_SHIN: UJoiningGroup = 37i32; +pub const U_JG_STRAIGHT_WAW: UJoiningGroup = 85i32; +pub const U_JG_SWASH_KAF: UJoiningGroup = 38i32; +pub const U_JG_SYRIAC_WAW: UJoiningGroup = 39i32; +pub const U_JG_TAH: UJoiningGroup = 40i32; +pub const U_JG_TAW: UJoiningGroup = 41i32; +pub const U_JG_TEH_MARBUTA: UJoiningGroup = 42i32; +pub const U_JG_TEH_MARBUTA_GOAL: UJoiningGroup = 14i32; +pub const U_JG_TETH: UJoiningGroup = 43i32; +pub const U_JG_WAW: UJoiningGroup = 44i32; +pub const U_JG_YEH: UJoiningGroup = 45i32; +pub const U_JG_YEH_BARREE: UJoiningGroup = 46i32; +pub const U_JG_YEH_WITH_TAIL: UJoiningGroup = 47i32; +pub const U_JG_YUDH: UJoiningGroup = 48i32; +pub const U_JG_YUDH_HE: UJoiningGroup = 49i32; +pub const U_JG_ZAIN: UJoiningGroup = 50i32; +pub const U_JG_ZHAIN: UJoiningGroup = 53i32; +pub const U_JT_DUAL_JOINING: UJoiningType = 2i32; +pub const U_JT_JOIN_CAUSING: UJoiningType = 1i32; +pub const U_JT_LEFT_JOINING: UJoiningType = 3i32; +pub const U_JT_NON_JOINING: UJoiningType = 0i32; +pub const U_JT_RIGHT_JOINING: UJoiningType = 4i32; +pub const U_JT_TRANSPARENT: UJoiningType = 5i32; +pub const U_LB_ALPHABETIC: ULineBreak = 2i32; +pub const U_LB_AMBIGUOUS: ULineBreak = 1i32; +pub const U_LB_BREAK_AFTER: ULineBreak = 4i32; +pub const U_LB_BREAK_BEFORE: ULineBreak = 5i32; +pub const U_LB_BREAK_BOTH: ULineBreak = 3i32; +pub const U_LB_BREAK_SYMBOLS: ULineBreak = 27i32; +pub const U_LB_CARRIAGE_RETURN: ULineBreak = 10i32; +pub const U_LB_CLOSE_PARENTHESIS: ULineBreak = 36i32; +pub const U_LB_CLOSE_PUNCTUATION: ULineBreak = 8i32; +pub const U_LB_COMBINING_MARK: ULineBreak = 9i32; +pub const U_LB_COMPLEX_CONTEXT: ULineBreak = 24i32; +pub const U_LB_CONDITIONAL_JAPANESE_STARTER: ULineBreak = 37i32; +pub const U_LB_CONTINGENT_BREAK: ULineBreak = 7i32; +pub const U_LB_EXCLAMATION: ULineBreak = 11i32; +pub const U_LB_E_BASE: ULineBreak = 40i32; +pub const U_LB_E_MODIFIER: ULineBreak = 41i32; +pub const U_LB_GLUE: ULineBreak = 12i32; +pub const U_LB_H2: ULineBreak = 31i32; +pub const U_LB_H3: ULineBreak = 32i32; +pub const U_LB_HEBREW_LETTER: ULineBreak = 38i32; +pub const U_LB_HYPHEN: ULineBreak = 13i32; +pub const U_LB_IDEOGRAPHIC: ULineBreak = 14i32; +pub const U_LB_INFIX_NUMERIC: ULineBreak = 16i32; +pub const U_LB_INSEPARABLE: ULineBreak = 15i32; +pub const U_LB_INSEPERABLE: ULineBreak = 15i32; +pub const U_LB_JL: ULineBreak = 33i32; +pub const U_LB_JT: ULineBreak = 34i32; +pub const U_LB_JV: ULineBreak = 35i32; +pub const U_LB_LINE_FEED: ULineBreak = 17i32; +pub const U_LB_MANDATORY_BREAK: ULineBreak = 6i32; +pub const U_LB_NEXT_LINE: ULineBreak = 29i32; +pub const U_LB_NONSTARTER: ULineBreak = 18i32; +pub const U_LB_NUMERIC: ULineBreak = 19i32; +pub const U_LB_OPEN_PUNCTUATION: ULineBreak = 20i32; +pub const U_LB_POSTFIX_NUMERIC: ULineBreak = 21i32; +pub const U_LB_PREFIX_NUMERIC: ULineBreak = 22i32; +pub const U_LB_QUOTATION: ULineBreak = 23i32; +pub const U_LB_REGIONAL_INDICATOR: ULineBreak = 39i32; +pub const U_LB_SPACE: ULineBreak = 26i32; +pub const U_LB_SURROGATE: ULineBreak = 25i32; +pub const U_LB_UNKNOWN: ULineBreak = 0i32; +pub const U_LB_WORD_JOINER: ULineBreak = 30i32; +pub const U_LB_ZWJ: ULineBreak = 42i32; +pub const U_LB_ZWSPACE: ULineBreak = 28i32; +pub const U_LEFT_TO_RIGHT: UCharDirection = 0i32; +pub const U_LEFT_TO_RIGHT_EMBEDDING: UCharDirection = 11i32; +pub const U_LEFT_TO_RIGHT_ISOLATE: UCharDirection = 20i32; +pub const U_LEFT_TO_RIGHT_OVERRIDE: UCharDirection = 12i32; +pub const U_LETTER_NUMBER: UCharCategory = 10i32; +pub const U_LIB_SUFFIX_C_NAME_STRING: windows_sys::core::PCSTR = windows_sys::core::s!(""); +pub const U_LINE_SEPARATOR: UCharCategory = 13i32; +pub const U_LONG_PROPERTY_NAME: UPropertyNameChoice = 1i32; +pub const U_LOWERCASE_LETTER: UCharCategory = 2i32; +pub const U_MALFORMED_EXPONENTIAL_PATTERN: UErrorCode = 65795i32; +pub const U_MALFORMED_PRAGMA: UErrorCode = 65562i32; +pub const U_MALFORMED_RULE: UErrorCode = 65537i32; +pub const U_MALFORMED_SET: UErrorCode = 65538i32; +pub const U_MALFORMED_SYMBOL_REFERENCE: UErrorCode = 65539i32; +pub const U_MALFORMED_UNICODE_ESCAPE: UErrorCode = 65540i32; +pub const U_MALFORMED_VARIABLE_DEFINITION: UErrorCode = 65541i32; +pub const U_MALFORMED_VARIABLE_REFERENCE: UErrorCode = 65542i32; +pub const U_MATH_SYMBOL: UCharCategory = 24i32; +pub const U_MAX_VERSION_LENGTH: u32 = 4u32; +pub const U_MAX_VERSION_STRING_LENGTH: u32 = 20u32; +pub const U_MEMORY_ALLOCATION_ERROR: UErrorCode = 7i32; +pub const U_MESSAGE_PARSE_ERROR: UErrorCode = 6i32; +pub const U_MILLIS_PER_DAY: u32 = 86400000u32; +pub const U_MILLIS_PER_HOUR: u32 = 3600000u32; +pub const U_MILLIS_PER_MINUTE: u32 = 60000u32; +pub const U_MILLIS_PER_SECOND: u32 = 1000u32; +pub const U_MISMATCHED_SEGMENT_DELIMITERS: UErrorCode = 65543i32; +pub const U_MISPLACED_ANCHOR_START: UErrorCode = 65544i32; +pub const U_MISPLACED_COMPOUND_FILTER: UErrorCode = 65558i32; +pub const U_MISPLACED_CURSOR_OFFSET: UErrorCode = 65545i32; +pub const U_MISPLACED_QUANTIFIER: UErrorCode = 65546i32; +pub const U_MISSING_OPERATOR: UErrorCode = 65547i32; +pub const U_MISSING_RESOURCE_ERROR: UErrorCode = 2i32; +pub const U_MISSING_SEGMENT_CLOSE: UErrorCode = 65548i32; +pub const U_MODIFIER_LETTER: UCharCategory = 4i32; +pub const U_MODIFIER_SYMBOL: UCharCategory = 26i32; +pub const U_MULTIPLE_ANTE_CONTEXTS: UErrorCode = 65549i32; +pub const U_MULTIPLE_COMPOUND_FILTERS: UErrorCode = 65559i32; +pub const U_MULTIPLE_CURSORS: UErrorCode = 65550i32; +pub const U_MULTIPLE_DECIMAL_SEPARATORS: UErrorCode = 65793i32; +pub const U_MULTIPLE_DECIMAL_SEPERATORS: UErrorCode = 65793i32; +pub const U_MULTIPLE_EXPONENTIAL_SYMBOLS: UErrorCode = 65794i32; +pub const U_MULTIPLE_PAD_SPECIFIERS: UErrorCode = 65798i32; +pub const U_MULTIPLE_PERCENT_SYMBOLS: UErrorCode = 65796i32; +pub const U_MULTIPLE_PERMILL_SYMBOLS: UErrorCode = 65797i32; +pub const U_MULTIPLE_POST_CONTEXTS: UErrorCode = 65551i32; +pub const U_NON_SPACING_MARK: UCharCategory = 6i32; +pub const U_NO_DEFAULT_INCLUDE_UTF_HEADERS: u32 = 1u32; +pub const U_NO_SPACE_AVAILABLE: UErrorCode = 20i32; +pub const U_NO_WRITE_PERMISSION: UErrorCode = 30i32; +pub const U_NT_DECIMAL: UNumericType = 1i32; +pub const U_NT_DIGIT: UNumericType = 2i32; +pub const U_NT_NONE: UNumericType = 0i32; +pub const U_NT_NUMERIC: UNumericType = 3i32; +pub const U_NUMBER_ARG_OUTOFBOUNDS_ERROR: UErrorCode = 65810i32; +pub const U_NUMBER_SKELETON_SYNTAX_ERROR: UErrorCode = 65811i32; +pub const U_OMIT_UNCHANGED_TEXT: u32 = 16384u32; +pub const U_OTHER_LETTER: UCharCategory = 5i32; +pub const U_OTHER_NEUTRAL: UCharDirection = 10i32; +pub const U_OTHER_NUMBER: UCharCategory = 11i32; +pub const U_OTHER_PUNCTUATION: UCharCategory = 23i32; +pub const U_OTHER_SYMBOL: UCharCategory = 27i32; +pub const U_OVERRIDE_CXX_ALLOCATION: u32 = 1u32; +pub const U_PARAGRAPH_SEPARATOR: UCharCategory = 14i32; +pub const U_PARSE_CONTEXT_LEN: i32 = 16i32; +pub const U_PARSE_ERROR: UErrorCode = 9i32; +pub const U_PARSE_ERROR_START: UErrorCode = 65536i32; +pub const U_PATTERN_SYNTAX_ERROR: UErrorCode = 65799i32; +pub const U_PF_AIX: u32 = 3100u32; +pub const U_PF_ANDROID: u32 = 4050u32; +pub const U_PF_BROWSER_NATIVE_CLIENT: u32 = 4020u32; +pub const U_PF_BSD: u32 = 3000u32; +pub const U_PF_CYGWIN: u32 = 1900u32; +pub const U_PF_DARWIN: u32 = 3500u32; +pub const U_PF_EMSCRIPTEN: u32 = 5010u32; +pub const U_PF_FUCHSIA: u32 = 4100u32; +pub const U_PF_HPUX: u32 = 2100u32; +pub const U_PF_IPHONE: u32 = 3550u32; +pub const U_PF_IRIX: u32 = 3200u32; +pub const U_PF_LINUX: u32 = 4000u32; +pub const U_PF_MINGW: u32 = 1800u32; +pub const U_PF_OS390: u32 = 9000u32; +pub const U_PF_OS400: u32 = 9400u32; +pub const U_PF_QNX: u32 = 3700u32; +pub const U_PF_SOLARIS: u32 = 2600u32; +pub const U_PF_UNKNOWN: u32 = 0u32; +pub const U_PF_WINDOWS: u32 = 1000u32; +pub const U_PLATFORM: u32 = 1800u32; +pub const U_PLATFORM_HAS_WIN32_API: u32 = 1u32; +pub const U_PLATFORM_HAS_WINUWP_API: u32 = 0u32; +pub const U_PLATFORM_IMPLEMENTS_POSIX: u32 = 0u32; +pub const U_PLATFORM_IS_DARWIN_BASED: u32 = 1u32; +pub const U_PLATFORM_IS_LINUX_BASED: u32 = 1u32; +pub const U_PLATFORM_USES_ONLY_WIN32_API: u32 = 1u32; +pub const U_PLUGIN_CHANGED_LEVEL_WARNING: UErrorCode = -120i32; +pub const U_PLUGIN_DIDNT_SET_LEVEL: UErrorCode = 66817i32; +pub const U_PLUGIN_ERROR_START: UErrorCode = 66816i32; +pub const U_PLUGIN_TOO_HIGH: UErrorCode = 66816i32; +pub const U_POP_DIRECTIONAL_FORMAT: UCharDirection = 16i32; +pub const U_POP_DIRECTIONAL_ISOLATE: UCharDirection = 22i32; +pub const U_PRIMARY_TOO_LONG_ERROR: UErrorCode = 22i32; +pub const U_PRIVATE_USE_CHAR: UCharCategory = 17i32; +pub const U_REGEX_BAD_ESCAPE_SEQUENCE: UErrorCode = 66307i32; +pub const U_REGEX_BAD_INTERVAL: UErrorCode = 66312i32; +pub const U_REGEX_ERROR_START: UErrorCode = 66304i32; +pub const U_REGEX_INTERNAL_ERROR: UErrorCode = 66304i32; +pub const U_REGEX_INVALID_BACK_REF: UErrorCode = 66314i32; +pub const U_REGEX_INVALID_CAPTURE_GROUP_NAME: UErrorCode = 66325i32; +pub const U_REGEX_INVALID_FLAG: UErrorCode = 66315i32; +pub const U_REGEX_INVALID_RANGE: UErrorCode = 66320i32; +pub const U_REGEX_INVALID_STATE: UErrorCode = 66306i32; +pub const U_REGEX_LOOK_BEHIND_LIMIT: UErrorCode = 66316i32; +pub const U_REGEX_MAX_LT_MIN: UErrorCode = 66313i32; +pub const U_REGEX_MISMATCHED_PAREN: UErrorCode = 66310i32; +pub const U_REGEX_MISSING_CLOSE_BRACKET: UErrorCode = 66319i32; +pub const U_REGEX_NUMBER_TOO_BIG: UErrorCode = 66311i32; +pub const U_REGEX_PATTERN_TOO_BIG: UErrorCode = 66324i32; +pub const U_REGEX_PROPERTY_SYNTAX: UErrorCode = 66308i32; +pub const U_REGEX_RULE_SYNTAX: UErrorCode = 66305i32; +pub const U_REGEX_SET_CONTAINS_STRING: UErrorCode = 66317i32; +pub const U_REGEX_STACK_OVERFLOW: UErrorCode = 66321i32; +pub const U_REGEX_STOPPED_BY_CALLER: UErrorCode = 66323i32; +pub const U_REGEX_TIME_OUT: UErrorCode = 66322i32; +pub const U_REGEX_UNIMPLEMENTED: UErrorCode = 66309i32; +pub const U_RESOURCE_TYPE_MISMATCH: UErrorCode = 17i32; +pub const U_RIGHT_TO_LEFT: UCharDirection = 1i32; +pub const U_RIGHT_TO_LEFT_ARABIC: UCharDirection = 13i32; +pub const U_RIGHT_TO_LEFT_EMBEDDING: UCharDirection = 14i32; +pub const U_RIGHT_TO_LEFT_ISOLATE: UCharDirection = 21i32; +pub const U_RIGHT_TO_LEFT_OVERRIDE: UCharDirection = 15i32; +pub const U_RULE_MASK_ERROR: UErrorCode = 65557i32; +pub const U_SAFECLONE_ALLOCATED_WARNING: UErrorCode = -126i32; +pub const U_SB_ATERM: USentenceBreak = 1i32; +pub const U_SB_CLOSE: USentenceBreak = 2i32; +pub const U_SB_CR: USentenceBreak = 11i32; +pub const U_SB_EXTEND: USentenceBreak = 12i32; +pub const U_SB_FORMAT: USentenceBreak = 3i32; +pub const U_SB_LF: USentenceBreak = 13i32; +pub const U_SB_LOWER: USentenceBreak = 4i32; +pub const U_SB_NUMERIC: USentenceBreak = 5i32; +pub const U_SB_OLETTER: USentenceBreak = 6i32; +pub const U_SB_OTHER: USentenceBreak = 0i32; +pub const U_SB_SCONTINUE: USentenceBreak = 14i32; +pub const U_SB_SEP: USentenceBreak = 7i32; +pub const U_SB_SP: USentenceBreak = 8i32; +pub const U_SB_STERM: USentenceBreak = 9i32; +pub const U_SB_UPPER: USentenceBreak = 10i32; +pub const U_SEGMENT_SEPARATOR: UCharDirection = 8i32; +pub const U_SENTINEL: i32 = -1i32; +pub const U_SHAPE_AGGREGATE_TASHKEEL: u32 = 16384u32; +pub const U_SHAPE_AGGREGATE_TASHKEEL_MASK: u32 = 16384u32; +pub const U_SHAPE_AGGREGATE_TASHKEEL_NOOP: u32 = 0u32; +pub const U_SHAPE_DIGITS_ALEN2AN_INIT_AL: u32 = 128u32; +pub const U_SHAPE_DIGITS_ALEN2AN_INIT_LR: u32 = 96u32; +pub const U_SHAPE_DIGITS_AN2EN: u32 = 64u32; +pub const U_SHAPE_DIGITS_EN2AN: u32 = 32u32; +pub const U_SHAPE_DIGITS_MASK: u32 = 224u32; +pub const U_SHAPE_DIGITS_NOOP: u32 = 0u32; +pub const U_SHAPE_DIGITS_RESERVED: u32 = 160u32; +pub const U_SHAPE_DIGIT_TYPE_AN: u32 = 0u32; +pub const U_SHAPE_DIGIT_TYPE_AN_EXTENDED: u32 = 256u32; +pub const U_SHAPE_DIGIT_TYPE_MASK: u32 = 768u32; +pub const U_SHAPE_DIGIT_TYPE_RESERVED: u32 = 512u32; +pub const U_SHAPE_LAMALEF_AUTO: u32 = 65536u32; +pub const U_SHAPE_LAMALEF_BEGIN: u32 = 3u32; +pub const U_SHAPE_LAMALEF_END: u32 = 2u32; +pub const U_SHAPE_LAMALEF_MASK: u32 = 65539u32; +pub const U_SHAPE_LAMALEF_NEAR: u32 = 1u32; +pub const U_SHAPE_LAMALEF_RESIZE: u32 = 0u32; +pub const U_SHAPE_LENGTH_FIXED_SPACES_AT_BEGINNING: u32 = 3u32; +pub const U_SHAPE_LENGTH_FIXED_SPACES_AT_END: u32 = 2u32; +pub const U_SHAPE_LENGTH_FIXED_SPACES_NEAR: u32 = 1u32; +pub const U_SHAPE_LENGTH_GROW_SHRINK: u32 = 0u32; +pub const U_SHAPE_LENGTH_MASK: u32 = 65539u32; +pub const U_SHAPE_LETTERS_MASK: u32 = 24u32; +pub const U_SHAPE_LETTERS_NOOP: u32 = 0u32; +pub const U_SHAPE_LETTERS_SHAPE: u32 = 8u32; +pub const U_SHAPE_LETTERS_SHAPE_TASHKEEL_ISOLATED: u32 = 24u32; +pub const U_SHAPE_LETTERS_UNSHAPE: u32 = 16u32; +pub const U_SHAPE_PRESERVE_PRESENTATION: u32 = 32768u32; +pub const U_SHAPE_PRESERVE_PRESENTATION_MASK: u32 = 32768u32; +pub const U_SHAPE_PRESERVE_PRESENTATION_NOOP: u32 = 0u32; +pub const U_SHAPE_SEEN_MASK: u32 = 7340032u32; +pub const U_SHAPE_SEEN_TWOCELL_NEAR: u32 = 2097152u32; +pub const U_SHAPE_SPACES_RELATIVE_TO_TEXT_BEGIN_END: u32 = 67108864u32; +pub const U_SHAPE_SPACES_RELATIVE_TO_TEXT_MASK: u32 = 67108864u32; +pub const U_SHAPE_TAIL_NEW_UNICODE: u32 = 134217728u32; +pub const U_SHAPE_TAIL_TYPE_MASK: u32 = 134217728u32; +pub const U_SHAPE_TASHKEEL_BEGIN: u32 = 262144u32; +pub const U_SHAPE_TASHKEEL_END: u32 = 393216u32; +pub const U_SHAPE_TASHKEEL_MASK: u32 = 917504u32; +pub const U_SHAPE_TASHKEEL_REPLACE_BY_TATWEEL: u32 = 786432u32; +pub const U_SHAPE_TASHKEEL_RESIZE: u32 = 524288u32; +pub const U_SHAPE_TEXT_DIRECTION_LOGICAL: u32 = 0u32; +pub const U_SHAPE_TEXT_DIRECTION_MASK: u32 = 4u32; +pub const U_SHAPE_TEXT_DIRECTION_VISUAL_LTR: u32 = 4u32; +pub const U_SHAPE_TEXT_DIRECTION_VISUAL_RTL: u32 = 0u32; +pub const U_SHAPE_YEHHAMZA_MASK: u32 = 58720256u32; +pub const U_SHAPE_YEHHAMZA_TWOCELL_NEAR: u32 = 16777216u32; +pub const U_SHORT_PROPERTY_NAME: UPropertyNameChoice = 0i32; +pub const U_SHOW_CPLUSPLUS_API: u32 = 0u32; +pub const U_SIZEOF_UCHAR: u32 = 2u32; +pub const U_SIZEOF_WCHAR_T: u32 = 1u32; +pub const U_SORT_KEY_TOO_SHORT_WARNING: UErrorCode = -123i32; +pub const U_SPACE_SEPARATOR: UCharCategory = 12i32; +pub const U_START_PUNCTUATION: UCharCategory = 20i32; +pub const U_STATE_OLD_WARNING: UErrorCode = -125i32; +pub const U_STATE_TOO_OLD_ERROR: UErrorCode = 23i32; +pub const U_STRINGPREP_CHECK_BIDI_ERROR: UErrorCode = 66562i32; +pub const U_STRINGPREP_PROHIBITED_ERROR: UErrorCode = 66560i32; +pub const U_STRINGPREP_UNASSIGNED_ERROR: UErrorCode = 66561i32; +pub const U_STRING_NOT_TERMINATED_WARNING: UErrorCode = -124i32; +pub const U_SURROGATE: UCharCategory = 18i32; +pub const U_TITLECASE_ADJUST_TO_CASED: u32 = 1024u32; +pub const U_TITLECASE_LETTER: UCharCategory = 3i32; +pub const U_TITLECASE_NO_BREAK_ADJUSTMENT: u32 = 512u32; +pub const U_TITLECASE_NO_LOWERCASE: u32 = 256u32; +pub const U_TITLECASE_SENTENCES: u32 = 64u32; +pub const U_TITLECASE_WHOLE_STRING: u32 = 32u32; +pub const U_TOO_MANY_ALIASES_ERROR: UErrorCode = 24i32; +pub const U_TRAILING_BACKSLASH: UErrorCode = 65552i32; +pub const U_TRUNCATED_CHAR_FOUND: UErrorCode = 11i32; +pub const U_UNASSIGNED: UCharCategory = 0i32; +pub const U_UNCLOSED_SEGMENT: UErrorCode = 65563i32; +pub const U_UNDEFINED_KEYWORD: UErrorCode = 65806i32; +pub const U_UNDEFINED_SEGMENT_REFERENCE: UErrorCode = 65553i32; +pub const U_UNDEFINED_VARIABLE: UErrorCode = 65554i32; +pub const U_UNEXPECTED_TOKEN: UErrorCode = 65792i32; +pub const U_UNICODE_CHAR_NAME: UCharNameChoice = 0i32; +pub const U_UNICODE_VERSION: windows_sys::core::PCSTR = windows_sys::core::s!("8.0"); +pub const U_UNMATCHED_BRACES: UErrorCode = 65801i32; +pub const U_UNQUOTED_SPECIAL: UErrorCode = 65555i32; +pub const U_UNSUPPORTED_ATTRIBUTE: UErrorCode = 65803i32; +pub const U_UNSUPPORTED_ERROR: UErrorCode = 16i32; +pub const U_UNSUPPORTED_ESCAPE_SEQUENCE: UErrorCode = 19i32; +pub const U_UNSUPPORTED_PROPERTY: UErrorCode = 65802i32; +pub const U_UNTERMINATED_QUOTE: UErrorCode = 65556i32; +pub const U_UPPERCASE_LETTER: UCharCategory = 1i32; +pub const U_USELESS_COLLATOR_ERROR: UErrorCode = 29i32; +pub const U_USING_DEFAULT_WARNING: UErrorCode = -127i32; +pub const U_USING_FALLBACK_WARNING: UErrorCode = -128i32; +pub const U_USING_ICU_NAMESPACE: u32 = 1u32; +pub const U_VARIABLE_RANGE_EXHAUSTED: UErrorCode = 65565i32; +pub const U_VARIABLE_RANGE_OVERLAP: UErrorCode = 65566i32; +pub const U_VO_ROTATED: UVerticalOrientation = 0i32; +pub const U_VO_TRANSFORMED_ROTATED: UVerticalOrientation = 1i32; +pub const U_VO_TRANSFORMED_UPRIGHT: UVerticalOrientation = 2i32; +pub const U_VO_UPRIGHT: UVerticalOrientation = 3i32; +pub const U_WB_ALETTER: UWordBreakValues = 1i32; +pub const U_WB_CR: UWordBreakValues = 8i32; +pub const U_WB_DOUBLE_QUOTE: UWordBreakValues = 16i32; +pub const U_WB_EXTEND: UWordBreakValues = 9i32; +pub const U_WB_EXTENDNUMLET: UWordBreakValues = 7i32; +pub const U_WB_E_BASE: UWordBreakValues = 17i32; +pub const U_WB_E_BASE_GAZ: UWordBreakValues = 18i32; +pub const U_WB_E_MODIFIER: UWordBreakValues = 19i32; +pub const U_WB_FORMAT: UWordBreakValues = 2i32; +pub const U_WB_GLUE_AFTER_ZWJ: UWordBreakValues = 20i32; +pub const U_WB_HEBREW_LETTER: UWordBreakValues = 14i32; +pub const U_WB_KATAKANA: UWordBreakValues = 3i32; +pub const U_WB_LF: UWordBreakValues = 10i32; +pub const U_WB_MIDLETTER: UWordBreakValues = 4i32; +pub const U_WB_MIDNUM: UWordBreakValues = 5i32; +pub const U_WB_MIDNUMLET: UWordBreakValues = 11i32; +pub const U_WB_NEWLINE: UWordBreakValues = 12i32; +pub const U_WB_NUMERIC: UWordBreakValues = 6i32; +pub const U_WB_OTHER: UWordBreakValues = 0i32; +pub const U_WB_REGIONAL_INDICATOR: UWordBreakValues = 13i32; +pub const U_WB_SINGLE_QUOTE: UWordBreakValues = 15i32; +pub const U_WB_WSEGSPACE: UWordBreakValues = 22i32; +pub const U_WB_ZWJ: UWordBreakValues = 21i32; +pub const U_WHITE_SPACE_NEUTRAL: UCharDirection = 9i32; +pub const U_ZERO_ERROR: UErrorCode = 0i32; +pub const VS_ALLOW_LATIN: u32 = 1u32; +pub const WC_COMPOSITECHECK: u32 = 512u32; +pub const WC_DEFAULTCHAR: u32 = 64u32; +pub const WC_DISCARDNS: u32 = 16u32; +pub const WC_ERR_INVALID_CHARS: u32 = 128u32; +pub const WC_NO_BEST_FIT_CHARS: u32 = 1024u32; +pub const WC_SEPCHARS: u32 = 32u32; +pub type WORDLIST_TYPE = i32; +pub const WORDLIST_TYPE_ADD: WORDLIST_TYPE = 1i32; +pub const WORDLIST_TYPE_AUTOCORRECT: WORDLIST_TYPE = 3i32; +pub const WORDLIST_TYPE_EXCLUDE: WORDLIST_TYPE = 2i32; +pub const WORDLIST_TYPE_IGNORE: WORDLIST_TYPE = 0i32; +pub const WeekUnit: CALDATETIME_DATEUNIT = 3i32; +pub const YearUnit: CALDATETIME_DATEUNIT = 1i32; +pub const sidArabic: SCRIPTCONTF = 9i32; +pub const sidArmenian: SCRIPTCONTF = 7i32; +pub const sidAsciiLatin: SCRIPTCONTF = 3i32; +pub const sidAsciiSym: SCRIPTCONTF = 2i32; +pub const sidBengali: SCRIPTCONTF = 11i32; +pub const sidBopomofo: SCRIPTCONTF = 25i32; +pub const sidBraille: SCRIPTCONTF = 31i32; +pub const sidBurmese: SCRIPTCONTF = 36i32; +pub const sidCanSyllabic: SCRIPTCONTF = 28i32; +pub const sidCherokee: SCRIPTCONTF = 29i32; +pub const sidCyrillic: SCRIPTCONTF = 6i32; +pub const sidDefault: SCRIPTCONTF = 0i32; +pub const sidDevanagari: SCRIPTCONTF = 10i32; +pub const sidEthiopic: SCRIPTCONTF = 27i32; +pub const sidFEFirst: SCRIPTCONTF = 23i32; +pub const sidFELast: SCRIPTCONTF = 26i32; +pub const sidGeorgian: SCRIPTCONTF = 22i32; +pub const sidGreek: SCRIPTCONTF = 5i32; +pub const sidGujarati: SCRIPTCONTF = 13i32; +pub const sidGurmukhi: SCRIPTCONTF = 12i32; +pub const sidHan: SCRIPTCONTF = 26i32; +pub const sidHangul: SCRIPTCONTF = 23i32; +pub const sidHebrew: SCRIPTCONTF = 8i32; +pub const sidKana: SCRIPTCONTF = 24i32; +pub const sidKannada: SCRIPTCONTF = 17i32; +pub const sidKhmer: SCRIPTCONTF = 37i32; +pub const sidLao: SCRIPTCONTF = 20i32; +pub const sidLatin: SCRIPTCONTF = 4i32; +pub const sidLim: SCRIPTCONTF = 41i32; +pub const sidMalayalam: SCRIPTCONTF = 18i32; +pub const sidMerge: SCRIPTCONTF = 1i32; +pub const sidMongolian: SCRIPTCONTF = 39i32; +pub const sidOgham: SCRIPTCONTF = 33i32; +pub const sidOriya: SCRIPTCONTF = 14i32; +pub const sidRunic: SCRIPTCONTF = 32i32; +pub const sidSinhala: SCRIPTCONTF = 34i32; +pub const sidSyriac: SCRIPTCONTF = 35i32; +pub const sidTamil: SCRIPTCONTF = 15i32; +pub const sidTelugu: SCRIPTCONTF = 16i32; +pub const sidThaana: SCRIPTCONTF = 38i32; +pub const sidThai: SCRIPTCONTF = 19i32; +pub const sidTibetan: SCRIPTCONTF = 21i32; +pub const sidUserDefined: SCRIPTCONTF = 40i32; +pub const sidYi: SCRIPTCONTF = 30i32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Graphics/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Graphics/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..a419217943c9361dfef21af0a3adb0df2c1a569c --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Graphics/mod.rs @@ -0,0 +1,12 @@ +#[cfg(feature = "Win32_Graphics_Dwm")] +pub mod Dwm; +#[cfg(feature = "Win32_Graphics_Gdi")] +pub mod Gdi; +#[cfg(feature = "Win32_Graphics_GdiPlus")] +pub mod GdiPlus; +#[cfg(feature = "Win32_Graphics_Hlsl")] +pub mod Hlsl; +#[cfg(feature = "Win32_Graphics_OpenGL")] +pub mod OpenGL; +#[cfg(feature = "Win32_Graphics_Printing")] +pub mod Printing; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Management/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Management/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..25326fbaf5a199ca4d52dfdc0f3fed1d18ffb29b --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Management/mod.rs @@ -0,0 +1,2 @@ +#[cfg(feature = "Win32_Management_MobileDeviceManagementRegistration")] +pub mod MobileDeviceManagementRegistration; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Media/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Media/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..91bf7f1e221379d9e247fec889c92d93466891bc --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Media/mod.rs @@ -0,0 +1,212 @@ +#[cfg(feature = "Win32_Media_Audio")] +pub mod Audio; +#[cfg(feature = "Win32_Media_DxMediaObjects")] +pub mod DxMediaObjects; +#[cfg(feature = "Win32_Media_KernelStreaming")] +pub mod KernelStreaming; +#[cfg(feature = "Win32_Media_Multimedia")] +pub mod Multimedia; +#[cfg(feature = "Win32_Media_Streaming")] +pub mod Streaming; +#[cfg(feature = "Win32_Media_WindowsMediaFormat")] +pub mod WindowsMediaFormat; +windows_link::link!("winmm.dll" "system" fn timeBeginPeriod(uperiod : u32) -> u32); +windows_link::link!("winmm.dll" "system" fn timeEndPeriod(uperiod : u32) -> u32); +windows_link::link!("winmm.dll" "system" fn timeGetDevCaps(ptc : *mut TIMECAPS, cbtc : u32) -> u32); +windows_link::link!("winmm.dll" "system" fn timeGetSystemTime(pmmt : *mut MMTIME, cbmmt : u32) -> u32); +windows_link::link!("winmm.dll" "system" fn timeGetTime() -> u32); +windows_link::link!("winmm.dll" "system" fn timeKillEvent(utimerid : u32) -> u32); +windows_link::link!("winmm.dll" "system" fn timeSetEvent(udelay : u32, uresolution : u32, fptc : LPTIMECALLBACK, dwuser : usize, fuevent : u32) -> u32); +pub const ED_DEVCAP_ATN_READ: TIMECODE_SAMPLE_FLAGS = 5047u32; +pub const ED_DEVCAP_RTC_READ: TIMECODE_SAMPLE_FLAGS = 5050u32; +pub const ED_DEVCAP_TIMECODE_READ: TIMECODE_SAMPLE_FLAGS = 4121u32; +pub type HTASK = *mut core::ffi::c_void; +pub const JOYERR_BASE: u32 = 160u32; +#[cfg(feature = "Win32_Media_Multimedia")] +pub type LPDRVCALLBACK = Option; +pub type LPTIMECALLBACK = Option; +pub const MAXERRORLENGTH: u32 = 256u32; +pub const MAXPNAMELEN: u32 = 32u32; +pub const MCIERR_BASE: u32 = 256u32; +pub const MCI_CD_OFFSET: u32 = 1088u32; +pub const MCI_SEQ_OFFSET: u32 = 1216u32; +pub const MCI_STRING_OFFSET: u32 = 512u32; +pub const MCI_VD_OFFSET: u32 = 1024u32; +pub const MCI_WAVE_OFFSET: u32 = 1152u32; +pub const MIDIERR_BASE: u32 = 64u32; +pub const MIXERR_BASE: u32 = 1024u32; +pub const MMSYSERR_ALLOCATED: u32 = 4u32; +pub const MMSYSERR_BADDB: u32 = 14u32; +pub const MMSYSERR_BADDEVICEID: u32 = 2u32; +pub const MMSYSERR_BADERRNUM: u32 = 9u32; +pub const MMSYSERR_BASE: u32 = 0u32; +pub const MMSYSERR_DELETEERROR: u32 = 18u32; +pub const MMSYSERR_ERROR: u32 = 1u32; +pub const MMSYSERR_HANDLEBUSY: u32 = 12u32; +pub const MMSYSERR_INVALFLAG: u32 = 10u32; +pub const MMSYSERR_INVALHANDLE: u32 = 5u32; +pub const MMSYSERR_INVALIDALIAS: u32 = 13u32; +pub const MMSYSERR_INVALPARAM: u32 = 11u32; +pub const MMSYSERR_KEYNOTFOUND: u32 = 15u32; +pub const MMSYSERR_LASTERROR: u32 = 21u32; +pub const MMSYSERR_MOREDATA: u32 = 21u32; +pub const MMSYSERR_NODRIVER: u32 = 6u32; +pub const MMSYSERR_NODRIVERCB: u32 = 20u32; +pub const MMSYSERR_NOERROR: u32 = 0u32; +pub const MMSYSERR_NOMEM: u32 = 7u32; +pub const MMSYSERR_NOTENABLED: u32 = 3u32; +pub const MMSYSERR_NOTSUPPORTED: u32 = 8u32; +pub const MMSYSERR_READERROR: u32 = 16u32; +pub const MMSYSERR_VALNOTFOUND: u32 = 19u32; +pub const MMSYSERR_WRITEERROR: u32 = 17u32; +#[repr(C, packed(1))] +#[derive(Clone, Copy)] +pub struct MMTIME { + pub wType: u32, + pub u: MMTIME_0, +} +impl Default for MMTIME { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[derive(Clone, Copy)] +pub union MMTIME_0 { + pub ms: u32, + pub sample: u32, + pub cb: u32, + pub ticks: u32, + pub smpte: MMTIME_0_0, + pub midi: MMTIME_0_1, +} +impl Default for MMTIME_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[derive(Clone, Copy, Default)] +pub struct MMTIME_0_1 { + pub songptrpos: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MMTIME_0_0 { + pub hour: u8, + pub min: u8, + pub sec: u8, + pub frame: u8, + pub fps: u8, + pub dummy: u8, + pub pad: [u8; 2], +} +impl Default for MMTIME_0_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const MM_ADLIB: u32 = 9u32; +pub const MM_DRVM_CLOSE: u32 = 977u32; +pub const MM_DRVM_DATA: u32 = 978u32; +pub const MM_DRVM_ERROR: u32 = 979u32; +pub const MM_DRVM_OPEN: u32 = 976u32; +pub const MM_JOY1BUTTONDOWN: u32 = 949u32; +pub const MM_JOY1BUTTONUP: u32 = 951u32; +pub const MM_JOY1MOVE: u32 = 928u32; +pub const MM_JOY1ZMOVE: u32 = 930u32; +pub const MM_JOY2BUTTONDOWN: u32 = 950u32; +pub const MM_JOY2BUTTONUP: u32 = 952u32; +pub const MM_JOY2MOVE: u32 = 929u32; +pub const MM_JOY2ZMOVE: u32 = 931u32; +pub const MM_MCINOTIFY: u32 = 953u32; +pub const MM_MCISIGNAL: u32 = 971u32; +pub const MM_MICROSOFT: u32 = 1u32; +pub const MM_MIDI_MAPPER: u32 = 1u32; +pub const MM_MIM_CLOSE: u32 = 962u32; +pub const MM_MIM_DATA: u32 = 963u32; +pub const MM_MIM_ERROR: u32 = 965u32; +pub const MM_MIM_LONGDATA: u32 = 964u32; +pub const MM_MIM_LONGERROR: u32 = 966u32; +pub const MM_MIM_MOREDATA: u32 = 972u32; +pub const MM_MIM_OPEN: u32 = 961u32; +pub const MM_MIXM_CONTROL_CHANGE: u32 = 977u32; +pub const MM_MIXM_LINE_CHANGE: u32 = 976u32; +pub const MM_MOM_CLOSE: u32 = 968u32; +pub const MM_MOM_DONE: u32 = 969u32; +pub const MM_MOM_OPEN: u32 = 967u32; +pub const MM_MOM_POSITIONCB: u32 = 970u32; +pub const MM_MPU401_MIDIIN: u32 = 11u32; +pub const MM_MPU401_MIDIOUT: u32 = 10u32; +pub const MM_PC_JOYSTICK: u32 = 12u32; +pub const MM_SNDBLST_MIDIIN: u32 = 4u32; +pub const MM_SNDBLST_MIDIOUT: u32 = 3u32; +pub const MM_SNDBLST_SYNTH: u32 = 5u32; +pub const MM_SNDBLST_WAVEIN: u32 = 7u32; +pub const MM_SNDBLST_WAVEOUT: u32 = 6u32; +pub const MM_STREAM_CLOSE: u32 = 981u32; +pub const MM_STREAM_DONE: u32 = 982u32; +pub const MM_STREAM_ERROR: u32 = 983u32; +pub const MM_STREAM_OPEN: u32 = 980u32; +pub const MM_WAVE_MAPPER: u32 = 2u32; +pub const MM_WIM_CLOSE: u32 = 959u32; +pub const MM_WIM_DATA: u32 = 960u32; +pub const MM_WIM_OPEN: u32 = 958u32; +pub const MM_WOM_CLOSE: u32 = 956u32; +pub const MM_WOM_DONE: u32 = 957u32; +pub const MM_WOM_OPEN: u32 = 955u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TIMECAPS { + pub wPeriodMin: u32, + pub wPeriodMax: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union TIMECODE { + pub Anonymous: TIMECODE_0, + pub qw: u64, +} +impl Default for TIMECODE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TIMECODE_0 { + pub wFrameRate: u16, + pub wFrameFract: u16, + pub dwFrames: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TIMECODE_SAMPLE { + pub qwTick: i64, + pub timecode: TIMECODE, + pub dwUser: u32, + pub dwFlags: TIMECODE_SAMPLE_FLAGS, +} +impl Default for TIMECODE_SAMPLE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TIMECODE_SAMPLE_FLAGS = u32; +pub const TIMERR_BASE: u32 = 96u32; +pub const TIMERR_NOCANDO: u32 = 97u32; +pub const TIMERR_NOERROR: u32 = 0u32; +pub const TIMERR_STRUCT: u32 = 129u32; +pub const TIME_BYTES: u32 = 4u32; +pub const TIME_CALLBACK_EVENT_PULSE: u32 = 32u32; +pub const TIME_CALLBACK_EVENT_SET: u32 = 16u32; +pub const TIME_CALLBACK_FUNCTION: u32 = 0u32; +pub const TIME_KILL_SYNCHRONOUS: u32 = 256u32; +pub const TIME_MIDI: u32 = 16u32; +pub const TIME_MS: u32 = 1u32; +pub const TIME_ONESHOT: u32 = 0u32; +pub const TIME_PERIODIC: u32 = 1u32; +pub const TIME_SAMPLES: u32 = 2u32; +pub const TIME_SMPTE: u32 = 8u32; +pub const TIME_TICKS: u32 = 32u32; +pub const WAVERR_BASE: u32 = 32u32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/NetworkManagement/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/NetworkManagement/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..b545be7dec95fdb518a35dfa7f0fef21101e500f --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/NetworkManagement/mod.rs @@ -0,0 +1,42 @@ +#[cfg(feature = "Win32_NetworkManagement_Dhcp")] +pub mod Dhcp; +#[cfg(feature = "Win32_NetworkManagement_Dns")] +pub mod Dns; +#[cfg(feature = "Win32_NetworkManagement_InternetConnectionWizard")] +pub mod InternetConnectionWizard; +#[cfg(feature = "Win32_NetworkManagement_IpHelper")] +pub mod IpHelper; +#[cfg(feature = "Win32_NetworkManagement_Multicast")] +pub mod Multicast; +#[cfg(feature = "Win32_NetworkManagement_Ndis")] +pub mod Ndis; +#[cfg(feature = "Win32_NetworkManagement_NetBios")] +pub mod NetBios; +#[cfg(feature = "Win32_NetworkManagement_NetManagement")] +pub mod NetManagement; +#[cfg(feature = "Win32_NetworkManagement_NetShell")] +pub mod NetShell; +#[cfg(feature = "Win32_NetworkManagement_NetworkDiagnosticsFramework")] +pub mod NetworkDiagnosticsFramework; +#[cfg(feature = "Win32_NetworkManagement_P2P")] +pub mod P2P; +#[cfg(feature = "Win32_NetworkManagement_QoS")] +pub mod QoS; +#[cfg(feature = "Win32_NetworkManagement_Rras")] +pub mod Rras; +#[cfg(feature = "Win32_NetworkManagement_Snmp")] +pub mod Snmp; +#[cfg(feature = "Win32_NetworkManagement_WNet")] +pub mod WNet; +#[cfg(feature = "Win32_NetworkManagement_WebDav")] +pub mod WebDav; +#[cfg(feature = "Win32_NetworkManagement_WiFi")] +pub mod WiFi; +#[cfg(feature = "Win32_NetworkManagement_WindowsConnectionManager")] +pub mod WindowsConnectionManager; +#[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] +pub mod WindowsFilteringPlatform; +#[cfg(feature = "Win32_NetworkManagement_WindowsFirewall")] +pub mod WindowsFirewall; +#[cfg(feature = "Win32_NetworkManagement_WindowsNetworkVirtualization")] +pub mod WindowsNetworkVirtualization; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Networking/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Networking/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..ca6ddf19be13a4dd2b78fddcb17582b37483f996 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Networking/mod.rs @@ -0,0 +1,18 @@ +#[cfg(feature = "Win32_Networking_ActiveDirectory")] +pub mod ActiveDirectory; +#[cfg(feature = "Win32_Networking_Clustering")] +pub mod Clustering; +#[cfg(feature = "Win32_Networking_HttpServer")] +pub mod HttpServer; +#[cfg(feature = "Win32_Networking_Ldap")] +pub mod Ldap; +#[cfg(feature = "Win32_Networking_WebSocket")] +pub mod WebSocket; +#[cfg(feature = "Win32_Networking_WinHttp")] +pub mod WinHttp; +#[cfg(feature = "Win32_Networking_WinInet")] +pub mod WinInet; +#[cfg(feature = "Win32_Networking_WinSock")] +pub mod WinSock; +#[cfg(feature = "Win32_Networking_WindowsWebServices")] +pub mod WindowsWebServices; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Security/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Security/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..8f18d536ffbd2e38e231873d5ec70692d6fd0ca2 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Security/mod.rs @@ -0,0 +1,1346 @@ +#[cfg(feature = "Win32_Security_AppLocker")] +pub mod AppLocker; +#[cfg(feature = "Win32_Security_Authentication")] +pub mod Authentication; +#[cfg(feature = "Win32_Security_Authorization")] +pub mod Authorization; +#[cfg(feature = "Win32_Security_Credentials")] +pub mod Credentials; +#[cfg(feature = "Win32_Security_Cryptography")] +pub mod Cryptography; +#[cfg(feature = "Win32_Security_DiagnosticDataQuery")] +pub mod DiagnosticDataQuery; +#[cfg(feature = "Win32_Security_DirectoryServices")] +pub mod DirectoryServices; +#[cfg(feature = "Win32_Security_EnterpriseData")] +pub mod EnterpriseData; +#[cfg(feature = "Win32_Security_ExtensibleAuthenticationProtocol")] +pub mod ExtensibleAuthenticationProtocol; +#[cfg(feature = "Win32_Security_Isolation")] +pub mod Isolation; +#[cfg(feature = "Win32_Security_LicenseProtection")] +pub mod LicenseProtection; +#[cfg(feature = "Win32_Security_NetworkAccessProtection")] +pub mod NetworkAccessProtection; +#[cfg(feature = "Win32_Security_WinTrust")] +pub mod WinTrust; +#[cfg(feature = "Win32_Security_WinWlx")] +pub mod WinWlx; +windows_link::link!("advapi32.dll" "system" fn AccessCheck(psecuritydescriptor : PSECURITY_DESCRIPTOR, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, privilegeset : *mut PRIVILEGE_SET, privilegesetlength : *mut u32, grantedaccess : *mut u32, accessstatus : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckAndAuditAlarmA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCSTR, objectname : windows_sys::core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccess : *mut u32, accessstatus : *mut windows_sys::core::BOOL, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckAndAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCWSTR, objectname : windows_sys::core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccess : *mut u32, accessstatus : *mut windows_sys::core::BOOL, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByType(psecuritydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, privilegeset : *mut PRIVILEGE_SET, privilegesetlength : *mut u32, grantedaccess : *mut u32, accessstatus : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByTypeAndAuditAlarmA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCSTR, objectname : windows_sys::core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccess : *mut u32, accessstatus : *mut windows_sys::core::BOOL, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByTypeAndAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCWSTR, objectname : windows_sys::core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccess : *mut u32, accessstatus : *mut windows_sys::core::BOOL, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByTypeResultList(psecuritydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, privilegeset : *mut PRIVILEGE_SET, privilegesetlength : *mut u32, grantedaccesslist : *mut u32, accessstatuslist : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCSTR, objectname : windows_sys::core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccess : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, objecttypename : windows_sys::core::PCSTR, objectname : windows_sys::core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccess : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, objecttypename : windows_sys::core::PCWSTR, objectname : windows_sys::core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccesslist : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCWSTR, objectname : windows_sys::core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : windows_sys::core::BOOL, grantedaccesslist : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAccessAllowedAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, accessmask : u32, psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAccessAllowedAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAccessAllowedObjectAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, objecttypeguid : *const windows_sys::core::GUID, inheritedobjecttypeguid : *const windows_sys::core::GUID, psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAccessDeniedAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, accessmask : u32, psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAccessDeniedAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAccessDeniedObjectAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, objecttypeguid : *const windows_sys::core::GUID, inheritedobjecttypeguid : *const windows_sys::core::GUID, psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, dwstartingaceindex : u32, pacelist : *const core::ffi::c_void, nacelistlength : u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAuditAccessAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, dwaccessmask : u32, psid : PSID, bauditsuccess : windows_sys::core::BOOL, bauditfailure : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAuditAccessAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, dwaccessmask : u32, psid : PSID, bauditsuccess : windows_sys::core::BOOL, bauditfailure : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddAuditAccessObjectAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, objecttypeguid : *const windows_sys::core::GUID, inheritedobjecttypeguid : *const windows_sys::core::GUID, psid : PSID, bauditsuccess : windows_sys::core::BOOL, bauditfailure : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddConditionalAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, acetype : u8, accessmask : u32, psid : PSID, conditionstr : windows_sys::core::PCWSTR, returnlength : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AddMandatoryAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, mandatorypolicy : u32, plabelsid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn AddResourceAttributeAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID, pattributeinfo : *const CLAIM_SECURITY_ATTRIBUTES_INFORMATION, preturnlength : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn AddScopedPolicyIDAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AdjustTokenGroups(tokenhandle : super::Foundation:: HANDLE, resettodefault : windows_sys::core::BOOL, newstate : *const TOKEN_GROUPS, bufferlength : u32, previousstate : *mut TOKEN_GROUPS, returnlength : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AdjustTokenPrivileges(tokenhandle : super::Foundation:: HANDLE, disableallprivileges : windows_sys::core::BOOL, newstate : *const TOKEN_PRIVILEGES, bufferlength : u32, previousstate : *mut TOKEN_PRIVILEGES, returnlength : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AllocateAndInitializeSid(pidentifierauthority : *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount : u8, nsubauthority0 : u32, nsubauthority1 : u32, nsubauthority2 : u32, nsubauthority3 : u32, nsubauthority4 : u32, nsubauthority5 : u32, nsubauthority6 : u32, nsubauthority7 : u32, psid : *mut PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AllocateLocallyUniqueId(luid : *mut super::Foundation:: LUID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AreAllAccessesGranted(grantedaccess : u32, desiredaccess : u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn AreAnyAccessesGranted(grantedaccess : u32, desiredaccess : u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn CheckTokenCapability(tokenhandle : super::Foundation:: HANDLE, capabilitysidtocheck : PSID, hascapability : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn CheckTokenMembership(tokenhandle : super::Foundation:: HANDLE, sidtocheck : PSID, ismember : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn CheckTokenMembershipEx(tokenhandle : super::Foundation:: HANDLE, sidtocheck : PSID, flags : u32, ismember : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, currentsecuritydescriptor : PSECURITY_DESCRIPTOR, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, objecttype : *const windows_sys::core::GUID, isdirectoryobject : bool, genericmapping : *const GENERIC_MAPPING) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn CopySid(ndestinationsidlength : u32, pdestinationsid : PSID, psourcesid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, isdirectoryobject : windows_sys::core::BOOL, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityEx(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttype : *const windows_sys::core::GUID, iscontainerobject : windows_sys::core::BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttypes : *const *const windows_sys::core::GUID, guidcount : u32, iscontainerobject : windows_sys::core::BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn CreateRestrictedToken(existingtokenhandle : super::Foundation:: HANDLE, flags : CREATE_RESTRICTED_TOKEN_FLAGS, disablesidcount : u32, sidstodisable : *const SID_AND_ATTRIBUTES, deleteprivilegecount : u32, privilegestodelete : *const LUID_AND_ATTRIBUTES, restrictedsidcount : u32, sidstorestrict : *const SID_AND_ATTRIBUTES, newtokenhandle : *mut super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn CreateWellKnownSid(wellknownsidtype : WELL_KNOWN_SID_TYPE, domainsid : PSID, psid : PSID, cbsid : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn DeleteAce(pacl : *mut ACL, dwaceindex : u32) -> windows_sys::core::BOOL); +windows_link::link!("api-ms-win-security-base-l1-2-2.dll" "system" fn DeriveCapabilitySidsFromName(capname : windows_sys::core::PCWSTR, capabilitygroupsids : *mut *mut PSID, capabilitygroupsidcount : *mut u32, capabilitysids : *mut *mut PSID, capabilitysidcount : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn DestroyPrivateObjectSecurity(objectdescriptor : *const PSECURITY_DESCRIPTOR) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn DuplicateToken(existingtokenhandle : super::Foundation:: HANDLE, impersonationlevel : SECURITY_IMPERSONATION_LEVEL, duplicatetokenhandle : *mut super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn DuplicateTokenEx(hexistingtoken : super::Foundation:: HANDLE, dwdesiredaccess : TOKEN_ACCESS_MASK, lptokenattributes : *const SECURITY_ATTRIBUTES, impersonationlevel : SECURITY_IMPERSONATION_LEVEL, tokentype : TOKEN_TYPE, phnewtoken : *mut super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn EqualDomainSid(psid1 : PSID, psid2 : PSID, pfequal : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn EqualPrefixSid(psid1 : PSID, psid2 : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn EqualSid(psid1 : PSID, psid2 : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn FindFirstFreeAce(pacl : *const ACL, pace : *mut *mut core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn FreeSid(psid : PSID) -> *mut core::ffi::c_void); +windows_link::link!("advapi32.dll" "system" fn GetAce(pacl : *const ACL, dwaceindex : u32, pace : *mut *mut core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetAclInformation(pacl : *const ACL, paclinformation : *mut core::ffi::c_void, naclinformationlength : u32, dwaclinformationclass : ACL_INFORMATION_CLASS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetAppContainerAce(acl : *const ACL, startingaceindex : u32, appcontainerace : *mut *mut core::ffi::c_void, appcontaineraceindex : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn GetCachedSigningLevel(file : super::Foundation:: HANDLE, flags : *mut u32, signinglevel : *mut u32, thumbprint : *mut u8, thumbprintsize : *mut u32, thumbprintalgorithm : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetFileSecurityA(lpfilename : windows_sys::core::PCSTR, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetFileSecurityW(lpfilename : windows_sys::core::PCWSTR, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetKernelObjectSecurity(handle : super::Foundation:: HANDLE, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetLengthSid(psid : PSID) -> u32); +windows_link::link!("advapi32.dll" "system" fn GetPrivateObjectSecurity(objectdescriptor : PSECURITY_DESCRIPTOR, securityinformation : OBJECT_SECURITY_INFORMATION, resultantdescriptor : PSECURITY_DESCRIPTOR, descriptorlength : u32, returnlength : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetSecurityDescriptorControl(psecuritydescriptor : PSECURITY_DESCRIPTOR, pcontrol : *mut u16, lpdwrevision : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetSecurityDescriptorDacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, lpbdaclpresent : *mut windows_sys::core::BOOL, pdacl : *mut *mut ACL, lpbdacldefaulted : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : *mut PSID, lpbgroupdefaulted : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetSecurityDescriptorLength(psecuritydescriptor : PSECURITY_DESCRIPTOR) -> u32); +windows_link::link!("advapi32.dll" "system" fn GetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : *mut PSID, lpbownerdefaulted : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetSecurityDescriptorRMControl(securitydescriptor : PSECURITY_DESCRIPTOR, rmcontrol : *mut u8) -> u32); +windows_link::link!("advapi32.dll" "system" fn GetSecurityDescriptorSacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, lpbsaclpresent : *mut windows_sys::core::BOOL, psacl : *mut *mut ACL, lpbsacldefaulted : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetSidIdentifierAuthority(psid : PSID) -> *mut SID_IDENTIFIER_AUTHORITY); +windows_link::link!("advapi32.dll" "system" fn GetSidLengthRequired(nsubauthoritycount : u8) -> u32); +windows_link::link!("advapi32.dll" "system" fn GetSidSubAuthority(psid : PSID, nsubauthority : u32) -> *mut u32); +windows_link::link!("advapi32.dll" "system" fn GetSidSubAuthorityCount(psid : PSID) -> *mut u8); +windows_link::link!("advapi32.dll" "system" fn GetTokenInformation(tokenhandle : super::Foundation:: HANDLE, tokeninformationclass : TOKEN_INFORMATION_CLASS, tokeninformation : *mut core::ffi::c_void, tokeninformationlength : u32, returnlength : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn GetUserObjectSecurity(hobj : super::Foundation:: HANDLE, psirequested : *const u32, psid : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn GetWindowsAccountDomainSid(psid : PSID, pdomainsid : PSID, cbdomainsid : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ImpersonateAnonymousToken(threadhandle : super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ImpersonateLoggedOnUser(htoken : super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ImpersonateSelf(impersonationlevel : SECURITY_IMPERSONATION_LEVEL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn InitializeAcl(pacl : *mut ACL, nacllength : u32, dwaclrevision : ACE_REVISION) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn InitializeSecurityDescriptor(psecuritydescriptor : PSECURITY_DESCRIPTOR, dwrevision : u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn InitializeSid(sid : PSID, pidentifierauthority : *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount : u8) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn IsTokenRestricted(tokenhandle : super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn IsValidAcl(pacl : *const ACL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn IsValidSecurityDescriptor(psecuritydescriptor : PSECURITY_DESCRIPTOR) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn IsValidSid(psid : PSID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn IsWellKnownSid(psid : PSID, wellknownsidtype : WELL_KNOWN_SID_TYPE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LogonUserA(lpszusername : windows_sys::core::PCSTR, lpszdomain : windows_sys::core::PCSTR, lpszpassword : windows_sys::core::PCSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LogonUserExA(lpszusername : windows_sys::core::PCSTR, lpszdomain : windows_sys::core::PCSTR, lpszpassword : windows_sys::core::PCSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE, pplogonsid : *mut PSID, ppprofilebuffer : *mut *mut core::ffi::c_void, pdwprofilelength : *mut u32, pquotalimits : *mut QUOTA_LIMITS) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LogonUserExW(lpszusername : windows_sys::core::PCWSTR, lpszdomain : windows_sys::core::PCWSTR, lpszpassword : windows_sys::core::PCWSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE, pplogonsid : *mut PSID, ppprofilebuffer : *mut *mut core::ffi::c_void, pdwprofilelength : *mut u32, pquotalimits : *mut QUOTA_LIMITS) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LogonUserW(lpszusername : windows_sys::core::PCWSTR, lpszdomain : windows_sys::core::PCWSTR, lpszpassword : windows_sys::core::PCWSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupAccountNameA(lpsystemname : windows_sys::core::PCSTR, lpaccountname : windows_sys::core::PCSTR, sid : PSID, cbsid : *mut u32, referenceddomainname : windows_sys::core::PSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupAccountNameW(lpsystemname : windows_sys::core::PCWSTR, lpaccountname : windows_sys::core::PCWSTR, sid : PSID, cbsid : *mut u32, referenceddomainname : windows_sys::core::PWSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupAccountSidA(lpsystemname : windows_sys::core::PCSTR, sid : PSID, name : windows_sys::core::PSTR, cchname : *mut u32, referenceddomainname : windows_sys::core::PSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupAccountSidW(lpsystemname : windows_sys::core::PCWSTR, sid : PSID, name : windows_sys::core::PWSTR, cchname : *mut u32, referenceddomainname : windows_sys::core::PWSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupPrivilegeDisplayNameA(lpsystemname : windows_sys::core::PCSTR, lpname : windows_sys::core::PCSTR, lpdisplayname : windows_sys::core::PSTR, cchdisplayname : *mut u32, lplanguageid : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupPrivilegeDisplayNameW(lpsystemname : windows_sys::core::PCWSTR, lpname : windows_sys::core::PCWSTR, lpdisplayname : windows_sys::core::PWSTR, cchdisplayname : *mut u32, lplanguageid : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupPrivilegeNameA(lpsystemname : windows_sys::core::PCSTR, lpluid : *const super::Foundation:: LUID, lpname : windows_sys::core::PSTR, cchname : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupPrivilegeNameW(lpsystemname : windows_sys::core::PCWSTR, lpluid : *const super::Foundation:: LUID, lpname : windows_sys::core::PWSTR, cchname : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupPrivilegeValueA(lpsystemname : windows_sys::core::PCSTR, lpname : windows_sys::core::PCSTR, lpluid : *mut super::Foundation:: LUID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn LookupPrivilegeValueW(lpsystemname : windows_sys::core::PCWSTR, lpname : windows_sys::core::PCWSTR, lpluid : *mut super::Foundation:: LUID) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn MakeAbsoluteSD(pselfrelativesecuritydescriptor : PSECURITY_DESCRIPTOR, pabsolutesecuritydescriptor : PSECURITY_DESCRIPTOR, lpdwabsolutesecuritydescriptorsize : *mut u32, pdacl : *mut ACL, lpdwdaclsize : *mut u32, psacl : *mut ACL, lpdwsaclsize : *mut u32, powner : PSID, lpdwownersize : *mut u32, pprimarygroup : PSID, lpdwprimarygroupsize : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn MakeSelfRelativeSD(pabsolutesecuritydescriptor : PSECURITY_DESCRIPTOR, pselfrelativesecuritydescriptor : PSECURITY_DESCRIPTOR, lpdwbufferlength : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn MapGenericMask(accessmask : *mut u32, genericmapping : *const GENERIC_MAPPING)); +windows_link::link!("advapi32.dll" "system" fn ObjectCloseAuditAlarmA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, generateonclose : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ObjectCloseAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, generateonclose : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ObjectDeleteAuditAlarmA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, generateonclose : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ObjectDeleteAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, generateonclose : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ObjectOpenAuditAlarmA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCSTR, objectname : windows_sys::core::PCSTR, psecuritydescriptor : PSECURITY_DESCRIPTOR, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const PRIVILEGE_SET, objectcreation : windows_sys::core::BOOL, accessgranted : windows_sys::core::BOOL, generateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ObjectOpenAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_sys::core::PCWSTR, objectname : windows_sys::core::PCWSTR, psecuritydescriptor : PSECURITY_DESCRIPTOR, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const PRIVILEGE_SET, objectcreation : windows_sys::core::BOOL, accessgranted : windows_sys::core::BOOL, generateonclose : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ObjectPrivilegeAuditAlarmA(subsystemname : windows_sys::core::PCSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, privileges : *const PRIVILEGE_SET, accessgranted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn ObjectPrivilegeAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, privileges : *const PRIVILEGE_SET, accessgranted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn PrivilegeCheck(clienttoken : super::Foundation:: HANDLE, requiredprivileges : *mut PRIVILEGE_SET, pfresult : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn PrivilegedServiceAuditAlarmA(subsystemname : windows_sys::core::PCSTR, servicename : windows_sys::core::PCSTR, clienttoken : super::Foundation:: HANDLE, privileges : *const PRIVILEGE_SET, accessgranted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn PrivilegedServiceAuditAlarmW(subsystemname : windows_sys::core::PCWSTR, servicename : windows_sys::core::PCWSTR, clienttoken : super::Foundation:: HANDLE, privileges : *const PRIVILEGE_SET, accessgranted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn QuerySecurityAccessMask(securityinformation : OBJECT_SECURITY_INFORMATION, desiredaccess : *mut u32)); +windows_link::link!("advapi32.dll" "system" fn RevertToSelf() -> windows_sys::core::BOOL); +windows_link::link!("ntdll.dll" "system" fn RtlConvertSidToUnicodeString(unicodestring : *mut super::Foundation:: UNICODE_STRING, sid : PSID, allocatedestinationstring : bool) -> super::Foundation:: NTSTATUS); +windows_link::link!("ntdll.dll" "system" fn RtlNormalizeSecurityDescriptor(securitydescriptor : *mut PSECURITY_DESCRIPTOR, securitydescriptorlength : u32, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, newsecuritydescriptorlength : *mut u32, checkonly : bool) -> bool); +windows_link::link!("advapi32.dll" "system" fn SetAclInformation(pacl : *mut ACL, paclinformation : *const core::ffi::c_void, naclinformationlength : u32, dwaclinformationclass : ACL_INFORMATION_CLASS) -> windows_sys::core::BOOL); +windows_link::link!("kernel32.dll" "system" fn SetCachedSigningLevel(sourcefiles : *const super::Foundation:: HANDLE, sourcefilecount : u32, flags : u32, targetfile : super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetFileSecurityA(lpfilename : windows_sys::core::PCSTR, securityinformation : OBJECT_SECURITY_INFORMATION, psecuritydescriptor : PSECURITY_DESCRIPTOR) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetFileSecurityW(lpfilename : windows_sys::core::PCWSTR, securityinformation : OBJECT_SECURITY_INFORMATION, psecuritydescriptor : PSECURITY_DESCRIPTOR) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetKernelObjectSecurity(handle : super::Foundation:: HANDLE, securityinformation : OBJECT_SECURITY_INFORMATION, securitydescriptor : PSECURITY_DESCRIPTOR) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetPrivateObjectSecurity(securityinformation : OBJECT_SECURITY_INFORMATION, modificationdescriptor : PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut PSECURITY_DESCRIPTOR, genericmapping : *const GENERIC_MAPPING, token : super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetPrivateObjectSecurityEx(securityinformation : OBJECT_SECURITY_INFORMATION, modificationdescriptor : PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut PSECURITY_DESCRIPTOR, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, genericmapping : *const GENERIC_MAPPING, token : super::Foundation:: HANDLE) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetSecurityAccessMask(securityinformation : OBJECT_SECURITY_INFORMATION, desiredaccess : *mut u32)); +windows_link::link!("advapi32.dll" "system" fn SetSecurityDescriptorControl(psecuritydescriptor : PSECURITY_DESCRIPTOR, controlbitsofinterest : SECURITY_DESCRIPTOR_CONTROL, controlbitstoset : SECURITY_DESCRIPTOR_CONTROL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetSecurityDescriptorDacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, bdaclpresent : windows_sys::core::BOOL, pdacl : *const ACL, bdacldefaulted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : PSID, bgroupdefaulted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : PSID, bownerdefaulted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetSecurityDescriptorRMControl(securitydescriptor : PSECURITY_DESCRIPTOR, rmcontrol : *const u8) -> u32); +windows_link::link!("advapi32.dll" "system" fn SetSecurityDescriptorSacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, bsaclpresent : windows_sys::core::BOOL, psacl : *const ACL, bsacldefaulted : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("advapi32.dll" "system" fn SetTokenInformation(tokenhandle : super::Foundation:: HANDLE, tokeninformationclass : TOKEN_INFORMATION_CLASS, tokeninformation : *const core::ffi::c_void, tokeninformationlength : u32) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn SetUserObjectSecurity(hobj : super::Foundation:: HANDLE, psirequested : *const OBJECT_SECURITY_INFORMATION, psid : PSECURITY_DESCRIPTOR) -> windows_sys::core::BOOL); +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_ALLOWED_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_ALLOWED_CALLBACK_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_ALLOWED_CALLBACK_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: SYSTEM_AUDIT_OBJECT_ACE_FLAGS, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_ALLOWED_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: SYSTEM_AUDIT_OBJECT_ACE_FLAGS, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_DENIED_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_DENIED_CALLBACK_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_DENIED_CALLBACK_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: SYSTEM_AUDIT_OBJECT_ACE_FLAGS, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESS_DENIED_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: SYSTEM_AUDIT_OBJECT_ACE_FLAGS, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct ACCESS_REASONS { + pub Data: [u32; 32], +} +impl Default for ACCESS_REASONS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type ACE_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACE_HEADER { + pub AceType: u8, + pub AceFlags: u8, + pub AceSize: u16, +} +pub const ACE_INHERITED_OBJECT_TYPE_PRESENT: SYSTEM_AUDIT_OBJECT_ACE_FLAGS = 2u32; +pub const ACE_OBJECT_TYPE_PRESENT: SYSTEM_AUDIT_OBJECT_ACE_FLAGS = 1u32; +pub type ACE_REVISION = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACL { + pub AclRevision: u8, + pub Sbz1: u8, + pub AclSize: u16, + pub AceCount: u16, + pub Sbz2: u16, +} +pub type ACL_INFORMATION_CLASS = i32; +pub const ACL_REVISION: ACE_REVISION = 2u32; +pub const ACL_REVISION_DS: ACE_REVISION = 4u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACL_REVISION_INFORMATION { + pub AclRevision: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACL_SIZE_INFORMATION { + pub AceCount: u32, + pub AclBytesInUse: u32, + pub AclBytesFree: u32, +} +pub const ATTRIBUTE_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 32u32; +pub type AUDIT_EVENT_TYPE = i32; +pub const AclRevisionInformation: ACL_INFORMATION_CLASS = 1i32; +pub const AclSizeInformation: ACL_INFORMATION_CLASS = 2i32; +pub const AuditEventDirectoryServiceAccess: AUDIT_EVENT_TYPE = 1i32; +pub const AuditEventObjectAccess: AUDIT_EVENT_TYPE = 0i32; +pub const BACKUP_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 65536u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CLAIM_SECURITY_ATTRIBUTES_INFORMATION { + pub Version: u16, + pub Reserved: u16, + pub AttributeCount: u32, + pub Attribute: CLAIM_SECURITY_ATTRIBUTES_INFORMATION_0, +} +impl Default for CLAIM_SECURITY_ATTRIBUTES_INFORMATION { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union CLAIM_SECURITY_ATTRIBUTES_INFORMATION_0 { + pub pAttributeV1: *mut CLAIM_SECURITY_ATTRIBUTE_V1, +} +impl Default for CLAIM_SECURITY_ATTRIBUTES_INFORMATION_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED: CLAIM_SECURITY_ATTRIBUTE_FLAGS = 16u32; +pub const CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT: CLAIM_SECURITY_ATTRIBUTE_FLAGS = 8u32; +pub type CLAIM_SECURITY_ATTRIBUTE_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE { + pub Version: u64, + pub Name: windows_sys::core::PWSTR, +} +impl Default for CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const CLAIM_SECURITY_ATTRIBUTE_MANDATORY: CLAIM_SECURITY_ATTRIBUTE_FLAGS = 32u32; +pub const CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE: CLAIM_SECURITY_ATTRIBUTE_FLAGS = 1u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE { + pub pValue: *mut core::ffi::c_void, + pub ValueLength: u32, +} +impl Default for CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 { + pub Name: u32, + pub ValueType: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE, + pub Reserved: u16, + pub Flags: CLAIM_SECURITY_ATTRIBUTE_FLAGS, + pub ValueCount: u32, + pub Values: CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1_0, +} +impl Default for CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1_0 { + pub pInt64: [u32; 1], + pub pUint64: [u32; 1], + pub ppString: [u32; 1], + pub pFqbn: [u32; 1], + pub pOctetString: [u32; 1], +} +impl Default for CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = 6u16; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = 4u16; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = 1u16; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = 16u16; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_SID: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = 5u16; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = 3u16; +pub const CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = 2u16; +pub const CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY: CLAIM_SECURITY_ATTRIBUTE_FLAGS = 4u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CLAIM_SECURITY_ATTRIBUTE_V1 { + pub Name: windows_sys::core::PWSTR, + pub ValueType: CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE, + pub Reserved: u16, + pub Flags: u32, + pub ValueCount: u32, + pub Values: CLAIM_SECURITY_ATTRIBUTE_V1_0, +} +impl Default for CLAIM_SECURITY_ATTRIBUTE_V1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union CLAIM_SECURITY_ATTRIBUTE_V1_0 { + pub pInt64: *mut i64, + pub pUint64: *mut u64, + pub ppString: *mut windows_sys::core::PWSTR, + pub pFqbn: *mut CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE, + pub pOctetString: *mut CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE, +} +impl Default for CLAIM_SECURITY_ATTRIBUTE_V1_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE: CLAIM_SECURITY_ATTRIBUTE_FLAGS = 2u32; +pub type CLAIM_SECURITY_ATTRIBUTE_VALUE_TYPE = u16; +pub const CONTAINER_INHERIT_ACE: ACE_FLAGS = 2u32; +pub type CREATE_RESTRICTED_TOKEN_FLAGS = u32; +pub const CVT_SECONDS: u32 = 1u32; +pub const DACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 4u32; +pub const DISABLE_MAX_PRIVILEGE: CREATE_RESTRICTED_TOKEN_FLAGS = 1u32; +pub type ENUM_PERIOD = i32; +pub const ENUM_PERIOD_DAYS: ENUM_PERIOD = 3i32; +pub const ENUM_PERIOD_HOURS: ENUM_PERIOD = 2i32; +pub const ENUM_PERIOD_INVALID: ENUM_PERIOD = -1i32; +pub const ENUM_PERIOD_MINUTES: ENUM_PERIOD = 1i32; +pub const ENUM_PERIOD_MONTHS: ENUM_PERIOD = 5i32; +pub const ENUM_PERIOD_SECONDS: ENUM_PERIOD = 0i32; +pub const ENUM_PERIOD_WEEKS: ENUM_PERIOD = 4i32; +pub const ENUM_PERIOD_YEARS: ENUM_PERIOD = 6i32; +pub const FAILED_ACCESS_ACE_FLAG: ACE_FLAGS = 128u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct GENERIC_MAPPING { + pub GenericRead: u32, + pub GenericWrite: u32, + pub GenericExecute: u32, + pub GenericAll: u32, +} +pub const GROUP_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 2u32; +pub const INHERITED_ACE: ACE_FLAGS = 16u32; +pub const INHERIT_NO_PROPAGATE: ACE_FLAGS = 4u32; +pub const INHERIT_ONLY: ACE_FLAGS = 8u32; +pub const INHERIT_ONLY_ACE: ACE_FLAGS = 8u32; +pub const LABEL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 16u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LLFILETIME { + pub Anonymous: LLFILETIME_0, +} +impl Default for LLFILETIME { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union LLFILETIME_0 { + pub ll: i64, + pub ft: super::Foundation::FILETIME, +} +impl Default for LLFILETIME_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type LOGON32_LOGON = u32; +pub const LOGON32_LOGON_BATCH: LOGON32_LOGON = 4u32; +pub const LOGON32_LOGON_INTERACTIVE: LOGON32_LOGON = 2u32; +pub const LOGON32_LOGON_NETWORK: LOGON32_LOGON = 3u32; +pub const LOGON32_LOGON_NETWORK_CLEARTEXT: LOGON32_LOGON = 8u32; +pub const LOGON32_LOGON_NEW_CREDENTIALS: LOGON32_LOGON = 9u32; +pub const LOGON32_LOGON_SERVICE: LOGON32_LOGON = 5u32; +pub const LOGON32_LOGON_UNLOCK: LOGON32_LOGON = 7u32; +pub type LOGON32_PROVIDER = u32; +pub const LOGON32_PROVIDER_DEFAULT: LOGON32_PROVIDER = 0u32; +pub const LOGON32_PROVIDER_WINNT40: LOGON32_PROVIDER = 2u32; +pub const LOGON32_PROVIDER_WINNT50: LOGON32_PROVIDER = 3u32; +pub const LUA_TOKEN: CREATE_RESTRICTED_TOKEN_FLAGS = 4u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LUID_AND_ATTRIBUTES { + pub Luid: super::Foundation::LUID, + pub Attributes: TOKEN_PRIVILEGES_ATTRIBUTES, +} +pub type MANDATORY_LEVEL = i32; +pub const MandatoryLevelCount: MANDATORY_LEVEL = 6i32; +pub const MandatoryLevelHigh: MANDATORY_LEVEL = 3i32; +pub const MandatoryLevelLow: MANDATORY_LEVEL = 1i32; +pub const MandatoryLevelMedium: MANDATORY_LEVEL = 2i32; +pub const MandatoryLevelSecureProcess: MANDATORY_LEVEL = 5i32; +pub const MandatoryLevelSystem: MANDATORY_LEVEL = 4i32; +pub const MandatoryLevelUntrusted: MANDATORY_LEVEL = 0i32; +pub const MaxTokenInfoClass: TOKEN_INFORMATION_CLASS = 49i32; +pub type NCRYPT_DESCRIPTOR_HANDLE = *mut core::ffi::c_void; +pub type NCRYPT_STREAM_HANDLE = *mut core::ffi::c_void; +pub const NO_INHERITANCE: ACE_FLAGS = 0u32; +pub const NO_PROPAGATE_INHERIT_ACE: ACE_FLAGS = 4u32; +pub const OBJECT_INHERIT_ACE: ACE_FLAGS = 1u32; +pub type OBJECT_SECURITY_INFORMATION = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct OBJECT_TYPE_LIST { + pub Level: u16, + pub Sbz: u16, + pub ObjectType: *mut windows_sys::core::GUID, +} +impl Default for OBJECT_TYPE_LIST { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const OWNER_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 1u32; +pub type PLSA_AP_CALL_PACKAGE_UNTRUSTED = Option super::Foundation::NTSTATUS>; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct PRIVILEGE_SET { + pub PrivilegeCount: u32, + pub Control: u32, + pub Privilege: [LUID_AND_ATTRIBUTES; 1], +} +impl Default for PRIVILEGE_SET { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const PROTECTED_DACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 2147483648u32; +pub const PROTECTED_SACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 1073741824u32; +pub type PSECURITY_DESCRIPTOR = *mut core::ffi::c_void; +pub type PSID = *mut core::ffi::c_void; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct QUOTA_LIMITS { + pub PagedPoolLimit: usize, + pub NonPagedPoolLimit: usize, + pub MinimumWorkingSetSize: usize, + pub MaximumWorkingSetSize: usize, + pub PagefileLimit: usize, + pub TimeLimit: i64, +} +pub const SACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 8u32; +pub type SAFER_LEVEL_HANDLE = *mut core::ffi::c_void; +pub const SANDBOX_INERT: CREATE_RESTRICTED_TOKEN_FLAGS = 2u32; +pub const SCOPE_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 64u32; +pub const SECURITY_APP_PACKAGE_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 15] }; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SECURITY_ATTRIBUTES { + pub nLength: u32, + pub lpSecurityDescriptor: *mut core::ffi::c_void, + pub bInheritHandle: windows_sys::core::BOOL, +} +impl Default for SECURITY_ATTRIBUTES { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const SECURITY_AUTHENTICATION_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 18] }; +pub type SECURITY_AUTO_INHERIT_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SECURITY_CAPABILITIES { + pub AppContainerSid: PSID, + pub Capabilities: *mut SID_AND_ATTRIBUTES, + pub CapabilityCount: u32, + pub Reserved: u32, +} +impl Default for SECURITY_CAPABILITIES { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const SECURITY_CREATOR_SID_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 3] }; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SECURITY_DESCRIPTOR { + pub Revision: u8, + pub Sbz1: u8, + pub Control: SECURITY_DESCRIPTOR_CONTROL, + pub Owner: PSID, + pub Group: PSID, + pub Sacl: *mut ACL, + pub Dacl: *mut ACL, +} +impl Default for SECURITY_DESCRIPTOR { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type SECURITY_DESCRIPTOR_CONTROL = u16; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SECURITY_DESCRIPTOR_RELATIVE { + pub Revision: u8, + pub Sbz1: u8, + pub Control: SECURITY_DESCRIPTOR_CONTROL, + pub Owner: u32, + pub Group: u32, + pub Sacl: u32, + pub Dacl: u32, +} +pub const SECURITY_DYNAMIC_TRACKING: bool = true; +pub type SECURITY_IMPERSONATION_LEVEL = i32; +pub const SECURITY_LOCAL_SID_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 2] }; +pub const SECURITY_MANDATORY_LABEL_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 16] }; +pub const SECURITY_MAX_SID_SIZE: u32 = 68u32; +pub const SECURITY_NON_UNIQUE_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 4] }; +pub const SECURITY_NT_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 5] }; +pub const SECURITY_NULL_SID_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 0] }; +pub const SECURITY_PROCESS_TRUST_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 19] }; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SECURITY_QUALITY_OF_SERVICE { + pub Length: u32, + pub ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, + pub ContextTrackingMode: u8, + pub EffectiveOnly: bool, +} +pub const SECURITY_RESOURCE_MANAGER_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 9] }; +pub const SECURITY_SCOPED_POLICY_ID_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 17] }; +pub const SECURITY_STATIC_TRACKING: bool = false; +pub const SECURITY_WORLD_SID_AUTHORITY: SID_IDENTIFIER_AUTHORITY = SID_IDENTIFIER_AUTHORITY { Value: [0, 0, 0, 0, 0, 1] }; +pub type SEC_THREAD_START = Option u32>; +pub const SEF_AVOID_OWNER_CHECK: SECURITY_AUTO_INHERIT_FLAGS = 16u32; +pub const SEF_AVOID_OWNER_RESTRICTION: SECURITY_AUTO_INHERIT_FLAGS = 4096u32; +pub const SEF_AVOID_PRIVILEGE_CHECK: SECURITY_AUTO_INHERIT_FLAGS = 8u32; +pub const SEF_DACL_AUTO_INHERIT: SECURITY_AUTO_INHERIT_FLAGS = 1u32; +pub const SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT: SECURITY_AUTO_INHERIT_FLAGS = 4u32; +pub const SEF_DEFAULT_GROUP_FROM_PARENT: SECURITY_AUTO_INHERIT_FLAGS = 64u32; +pub const SEF_DEFAULT_OWNER_FROM_PARENT: SECURITY_AUTO_INHERIT_FLAGS = 32u32; +pub const SEF_MACL_NO_EXECUTE_UP: SECURITY_AUTO_INHERIT_FLAGS = 1024u32; +pub const SEF_MACL_NO_READ_UP: SECURITY_AUTO_INHERIT_FLAGS = 512u32; +pub const SEF_MACL_NO_WRITE_UP: SECURITY_AUTO_INHERIT_FLAGS = 256u32; +pub const SEF_SACL_AUTO_INHERIT: SECURITY_AUTO_INHERIT_FLAGS = 2u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SE_ACCESS_REPLY { + pub Size: u32, + pub ResultListCount: u32, + pub GrantedAccess: *mut u32, + pub AccessStatus: *mut u32, + pub AccessReason: *mut ACCESS_REASONS, + pub Privileges: *mut *mut PRIVILEGE_SET, +} +impl Default for SE_ACCESS_REPLY { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SE_ACCESS_REQUEST { + pub Size: u32, + pub SeSecurityDescriptor: *mut SE_SECURITY_DESCRIPTOR, + pub DesiredAccess: u32, + pub PreviouslyGrantedAccess: u32, + pub PrincipalSelfSid: PSID, + pub GenericMapping: *mut GENERIC_MAPPING, + pub ObjectTypeListCount: u32, + pub ObjectTypeList: *mut OBJECT_TYPE_LIST, +} +impl Default for SE_ACCESS_REQUEST { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const SE_ASSIGNPRIMARYTOKEN_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeAssignPrimaryTokenPrivilege"); +pub const SE_AUDIT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeAuditPrivilege"); +pub const SE_BACKUP_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeBackupPrivilege"); +pub const SE_CHANGE_NOTIFY_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeChangeNotifyPrivilege"); +pub const SE_CREATE_GLOBAL_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeCreateGlobalPrivilege"); +pub const SE_CREATE_PAGEFILE_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeCreatePagefilePrivilege"); +pub const SE_CREATE_PERMANENT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeCreatePermanentPrivilege"); +pub const SE_CREATE_SYMBOLIC_LINK_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeCreateSymbolicLinkPrivilege"); +pub const SE_CREATE_TOKEN_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeCreateTokenPrivilege"); +pub const SE_DACL_AUTO_INHERITED: SECURITY_DESCRIPTOR_CONTROL = 1024u16; +pub const SE_DACL_AUTO_INHERIT_REQ: SECURITY_DESCRIPTOR_CONTROL = 256u16; +pub const SE_DACL_DEFAULTED: SECURITY_DESCRIPTOR_CONTROL = 8u16; +pub const SE_DACL_PRESENT: SECURITY_DESCRIPTOR_CONTROL = 4u16; +pub const SE_DACL_PROTECTED: SECURITY_DESCRIPTOR_CONTROL = 4096u16; +pub const SE_DEBUG_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeDebugPrivilege"); +pub const SE_DELEGATE_SESSION_USER_IMPERSONATE_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeDelegateSessionUserImpersonatePrivilege"); +pub const SE_ENABLE_DELEGATION_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeEnableDelegationPrivilege"); +pub const SE_GROUP_DEFAULTED: SECURITY_DESCRIPTOR_CONTROL = 2u16; +pub const SE_IMPERSONATE_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeImpersonatePrivilege"); +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SE_IMPERSONATION_STATE { + pub Token: *mut core::ffi::c_void, + pub CopyOnOpen: bool, + pub EffectiveOnly: bool, + pub Level: SECURITY_IMPERSONATION_LEVEL, +} +impl Default for SE_IMPERSONATION_STATE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const SE_INCREASE_QUOTA_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeIncreaseQuotaPrivilege"); +pub const SE_INC_BASE_PRIORITY_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeIncreaseBasePriorityPrivilege"); +pub const SE_INC_WORKING_SET_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeIncreaseWorkingSetPrivilege"); +pub const SE_LOAD_DRIVER_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeLoadDriverPrivilege"); +pub const SE_LOCK_MEMORY_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeLockMemoryPrivilege"); +pub const SE_MACHINE_ACCOUNT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeMachineAccountPrivilege"); +pub const SE_MANAGE_VOLUME_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeManageVolumePrivilege"); +pub const SE_OWNER_DEFAULTED: SECURITY_DESCRIPTOR_CONTROL = 1u16; +pub const SE_PRIVILEGE_ENABLED: TOKEN_PRIVILEGES_ATTRIBUTES = 2u32; +pub const SE_PRIVILEGE_ENABLED_BY_DEFAULT: TOKEN_PRIVILEGES_ATTRIBUTES = 1u32; +pub const SE_PRIVILEGE_REMOVED: TOKEN_PRIVILEGES_ATTRIBUTES = 4u32; +pub const SE_PRIVILEGE_USED_FOR_ACCESS: TOKEN_PRIVILEGES_ATTRIBUTES = 2147483648u32; +pub const SE_PROF_SINGLE_PROCESS_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeProfileSingleProcessPrivilege"); +pub const SE_RELABEL_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeRelabelPrivilege"); +pub const SE_REMOTE_SHUTDOWN_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeRemoteShutdownPrivilege"); +pub const SE_RESTORE_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeRestorePrivilege"); +pub const SE_RM_CONTROL_VALID: SECURITY_DESCRIPTOR_CONTROL = 16384u16; +pub const SE_SACL_AUTO_INHERITED: SECURITY_DESCRIPTOR_CONTROL = 2048u16; +pub const SE_SACL_AUTO_INHERIT_REQ: SECURITY_DESCRIPTOR_CONTROL = 512u16; +pub const SE_SACL_DEFAULTED: SECURITY_DESCRIPTOR_CONTROL = 32u16; +pub const SE_SACL_PRESENT: SECURITY_DESCRIPTOR_CONTROL = 16u16; +pub const SE_SACL_PROTECTED: SECURITY_DESCRIPTOR_CONTROL = 8192u16; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SE_SECURITY_DESCRIPTOR { + pub Size: u32, + pub Flags: u32, + pub SecurityDescriptor: PSECURITY_DESCRIPTOR, +} +impl Default for SE_SECURITY_DESCRIPTOR { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const SE_SECURITY_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeSecurityPrivilege"); +pub const SE_SELF_RELATIVE: SECURITY_DESCRIPTOR_CONTROL = 32768u16; +pub const SE_SHUTDOWN_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeShutdownPrivilege"); +#[repr(C)] +#[derive(Clone, Copy)] +pub union SE_SID { + pub Sid: SID, + pub Buffer: [u8; 68], +} +impl Default for SE_SID { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const SE_SYNC_AGENT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeSyncAgentPrivilege"); +pub const SE_SYSTEMTIME_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeSystemtimePrivilege"); +pub const SE_SYSTEM_ENVIRONMENT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeSystemEnvironmentPrivilege"); +pub const SE_SYSTEM_PROFILE_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeSystemProfilePrivilege"); +pub const SE_TAKE_OWNERSHIP_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeTakeOwnershipPrivilege"); +pub const SE_TCB_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeTcbPrivilege"); +pub const SE_TIME_ZONE_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeTimeZonePrivilege"); +pub const SE_TRUSTED_CREDMAN_ACCESS_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeTrustedCredManAccessPrivilege"); +pub const SE_UNDOCK_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeUndockPrivilege"); +pub const SE_UNSOLICITED_INPUT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("SeUnsolicitedInputPrivilege"); +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SID { + pub Revision: u8, + pub SubAuthorityCount: u8, + pub IdentifierAuthority: SID_IDENTIFIER_AUTHORITY, + pub SubAuthority: [u32; 1], +} +impl Default for SID { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SID_AND_ATTRIBUTES { + pub Sid: PSID, + pub Attributes: u32, +} +impl Default for SID_AND_ATTRIBUTES { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SID_AND_ATTRIBUTES_HASH { + pub SidCount: u32, + pub SidAttr: *mut SID_AND_ATTRIBUTES, + pub Hash: [usize; 32], +} +impl Default for SID_AND_ATTRIBUTES_HASH { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SID_IDENTIFIER_AUTHORITY { + pub Value: [u8; 6], +} +impl Default for SID_IDENTIFIER_AUTHORITY { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type SID_NAME_USE = i32; +pub const SIGNING_LEVEL_FILE_CACHE_FLAG_NOT_VALIDATED: u32 = 1u32; +pub const SIGNING_LEVEL_FILE_CACHE_FLAG_VALIDATE_ONLY: u32 = 4u32; +pub const SIGNING_LEVEL_MICROSOFT: u32 = 8u32; +pub const SUB_CONTAINERS_AND_OBJECTS_INHERIT: ACE_FLAGS = 3u32; +pub const SUB_CONTAINERS_ONLY_INHERIT: ACE_FLAGS = 2u32; +pub const SUB_OBJECTS_ONLY_INHERIT: ACE_FLAGS = 1u32; +pub const SUCCESSFUL_ACCESS_ACE_FLAG: ACE_FLAGS = 64u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_ACCESS_FILTER_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_ALARM_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_ALARM_CALLBACK_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_ALARM_CALLBACK_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: SYSTEM_AUDIT_OBJECT_ACE_FLAGS, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_ALARM_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: u32, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_AUDIT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_AUDIT_CALLBACK_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_AUDIT_CALLBACK_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: SYSTEM_AUDIT_OBJECT_ACE_FLAGS, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_AUDIT_OBJECT_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub Flags: SYSTEM_AUDIT_OBJECT_ACE_FLAGS, + pub ObjectType: windows_sys::core::GUID, + pub InheritedObjectType: windows_sys::core::GUID, + pub SidStart: u32, +} +pub type SYSTEM_AUDIT_OBJECT_ACE_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_MANDATORY_LABEL_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_PROCESS_TRUST_LABEL_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_RESOURCE_ATTRIBUTE_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct SYSTEM_SCOPED_POLICY_ID_ACE { + pub Header: ACE_HEADER, + pub Mask: u32, + pub SidStart: u32, +} +pub const SecurityAnonymous: SECURITY_IMPERSONATION_LEVEL = 0i32; +pub const SecurityDelegation: SECURITY_IMPERSONATION_LEVEL = 3i32; +pub const SecurityIdentification: SECURITY_IMPERSONATION_LEVEL = 1i32; +pub const SecurityImpersonation: SECURITY_IMPERSONATION_LEVEL = 2i32; +pub const SidTypeAlias: SID_NAME_USE = 4i32; +pub const SidTypeComputer: SID_NAME_USE = 9i32; +pub const SidTypeDeletedAccount: SID_NAME_USE = 6i32; +pub const SidTypeDomain: SID_NAME_USE = 3i32; +pub const SidTypeGroup: SID_NAME_USE = 2i32; +pub const SidTypeInvalid: SID_NAME_USE = 7i32; +pub const SidTypeLabel: SID_NAME_USE = 10i32; +pub const SidTypeLogonSession: SID_NAME_USE = 11i32; +pub const SidTypeUnknown: SID_NAME_USE = 8i32; +pub const SidTypeUser: SID_NAME_USE = 1i32; +pub const SidTypeWellKnownGroup: SID_NAME_USE = 5i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_ACCESS_INFORMATION { + pub SidHash: *mut SID_AND_ATTRIBUTES_HASH, + pub RestrictedSidHash: *mut SID_AND_ATTRIBUTES_HASH, + pub Privileges: *mut TOKEN_PRIVILEGES, + pub AuthenticationId: super::Foundation::LUID, + pub TokenType: TOKEN_TYPE, + pub ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, + pub MandatoryPolicy: TOKEN_MANDATORY_POLICY, + pub Flags: u32, + pub AppContainerNumber: u32, + pub PackageSid: PSID, + pub CapabilitiesHash: *mut SID_AND_ATTRIBUTES_HASH, + pub TrustLevelSid: PSID, + pub SecurityAttributes: *mut core::ffi::c_void, +} +impl Default for TOKEN_ACCESS_INFORMATION { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TOKEN_ACCESS_MASK = u32; +pub const TOKEN_ACCESS_PSEUDO_HANDLE: TOKEN_ACCESS_MASK = 24u32; +pub const TOKEN_ACCESS_PSEUDO_HANDLE_WIN8: TOKEN_ACCESS_MASK = 24u32; +pub const TOKEN_ACCESS_SYSTEM_SECURITY: TOKEN_ACCESS_MASK = 16777216u32; +pub const TOKEN_ADJUST_DEFAULT: TOKEN_ACCESS_MASK = 128u32; +pub const TOKEN_ADJUST_GROUPS: TOKEN_ACCESS_MASK = 64u32; +pub const TOKEN_ADJUST_PRIVILEGES: TOKEN_ACCESS_MASK = 32u32; +pub const TOKEN_ADJUST_SESSIONID: TOKEN_ACCESS_MASK = 256u32; +pub const TOKEN_ALL_ACCESS: TOKEN_ACCESS_MASK = 983551u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_APPCONTAINER_INFORMATION { + pub TokenAppContainer: PSID, +} +impl Default for TOKEN_APPCONTAINER_INFORMATION { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TOKEN_ASSIGN_PRIMARY: TOKEN_ACCESS_MASK = 1u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_AUDIT_POLICY { + pub PerUserPolicy: [u8; 30], +} +impl Default for TOKEN_AUDIT_POLICY { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOKEN_CONTROL { + pub TokenId: super::Foundation::LUID, + pub AuthenticationId: super::Foundation::LUID, + pub ModifiedId: super::Foundation::LUID, + pub TokenSource: TOKEN_SOURCE, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_DEFAULT_DACL { + pub DefaultDacl: *mut ACL, +} +impl Default for TOKEN_DEFAULT_DACL { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TOKEN_DELETE: TOKEN_ACCESS_MASK = 65536u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_DEVICE_CLAIMS { + pub DeviceClaims: *mut core::ffi::c_void, +} +impl Default for TOKEN_DEVICE_CLAIMS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TOKEN_DUPLICATE: TOKEN_ACCESS_MASK = 2u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOKEN_ELEVATION { + pub TokenIsElevated: u32, +} +pub type TOKEN_ELEVATION_TYPE = i32; +pub const TOKEN_EXECUTE: TOKEN_ACCESS_MASK = 131072u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_GROUPS { + pub GroupCount: u32, + pub Groups: [SID_AND_ATTRIBUTES; 1], +} +impl Default for TOKEN_GROUPS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_GROUPS_AND_PRIVILEGES { + pub SidCount: u32, + pub SidLength: u32, + pub Sids: *mut SID_AND_ATTRIBUTES, + pub RestrictedSidCount: u32, + pub RestrictedSidLength: u32, + pub RestrictedSids: *mut SID_AND_ATTRIBUTES, + pub PrivilegeCount: u32, + pub PrivilegeLength: u32, + pub Privileges: *mut LUID_AND_ATTRIBUTES, + pub AuthenticationId: super::Foundation::LUID, +} +impl Default for TOKEN_GROUPS_AND_PRIVILEGES { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TOKEN_IMPERSONATE: TOKEN_ACCESS_MASK = 4u32; +pub type TOKEN_INFORMATION_CLASS = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_LINKED_TOKEN { + pub LinkedToken: super::Foundation::HANDLE, +} +impl Default for TOKEN_LINKED_TOKEN { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOKEN_MANDATORY_LABEL { + pub Label: SID_AND_ATTRIBUTES, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOKEN_MANDATORY_POLICY { + pub Policy: TOKEN_MANDATORY_POLICY_ID, +} +pub type TOKEN_MANDATORY_POLICY_ID = u32; +pub const TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN: TOKEN_MANDATORY_POLICY_ID = 2u32; +pub const TOKEN_MANDATORY_POLICY_NO_WRITE_UP: TOKEN_MANDATORY_POLICY_ID = 1u32; +pub const TOKEN_MANDATORY_POLICY_OFF: TOKEN_MANDATORY_POLICY_ID = 0u32; +pub const TOKEN_MANDATORY_POLICY_VALID_MASK: TOKEN_MANDATORY_POLICY_ID = 3u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOKEN_ORIGIN { + pub OriginatingLogonSession: super::Foundation::LUID, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_OWNER { + pub Owner: PSID, +} +impl Default for TOKEN_OWNER { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_PRIMARY_GROUP { + pub PrimaryGroup: PSID, +} +impl Default for TOKEN_PRIMARY_GROUP { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_PRIVILEGES { + pub PrivilegeCount: u32, + pub Privileges: [LUID_AND_ATTRIBUTES; 1], +} +impl Default for TOKEN_PRIVILEGES { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TOKEN_PRIVILEGES_ATTRIBUTES = u32; +pub const TOKEN_QUERY: TOKEN_ACCESS_MASK = 8u32; +pub const TOKEN_QUERY_SOURCE: TOKEN_ACCESS_MASK = 16u32; +pub const TOKEN_READ: TOKEN_ACCESS_MASK = 131080u32; +pub const TOKEN_READ_CONTROL: TOKEN_ACCESS_MASK = 131072u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_SOURCE { + pub SourceName: [i8; 8], + pub SourceIdentifier: super::Foundation::LUID, +} +impl Default for TOKEN_SOURCE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOKEN_STATISTICS { + pub TokenId: super::Foundation::LUID, + pub AuthenticationId: super::Foundation::LUID, + pub ExpirationTime: i64, + pub TokenType: TOKEN_TYPE, + pub ImpersonationLevel: SECURITY_IMPERSONATION_LEVEL, + pub DynamicCharged: u32, + pub DynamicAvailable: u32, + pub GroupCount: u32, + pub PrivilegeCount: u32, + pub ModifiedId: super::Foundation::LUID, +} +pub const TOKEN_TRUST_CONSTRAINT_MASK: TOKEN_ACCESS_MASK = 131096u32; +pub type TOKEN_TYPE = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOKEN_USER { + pub User: SID_AND_ATTRIBUTES, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TOKEN_USER_CLAIMS { + pub UserClaims: *mut core::ffi::c_void, +} +impl Default for TOKEN_USER_CLAIMS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TOKEN_WRITE: TOKEN_ACCESS_MASK = 131296u32; +pub const TOKEN_WRITE_DAC: TOKEN_ACCESS_MASK = 262144u32; +pub const TOKEN_WRITE_OWNER: TOKEN_ACCESS_MASK = 524288u32; +pub const TokenAccessInformation: TOKEN_INFORMATION_CLASS = 22i32; +pub const TokenAppContainerNumber: TOKEN_INFORMATION_CLASS = 32i32; +pub const TokenAppContainerSid: TOKEN_INFORMATION_CLASS = 31i32; +pub const TokenAuditPolicy: TOKEN_INFORMATION_CLASS = 16i32; +pub const TokenBnoIsolation: TOKEN_INFORMATION_CLASS = 44i32; +pub const TokenCapabilities: TOKEN_INFORMATION_CLASS = 30i32; +pub const TokenChildProcessFlags: TOKEN_INFORMATION_CLASS = 45i32; +pub const TokenDefaultDacl: TOKEN_INFORMATION_CLASS = 6i32; +pub const TokenDeviceClaimAttributes: TOKEN_INFORMATION_CLASS = 34i32; +pub const TokenDeviceGroups: TOKEN_INFORMATION_CLASS = 37i32; +pub const TokenElevation: TOKEN_INFORMATION_CLASS = 20i32; +pub const TokenElevationType: TOKEN_INFORMATION_CLASS = 18i32; +pub const TokenElevationTypeDefault: TOKEN_ELEVATION_TYPE = 1i32; +pub const TokenElevationTypeFull: TOKEN_ELEVATION_TYPE = 2i32; +pub const TokenElevationTypeLimited: TOKEN_ELEVATION_TYPE = 3i32; +pub const TokenGroups: TOKEN_INFORMATION_CLASS = 2i32; +pub const TokenGroupsAndPrivileges: TOKEN_INFORMATION_CLASS = 13i32; +pub const TokenHasRestrictions: TOKEN_INFORMATION_CLASS = 21i32; +pub const TokenImpersonation: TOKEN_TYPE = 2i32; +pub const TokenImpersonationLevel: TOKEN_INFORMATION_CLASS = 9i32; +pub const TokenIntegrityLevel: TOKEN_INFORMATION_CLASS = 25i32; +pub const TokenIsAppContainer: TOKEN_INFORMATION_CLASS = 29i32; +pub const TokenIsAppSilo: TOKEN_INFORMATION_CLASS = 48i32; +pub const TokenIsLessPrivilegedAppContainer: TOKEN_INFORMATION_CLASS = 46i32; +pub const TokenIsRestricted: TOKEN_INFORMATION_CLASS = 40i32; +pub const TokenIsSandboxed: TOKEN_INFORMATION_CLASS = 47i32; +pub const TokenLinkedToken: TOKEN_INFORMATION_CLASS = 19i32; +pub const TokenLogonSid: TOKEN_INFORMATION_CLASS = 28i32; +pub const TokenMandatoryPolicy: TOKEN_INFORMATION_CLASS = 27i32; +pub const TokenOrigin: TOKEN_INFORMATION_CLASS = 17i32; +pub const TokenOwner: TOKEN_INFORMATION_CLASS = 4i32; +pub const TokenPrimary: TOKEN_TYPE = 1i32; +pub const TokenPrimaryGroup: TOKEN_INFORMATION_CLASS = 5i32; +pub const TokenPrivateNameSpace: TOKEN_INFORMATION_CLASS = 42i32; +pub const TokenPrivileges: TOKEN_INFORMATION_CLASS = 3i32; +pub const TokenProcessTrustLevel: TOKEN_INFORMATION_CLASS = 41i32; +pub const TokenRestrictedDeviceClaimAttributes: TOKEN_INFORMATION_CLASS = 36i32; +pub const TokenRestrictedDeviceGroups: TOKEN_INFORMATION_CLASS = 38i32; +pub const TokenRestrictedSids: TOKEN_INFORMATION_CLASS = 11i32; +pub const TokenRestrictedUserClaimAttributes: TOKEN_INFORMATION_CLASS = 35i32; +pub const TokenSandBoxInert: TOKEN_INFORMATION_CLASS = 15i32; +pub const TokenSecurityAttributes: TOKEN_INFORMATION_CLASS = 39i32; +pub const TokenSessionId: TOKEN_INFORMATION_CLASS = 12i32; +pub const TokenSessionReference: TOKEN_INFORMATION_CLASS = 14i32; +pub const TokenSingletonAttributes: TOKEN_INFORMATION_CLASS = 43i32; +pub const TokenSource: TOKEN_INFORMATION_CLASS = 7i32; +pub const TokenStatistics: TOKEN_INFORMATION_CLASS = 10i32; +pub const TokenType: TOKEN_INFORMATION_CLASS = 8i32; +pub const TokenUIAccess: TOKEN_INFORMATION_CLASS = 26i32; +pub const TokenUser: TOKEN_INFORMATION_CLASS = 1i32; +pub const TokenUserClaimAttributes: TOKEN_INFORMATION_CLASS = 33i32; +pub const TokenVirtualizationAllowed: TOKEN_INFORMATION_CLASS = 23i32; +pub const TokenVirtualizationEnabled: TOKEN_INFORMATION_CLASS = 24i32; +pub const UNPROTECTED_DACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 536870912u32; +pub const UNPROTECTED_SACL_SECURITY_INFORMATION: OBJECT_SECURITY_INFORMATION = 268435456u32; +pub type WELL_KNOWN_SID_TYPE = i32; +pub const WRITE_RESTRICTED: CREATE_RESTRICTED_TOKEN_FLAGS = 8u32; +pub const WinAccountAdministratorSid: WELL_KNOWN_SID_TYPE = 38i32; +pub const WinAccountCertAdminsSid: WELL_KNOWN_SID_TYPE = 46i32; +pub const WinAccountCloneableControllersSid: WELL_KNOWN_SID_TYPE = 100i32; +pub const WinAccountComputersSid: WELL_KNOWN_SID_TYPE = 44i32; +pub const WinAccountControllersSid: WELL_KNOWN_SID_TYPE = 45i32; +pub const WinAccountDefaultSystemManagedSid: WELL_KNOWN_SID_TYPE = 110i32; +pub const WinAccountDomainAdminsSid: WELL_KNOWN_SID_TYPE = 41i32; +pub const WinAccountDomainGuestsSid: WELL_KNOWN_SID_TYPE = 43i32; +pub const WinAccountDomainUsersSid: WELL_KNOWN_SID_TYPE = 42i32; +pub const WinAccountEnterpriseAdminsSid: WELL_KNOWN_SID_TYPE = 48i32; +pub const WinAccountEnterpriseKeyAdminsSid: WELL_KNOWN_SID_TYPE = 114i32; +pub const WinAccountGuestSid: WELL_KNOWN_SID_TYPE = 39i32; +pub const WinAccountKeyAdminsSid: WELL_KNOWN_SID_TYPE = 113i32; +pub const WinAccountKrbtgtSid: WELL_KNOWN_SID_TYPE = 40i32; +pub const WinAccountPolicyAdminsSid: WELL_KNOWN_SID_TYPE = 49i32; +pub const WinAccountProtectedUsersSid: WELL_KNOWN_SID_TYPE = 107i32; +pub const WinAccountRasAndIasServersSid: WELL_KNOWN_SID_TYPE = 50i32; +pub const WinAccountReadonlyControllersSid: WELL_KNOWN_SID_TYPE = 75i32; +pub const WinAccountSchemaAdminsSid: WELL_KNOWN_SID_TYPE = 47i32; +pub const WinAnonymousSid: WELL_KNOWN_SID_TYPE = 13i32; +pub const WinApplicationPackageAuthoritySid: WELL_KNOWN_SID_TYPE = 83i32; +pub const WinAuthenticatedUserSid: WELL_KNOWN_SID_TYPE = 17i32; +pub const WinAuthenticationAuthorityAssertedSid: WELL_KNOWN_SID_TYPE = 103i32; +pub const WinAuthenticationFreshKeyAuthSid: WELL_KNOWN_SID_TYPE = 118i32; +pub const WinAuthenticationKeyPropertyAttestationSid: WELL_KNOWN_SID_TYPE = 117i32; +pub const WinAuthenticationKeyPropertyMFASid: WELL_KNOWN_SID_TYPE = 116i32; +pub const WinAuthenticationKeyTrustSid: WELL_KNOWN_SID_TYPE = 115i32; +pub const WinAuthenticationServiceAssertedSid: WELL_KNOWN_SID_TYPE = 104i32; +pub const WinBatchSid: WELL_KNOWN_SID_TYPE = 10i32; +pub const WinBuiltinAccessControlAssistanceOperatorsSid: WELL_KNOWN_SID_TYPE = 101i32; +pub const WinBuiltinAccountOperatorsSid: WELL_KNOWN_SID_TYPE = 30i32; +pub const WinBuiltinAdministratorsSid: WELL_KNOWN_SID_TYPE = 26i32; +pub const WinBuiltinAnyPackageSid: WELL_KNOWN_SID_TYPE = 84i32; +pub const WinBuiltinAuthorizationAccessSid: WELL_KNOWN_SID_TYPE = 59i32; +pub const WinBuiltinBackupOperatorsSid: WELL_KNOWN_SID_TYPE = 33i32; +pub const WinBuiltinCertSvcDComAccessGroup: WELL_KNOWN_SID_TYPE = 78i32; +pub const WinBuiltinCryptoOperatorsSid: WELL_KNOWN_SID_TYPE = 64i32; +pub const WinBuiltinDCOMUsersSid: WELL_KNOWN_SID_TYPE = 61i32; +pub const WinBuiltinDefaultSystemManagedGroupSid: WELL_KNOWN_SID_TYPE = 111i32; +pub const WinBuiltinDeviceOwnersSid: WELL_KNOWN_SID_TYPE = 119i32; +pub const WinBuiltinDomainSid: WELL_KNOWN_SID_TYPE = 25i32; +pub const WinBuiltinEventLogReadersGroup: WELL_KNOWN_SID_TYPE = 76i32; +pub const WinBuiltinGuestsSid: WELL_KNOWN_SID_TYPE = 28i32; +pub const WinBuiltinHyperVAdminsSid: WELL_KNOWN_SID_TYPE = 99i32; +pub const WinBuiltinIUsersSid: WELL_KNOWN_SID_TYPE = 62i32; +pub const WinBuiltinIncomingForestTrustBuildersSid: WELL_KNOWN_SID_TYPE = 56i32; +pub const WinBuiltinNetworkConfigurationOperatorsSid: WELL_KNOWN_SID_TYPE = 37i32; +pub const WinBuiltinPerfLoggingUsersSid: WELL_KNOWN_SID_TYPE = 58i32; +pub const WinBuiltinPerfMonitoringUsersSid: WELL_KNOWN_SID_TYPE = 57i32; +pub const WinBuiltinPowerUsersSid: WELL_KNOWN_SID_TYPE = 29i32; +pub const WinBuiltinPreWindows2000CompatibleAccessSid: WELL_KNOWN_SID_TYPE = 35i32; +pub const WinBuiltinPrintOperatorsSid: WELL_KNOWN_SID_TYPE = 32i32; +pub const WinBuiltinRDSEndpointServersSid: WELL_KNOWN_SID_TYPE = 96i32; +pub const WinBuiltinRDSManagementServersSid: WELL_KNOWN_SID_TYPE = 97i32; +pub const WinBuiltinRDSRemoteAccessServersSid: WELL_KNOWN_SID_TYPE = 95i32; +pub const WinBuiltinRemoteDesktopUsersSid: WELL_KNOWN_SID_TYPE = 36i32; +pub const WinBuiltinRemoteManagementUsersSid: WELL_KNOWN_SID_TYPE = 102i32; +pub const WinBuiltinReplicatorSid: WELL_KNOWN_SID_TYPE = 34i32; +pub const WinBuiltinStorageReplicaAdminsSid: WELL_KNOWN_SID_TYPE = 112i32; +pub const WinBuiltinSystemOperatorsSid: WELL_KNOWN_SID_TYPE = 31i32; +pub const WinBuiltinTerminalServerLicenseServersSid: WELL_KNOWN_SID_TYPE = 60i32; +pub const WinBuiltinUsersSid: WELL_KNOWN_SID_TYPE = 27i32; +pub const WinCacheablePrincipalsGroupSid: WELL_KNOWN_SID_TYPE = 72i32; +pub const WinCapabilityAppointmentsSid: WELL_KNOWN_SID_TYPE = 108i32; +pub const WinCapabilityContactsSid: WELL_KNOWN_SID_TYPE = 109i32; +pub const WinCapabilityDocumentsLibrarySid: WELL_KNOWN_SID_TYPE = 91i32; +pub const WinCapabilityEnterpriseAuthenticationSid: WELL_KNOWN_SID_TYPE = 93i32; +pub const WinCapabilityInternetClientServerSid: WELL_KNOWN_SID_TYPE = 86i32; +pub const WinCapabilityInternetClientSid: WELL_KNOWN_SID_TYPE = 85i32; +pub const WinCapabilityMusicLibrarySid: WELL_KNOWN_SID_TYPE = 90i32; +pub const WinCapabilityPicturesLibrarySid: WELL_KNOWN_SID_TYPE = 88i32; +pub const WinCapabilityPrivateNetworkClientServerSid: WELL_KNOWN_SID_TYPE = 87i32; +pub const WinCapabilityRemovableStorageSid: WELL_KNOWN_SID_TYPE = 94i32; +pub const WinCapabilitySharedUserCertificatesSid: WELL_KNOWN_SID_TYPE = 92i32; +pub const WinCapabilityVideosLibrarySid: WELL_KNOWN_SID_TYPE = 89i32; +pub const WinConsoleLogonSid: WELL_KNOWN_SID_TYPE = 81i32; +pub const WinCreatorGroupServerSid: WELL_KNOWN_SID_TYPE = 6i32; +pub const WinCreatorGroupSid: WELL_KNOWN_SID_TYPE = 4i32; +pub const WinCreatorOwnerRightsSid: WELL_KNOWN_SID_TYPE = 71i32; +pub const WinCreatorOwnerServerSid: WELL_KNOWN_SID_TYPE = 5i32; +pub const WinCreatorOwnerSid: WELL_KNOWN_SID_TYPE = 3i32; +pub const WinDialupSid: WELL_KNOWN_SID_TYPE = 8i32; +pub const WinDigestAuthenticationSid: WELL_KNOWN_SID_TYPE = 52i32; +pub const WinEnterpriseControllersSid: WELL_KNOWN_SID_TYPE = 15i32; +pub const WinEnterpriseReadonlyControllersSid: WELL_KNOWN_SID_TYPE = 74i32; +pub const WinHighLabelSid: WELL_KNOWN_SID_TYPE = 68i32; +pub const WinIUserSid: WELL_KNOWN_SID_TYPE = 63i32; +pub const WinInteractiveSid: WELL_KNOWN_SID_TYPE = 11i32; +pub const WinLocalAccountAndAdministratorSid: WELL_KNOWN_SID_TYPE = 106i32; +pub const WinLocalAccountSid: WELL_KNOWN_SID_TYPE = 105i32; +pub const WinLocalLogonSid: WELL_KNOWN_SID_TYPE = 80i32; +pub const WinLocalServiceSid: WELL_KNOWN_SID_TYPE = 23i32; +pub const WinLocalSid: WELL_KNOWN_SID_TYPE = 2i32; +pub const WinLocalSystemSid: WELL_KNOWN_SID_TYPE = 22i32; +pub const WinLogonIdsSid: WELL_KNOWN_SID_TYPE = 21i32; +pub const WinLowLabelSid: WELL_KNOWN_SID_TYPE = 66i32; +pub const WinMediumLabelSid: WELL_KNOWN_SID_TYPE = 67i32; +pub const WinMediumPlusLabelSid: WELL_KNOWN_SID_TYPE = 79i32; +pub const WinNTLMAuthenticationSid: WELL_KNOWN_SID_TYPE = 51i32; +pub const WinNetworkServiceSid: WELL_KNOWN_SID_TYPE = 24i32; +pub const WinNetworkSid: WELL_KNOWN_SID_TYPE = 9i32; +pub const WinNewEnterpriseReadonlyControllersSid: WELL_KNOWN_SID_TYPE = 77i32; +pub const WinNonCacheablePrincipalsGroupSid: WELL_KNOWN_SID_TYPE = 73i32; +pub const WinNtAuthoritySid: WELL_KNOWN_SID_TYPE = 7i32; +pub const WinNullSid: WELL_KNOWN_SID_TYPE = 0i32; +pub const WinOtherOrganizationSid: WELL_KNOWN_SID_TYPE = 55i32; +pub const WinProxySid: WELL_KNOWN_SID_TYPE = 14i32; +pub const WinRemoteLogonIdSid: WELL_KNOWN_SID_TYPE = 20i32; +pub const WinRestrictedCodeSid: WELL_KNOWN_SID_TYPE = 18i32; +pub const WinSChannelAuthenticationSid: WELL_KNOWN_SID_TYPE = 53i32; +pub const WinSelfSid: WELL_KNOWN_SID_TYPE = 16i32; +pub const WinServiceSid: WELL_KNOWN_SID_TYPE = 12i32; +pub const WinSystemLabelSid: WELL_KNOWN_SID_TYPE = 69i32; +pub const WinTerminalServerSid: WELL_KNOWN_SID_TYPE = 19i32; +pub const WinThisOrganizationCertificateSid: WELL_KNOWN_SID_TYPE = 82i32; +pub const WinThisOrganizationSid: WELL_KNOWN_SID_TYPE = 54i32; +pub const WinUntrustedLabelSid: WELL_KNOWN_SID_TYPE = 65i32; +pub const WinUserModeDriversSid: WELL_KNOWN_SID_TYPE = 98i32; +pub const WinWorldSid: WELL_KNOWN_SID_TYPE = 1i32; +pub const WinWriteRestrictedCodeSid: WELL_KNOWN_SID_TYPE = 70i32; +pub const cwcFILENAMESUFFIXMAX: u32 = 20u32; +pub const cwcHRESULTSTRING: u32 = 40u32; +pub const szLBRACE: windows_sys::core::PCSTR = windows_sys::core::s!("{"); +pub const szLPAREN: windows_sys::core::PCSTR = windows_sys::core::s!("("); +pub const szRBRACE: windows_sys::core::PCSTR = windows_sys::core::s!("}"); +pub const szRPAREN: windows_sys::core::PCSTR = windows_sys::core::s!(")"); +pub const wszCERTENROLLSHAREPATH: windows_sys::core::PCWSTR = windows_sys::core::w!("CertSrv\\CertEnroll"); +pub const wszFCSAPARM_CERTFILENAMESUFFIX: windows_sys::core::PCWSTR = windows_sys::core::w!("%4"); +pub const wszFCSAPARM_CONFIGDN: windows_sys::core::PCWSTR = windows_sys::core::w!("%6"); +pub const wszFCSAPARM_CRLDELTAFILENAMESUFFIX: windows_sys::core::PCWSTR = windows_sys::core::w!("%9"); +pub const wszFCSAPARM_CRLFILENAMESUFFIX: windows_sys::core::PCWSTR = windows_sys::core::w!("%8"); +pub const wszFCSAPARM_DOMAINDN: windows_sys::core::PCWSTR = windows_sys::core::w!("%5"); +pub const wszFCSAPARM_DSCACERTATTRIBUTE: windows_sys::core::PCWSTR = windows_sys::core::w!("%11"); +pub const wszFCSAPARM_DSCRLATTRIBUTE: windows_sys::core::PCWSTR = windows_sys::core::w!("%10"); +pub const wszFCSAPARM_DSCROSSCERTPAIRATTRIBUTE: windows_sys::core::PCWSTR = windows_sys::core::w!("%14"); +pub const wszFCSAPARM_DSKRACERTATTRIBUTE: windows_sys::core::PCWSTR = windows_sys::core::w!("%13"); +pub const wszFCSAPARM_DSUSERCERTATTRIBUTE: windows_sys::core::PCWSTR = windows_sys::core::w!("%12"); +pub const wszFCSAPARM_SANITIZEDCANAME: windows_sys::core::PCWSTR = windows_sys::core::w!("%3"); +pub const wszFCSAPARM_SANITIZEDCANAMEHASH: windows_sys::core::PCWSTR = windows_sys::core::w!("%7"); +pub const wszFCSAPARM_SERVERDNSNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("%1"); +pub const wszFCSAPARM_SERVERSHORTNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("%2"); +pub const wszLBRACE: windows_sys::core::PCWSTR = windows_sys::core::w!("{"); +pub const wszLPAREN: windows_sys::core::PCWSTR = windows_sys::core::w!("("); +pub const wszRBRACE: windows_sys::core::PCWSTR = windows_sys::core::w!("}"); +pub const wszRPAREN: windows_sys::core::PCWSTR = windows_sys::core::w!(")"); diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Storage/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Storage/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..f452f93da61f03662ebdd4903b858648703209eb --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Storage/mod.rs @@ -0,0 +1,38 @@ +#[cfg(feature = "Win32_Storage_Cabinets")] +pub mod Cabinets; +#[cfg(feature = "Win32_Storage_CloudFilters")] +pub mod CloudFilters; +#[cfg(feature = "Win32_Storage_Compression")] +pub mod Compression; +#[cfg(feature = "Win32_Storage_DistributedFileSystem")] +pub mod DistributedFileSystem; +#[cfg(feature = "Win32_Storage_FileHistory")] +pub mod FileHistory; +#[cfg(feature = "Win32_Storage_FileSystem")] +pub mod FileSystem; +#[cfg(feature = "Win32_Storage_Imapi")] +pub mod Imapi; +#[cfg(feature = "Win32_Storage_IndexServer")] +pub mod IndexServer; +#[cfg(feature = "Win32_Storage_InstallableFileSystems")] +pub mod InstallableFileSystems; +#[cfg(feature = "Win32_Storage_IscsiDisc")] +pub mod IscsiDisc; +#[cfg(feature = "Win32_Storage_Jet")] +pub mod Jet; +#[cfg(feature = "Win32_Storage_Nvme")] +pub mod Nvme; +#[cfg(feature = "Win32_Storage_OfflineFiles")] +pub mod OfflineFiles; +#[cfg(feature = "Win32_Storage_OperationRecorder")] +pub mod OperationRecorder; +#[cfg(feature = "Win32_Storage_Packaging")] +pub mod Packaging; +#[cfg(feature = "Win32_Storage_ProjectedFileSystem")] +pub mod ProjectedFileSystem; +#[cfg(feature = "Win32_Storage_StructuredStorage")] +pub mod StructuredStorage; +#[cfg(feature = "Win32_Storage_Vhd")] +pub mod Vhd; +#[cfg(feature = "Win32_Storage_Xps")] +pub mod Xps; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/System/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/System/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..8c27b68668b3fa248c3d71589709bcafb42cac78 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/System/mod.rs @@ -0,0 +1,132 @@ +#[cfg(feature = "Win32_System_AddressBook")] +pub mod AddressBook; +#[cfg(feature = "Win32_System_Antimalware")] +pub mod Antimalware; +#[cfg(feature = "Win32_System_ApplicationInstallationAndServicing")] +pub mod ApplicationInstallationAndServicing; +#[cfg(feature = "Win32_System_ApplicationVerifier")] +pub mod ApplicationVerifier; +#[cfg(feature = "Win32_System_ClrHosting")] +pub mod ClrHosting; +#[cfg(feature = "Win32_System_Com")] +pub mod Com; +#[cfg(feature = "Win32_System_ComponentServices")] +pub mod ComponentServices; +#[cfg(feature = "Win32_System_Console")] +pub mod Console; +#[cfg(feature = "Win32_System_CorrelationVector")] +pub mod CorrelationVector; +#[cfg(feature = "Win32_System_DataExchange")] +pub mod DataExchange; +#[cfg(feature = "Win32_System_DeploymentServices")] +pub mod DeploymentServices; +#[cfg(feature = "Win32_System_DeveloperLicensing")] +pub mod DeveloperLicensing; +#[cfg(feature = "Win32_System_Diagnostics")] +pub mod Diagnostics; +#[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] +pub mod DistributedTransactionCoordinator; +#[cfg(feature = "Win32_System_Environment")] +pub mod Environment; +#[cfg(feature = "Win32_System_ErrorReporting")] +pub mod ErrorReporting; +#[cfg(feature = "Win32_System_EventCollector")] +pub mod EventCollector; +#[cfg(feature = "Win32_System_EventLog")] +pub mod EventLog; +#[cfg(feature = "Win32_System_EventNotificationService")] +pub mod EventNotificationService; +#[cfg(feature = "Win32_System_GroupPolicy")] +pub mod GroupPolicy; +#[cfg(feature = "Win32_System_HostCompute")] +pub mod HostCompute; +#[cfg(feature = "Win32_System_HostComputeNetwork")] +pub mod HostComputeNetwork; +#[cfg(feature = "Win32_System_HostComputeSystem")] +pub mod HostComputeSystem; +#[cfg(feature = "Win32_System_Hypervisor")] +pub mod Hypervisor; +#[cfg(feature = "Win32_System_IO")] +pub mod IO; +#[cfg(feature = "Win32_System_Iis")] +pub mod Iis; +#[cfg(feature = "Win32_System_Ioctl")] +pub mod Ioctl; +#[cfg(feature = "Win32_System_JobObjects")] +pub mod JobObjects; +#[cfg(feature = "Win32_System_Js")] +pub mod Js; +#[cfg(feature = "Win32_System_Kernel")] +pub mod Kernel; +#[cfg(feature = "Win32_System_LibraryLoader")] +pub mod LibraryLoader; +#[cfg(feature = "Win32_System_Mailslots")] +pub mod Mailslots; +#[cfg(feature = "Win32_System_Mapi")] +pub mod Mapi; +#[cfg(feature = "Win32_System_Memory")] +pub mod Memory; +#[cfg(feature = "Win32_System_MessageQueuing")] +pub mod MessageQueuing; +#[cfg(feature = "Win32_System_MixedReality")] +pub mod MixedReality; +#[cfg(feature = "Win32_System_Ole")] +pub mod Ole; +#[cfg(feature = "Win32_System_PasswordManagement")] +pub mod PasswordManagement; +#[cfg(feature = "Win32_System_Performance")] +pub mod Performance; +#[cfg(feature = "Win32_System_Pipes")] +pub mod Pipes; +#[cfg(feature = "Win32_System_Power")] +pub mod Power; +#[cfg(feature = "Win32_System_ProcessStatus")] +pub mod ProcessStatus; +#[cfg(feature = "Win32_System_Recovery")] +pub mod Recovery; +#[cfg(feature = "Win32_System_Registry")] +pub mod Registry; +#[cfg(feature = "Win32_System_RemoteDesktop")] +pub mod RemoteDesktop; +#[cfg(feature = "Win32_System_RemoteManagement")] +pub mod RemoteManagement; +#[cfg(feature = "Win32_System_RestartManager")] +pub mod RestartManager; +#[cfg(feature = "Win32_System_Restore")] +pub mod Restore; +#[cfg(feature = "Win32_System_Rpc")] +pub mod Rpc; +#[cfg(feature = "Win32_System_Search")] +pub mod Search; +#[cfg(feature = "Win32_System_SecurityCenter")] +pub mod SecurityCenter; +#[cfg(feature = "Win32_System_Services")] +pub mod Services; +#[cfg(feature = "Win32_System_SetupAndMigration")] +pub mod SetupAndMigration; +#[cfg(feature = "Win32_System_Shutdown")] +pub mod Shutdown; +#[cfg(feature = "Win32_System_StationsAndDesktops")] +pub mod StationsAndDesktops; +#[cfg(feature = "Win32_System_SubsystemForLinux")] +pub mod SubsystemForLinux; +#[cfg(feature = "Win32_System_SystemInformation")] +pub mod SystemInformation; +#[cfg(feature = "Win32_System_SystemServices")] +pub mod SystemServices; +#[cfg(feature = "Win32_System_Threading")] +pub mod Threading; +#[cfg(feature = "Win32_System_Time")] +pub mod Time; +#[cfg(feature = "Win32_System_TpmBaseServices")] +pub mod TpmBaseServices; +#[cfg(feature = "Win32_System_UserAccessLogging")] +pub mod UserAccessLogging; +#[cfg(feature = "Win32_System_Variant")] +pub mod Variant; +#[cfg(feature = "Win32_System_VirtualDosMachines")] +pub mod VirtualDosMachines; +#[cfg(feature = "Win32_System_WindowsProgramming")] +pub mod WindowsProgramming; +#[cfg(feature = "Win32_System_Wmi")] +pub mod Wmi; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Accessibility/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Accessibility/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..1aae300cde2670d0e929417151f926efde168453 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Accessibility/mod.rs @@ -0,0 +1,1916 @@ +windows_link::link!("oleacc.dll" "system" fn AccNotifyTouchInteraction(hwndapp : super::super::Foundation:: HWND, hwndtarget : super::super::Foundation:: HWND, pttarget : super::super::Foundation:: POINT) -> windows_sys::core::HRESULT); +windows_link::link!("oleacc.dll" "system" fn AccSetRunningUtilityState(hwndapp : super::super::Foundation:: HWND, dwutilitystatemask : u32, dwutilitystate : ACC_UTILITY_STATE_FLAGS) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("oleacc.dll" "system" fn AccessibleChildren(pacccontainer : * mut core::ffi::c_void, ichildstart : i32, cchildren : i32, rgvarchildren : *mut super::super::System::Variant:: VARIANT, pcobtained : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("oleacc.dll" "system" fn AccessibleObjectFromEvent(hwnd : super::super::Foundation:: HWND, dwid : u32, dwchildid : u32, ppacc : *mut * mut core::ffi::c_void, pvarchild : *mut super::super::System::Variant:: VARIANT) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("oleacc.dll" "system" fn AccessibleObjectFromPoint(ptscreen : super::super::Foundation:: POINT, ppacc : *mut * mut core::ffi::c_void, pvarchild : *mut super::super::System::Variant:: VARIANT) -> windows_sys::core::HRESULT); +windows_link::link!("oleacc.dll" "system" fn AccessibleObjectFromWindow(hwnd : super::super::Foundation:: HWND, dwid : u32, riid : *const windows_sys::core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("oleacc.dll" "system" fn CreateStdAccessibleObject(hwnd : super::super::Foundation:: HWND, idobject : i32, riid : *const windows_sys::core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("oleacc.dll" "system" fn CreateStdAccessibleProxyA(hwnd : super::super::Foundation:: HWND, pclassname : windows_sys::core::PCSTR, idobject : i32, riid : *const windows_sys::core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("oleacc.dll" "system" fn CreateStdAccessibleProxyW(hwnd : super::super::Foundation:: HWND, pclassname : windows_sys::core::PCWSTR, idobject : i32, riid : *const windows_sys::core::GUID, ppvobject : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn DockPattern_SetDockPosition(hobj : HUIAPATTERNOBJECT, dockposition : DockPosition) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn ExpandCollapsePattern_Collapse(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn ExpandCollapsePattern_Expand(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("oleacc.dll" "system" fn GetOleaccVersionInfo(pver : *mut u32, pbuild : *mut u32)); +windows_link::link!("oleacc.dll" "system" fn GetRoleTextA(lrole : u32, lpszrole : windows_sys::core::PSTR, cchrolemax : u32) -> u32); +windows_link::link!("oleacc.dll" "system" fn GetRoleTextW(lrole : u32, lpszrole : windows_sys::core::PWSTR, cchrolemax : u32) -> u32); +windows_link::link!("oleacc.dll" "system" fn GetStateTextA(lstatebit : u32, lpszstate : windows_sys::core::PSTR, cchstate : u32) -> u32); +windows_link::link!("oleacc.dll" "system" fn GetStateTextW(lstatebit : u32, lpszstate : windows_sys::core::PWSTR, cchstate : u32) -> u32); +windows_link::link!("uiautomationcore.dll" "system" fn GridPattern_GetItem(hobj : HUIAPATTERNOBJECT, row : i32, column : i32, presult : *mut HUIANODE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn InvokePattern_Invoke(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn IsWinEventHookInstalled(event : u32) -> windows_sys::core::BOOL); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn ItemContainerPattern_FindItemByProperty(hobj : HUIAPATTERNOBJECT, hnodestartafter : HUIANODE, propertyid : i32, value : super::super::System::Variant:: VARIANT, pfound : *mut HUIANODE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_DoDefaultAction(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_GetIAccessible(hobj : HUIAPATTERNOBJECT, paccessible : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_Select(hobj : HUIAPATTERNOBJECT, flagsselect : i32) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn LegacyIAccessiblePattern_SetValue(hobj : HUIAPATTERNOBJECT, szvalue : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +windows_link::link!("oleacc.dll" "system" fn LresultFromObject(riid : *const windows_sys::core::GUID, wparam : super::super::Foundation:: WPARAM, punk : * mut core::ffi::c_void) -> super::super::Foundation:: LRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn MultipleViewPattern_GetViewName(hobj : HUIAPATTERNOBJECT, viewid : i32, ppstr : *mut windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn MultipleViewPattern_SetCurrentView(hobj : HUIAPATTERNOBJECT, viewid : i32) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn NotifyWinEvent(event : u32, hwnd : super::super::Foundation:: HWND, idobject : i32, idchild : i32)); +windows_link::link!("oleacc.dll" "system" fn ObjectFromLresult(lresult : super::super::Foundation:: LRESULT, riid : *const windows_sys::core::GUID, wparam : super::super::Foundation:: WPARAM, ppvobject : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn RangeValuePattern_SetValue(hobj : HUIAPATTERNOBJECT, val : f64) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn RegisterPointerInputTarget(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn RegisterPointerInputTargetEx(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE, fobserve : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("uiautomationcore.dll" "system" fn ScrollItemPattern_ScrollIntoView(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn ScrollPattern_Scroll(hobj : HUIAPATTERNOBJECT, horizontalamount : ScrollAmount, verticalamount : ScrollAmount) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn ScrollPattern_SetScrollPercent(hobj : HUIAPATTERNOBJECT, horizontalpercent : f64, verticalpercent : f64) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn SelectionItemPattern_AddToSelection(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn SelectionItemPattern_RemoveFromSelection(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn SelectionItemPattern_Select(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn SetWinEventHook(eventmin : u32, eventmax : u32, hmodwineventproc : super::super::Foundation:: HMODULE, pfnwineventproc : WINEVENTPROC, idprocess : u32, idthread : u32, dwflags : u32) -> HWINEVENTHOOK); +windows_link::link!("uiautomationcore.dll" "system" fn SynchronizedInputPattern_Cancel(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn SynchronizedInputPattern_StartListening(hobj : HUIAPATTERNOBJECT, inputtype : SynchronizedInputType) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn TextPattern_GetSelection(hobj : HUIAPATTERNOBJECT, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn TextPattern_GetVisibleRanges(hobj : HUIAPATTERNOBJECT, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextPattern_RangeFromChild(hobj : HUIAPATTERNOBJECT, hnodechild : HUIANODE, pretval : *mut HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextPattern_RangeFromPoint(hobj : HUIAPATTERNOBJECT, point : UiaPoint, pretval : *mut HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextPattern_get_DocumentRange(hobj : HUIAPATTERNOBJECT, pretval : *mut HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextPattern_get_SupportedTextSelection(hobj : HUIAPATTERNOBJECT, pretval : *mut SupportedTextSelection) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_AddToSelection(hobj : HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_Clone(hobj : HUIATEXTRANGE, pretval : *mut HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_Compare(hobj : HUIATEXTRANGE, range : HUIATEXTRANGE, pretval : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_CompareEndpoints(hobj : HUIATEXTRANGE, endpoint : TextPatternRangeEndpoint, targetrange : HUIATEXTRANGE, targetendpoint : TextPatternRangeEndpoint, pretval : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_ExpandToEnclosingUnit(hobj : HUIATEXTRANGE, unit : TextUnit) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_FindAttribute(hobj : HUIATEXTRANGE, attributeid : i32, val : super::super::System::Variant:: VARIANT, backward : windows_sys::core::BOOL, pretval : *mut HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_FindText(hobj : HUIATEXTRANGE, text : windows_sys::core::BSTR, backward : windows_sys::core::BOOL, ignorecase : windows_sys::core::BOOL, pretval : *mut HUIATEXTRANGE) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_GetAttributeValue(hobj : HUIATEXTRANGE, attributeid : i32, pretval : *mut super::super::System::Variant:: VARIANT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_GetBoundingRectangles(hobj : HUIATEXTRANGE, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_GetChildren(hobj : HUIATEXTRANGE, pretval : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_GetEnclosingElement(hobj : HUIATEXTRANGE, pretval : *mut HUIANODE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_GetText(hobj : HUIATEXTRANGE, maxlength : i32, pretval : *mut windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_Move(hobj : HUIATEXTRANGE, unit : TextUnit, count : i32, pretval : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_MoveEndpointByRange(hobj : HUIATEXTRANGE, endpoint : TextPatternRangeEndpoint, targetrange : HUIATEXTRANGE, targetendpoint : TextPatternRangeEndpoint) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_MoveEndpointByUnit(hobj : HUIATEXTRANGE, endpoint : TextPatternRangeEndpoint, unit : TextUnit, count : i32, pretval : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_RemoveFromSelection(hobj : HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_ScrollIntoView(hobj : HUIATEXTRANGE, aligntotop : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TextRange_Select(hobj : HUIATEXTRANGE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TogglePattern_Toggle(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TransformPattern_Move(hobj : HUIAPATTERNOBJECT, x : f64, y : f64) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TransformPattern_Resize(hobj : HUIAPATTERNOBJECT, width : f64, height : f64) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn TransformPattern_Rotate(hobj : HUIAPATTERNOBJECT, degrees : f64) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaAddEvent(hnode : HUIANODE, eventid : i32, pcallback : *mut UiaEventCallback, scope : TreeScope, pproperties : *mut i32, cproperties : i32, prequest : *mut UiaCacheRequest, phevent : *mut HUIAEVENT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaClientsAreListening() -> windows_sys::core::BOOL); +windows_link::link!("uiautomationcore.dll" "system" fn UiaDisconnectAllProviders() -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaDisconnectProvider(pprovider : * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaEventAddWindow(hevent : HUIAEVENT, hwnd : super::super::Foundation:: HWND) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaEventRemoveWindow(hevent : HUIAEVENT, hwnd : super::super::Foundation:: HWND) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaFind(hnode : HUIANODE, pparams : *mut UiaFindParams, prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, ppoffsets : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructures : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetErrorDescription(pdescription : *mut windows_sys::core::BSTR) -> windows_sys::core::BOOL); +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetPatternProvider(hnode : HUIANODE, patternid : i32, phobj : *mut HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetPropertyValue(hnode : HUIANODE, propertyid : i32, pvalue : *mut super::super::System::Variant:: VARIANT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetReservedMixedAttributeValue(punkmixedattributevalue : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetReservedNotSupportedValue(punknotsupportedvalue : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetRootNode(phnode : *mut HUIANODE) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetRuntimeId(hnode : HUIANODE, pruntimeid : *mut *mut super::super::System::Com:: SAFEARRAY) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaGetUpdatedCache(hnode : HUIANODE, prequest : *mut UiaCacheRequest, normalizestate : NormalizeState, pnormalizecondition : *mut UiaCondition, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn UiaHPatternObjectFromVariant(pvar : *mut super::super::System::Variant:: VARIANT, phobj : *mut HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn UiaHTextRangeFromVariant(pvar : *mut super::super::System::Variant:: VARIANT, phtextrange : *mut HUIATEXTRANGE) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn UiaHUiaNodeFromVariant(pvar : *mut super::super::System::Variant:: VARIANT, phnode : *mut HUIANODE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaHasServerSideProvider(hwnd : super::super::Foundation:: HWND) -> windows_sys::core::BOOL); +windows_link::link!("uiautomationcore.dll" "system" fn UiaHostProviderFromHwnd(hwnd : super::super::Foundation:: HWND, ppprovider : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn UiaIAccessibleFromProvider(pprovider : * mut core::ffi::c_void, dwflags : u32, ppaccessible : *mut * mut core::ffi::c_void, pvarchild : *mut super::super::System::Variant:: VARIANT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaLookupId(r#type : AutomationIdentifierType, pguid : *const windows_sys::core::GUID) -> i32); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaNavigate(hnode : HUIANODE, direction : NavigateDirection, pcondition : *mut UiaCondition, prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaNodeFromFocus(prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaNodeFromHandle(hwnd : super::super::Foundation:: HWND, phnode : *mut HUIANODE) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaNodeFromPoint(x : f64, y : f64, prequest : *mut UiaCacheRequest, pprequesteddata : *mut *mut super::super::System::Com:: SAFEARRAY, pptreestructure : *mut windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaNodeFromProvider(pprovider : * mut core::ffi::c_void, phnode : *mut HUIANODE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaNodeRelease(hnode : HUIANODE) -> windows_sys::core::BOOL); +windows_link::link!("uiautomationcore.dll" "system" fn UiaPatternRelease(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::BOOL); +windows_link::link!("uiautomationcore.dll" "system" fn UiaProviderForNonClient(hwnd : super::super::Foundation:: HWND, idobject : i32, idchild : i32, ppprovider : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaProviderFromIAccessible(paccessible : * mut core::ffi::c_void, idchild : i32, dwflags : u32, ppprovider : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseActiveTextPositionChangedEvent(provider : * mut core::ffi::c_void, textrange : * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseAsyncContentLoadedEvent(pprovider : * mut core::ffi::c_void, asynccontentloadedstate : AsyncContentLoadedState, percentcomplete : f64) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseAutomationEvent(pprovider : * mut core::ffi::c_void, id : UIA_EVENT_ID) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseAutomationPropertyChangedEvent(pprovider : * mut core::ffi::c_void, id : UIA_PROPERTY_ID, oldvalue : super::super::System::Variant:: VARIANT, newvalue : super::super::System::Variant:: VARIANT) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseChangesEvent(pprovider : * mut core::ffi::c_void, eventidcount : i32, puiachanges : *mut UiaChangeInfo) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseNotificationEvent(provider : * mut core::ffi::c_void, notificationkind : NotificationKind, notificationprocessing : NotificationProcessing, displaystring : windows_sys::core::BSTR, activityid : windows_sys::core::BSTR) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseStructureChangedEvent(pprovider : * mut core::ffi::c_void, structurechangetype : StructureChangeType, pruntimeid : *mut i32, cruntimeidlen : i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaRaiseTextEditTextChangedEvent(pprovider : * mut core::ffi::c_void, texteditchangetype : TextEditChangeType, pchangeddata : *mut super::super::System::Com:: SAFEARRAY) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("uiautomationcore.dll" "system" fn UiaRegisterProviderCallback(pcallback : *mut UiaProviderCallback)); +windows_link::link!("uiautomationcore.dll" "system" fn UiaRemoveEvent(hevent : HUIAEVENT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaReturnRawElementProvider(hwnd : super::super::Foundation:: HWND, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, el : * mut core::ffi::c_void) -> super::super::Foundation:: LRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaSetFocus(hnode : HUIANODE) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn UiaTextRangeRelease(hobj : HUIATEXTRANGE) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn UnhookWinEvent(hwineventhook : HWINEVENTHOOK) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn UnregisterPointerInputTarget(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn UnregisterPointerInputTargetEx(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> windows_sys::core::BOOL); +windows_link::link!("uiautomationcore.dll" "system" fn ValuePattern_SetValue(hobj : HUIAPATTERNOBJECT, pval : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn VirtualizedItemPattern_Realize(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("oleacc.dll" "system" fn WindowFromAccessibleObject(param0 : * mut core::ffi::c_void, phwnd : *mut super::super::Foundation:: HWND) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn WindowPattern_Close(hobj : HUIAPATTERNOBJECT) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn WindowPattern_SetWindowVisualState(hobj : HUIAPATTERNOBJECT, state : WindowVisualState) -> windows_sys::core::HRESULT); +windows_link::link!("uiautomationcore.dll" "system" fn WindowPattern_WaitForInputIdle(hobj : HUIAPATTERNOBJECT, milliseconds : i32, presult : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct ACCESSTIMEOUT { + pub cbSize: u32, + pub dwFlags: u32, + pub iTimeOutMSec: u32, +} +pub type ACC_UTILITY_STATE_FLAGS = u32; +pub const ANNO_CONTAINER: AnnoScope = 1i32; +pub const ANNO_THIS: AnnoScope = 0i32; +pub const ANRUS_ON_SCREEN_KEYBOARD_ACTIVE: ACC_UTILITY_STATE_FLAGS = 1u32; +pub const ANRUS_PRIORITY_AUDIO_ACTIVE: ACC_UTILITY_STATE_FLAGS = 4u32; +pub const ANRUS_PRIORITY_AUDIO_ACTIVE_NODUCK: ACC_UTILITY_STATE_FLAGS = 8u32; +pub const ANRUS_PRIORITY_AUDIO_DYNAMIC_DUCK: u32 = 16u32; +pub const ANRUS_TOUCH_MODIFICATION_ACTIVE: ACC_UTILITY_STATE_FLAGS = 2u32; +pub const AcceleratorKey_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x514865df_2557_4cb9_aeed_6ced084ce52c); +pub const AccessKey_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x06827b12_a7f9_4a15_917c_ffa5ad3eb0a7); +pub type ActiveEnd = i32; +pub const ActiveEnd_End: ActiveEnd = 2i32; +pub const ActiveEnd_None: ActiveEnd = 0i32; +pub const ActiveEnd_Start: ActiveEnd = 1i32; +pub const ActiveTextPositionChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa5c09e9c_c77d_4f25_b491_e5bb7017cbd4); +pub type AnimationStyle = i32; +pub const AnimationStyle_BlinkingBackground: AnimationStyle = 2i32; +pub const AnimationStyle_LasVegasLights: AnimationStyle = 1i32; +pub const AnimationStyle_MarchingBlackAnts: AnimationStyle = 4i32; +pub const AnimationStyle_MarchingRedAnts: AnimationStyle = 5i32; +pub const AnimationStyle_None: AnimationStyle = 0i32; +pub const AnimationStyle_Other: AnimationStyle = -1i32; +pub const AnimationStyle_Shimmer: AnimationStyle = 6i32; +pub const AnimationStyle_SparkleText: AnimationStyle = 3i32; +pub type AnnoScope = i32; +pub const AnnotationObjects_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x310910c8_7c6e_4f20_becd_4aaf6d191156); +pub const AnnotationType_AdvancedProofingIssue: UIA_ANNOTATIONTYPE = 60020i32; +pub const AnnotationType_Author: UIA_ANNOTATIONTYPE = 60019i32; +pub const AnnotationType_CircularReferenceError: UIA_ANNOTATIONTYPE = 60022i32; +pub const AnnotationType_Comment: UIA_ANNOTATIONTYPE = 60003i32; +pub const AnnotationType_ConflictingChange: UIA_ANNOTATIONTYPE = 60018i32; +pub const AnnotationType_DataValidationError: UIA_ANNOTATIONTYPE = 60021i32; +pub const AnnotationType_DeletionChange: UIA_ANNOTATIONTYPE = 60012i32; +pub const AnnotationType_EditingLockedChange: UIA_ANNOTATIONTYPE = 60016i32; +pub const AnnotationType_Endnote: UIA_ANNOTATIONTYPE = 60009i32; +pub const AnnotationType_ExternalChange: UIA_ANNOTATIONTYPE = 60017i32; +pub const AnnotationType_Footer: UIA_ANNOTATIONTYPE = 60007i32; +pub const AnnotationType_Footnote: UIA_ANNOTATIONTYPE = 60010i32; +pub const AnnotationType_FormatChange: UIA_ANNOTATIONTYPE = 60014i32; +pub const AnnotationType_FormulaError: UIA_ANNOTATIONTYPE = 60004i32; +pub const AnnotationType_GrammarError: UIA_ANNOTATIONTYPE = 60002i32; +pub const AnnotationType_Header: UIA_ANNOTATIONTYPE = 60006i32; +pub const AnnotationType_Highlighted: UIA_ANNOTATIONTYPE = 60008i32; +pub const AnnotationType_InsertionChange: UIA_ANNOTATIONTYPE = 60011i32; +pub const AnnotationType_Mathematics: UIA_ANNOTATIONTYPE = 60023i32; +pub const AnnotationType_MoveChange: UIA_ANNOTATIONTYPE = 60013i32; +pub const AnnotationType_Sensitive: UIA_ANNOTATIONTYPE = 60024i32; +pub const AnnotationType_SpellingError: UIA_ANNOTATIONTYPE = 60001i32; +pub const AnnotationType_TrackChanges: UIA_ANNOTATIONTYPE = 60005i32; +pub const AnnotationType_Unknown: UIA_ANNOTATIONTYPE = 60000i32; +pub const AnnotationType_UnsyncedChange: UIA_ANNOTATIONTYPE = 60015i32; +pub const AnnotationTypes_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x64b71f76_53c4_4696_a219_20e940c9a176); +pub const Annotation_AdvancedProofingIssue_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdac7b72c_c0f2_4b84_b90d_5fafc0f0ef1c); +pub const Annotation_AnnotationTypeId_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x20ae484f_69ef_4c48_8f5b_c4938b206ac7); +pub const Annotation_AnnotationTypeName_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9b818892_5ac9_4af9_aa96_f58a77b058e3); +pub const Annotation_Author_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf161d3a7_f81b_4128_b17f_71f690914520); +pub const Annotation_Author_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7a528462_9c5c_4a03_a974_8b307a9937f2); +pub const Annotation_CircularReferenceError_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x25bd9cf4_1745_4659_ba67_727f0318c616); +pub const Annotation_Comment_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfd2fda30_26b3_4c06_8bc7_98f1532e46fd); +pub const Annotation_ConflictingChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x98af8802_517c_459f_af13_016d3fab877e); +pub const Annotation_Custom_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9ec82750_3931_4952_85bc_1dbff78a43e3); +pub const Annotation_DataValidationError_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc8649fa8_9775_437e_ad46_e709d93c2343); +pub const Annotation_DateTime_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x99b5ca5d_1acf_414b_a4d0_6b350b047578); +pub const Annotation_DeletionChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbe3d5b05_951d_42e7_901d_adc8c2cf34d0); +pub const Annotation_EditingLockedChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc31f3e1c_7423_4dac_8348_41f099ff6f64); +pub const Annotation_Endnote_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7565725c_2d99_4839_960d_33d3b866aba5); +pub const Annotation_ExternalChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x75a05b31_5f11_42fd_887d_dfa010db2392); +pub const Annotation_Footer_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcceab046_1833_47aa_8080_701ed0b0c832); +pub const Annotation_Footnote_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3de10e21_4125_42db_8620_be8083080624); +pub const Annotation_FormatChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xeb247345_d4f1_41ce_8e52_f79b69635e48); +pub const Annotation_FormulaError_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x95611982_0cab_46d5_a2f0_e30d1905f8bf); +pub const Annotation_GrammarError_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x757a048d_4518_41c6_854c_dc009b7cfb53); +pub const Annotation_Header_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x867b409b_b216_4472_a219_525e310681f8); +pub const Annotation_Highlighted_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x757c884e_8083_4081_8b9c_e87f5072f0e4); +pub const Annotation_InsertionChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0dbeb3a6_df15_4164_a3c0_e21a8ce931c4); +pub const Annotation_Mathematics_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xeaab634b_26d0_40c1_8073_57ca1c633c9b); +pub const Annotation_MoveChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9da587eb_23e5_4490_b385_1a22ddc8b187); +pub const Annotation_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf6c72ad7_356c_4850_9291_316f608a8c84); +pub const Annotation_Sensitive_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x37f4c04f_0f12_4464_929c_828fd15292e3); +pub const Annotation_SpellingError_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xae85567e_9ece_423f_81b7_96c43d53e50e); +pub const Annotation_Target_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb71b302d_2104_44ad_9c5c_092b4907d70f); +pub const Annotation_TrackChanges_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x21e6e888_dc14_4016_ac27_190553c8c470); +pub const Annotation_UnsyncedChange_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1851116a_0e47_4b30_8cb5_d7dae4fbcd1b); +pub const AppBar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6114908d_cc02_4d37_875b_b530c7139554); +pub const AriaProperties_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4213678c_e025_4922_beb5_e43ba08e6221); +pub const AriaRole_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdd207b95_be4a_4e0d_b727_63ace94b6916); +pub const Assertive: LiveSetting = 2i32; +pub type AsyncContentLoadedState = i32; +pub const AsyncContentLoadedState_Beginning: AsyncContentLoadedState = 0i32; +pub const AsyncContentLoadedState_Completed: AsyncContentLoadedState = 2i32; +pub const AsyncContentLoadedState_Progress: AsyncContentLoadedState = 1i32; +pub const AsyncContentLoaded_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5fdee11c_d2fa_4fb9_904e_5cbee894d5ef); +pub type AutomationElementMode = i32; +pub const AutomationElementMode_Full: AutomationElementMode = 1i32; +pub const AutomationElementMode_None: AutomationElementMode = 0i32; +pub const AutomationFocusChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb68a1f17_f60d_41a7_a3cc_b05292155fe0); +pub const AutomationId_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc82c0500_b60e_4310_a267_303c531f8ee5); +pub type AutomationIdentifierType = i32; +pub const AutomationIdentifierType_Annotation: AutomationIdentifierType = 6i32; +pub const AutomationIdentifierType_Changes: AutomationIdentifierType = 7i32; +pub const AutomationIdentifierType_ControlType: AutomationIdentifierType = 3i32; +pub const AutomationIdentifierType_Event: AutomationIdentifierType = 2i32; +pub const AutomationIdentifierType_LandmarkType: AutomationIdentifierType = 5i32; +pub const AutomationIdentifierType_Pattern: AutomationIdentifierType = 1i32; +pub const AutomationIdentifierType_Property: AutomationIdentifierType = 0i32; +pub const AutomationIdentifierType_Style: AutomationIdentifierType = 8i32; +pub const AutomationIdentifierType_TextAttribute: AutomationIdentifierType = 4i32; +pub const AutomationPropertyChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2527fba1_8d7a_4630_a4cc_e66315942f52); +pub const BoundingRectangle_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7bbfe8b2_3bfc_48dd_b729_c794b846e9a1); +pub type BulletStyle = i32; +pub const BulletStyle_DashBullet: BulletStyle = 5i32; +pub const BulletStyle_FilledRoundBullet: BulletStyle = 2i32; +pub const BulletStyle_FilledSquareBullet: BulletStyle = 4i32; +pub const BulletStyle_HollowRoundBullet: BulletStyle = 1i32; +pub const BulletStyle_HollowSquareBullet: BulletStyle = 3i32; +pub const BulletStyle_None: BulletStyle = 0i32; +pub const BulletStyle_Other: BulletStyle = -1i32; +pub const Button_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5a78e369_c6a1_4f33_a9d7_79f20d0c788e); +pub const CAccPropServices: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb5f8350b_0548_48b1_a6ee_88bd00b4a5e7); +pub const CLSID_AccPropServices: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb5f8350b_0548_48b1_a6ee_88bd00b4a5e7); +pub const CUIAutomation: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xff48dba4_60ef_4201_aa87_54103eef594e); +pub const CUIAutomation8: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe22ad333_b25f_460c_83d0_0581107395c9); +pub const CUIAutomationRegistrar: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6e29fabf_9977_42d1_8d0e_ca7e61ad87e6); +pub const Calendar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8913eb88_00e5_46bc_8e4e_14a786e165a1); +pub type CapStyle = i32; +pub const CapStyle_AllCap: CapStyle = 2i32; +pub const CapStyle_AllPetiteCaps: CapStyle = 3i32; +pub const CapStyle_None: CapStyle = 0i32; +pub const CapStyle_Other: CapStyle = -1i32; +pub const CapStyle_PetiteCaps: CapStyle = 4i32; +pub const CapStyle_SmallCap: CapStyle = 1i32; +pub const CapStyle_Titling: CapStyle = 6i32; +pub const CapStyle_Unicase: CapStyle = 5i32; +pub type CaretBidiMode = i32; +pub const CaretBidiMode_LTR: CaretBidiMode = 0i32; +pub const CaretBidiMode_RTL: CaretBidiMode = 1i32; +pub type CaretPosition = i32; +pub const CaretPosition_BeginningOfLine: CaretPosition = 2i32; +pub const CaretPosition_EndOfLine: CaretPosition = 1i32; +pub const CaretPosition_Unknown: CaretPosition = 0i32; +pub const CenterPoint_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0cb00c08_540c_4edb_9445_26359ea69785); +pub const Changes_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7df26714_614f_4e05_9488_716c5ba19436); +pub const Changes_Summary_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x313d65a6_e60f_4d62_9861_55afd728d207); +pub const CheckBox_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfb50f922_a3db_49c0_8bc3_06dad55778e2); +pub const ClassName_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x157b7215_894f_4b65_84e2_aac0da08b16b); +pub const ClickablePoint_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0196903b_b203_4818_a9f3_f08e675f2341); +pub type CoalesceEventsOptions = i32; +pub const CoalesceEventsOptions_Disabled: CoalesceEventsOptions = 0i32; +pub const CoalesceEventsOptions_Enabled: CoalesceEventsOptions = 1i32; +pub const ComboBox_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x54cb426c_2f33_4fff_aaa1_aef60dac5deb); +pub type ConditionType = i32; +pub const ConditionType_And: ConditionType = 3i32; +pub const ConditionType_False: ConditionType = 1i32; +pub const ConditionType_Not: ConditionType = 5i32; +pub const ConditionType_Or: ConditionType = 4i32; +pub const ConditionType_Property: ConditionType = 2i32; +pub const ConditionType_True: ConditionType = 0i32; +pub type ConnectionRecoveryBehaviorOptions = i32; +pub const ConnectionRecoveryBehaviorOptions_Disabled: ConnectionRecoveryBehaviorOptions = 0i32; +pub const ConnectionRecoveryBehaviorOptions_Enabled: ConnectionRecoveryBehaviorOptions = 1i32; +pub const ControlType_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xca774fea_28ac_4bc2_94ca_acec6d6c10a3); +pub const ControllerFor_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x51124c8a_a5d2_4f13_9be6_7fa8ba9d3a90); +pub const Culture_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe2d74f27_3d79_4dc2_b88b_3044963a8afb); +pub const CustomNavigation_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xafea938a_621e_4054_bb2c_2f46114dac3f); +pub const Custom_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf29ea0c3_adb7_430a_ba90_e52c7313e6ed); +pub const DISPID_ACC_CHILD: i32 = -5002i32; +pub const DISPID_ACC_CHILDCOUNT: i32 = -5001i32; +pub const DISPID_ACC_DEFAULTACTION: i32 = -5013i32; +pub const DISPID_ACC_DESCRIPTION: i32 = -5005i32; +pub const DISPID_ACC_DODEFAULTACTION: i32 = -5018i32; +pub const DISPID_ACC_FOCUS: i32 = -5011i32; +pub const DISPID_ACC_HELP: i32 = -5008i32; +pub const DISPID_ACC_HELPTOPIC: i32 = -5009i32; +pub const DISPID_ACC_HITTEST: i32 = -5017i32; +pub const DISPID_ACC_KEYBOARDSHORTCUT: i32 = -5010i32; +pub const DISPID_ACC_LOCATION: i32 = -5015i32; +pub const DISPID_ACC_NAME: i32 = -5003i32; +pub const DISPID_ACC_NAVIGATE: i32 = -5016i32; +pub const DISPID_ACC_PARENT: i32 = -5000i32; +pub const DISPID_ACC_ROLE: i32 = -5006i32; +pub const DISPID_ACC_SELECT: i32 = -5014i32; +pub const DISPID_ACC_SELECTION: i32 = -5012i32; +pub const DISPID_ACC_STATE: i32 = -5007i32; +pub const DISPID_ACC_VALUE: i32 = -5004i32; +pub const DataGrid_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x84b783af_d103_4b0a_8415_e73942410f4b); +pub const DataItem_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa0177842_d94f_42a5_814b_6068addc8da5); +pub const DescribedBy_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7c5865b8_9992_40fd_8db0_6bf1d317f998); +pub type DockPosition = i32; +pub const DockPosition_Bottom: DockPosition = 2i32; +pub const DockPosition_Fill: DockPosition = 4i32; +pub const DockPosition_Left: DockPosition = 1i32; +pub const DockPosition_None: DockPosition = 5i32; +pub const DockPosition_Right: DockPosition = 3i32; +pub const DockPosition_Top: DockPosition = 0i32; +pub const Dock_DockPosition_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6d67f02e_c0b0_4b10_b5b9_18d6ecf98760); +pub const Dock_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9cbaa846_83c8_428d_827f_7e6063fe0620); +pub const Document_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3cd6bb6f_6f08_4562_b229_e4e2fc7a9eb4); +pub const Drag_DragCancel_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc3ede6fa_3451_4e0f_9e71_df9c280a4657); +pub const Drag_DragComplete_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x38e96188_ef1f_463e_91ca_3a7792c29caf); +pub const Drag_DragStart_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x883a480b_3aa9_429d_95e4_d9c8d011f0dd); +pub const Drag_DropEffect_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x646f2779_48d3_4b23_8902_4bf100005df3); +pub const Drag_DropEffects_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf5d61156_7ce6_49be_a836_9269dcec920f); +pub const Drag_GrabbedItems_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x77c1562c_7b86_4b21_9ed7_3cefda6f4c43); +pub const Drag_IsGrabbed_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x45f206f3_75cc_4cca_a9b9_fcdfb982d8a2); +pub const Drag_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc0bee21f_ccb3_4fed_995b_114f6e3d2728); +pub const DropTarget_DragEnter_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xaad9319b_032c_4a88_961d_1cf579581e34); +pub const DropTarget_DragLeave_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0f82eb15_24a2_4988_9217_de162aee272b); +pub const DropTarget_DropTargetEffect_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8bb75975_a0ca_4981_b818_87fc66e9509d); +pub const DropTarget_DropTargetEffects_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbc1dd4ed_cb89_45f1_a592_e03b08ae790f); +pub const DropTarget_Dropped_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x622cead8_1edb_4a3d_abbc_be2211ff68b5); +pub const DropTarget_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0bcbec56_bd34_4b7b_9fd5_2659905ea3dc); +pub const Edit_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6504a5c8_2c86_4f87_ae7b_1abddc810cf9); +pub type EventArgsType = i32; +pub const EventArgsType_ActiveTextPositionChanged: EventArgsType = 8i32; +pub const EventArgsType_AsyncContentLoaded: EventArgsType = 3i32; +pub const EventArgsType_Changes: EventArgsType = 6i32; +pub const EventArgsType_Notification: EventArgsType = 7i32; +pub const EventArgsType_PropertyChanged: EventArgsType = 1i32; +pub const EventArgsType_Simple: EventArgsType = 0i32; +pub const EventArgsType_StructureChanged: EventArgsType = 2i32; +pub const EventArgsType_StructuredMarkup: EventArgsType = 9i32; +pub const EventArgsType_TextEditTextChanged: EventArgsType = 5i32; +pub const EventArgsType_WindowClosed: EventArgsType = 4i32; +pub type ExpandCollapseState = i32; +pub const ExpandCollapseState_Collapsed: ExpandCollapseState = 0i32; +pub const ExpandCollapseState_Expanded: ExpandCollapseState = 1i32; +pub const ExpandCollapseState_LeafNode: ExpandCollapseState = 3i32; +pub const ExpandCollapseState_PartiallyExpanded: ExpandCollapseState = 2i32; +pub const ExpandCollapse_ExpandCollapseState_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x275a4c48_85a7_4f69_aba0_af157610002b); +pub const ExpandCollapse_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xae05efa2_f9d1_428a_834c_53a5c52f9b8b); +#[repr(C)] +#[derive(Clone, Copy)] +pub struct ExtendedProperty { + pub PropertyName: windows_sys::core::BSTR, + pub PropertyValue: windows_sys::core::BSTR, +} +impl Default for ExtendedProperty { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct FILTERKEYS { + pub cbSize: u32, + pub dwFlags: u32, + pub iWaitMSec: u32, + pub iDelayMSec: u32, + pub iRepeatMSec: u32, + pub iBounceMSec: u32, +} +pub const FillColor_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6e0ec4d0_e2a8_4a56_9de7_953389933b39); +pub type FillType = i32; +pub const FillType_Color: FillType = 1i32; +pub const FillType_Gradient: FillType = 2i32; +pub const FillType_None: FillType = 0i32; +pub const FillType_Pattern: FillType = 4i32; +pub const FillType_Picture: FillType = 3i32; +pub const FillType_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc6fc74e4_8cb9_429c_a9e1_9bc4ac372b62); +pub type FlowDirections = i32; +pub const FlowDirections_BottomToTop: FlowDirections = 2i32; +pub const FlowDirections_Default: FlowDirections = 0i32; +pub const FlowDirections_RightToLeft: FlowDirections = 1i32; +pub const FlowDirections_Vertical: FlowDirections = 4i32; +pub const FlowsFrom_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x05c6844f_19de_48f8_95fa_880d5b0fd615); +pub const FlowsTo_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe4f33d20_559a_47fb_a830_f9cb4ff1a70a); +pub const FrameworkId_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdbfd9900_7e1a_4f58_b61b_7063120f773b); +pub const FullDescription_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0d4450ff_6aef_4f33_95dd_7befa72a4391); +pub const GridItem_ColumnSpan_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x583ea3f5_86d0_4b08_a6ec_2c5463ffc109); +pub const GridItem_Column_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc774c15c_62c0_4519_8bdc_47be573c8ad5); +pub const GridItem_Parent_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9d912252_b97f_4ecc_8510_ea0e33427c72); +pub const GridItem_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf2d5c877_a462_4957_a2a5_2c96b303bc63); +pub const GridItem_RowSpan_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4582291c_466b_4e93_8e83_3d1715ec0c5e); +pub const GridItem_Row_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6223972a_c945_4563_9329_fdc974af2553); +pub const Grid_ColumnCount_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfe96f375_44aa_4536_ac7a_2a75d71a3efc); +pub const Grid_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x260a2ccb_93a8_4e44_a4c1_3df397f2b02b); +pub const Grid_RowCount_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2a9505bf_c2eb_4fb6_b356_8245ae53703e); +pub const Group_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xad50aa1c_e8c8_4774_ae1b_dd86df0b3bdc); +pub const HCF_AVAILABLE: HIGHCONTRASTW_FLAGS = 2u32; +pub const HCF_CONFIRMHOTKEY: HIGHCONTRASTW_FLAGS = 8u32; +pub const HCF_HIGHCONTRASTON: HIGHCONTRASTW_FLAGS = 1u32; +pub const HCF_HOTKEYACTIVE: HIGHCONTRASTW_FLAGS = 4u32; +pub const HCF_HOTKEYAVAILABLE: HIGHCONTRASTW_FLAGS = 64u32; +pub const HCF_HOTKEYSOUND: HIGHCONTRASTW_FLAGS = 16u32; +pub const HCF_INDICATOR: HIGHCONTRASTW_FLAGS = 32u32; +pub const HCF_OPTION_NOTHEMECHANGE: HIGHCONTRASTW_FLAGS = 4096u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct HIGHCONTRASTA { + pub cbSize: u32, + pub dwFlags: HIGHCONTRASTW_FLAGS, + pub lpszDefaultScheme: windows_sys::core::PSTR, +} +impl Default for HIGHCONTRASTA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct HIGHCONTRASTW { + pub cbSize: u32, + pub dwFlags: HIGHCONTRASTW_FLAGS, + pub lpszDefaultScheme: windows_sys::core::PWSTR, +} +impl Default for HIGHCONTRASTW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type HIGHCONTRASTW_FLAGS = u32; +pub type HUIAEVENT = *mut core::ffi::c_void; +pub type HUIANODE = *mut core::ffi::c_void; +pub type HUIAPATTERNOBJECT = *mut core::ffi::c_void; +pub type HUIATEXTRANGE = *mut core::ffi::c_void; +pub type HWINEVENTHOOK = *mut core::ffi::c_void; +pub const HasKeyboardFocus_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcf8afd39_3f46_4800_9656_b2bf12529905); +pub const HeaderItem_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe6bc12cb_7c8e_49cf_b168_4a93a32bebb0); +pub const Header_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5b90cbce_78fb_4614_82b6_554d74718e67); +pub const HeadingLevel1: UIA_HEADINGLEVEL_ID = 80051i32; +pub const HeadingLevel2: UIA_HEADINGLEVEL_ID = 80052i32; +pub const HeadingLevel3: UIA_HEADINGLEVEL_ID = 80053i32; +pub const HeadingLevel4: UIA_HEADINGLEVEL_ID = 80054i32; +pub const HeadingLevel5: UIA_HEADINGLEVEL_ID = 80055i32; +pub const HeadingLevel6: UIA_HEADINGLEVEL_ID = 80056i32; +pub const HeadingLevel7: UIA_HEADINGLEVEL_ID = 80057i32; +pub const HeadingLevel8: UIA_HEADINGLEVEL_ID = 80058i32; +pub const HeadingLevel9: UIA_HEADINGLEVEL_ID = 80059i32; +pub const HeadingLevel_None: UIA_HEADINGLEVEL_ID = 80050i32; +pub const HeadingLevel_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x29084272_aaaf_4a30_8796_3c12f62b6bbb); +pub const HelpText_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x08555685_0977_45c7_a7a6_abaf5684121a); +pub type HorizontalTextAlignment = i32; +pub const HorizontalTextAlignment_Centered: HorizontalTextAlignment = 1i32; +pub const HorizontalTextAlignment_Justified: HorizontalTextAlignment = 3i32; +pub const HorizontalTextAlignment_Left: HorizontalTextAlignment = 0i32; +pub const HorizontalTextAlignment_Right: HorizontalTextAlignment = 2i32; +pub const HostedFragmentRootsInvalidated_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe6bdb03e_0921_4ec5_8dcf_eae877b0426b); +pub const Hyperlink_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8a56022c_b00d_4d15_8ff0_5b6b266e5e02); +pub const IIS_ControlAccessible: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x38c682a6_9731_43f2_9fae_e901e641b101); +pub const IIS_IsOleaccProxy: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x902697fa_80e4_4560_802a_a13f22a64709); +pub const Image_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2d3736e4_6b16_4c57_a962_f93260a75243); +pub const InputDiscarded_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7f36c367_7b18_417c_97e3_9d58ddc944ab); +pub const InputReachedOtherElement_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xed201d8a_4e6c_415e_a874_2460c9b66ba8); +pub const InputReachedTarget_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x93ed549a_0549_40f0_bedb_28e44f7de2a3); +pub const Invoke_Invoked_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdfd699f0_c915_49dd_b422_dde785c3d24b); +pub const Invoke_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd976c2fc_66ea_4a6e_b28f_c24c7546ad37); +pub const IsAnnotationPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0b5b3238_6d5c_41b6_bcc4_5e807f6551c4); +pub const IsContentElement_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4bda64a8_f5d8_480b_8155_ef2e89adb672); +pub const IsControlElement_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x95f35085_abcc_4afd_a5f4_dbb46c230fdb); +pub const IsCustomNavigationPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8f8e80d4_2351_48e0_874a_54aa7313889a); +pub const IsDataValidForForm_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x445ac684_c3fc_4dd9_acf8_845a579296ba); +pub const IsDialog_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9d0dfb9b_8436_4501_bbbb_e534a4fb3b3f); +pub const IsDockPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2600a4c4_2ff8_4c96_ae31_8fe619a13c6c); +pub const IsDragPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe997a7b7_1d39_4ca7_be0f_277fcf5605cc); +pub const IsDropTargetPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0686b62e_8e19_4aaf_873d_384f6d3b92be); +pub const IsEnabled_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2109427f_da60_4fed_bf1b_264bdce6eb3a); +pub const IsExpandCollapsePatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x929d3806_5287_4725_aa16_222afc63d595); +pub const IsGridItemPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5a43e524_f9a2_4b12_84c8_b48a3efedd34); +pub const IsGridPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5622c26c_f0ef_4f3b_97cb_714c0868588b); +pub const IsInvokePatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4e725738_8364_4679_aa6c_f3f41931f750); +pub const IsItemContainerPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x624b5ca7_fe40_4957_a019_20c4cf11920f); +pub const IsKeyboardFocusable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf7b8552a_0859_4b37_b9cb_51e72092f29f); +pub const IsLegacyIAccessiblePatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd8ebd0c7_929a_4ee7_8d3a_d3d94413027b); +pub const IsMultipleViewPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xff0a31eb_8e25_469d_8d6e_e771a27c1b90); +pub const IsObjectModelPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6b21d89b_2841_412f_8ef2_15ca952318ba); +pub const IsOffscreen_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x03c3d160_db79_42db_a2ef_1c231eede507); +pub const IsPassword_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe8482eb1_687c_497b_bebc_03be53ec1454); +pub const IsPeripheral_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xda758276_7ed5_49d4_8e68_ecc9a2d300dd); +pub const IsRangeValuePatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfda4244a_eb4d_43ff_b5ad_ed36d373ec4c); +pub const IsRequiredForForm_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4f5f43cf_59fb_4bde_a270_602e5e1141e9); +pub const IsScrollItemPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1cad1a05_0927_4b76_97e1_0fcdb209b98a); +pub const IsScrollPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3ebb7b4a_828a_4b57_9d22_2fea1632ed0d); +pub const IsSelectionItemPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8becd62d_0bc3_4109_bee2_8e6715290e68); +pub const IsSelectionPattern2Available_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x490806fb_6e89_4a47_8319_d266e511f021); +pub const IsSelectionPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf588acbe_c769_4838_9a60_2686dc1188c4); +pub const IsSpreadsheetItemPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9fe79b2a_2f94_43fd_996b_549e316f4acd); +pub const IsSpreadsheetPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6ff43732_e4b4_4555_97bc_ecdbbc4d1888); +pub const IsStructuredMarkupPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb0d4c196_2c0b_489c_b165_a405928c6f3d); +pub const IsStylesPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x27f353d3_459c_4b59_a490_50611dacafb5); +pub const IsSynchronizedInputPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x75d69cc5_d2bf_4943_876e_b45b62a6cc66); +pub const IsTableItemPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xeb36b40d_8ea4_489b_a013_e60d5951fe34); +pub const IsTablePatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcb83575f_45c2_4048_9c76_159715a139df); +pub const IsTextChildPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x559e65df_30ff_43b5_b5ed_5b283b80c7e9); +pub const IsTextEditPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7843425c_8b32_484c_9ab5_e3200571ffda); +pub const IsTextPattern2Available_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x41cf921d_e3f1_4b22_9c81_e1c3ed331c22); +pub const IsTextPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfbe2d69d_aff6_4a45_82e2_fc92a82f5917); +pub const IsTogglePatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x78686d53_fcd0_4b83_9b78_5832ce63bb5b); +pub const IsTransformPattern2Available_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x25980b4b_be04_4710_ab4a_fda31dbd2895); +pub const IsTransformPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa7f78804_d68b_4077_a5c6_7a5ea1ac31c5); +pub const IsValuePatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0b5020a7_2119_473b_be37_5ceb98bbfb22); +pub const IsVirtualizedItemPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x302cb151_2ac8_45d6_977b_d2b3a5a53f20); +pub const IsWindowPatternAvailable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe7a57bb1_5888_4155_98dc_b422fd57f2bc); +pub const ItemContainer_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3d13da0f_8b9a_4a99_85fa_c5c9a69f1ed4); +pub const ItemStatus_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x51de0321_3973_43e7_8913_0b08e813c37f); +pub const ItemType_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcdda434d_6222_413b_a68a_325dd1d40f39); +pub const LIBID_Accessibility: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1ea4dbf0_3c3b_11cf_810c_00aa00389b71); +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +pub type LPFNACCESSIBLECHILDREN = Option windows_sys::core::HRESULT>; +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +pub type LPFNACCESSIBLEOBJECTFROMPOINT = Option windows_sys::core::HRESULT>; +pub type LPFNACCESSIBLEOBJECTFROMWINDOW = Option windows_sys::core::HRESULT>; +pub type LPFNCREATESTDACCESSIBLEOBJECT = Option windows_sys::core::HRESULT>; +pub type LPFNLRESULTFROMOBJECT = Option super::super::Foundation::LRESULT>; +pub type LPFNOBJECTFROMLRESULT = Option windows_sys::core::HRESULT>; +pub const LabeledBy_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe5b8924b_fc8a_4a35_8031_cf78ac43e55e); +pub const LandmarkType_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x454045f2_6f61_49f7_a4f8_b5f0cf82da1e); +pub const LayoutInvalidated_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xed7d6544_a6bd_4595_9bae_3d28946cc715); +pub const LegacyIAccessible_ChildId_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9a191b5d_9ef2_4787_a459_dcde885dd4e8); +pub const LegacyIAccessible_DefaultAction_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3b331729_eaad_4502_b85f_92615622913c); +pub const LegacyIAccessible_Description_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x46448418_7d70_4ea9_9d27_b7e775cf2ad7); +pub const LegacyIAccessible_Help_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x94402352_161c_4b77_a98d_a872cc33947a); +pub const LegacyIAccessible_KeyboardShortcut_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8f6909ac_00b8_4259_a41c_966266d43a8a); +pub const LegacyIAccessible_Name_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcaeb063d_40ae_4869_aa5a_1b8e5d666739); +pub const LegacyIAccessible_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x54cc0a9f_3395_48af_ba8d_73f85690f3e0); +pub const LegacyIAccessible_Role_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6856e59f_cbaf_4e31_93e8_bcbf6f7e491c); +pub const LegacyIAccessible_Selection_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8aa8b1e0_0891_40cc_8b06_90d7d4166219); +pub const LegacyIAccessible_State_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdf985854_2281_4340_ab9c_c60e2c5803f6); +pub const LegacyIAccessible_Value_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb5c5b0b6_8217_4a77_97a5_190a85ed0156); +pub const Level_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x242ac529_cd36_400f_aad9_7876ef3af627); +pub const ListItem_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7b3717f2_44d1_4a58_98a8_f12a9b8f78e2); +pub const List_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9b149ee1_7cca_4cfc_9af1_cac7bddd3031); +pub const LiveRegionChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x102d5e90_e6a9_41b6_b1c5_a9b1929d9510); +pub type LiveSetting = i32; +pub const LiveSetting_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc12bcd8e_2a8e_4950_8ae7_3625111d58eb); +pub const LocalizedControlType_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8763404f_a1bd_452a_89c4_3f01d3833806); +pub const LocalizedLandmarkType_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7ac81980_eafb_4fb2_bf91_f485bef5e8e1); +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct MOUSEKEYS { + pub cbSize: u32, + pub dwFlags: u32, + pub iMaxSpeed: u32, + pub iTimeToMaxSpeed: u32, + pub iCtrlSpeed: u32, + pub dwReserved1: u32, + pub dwReserved2: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MSAAMENUINFO { + pub dwMSAASignature: u32, + pub cchWText: u32, + pub pszWText: windows_sys::core::PWSTR, +} +impl Default for MSAAMENUINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const MSAA_MENU_SIG: i32 = -1441927155i32; +pub const MenuBar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcc384250_0e7b_4ae8_95ae_a08f261b52ee); +pub const MenuClosed_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3cf1266e_1582_4041_acd7_88a35a965297); +pub const MenuItem_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf45225d3_d0a0_49d8_9834_9a000d2aeddc); +pub const MenuModeEnd_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9ecd4c9f_80dd_47b8_8267_5aec06bb2cff); +pub const MenuModeStart_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x18d7c631_166a_4ac9_ae3b_ef4b5420e681); +pub const MenuOpened_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xebe2e945_66ca_4ed1_9ff8_2ad7df0a1b08); +pub const Menu_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2e9b1440_0ea8_41fd_b374_c1ea6f503cd1); +pub const MultipleView_CurrentView_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7a81a67a_b94f_4875_918b_65c8d2f998e5); +pub const MultipleView_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x547a6ae4_113f_47c4_850f_db4dfa466b1d); +pub const MultipleView_SupportedViews_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8d5db9fd_ce3c_4ae7_b788_400a3c645547); +pub const NAVDIR_DOWN: u32 = 2u32; +pub const NAVDIR_FIRSTCHILD: u32 = 7u32; +pub const NAVDIR_LASTCHILD: u32 = 8u32; +pub const NAVDIR_LEFT: u32 = 3u32; +pub const NAVDIR_MAX: u32 = 9u32; +pub const NAVDIR_MIN: u32 = 0u32; +pub const NAVDIR_NEXT: u32 = 5u32; +pub const NAVDIR_PREVIOUS: u32 = 6u32; +pub const NAVDIR_RIGHT: u32 = 4u32; +pub const NAVDIR_UP: u32 = 1u32; +pub const Name_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc3a6921b_4a99_44f1_bca6_61187052c431); +pub type NavigateDirection = i32; +pub const NavigateDirection_FirstChild: NavigateDirection = 3i32; +pub const NavigateDirection_LastChild: NavigateDirection = 4i32; +pub const NavigateDirection_NextSibling: NavigateDirection = 1i32; +pub const NavigateDirection_Parent: NavigateDirection = 0i32; +pub const NavigateDirection_PreviousSibling: NavigateDirection = 2i32; +pub const NewNativeWindowHandle_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5196b33b_380a_4982_95e1_91f3ef60e024); +pub type NormalizeState = i32; +pub const NormalizeState_Custom: NormalizeState = 2i32; +pub const NormalizeState_None: NormalizeState = 0i32; +pub const NormalizeState_View: NormalizeState = 1i32; +pub type NotificationKind = i32; +pub const NotificationKind_ActionAborted: NotificationKind = 3i32; +pub const NotificationKind_ActionCompleted: NotificationKind = 2i32; +pub const NotificationKind_ItemAdded: NotificationKind = 0i32; +pub const NotificationKind_ItemRemoved: NotificationKind = 1i32; +pub const NotificationKind_Other: NotificationKind = 4i32; +pub type NotificationProcessing = i32; +pub const NotificationProcessing_All: NotificationProcessing = 2i32; +pub const NotificationProcessing_CurrentThenMostRecent: NotificationProcessing = 4i32; +pub const NotificationProcessing_ImportantAll: NotificationProcessing = 0i32; +pub const NotificationProcessing_ImportantMostRecent: NotificationProcessing = 1i32; +pub const NotificationProcessing_MostRecent: NotificationProcessing = 3i32; +pub const Notification_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x72c5a2f7_9788_480f_b8eb_4dee00f6186f); +pub const ObjectModel_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3e04acfe_08fc_47ec_96bc_353fa3b34aa7); +pub const Off: LiveSetting = 0i32; +pub const OptimizeForVisualContent_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6a852250_c75a_4e5d_b858_e381b0f78861); +pub type OrientationType = i32; +pub const OrientationType_Horizontal: OrientationType = 1i32; +pub const OrientationType_None: OrientationType = 0i32; +pub const OrientationType_Vertical: OrientationType = 2i32; +pub const Orientation_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa01eee62_3884_4415_887e_678ec21e39ba); +pub const OutlineColor_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc395d6c0_4b55_4762_a073_fd303a634f52); +pub type OutlineStyles = i32; +pub const OutlineStyles_Embossed: OutlineStyles = 8i32; +pub const OutlineStyles_Engraved: OutlineStyles = 4i32; +pub const OutlineStyles_None: OutlineStyles = 0i32; +pub const OutlineStyles_Outline: OutlineStyles = 1i32; +pub const OutlineStyles_Shadow: OutlineStyles = 2i32; +pub const OutlineThickness_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x13e67cc7_dac2_4888_bdd3_375c62fa9618); +pub const PROPID_ACC_DEFAULTACTION: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x180c072b_c27f_43c7_9922_f63562a4632b); +pub const PROPID_ACC_DESCRIPTION: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4d48dfe4_bd3f_491f_a648_492d6f20c588); +pub const PROPID_ACC_DESCRIPTIONMAP: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1ff1435f_8a14_477b_b226_a0abe279975d); +pub const PROPID_ACC_DODEFAULTACTION: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1ba09523_2e3b_49a6_a059_59682a3c48fd); +pub const PROPID_ACC_FOCUS: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6eb335df_1c29_4127_b12c_dee9fd157f2b); +pub const PROPID_ACC_HELP: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc831e11f_44db_4a99_9768_cb8f978b7231); +pub const PROPID_ACC_HELPTOPIC: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x787d1379_8ede_440b_8aec_11f7bf9030b3); +pub const PROPID_ACC_KEYBOARDSHORTCUT: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7d9bceee_7d1e_4979_9382_5180f4172c34); +pub const PROPID_ACC_NAME: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x608d3df8_8128_4aa7_a428_f55e49267291); +pub const PROPID_ACC_NAV_DOWN: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x031670ed_3cdf_48d2_9613_138f2dd8a668); +pub const PROPID_ACC_NAV_FIRSTCHILD: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcfd02558_557b_4c67_84f9_2a09fce40749); +pub const PROPID_ACC_NAV_LASTCHILD: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x302ecaa5_48d5_4f8d_b671_1a8d20a77832); +pub const PROPID_ACC_NAV_LEFT: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x228086cb_82f1_4a39_8705_dcdc0fff92f5); +pub const PROPID_ACC_NAV_NEXT: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1cdc5455_8cd9_4c92_a371_3939a2fe3eee); +pub const PROPID_ACC_NAV_PREV: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x776d3891_c73b_4480_b3f6_076a16a15af6); +pub const PROPID_ACC_NAV_RIGHT: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcd211d9f_e1cb_4fe5_a77c_920b884d095b); +pub const PROPID_ACC_NAV_UP: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x016e1a2b_1a4e_4767_8612_3386f66935ec); +pub const PROPID_ACC_PARENT: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x474c22b6_ffc2_467a_b1b5_e958b4657330); +pub const PROPID_ACC_ROLE: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcb905ff2_7bd1_4c05_b3c8_e6c241364d70); +pub const PROPID_ACC_ROLEMAP: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf79acda2_140d_4fe6_8914_208476328269); +pub const PROPID_ACC_SELECTION: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb99d073c_d731_405b_9061_d95e8f842984); +pub const PROPID_ACC_STATE: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa8d4d5b0_0a21_42d0_a5c0_514e984f457b); +pub const PROPID_ACC_STATEMAP: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x43946c5e_0ac0_4042_b525_07bbdbe17fa7); +pub const PROPID_ACC_VALUE: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x123fe443_211a_4615_9527_c45a7e93717a); +pub const PROPID_ACC_VALUEMAP: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xda1c3d79_fc5c_420e_b399_9d1533549e75); +pub const Pane_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5c2b3f5b_9182_42a3_8dec_8c04c1ee634d); +pub const Polite: LiveSetting = 1i32; +pub const PositionInSet_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x33d1dc54_641e_4d76_a6b1_13f341c1f896); +pub const ProcessId_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x40499998_9c31_4245_a403_87320e59eaf6); +pub const ProgressBar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x228c9f86_c36c_47bb_9fb6_a5834bfc53a4); +pub type PropertyConditionFlags = i32; +pub const PropertyConditionFlags_IgnoreCase: PropertyConditionFlags = 1i32; +pub const PropertyConditionFlags_MatchSubstring: PropertyConditionFlags = 2i32; +pub const PropertyConditionFlags_None: PropertyConditionFlags = 0i32; +pub const ProviderDescription_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdca5708a_c16b_4cd9_b889_beb16a804904); +pub type ProviderOptions = i32; +pub const ProviderOptions_ClientSideProvider: ProviderOptions = 1i32; +pub const ProviderOptions_HasNativeIAccessible: ProviderOptions = 128i32; +pub const ProviderOptions_NonClientAreaProvider: ProviderOptions = 4i32; +pub const ProviderOptions_OverrideProvider: ProviderOptions = 8i32; +pub const ProviderOptions_ProviderOwnsSetFocus: ProviderOptions = 16i32; +pub const ProviderOptions_RefuseNonClientSupport: ProviderOptions = 64i32; +pub const ProviderOptions_ServerSideProvider: ProviderOptions = 2i32; +pub const ProviderOptions_UseClientCoordinates: ProviderOptions = 256i32; +pub const ProviderOptions_UseComThreading: ProviderOptions = 32i32; +pub type ProviderType = i32; +pub const ProviderType_BaseHwnd: ProviderType = 0i32; +pub const ProviderType_NonClientArea: ProviderType = 2i32; +pub const ProviderType_Proxy: ProviderType = 1i32; +pub const ROLE_SYSTEM_ALERT: u32 = 8u32; +pub const ROLE_SYSTEM_ANIMATION: u32 = 54u32; +pub const ROLE_SYSTEM_APPLICATION: u32 = 14u32; +pub const ROLE_SYSTEM_BORDER: u32 = 19u32; +pub const ROLE_SYSTEM_BUTTONDROPDOWN: u32 = 56u32; +pub const ROLE_SYSTEM_BUTTONDROPDOWNGRID: u32 = 58u32; +pub const ROLE_SYSTEM_BUTTONMENU: u32 = 57u32; +pub const ROLE_SYSTEM_CARET: u32 = 7u32; +pub const ROLE_SYSTEM_CELL: u32 = 29u32; +pub const ROLE_SYSTEM_CHARACTER: u32 = 32u32; +pub const ROLE_SYSTEM_CHART: u32 = 17u32; +pub const ROLE_SYSTEM_CHECKBUTTON: u32 = 44u32; +pub const ROLE_SYSTEM_CLIENT: u32 = 10u32; +pub const ROLE_SYSTEM_CLOCK: u32 = 61u32; +pub const ROLE_SYSTEM_COLUMN: u32 = 27u32; +pub const ROLE_SYSTEM_COLUMNHEADER: u32 = 25u32; +pub const ROLE_SYSTEM_COMBOBOX: u32 = 46u32; +pub const ROLE_SYSTEM_CURSOR: u32 = 6u32; +pub const ROLE_SYSTEM_DIAGRAM: u32 = 53u32; +pub const ROLE_SYSTEM_DIAL: u32 = 49u32; +pub const ROLE_SYSTEM_DIALOG: u32 = 18u32; +pub const ROLE_SYSTEM_DOCUMENT: u32 = 15u32; +pub const ROLE_SYSTEM_DROPLIST: u32 = 47u32; +pub const ROLE_SYSTEM_EQUATION: u32 = 55u32; +pub const ROLE_SYSTEM_GRAPHIC: u32 = 40u32; +pub const ROLE_SYSTEM_GRIP: u32 = 4u32; +pub const ROLE_SYSTEM_GROUPING: u32 = 20u32; +pub const ROLE_SYSTEM_HELPBALLOON: u32 = 31u32; +pub const ROLE_SYSTEM_HOTKEYFIELD: u32 = 50u32; +pub const ROLE_SYSTEM_INDICATOR: u32 = 39u32; +pub const ROLE_SYSTEM_IPADDRESS: u32 = 63u32; +pub const ROLE_SYSTEM_LINK: u32 = 30u32; +pub const ROLE_SYSTEM_LIST: u32 = 33u32; +pub const ROLE_SYSTEM_LISTITEM: u32 = 34u32; +pub const ROLE_SYSTEM_MENUBAR: u32 = 2u32; +pub const ROLE_SYSTEM_MENUITEM: u32 = 12u32; +pub const ROLE_SYSTEM_MENUPOPUP: u32 = 11u32; +pub const ROLE_SYSTEM_OUTLINE: u32 = 35u32; +pub const ROLE_SYSTEM_OUTLINEBUTTON: u32 = 64u32; +pub const ROLE_SYSTEM_OUTLINEITEM: u32 = 36u32; +pub const ROLE_SYSTEM_PAGETAB: u32 = 37u32; +pub const ROLE_SYSTEM_PAGETABLIST: u32 = 60u32; +pub const ROLE_SYSTEM_PANE: u32 = 16u32; +pub const ROLE_SYSTEM_PROGRESSBAR: u32 = 48u32; +pub const ROLE_SYSTEM_PROPERTYPAGE: u32 = 38u32; +pub const ROLE_SYSTEM_PUSHBUTTON: u32 = 43u32; +pub const ROLE_SYSTEM_RADIOBUTTON: u32 = 45u32; +pub const ROLE_SYSTEM_ROW: u32 = 28u32; +pub const ROLE_SYSTEM_ROWHEADER: u32 = 26u32; +pub const ROLE_SYSTEM_SCROLLBAR: u32 = 3u32; +pub const ROLE_SYSTEM_SEPARATOR: u32 = 21u32; +pub const ROLE_SYSTEM_SLIDER: u32 = 51u32; +pub const ROLE_SYSTEM_SOUND: u32 = 5u32; +pub const ROLE_SYSTEM_SPINBUTTON: u32 = 52u32; +pub const ROLE_SYSTEM_SPLITBUTTON: u32 = 62u32; +pub const ROLE_SYSTEM_STATICTEXT: u32 = 41u32; +pub const ROLE_SYSTEM_STATUSBAR: u32 = 23u32; +pub const ROLE_SYSTEM_TABLE: u32 = 24u32; +pub const ROLE_SYSTEM_TEXT: u32 = 42u32; +pub const ROLE_SYSTEM_TITLEBAR: u32 = 1u32; +pub const ROLE_SYSTEM_TOOLBAR: u32 = 22u32; +pub const ROLE_SYSTEM_TOOLTIP: u32 = 13u32; +pub const ROLE_SYSTEM_WHITESPACE: u32 = 59u32; +pub const ROLE_SYSTEM_WINDOW: u32 = 9u32; +pub const RadioButton_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3bdb49db_fe2c_4483_b3e1_e57f219440c6); +pub const RangeValue_IsReadOnly_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x25fa1055_debf_4373_a79e_1f1a1908d3c4); +pub const RangeValue_LargeChange_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa1f96325_3a3d_4b44_8e1f_4a46d9844019); +pub const RangeValue_Maximum_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x19319914_f979_4b35_a1a6_d37e05433473); +pub const RangeValue_Minimum_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x78cbd3b2_684d_4860_af93_d1f95cb022fd); +pub const RangeValue_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x18b00d87_b1c9_476a_bfbd_5f0bdb926f63); +pub const RangeValue_SmallChange_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x81c2c457_3941_4107_9975_139760f7c072); +pub const RangeValue_Value_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x131f5d98_c50c_489d_abe5_ae220898c5f7); +pub const Rotation_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x767cdc7d_aec0_4110_ad32_30edd403492e); +pub type RowOrColumnMajor = i32; +pub const RowOrColumnMajor_ColumnMajor: RowOrColumnMajor = 1i32; +pub const RowOrColumnMajor_Indeterminate: RowOrColumnMajor = 2i32; +pub const RowOrColumnMajor_RowMajor: RowOrColumnMajor = 0i32; +pub const RuntimeId_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa39eebfa_7fba_4c89_b4d4_b99e2de7d160); +pub const SELFLAG_ADDSELECTION: u32 = 8u32; +pub const SELFLAG_EXTENDSELECTION: u32 = 4u32; +pub const SELFLAG_NONE: u32 = 0u32; +pub const SELFLAG_REMOVESELECTION: u32 = 16u32; +pub const SELFLAG_TAKEFOCUS: u32 = 1u32; +pub const SELFLAG_TAKESELECTION: u32 = 2u32; +pub const SELFLAG_VALID: u32 = 31u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SERIALKEYSA { + pub cbSize: u32, + pub dwFlags: SERIALKEYS_FLAGS, + pub lpszActivePort: windows_sys::core::PSTR, + pub lpszPort: windows_sys::core::PSTR, + pub iBaudRate: u32, + pub iPortState: u32, + pub iActive: u32, +} +impl Default for SERIALKEYSA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SERIALKEYSW { + pub cbSize: u32, + pub dwFlags: SERIALKEYS_FLAGS, + pub lpszActivePort: windows_sys::core::PWSTR, + pub lpszPort: windows_sys::core::PWSTR, + pub iBaudRate: u32, + pub iPortState: u32, + pub iActive: u32, +} +impl Default for SERIALKEYSW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type SERIALKEYS_FLAGS = u32; +pub const SERKF_AVAILABLE: SERIALKEYS_FLAGS = 2u32; +pub const SERKF_INDICATOR: SERIALKEYS_FLAGS = 4u32; +pub const SERKF_SERIALKEYSON: SERIALKEYS_FLAGS = 1u32; +pub const SID_ControlElementProvider: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf4791d68_e254_4ba3_9a53_26a5c5497946); +pub const SID_IsUIAutomationObject: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb96fdb85_7204_4724_842b_c7059dedb9d0); +pub const SKF_AUDIBLEFEEDBACK: STICKYKEYS_FLAGS = 64u32; +pub const SKF_AVAILABLE: STICKYKEYS_FLAGS = 2u32; +pub const SKF_CONFIRMHOTKEY: STICKYKEYS_FLAGS = 8u32; +pub const SKF_HOTKEYACTIVE: STICKYKEYS_FLAGS = 4u32; +pub const SKF_HOTKEYSOUND: STICKYKEYS_FLAGS = 16u32; +pub const SKF_INDICATOR: STICKYKEYS_FLAGS = 32u32; +pub const SKF_LALTLATCHED: STICKYKEYS_FLAGS = 268435456u32; +pub const SKF_LALTLOCKED: STICKYKEYS_FLAGS = 1048576u32; +pub const SKF_LCTLLATCHED: STICKYKEYS_FLAGS = 67108864u32; +pub const SKF_LCTLLOCKED: STICKYKEYS_FLAGS = 262144u32; +pub const SKF_LSHIFTLATCHED: STICKYKEYS_FLAGS = 16777216u32; +pub const SKF_LSHIFTLOCKED: STICKYKEYS_FLAGS = 65536u32; +pub const SKF_LWINLATCHED: STICKYKEYS_FLAGS = 1073741824u32; +pub const SKF_LWINLOCKED: STICKYKEYS_FLAGS = 4194304u32; +pub const SKF_RALTLATCHED: STICKYKEYS_FLAGS = 536870912u32; +pub const SKF_RALTLOCKED: STICKYKEYS_FLAGS = 2097152u32; +pub const SKF_RCTLLATCHED: STICKYKEYS_FLAGS = 134217728u32; +pub const SKF_RCTLLOCKED: STICKYKEYS_FLAGS = 524288u32; +pub const SKF_RSHIFTLATCHED: STICKYKEYS_FLAGS = 33554432u32; +pub const SKF_RSHIFTLOCKED: STICKYKEYS_FLAGS = 131072u32; +pub const SKF_RWINLATCHED: STICKYKEYS_FLAGS = 2147483648u32; +pub const SKF_RWINLOCKED: STICKYKEYS_FLAGS = 8388608u32; +pub const SKF_STICKYKEYSON: STICKYKEYS_FLAGS = 1u32; +pub const SKF_TRISTATE: STICKYKEYS_FLAGS = 128u32; +pub const SKF_TWOKEYSOFF: STICKYKEYS_FLAGS = 256u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SOUNDSENTRYA { + pub cbSize: u32, + pub dwFlags: SOUNDSENTRY_FLAGS, + pub iFSTextEffect: SOUNDSENTRY_TEXT_EFFECT, + pub iFSTextEffectMSec: u32, + pub iFSTextEffectColorBits: u32, + pub iFSGrafEffect: SOUND_SENTRY_GRAPHICS_EFFECT, + pub iFSGrafEffectMSec: u32, + pub iFSGrafEffectColor: u32, + pub iWindowsEffect: SOUNDSENTRY_WINDOWS_EFFECT, + pub iWindowsEffectMSec: u32, + pub lpszWindowsEffectDLL: windows_sys::core::PSTR, + pub iWindowsEffectOrdinal: u32, +} +impl Default for SOUNDSENTRYA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct SOUNDSENTRYW { + pub cbSize: u32, + pub dwFlags: SOUNDSENTRY_FLAGS, + pub iFSTextEffect: SOUNDSENTRY_TEXT_EFFECT, + pub iFSTextEffectMSec: u32, + pub iFSTextEffectColorBits: u32, + pub iFSGrafEffect: SOUND_SENTRY_GRAPHICS_EFFECT, + pub iFSGrafEffectMSec: u32, + pub iFSGrafEffectColor: u32, + pub iWindowsEffect: SOUNDSENTRY_WINDOWS_EFFECT, + pub iWindowsEffectMSec: u32, + pub lpszWindowsEffectDLL: windows_sys::core::PWSTR, + pub iWindowsEffectOrdinal: u32, +} +impl Default for SOUNDSENTRYW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type SOUNDSENTRY_FLAGS = u32; +pub type SOUNDSENTRY_TEXT_EFFECT = u32; +pub type SOUNDSENTRY_WINDOWS_EFFECT = u32; +pub type SOUND_SENTRY_GRAPHICS_EFFECT = u32; +pub const SSF_AVAILABLE: SOUNDSENTRY_FLAGS = 2u32; +pub const SSF_INDICATOR: SOUNDSENTRY_FLAGS = 4u32; +pub const SSF_SOUNDSENTRYON: SOUNDSENTRY_FLAGS = 1u32; +pub const SSGF_DISPLAY: SOUND_SENTRY_GRAPHICS_EFFECT = 3u32; +pub const SSGF_NONE: SOUND_SENTRY_GRAPHICS_EFFECT = 0u32; +pub const SSTF_BORDER: SOUNDSENTRY_TEXT_EFFECT = 2u32; +pub const SSTF_CHARS: SOUNDSENTRY_TEXT_EFFECT = 1u32; +pub const SSTF_DISPLAY: SOUNDSENTRY_TEXT_EFFECT = 3u32; +pub const SSTF_NONE: SOUNDSENTRY_TEXT_EFFECT = 0u32; +pub const SSWF_CUSTOM: SOUNDSENTRY_WINDOWS_EFFECT = 4u32; +pub const SSWF_DISPLAY: SOUNDSENTRY_WINDOWS_EFFECT = 3u32; +pub const SSWF_NONE: SOUNDSENTRY_WINDOWS_EFFECT = 0u32; +pub const SSWF_TITLE: SOUNDSENTRY_WINDOWS_EFFECT = 1u32; +pub const SSWF_WINDOW: SOUNDSENTRY_WINDOWS_EFFECT = 2u32; +pub const STATE_SYSTEM_HASPOPUP: u32 = 1073741824u32; +pub const STATE_SYSTEM_NORMAL: u32 = 0u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct STICKYKEYS { + pub cbSize: u32, + pub dwFlags: STICKYKEYS_FLAGS, +} +pub type STICKYKEYS_FLAGS = u32; +pub type SayAsInterpretAs = i32; +pub const SayAsInterpretAs_Address: SayAsInterpretAs = 11i32; +pub const SayAsInterpretAs_Alphanumeric: SayAsInterpretAs = 12i32; +pub const SayAsInterpretAs_Cardinal: SayAsInterpretAs = 2i32; +pub const SayAsInterpretAs_Currency: SayAsInterpretAs = 8i32; +pub const SayAsInterpretAs_Date: SayAsInterpretAs = 5i32; +pub const SayAsInterpretAs_Date_DayMonth: SayAsInterpretAs = 20i32; +pub const SayAsInterpretAs_Date_DayMonthYear: SayAsInterpretAs = 16i32; +pub const SayAsInterpretAs_Date_MonthDay: SayAsInterpretAs = 21i32; +pub const SayAsInterpretAs_Date_MonthDayYear: SayAsInterpretAs = 15i32; +pub const SayAsInterpretAs_Date_MonthYear: SayAsInterpretAs = 19i32; +pub const SayAsInterpretAs_Date_Year: SayAsInterpretAs = 22i32; +pub const SayAsInterpretAs_Date_YearMonth: SayAsInterpretAs = 18i32; +pub const SayAsInterpretAs_Date_YearMonthDay: SayAsInterpretAs = 17i32; +pub const SayAsInterpretAs_Media: SayAsInterpretAs = 14i32; +pub const SayAsInterpretAs_Name: SayAsInterpretAs = 13i32; +pub const SayAsInterpretAs_Net: SayAsInterpretAs = 9i32; +pub const SayAsInterpretAs_None: SayAsInterpretAs = 0i32; +pub const SayAsInterpretAs_Number: SayAsInterpretAs = 4i32; +pub const SayAsInterpretAs_Ordinal: SayAsInterpretAs = 3i32; +pub const SayAsInterpretAs_Spell: SayAsInterpretAs = 1i32; +pub const SayAsInterpretAs_Telephone: SayAsInterpretAs = 7i32; +pub const SayAsInterpretAs_Time: SayAsInterpretAs = 6i32; +pub const SayAsInterpretAs_Time_HoursMinutes12: SayAsInterpretAs = 24i32; +pub const SayAsInterpretAs_Time_HoursMinutes24: SayAsInterpretAs = 26i32; +pub const SayAsInterpretAs_Time_HoursMinutesSeconds12: SayAsInterpretAs = 23i32; +pub const SayAsInterpretAs_Time_HoursMinutesSeconds24: SayAsInterpretAs = 25i32; +pub const SayAsInterpretAs_Url: SayAsInterpretAs = 10i32; +pub type ScrollAmount = i32; +pub const ScrollAmount_LargeDecrement: ScrollAmount = 0i32; +pub const ScrollAmount_LargeIncrement: ScrollAmount = 3i32; +pub const ScrollAmount_NoAmount: ScrollAmount = 2i32; +pub const ScrollAmount_SmallDecrement: ScrollAmount = 1i32; +pub const ScrollAmount_SmallIncrement: ScrollAmount = 4i32; +pub const ScrollBar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdaf34b36_5065_4946_b22f_92595fc0751a); +pub const ScrollItem_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4591d005_a803_4d5c_b4d5_8d2800f906a7); +pub const Scroll_HorizontalScrollPercent_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc7c13c0e_eb21_47ff_acc4_b5a3350f5191); +pub const Scroll_HorizontalViewSize_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x70c2e5d4_fcb0_4713_a9aa_af92ff79e4cd); +pub const Scroll_HorizontallyScrollable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8b925147_28cd_49ae_bd63_f44118d2e719); +pub const Scroll_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x895fa4b4_759d_4c50_8e15_03460672003c); +pub const Scroll_VerticalScrollPercent_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6c8d7099_b2a8_4948_bff7_3cf9058bfefb); +pub const Scroll_VerticalViewSize_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xde6a2e22_d8c7_40c5_83ba_e5f681d53108); +pub const Scroll_VerticallyScrollable_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x89164798_0068_4315_b89a_1e7cfbbc3dfc); +pub const Selection2_CurrentSelectedItem_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x34257c26_83b5_41a6_939c_ae841c136236); +pub const Selection2_FirstSelectedItem_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcc24ea67_369c_4e55_9ff7_38da69540c29); +pub const Selection2_ItemCount_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbb49eb9f_456d_4048_b591_9c2026b84636); +pub const Selection2_LastSelectedItem_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcf7bda90_2d83_49f8_860c_9ce394cf89b4); +pub const SelectionItem_ElementAddedToSelectionEvent_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3c822dd1_c407_4dba_91dd_79d4aed0aec6); +pub const SelectionItem_ElementRemovedFromSelectionEvent_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x097fa8a9_7079_41af_8b9c_0934d8305e5c); +pub const SelectionItem_ElementSelectedEvent_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb9c7dbfb_4ebe_4532_aaf4_008cf647233c); +pub const SelectionItem_IsSelected_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf122835f_cd5f_43df_b79d_4b849e9e6020); +pub const SelectionItem_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9bc64eeb_87c7_4b28_94bb_4d9fa437b6ef); +pub const SelectionItem_SelectionContainer_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa4365b6e_9c1e_4b63_8b53_c2421dd1e8fb); +pub const Selection_CanSelectMultiple_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x49d73da5_c883_4500_883d_8fcf8daf6cbe); +pub const Selection_InvalidatedEvent_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcac14904_16b4_4b53_8e47_4cb1df267bb7); +pub const Selection_IsSelectionRequired_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb1ae4422_63fe_44e7_a5a5_a738c829b19a); +pub const Selection_Pattern2_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfba25cab_ab98_49f7_a7dc_fe539dc15be7); +pub const Selection_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x66e3b7e8_d821_4d25_8761_435d2c8b253f); +pub const Selection_Selection_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xaa6dc2a2_0e2b_4d38_96d5_34e470b81853); +pub const SemanticZoom_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5fd34a43_061e_42c8_b589_9dccf74bc43a); +pub const Separator_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8767eba3_2a63_4ab0_ac8d_aa50e23de978); +pub const SizeOfSet_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1600d33c_3b9f_4369_9431_aa293f344cf1); +pub const Size_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2b5f761d_f885_4404_973f_9b1d98e36d8f); +pub const Slider_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb033c24b_3b35_4cea_b609_763682fa660b); +pub const Spinner_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x60cc4b38_3cb1_4161_b442_c6b726c17825); +pub const SplitButton_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7011f01f_4ace_4901_b461_920a6f1ca650); +pub const SpreadsheetItem_AnnotationObjects_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa3194c38_c9bc_4604_9396_ae3f9f457f7b); +pub const SpreadsheetItem_AnnotationTypes_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc70c51d0_d602_4b45_afbc_b4712b96d72b); +pub const SpreadsheetItem_Formula_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe602e47d_1b47_4bea_87cf_3b0b0b5c15b6); +pub const SpreadsheetItem_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x32cf83ff_f1a8_4a8c_8658_d47ba74e20ba); +pub const Spreadsheet_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6a5b24c9_9d1e_4b85_9e44_c02e3169b10b); +pub const StatusBar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd45e7d1b_5873_475f_95a4_0433e1f1b00a); +pub type StructureChangeType = i32; +pub const StructureChangeType_ChildAdded: StructureChangeType = 0i32; +pub const StructureChangeType_ChildRemoved: StructureChangeType = 1i32; +pub const StructureChangeType_ChildrenBulkAdded: StructureChangeType = 3i32; +pub const StructureChangeType_ChildrenBulkRemoved: StructureChangeType = 4i32; +pub const StructureChangeType_ChildrenInvalidated: StructureChangeType = 2i32; +pub const StructureChangeType_ChildrenReordered: StructureChangeType = 5i32; +pub const StructureChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x59977961_3edd_4b11_b13b_676b2a2a6ca9); +pub const StructuredMarkup_CompositionComplete_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc48a3c17_677a_4047_a68d_fc1257528aef); +pub const StructuredMarkup_Deleted_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf9d0a020_e1c1_4ecf_b9aa_52efde7e41e1); +pub const StructuredMarkup_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xabbd0878_8665_4f5c_94fc_36e7d8bb706b); +pub const StructuredMarkup_SelectionChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa7c815f7_ff9f_41c7_a3a7_ab6cbfdb4903); +pub const StyleId_BulletedList: UIA_STYLE_ID = 70015i32; +pub const StyleId_BulletedList_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5963ed64_6426_4632_8caf_a32ad402d91a); +pub const StyleId_Custom: UIA_STYLE_ID = 70000i32; +pub const StyleId_Custom_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xef2edd3e_a999_4b7c_a378_09bbd52a3516); +pub const StyleId_Emphasis: UIA_STYLE_ID = 70013i32; +pub const StyleId_Emphasis_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xca6e7dbe_355e_4820_95a0_925f041d3470); +pub const StyleId_Heading1: UIA_STYLE_ID = 70001i32; +pub const StyleId_Heading1_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7f7e8f69_6866_4621_930c_9a5d0ca5961c); +pub const StyleId_Heading2: UIA_STYLE_ID = 70002i32; +pub const StyleId_Heading2_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbaa9b241_5c69_469d_85ad_474737b52b14); +pub const StyleId_Heading3: UIA_STYLE_ID = 70003i32; +pub const StyleId_Heading3_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbf8be9d2_d8b8_4ec5_8c52_9cfb0d035970); +pub const StyleId_Heading4: UIA_STYLE_ID = 70004i32; +pub const StyleId_Heading4_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8436ffc0_9578_45fc_83a4_ff40053315dd); +pub const StyleId_Heading5: UIA_STYLE_ID = 70005i32; +pub const StyleId_Heading5_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x909f424d_0dbf_406e_97bb_4e773d9798f7); +pub const StyleId_Heading6: UIA_STYLE_ID = 70006i32; +pub const StyleId_Heading6_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x89d23459_5d5b_4824_a420_11d3ed82e40f); +pub const StyleId_Heading7: UIA_STYLE_ID = 70007i32; +pub const StyleId_Heading7_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa3790473_e9ae_422d_b8e3_3b675c6181a4); +pub const StyleId_Heading8: UIA_STYLE_ID = 70008i32; +pub const StyleId_Heading8_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2bc14145_a40c_4881_84ae_f2235685380c); +pub const StyleId_Heading9: UIA_STYLE_ID = 70009i32; +pub const StyleId_Heading9_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc70d9133_bb2a_43d3_8ac6_33657884b0f0); +pub const StyleId_Normal: UIA_STYLE_ID = 70012i32; +pub const StyleId_Normal_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xcd14d429_e45e_4475_a1c5_7f9e6be96eba); +pub const StyleId_NumberedList: UIA_STYLE_ID = 70016i32; +pub const StyleId_NumberedList_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1e96dbd5_64c3_43d0_b1ee_b53b06e3eddf); +pub const StyleId_Quote: UIA_STYLE_ID = 70014i32; +pub const StyleId_Quote_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5d1c21ea_8195_4f6c_87ea_5dabece64c1d); +pub const StyleId_Subtitle: UIA_STYLE_ID = 70011i32; +pub const StyleId_Subtitle_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb5d9fc17_5d6f_4420_b439_7cb19ad434e2); +pub const StyleId_Title: UIA_STYLE_ID = 70010i32; +pub const StyleId_Title_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x15d8201a_ffcf_481f_b0a1_30b63be98f07); +pub const Styles_ExtendedProperties_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf451cda0_ba0a_4681_b0b0_0dbdb53e58f3); +pub const Styles_FillColor_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x63eff97a_a1c5_4b1d_84eb_b765f2edd632); +pub const Styles_FillPatternColor_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x939a59fe_8fbd_4e75_a271_ac4595195163); +pub const Styles_FillPatternStyle_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x81cf651f_482b_4451_a30a_e1545e554fb8); +pub const Styles_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1ae62655_da72_4d60_a153_e5aa6988e3bf); +pub const Styles_Shape_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc71a23f8_778c_400d_8458_3b543e526984); +pub const Styles_StyleId_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xda82852f_3817_4233_82af_02279e72cc77); +pub const Styles_StyleName_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1c12b035_05d1_4f55_9e8e_1489f3ff550d); +pub type SupportedTextSelection = i32; +pub const SupportedTextSelection_Multiple: SupportedTextSelection = 2i32; +pub const SupportedTextSelection_None: SupportedTextSelection = 0i32; +pub const SupportedTextSelection_Single: SupportedTextSelection = 1i32; +pub type SynchronizedInputType = i32; +pub const SynchronizedInputType_KeyDown: SynchronizedInputType = 2i32; +pub const SynchronizedInputType_KeyUp: SynchronizedInputType = 1i32; +pub const SynchronizedInputType_LeftMouseDown: SynchronizedInputType = 8i32; +pub const SynchronizedInputType_LeftMouseUp: SynchronizedInputType = 4i32; +pub const SynchronizedInputType_RightMouseDown: SynchronizedInputType = 32i32; +pub const SynchronizedInputType_RightMouseUp: SynchronizedInputType = 16i32; +pub const SynchronizedInput_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x05c288a6_c47b_488b_b653_33977a551b8b); +pub const SystemAlert_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd271545d_7a3a_47a7_8474_81d29a2451c9); +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOGGLEKEYS { + pub cbSize: u32, + pub dwFlags: u32, +} +pub const TabItem_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2c6a634f_921b_4e6e_b26e_08fcb0798f4c); +pub const Tab_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x38cd1f2d_337a_4bd2_a5e3_adb469e30bd3); +pub const TableItem_ColumnHeaderItems_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x967a56a3_74b6_431e_8de6_99c411031c58); +pub const TableItem_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdf1343bd_1888_4a29_a50c_b92e6de37f6f); +pub const TableItem_RowHeaderItems_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb3f853a0_0574_4cd8_bcd7_ed5923572d97); +pub const Table_ColumnHeaders_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xaff1d72b_968d_42b1_b459_150b299da664); +pub const Table_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x773bfa0e_5bc4_4deb_921b_de7b3206229e); +pub const Table_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc415218e_a028_461e_aa92_8f925cf79351); +pub const Table_RowHeaders_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd9e35b87_6eb8_4562_aac6_a8a9075236a8); +pub const Table_RowOrColumnMajor_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x83be75c3_29fe_4a30_85e1_2a6277fd106e); +pub const TextChild_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7533cab7_3bfe_41ef_9e85_e2638cbe169e); +pub type TextDecorationLineStyle = i32; +pub const TextDecorationLineStyle_Dash: TextDecorationLineStyle = 5i32; +pub const TextDecorationLineStyle_DashDot: TextDecorationLineStyle = 6i32; +pub const TextDecorationLineStyle_DashDotDot: TextDecorationLineStyle = 7i32; +pub const TextDecorationLineStyle_Dot: TextDecorationLineStyle = 4i32; +pub const TextDecorationLineStyle_Double: TextDecorationLineStyle = 3i32; +pub const TextDecorationLineStyle_DoubleWavy: TextDecorationLineStyle = 11i32; +pub const TextDecorationLineStyle_LongDash: TextDecorationLineStyle = 13i32; +pub const TextDecorationLineStyle_None: TextDecorationLineStyle = 0i32; +pub const TextDecorationLineStyle_Other: TextDecorationLineStyle = -1i32; +pub const TextDecorationLineStyle_Single: TextDecorationLineStyle = 1i32; +pub const TextDecorationLineStyle_ThickDash: TextDecorationLineStyle = 14i32; +pub const TextDecorationLineStyle_ThickDashDot: TextDecorationLineStyle = 15i32; +pub const TextDecorationLineStyle_ThickDashDotDot: TextDecorationLineStyle = 16i32; +pub const TextDecorationLineStyle_ThickDot: TextDecorationLineStyle = 17i32; +pub const TextDecorationLineStyle_ThickLongDash: TextDecorationLineStyle = 18i32; +pub const TextDecorationLineStyle_ThickSingle: TextDecorationLineStyle = 9i32; +pub const TextDecorationLineStyle_ThickWavy: TextDecorationLineStyle = 12i32; +pub const TextDecorationLineStyle_Wavy: TextDecorationLineStyle = 8i32; +pub const TextDecorationLineStyle_WordsOnly: TextDecorationLineStyle = 2i32; +pub type TextEditChangeType = i32; +pub const TextEditChangeType_AutoComplete: TextEditChangeType = 4i32; +pub const TextEditChangeType_AutoCorrect: TextEditChangeType = 1i32; +pub const TextEditChangeType_Composition: TextEditChangeType = 2i32; +pub const TextEditChangeType_CompositionFinalized: TextEditChangeType = 3i32; +pub const TextEditChangeType_None: TextEditChangeType = 0i32; +pub const TextEdit_ConversionTargetChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3388c183_ed4f_4c8b_9baa_364d51d8847f); +pub const TextEdit_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x69f3ff89_5af9_4c75_9340_f2de292e4591); +pub const TextEdit_TextChanged_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x120b0308_ec22_4eb8_9c98_9867cda1b165); +pub type TextPatternRangeEndpoint = i32; +pub const TextPatternRangeEndpoint_End: TextPatternRangeEndpoint = 1i32; +pub const TextPatternRangeEndpoint_Start: TextPatternRangeEndpoint = 0i32; +pub type TextUnit = i32; +pub const TextUnit_Character: TextUnit = 0i32; +pub const TextUnit_Document: TextUnit = 6i32; +pub const TextUnit_Format: TextUnit = 1i32; +pub const TextUnit_Line: TextUnit = 3i32; +pub const TextUnit_Page: TextUnit = 5i32; +pub const TextUnit_Paragraph: TextUnit = 4i32; +pub const TextUnit_Word: TextUnit = 2i32; +pub const Text_AfterParagraphSpacing_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x588cbb38_e62f_497c_b5d1_ccdf0ee823d8); +pub const Text_AfterSpacing_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x588cbb38_e62f_497c_b5d1_ccdf0ee823d8); +pub const Text_AnimationStyle_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x628209f0_7c9a_4d57_be64_1f1836571ff5); +pub const Text_AnnotationObjects_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xff41cf68_e7ab_40b9_8c72_72a8ed94017d); +pub const Text_AnnotationTypes_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xad2eb431_ee4e_4be1_a7ba_5559155a73ef); +pub const Text_BackgroundColor_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfdc49a07_583d_4f17_ad27_77fc832a3c0b); +pub const Text_BeforeParagraphSpacing_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbe7b0ab1_c822_4a24_85e9_c8f2650fc79c); +pub const Text_BeforeSpacing_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbe7b0ab1_c822_4a24_85e9_c8f2650fc79c); +pub const Text_BulletStyle_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc1097c90_d5c4_4237_9781_3bec8ba54e48); +pub const Text_CapStyle_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfb059c50_92cc_49a5_ba8f_0aa872bba2f3); +pub const Text_CaretBidiMode_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x929ee7a6_51d3_4715_96dc_b694fa24a168); +pub const Text_CaretPosition_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb227b131_9889_4752_a91b_733efdc5c5a0); +pub const Text_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xae9772dc_d331_4f09_be20_7e6dfaf07b0a); +pub const Text_Culture_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc2025af9_a42d_4ced_a1fb_c6746315222e); +pub const Text_FontName_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x64e63ba8_f2e5_476e_a477_1734feaaf726); +pub const Text_FontSize_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdc5eeeff_0506_4673_93f2_377e4a8e01f1); +pub const Text_FontWeight_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6fc02359_b316_4f5f_b401_f1ce55741853); +pub const Text_ForegroundColor_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x72d1c95d_5e60_471a_96b1_6c1b3b77a436); +pub const Text_HorizontalTextAlignment_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x04ea6161_fba3_477a_952a_bb326d026a5b); +pub const Text_IndentationFirstLine_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x206f9ad5_c1d3_424a_8182_6da9a7f3d632); +pub const Text_IndentationLeading_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5cf66bac_2d45_4a4b_b6c9_f7221d2815b0); +pub const Text_IndentationTrailing_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x97ff6c0f_1ce4_408a_b67b_94d83eb69bf2); +pub const Text_IsActive_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf5a4e533_e1b8_436b_935d_b57aa3f558c4); +pub const Text_IsHidden_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x360182fb_bdd7_47f6_ab69_19e33f8a3344); +pub const Text_IsItalic_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xfce12a56_1336_4a34_9663_1bab47239320); +pub const Text_IsReadOnly_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa738156b_ca3e_495e_9514_833c440feb11); +pub const Text_IsSubscript_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf0ead858_8f53_413c_873f_1a7d7f5e0de4); +pub const Text_IsSuperscript_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xda706ee4_b3aa_4645_a41f_cd25157dea76); +pub const Text_LineSpacing_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x63ff70ae_d943_4b47_8ab7_a7a033d3214b); +pub const Text_Link_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb38ef51d_9e8d_4e46_9144_56ebe177329b); +pub const Text_MarginBottom_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7ee593c4_72b4_4cac_9271_3ed24b0e4d42); +pub const Text_MarginLeading_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x9e9242d0_5ed0_4900_8e8a_eecc03835afc); +pub const Text_MarginTop_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x683d936f_c9b9_4a9a_b3d9_d20d33311e2a); +pub const Text_MarginTrailing_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xaf522f98_999d_40af_a5b2_0169d0342002); +pub const Text_OutlineStyles_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5b675b27_db89_46fe_970c_614d523bb97d); +pub const Text_OverlineColor_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x83ab383a_fd43_40da_ab3e_ecf8165cbb6d); +pub const Text_OverlineStyle_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0a234d66_617e_427f_871d_e1ff1e0c213f); +pub const Text_Pattern2_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x498479a2_5b22_448d_b6e4_647490860698); +pub const Text_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8615f05d_7de5_44fd_a679_2ca4b46033a8); +pub const Text_SayAsInterpretAs_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb38ad6ac_eee1_4b6e_88cc_014cefa93fcb); +pub const Text_SelectionActiveEnd_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1f668cc3_9bbf_416b_b0a2_f89f86f6612c); +pub const Text_StrikethroughColor_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbfe15a18_8c41_4c5a_9a0b_04af0e07f487); +pub const Text_StrikethroughStyle_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x72913ef1_da00_4f01_899c_ac5a8577a307); +pub const Text_StyleId_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x14c300de_c32b_449b_ab7c_b0e0789aea5d); +pub const Text_StyleName_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x22c9e091_4d66_45d8_a828_737bab4c98a7); +pub const Text_Tabs_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x2e68d00b_92fe_42d8_899a_a784aa4454a1); +pub const Text_TextChangedEvent_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4a342082_f483_48c4_ac11_a84b435e2a84); +pub const Text_TextFlowDirections_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8bdf8739_f420_423e_af77_20a5d973a907); +pub const Text_TextSelectionChangedEvent_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x918edaa1_71b3_49ae_9741_79beb8d358f3); +pub const Text_UnderlineColor_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbfa12c73_fde2_4473_bf64_1036d6aa0f45); +pub const Text_UnderlineStyle_Attribute_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x5f3b21c0_ede4_44bd_9c36_3853038cbfeb); +pub const Thumb_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x701ca877_e310_4dd6_b644_797e4faea213); +pub const TitleBar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x98aa55bf_3bb0_4b65_836e_2ea30dbc171f); +pub type ToggleState = i32; +pub const ToggleState_Indeterminate: ToggleState = 2i32; +pub const ToggleState_Off: ToggleState = 0i32; +pub const ToggleState_On: ToggleState = 1i32; +pub const Toggle_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x0b419760_e2f4_43ff_8c5f_9457c82b56e9); +pub const Toggle_ToggleState_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb23cdc52_22c2_4c6c_9ded_f5c422479ede); +pub const ToolBar_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8f06b751_e182_4e98_8893_2284543a7dce); +pub const ToolTipClosed_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x276d71ef_24a9_49b6_8e97_da98b401bbcd); +pub const ToolTipOpened_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3f4b97ff_2edc_451d_bca4_95a3188d5b03); +pub const ToolTip_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x05ddc6d1_2137_4768_98ea_73f52f7134f3); +pub const Tranform_Pattern2_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x8afcfd07_a369_44de_988b_2f7ff49fb8a8); +pub const Transform2_CanZoom_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf357e890_a756_4359_9ca6_86702bf8f381); +pub const Transform2_ZoomLevel_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xeee29f1a_f4a2_4b5b_ac65_95cf93283387); +pub const Transform2_ZoomMaximum_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x42ab6b77_ceb0_4eca_b82a_6cfa5fa1fc08); +pub const Transform2_ZoomMinimum_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x742ccc16_4ad1_4e07_96fe_b122c6e6b22b); +pub const Transform_CanMove_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x1b75824d_208b_4fdf_bccd_f1f4e5741f4f); +pub const Transform_CanResize_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbb98dca5_4c1a_41d4_a4f6_ebc128644180); +pub const Transform_CanRotate_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x10079b48_3849_476f_ac96_44a95c8440d9); +pub const Transform_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x24b46fdb_587e_49f1_9c4a_d8e98b664b7b); +pub const TreeItem_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x62c9feb9_8ffc_4878_a3a4_96b030315c18); +pub type TreeScope = i32; +pub const TreeScope_Ancestors: TreeScope = 16i32; +pub const TreeScope_Children: TreeScope = 2i32; +pub const TreeScope_Descendants: TreeScope = 4i32; +pub const TreeScope_Element: TreeScope = 1i32; +pub const TreeScope_None: TreeScope = 0i32; +pub const TreeScope_Parent: TreeScope = 8i32; +pub const TreeScope_Subtree: TreeScope = 7i32; +pub type TreeTraversalOptions = i32; +pub const TreeTraversalOptions_Default: TreeTraversalOptions = 0i32; +pub const TreeTraversalOptions_LastToFirstOrder: TreeTraversalOptions = 2i32; +pub const TreeTraversalOptions_PostOrder: TreeTraversalOptions = 1i32; +pub const Tree_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7561349c_d241_43f4_9908_b5f091bee611); +pub type UIA_ANNOTATIONTYPE = i32; +pub const UIA_AcceleratorKeyPropertyId: UIA_PROPERTY_ID = 30006i32; +pub const UIA_AccessKeyPropertyId: UIA_PROPERTY_ID = 30007i32; +pub const UIA_ActiveTextPositionChangedEventId: UIA_EVENT_ID = 20036i32; +pub const UIA_AfterParagraphSpacingAttributeId: UIA_TEXTATTRIBUTE_ID = 40042i32; +pub const UIA_AnimationStyleAttributeId: UIA_TEXTATTRIBUTE_ID = 40000i32; +pub const UIA_AnnotationAnnotationTypeIdPropertyId: UIA_PROPERTY_ID = 30113i32; +pub const UIA_AnnotationAnnotationTypeNamePropertyId: UIA_PROPERTY_ID = 30114i32; +pub const UIA_AnnotationAuthorPropertyId: UIA_PROPERTY_ID = 30115i32; +pub const UIA_AnnotationDateTimePropertyId: UIA_PROPERTY_ID = 30116i32; +pub const UIA_AnnotationObjectsAttributeId: UIA_TEXTATTRIBUTE_ID = 40032i32; +pub const UIA_AnnotationObjectsPropertyId: UIA_PROPERTY_ID = 30156i32; +pub const UIA_AnnotationPatternId: UIA_PATTERN_ID = 10023i32; +pub const UIA_AnnotationTargetPropertyId: UIA_PROPERTY_ID = 30117i32; +pub const UIA_AnnotationTypesAttributeId: UIA_TEXTATTRIBUTE_ID = 40031i32; +pub const UIA_AnnotationTypesPropertyId: UIA_PROPERTY_ID = 30155i32; +pub const UIA_AppBarControlTypeId: UIA_CONTROLTYPE_ID = 50040i32; +pub const UIA_AriaPropertiesPropertyId: UIA_PROPERTY_ID = 30102i32; +pub const UIA_AriaRolePropertyId: UIA_PROPERTY_ID = 30101i32; +pub const UIA_AsyncContentLoadedEventId: UIA_EVENT_ID = 20006i32; +pub const UIA_AutomationFocusChangedEventId: UIA_EVENT_ID = 20005i32; +pub const UIA_AutomationIdPropertyId: UIA_PROPERTY_ID = 30011i32; +pub const UIA_AutomationPropertyChangedEventId: UIA_EVENT_ID = 20004i32; +pub const UIA_BackgroundColorAttributeId: UIA_TEXTATTRIBUTE_ID = 40001i32; +pub const UIA_BeforeParagraphSpacingAttributeId: UIA_TEXTATTRIBUTE_ID = 40041i32; +pub const UIA_BoundingRectanglePropertyId: UIA_PROPERTY_ID = 30001i32; +pub const UIA_BulletStyleAttributeId: UIA_TEXTATTRIBUTE_ID = 40002i32; +pub const UIA_ButtonControlTypeId: UIA_CONTROLTYPE_ID = 50000i32; +pub type UIA_CHANGE_ID = i32; +pub type UIA_CONTROLTYPE_ID = i32; +pub const UIA_CalendarControlTypeId: UIA_CONTROLTYPE_ID = 50001i32; +pub const UIA_CapStyleAttributeId: UIA_TEXTATTRIBUTE_ID = 40003i32; +pub const UIA_CaretBidiModeAttributeId: UIA_TEXTATTRIBUTE_ID = 40039i32; +pub const UIA_CaretPositionAttributeId: UIA_TEXTATTRIBUTE_ID = 40038i32; +pub const UIA_CenterPointPropertyId: UIA_PROPERTY_ID = 30165i32; +pub const UIA_ChangesEventId: UIA_EVENT_ID = 20034i32; +pub const UIA_CheckBoxControlTypeId: UIA_CONTROLTYPE_ID = 50002i32; +pub const UIA_ClassNamePropertyId: UIA_PROPERTY_ID = 30012i32; +pub const UIA_ClickablePointPropertyId: UIA_PROPERTY_ID = 30014i32; +pub const UIA_ComboBoxControlTypeId: UIA_CONTROLTYPE_ID = 50003i32; +pub const UIA_ControlTypePropertyId: UIA_PROPERTY_ID = 30003i32; +pub const UIA_ControllerForPropertyId: UIA_PROPERTY_ID = 30104i32; +pub const UIA_CultureAttributeId: UIA_TEXTATTRIBUTE_ID = 40004i32; +pub const UIA_CulturePropertyId: UIA_PROPERTY_ID = 30015i32; +pub const UIA_CustomControlTypeId: UIA_CONTROLTYPE_ID = 50025i32; +pub const UIA_CustomLandmarkTypeId: UIA_LANDMARKTYPE_ID = 80000i32; +pub const UIA_CustomNavigationPatternId: UIA_PATTERN_ID = 10033i32; +pub const UIA_DataGridControlTypeId: UIA_CONTROLTYPE_ID = 50028i32; +pub const UIA_DataItemControlTypeId: UIA_CONTROLTYPE_ID = 50029i32; +pub const UIA_DescribedByPropertyId: UIA_PROPERTY_ID = 30105i32; +pub const UIA_DockDockPositionPropertyId: UIA_PROPERTY_ID = 30069i32; +pub const UIA_DockPatternId: UIA_PATTERN_ID = 10011i32; +pub const UIA_DocumentControlTypeId: UIA_CONTROLTYPE_ID = 50030i32; +pub const UIA_DragDropEffectPropertyId: UIA_PROPERTY_ID = 30139i32; +pub const UIA_DragDropEffectsPropertyId: UIA_PROPERTY_ID = 30140i32; +pub const UIA_DragGrabbedItemsPropertyId: UIA_PROPERTY_ID = 30144i32; +pub const UIA_DragIsGrabbedPropertyId: UIA_PROPERTY_ID = 30138i32; +pub const UIA_DragPatternId: UIA_PATTERN_ID = 10030i32; +pub const UIA_Drag_DragCancelEventId: UIA_EVENT_ID = 20027i32; +pub const UIA_Drag_DragCompleteEventId: UIA_EVENT_ID = 20028i32; +pub const UIA_Drag_DragStartEventId: UIA_EVENT_ID = 20026i32; +pub const UIA_DropTargetDropTargetEffectPropertyId: UIA_PROPERTY_ID = 30142i32; +pub const UIA_DropTargetDropTargetEffectsPropertyId: UIA_PROPERTY_ID = 30143i32; +pub const UIA_DropTargetPatternId: UIA_PATTERN_ID = 10031i32; +pub const UIA_DropTarget_DragEnterEventId: UIA_EVENT_ID = 20029i32; +pub const UIA_DropTarget_DragLeaveEventId: UIA_EVENT_ID = 20030i32; +pub const UIA_DropTarget_DroppedEventId: UIA_EVENT_ID = 20031i32; +pub type UIA_EVENT_ID = i32; +pub const UIA_E_ELEMENTNOTAVAILABLE: u32 = 2147746305u32; +pub const UIA_E_ELEMENTNOTENABLED: u32 = 2147746304u32; +pub const UIA_E_INVALIDOPERATION: u32 = 2148734217u32; +pub const UIA_E_NOCLICKABLEPOINT: u32 = 2147746306u32; +pub const UIA_E_NOTSUPPORTED: u32 = 2147746308u32; +pub const UIA_E_PROXYASSEMBLYNOTLOADED: u32 = 2147746307u32; +pub const UIA_E_TIMEOUT: u32 = 2148734213u32; +pub const UIA_EditControlTypeId: UIA_CONTROLTYPE_ID = 50004i32; +pub const UIA_ExpandCollapseExpandCollapseStatePropertyId: UIA_PROPERTY_ID = 30070i32; +pub const UIA_ExpandCollapsePatternId: UIA_PATTERN_ID = 10005i32; +pub const UIA_FillColorPropertyId: UIA_PROPERTY_ID = 30160i32; +pub const UIA_FillTypePropertyId: UIA_PROPERTY_ID = 30162i32; +pub const UIA_FlowsFromPropertyId: UIA_PROPERTY_ID = 30148i32; +pub const UIA_FlowsToPropertyId: UIA_PROPERTY_ID = 30106i32; +pub const UIA_FontNameAttributeId: UIA_TEXTATTRIBUTE_ID = 40005i32; +pub const UIA_FontSizeAttributeId: UIA_TEXTATTRIBUTE_ID = 40006i32; +pub const UIA_FontWeightAttributeId: UIA_TEXTATTRIBUTE_ID = 40007i32; +pub const UIA_ForegroundColorAttributeId: UIA_TEXTATTRIBUTE_ID = 40008i32; +pub const UIA_FormLandmarkTypeId: UIA_LANDMARKTYPE_ID = 80001i32; +pub const UIA_FrameworkIdPropertyId: UIA_PROPERTY_ID = 30024i32; +pub const UIA_FullDescriptionPropertyId: UIA_PROPERTY_ID = 30159i32; +pub const UIA_GridColumnCountPropertyId: UIA_PROPERTY_ID = 30063i32; +pub const UIA_GridItemColumnPropertyId: UIA_PROPERTY_ID = 30065i32; +pub const UIA_GridItemColumnSpanPropertyId: UIA_PROPERTY_ID = 30067i32; +pub const UIA_GridItemContainingGridPropertyId: UIA_PROPERTY_ID = 30068i32; +pub const UIA_GridItemPatternId: UIA_PATTERN_ID = 10007i32; +pub const UIA_GridItemRowPropertyId: UIA_PROPERTY_ID = 30064i32; +pub const UIA_GridItemRowSpanPropertyId: UIA_PROPERTY_ID = 30066i32; +pub const UIA_GridPatternId: UIA_PATTERN_ID = 10006i32; +pub const UIA_GridRowCountPropertyId: UIA_PROPERTY_ID = 30062i32; +pub const UIA_GroupControlTypeId: UIA_CONTROLTYPE_ID = 50026i32; +pub type UIA_HEADINGLEVEL_ID = i32; +pub const UIA_HasKeyboardFocusPropertyId: UIA_PROPERTY_ID = 30008i32; +pub const UIA_HeaderControlTypeId: UIA_CONTROLTYPE_ID = 50034i32; +pub const UIA_HeaderItemControlTypeId: UIA_CONTROLTYPE_ID = 50035i32; +pub const UIA_HeadingLevelPropertyId: UIA_PROPERTY_ID = 30173i32; +pub const UIA_HelpTextPropertyId: UIA_PROPERTY_ID = 30013i32; +pub const UIA_HorizontalTextAlignmentAttributeId: UIA_TEXTATTRIBUTE_ID = 40009i32; +pub const UIA_HostedFragmentRootsInvalidatedEventId: UIA_EVENT_ID = 20025i32; +pub const UIA_HyperlinkControlTypeId: UIA_CONTROLTYPE_ID = 50005i32; +pub const UIA_IAFP_DEFAULT: u32 = 0u32; +pub const UIA_IAFP_UNWRAP_BRIDGE: u32 = 1u32; +pub const UIA_ImageControlTypeId: UIA_CONTROLTYPE_ID = 50006i32; +pub const UIA_IndentationFirstLineAttributeId: UIA_TEXTATTRIBUTE_ID = 40010i32; +pub const UIA_IndentationLeadingAttributeId: UIA_TEXTATTRIBUTE_ID = 40011i32; +pub const UIA_IndentationTrailingAttributeId: UIA_TEXTATTRIBUTE_ID = 40012i32; +pub const UIA_InputDiscardedEventId: UIA_EVENT_ID = 20022i32; +pub const UIA_InputReachedOtherElementEventId: UIA_EVENT_ID = 20021i32; +pub const UIA_InputReachedTargetEventId: UIA_EVENT_ID = 20020i32; +pub const UIA_InvokePatternId: UIA_PATTERN_ID = 10000i32; +pub const UIA_Invoke_InvokedEventId: UIA_EVENT_ID = 20009i32; +pub const UIA_IsActiveAttributeId: UIA_TEXTATTRIBUTE_ID = 40036i32; +pub const UIA_IsAnnotationPatternAvailablePropertyId: UIA_PROPERTY_ID = 30118i32; +pub const UIA_IsContentElementPropertyId: UIA_PROPERTY_ID = 30017i32; +pub const UIA_IsControlElementPropertyId: UIA_PROPERTY_ID = 30016i32; +pub const UIA_IsCustomNavigationPatternAvailablePropertyId: UIA_PROPERTY_ID = 30151i32; +pub const UIA_IsDataValidForFormPropertyId: UIA_PROPERTY_ID = 30103i32; +pub const UIA_IsDialogPropertyId: UIA_PROPERTY_ID = 30174i32; +pub const UIA_IsDockPatternAvailablePropertyId: UIA_PROPERTY_ID = 30027i32; +pub const UIA_IsDragPatternAvailablePropertyId: UIA_PROPERTY_ID = 30137i32; +pub const UIA_IsDropTargetPatternAvailablePropertyId: UIA_PROPERTY_ID = 30141i32; +pub const UIA_IsEnabledPropertyId: UIA_PROPERTY_ID = 30010i32; +pub const UIA_IsExpandCollapsePatternAvailablePropertyId: UIA_PROPERTY_ID = 30028i32; +pub const UIA_IsGridItemPatternAvailablePropertyId: UIA_PROPERTY_ID = 30029i32; +pub const UIA_IsGridPatternAvailablePropertyId: UIA_PROPERTY_ID = 30030i32; +pub const UIA_IsHiddenAttributeId: UIA_TEXTATTRIBUTE_ID = 40013i32; +pub const UIA_IsInvokePatternAvailablePropertyId: UIA_PROPERTY_ID = 30031i32; +pub const UIA_IsItalicAttributeId: UIA_TEXTATTRIBUTE_ID = 40014i32; +pub const UIA_IsItemContainerPatternAvailablePropertyId: UIA_PROPERTY_ID = 30108i32; +pub const UIA_IsKeyboardFocusablePropertyId: UIA_PROPERTY_ID = 30009i32; +pub const UIA_IsLegacyIAccessiblePatternAvailablePropertyId: UIA_PROPERTY_ID = 30090i32; +pub const UIA_IsMultipleViewPatternAvailablePropertyId: UIA_PROPERTY_ID = 30032i32; +pub const UIA_IsObjectModelPatternAvailablePropertyId: UIA_PROPERTY_ID = 30112i32; +pub const UIA_IsOffscreenPropertyId: UIA_PROPERTY_ID = 30022i32; +pub const UIA_IsPasswordPropertyId: UIA_PROPERTY_ID = 30019i32; +pub const UIA_IsPeripheralPropertyId: UIA_PROPERTY_ID = 30150i32; +pub const UIA_IsRangeValuePatternAvailablePropertyId: UIA_PROPERTY_ID = 30033i32; +pub const UIA_IsReadOnlyAttributeId: UIA_TEXTATTRIBUTE_ID = 40015i32; +pub const UIA_IsRequiredForFormPropertyId: UIA_PROPERTY_ID = 30025i32; +pub const UIA_IsScrollItemPatternAvailablePropertyId: UIA_PROPERTY_ID = 30035i32; +pub const UIA_IsScrollPatternAvailablePropertyId: UIA_PROPERTY_ID = 30034i32; +pub const UIA_IsSelectionItemPatternAvailablePropertyId: UIA_PROPERTY_ID = 30036i32; +pub const UIA_IsSelectionPattern2AvailablePropertyId: UIA_PROPERTY_ID = 30168i32; +pub const UIA_IsSelectionPatternAvailablePropertyId: UIA_PROPERTY_ID = 30037i32; +pub const UIA_IsSpreadsheetItemPatternAvailablePropertyId: UIA_PROPERTY_ID = 30132i32; +pub const UIA_IsSpreadsheetPatternAvailablePropertyId: UIA_PROPERTY_ID = 30128i32; +pub const UIA_IsStylesPatternAvailablePropertyId: UIA_PROPERTY_ID = 30127i32; +pub const UIA_IsSubscriptAttributeId: UIA_TEXTATTRIBUTE_ID = 40016i32; +pub const UIA_IsSuperscriptAttributeId: UIA_TEXTATTRIBUTE_ID = 40017i32; +pub const UIA_IsSynchronizedInputPatternAvailablePropertyId: UIA_PROPERTY_ID = 30110i32; +pub const UIA_IsTableItemPatternAvailablePropertyId: UIA_PROPERTY_ID = 30039i32; +pub const UIA_IsTablePatternAvailablePropertyId: UIA_PROPERTY_ID = 30038i32; +pub const UIA_IsTextChildPatternAvailablePropertyId: UIA_PROPERTY_ID = 30136i32; +pub const UIA_IsTextEditPatternAvailablePropertyId: UIA_PROPERTY_ID = 30149i32; +pub const UIA_IsTextPattern2AvailablePropertyId: UIA_PROPERTY_ID = 30119i32; +pub const UIA_IsTextPatternAvailablePropertyId: UIA_PROPERTY_ID = 30040i32; +pub const UIA_IsTogglePatternAvailablePropertyId: UIA_PROPERTY_ID = 30041i32; +pub const UIA_IsTransformPattern2AvailablePropertyId: UIA_PROPERTY_ID = 30134i32; +pub const UIA_IsTransformPatternAvailablePropertyId: UIA_PROPERTY_ID = 30042i32; +pub const UIA_IsValuePatternAvailablePropertyId: UIA_PROPERTY_ID = 30043i32; +pub const UIA_IsVirtualizedItemPatternAvailablePropertyId: UIA_PROPERTY_ID = 30109i32; +pub const UIA_IsWindowPatternAvailablePropertyId: UIA_PROPERTY_ID = 30044i32; +pub const UIA_ItemContainerPatternId: UIA_PATTERN_ID = 10019i32; +pub const UIA_ItemStatusPropertyId: UIA_PROPERTY_ID = 30026i32; +pub const UIA_ItemTypePropertyId: UIA_PROPERTY_ID = 30021i32; +pub type UIA_LANDMARKTYPE_ID = i32; +pub const UIA_LabeledByPropertyId: UIA_PROPERTY_ID = 30018i32; +pub const UIA_LandmarkTypePropertyId: UIA_PROPERTY_ID = 30157i32; +pub const UIA_LayoutInvalidatedEventId: UIA_EVENT_ID = 20008i32; +pub const UIA_LegacyIAccessibleChildIdPropertyId: UIA_PROPERTY_ID = 30091i32; +pub const UIA_LegacyIAccessibleDefaultActionPropertyId: UIA_PROPERTY_ID = 30100i32; +pub const UIA_LegacyIAccessibleDescriptionPropertyId: UIA_PROPERTY_ID = 30094i32; +pub const UIA_LegacyIAccessibleHelpPropertyId: UIA_PROPERTY_ID = 30097i32; +pub const UIA_LegacyIAccessibleKeyboardShortcutPropertyId: UIA_PROPERTY_ID = 30098i32; +pub const UIA_LegacyIAccessibleNamePropertyId: UIA_PROPERTY_ID = 30092i32; +pub const UIA_LegacyIAccessiblePatternId: UIA_PATTERN_ID = 10018i32; +pub const UIA_LegacyIAccessibleRolePropertyId: UIA_PROPERTY_ID = 30095i32; +pub const UIA_LegacyIAccessibleSelectionPropertyId: UIA_PROPERTY_ID = 30099i32; +pub const UIA_LegacyIAccessibleStatePropertyId: UIA_PROPERTY_ID = 30096i32; +pub const UIA_LegacyIAccessibleValuePropertyId: UIA_PROPERTY_ID = 30093i32; +pub const UIA_LevelPropertyId: UIA_PROPERTY_ID = 30154i32; +pub const UIA_LineSpacingAttributeId: UIA_TEXTATTRIBUTE_ID = 40040i32; +pub const UIA_LinkAttributeId: UIA_TEXTATTRIBUTE_ID = 40035i32; +pub const UIA_ListControlTypeId: UIA_CONTROLTYPE_ID = 50008i32; +pub const UIA_ListItemControlTypeId: UIA_CONTROLTYPE_ID = 50007i32; +pub const UIA_LiveRegionChangedEventId: UIA_EVENT_ID = 20024i32; +pub const UIA_LiveSettingPropertyId: UIA_PROPERTY_ID = 30135i32; +pub const UIA_LocalizedControlTypePropertyId: UIA_PROPERTY_ID = 30004i32; +pub const UIA_LocalizedLandmarkTypePropertyId: UIA_PROPERTY_ID = 30158i32; +pub type UIA_METADATA_ID = i32; +pub const UIA_MainLandmarkTypeId: UIA_LANDMARKTYPE_ID = 80002i32; +pub const UIA_MarginBottomAttributeId: UIA_TEXTATTRIBUTE_ID = 40018i32; +pub const UIA_MarginLeadingAttributeId: UIA_TEXTATTRIBUTE_ID = 40019i32; +pub const UIA_MarginTopAttributeId: UIA_TEXTATTRIBUTE_ID = 40020i32; +pub const UIA_MarginTrailingAttributeId: UIA_TEXTATTRIBUTE_ID = 40021i32; +pub const UIA_MenuBarControlTypeId: UIA_CONTROLTYPE_ID = 50010i32; +pub const UIA_MenuClosedEventId: UIA_EVENT_ID = 20007i32; +pub const UIA_MenuControlTypeId: UIA_CONTROLTYPE_ID = 50009i32; +pub const UIA_MenuItemControlTypeId: UIA_CONTROLTYPE_ID = 50011i32; +pub const UIA_MenuModeEndEventId: UIA_EVENT_ID = 20019i32; +pub const UIA_MenuModeStartEventId: UIA_EVENT_ID = 20018i32; +pub const UIA_MenuOpenedEventId: UIA_EVENT_ID = 20003i32; +pub const UIA_MultipleViewCurrentViewPropertyId: UIA_PROPERTY_ID = 30071i32; +pub const UIA_MultipleViewPatternId: UIA_PATTERN_ID = 10008i32; +pub const UIA_MultipleViewSupportedViewsPropertyId: UIA_PROPERTY_ID = 30072i32; +pub const UIA_NamePropertyId: UIA_PROPERTY_ID = 30005i32; +pub const UIA_NativeWindowHandlePropertyId: UIA_PROPERTY_ID = 30020i32; +pub const UIA_NavigationLandmarkTypeId: UIA_LANDMARKTYPE_ID = 80003i32; +pub const UIA_NotificationEventId: UIA_EVENT_ID = 20035i32; +pub const UIA_ObjectModelPatternId: UIA_PATTERN_ID = 10022i32; +pub const UIA_OptimizeForVisualContentPropertyId: UIA_PROPERTY_ID = 30111i32; +pub const UIA_OrientationPropertyId: UIA_PROPERTY_ID = 30023i32; +pub const UIA_OutlineColorPropertyId: UIA_PROPERTY_ID = 30161i32; +pub const UIA_OutlineStylesAttributeId: UIA_TEXTATTRIBUTE_ID = 40022i32; +pub const UIA_OutlineThicknessPropertyId: UIA_PROPERTY_ID = 30164i32; +pub const UIA_OverlineColorAttributeId: UIA_TEXTATTRIBUTE_ID = 40023i32; +pub const UIA_OverlineStyleAttributeId: UIA_TEXTATTRIBUTE_ID = 40024i32; +pub type UIA_PATTERN_ID = i32; +pub const UIA_PFIA_DEFAULT: u32 = 0u32; +pub const UIA_PFIA_UNWRAP_BRIDGE: u32 = 1u32; +pub type UIA_PROPERTY_ID = i32; +pub const UIA_PaneControlTypeId: UIA_CONTROLTYPE_ID = 50033i32; +pub const UIA_PositionInSetPropertyId: UIA_PROPERTY_ID = 30152i32; +pub const UIA_ProcessIdPropertyId: UIA_PROPERTY_ID = 30002i32; +pub const UIA_ProgressBarControlTypeId: UIA_CONTROLTYPE_ID = 50012i32; +pub const UIA_ProviderDescriptionPropertyId: UIA_PROPERTY_ID = 30107i32; +pub const UIA_RadioButtonControlTypeId: UIA_CONTROLTYPE_ID = 50013i32; +pub const UIA_RangeValueIsReadOnlyPropertyId: UIA_PROPERTY_ID = 30048i32; +pub const UIA_RangeValueLargeChangePropertyId: UIA_PROPERTY_ID = 30051i32; +pub const UIA_RangeValueMaximumPropertyId: UIA_PROPERTY_ID = 30050i32; +pub const UIA_RangeValueMinimumPropertyId: UIA_PROPERTY_ID = 30049i32; +pub const UIA_RangeValuePatternId: UIA_PATTERN_ID = 10003i32; +pub const UIA_RangeValueSmallChangePropertyId: UIA_PROPERTY_ID = 30052i32; +pub const UIA_RangeValueValuePropertyId: UIA_PROPERTY_ID = 30047i32; +pub const UIA_RotationPropertyId: UIA_PROPERTY_ID = 30166i32; +pub const UIA_RuntimeIdPropertyId: UIA_PROPERTY_ID = 30000i32; +pub type UIA_STYLE_ID = i32; +pub const UIA_SayAsInterpretAsAttributeId: UIA_TEXTATTRIBUTE_ID = 40043i32; +pub const UIA_SayAsInterpretAsMetadataId: UIA_METADATA_ID = 100000i32; +pub const UIA_ScrollBarControlTypeId: UIA_CONTROLTYPE_ID = 50014i32; +pub const UIA_ScrollHorizontalScrollPercentPropertyId: UIA_PROPERTY_ID = 30053i32; +pub const UIA_ScrollHorizontalViewSizePropertyId: UIA_PROPERTY_ID = 30054i32; +pub const UIA_ScrollHorizontallyScrollablePropertyId: UIA_PROPERTY_ID = 30057i32; +pub const UIA_ScrollItemPatternId: UIA_PATTERN_ID = 10017i32; +pub const UIA_ScrollPatternId: UIA_PATTERN_ID = 10004i32; +pub const UIA_ScrollPatternNoScroll: f64 = -1f64; +pub const UIA_ScrollVerticalScrollPercentPropertyId: UIA_PROPERTY_ID = 30055i32; +pub const UIA_ScrollVerticalViewSizePropertyId: UIA_PROPERTY_ID = 30056i32; +pub const UIA_ScrollVerticallyScrollablePropertyId: UIA_PROPERTY_ID = 30058i32; +pub const UIA_SearchLandmarkTypeId: UIA_LANDMARKTYPE_ID = 80004i32; +pub const UIA_Selection2CurrentSelectedItemPropertyId: UIA_PROPERTY_ID = 30171i32; +pub const UIA_Selection2FirstSelectedItemPropertyId: UIA_PROPERTY_ID = 30169i32; +pub const UIA_Selection2ItemCountPropertyId: UIA_PROPERTY_ID = 30172i32; +pub const UIA_Selection2LastSelectedItemPropertyId: UIA_PROPERTY_ID = 30170i32; +pub const UIA_SelectionActiveEndAttributeId: UIA_TEXTATTRIBUTE_ID = 40037i32; +pub const UIA_SelectionCanSelectMultiplePropertyId: UIA_PROPERTY_ID = 30060i32; +pub const UIA_SelectionIsSelectionRequiredPropertyId: UIA_PROPERTY_ID = 30061i32; +pub const UIA_SelectionItemIsSelectedPropertyId: UIA_PROPERTY_ID = 30079i32; +pub const UIA_SelectionItemPatternId: UIA_PATTERN_ID = 10010i32; +pub const UIA_SelectionItemSelectionContainerPropertyId: UIA_PROPERTY_ID = 30080i32; +pub const UIA_SelectionItem_ElementAddedToSelectionEventId: UIA_EVENT_ID = 20010i32; +pub const UIA_SelectionItem_ElementRemovedFromSelectionEventId: UIA_EVENT_ID = 20011i32; +pub const UIA_SelectionItem_ElementSelectedEventId: UIA_EVENT_ID = 20012i32; +pub const UIA_SelectionPattern2Id: UIA_PATTERN_ID = 10034i32; +pub const UIA_SelectionPatternId: UIA_PATTERN_ID = 10001i32; +pub const UIA_SelectionSelectionPropertyId: UIA_PROPERTY_ID = 30059i32; +pub const UIA_Selection_InvalidatedEventId: UIA_EVENT_ID = 20013i32; +pub const UIA_SemanticZoomControlTypeId: UIA_CONTROLTYPE_ID = 50039i32; +pub const UIA_SeparatorControlTypeId: UIA_CONTROLTYPE_ID = 50038i32; +pub const UIA_SizeOfSetPropertyId: UIA_PROPERTY_ID = 30153i32; +pub const UIA_SizePropertyId: UIA_PROPERTY_ID = 30167i32; +pub const UIA_SliderControlTypeId: UIA_CONTROLTYPE_ID = 50015i32; +pub const UIA_SpinnerControlTypeId: UIA_CONTROLTYPE_ID = 50016i32; +pub const UIA_SplitButtonControlTypeId: UIA_CONTROLTYPE_ID = 50031i32; +pub const UIA_SpreadsheetItemAnnotationObjectsPropertyId: UIA_PROPERTY_ID = 30130i32; +pub const UIA_SpreadsheetItemAnnotationTypesPropertyId: UIA_PROPERTY_ID = 30131i32; +pub const UIA_SpreadsheetItemFormulaPropertyId: UIA_PROPERTY_ID = 30129i32; +pub const UIA_SpreadsheetItemPatternId: UIA_PATTERN_ID = 10027i32; +pub const UIA_SpreadsheetPatternId: UIA_PATTERN_ID = 10026i32; +pub const UIA_StatusBarControlTypeId: UIA_CONTROLTYPE_ID = 50017i32; +pub const UIA_StrikethroughColorAttributeId: UIA_TEXTATTRIBUTE_ID = 40025i32; +pub const UIA_StrikethroughStyleAttributeId: UIA_TEXTATTRIBUTE_ID = 40026i32; +pub const UIA_StructureChangedEventId: UIA_EVENT_ID = 20002i32; +pub const UIA_StyleIdAttributeId: UIA_TEXTATTRIBUTE_ID = 40034i32; +pub const UIA_StyleNameAttributeId: UIA_TEXTATTRIBUTE_ID = 40033i32; +pub const UIA_StylesExtendedPropertiesPropertyId: UIA_PROPERTY_ID = 30126i32; +pub const UIA_StylesFillColorPropertyId: UIA_PROPERTY_ID = 30122i32; +pub const UIA_StylesFillPatternColorPropertyId: UIA_PROPERTY_ID = 30125i32; +pub const UIA_StylesFillPatternStylePropertyId: UIA_PROPERTY_ID = 30123i32; +pub const UIA_StylesPatternId: UIA_PATTERN_ID = 10025i32; +pub const UIA_StylesShapePropertyId: UIA_PROPERTY_ID = 30124i32; +pub const UIA_StylesStyleIdPropertyId: UIA_PROPERTY_ID = 30120i32; +pub const UIA_StylesStyleNamePropertyId: UIA_PROPERTY_ID = 30121i32; +pub const UIA_SummaryChangeId: UIA_CHANGE_ID = 90000i32; +pub const UIA_SynchronizedInputPatternId: UIA_PATTERN_ID = 10021i32; +pub const UIA_SystemAlertEventId: UIA_EVENT_ID = 20023i32; +pub type UIA_TEXTATTRIBUTE_ID = i32; +pub const UIA_TabControlTypeId: UIA_CONTROLTYPE_ID = 50018i32; +pub const UIA_TabItemControlTypeId: UIA_CONTROLTYPE_ID = 50019i32; +pub const UIA_TableColumnHeadersPropertyId: UIA_PROPERTY_ID = 30082i32; +pub const UIA_TableControlTypeId: UIA_CONTROLTYPE_ID = 50036i32; +pub const UIA_TableItemColumnHeaderItemsPropertyId: UIA_PROPERTY_ID = 30085i32; +pub const UIA_TableItemPatternId: UIA_PATTERN_ID = 10013i32; +pub const UIA_TableItemRowHeaderItemsPropertyId: UIA_PROPERTY_ID = 30084i32; +pub const UIA_TablePatternId: UIA_PATTERN_ID = 10012i32; +pub const UIA_TableRowHeadersPropertyId: UIA_PROPERTY_ID = 30081i32; +pub const UIA_TableRowOrColumnMajorPropertyId: UIA_PROPERTY_ID = 30083i32; +pub const UIA_TabsAttributeId: UIA_TEXTATTRIBUTE_ID = 40027i32; +pub const UIA_TextChildPatternId: UIA_PATTERN_ID = 10029i32; +pub const UIA_TextControlTypeId: UIA_CONTROLTYPE_ID = 50020i32; +pub const UIA_TextEditPatternId: UIA_PATTERN_ID = 10032i32; +pub const UIA_TextEdit_ConversionTargetChangedEventId: UIA_EVENT_ID = 20033i32; +pub const UIA_TextEdit_TextChangedEventId: UIA_EVENT_ID = 20032i32; +pub const UIA_TextFlowDirectionsAttributeId: UIA_TEXTATTRIBUTE_ID = 40028i32; +pub const UIA_TextPattern2Id: UIA_PATTERN_ID = 10024i32; +pub const UIA_TextPatternId: UIA_PATTERN_ID = 10014i32; +pub const UIA_Text_TextChangedEventId: UIA_EVENT_ID = 20015i32; +pub const UIA_Text_TextSelectionChangedEventId: UIA_EVENT_ID = 20014i32; +pub const UIA_ThumbControlTypeId: UIA_CONTROLTYPE_ID = 50027i32; +pub const UIA_TitleBarControlTypeId: UIA_CONTROLTYPE_ID = 50037i32; +pub const UIA_TogglePatternId: UIA_PATTERN_ID = 10015i32; +pub const UIA_ToggleToggleStatePropertyId: UIA_PROPERTY_ID = 30086i32; +pub const UIA_ToolBarControlTypeId: UIA_CONTROLTYPE_ID = 50021i32; +pub const UIA_ToolTipClosedEventId: UIA_EVENT_ID = 20001i32; +pub const UIA_ToolTipControlTypeId: UIA_CONTROLTYPE_ID = 50022i32; +pub const UIA_ToolTipOpenedEventId: UIA_EVENT_ID = 20000i32; +pub const UIA_Transform2CanZoomPropertyId: UIA_PROPERTY_ID = 30133i32; +pub const UIA_Transform2ZoomLevelPropertyId: UIA_PROPERTY_ID = 30145i32; +pub const UIA_Transform2ZoomMaximumPropertyId: UIA_PROPERTY_ID = 30147i32; +pub const UIA_Transform2ZoomMinimumPropertyId: UIA_PROPERTY_ID = 30146i32; +pub const UIA_TransformCanMovePropertyId: UIA_PROPERTY_ID = 30087i32; +pub const UIA_TransformCanResizePropertyId: UIA_PROPERTY_ID = 30088i32; +pub const UIA_TransformCanRotatePropertyId: UIA_PROPERTY_ID = 30089i32; +pub const UIA_TransformPattern2Id: UIA_PATTERN_ID = 10028i32; +pub const UIA_TransformPatternId: UIA_PATTERN_ID = 10016i32; +pub const UIA_TreeControlTypeId: UIA_CONTROLTYPE_ID = 50023i32; +pub const UIA_TreeItemControlTypeId: UIA_CONTROLTYPE_ID = 50024i32; +pub const UIA_UnderlineColorAttributeId: UIA_TEXTATTRIBUTE_ID = 40029i32; +pub const UIA_UnderlineStyleAttributeId: UIA_TEXTATTRIBUTE_ID = 40030i32; +pub const UIA_ValueIsReadOnlyPropertyId: UIA_PROPERTY_ID = 30046i32; +pub const UIA_ValuePatternId: UIA_PATTERN_ID = 10002i32; +pub const UIA_ValueValuePropertyId: UIA_PROPERTY_ID = 30045i32; +pub const UIA_VirtualizedItemPatternId: UIA_PATTERN_ID = 10020i32; +pub const UIA_VisualEffectsPropertyId: UIA_PROPERTY_ID = 30163i32; +pub const UIA_WindowCanMaximizePropertyId: UIA_PROPERTY_ID = 30073i32; +pub const UIA_WindowCanMinimizePropertyId: UIA_PROPERTY_ID = 30074i32; +pub const UIA_WindowControlTypeId: UIA_CONTROLTYPE_ID = 50032i32; +pub const UIA_WindowIsModalPropertyId: UIA_PROPERTY_ID = 30077i32; +pub const UIA_WindowIsTopmostPropertyId: UIA_PROPERTY_ID = 30078i32; +pub const UIA_WindowPatternId: UIA_PATTERN_ID = 10009i32; +pub const UIA_WindowWindowInteractionStatePropertyId: UIA_PROPERTY_ID = 30076i32; +pub const UIA_WindowWindowVisualStatePropertyId: UIA_PROPERTY_ID = 30075i32; +pub const UIA_Window_WindowClosedEventId: UIA_EVENT_ID = 20017i32; +pub const UIA_Window_WindowOpenedEventId: UIA_EVENT_ID = 20016i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UIAutomationEventInfo { + pub guid: windows_sys::core::GUID, + pub pProgrammaticName: windows_sys::core::PCWSTR, +} +impl Default for UIAutomationEventInfo { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UIAutomationMethodInfo { + pub pProgrammaticName: windows_sys::core::PCWSTR, + pub doSetFocus: windows_sys::core::BOOL, + pub cInParameters: u32, + pub cOutParameters: u32, + pub pParameterTypes: *mut UIAutomationType, + pub pParameterNames: *const windows_sys::core::PCWSTR, +} +impl Default for UIAutomationMethodInfo { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UIAutomationParameter { + pub r#type: UIAutomationType, + pub pData: *mut core::ffi::c_void, +} +impl Default for UIAutomationParameter { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UIAutomationPatternInfo { + pub guid: windows_sys::core::GUID, + pub pProgrammaticName: windows_sys::core::PCWSTR, + pub providerInterfaceId: windows_sys::core::GUID, + pub clientInterfaceId: windows_sys::core::GUID, + pub cProperties: u32, + pub pProperties: *mut UIAutomationPropertyInfo, + pub cMethods: u32, + pub pMethods: *mut UIAutomationMethodInfo, + pub cEvents: u32, + pub pEvents: *mut UIAutomationEventInfo, + pub pPatternHandler: *mut core::ffi::c_void, +} +impl Default for UIAutomationPatternInfo { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UIAutomationPropertyInfo { + pub guid: windows_sys::core::GUID, + pub pProgrammaticName: windows_sys::core::PCWSTR, + pub r#type: UIAutomationType, +} +impl Default for UIAutomationPropertyInfo { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type UIAutomationType = i32; +pub const UIAutomationType_Array: UIAutomationType = 65536i32; +pub const UIAutomationType_Bool: UIAutomationType = 2i32; +pub const UIAutomationType_BoolArray: UIAutomationType = 65538i32; +pub const UIAutomationType_Double: UIAutomationType = 4i32; +pub const UIAutomationType_DoubleArray: UIAutomationType = 65540i32; +pub const UIAutomationType_Element: UIAutomationType = 7i32; +pub const UIAutomationType_ElementArray: UIAutomationType = 65543i32; +pub const UIAutomationType_Int: UIAutomationType = 1i32; +pub const UIAutomationType_IntArray: UIAutomationType = 65537i32; +pub const UIAutomationType_Out: UIAutomationType = 131072i32; +pub const UIAutomationType_OutBool: UIAutomationType = 131074i32; +pub const UIAutomationType_OutBoolArray: UIAutomationType = 196610i32; +pub const UIAutomationType_OutDouble: UIAutomationType = 131076i32; +pub const UIAutomationType_OutDoubleArray: UIAutomationType = 196612i32; +pub const UIAutomationType_OutElement: UIAutomationType = 131079i32; +pub const UIAutomationType_OutElementArray: UIAutomationType = 196615i32; +pub const UIAutomationType_OutInt: UIAutomationType = 131073i32; +pub const UIAutomationType_OutIntArray: UIAutomationType = 196609i32; +pub const UIAutomationType_OutPoint: UIAutomationType = 131077i32; +pub const UIAutomationType_OutPointArray: UIAutomationType = 196613i32; +pub const UIAutomationType_OutRect: UIAutomationType = 131078i32; +pub const UIAutomationType_OutRectArray: UIAutomationType = 196614i32; +pub const UIAutomationType_OutString: UIAutomationType = 131075i32; +pub const UIAutomationType_OutStringArray: UIAutomationType = 196611i32; +pub const UIAutomationType_Point: UIAutomationType = 5i32; +pub const UIAutomationType_PointArray: UIAutomationType = 65541i32; +pub const UIAutomationType_Rect: UIAutomationType = 6i32; +pub const UIAutomationType_RectArray: UIAutomationType = 65542i32; +pub const UIAutomationType_String: UIAutomationType = 3i32; +pub const UIAutomationType_StringArray: UIAutomationType = 65539i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UiaAndOrCondition { + pub ConditionType: ConditionType, + pub ppConditions: *mut *mut UiaCondition, + pub cConditions: i32, +} +impl Default for UiaAndOrCondition { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const UiaAppendRuntimeId: u32 = 3u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UiaAsyncContentLoadedEventArgs { + pub Type: EventArgsType, + pub EventId: i32, + pub AsyncContentLoadedState: AsyncContentLoadedState, + pub PercentComplete: f64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UiaCacheRequest { + pub pViewCondition: *mut UiaCondition, + pub Scope: TreeScope, + pub pProperties: *mut i32, + pub cProperties: i32, + pub pPatterns: *mut i32, + pub cPatterns: i32, + pub automationElementMode: AutomationElementMode, +} +impl Default for UiaCacheRequest { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +#[derive(Clone, Copy)] +pub struct UiaChangeInfo { + pub uiaId: i32, + pub payload: super::super::System::Variant::VARIANT, + pub extraInfo: super::super::System::Variant::VARIANT, +} +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +impl Default for UiaChangeInfo { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +#[derive(Clone, Copy)] +pub struct UiaChangesEventArgs { + pub Type: EventArgsType, + pub EventId: i32, + pub EventIdCount: i32, + pub pUiaChanges: *mut UiaChangeInfo, +} +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +impl Default for UiaChangesEventArgs { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UiaCondition { + pub ConditionType: ConditionType, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UiaEventArgs { + pub Type: EventArgsType, + pub EventId: i32, +} +#[cfg(feature = "Win32_System_Com")] +pub type UiaEventCallback = Option; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UiaFindParams { + pub MaxDepth: i32, + pub FindFirst: windows_sys::core::BOOL, + pub ExcludeRoot: windows_sys::core::BOOL, + pub pFindCondition: *mut UiaCondition, +} +impl Default for UiaFindParams { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UiaNotCondition { + pub ConditionType: ConditionType, + pub pCondition: *mut UiaCondition, +} +impl Default for UiaNotCondition { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UiaPoint { + pub x: f64, + pub y: f64, +} +#[repr(C)] +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +#[derive(Clone, Copy)] +pub struct UiaPropertyChangedEventArgs { + pub Type: EventArgsType, + pub EventId: UIA_EVENT_ID, + pub PropertyId: i32, + pub OldValue: super::super::System::Variant::VARIANT, + pub NewValue: super::super::System::Variant::VARIANT, +} +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +impl Default for UiaPropertyChangedEventArgs { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +#[derive(Clone, Copy)] +pub struct UiaPropertyCondition { + pub ConditionType: ConditionType, + pub PropertyId: UIA_PROPERTY_ID, + pub Value: super::super::System::Variant::VARIANT, + pub Flags: PropertyConditionFlags, +} +#[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] +impl Default for UiaPropertyCondition { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[cfg(feature = "Win32_System_Com")] +pub type UiaProviderCallback = Option *mut super::super::System::Com::SAFEARRAY>; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UiaRect { + pub left: f64, + pub top: f64, + pub width: f64, + pub height: f64, +} +pub const UiaRootObjectId: i32 = -25i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UiaStructureChangedEventArgs { + pub Type: EventArgsType, + pub EventId: i32, + pub StructureChangeType: StructureChangeType, + pub pRuntimeId: *mut i32, + pub cRuntimeIdLen: i32, +} +impl Default for UiaStructureChangedEventArgs { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_System_Com")] +#[derive(Clone, Copy)] +pub struct UiaTextEditTextChangedEventArgs { + pub Type: EventArgsType, + pub EventId: i32, + pub TextEditChangeType: TextEditChangeType, + pub pTextChange: *mut super::super::System::Com::SAFEARRAY, +} +#[cfg(feature = "Win32_System_Com")] +impl Default for UiaTextEditTextChangedEventArgs { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct UiaWindowClosedEventArgs { + pub Type: EventArgsType, + pub EventId: i32, + pub pRuntimeId: *mut i32, + pub cRuntimeIdLen: i32, +} +impl Default for UiaWindowClosedEventArgs { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const Value_IsReadOnly_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xeb090f30_e24c_4799_a705_0d247bc037f8); +pub const Value_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x17faad9e_c877_475b_b933_77332779b637); +pub const Value_Value_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe95f5e64_269f_4a85_ba99_4092c3ea2986); +pub const VirtualizedItem_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xf510173e_2e71_45e9_a6e5_62f6ed8289d5); +pub type VisualEffects = i32; +pub const VisualEffects_Bevel: VisualEffects = 16i32; +pub const VisualEffects_Glow: VisualEffects = 4i32; +pub const VisualEffects_None: VisualEffects = 0i32; +pub const VisualEffects_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe61a8565_aad9_46d7_9e70_4e8a8420d420); +pub const VisualEffects_Reflection: VisualEffects = 2i32; +pub const VisualEffects_Shadow: VisualEffects = 1i32; +pub const VisualEffects_SoftEdges: VisualEffects = 8i32; +pub type WINEVENTPROC = Option; +pub type WindowInteractionState = i32; +pub const WindowInteractionState_BlockedByModalWindow: WindowInteractionState = 3i32; +pub const WindowInteractionState_Closing: WindowInteractionState = 1i32; +pub const WindowInteractionState_NotResponding: WindowInteractionState = 4i32; +pub const WindowInteractionState_ReadyForUserInteraction: WindowInteractionState = 2i32; +pub const WindowInteractionState_Running: WindowInteractionState = 0i32; +pub type WindowVisualState = i32; +pub const WindowVisualState_Maximized: WindowVisualState = 1i32; +pub const WindowVisualState_Minimized: WindowVisualState = 2i32; +pub const WindowVisualState_Normal: WindowVisualState = 0i32; +pub const Window_CanMaximize_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x64fff53f_635d_41c1_950c_cb5adfbe28e3); +pub const Window_CanMinimize_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xb73b4625_5988_4b97_b4c2_a6fe6e78c8c6); +pub const Window_Control_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xe13a7242_f462_4f4d_aec1_53b28d6c3290); +pub const Window_IsModal_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xff4e6892_37b9_4fca_8532_ffe674ecfeed); +pub const Window_IsTopmost_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xef7d85d3_0937_4962_9241_b62345f24041); +pub const Window_Pattern_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x27901735_c760_4994_ad11_5919e606b110); +pub const Window_WindowClosed_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xedf141f8_fa67_4e22_bbf7_944e05735ee2); +pub const Window_WindowInteractionState_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4fed26a4_0455_4fa2_b21c_c4da2db1ff9c); +pub const Window_WindowOpened_Event_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xd3e81d06_de45_4f2f_9633_de9e02fb65af); +pub const Window_WindowVisualState_Property_GUID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x4ab7905f_e860_453e_a30a_f6431e5daad5); +pub type ZoomUnit = i32; +pub const ZoomUnit_LargeDecrement: ZoomUnit = 1i32; +pub const ZoomUnit_LargeIncrement: ZoomUnit = 3i32; +pub const ZoomUnit_NoAmount: ZoomUnit = 0i32; +pub const ZoomUnit_SmallDecrement: ZoomUnit = 2i32; +pub const ZoomUnit_SmallIncrement: ZoomUnit = 4i32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/ColorSystem/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/ColorSystem/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..b088ae64f5ab14e3b46b299086c4d2007b895a87 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/ColorSystem/mod.rs @@ -0,0 +1,788 @@ +windows_link::link!("mscms.dll" "system" fn AssociateColorProfileWithDeviceA(pmachinename : windows_sys::core::PCSTR, pprofilename : windows_sys::core::PCSTR, pdevicename : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn AssociateColorProfileWithDeviceW(pmachinename : windows_sys::core::PCWSTR, pprofilename : windows_sys::core::PCWSTR, pdevicename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMCheckColors(hcmtransform : isize, lpainputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, lparesult : *mut u8) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("icm32.dll" "system" fn CMCheckColorsInGamut(hcmtransform : isize, lpargbtriple : *const super::super::Graphics::Gdi:: RGBTRIPLE, lparesult : *mut u8, ncount : u32) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMCheckRGBs(hcmtransform : isize, lpsrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwstride : u32, lparesult : *mut u8, pfncallback : LPBMCALLBACKFN, ulcallbackdata : super::super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMConvertColorNameToIndex(hprofile : isize, pacolorname : *const *const i8, paindex : *mut u32, dwcount : u32) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMConvertIndexToColorName(hprofile : isize, paindex : *const u32, pacolorname : *mut *mut i8, dwcount : u32) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMCreateDeviceLinkProfile(pahprofiles : *const isize, nprofiles : u32, padwintents : *const u32, nintents : u32, dwflags : u32, lpprofiledata : *mut *mut u8) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMCreateMultiProfileTransform(pahprofiles : *const isize, nprofiles : u32, padwintents : *const u32, nintents : u32, dwflags : u32) -> isize); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("icm32.dll" "system" fn CMCreateProfile(lpcolorspace : *mut LOGCOLORSPACEA, lpprofiledata : *mut *mut core::ffi::c_void) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("icm32.dll" "system" fn CMCreateProfileW(lpcolorspace : *mut LOGCOLORSPACEW, lpprofiledata : *mut *mut core::ffi::c_void) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("icm32.dll" "system" fn CMCreateTransform(lpcolorspace : *const LOGCOLORSPACEA, lpdevcharacter : *const core::ffi::c_void, lptargetdevcharacter : *const core::ffi::c_void) -> isize); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("icm32.dll" "system" fn CMCreateTransformExt(lpcolorspace : *const LOGCOLORSPACEA, lpdevcharacter : *const core::ffi::c_void, lptargetdevcharacter : *const core::ffi::c_void, dwflags : u32) -> isize); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("icm32.dll" "system" fn CMCreateTransformExtW(lpcolorspace : *const LOGCOLORSPACEW, lpdevcharacter : *const core::ffi::c_void, lptargetdevcharacter : *const core::ffi::c_void, dwflags : u32) -> isize); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("icm32.dll" "system" fn CMCreateTransformW(lpcolorspace : *const LOGCOLORSPACEW, lpdevcharacter : *const core::ffi::c_void, lptargetdevcharacter : *const core::ffi::c_void) -> isize); +windows_link::link!("icm32.dll" "system" fn CMDeleteTransform(hcmtransform : isize) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMGetInfo(dwinfo : u32) -> u32); +windows_link::link!("icm32.dll" "system" fn CMGetNamedProfileInfo(hprofile : isize, pnamedprofileinfo : *mut NAMED_PROFILE_INFO) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMIsProfileValid(hprofile : isize, lpbvalid : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMTranslateColors(hcmtransform : isize, lpainputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, lpaoutputcolors : *mut COLOR, ctoutput : COLORTYPE) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMTranslateRGB(hcmtransform : isize, colorref : super::super::Foundation:: COLORREF, lpcolorref : *mut u32, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMTranslateRGBs(hcmtransform : isize, lpsrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwstride : u32, lpdestbits : *mut core::ffi::c_void, bmoutput : BMFORMAT, dwtranslatedirection : u32) -> windows_sys::core::BOOL); +windows_link::link!("icm32.dll" "system" fn CMTranslateRGBsExt(hcmtransform : isize, lpsrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwinputstride : u32, lpdestbits : *mut core::ffi::c_void, bmoutput : BMFORMAT, dwoutputstride : u32, lpfncallback : LPBMCALLBACKFN, ulcallbackdata : super::super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn CheckBitmapBits(hcolortransform : isize, psrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwstride : u32, paresult : *mut u8, pfncallback : LPBMCALLBACKFN, lpcallbackdata : super::super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn CheckColors(hcolortransform : isize, painputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, paresult : *mut u8) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn CheckColorsInGamut(hdc : super::super::Graphics::Gdi:: HDC, lprgbtriple : *const super::super::Graphics::Gdi:: RGBTRIPLE, dlpbuffer : *mut core::ffi::c_void, ncount : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn CloseColorProfile(hprofile : isize) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn ColorCorrectPalette(hdc : super::super::Graphics::Gdi:: HDC, hpal : super::super::Graphics::Gdi:: HPALETTE, defirst : u32, num : u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn ColorMatchToTarget(hdc : super::super::Graphics::Gdi:: HDC, hdctarget : super::super::Graphics::Gdi:: HDC, action : COLOR_MATCH_TO_TARGET_ACTION) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn ColorProfileAddDisplayAssociation(scope : WCS_PROFILE_MANAGEMENT_SCOPE, profilename : windows_sys::core::PCWSTR, targetadapterid : super::super::Foundation:: LUID, sourceid : u32, setasdefault : windows_sys::core::BOOL, associateasadvancedcolor : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("mscms.dll" "system" fn ColorProfileGetDisplayDefault(scope : WCS_PROFILE_MANAGEMENT_SCOPE, targetadapterid : super::super::Foundation:: LUID, sourceid : u32, profiletype : COLORPROFILETYPE, profilesubtype : COLORPROFILESUBTYPE, profilename : *mut windows_sys::core::PWSTR) -> windows_sys::core::HRESULT); +windows_link::link!("mscms.dll" "system" fn ColorProfileGetDisplayList(scope : WCS_PROFILE_MANAGEMENT_SCOPE, targetadapterid : super::super::Foundation:: LUID, sourceid : u32, profilelist : *mut *mut windows_sys::core::PWSTR, profilecount : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("mscms.dll" "system" fn ColorProfileGetDisplayUserScope(targetadapterid : super::super::Foundation:: LUID, sourceid : u32, scope : *mut WCS_PROFILE_MANAGEMENT_SCOPE) -> windows_sys::core::HRESULT); +windows_link::link!("mscms.dll" "system" fn ColorProfileRemoveDisplayAssociation(scope : WCS_PROFILE_MANAGEMENT_SCOPE, profilename : windows_sys::core::PCWSTR, targetadapterid : super::super::Foundation:: LUID, sourceid : u32, dissociateadvancedcolor : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("mscms.dll" "system" fn ColorProfileSetDisplayDefaultAssociation(scope : WCS_PROFILE_MANAGEMENT_SCOPE, profilename : windows_sys::core::PCWSTR, profiletype : COLORPROFILETYPE, profilesubtype : COLORPROFILESUBTYPE, targetadapterid : super::super::Foundation:: LUID, sourceid : u32) -> windows_sys::core::HRESULT); +windows_link::link!("mscms.dll" "system" fn ConvertColorNameToIndex(hprofile : isize, pacolorname : *const *const i8, paindex : *mut u32, dwcount : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn ConvertIndexToColorName(hprofile : isize, paindex : *const u32, pacolorname : *mut *mut i8, dwcount : u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn CreateColorSpaceA(lplcs : *const LOGCOLORSPACEA) -> HCOLORSPACE); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn CreateColorSpaceW(lplcs : *const LOGCOLORSPACEW) -> HCOLORSPACE); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("mscms.dll" "system" fn CreateColorTransformA(plogcolorspace : *const LOGCOLORSPACEA, hdestprofile : isize, htargetprofile : isize, dwflags : u32) -> isize); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("mscms.dll" "system" fn CreateColorTransformW(plogcolorspace : *const LOGCOLORSPACEW, hdestprofile : isize, htargetprofile : isize, dwflags : u32) -> isize); +windows_link::link!("mscms.dll" "system" fn CreateDeviceLinkProfile(hprofile : *const isize, nprofiles : u32, padwintent : *const u32, nintents : u32, dwflags : u32, pprofiledata : *mut *mut u8, indexpreferredcmm : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn CreateMultiProfileTransform(pahprofiles : *const isize, nprofiles : u32, padwintent : *const u32, nintents : u32, dwflags : u32, indexpreferredcmm : u32) -> isize); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("mscms.dll" "system" fn CreateProfileFromLogColorSpaceA(plogcolorspace : *const LOGCOLORSPACEA, pprofile : *mut *mut u8) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("mscms.dll" "system" fn CreateProfileFromLogColorSpaceW(plogcolorspace : *const LOGCOLORSPACEW, pprofile : *mut *mut u8) -> windows_sys::core::BOOL); +windows_link::link!("gdi32.dll" "system" fn DeleteColorSpace(hcs : HCOLORSPACE) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn DeleteColorTransform(hxform : isize) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn DisassociateColorProfileFromDeviceA(pmachinename : windows_sys::core::PCSTR, pprofilename : windows_sys::core::PCSTR, pdevicename : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn DisassociateColorProfileFromDeviceW(pmachinename : windows_sys::core::PCWSTR, pprofilename : windows_sys::core::PCWSTR, pdevicename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn EnumColorProfilesA(pmachinename : windows_sys::core::PCSTR, penumrecord : *const ENUMTYPEA, penumerationbuffer : *mut u8, pdwsizeofenumerationbuffer : *mut u32, pnprofiles : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn EnumColorProfilesW(pmachinename : windows_sys::core::PCWSTR, penumrecord : *const ENUMTYPEW, penumerationbuffer : *mut u8, pdwsizeofenumerationbuffer : *mut u32, pnprofiles : *mut u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn EnumICMProfilesA(hdc : super::super::Graphics::Gdi:: HDC, proc : ICMENUMPROCA, param2 : super::super::Foundation:: LPARAM) -> i32); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn EnumICMProfilesW(hdc : super::super::Graphics::Gdi:: HDC, proc : ICMENUMPROCW, param2 : super::super::Foundation:: LPARAM) -> i32); +windows_link::link!("mscms.dll" "system" fn GetCMMInfo(hcolortransform : isize, param1 : u32) -> u32); +windows_link::link!("mscms.dll" "system" fn GetColorDirectoryA(pmachinename : windows_sys::core::PCSTR, pbuffer : windows_sys::core::PSTR, pdwsize : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetColorDirectoryW(pmachinename : windows_sys::core::PCWSTR, pbuffer : windows_sys::core::PWSTR, pdwsize : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetColorProfileElement(hprofile : isize, tag : u32, dwoffset : u32, pcbelement : *mut u32, pelement : *mut core::ffi::c_void, pbreference : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetColorProfileElementTag(hprofile : isize, dwindex : u32, ptag : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetColorProfileFromHandle(hprofile : isize, pprofile : *mut u8, pcbprofile : *mut u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("mscms.dll" "system" fn GetColorProfileHeader(hprofile : isize, pheader : *mut PROFILEHEADER) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetColorSpace(hdc : super::super::Graphics::Gdi:: HDC) -> HCOLORSPACE); +windows_link::link!("mscms.dll" "system" fn GetCountColorProfileElements(hprofile : isize, pnelementcount : *mut u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetDeviceGammaRamp(hdc : super::super::Graphics::Gdi:: HDC, lpramp : *mut core::ffi::c_void) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetICMProfileA(hdc : super::super::Graphics::Gdi:: HDC, pbufsize : *mut u32, pszfilename : windows_sys::core::PSTR) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetICMProfileW(hdc : super::super::Graphics::Gdi:: HDC, pbufsize : *mut u32, pszfilename : windows_sys::core::PWSTR) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetLogColorSpaceA(hcolorspace : HCOLORSPACE, lpbuffer : *mut LOGCOLORSPACEA, nsize : u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn GetLogColorSpaceW(hcolorspace : HCOLORSPACE, lpbuffer : *mut LOGCOLORSPACEW, nsize : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetNamedProfileInfo(hprofile : isize, pnamedprofileinfo : *mut NAMED_PROFILE_INFO) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetPS2ColorRenderingDictionary(hprofile : isize, dwintent : u32, pps2colorrenderingdictionary : *mut u8, pcbps2colorrenderingdictionary : *mut u32, pbbinary : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetPS2ColorRenderingIntent(hprofile : isize, dwintent : u32, pbuffer : *mut u8, pcbps2colorrenderingintent : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetPS2ColorSpaceArray(hprofile : isize, dwintent : u32, dwcsatype : u32, pps2colorspacearray : *mut u8, pcbps2colorspacearray : *mut u32, pbbinary : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetStandardColorSpaceProfileA(pmachinename : windows_sys::core::PCSTR, dwscs : u32, pbuffer : windows_sys::core::PSTR, pcbsize : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn GetStandardColorSpaceProfileW(pmachinename : windows_sys::core::PCWSTR, dwscs : u32, pbuffer : windows_sys::core::PWSTR, pcbsize : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn InstallColorProfileA(pmachinename : windows_sys::core::PCSTR, pprofilename : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn InstallColorProfileW(pmachinename : windows_sys::core::PCWSTR, pprofilename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn IsColorProfileTagPresent(hprofile : isize, tag : u32, pbpresent : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn IsColorProfileValid(hprofile : isize, pbvalid : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn OpenColorProfileA(pprofile : *const PROFILE, dwdesiredaccess : u32, dwsharemode : u32, dwcreationmode : u32) -> isize); +windows_link::link!("mscms.dll" "system" fn OpenColorProfileW(pprofile : *const PROFILE, dwdesiredaccess : u32, dwsharemode : u32, dwcreationmode : u32) -> isize); +windows_link::link!("mscms.dll" "system" fn RegisterCMMA(pmachinename : windows_sys::core::PCSTR, cmmid : u32, pcmmdll : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn RegisterCMMW(pmachinename : windows_sys::core::PCWSTR, cmmid : u32, pcmmdll : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn SelectCMM(dwcmmtype : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn SetColorProfileElement(hprofile : isize, tag : u32, dwoffset : u32, pcbelement : *const u32, pelement : *const core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn SetColorProfileElementReference(hprofile : isize, newtag : u32, reftag : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn SetColorProfileElementSize(hprofile : isize, tagtype : u32, pcbelement : u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("mscms.dll" "system" fn SetColorProfileHeader(hprofile : isize, pheader : *const PROFILEHEADER) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn SetColorSpace(hdc : super::super::Graphics::Gdi:: HDC, hcs : HCOLORSPACE) -> HCOLORSPACE); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn SetDeviceGammaRamp(hdc : super::super::Graphics::Gdi:: HDC, lpramp : *const core::ffi::c_void) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn SetICMMode(hdc : super::super::Graphics::Gdi:: HDC, mode : ICM_MODE) -> i32); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn SetICMProfileA(hdc : super::super::Graphics::Gdi:: HDC, lpfilename : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("gdi32.dll" "system" fn SetICMProfileW(hdc : super::super::Graphics::Gdi:: HDC, lpfilename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn SetStandardColorSpaceProfileA(pmachinename : windows_sys::core::PCSTR, dwprofileid : u32, pprofilename : windows_sys::core::PCSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn SetStandardColorSpaceProfileW(pmachinename : windows_sys::core::PCWSTR, dwprofileid : u32, pprofilename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("icmui.dll" "system" fn SetupColorMatchingA(pcms : *mut COLORMATCHSETUPA) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("icmui.dll" "system" fn SetupColorMatchingW(pcms : *mut COLORMATCHSETUPW) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn TranslateBitmapBits(hcolortransform : isize, psrcbits : *const core::ffi::c_void, bminput : BMFORMAT, dwwidth : u32, dwheight : u32, dwinputstride : u32, pdestbits : *mut core::ffi::c_void, bmoutput : BMFORMAT, dwoutputstride : u32, pfncallback : LPBMCALLBACKFN, ulcallbackdata : super::super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn TranslateColors(hcolortransform : isize, painputcolors : *const COLOR, ncolors : u32, ctinput : COLORTYPE, paoutputcolors : *mut COLOR, ctoutput : COLORTYPE) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn UninstallColorProfileA(pmachinename : windows_sys::core::PCSTR, pprofilename : windows_sys::core::PCSTR, bdelete : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn UninstallColorProfileW(pmachinename : windows_sys::core::PCWSTR, pprofilename : windows_sys::core::PCWSTR, bdelete : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn UnregisterCMMA(pmachinename : windows_sys::core::PCSTR, cmmid : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn UnregisterCMMW(pmachinename : windows_sys::core::PCWSTR, cmmid : u32) -> windows_sys::core::BOOL); +windows_link::link!("gdi32.dll" "system" fn UpdateICMRegKeyA(reserved : u32, lpszcmid : windows_sys::core::PCSTR, lpszfilename : windows_sys::core::PCSTR, command : ICM_COMMAND) -> windows_sys::core::BOOL); +windows_link::link!("gdi32.dll" "system" fn UpdateICMRegKeyW(reserved : u32, lpszcmid : windows_sys::core::PCWSTR, lpszfilename : windows_sys::core::PCWSTR, command : ICM_COMMAND) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsAssociateColorProfileWithDevice(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pprofilename : windows_sys::core::PCWSTR, pdevicename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsCheckColors(hcolortransform : isize, ncolors : u32, ninputchannels : u32, cdtinput : COLORDATATYPE, cbinput : u32, pinputdata : *const core::ffi::c_void, paresult : *mut u8) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsCreateIccProfile(hwcsprofile : isize, dwoptions : u32) -> isize); +windows_link::link!("mscms.dll" "system" fn WcsDisassociateColorProfileFromDevice(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pprofilename : windows_sys::core::PCWSTR, pdevicename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsEnumColorProfiles(scope : WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord : *const ENUMTYPEW, pbuffer : *mut u8, dwsize : u32, pnprofiles : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsEnumColorProfilesSize(scope : WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord : *const ENUMTYPEW, pdwsize : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsGetCalibrationManagementState(pbisenabled : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsGetDefaultColorProfile(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pdevicename : windows_sys::core::PCWSTR, cptcolorprofiletype : COLORPROFILETYPE, cpstcolorprofilesubtype : COLORPROFILESUBTYPE, dwprofileid : u32, cbprofilename : u32, pprofilename : windows_sys::core::PWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsGetDefaultColorProfileSize(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pdevicename : windows_sys::core::PCWSTR, cptcolorprofiletype : COLORPROFILETYPE, cpstcolorprofilesubtype : COLORPROFILESUBTYPE, dwprofileid : u32, pcbprofilename : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsGetDefaultRenderingIntent(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pdwrenderingintent : *mut u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsGetUsePerUserProfiles(pdevicename : windows_sys::core::PCWSTR, dwdeviceclass : u32, puseperuserprofiles : *mut windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsOpenColorProfileA(pcdmpprofile : *const PROFILE, pcampprofile : *const PROFILE, pgmmpprofile : *const PROFILE, dwdesireaccess : u32, dwsharemode : u32, dwcreationmode : u32, dwflags : u32) -> isize); +windows_link::link!("mscms.dll" "system" fn WcsOpenColorProfileW(pcdmpprofile : *const PROFILE, pcampprofile : *const PROFILE, pgmmpprofile : *const PROFILE, dwdesireaccess : u32, dwsharemode : u32, dwcreationmode : u32, dwflags : u32) -> isize); +windows_link::link!("mscms.dll" "system" fn WcsSetCalibrationManagementState(bisenabled : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsSetDefaultColorProfile(scope : WCS_PROFILE_MANAGEMENT_SCOPE, pdevicename : windows_sys::core::PCWSTR, cptcolorprofiletype : COLORPROFILETYPE, cpstcolorprofilesubtype : COLORPROFILESUBTYPE, dwprofileid : u32, pprofilename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsSetDefaultRenderingIntent(scope : WCS_PROFILE_MANAGEMENT_SCOPE, dwrenderingintent : u32) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsSetUsePerUserProfiles(pdevicename : windows_sys::core::PCWSTR, dwdeviceclass : u32, useperuserprofiles : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("mscms.dll" "system" fn WcsTranslateColors(hcolortransform : isize, ncolors : u32, ninputchannels : u32, cdtinput : COLORDATATYPE, cbinput : u32, pinputdata : *const core::ffi::c_void, noutputchannels : u32, cdtoutput : COLORDATATYPE, cboutput : u32, poutputdata : *mut core::ffi::c_void) -> windows_sys::core::BOOL); +pub const ATTRIB_MATTE: u32 = 2u32; +pub const ATTRIB_TRANSPARENCY: u32 = 1u32; +pub const BEST_MODE: u32 = 3u32; +pub type BMFORMAT = i32; +pub const BM_10b_G3CH: BMFORMAT = 1028i32; +pub const BM_10b_Lab: BMFORMAT = 1027i32; +pub const BM_10b_RGB: BMFORMAT = 9i32; +pub const BM_10b_XYZ: BMFORMAT = 1025i32; +pub const BM_10b_Yxy: BMFORMAT = 1026i32; +pub const BM_16b_G3CH: BMFORMAT = 1284i32; +pub const BM_16b_GRAY: BMFORMAT = 1285i32; +pub const BM_16b_Lab: BMFORMAT = 1283i32; +pub const BM_16b_RGB: BMFORMAT = 10i32; +pub const BM_16b_XYZ: BMFORMAT = 1281i32; +pub const BM_16b_Yxy: BMFORMAT = 1282i32; +pub const BM_32b_scARGB: BMFORMAT = 1538i32; +pub const BM_32b_scRGB: BMFORMAT = 1537i32; +pub const BM_565RGB: BMFORMAT = 1i32; +pub const BM_5CHANNEL: BMFORMAT = 517i32; +pub const BM_6CHANNEL: BMFORMAT = 518i32; +pub const BM_7CHANNEL: BMFORMAT = 519i32; +pub const BM_8CHANNEL: BMFORMAT = 520i32; +pub const BM_BGRTRIPLETS: BMFORMAT = 4i32; +pub const BM_CMYKQUADS: BMFORMAT = 32i32; +pub const BM_G3CHTRIPLETS: BMFORMAT = 516i32; +pub const BM_GRAY: BMFORMAT = 521i32; +pub const BM_KYMCQUADS: BMFORMAT = 773i32; +pub const BM_LabTRIPLETS: BMFORMAT = 515i32; +pub const BM_NAMED_INDEX: BMFORMAT = 1029i32; +pub const BM_R10G10B10A2: BMFORMAT = 1793i32; +pub const BM_R10G10B10A2_XR: BMFORMAT = 1794i32; +pub const BM_R16G16B16A16_FLOAT: BMFORMAT = 1795i32; +pub const BM_RGBTRIPLETS: BMFORMAT = 2i32; +pub const BM_S2DOT13FIXED_scARGB: BMFORMAT = 1540i32; +pub const BM_S2DOT13FIXED_scRGB: BMFORMAT = 1539i32; +pub const BM_XYZTRIPLETS: BMFORMAT = 513i32; +pub const BM_YxyTRIPLETS: BMFORMAT = 514i32; +pub const BM_x555G3CH: BMFORMAT = 260i32; +pub const BM_x555Lab: BMFORMAT = 259i32; +pub const BM_x555RGB: BMFORMAT = 0i32; +pub const BM_x555XYZ: BMFORMAT = 257i32; +pub const BM_x555Yxy: BMFORMAT = 258i32; +pub const BM_xBGRQUADS: BMFORMAT = 16i32; +pub const BM_xG3CHQUADS: BMFORMAT = 772i32; +pub const BM_xRGBQUADS: BMFORMAT = 8i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct BlackInformation { + pub fBlackOnly: windows_sys::core::BOOL, + pub blackWeight: f32, +} +pub const CATID_WcsPlugin: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa0b402e0_8240_405f_8a16_8a5b4df2f0dd); +pub const CMM_DESCRIPTION: u32 = 5u32; +pub const CMM_DLL_VERSION: u32 = 3u32; +pub const CMM_DRIVER_VERSION: u32 = 2u32; +pub const CMM_FROM_PROFILE: u32 = 0u32; +pub const CMM_IDENT: u32 = 1u32; +pub const CMM_LOGOICON: u32 = 6u32; +pub const CMM_VERSION: u32 = 4u32; +pub const CMM_WIN_VERSION: u32 = 0u32; +pub const CMS_BACKWARD: u32 = 1u32; +pub const CMS_DISABLEICM: u32 = 1u32; +pub const CMS_DISABLEINTENT: u32 = 1024u32; +pub const CMS_DISABLERENDERINTENT: u32 = 2048u32; +pub const CMS_ENABLEPROOFING: u32 = 2u32; +pub const CMS_FORWARD: u32 = 0u32; +pub const CMS_MONITOROVERFLOW: i32 = -2147483648i32; +pub const CMS_PRINTEROVERFLOW: i32 = 1073741824i32; +pub const CMS_SETMONITORPROFILE: u32 = 16u32; +pub const CMS_SETPRINTERPROFILE: u32 = 32u32; +pub const CMS_SETPROOFINTENT: u32 = 8u32; +pub const CMS_SETRENDERINTENT: u32 = 4u32; +pub const CMS_SETTARGETPROFILE: u32 = 64u32; +pub const CMS_TARGETOVERFLOW: i32 = 536870912i32; +pub const CMS_USEAPPLYCALLBACK: u32 = 256u32; +pub const CMS_USEDESCRIPTION: u32 = 512u32; +pub const CMS_USEHOOK: u32 = 128u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct CMYKCOLOR { + pub cyan: u16, + pub magenta: u16, + pub yellow: u16, + pub black: u16, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union COLOR { + pub gray: GRAYCOLOR, + pub rgb: RGBCOLOR, + pub cmyk: CMYKCOLOR, + pub XYZ: XYZCOLOR, + pub Yxy: YxyCOLOR, + pub Lab: LabCOLOR, + pub gen3ch: GENERIC3CHANNEL, + pub named: NAMEDCOLOR, + pub hifi: HiFiCOLOR, + pub Anonymous: COLOR_0, +} +impl Default for COLOR { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct COLOR_0 { + pub reserved1: u32, + pub reserved2: *mut core::ffi::c_void, +} +impl Default for COLOR_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type COLORDATATYPE = i32; +#[repr(C)] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub struct COLORMATCHSETUPA { + pub dwSize: u32, + pub dwVersion: u32, + pub dwFlags: u32, + pub hwndOwner: super::super::Foundation::HWND, + pub pSourceName: windows_sys::core::PCSTR, + pub pDisplayName: windows_sys::core::PCSTR, + pub pPrinterName: windows_sys::core::PCSTR, + pub dwRenderIntent: u32, + pub dwProofingIntent: u32, + pub pMonitorProfile: windows_sys::core::PSTR, + pub ccMonitorProfile: u32, + pub pPrinterProfile: windows_sys::core::PSTR, + pub ccPrinterProfile: u32, + pub pTargetProfile: windows_sys::core::PSTR, + pub ccTargetProfile: u32, + pub lpfnHook: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub lpfnApplyCallback: PCMSCALLBACKA, + pub lParamApplyCallback: super::super::Foundation::LPARAM, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for COLORMATCHSETUPA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub struct COLORMATCHSETUPW { + pub dwSize: u32, + pub dwVersion: u32, + pub dwFlags: u32, + pub hwndOwner: super::super::Foundation::HWND, + pub pSourceName: windows_sys::core::PCWSTR, + pub pDisplayName: windows_sys::core::PCWSTR, + pub pPrinterName: windows_sys::core::PCWSTR, + pub dwRenderIntent: u32, + pub dwProofingIntent: u32, + pub pMonitorProfile: windows_sys::core::PWSTR, + pub ccMonitorProfile: u32, + pub pPrinterProfile: windows_sys::core::PWSTR, + pub ccPrinterProfile: u32, + pub pTargetProfile: windows_sys::core::PWSTR, + pub ccTargetProfile: u32, + pub lpfnHook: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub lpfnApplyCallback: PCMSCALLBACKW, + pub lParamApplyCallback: super::super::Foundation::LPARAM, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for COLORMATCHSETUPW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type COLORPROFILESUBTYPE = i32; +pub type COLORPROFILETYPE = i32; +pub type COLORTYPE = i32; +pub const COLOR_10b_R10G10B10A2: COLORDATATYPE = 5i32; +pub const COLOR_10b_R10G10B10A2_XR: COLORDATATYPE = 6i32; +pub const COLOR_3_CHANNEL: COLORTYPE = 6i32; +pub const COLOR_5_CHANNEL: COLORTYPE = 8i32; +pub const COLOR_6_CHANNEL: COLORTYPE = 9i32; +pub const COLOR_7_CHANNEL: COLORTYPE = 10i32; +pub const COLOR_8_CHANNEL: COLORTYPE = 11i32; +pub const COLOR_BYTE: COLORDATATYPE = 1i32; +pub const COLOR_CMYK: COLORTYPE = 7i32; +pub const COLOR_FLOAT: COLORDATATYPE = 3i32; +pub const COLOR_FLOAT16: COLORDATATYPE = 7i32; +pub const COLOR_GRAY: COLORTYPE = 1i32; +pub const COLOR_Lab: COLORTYPE = 5i32; +pub type COLOR_MATCH_TO_TARGET_ACTION = u32; +pub const COLOR_MATCH_VERSION: u32 = 512u32; +pub const COLOR_NAMED: COLORTYPE = 12i32; +pub const COLOR_RGB: COLORTYPE = 2i32; +pub const COLOR_S2DOT13FIXED: COLORDATATYPE = 4i32; +pub const COLOR_WORD: COLORDATATYPE = 2i32; +pub const COLOR_XYZ: COLORTYPE = 3i32; +pub const COLOR_Yxy: COLORTYPE = 4i32; +pub const CPST_ABSOLUTE_COLORIMETRIC: COLORPROFILESUBTYPE = 3i32; +pub const CPST_CUSTOM_WORKING_SPACE: COLORPROFILESUBTYPE = 6i32; +pub const CPST_EXTENDED_DISPLAY_COLOR_MODE: COLORPROFILESUBTYPE = 8i32; +pub const CPST_NONE: COLORPROFILESUBTYPE = 4i32; +pub const CPST_PERCEPTUAL: COLORPROFILESUBTYPE = 0i32; +pub const CPST_RELATIVE_COLORIMETRIC: COLORPROFILESUBTYPE = 1i32; +pub const CPST_RGB_WORKING_SPACE: COLORPROFILESUBTYPE = 5i32; +pub const CPST_SATURATION: COLORPROFILESUBTYPE = 2i32; +pub const CPST_STANDARD_DISPLAY_COLOR_MODE: COLORPROFILESUBTYPE = 7i32; +pub const CPT_CAMP: COLORPROFILETYPE = 2i32; +pub const CPT_DMP: COLORPROFILETYPE = 1i32; +pub const CPT_GMMP: COLORPROFILETYPE = 3i32; +pub const CPT_ICC: COLORPROFILETYPE = 0i32; +pub const CSA_A: u32 = 1u32; +pub const CSA_ABC: u32 = 2u32; +pub const CSA_CMYK: u32 = 7u32; +pub const CSA_DEF: u32 = 3u32; +pub const CSA_DEFG: u32 = 4u32; +pub const CSA_GRAY: u32 = 5u32; +pub const CSA_Lab: u32 = 8u32; +pub const CSA_RGB: u32 = 6u32; +pub const CS_DELETE_TRANSFORM: COLOR_MATCH_TO_TARGET_ACTION = 3u32; +pub const CS_DISABLE: COLOR_MATCH_TO_TARGET_ACTION = 2u32; +pub const CS_ENABLE: COLOR_MATCH_TO_TARGET_ACTION = 1u32; +pub const DONT_USE_EMBEDDED_WCS_PROFILES: i32 = 1i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct EMRCREATECOLORSPACE { + pub emr: super::super::Graphics::Gdi::EMR, + pub ihCS: u32, + pub lcs: LOGCOLORSPACEA, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct EMRCREATECOLORSPACEW { + pub emr: super::super::Graphics::Gdi::EMR, + pub ihCS: u32, + pub lcs: LOGCOLORSPACEW, + pub dwFlags: u32, + pub cbData: u32, + pub Data: [u8; 1], +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for EMRCREATECOLORSPACEW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const ENABLE_GAMUT_CHECKING: u32 = 65536u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct ENUMTYPEA { + pub dwSize: u32, + pub dwVersion: u32, + pub dwFields: u32, + pub pDeviceName: windows_sys::core::PCSTR, + pub dwMediaType: u32, + pub dwDitheringMode: u32, + pub dwResolution: [u32; 2], + pub dwCMMType: u32, + pub dwClass: u32, + pub dwDataColorSpace: u32, + pub dwConnectionSpace: u32, + pub dwSignature: u32, + pub dwPlatform: u32, + pub dwProfileFlags: u32, + pub dwManufacturer: u32, + pub dwModel: u32, + pub dwAttributes: [u32; 2], + pub dwRenderingIntent: u32, + pub dwCreator: u32, + pub dwDeviceClass: u32, +} +impl Default for ENUMTYPEA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct ENUMTYPEW { + pub dwSize: u32, + pub dwVersion: u32, + pub dwFields: u32, + pub pDeviceName: windows_sys::core::PCWSTR, + pub dwMediaType: u32, + pub dwDitheringMode: u32, + pub dwResolution: [u32; 2], + pub dwCMMType: u32, + pub dwClass: u32, + pub dwDataColorSpace: u32, + pub dwConnectionSpace: u32, + pub dwSignature: u32, + pub dwPlatform: u32, + pub dwProfileFlags: u32, + pub dwManufacturer: u32, + pub dwModel: u32, + pub dwAttributes: [u32; 2], + pub dwRenderingIntent: u32, + pub dwCreator: u32, + pub dwDeviceClass: u32, +} +impl Default for ENUMTYPEW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const ENUM_TYPE_VERSION: u32 = 768u32; +pub const ET_ATTRIBUTES: u32 = 8192u32; +pub const ET_CLASS: u32 = 32u32; +pub const ET_CMMTYPE: u32 = 16u32; +pub const ET_CONNECTIONSPACE: u32 = 128u32; +pub const ET_CREATOR: u32 = 32768u32; +pub const ET_DATACOLORSPACE: u32 = 64u32; +pub const ET_DEVICECLASS: u32 = 65536u32; +pub const ET_DEVICENAME: u32 = 1u32; +pub const ET_DITHERMODE: u32 = 4u32; +pub const ET_EXTENDEDDISPLAYCOLOR: u32 = 262144u32; +pub const ET_MANUFACTURER: u32 = 2048u32; +pub const ET_MEDIATYPE: u32 = 2u32; +pub const ET_MODEL: u32 = 4096u32; +pub const ET_PLATFORM: u32 = 512u32; +pub const ET_PROFILEFLAGS: u32 = 1024u32; +pub const ET_RENDERINGINTENT: u32 = 16384u32; +pub const ET_RESOLUTION: u32 = 8u32; +pub const ET_SIGNATURE: u32 = 256u32; +pub const ET_STANDARDDISPLAYCOLOR: u32 = 131072u32; +pub const FAST_TRANSLATE: u32 = 262144u32; +pub const FLAG_DEPENDENTONDATA: u32 = 2u32; +pub const FLAG_EMBEDDEDPROFILE: u32 = 1u32; +pub const FLAG_ENABLE_CHROMATIC_ADAPTATION: u32 = 33554432u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct GENERIC3CHANNEL { + pub ch1: u16, + pub ch2: u16, + pub ch3: u16, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct GRAYCOLOR { + pub gray: u16, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct GamutBoundaryDescription { + pub pPrimaries: *mut PrimaryJabColors, + pub cNeutralSamples: u32, + pub pNeutralSamples: *mut JabColorF, + pub pReferenceShell: *mut GamutShell, + pub pPlausibleShell: *mut GamutShell, + pub pPossibleShell: *mut GamutShell, +} +impl Default for GamutBoundaryDescription { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct GamutShell { + pub JMin: f32, + pub JMax: f32, + pub cVertices: u32, + pub cTriangles: u32, + pub pVertices: *mut JabColorF, + pub pTriangles: *mut GamutShellTriangle, +} +impl Default for GamutShell { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct GamutShellTriangle { + pub aVertexIndex: [u32; 3], +} +impl Default for GamutShellTriangle { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type HCOLORSPACE = *mut core::ffi::c_void; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct HiFiCOLOR { + pub channel: [u8; 8], +} +impl Default for HiFiCOLOR { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type ICMENUMPROCA = Option i32>; +pub type ICMENUMPROCW = Option i32>; +pub const ICM_ADDPROFILE: ICM_COMMAND = 1u32; +pub type ICM_COMMAND = u32; +pub const ICM_DELETEPROFILE: ICM_COMMAND = 2u32; +pub const ICM_DONE_OUTSIDEDC: ICM_MODE = 4i32; +pub type ICM_MODE = i32; +pub const ICM_OFF: ICM_MODE = 1i32; +pub const ICM_ON: ICM_MODE = 2i32; +pub const ICM_QUERY: ICM_MODE = 3i32; +pub const ICM_QUERYMATCH: ICM_COMMAND = 7u32; +pub const ICM_QUERYPROFILE: ICM_COMMAND = 3u32; +pub const ICM_REGISTERICMATCHER: ICM_COMMAND = 5u32; +pub const ICM_SETDEFAULTPROFILE: ICM_COMMAND = 4u32; +pub const ICM_UNREGISTERICMATCHER: ICM_COMMAND = 6u32; +pub const INDEX_DONT_CARE: u32 = 0u32; +pub const INTENT_ABSOLUTE_COLORIMETRIC: u32 = 3u32; +pub const INTENT_PERCEPTUAL: u32 = 0u32; +pub const INTENT_RELATIVE_COLORIMETRIC: u32 = 1u32; +pub const INTENT_SATURATION: u32 = 2u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct JChColorF { + pub J: f32, + pub C: f32, + pub h: f32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct JabColorF { + pub J: f32, + pub a: f32, + pub b: f32, +} +pub type LCSCSTYPE = i32; +pub const LCS_CALIBRATED_RGB: LCSCSTYPE = 0i32; +pub const LCS_WINDOWS_COLOR_SPACE: LCSCSTYPE = 1466527264i32; +pub const LCS_sRGB: LCSCSTYPE = 1934772034i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct LOGCOLORSPACEA { + pub lcsSignature: u32, + pub lcsVersion: u32, + pub lcsSize: u32, + pub lcsCSType: LCSCSTYPE, + pub lcsIntent: i32, + pub lcsEndpoints: super::super::Graphics::Gdi::CIEXYZTRIPLE, + pub lcsGammaRed: u32, + pub lcsGammaGreen: u32, + pub lcsGammaBlue: u32, + pub lcsFilename: [i8; 260], +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for LOGCOLORSPACEA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct LOGCOLORSPACEW { + pub lcsSignature: u32, + pub lcsVersion: u32, + pub lcsSize: u32, + pub lcsCSType: LCSCSTYPE, + pub lcsIntent: i32, + pub lcsEndpoints: super::super::Graphics::Gdi::CIEXYZTRIPLE, + pub lcsGammaRed: u32, + pub lcsGammaGreen: u32, + pub lcsGammaBlue: u32, + pub lcsFilename: [u16; 260], +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for LOGCOLORSPACEW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type LPBMCALLBACKFN = Option windows_sys::core::BOOL>; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LabCOLOR { + pub L: u16, + pub a: u16, + pub b: u16, +} +pub const MAX_COLOR_CHANNELS: u32 = 8u32; +pub const MicrosoftHardwareColorV2: WCS_DEVICE_CAPABILITIES_TYPE = 2i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NAMEDCOLOR { + pub dwIndex: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NAMED_PROFILE_INFO { + pub dwFlags: u32, + pub dwCount: u32, + pub dwCountDevCoordinates: u32, + pub szPrefix: [i8; 32], + pub szSuffix: [i8; 32], +} +impl Default for NAMED_PROFILE_INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const NORMAL_MODE: u32 = 2u32; +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +pub type PCMSCALLBACKA = Option windows_sys::core::BOOL>; +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +pub type PCMSCALLBACKW = Option windows_sys::core::BOOL>; +pub const PRESERVEBLACK: u32 = 1048576u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct PROFILE { + pub dwType: u32, + pub pProfileData: *mut core::ffi::c_void, + pub cbDataSize: u32, +} +impl Default for PROFILE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct PROFILEHEADER { + pub phSize: u32, + pub phCMMType: u32, + pub phVersion: u32, + pub phClass: u32, + pub phDataColorSpace: u32, + pub phConnectionSpace: u32, + pub phDateTime: [u32; 3], + pub phSignature: u32, + pub phPlatform: u32, + pub phProfileFlags: u32, + pub phManufacturer: u32, + pub phModel: u32, + pub phAttributes: [u32; 2], + pub phRenderingIntent: u32, + pub phIlluminant: super::super::Graphics::Gdi::CIEXYZ, + pub phCreator: u32, + pub phReserved: [u8; 44], +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for PROFILEHEADER { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const PROFILE_FILENAME: u32 = 1u32; +pub const PROFILE_MEMBUFFER: u32 = 2u32; +pub const PROFILE_READ: u32 = 1u32; +pub const PROFILE_READWRITE: u32 = 2u32; +pub const PROOF_MODE: u32 = 1u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct PrimaryJabColors { + pub red: JabColorF, + pub yellow: JabColorF, + pub green: JabColorF, + pub cyan: JabColorF, + pub blue: JabColorF, + pub magenta: JabColorF, + pub black: JabColorF, + pub white: JabColorF, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct PrimaryXYZColors { + pub red: XYZColorF, + pub yellow: XYZColorF, + pub green: XYZColorF, + pub cyan: XYZColorF, + pub blue: XYZColorF, + pub magenta: XYZColorF, + pub black: XYZColorF, + pub white: XYZColorF, +} +pub const RESERVED: u32 = 2147483648u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RGBCOLOR { + pub red: u16, + pub green: u16, + pub blue: u16, +} +pub const SEQUENTIAL_TRANSFORM: u32 = 2155872256u32; +pub const USE_RELATIVE_COLORIMETRIC: u32 = 131072u32; +pub const VideoCardGammaTable: WCS_DEVICE_CAPABILITIES_TYPE = 1i32; +pub const WCS_ALWAYS: u32 = 2097152u32; +pub const WCS_DEFAULT: i32 = 0i32; +pub type WCS_DEVICE_CAPABILITIES_TYPE = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct WCS_DEVICE_MHC2_CAPABILITIES { + pub Size: u32, + pub SupportsMhc2: windows_sys::core::BOOL, + pub RegammaLutEntryCount: u32, + pub CscXyzMatrixRows: u32, + pub CscXyzMatrixColumns: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct WCS_DEVICE_VCGT_CAPABILITIES { + pub Size: u32, + pub SupportsVcgt: windows_sys::core::BOOL, +} +pub const WCS_ICCONLY: i32 = 65536i32; +pub type WCS_PROFILE_MANAGEMENT_SCOPE = i32; +pub const WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER: WCS_PROFILE_MANAGEMENT_SCOPE = 1i32; +pub const WCS_PROFILE_MANAGEMENT_SCOPE_SYSTEM_WIDE: WCS_PROFILE_MANAGEMENT_SCOPE = 0i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct XYZCOLOR { + pub X: u16, + pub Y: u16, + pub Z: u16, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct XYZColorF { + pub X: f32, + pub Y: f32, + pub Z: f32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct YxyCOLOR { + pub Y: u16, + pub x: u16, + pub y: u16, +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Controls/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Controls/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..c5be6a57379fbb512b28640b2be2eeb99a1d3026 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Controls/mod.rs @@ -0,0 +1,8163 @@ +#[cfg(feature = "Win32_UI_Controls_Dialogs")] +pub mod Dialogs; +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn BeginBufferedAnimation(hwnd : super::super::Foundation:: HWND, hdctarget : super::super::Graphics::Gdi:: HDC, prctarget : *const super::super::Foundation:: RECT, dwformat : BP_BUFFERFORMAT, ppaintparams : *const BP_PAINTPARAMS, panimationparams : *const BP_ANIMATIONPARAMS, phdcfrom : *mut super::super::Graphics::Gdi:: HDC, phdcto : *mut super::super::Graphics::Gdi:: HDC) -> isize); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn BeginBufferedPaint(hdctarget : super::super::Graphics::Gdi:: HDC, prctarget : *const super::super::Foundation:: RECT, dwformat : BP_BUFFERFORMAT, ppaintparams : *const BP_PAINTPARAMS, phdc : *mut super::super::Graphics::Gdi:: HDC) -> isize); +windows_link::link!("uxtheme.dll" "system" fn BeginPanningFeedback(hwnd : super::super::Foundation:: HWND) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn BufferedPaintClear(hbufferedpaint : isize, prc : *const super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn BufferedPaintInit() -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn BufferedPaintRenderAnimation(hwnd : super::super::Foundation:: HWND, hdctarget : super::super::Graphics::Gdi:: HDC) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn BufferedPaintSetAlpha(hbufferedpaint : isize, prc : *const super::super::Foundation:: RECT, alpha : u8) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn BufferedPaintStopAllAnimations(hwnd : super::super::Foundation:: HWND) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn BufferedPaintUnInit() -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn CheckDlgButton(hdlg : super::super::Foundation:: HWND, nidbutton : i32, ucheck : DLG_BUTTON_CHECK_STATE) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn CheckRadioButton(hdlg : super::super::Foundation:: HWND, nidfirstbutton : i32, nidlastbutton : i32, nidcheckbutton : i32) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn CloseThemeData(htheme : HTHEME) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn CreateMappedBitmap(hinstance : super::super::Foundation:: HINSTANCE, idbitmap : isize, wflags : u32, lpcolormap : *const COLORMAP, inummaps : i32) -> super::super::Graphics::Gdi:: HBITMAP); +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +windows_link::link!("comctl32.dll" "system" fn CreatePropertySheetPageA(constpropsheetpagepointer : *mut PROPSHEETPAGEA) -> HPROPSHEETPAGE); +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +windows_link::link!("comctl32.dll" "system" fn CreatePropertySheetPageW(constpropsheetpagepointer : *mut PROPSHEETPAGEW) -> HPROPSHEETPAGE); +windows_link::link!("comctl32.dll" "system" fn CreateStatusWindowA(style : i32, lpsztext : windows_sys::core::PCSTR, hwndparent : super::super::Foundation:: HWND, wid : u32) -> super::super::Foundation:: HWND); +windows_link::link!("comctl32.dll" "system" fn CreateStatusWindowW(style : i32, lpsztext : windows_sys::core::PCWSTR, hwndparent : super::super::Foundation:: HWND, wid : u32) -> super::super::Foundation:: HWND); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn CreateSyntheticPointerDevice(pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE, maxcount : u32, mode : POINTER_FEEDBACK_MODE) -> HSYNTHETICPOINTERDEVICE); +windows_link::link!("comctl32.dll" "system" fn CreateToolbarEx(hwnd : super::super::Foundation:: HWND, ws : u32, wid : u32, nbitmaps : i32, hbminst : super::super::Foundation:: HINSTANCE, wbmid : usize, lpbuttons : *mut TBBUTTON, inumbuttons : i32, dxbutton : i32, dybutton : i32, dxbitmap : i32, dybitmap : i32, ustructsize : u32) -> super::super::Foundation:: HWND); +windows_link::link!("comctl32.dll" "system" fn CreateUpDownControl(dwstyle : u32, x : i32, y : i32, cx : i32, cy : i32, hparent : super::super::Foundation:: HWND, nid : i32, hinst : super::super::Foundation:: HINSTANCE, hbuddy : super::super::Foundation:: HWND, nupper : i32, nlower : i32, npos : i32) -> super::super::Foundation:: HWND); +windows_link::link!("comctl32.dll" "system" fn DPA_Clone(hdpa : HDPA, hdpanew : HDPA) -> HDPA); +windows_link::link!("comctl32.dll" "system" fn DPA_Create(citemgrow : i32) -> HDPA); +windows_link::link!("comctl32.dll" "system" fn DPA_CreateEx(cpgrow : i32, hheap : super::super::Foundation:: HANDLE) -> HDPA); +windows_link::link!("comctl32.dll" "system" fn DPA_DeleteAllPtrs(hdpa : HDPA) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DPA_DeletePtr(hdpa : HDPA, i : i32) -> *mut core::ffi::c_void); +windows_link::link!("comctl32.dll" "system" fn DPA_Destroy(hdpa : HDPA) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DPA_DestroyCallback(hdpa : HDPA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); +windows_link::link!("comctl32.dll" "system" fn DPA_EnumCallback(hdpa : HDPA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); +windows_link::link!("comctl32.dll" "system" fn DPA_GetPtr(hdpa : HDPA, i : isize) -> *mut core::ffi::c_void); +windows_link::link!("comctl32.dll" "system" fn DPA_GetPtrIndex(hdpa : HDPA, p : *const core::ffi::c_void) -> i32); +windows_link::link!("comctl32.dll" "system" fn DPA_GetSize(hdpa : HDPA) -> u64); +windows_link::link!("comctl32.dll" "system" fn DPA_Grow(pdpa : HDPA, cp : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DPA_InsertPtr(hdpa : HDPA, i : i32, p : *const core::ffi::c_void) -> i32); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("comctl32.dll" "system" fn DPA_LoadStream(phdpa : *mut HDPA, pfn : PFNDPASTREAM, pstream : * mut core::ffi::c_void, pvinstdata : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn DPA_Merge(hdpadest : HDPA, hdpasrc : HDPA, dwflags : u32, pfncompare : PFNDACOMPARE, pfnmerge : PFNDPAMERGE, lparam : super::super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("comctl32.dll" "system" fn DPA_SaveStream(hdpa : HDPA, pfn : PFNDPASTREAM, pstream : * mut core::ffi::c_void, pvinstdata : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn DPA_Search(hdpa : HDPA, pfind : *const core::ffi::c_void, istart : i32, pfncompare : PFNDACOMPARE, lparam : super::super::Foundation:: LPARAM, options : u32) -> i32); +windows_link::link!("comctl32.dll" "system" fn DPA_SetPtr(hdpa : HDPA, i : i32, p : *const core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DPA_Sort(hdpa : HDPA, pfncompare : PFNDACOMPARE, lparam : super::super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DSA_Clone(hdsa : HDSA) -> HDSA); +windows_link::link!("comctl32.dll" "system" fn DSA_Create(cbitem : i32, citemgrow : i32) -> HDSA); +windows_link::link!("comctl32.dll" "system" fn DSA_DeleteAllItems(hdsa : HDSA) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DSA_DeleteItem(hdsa : HDSA, i : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DSA_Destroy(hdsa : HDSA) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DSA_DestroyCallback(hdsa : HDSA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); +windows_link::link!("comctl32.dll" "system" fn DSA_EnumCallback(hdsa : HDSA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); +windows_link::link!("comctl32.dll" "system" fn DSA_GetItem(hdsa : HDSA, i : i32, pitem : *mut core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DSA_GetItemPtr(hdsa : HDSA, i : i32) -> *mut core::ffi::c_void); +windows_link::link!("comctl32.dll" "system" fn DSA_GetSize(hdsa : HDSA) -> u64); +windows_link::link!("comctl32.dll" "system" fn DSA_InsertItem(hdsa : HDSA, i : i32, pitem : *const core::ffi::c_void) -> i32); +windows_link::link!("comctl32.dll" "system" fn DSA_SetItem(hdsa : HDSA, i : i32, pitem : *const core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DSA_Sort(pdsa : HDSA, pfncompare : PFNDACOMPARE, lparam : super::super::Foundation:: LPARAM) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DestroyPropertySheetPage(param0 : HPROPSHEETPAGE) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn DestroySyntheticPointerDevice(device : HSYNTHETICPOINTERDEVICE)); +windows_link::link!("user32.dll" "system" fn DlgDirListA(hdlg : super::super::Foundation:: HWND, lppathspec : windows_sys::core::PSTR, nidlistbox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); +windows_link::link!("user32.dll" "system" fn DlgDirListComboBoxA(hdlg : super::super::Foundation:: HWND, lppathspec : windows_sys::core::PSTR, nidcombobox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); +windows_link::link!("user32.dll" "system" fn DlgDirListComboBoxW(hdlg : super::super::Foundation:: HWND, lppathspec : windows_sys::core::PWSTR, nidcombobox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); +windows_link::link!("user32.dll" "system" fn DlgDirListW(hdlg : super::super::Foundation:: HWND, lppathspec : windows_sys::core::PWSTR, nidlistbox : i32, nidstaticpath : i32, ufiletype : DLG_DIR_LIST_FILE_TYPE) -> i32); +windows_link::link!("user32.dll" "system" fn DlgDirSelectComboBoxExA(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_sys::core::PSTR, cchout : i32, idcombobox : i32) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn DlgDirSelectComboBoxExW(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_sys::core::PWSTR, cchout : i32, idcombobox : i32) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn DlgDirSelectExA(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_sys::core::PSTR, chcount : i32, idlistbox : i32) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn DlgDirSelectExW(hwnddlg : super::super::Foundation:: HWND, lpstring : windows_sys::core::PWSTR, chcount : i32, idlistbox : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn DrawInsert(handparent : super::super::Foundation:: HWND, hlb : super::super::Foundation:: HWND, nitem : i32)); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn DrawShadowText(hdc : super::super::Graphics::Gdi:: HDC, psztext : windows_sys::core::PCWSTR, cch : u32, prc : *const super::super::Foundation:: RECT, dwflags : u32, crtext : super::super::Foundation:: COLORREF, crshadow : super::super::Foundation:: COLORREF, ixoffset : i32, iyoffset : i32) -> i32); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn DrawStatusTextA(hdc : super::super::Graphics::Gdi:: HDC, lprc : *mut super::super::Foundation:: RECT, psztext : windows_sys::core::PCSTR, uflags : u32)); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn DrawStatusTextW(hdc : super::super::Graphics::Gdi:: HDC, lprc : *mut super::super::Foundation:: RECT, psztext : windows_sys::core::PCWSTR, uflags : u32)); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeBackground(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, pcliprect : *const super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeBackgroundEx(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, poptions : *const DTBGOPTS) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeEdge(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, pdestrect : *const super::super::Foundation:: RECT, uedge : super::super::Graphics::Gdi:: DRAWEDGE_FLAGS, uflags : super::super::Graphics::Gdi:: DRAW_EDGE_FLAGS, pcontentrect : *mut super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeIcon(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, himl : HIMAGELIST, iimageindex : i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeParentBackground(hwnd : super::super::Foundation:: HWND, hdc : super::super::Graphics::Gdi:: HDC, prc : *const super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeParentBackgroundEx(hwnd : super::super::Foundation:: HWND, hdc : super::super::Graphics::Gdi:: HDC, dwflags : DRAW_THEME_PARENT_BACKGROUND_FLAGS, prc : *const super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeText(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : windows_sys::core::PCWSTR, cchtext : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, dwtextflags2 : u32, prect : *const super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn DrawThemeTextEx(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : windows_sys::core::PCWSTR, cchtext : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, prect : *mut super::super::Foundation:: RECT, poptions : *const DTTOPTS) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn EnableScrollBar(hwnd : super::super::Foundation:: HWND, wsbflags : u32, warrows : ENABLE_SCROLL_BAR_ARROWS) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn EnableThemeDialogTexture(hwnd : super::super::Foundation:: HWND, dwflags : u32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn EnableTheming(fenable : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn EndBufferedAnimation(hbpanimation : isize, fupdatetarget : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn EndBufferedPaint(hbufferedpaint : isize, fupdatetarget : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn EndPanningFeedback(hwnd : super::super::Foundation:: HWND, fanimateback : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn EvaluateProximityToPolygon(numvertices : u32, controlpolygon : *const super::super::Foundation:: POINT, phittestinginput : *const TOUCH_HIT_TESTING_INPUT, pproximityeval : *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn EvaluateProximityToRect(controlboundingbox : *const super::super::Foundation:: RECT, phittestinginput : *const TOUCH_HIT_TESTING_INPUT, pproximityeval : *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn FlatSB_EnableScrollBar(param0 : super::super::Foundation:: HWND, param1 : i32, param2 : u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn FlatSB_GetScrollInfo(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, param2 : *mut super::WindowsAndMessaging:: SCROLLINFO) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn FlatSB_GetScrollPos(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS) -> i32); +windows_link::link!("comctl32.dll" "system" fn FlatSB_GetScrollProp(param0 : super::super::Foundation:: HWND, propindex : WSB_PROP, param2 : *mut i32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn FlatSB_GetScrollRange(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, param2 : *mut i32, param3 : *mut i32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn FlatSB_SetScrollInfo(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, psi : *mut super::WindowsAndMessaging:: SCROLLINFO, fredraw : windows_sys::core::BOOL) -> i32); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn FlatSB_SetScrollPos(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, pos : i32, fredraw : windows_sys::core::BOOL) -> i32); +windows_link::link!("comctl32.dll" "system" fn FlatSB_SetScrollProp(param0 : super::super::Foundation:: HWND, index : u32, newvalue : isize, param3 : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn FlatSB_SetScrollRange(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, min : i32, max : i32, fredraw : windows_sys::core::BOOL) -> i32); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn FlatSB_ShowScrollBar(param0 : super::super::Foundation:: HWND, code : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, param2 : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetBufferedPaintBits(hbufferedpaint : isize, ppbbuffer : *mut *mut super::super::Graphics::Gdi:: RGBQUAD, pcxrow : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetBufferedPaintDC(hbufferedpaint : isize) -> super::super::Graphics::Gdi:: HDC); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetBufferedPaintTargetDC(hbufferedpaint : isize) -> super::super::Graphics::Gdi:: HDC); +windows_link::link!("uxtheme.dll" "system" fn GetBufferedPaintTargetRect(hbufferedpaint : isize, prc : *mut super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn GetComboBoxInfo(hwndcombo : super::super::Foundation:: HWND, pcbi : *mut COMBOBOXINFO) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn GetCurrentThemeName(pszthemefilename : windows_sys::core::PWSTR, cchmaxnamechars : i32, pszcolorbuff : windows_sys::core::PWSTR, cchmaxcolorchars : i32, pszsizebuff : windows_sys::core::PWSTR, cchmaxsizechars : i32) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn GetEffectiveClientRect(hwnd : super::super::Foundation:: HWND, lprc : *mut super::super::Foundation:: RECT, lpinfo : *const i32)); +windows_link::link!("user32.dll" "system" fn GetListBoxInfo(hwnd : super::super::Foundation:: HWND) -> u32); +windows_link::link!("comctl32.dll" "system" fn GetMUILanguage() -> u16); +windows_link::link!("uxtheme.dll" "system" fn GetThemeAnimationProperty(htheme : HTHEME, istoryboardid : i32, itargetid : i32, eproperty : TA_PROPERTY, pvproperty : *mut core::ffi::c_void, cbsize : u32, pcbsizeout : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeAnimationTransform(htheme : HTHEME, istoryboardid : i32, itargetid : i32, dwtransformindex : u32, ptransform : *mut TA_TRANSFORM, cbsize : u32, pcbsizeout : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeAppProperties() -> SET_THEME_APP_PROPERTIES_FLAGS); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeBackgroundContentRect(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, pboundingrect : *const super::super::Foundation:: RECT, pcontentrect : *mut super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeBackgroundExtent(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, pcontentrect : *const super::super::Foundation:: RECT, pextentrect : *mut super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeBackgroundRegion(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, pregion : *mut super::super::Graphics::Gdi:: HRGN) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeBitmap(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, dwflags : GET_THEME_BITMAP_FLAGS, phbitmap : *mut super::super::Graphics::Gdi:: HBITMAP) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeBool(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pfval : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeColor(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pcolor : *mut super::super::Foundation:: COLORREF) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeDocumentationProperty(pszthemename : windows_sys::core::PCWSTR, pszpropertyname : windows_sys::core::PCWSTR, pszvaluebuff : windows_sys::core::PWSTR, cchmaxvalchars : i32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeEnumValue(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pival : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeFilename(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pszthemefilename : windows_sys::core::PWSTR, cchmaxbuffchars : i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeFont(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ipropid : i32, pfont : *mut super::super::Graphics::Gdi:: LOGFONTW) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeInt(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pival : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeIntList(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pintlist : *mut INTLIST) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeMargins(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ipropid : i32, prc : *const super::super::Foundation:: RECT, pmargins : *mut MARGINS) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeMetric(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ipropid : i32, pival : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemePartSize(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prc : *const super::super::Foundation:: RECT, esize : THEMESIZE, psz : *mut super::super::Foundation:: SIZE) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemePosition(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, ppoint : *mut super::super::Foundation:: POINT) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemePropertyOrigin(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, porigin : *mut PROPERTYORIGIN) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeRect(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, prect : *mut super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeStream(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, ppvstream : *mut *mut core::ffi::c_void, pcbstream : *mut u32, hinst : super::super::Foundation:: HINSTANCE) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeString(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pszbuff : windows_sys::core::PWSTR, cchmaxbuffchars : i32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeSysBool(htheme : HTHEME, iboolid : i32) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn GetThemeSysColor(htheme : HTHEME, icolorid : i32) -> super::super::Foundation:: COLORREF); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeSysColorBrush(htheme : HTHEME, icolorid : i32) -> super::super::Graphics::Gdi:: HBRUSH); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeSysFont(htheme : HTHEME, ifontid : i32, plf : *mut super::super::Graphics::Gdi:: LOGFONTW) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeSysInt(htheme : HTHEME, iintid : i32, pivalue : *mut i32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeSysSize(htheme : HTHEME, isizeid : i32) -> i32); +windows_link::link!("uxtheme.dll" "system" fn GetThemeSysString(htheme : HTHEME, istringid : i32, pszstringbuff : windows_sys::core::PWSTR, cchmaxstringchars : i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeTextExtent(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : windows_sys::core::PCWSTR, cchcharcount : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, pboundingrect : *const super::super::Foundation:: RECT, pextentrect : *mut super::super::Foundation:: RECT) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn GetThemeTextMetrics(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ptm : *mut super::super::Graphics::Gdi:: TEXTMETRICW) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeTimingFunction(htheme : HTHEME, itimingfunctionid : i32, ptimingfunction : *mut TA_TIMINGFUNCTION, cbsize : u32, pcbsizeout : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn GetThemeTransitionDuration(htheme : HTHEME, ipartid : i32, istateidfrom : i32, istateidto : i32, ipropid : i32, pdwduration : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn GetWindowFeedbackSetting(hwnd : super::super::Foundation:: HWND, feedback : FEEDBACK_TYPE, dwflags : u32, psize : *mut u32, config : *mut core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn GetWindowTheme(hwnd : super::super::Foundation:: HWND) -> HTHEME); +windows_link::link!("comctl32.dll" "system" fn HIMAGELIST_QueryInterface(himl : HIMAGELIST, riid : *const windows_sys::core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("uxtheme.dll" "system" fn HitTestThemeBackground(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, dwoptions : HIT_TEST_BACKGROUND_OPTIONS, prect : *const super::super::Foundation:: RECT, hrgn : super::super::Graphics::Gdi:: HRGN, pttest : super::super::Foundation:: POINT, pwhittestcode : *mut u16) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn ImageList_Add(himl : HIMAGELIST, hbmimage : super::super::Graphics::Gdi:: HBITMAP, hbmmask : super::super::Graphics::Gdi:: HBITMAP) -> i32); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn ImageList_AddMasked(himl : HIMAGELIST, hbmimage : super::super::Graphics::Gdi:: HBITMAP, crmask : super::super::Foundation:: COLORREF) -> i32); +windows_link::link!("comctl32.dll" "system" fn ImageList_BeginDrag(himltrack : HIMAGELIST, itrack : i32, dxhotspot : i32, dyhotspot : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_CoCreateInstance(rclsid : *const windows_sys::core::GUID, punkouter : * mut core::ffi::c_void, riid : *const windows_sys::core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn ImageList_Copy(himldst : HIMAGELIST, idst : i32, himlsrc : HIMAGELIST, isrc : i32, uflags : IMAGE_LIST_COPY_FLAGS) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_Create(cx : i32, cy : i32, flags : IMAGELIST_CREATION_FLAGS, cinitial : i32, cgrow : i32) -> HIMAGELIST); +windows_link::link!("comctl32.dll" "system" fn ImageList_Destroy(himl : HIMAGELIST) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_DragEnter(hwndlock : super::super::Foundation:: HWND, x : i32, y : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_DragLeave(hwndlock : super::super::Foundation:: HWND) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_DragMove(x : i32, y : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_DragShowNolock(fshow : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn ImageList_Draw(himl : HIMAGELIST, i : i32, hdcdst : super::super::Graphics::Gdi:: HDC, x : i32, y : i32, fstyle : IMAGE_LIST_DRAW_STYLE) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn ImageList_DrawEx(himl : HIMAGELIST, i : i32, hdcdst : super::super::Graphics::Gdi:: HDC, x : i32, y : i32, dx : i32, dy : i32, rgbbk : super::super::Foundation:: COLORREF, rgbfg : super::super::Foundation:: COLORREF, fstyle : IMAGE_LIST_DRAW_STYLE) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn ImageList_DrawIndirect(pimldp : *const IMAGELISTDRAWPARAMS) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_Duplicate(himl : HIMAGELIST) -> HIMAGELIST); +windows_link::link!("comctl32.dll" "system" fn ImageList_EndDrag()); +windows_link::link!("comctl32.dll" "system" fn ImageList_GetBkColor(himl : HIMAGELIST) -> super::super::Foundation:: COLORREF); +windows_link::link!("comctl32.dll" "system" fn ImageList_GetDragImage(ppt : *mut super::super::Foundation:: POINT, ppthotspot : *mut super::super::Foundation:: POINT) -> HIMAGELIST); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn ImageList_GetIcon(himl : HIMAGELIST, i : i32, flags : IMAGE_LIST_DRAW_STYLE) -> super::WindowsAndMessaging:: HICON); +windows_link::link!("comctl32.dll" "system" fn ImageList_GetIconSize(himl : HIMAGELIST, cx : *mut i32, cy : *mut i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_GetImageCount(himl : HIMAGELIST) -> i32); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn ImageList_GetImageInfo(himl : HIMAGELIST, i : i32, pimageinfo : *mut IMAGEINFO) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn ImageList_LoadImageA(hi : super::super::Foundation:: HINSTANCE, lpbmp : windows_sys::core::PCSTR, cx : i32, cgrow : i32, crmask : super::super::Foundation:: COLORREF, utype : u32, uflags : super::WindowsAndMessaging:: IMAGE_FLAGS) -> HIMAGELIST); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn ImageList_LoadImageW(hi : super::super::Foundation:: HINSTANCE, lpbmp : windows_sys::core::PCWSTR, cx : i32, cgrow : i32, crmask : super::super::Foundation:: COLORREF, utype : u32, uflags : super::WindowsAndMessaging:: IMAGE_FLAGS) -> HIMAGELIST); +windows_link::link!("comctl32.dll" "system" fn ImageList_Merge(himl1 : HIMAGELIST, i1 : i32, himl2 : HIMAGELIST, i2 : i32, dx : i32, dy : i32) -> HIMAGELIST); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("comctl32.dll" "system" fn ImageList_Read(pstm : * mut core::ffi::c_void) -> HIMAGELIST); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("comctl32.dll" "system" fn ImageList_ReadEx(dwflags : u32, pstm : * mut core::ffi::c_void, riid : *const windows_sys::core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn ImageList_Remove(himl : HIMAGELIST, i : i32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("comctl32.dll" "system" fn ImageList_Replace(himl : HIMAGELIST, i : i32, hbmimage : super::super::Graphics::Gdi:: HBITMAP, hbmmask : super::super::Graphics::Gdi:: HBITMAP) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn ImageList_ReplaceIcon(himl : HIMAGELIST, i : i32, hicon : super::WindowsAndMessaging:: HICON) -> i32); +windows_link::link!("comctl32.dll" "system" fn ImageList_SetBkColor(himl : HIMAGELIST, clrbk : super::super::Foundation:: COLORREF) -> super::super::Foundation:: COLORREF); +windows_link::link!("comctl32.dll" "system" fn ImageList_SetDragCursorImage(himldrag : HIMAGELIST, idrag : i32, dxhotspot : i32, dyhotspot : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_SetIconSize(himl : HIMAGELIST, cx : i32, cy : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_SetImageCount(himl : HIMAGELIST, unewcount : u32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn ImageList_SetOverlayImage(himl : HIMAGELIST, iimage : i32, ioverlay : i32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("comctl32.dll" "system" fn ImageList_Write(himl : HIMAGELIST, pstm : * mut core::ffi::c_void) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("comctl32.dll" "system" fn ImageList_WriteEx(himl : HIMAGELIST, dwflags : IMAGE_LIST_WRITE_STREAM_FLAGS, pstm : * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn InitCommonControls()); +windows_link::link!("comctl32.dll" "system" fn InitCommonControlsEx(picce : *const INITCOMMONCONTROLSEX) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn InitMUILanguage(uilang : u16)); +windows_link::link!("comctl32.dll" "system" fn InitializeFlatSB(param0 : super::super::Foundation:: HWND) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn IsAppThemed() -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn IsCharLowerW(ch : u16) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn IsCompositionActive() -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn IsDlgButtonChecked(hdlg : super::super::Foundation:: HWND, nidbutton : i32) -> u32); +windows_link::link!("uxtheme.dll" "system" fn IsThemeActive() -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn IsThemeBackgroundPartiallyTransparent(htheme : HTHEME, ipartid : i32, istateid : i32) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn IsThemeDialogTextureEnabled(hwnd : super::super::Foundation:: HWND) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn IsThemePartDefined(htheme : HTHEME, ipartid : i32, istateid : i32) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn LBItemFromPt(hlb : super::super::Foundation:: HWND, pt : super::super::Foundation:: POINT, bautoscroll : windows_sys::core::BOOL) -> i32); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn LoadIconMetric(hinst : super::super::Foundation:: HINSTANCE, pszname : windows_sys::core::PCWSTR, lims : _LI_METRIC, phico : *mut super::WindowsAndMessaging:: HICON) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn LoadIconWithScaleDown(hinst : super::super::Foundation:: HINSTANCE, pszname : windows_sys::core::PCWSTR, cx : i32, cy : i32, phico : *mut super::WindowsAndMessaging:: HICON) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn MakeDragList(hlb : super::super::Foundation:: HWND) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn MenuHelp(umsg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, hmainmenu : super::WindowsAndMessaging:: HMENU, hinst : super::super::Foundation:: HINSTANCE, hwndstatus : super::super::Foundation:: HWND, lpwids : *const u32)); +windows_link::link!("uxtheme.dll" "system" fn OpenThemeData(hwnd : super::super::Foundation:: HWND, pszclasslist : windows_sys::core::PCWSTR) -> HTHEME); +windows_link::link!("uxtheme.dll" "system" fn OpenThemeDataEx(hwnd : super::super::Foundation:: HWND, pszclasslist : windows_sys::core::PCWSTR, dwflags : OPEN_THEME_DATA_FLAGS) -> HTHEME); +windows_link::link!("user32.dll" "system" fn PackTouchHitTestingProximityEvaluation(phittestinginput : *const TOUCH_HIT_TESTING_INPUT, pproximityeval : *const TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation:: LRESULT); +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +windows_link::link!("comctl32.dll" "system" fn PropertySheetA(param0 : *mut PROPSHEETHEADERA_V2) -> isize); +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +windows_link::link!("comctl32.dll" "system" fn PropertySheetW(param0 : *mut PROPSHEETHEADERW_V2) -> isize); +windows_link::link!("user32.dll" "system" fn RegisterPointerDeviceNotifications(window : super::super::Foundation:: HWND, notifyrange : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn RegisterTouchHitTestingWindow(hwnd : super::super::Foundation:: HWND, value : u32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn SetScrollInfo(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, lpsi : *const super::WindowsAndMessaging:: SCROLLINFO, redraw : windows_sys::core::BOOL) -> i32); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn SetScrollPos(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, npos : i32, bredraw : windows_sys::core::BOOL) -> i32); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn SetScrollRange(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, nminpos : i32, nmaxpos : i32, bredraw : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn SetThemeAppProperties(dwflags : SET_THEME_APP_PROPERTIES_FLAGS)); +windows_link::link!("user32.dll" "system" fn SetWindowFeedbackSetting(hwnd : super::super::Foundation:: HWND, feedback : FEEDBACK_TYPE, dwflags : u32, size : u32, configuration : *const core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("uxtheme.dll" "system" fn SetWindowTheme(hwnd : super::super::Foundation:: HWND, pszsubappname : windows_sys::core::PCWSTR, pszsubidlist : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn SetWindowThemeAttribute(hwnd : super::super::Foundation:: HWND, eattribute : WINDOWTHEMEATTRIBUTETYPE, pvattribute : *const core::ffi::c_void, cbattribute : u32) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn ShowHideMenuCtl(hwnd : super::super::Foundation:: HWND, uflags : usize, lpinfo : *const i32) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn ShowScrollBar(hwnd : super::super::Foundation:: HWND, wbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, bshow : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn Str_SetPtrW(ppsz : *mut windows_sys::core::PWSTR, psz : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("comctl32.dll" "system" fn TaskDialog(hwndowner : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszwindowtitle : windows_sys::core::PCWSTR, pszmaininstruction : windows_sys::core::PCWSTR, pszcontent : windows_sys::core::PCWSTR, dwcommonbuttons : TASKDIALOG_COMMON_BUTTON_FLAGS, pszicon : windows_sys::core::PCWSTR, pnbutton : *mut i32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("comctl32.dll" "system" fn TaskDialogIndirect(ptaskconfig : *const TASKDIALOGCONFIG, pnbutton : *mut i32, pnradiobutton : *mut i32, pfverificationflagchecked : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("comctl32.dll" "system" fn UninitializeFlatSB(param0 : super::super::Foundation:: HWND) -> windows_sys::core::HRESULT); +windows_link::link!("uxtheme.dll" "system" fn UpdatePanningFeedback(hwnd : super::super::Foundation:: HWND, ltotaloverpanoffsetx : i32, ltotaloverpanoffsety : i32, fininertia : windows_sys::core::BOOL) -> windows_sys::core::BOOL); +pub const ABS_DOWNDISABLED: ARROWBTNSTATES = 8i32; +pub const ABS_DOWNHOT: ARROWBTNSTATES = 6i32; +pub const ABS_DOWNHOVER: ARROWBTNSTATES = 18i32; +pub const ABS_DOWNNORMAL: ARROWBTNSTATES = 5i32; +pub const ABS_DOWNPRESSED: ARROWBTNSTATES = 7i32; +pub const ABS_LEFTDISABLED: ARROWBTNSTATES = 12i32; +pub const ABS_LEFTHOT: ARROWBTNSTATES = 10i32; +pub const ABS_LEFTHOVER: ARROWBTNSTATES = 19i32; +pub const ABS_LEFTNORMAL: ARROWBTNSTATES = 9i32; +pub const ABS_LEFTPRESSED: ARROWBTNSTATES = 11i32; +pub const ABS_RIGHTDISABLED: ARROWBTNSTATES = 16i32; +pub const ABS_RIGHTHOT: ARROWBTNSTATES = 14i32; +pub const ABS_RIGHTHOVER: ARROWBTNSTATES = 20i32; +pub const ABS_RIGHTNORMAL: ARROWBTNSTATES = 13i32; +pub const ABS_RIGHTPRESSED: ARROWBTNSTATES = 15i32; +pub const ABS_UPDISABLED: ARROWBTNSTATES = 4i32; +pub const ABS_UPHOT: ARROWBTNSTATES = 2i32; +pub const ABS_UPHOVER: ARROWBTNSTATES = 17i32; +pub const ABS_UPNORMAL: ARROWBTNSTATES = 1i32; +pub const ABS_UPPRESSED: ARROWBTNSTATES = 3i32; +pub const ACM_ISPLAYING: u32 = 1128u32; +pub const ACM_OPEN: u32 = 1127u32; +pub const ACM_OPENA: u32 = 1124u32; +pub const ACM_OPENW: u32 = 1127u32; +pub const ACM_PLAY: u32 = 1125u32; +pub const ACM_STOP: u32 = 1126u32; +pub const ACN_START: u32 = 1u32; +pub const ACN_STOP: u32 = 2u32; +pub const ACS_AUTOPLAY: u32 = 4u32; +pub const ACS_CENTER: u32 = 1u32; +pub const ACS_TIMER: u32 = 8u32; +pub const ACS_TRANSPARENT: u32 = 2u32; +pub type AEROWIZARDPARTS = i32; +pub const ALLOW_CONTROLS: SET_THEME_APP_PROPERTIES_FLAGS = 2u32; +pub const ALLOW_NONCLIENT: SET_THEME_APP_PROPERTIES_FLAGS = 1u32; +pub const ALLOW_WEBCONTENT: SET_THEME_APP_PROPERTIES_FLAGS = 4u32; +pub const ANIMATE_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("SysAnimate32"); +pub const ANIMATE_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("SysAnimate32"); +pub const ANIMATE_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysAnimate32"); +pub type ARROWBTNSTATES = i32; +pub const AW_BUTTON: AEROWIZARDPARTS = 5i32; +pub const AW_COMMANDAREA: AEROWIZARDPARTS = 4i32; +pub const AW_CONTENTAREA: AEROWIZARDPARTS = 3i32; +pub const AW_HEADERAREA: AEROWIZARDPARTS = 2i32; +pub const AW_S_CONTENTAREA_NOMARGIN: CONTENTAREASTATES = 1i32; +pub const AW_S_HEADERAREA_NOMARGIN: HEADERAREASTATES = 1i32; +pub const AW_S_TITLEBAR_ACTIVE: TITLEBARSTATES = 1i32; +pub const AW_S_TITLEBAR_INACTIVE: TITLEBARSTATES = 2i32; +pub const AW_TITLEBAR: AEROWIZARDPARTS = 1i32; +pub type BACKGROUNDSTATES = i32; +pub type BACKGROUNDWITHBORDERSTATES = i32; +pub type BALLOONSTATES = i32; +pub type BALLOONSTEMSTATES = i32; +pub type BARBACKGROUNDSTATES = i32; +pub type BARITEMSTATES = i32; +pub const BCM_FIRST: u32 = 5632u32; +pub const BCM_GETIDEALSIZE: u32 = 5633u32; +pub const BCM_GETIMAGELIST: u32 = 5635u32; +pub const BCM_GETNOTE: u32 = 5642u32; +pub const BCM_GETNOTELENGTH: u32 = 5643u32; +pub const BCM_GETSPLITINFO: u32 = 5640u32; +pub const BCM_GETTEXTMARGIN: u32 = 5637u32; +pub const BCM_SETDROPDOWNSTATE: u32 = 5638u32; +pub const BCM_SETIMAGELIST: u32 = 5634u32; +pub const BCM_SETNOTE: u32 = 5641u32; +pub const BCM_SETSHIELD: u32 = 5644u32; +pub const BCM_SETSPLITINFO: u32 = 5639u32; +pub const BCM_SETTEXTMARGIN: u32 = 5636u32; +pub const BCN_DROPDOWN: u32 = 4294966048u32; +pub const BCN_FIRST: u32 = 4294966046u32; +pub const BCN_HOTITEMCHANGE: u32 = 4294966047u32; +pub const BCN_LAST: u32 = 4294965946u32; +pub const BCSIF_GLYPH: u32 = 1u32; +pub const BCSIF_IMAGE: u32 = 2u32; +pub const BCSIF_SIZE: u32 = 8u32; +pub const BCSIF_STYLE: u32 = 4u32; +pub const BCSS_ALIGNLEFT: u32 = 4u32; +pub const BCSS_IMAGE: u32 = 8u32; +pub const BCSS_NOSPLIT: u32 = 1u32; +pub const BCSS_STRETCH: u32 = 2u32; +pub type BGTYPE = i32; +pub type BODYSTATES = i32; +pub type BORDERSTATES = i32; +pub type BORDERTYPE = i32; +pub type BORDER_HSCROLLSTATES = i32; +pub type BORDER_HVSCROLLSTATES = i32; +pub type BORDER_NOSCROLLSTATES = i32; +pub type BORDER_VSCROLLSTATES = i32; +pub const BPAS_CUBIC: BP_ANIMATIONSTYLE = 2i32; +pub const BPAS_LINEAR: BP_ANIMATIONSTYLE = 1i32; +pub const BPAS_NONE: BP_ANIMATIONSTYLE = 0i32; +pub const BPAS_SINE: BP_ANIMATIONSTYLE = 3i32; +pub const BPBF_COMPATIBLEBITMAP: BP_BUFFERFORMAT = 0i32; +pub const BPBF_DIB: BP_BUFFERFORMAT = 1i32; +pub const BPBF_TOPDOWNDIB: BP_BUFFERFORMAT = 2i32; +pub const BPBF_TOPDOWNMONODIB: BP_BUFFERFORMAT = 3i32; +pub const BPPF_ERASE: BP_PAINTPARAMS_FLAGS = 1u32; +pub const BPPF_NOCLIP: BP_PAINTPARAMS_FLAGS = 2u32; +pub const BPPF_NONCLIENT: BP_PAINTPARAMS_FLAGS = 4u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct BP_ANIMATIONPARAMS { + pub cbSize: u32, + pub dwFlags: u32, + pub style: BP_ANIMATIONSTYLE, + pub dwDuration: u32, +} +pub type BP_ANIMATIONSTYLE = i32; +pub type BP_BUFFERFORMAT = i32; +pub const BP_CHECKBOX: BUTTONPARTS = 3i32; +pub const BP_CHECKBOX_HCDISABLED: BUTTONPARTS = 9i32; +pub const BP_COMMANDLINK: BUTTONPARTS = 6i32; +pub const BP_COMMANDLINKGLYPH: BUTTONPARTS = 7i32; +pub const BP_GROUPBOX: BUTTONPARTS = 4i32; +pub const BP_GROUPBOX_HCDISABLED: BUTTONPARTS = 10i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct BP_PAINTPARAMS { + pub cbSize: u32, + pub dwFlags: BP_PAINTPARAMS_FLAGS, + pub prcExclude: *const super::super::Foundation::RECT, + pub pBlendFunction: *const super::super::Graphics::Gdi::BLENDFUNCTION, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for BP_PAINTPARAMS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type BP_PAINTPARAMS_FLAGS = u32; +pub const BP_PUSHBUTTON: BUTTONPARTS = 1i32; +pub const BP_PUSHBUTTONDROPDOWN: BUTTONPARTS = 11i32; +pub const BP_RADIOBUTTON: BUTTONPARTS = 2i32; +pub const BP_RADIOBUTTON_HCDISABLED: BUTTONPARTS = 8i32; +pub const BP_USERBUTTON: BUTTONPARTS = 5i32; +pub const BST_CHECKED: DLG_BUTTON_CHECK_STATE = 1u32; +pub const BST_DROPDOWNPUSHED: u32 = 1024u32; +pub const BST_HOT: u32 = 512u32; +pub const BST_INDETERMINATE: DLG_BUTTON_CHECK_STATE = 2u32; +pub const BST_UNCHECKED: DLG_BUTTON_CHECK_STATE = 0u32; +pub const BS_COMMANDLINK: i32 = 14i32; +pub const BS_DEFCOMMANDLINK: i32 = 15i32; +pub const BS_DEFSPLITBUTTON: i32 = 13i32; +pub const BS_SPLITBUTTON: i32 = 12i32; +pub const BTNS_AUTOSIZE: u32 = 16u32; +pub const BTNS_BUTTON: u32 = 0u32; +pub const BTNS_CHECK: u32 = 2u32; +pub const BTNS_DROPDOWN: u32 = 8u32; +pub const BTNS_GROUP: u32 = 4u32; +pub const BTNS_NOPREFIX: u32 = 32u32; +pub const BTNS_SEP: u32 = 1u32; +pub const BTNS_SHOWTEXT: u32 = 64u32; +pub const BTNS_WHOLEDROPDOWN: u32 = 128u32; +pub const BT_BORDERFILL: BGTYPE = 1i32; +pub const BT_ELLIPSE: BORDERTYPE = 2i32; +pub const BT_IMAGEFILE: BGTYPE = 0i32; +pub const BT_NONE: BGTYPE = 2i32; +pub const BT_RECT: BORDERTYPE = 0i32; +pub const BT_ROUNDRECT: BORDERTYPE = 1i32; +pub type BUTTONPARTS = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct BUTTON_IMAGELIST { + pub himl: HIMAGELIST, + pub margin: super::super::Foundation::RECT, + pub uAlign: BUTTON_IMAGELIST_ALIGN, +} +pub type BUTTON_IMAGELIST_ALIGN = u32; +pub const BUTTON_IMAGELIST_ALIGN_BOTTOM: BUTTON_IMAGELIST_ALIGN = 3u32; +pub const BUTTON_IMAGELIST_ALIGN_CENTER: BUTTON_IMAGELIST_ALIGN = 4u32; +pub const BUTTON_IMAGELIST_ALIGN_LEFT: BUTTON_IMAGELIST_ALIGN = 0u32; +pub const BUTTON_IMAGELIST_ALIGN_RIGHT: BUTTON_IMAGELIST_ALIGN = 1u32; +pub const BUTTON_IMAGELIST_ALIGN_TOP: BUTTON_IMAGELIST_ALIGN = 2u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct BUTTON_SPLITINFO { + pub mask: u32, + pub himlGlyph: HIMAGELIST, + pub uSplitStyle: u32, + pub size: super::super::Foundation::SIZE, +} +pub type CAPTIONSTATES = i32; +pub const CA_CENTER: CONTENTALIGNMENT = 1i32; +pub const CA_LEFT: CONTENTALIGNMENT = 0i32; +pub const CA_RIGHT: CONTENTALIGNMENT = 2i32; +pub const CBB_DISABLED: BORDERSTATES = 4i32; +pub const CBB_FOCUSED: BORDERSTATES = 3i32; +pub const CBB_HOT: BORDERSTATES = 2i32; +pub const CBB_NORMAL: BORDERSTATES = 1i32; +pub const CBCB_DISABLED: CUEBANNERSTATES = 4i32; +pub const CBCB_HOT: CUEBANNERSTATES = 2i32; +pub const CBCB_NORMAL: CUEBANNERSTATES = 1i32; +pub const CBCB_PRESSED: CUEBANNERSTATES = 3i32; +pub const CBDI_HIGHLIGHTED: DROPDOWNITEMSTATES = 2i32; +pub const CBDI_NORMAL: DROPDOWNITEMSTATES = 1i32; +pub const CBEIF_DI_SETITEM: COMBOBOX_EX_ITEM_FLAGS = 268435456u32; +pub const CBEIF_IMAGE: COMBOBOX_EX_ITEM_FLAGS = 2u32; +pub const CBEIF_INDENT: COMBOBOX_EX_ITEM_FLAGS = 16u32; +pub const CBEIF_LPARAM: COMBOBOX_EX_ITEM_FLAGS = 32u32; +pub const CBEIF_OVERLAY: COMBOBOX_EX_ITEM_FLAGS = 8u32; +pub const CBEIF_SELECTEDIMAGE: COMBOBOX_EX_ITEM_FLAGS = 4u32; +pub const CBEIF_TEXT: COMBOBOX_EX_ITEM_FLAGS = 1u32; +pub const CBEMAXSTRLEN: u32 = 260u32; +pub const CBEM_GETCOMBOCONTROL: u32 = 1030u32; +pub const CBEM_GETEDITCONTROL: u32 = 1031u32; +pub const CBEM_GETEXSTYLE: u32 = 1033u32; +pub const CBEM_GETEXTENDEDSTYLE: u32 = 1033u32; +pub const CBEM_GETIMAGELIST: u32 = 1027u32; +pub const CBEM_GETITEM: u32 = 1037u32; +pub const CBEM_GETITEMA: u32 = 1028u32; +pub const CBEM_GETITEMW: u32 = 1037u32; +pub const CBEM_GETUNICODEFORMAT: u32 = 8198u32; +pub const CBEM_HASEDITCHANGED: u32 = 1034u32; +pub const CBEM_INSERTITEM: u32 = 1035u32; +pub const CBEM_INSERTITEMA: u32 = 1025u32; +pub const CBEM_INSERTITEMW: u32 = 1035u32; +pub const CBEM_SETEXSTYLE: u32 = 1032u32; +pub const CBEM_SETEXTENDEDSTYLE: u32 = 1038u32; +pub const CBEM_SETIMAGELIST: u32 = 1026u32; +pub const CBEM_SETITEM: u32 = 1036u32; +pub const CBEM_SETITEMA: u32 = 1029u32; +pub const CBEM_SETITEMW: u32 = 1036u32; +pub const CBEM_SETUNICODEFORMAT: u32 = 8197u32; +pub const CBEM_SETWINDOWTHEME: u32 = 8203u32; +pub const CBENF_DROPDOWN: u32 = 4u32; +pub const CBENF_ESCAPE: u32 = 3u32; +pub const CBENF_KILLFOCUS: u32 = 1u32; +pub const CBENF_RETURN: u32 = 2u32; +pub const CBEN_BEGINEDIT: u32 = 4294966492u32; +pub const CBEN_DELETEITEM: u32 = 4294966494u32; +pub const CBEN_DRAGBEGIN: u32 = 4294966487u32; +pub const CBEN_DRAGBEGINA: u32 = 4294966488u32; +pub const CBEN_DRAGBEGINW: u32 = 4294966487u32; +pub const CBEN_ENDEDIT: u32 = 4294966490u32; +pub const CBEN_ENDEDITA: u32 = 4294966491u32; +pub const CBEN_ENDEDITW: u32 = 4294966490u32; +pub const CBEN_FIRST: u32 = 4294966496u32; +pub const CBEN_GETDISPINFOA: u32 = 4294966496u32; +pub const CBEN_GETDISPINFOW: u32 = 4294966489u32; +pub const CBEN_INSERTITEM: u32 = 4294966495u32; +pub const CBEN_LAST: u32 = 4294966466u32; +pub const CBES_EX_CASESENSITIVE: u32 = 16u32; +pub const CBES_EX_NOEDITIMAGE: u32 = 1u32; +pub const CBES_EX_NOEDITIMAGEINDENT: u32 = 2u32; +pub const CBES_EX_NOSIZELIMIT: u32 = 8u32; +pub const CBES_EX_PATHWORDBREAKPROC: u32 = 4u32; +pub const CBES_EX_TEXTENDELLIPSIS: u32 = 32u32; +pub const CBM_FIRST: u32 = 5888u32; +pub const CBRO_DISABLED: READONLYSTATES = 4i32; +pub const CBRO_HOT: READONLYSTATES = 2i32; +pub const CBRO_NORMAL: READONLYSTATES = 1i32; +pub const CBRO_PRESSED: READONLYSTATES = 3i32; +pub const CBS_CHECKEDDISABLED: CHECKBOXSTATES = 8i32; +pub const CBS_CHECKEDHOT: CHECKBOXSTATES = 6i32; +pub const CBS_CHECKEDNORMAL: CHECKBOXSTATES = 5i32; +pub const CBS_CHECKEDPRESSED: CHECKBOXSTATES = 7i32; +pub const CBS_DISABLED: CLOSEBUTTONSTATES = 4i32; +pub const CBS_EXCLUDEDDISABLED: CHECKBOXSTATES = 20i32; +pub const CBS_EXCLUDEDHOT: CHECKBOXSTATES = 18i32; +pub const CBS_EXCLUDEDNORMAL: CHECKBOXSTATES = 17i32; +pub const CBS_EXCLUDEDPRESSED: CHECKBOXSTATES = 19i32; +pub const CBS_HOT: CLOSEBUTTONSTATES = 2i32; +pub const CBS_IMPLICITDISABLED: CHECKBOXSTATES = 16i32; +pub const CBS_IMPLICITHOT: CHECKBOXSTATES = 14i32; +pub const CBS_IMPLICITNORMAL: CHECKBOXSTATES = 13i32; +pub const CBS_IMPLICITPRESSED: CHECKBOXSTATES = 15i32; +pub const CBS_MIXEDDISABLED: CHECKBOXSTATES = 12i32; +pub const CBS_MIXEDHOT: CHECKBOXSTATES = 10i32; +pub const CBS_MIXEDNORMAL: CHECKBOXSTATES = 9i32; +pub const CBS_MIXEDPRESSED: CHECKBOXSTATES = 11i32; +pub const CBS_NORMAL: CLOSEBUTTONSTATES = 1i32; +pub const CBS_PUSHED: CLOSEBUTTONSTATES = 3i32; +pub const CBS_UNCHECKEDDISABLED: CHECKBOXSTATES = 4i32; +pub const CBS_UNCHECKEDHOT: CHECKBOXSTATES = 2i32; +pub const CBS_UNCHECKEDNORMAL: CHECKBOXSTATES = 1i32; +pub const CBS_UNCHECKEDPRESSED: CHECKBOXSTATES = 3i32; +pub const CBTBS_DISABLED: TRANSPARENTBACKGROUNDSTATES = 3i32; +pub const CBTBS_FOCUSED: TRANSPARENTBACKGROUNDSTATES = 4i32; +pub const CBTBS_HOT: TRANSPARENTBACKGROUNDSTATES = 2i32; +pub const CBTBS_NORMAL: TRANSPARENTBACKGROUNDSTATES = 1i32; +pub const CBXSL_DISABLED: DROPDOWNBUTTONLEFTSTATES = 4i32; +pub const CBXSL_HOT: DROPDOWNBUTTONLEFTSTATES = 2i32; +pub const CBXSL_NORMAL: DROPDOWNBUTTONLEFTSTATES = 1i32; +pub const CBXSL_PRESSED: DROPDOWNBUTTONLEFTSTATES = 3i32; +pub const CBXSR_DISABLED: DROPDOWNBUTTONRIGHTSTATES = 4i32; +pub const CBXSR_HOT: DROPDOWNBUTTONRIGHTSTATES = 2i32; +pub const CBXSR_NORMAL: DROPDOWNBUTTONRIGHTSTATES = 1i32; +pub const CBXSR_PRESSED: DROPDOWNBUTTONRIGHTSTATES = 3i32; +pub const CBXS_DISABLED: COMBOBOXSTYLESTATES = 4i32; +pub const CBXS_HOT: COMBOBOXSTYLESTATES = 2i32; +pub const CBXS_NORMAL: COMBOBOXSTYLESTATES = 1i32; +pub const CBXS_PRESSED: COMBOBOXSTYLESTATES = 3i32; +pub const CB_GETCUEBANNER: u32 = 5892u32; +pub const CB_GETMINVISIBLE: u32 = 5890u32; +pub const CB_SETCUEBANNER: u32 = 5891u32; +pub const CB_SETMINVISIBLE: u32 = 5889u32; +pub const CCF_NOTEXT: u32 = 1u32; +pub const CCHCCCLASS: u32 = 32u32; +pub const CCHCCDESC: u32 = 32u32; +pub const CCHCCTEXT: u32 = 256u32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct CCINFOA { + pub szClass: [i8; 32], + pub flOptions: u32, + pub szDesc: [i8; 32], + pub cxDefault: u32, + pub cyDefault: u32, + pub flStyleDefault: u32, + pub flExtStyleDefault: u32, + pub flCtrlTypeMask: u32, + pub szTextDefault: [i8; 256], + pub cStyleFlags: i32, + pub aStyleFlags: *mut CCSTYLEFLAGA, + pub lpfnStyle: LPFNCCSTYLEA, + pub lpfnSizeToText: LPFNCCSIZETOTEXTA, + pub dwReserved1: u32, + pub dwReserved2: u32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for CCINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct CCINFOW { + pub szClass: [u16; 32], + pub flOptions: u32, + pub szDesc: [u16; 32], + pub cxDefault: u32, + pub cyDefault: u32, + pub flStyleDefault: u32, + pub flExtStyleDefault: u32, + pub flCtrlTypeMask: u32, + pub cStyleFlags: i32, + pub aStyleFlags: *mut CCSTYLEFLAGW, + pub szTextDefault: [u16; 256], + pub lpfnStyle: LPFNCCSTYLEW, + pub lpfnSizeToText: LPFNCCSIZETOTEXTW, + pub dwReserved1: u32, + pub dwReserved2: u32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for CCINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const CCM_DPISCALE: u32 = 8204u32; +pub const CCM_FIRST: u32 = 8192u32; +pub const CCM_GETCOLORSCHEME: u32 = 8195u32; +pub const CCM_GETDROPTARGET: u32 = 8196u32; +pub const CCM_GETUNICODEFORMAT: u32 = 8198u32; +pub const CCM_GETVERSION: u32 = 8200u32; +pub const CCM_LAST: u32 = 8704u32; +pub const CCM_SETBKCOLOR: u32 = 8193u32; +pub const CCM_SETCOLORSCHEME: u32 = 8194u32; +pub const CCM_SETNOTIFYWINDOW: u32 = 8201u32; +pub const CCM_SETUNICODEFORMAT: u32 = 8197u32; +pub const CCM_SETVERSION: u32 = 8199u32; +pub const CCM_SETWINDOWTHEME: u32 = 8203u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CCSTYLEA { + pub flStyle: u32, + pub flExtStyle: u32, + pub szText: [i8; 256], + pub lgid: u16, + pub wReserved1: u16, +} +impl Default for CCSTYLEA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CCSTYLEFLAGA { + pub flStyle: u32, + pub flStyleMask: u32, + pub pszStyle: windows_sys::core::PSTR, +} +impl Default for CCSTYLEFLAGA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CCSTYLEFLAGW { + pub flStyle: u32, + pub flStyleMask: u32, + pub pszStyle: windows_sys::core::PWSTR, +} +impl Default for CCSTYLEFLAGW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct CCSTYLEW { + pub flStyle: u32, + pub flExtStyle: u32, + pub szText: [u16; 256], + pub lgid: u16, + pub wReserved1: u16, +} +impl Default for CCSTYLEW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const CCS_ADJUSTABLE: i32 = 32i32; +pub const CCS_BOTTOM: i32 = 3i32; +pub const CCS_NODIVIDER: i32 = 64i32; +pub const CCS_NOMOVEY: i32 = 2i32; +pub const CCS_NOPARENTALIGN: i32 = 8i32; +pub const CCS_NORESIZE: i32 = 4i32; +pub const CCS_TOP: i32 = 1i32; +pub const CCS_VERT: i32 = 128i32; +pub const CDDS_ITEM: u32 = 65536u32; +pub const CDDS_ITEMPOSTERASE: NMCUSTOMDRAW_DRAW_STAGE = 65540u32; +pub const CDDS_ITEMPOSTPAINT: NMCUSTOMDRAW_DRAW_STAGE = 65538u32; +pub const CDDS_ITEMPREERASE: NMCUSTOMDRAW_DRAW_STAGE = 65539u32; +pub const CDDS_ITEMPREPAINT: NMCUSTOMDRAW_DRAW_STAGE = 65537u32; +pub const CDDS_POSTERASE: u32 = 4u32; +pub const CDDS_POSTPAINT: NMCUSTOMDRAW_DRAW_STAGE = 2u32; +pub const CDDS_PREERASE: NMCUSTOMDRAW_DRAW_STAGE = 3u32; +pub const CDDS_PREPAINT: NMCUSTOMDRAW_DRAW_STAGE = 1u32; +pub const CDDS_SUBITEM: NMCUSTOMDRAW_DRAW_STAGE = 131072u32; +pub const CDIS_CHECKED: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 8u32; +pub const CDIS_DEFAULT: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 32u32; +pub const CDIS_DISABLED: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 4u32; +pub const CDIS_DROPHILITED: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 4096u32; +pub const CDIS_FOCUS: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 16u32; +pub const CDIS_GRAYED: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 2u32; +pub const CDIS_HOT: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 64u32; +pub const CDIS_INDETERMINATE: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 256u32; +pub const CDIS_MARKED: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 128u32; +pub const CDIS_NEARHOT: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 1024u32; +pub const CDIS_OTHERSIDEHOT: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 2048u32; +pub const CDIS_SELECTED: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 1u32; +pub const CDIS_SHOWKEYBOARDCUES: NMCUSTOMDRAW_DRAW_STATE_FLAGS = 512u32; +pub const CDN_FIRST: u32 = 4294966695u32; +pub const CDN_LAST: u32 = 4294966597u32; +pub const CDRF_DODEFAULT: u32 = 0u32; +pub const CDRF_DOERASE: u32 = 8u32; +pub const CDRF_NEWFONT: u32 = 2u32; +pub const CDRF_NOTIFYITEMDRAW: u32 = 32u32; +pub const CDRF_NOTIFYPOSTERASE: u32 = 64u32; +pub const CDRF_NOTIFYPOSTPAINT: u32 = 16u32; +pub const CDRF_NOTIFYSUBITEMDRAW: u32 = 32u32; +pub const CDRF_SKIPDEFAULT: u32 = 4u32; +pub const CDRF_SKIPPOSTPAINT: u32 = 256u32; +pub type CHECKBOXSTATES = i32; +pub type CHEVRONSTATES = i32; +pub type CHEVRONVERTSTATES = i32; +pub const CHEVSV_HOT: CHEVRONVERTSTATES = 2i32; +pub const CHEVSV_NORMAL: CHEVRONVERTSTATES = 1i32; +pub const CHEVSV_PRESSED: CHEVRONVERTSTATES = 3i32; +pub const CHEVS_HOT: CHEVRONSTATES = 2i32; +pub const CHEVS_NORMAL: CHEVRONSTATES = 1i32; +pub const CHEVS_PRESSED: CHEVRONSTATES = 3i32; +pub type CLOCKPARTS = i32; +pub type CLOCKSTATES = i32; +pub type CLOSEBUTTONSTATES = i32; +pub type CLOSESTATES = i32; +pub const CLP_TIME: CLOCKPARTS = 1i32; +pub const CLR_DEFAULT: i32 = -16777216i32; +pub const CLR_HILIGHT: i32 = -16777216i32; +pub const CLR_NONE: i32 = -1i32; +pub const CLS_HOT: CLOCKSTATES = 2i32; +pub const CLS_NORMAL: CLOCKSTATES = 1i32; +pub const CLS_PRESSED: CLOCKSTATES = 3i32; +pub const CMB_MASKED: u32 = 2u32; +pub const CMDLGS_DEFAULTED: COMMANDLINKGLYPHSTATES = 5i32; +pub const CMDLGS_DISABLED: COMMANDLINKGLYPHSTATES = 4i32; +pub const CMDLGS_HOT: COMMANDLINKGLYPHSTATES = 2i32; +pub const CMDLGS_NORMAL: COMMANDLINKGLYPHSTATES = 1i32; +pub const CMDLGS_PRESSED: COMMANDLINKGLYPHSTATES = 3i32; +pub const CMDLS_DEFAULTED: COMMANDLINKSTATES = 5i32; +pub const CMDLS_DEFAULTED_ANIMATING: COMMANDLINKSTATES = 6i32; +pub const CMDLS_DISABLED: COMMANDLINKSTATES = 4i32; +pub const CMDLS_HOT: COMMANDLINKSTATES = 2i32; +pub const CMDLS_NORMAL: COMMANDLINKSTATES = 1i32; +pub const CMDLS_PRESSED: COMMANDLINKSTATES = 3i32; +pub type COLLAPSEBUTTONSTATES = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct COLORMAP { + pub from: super::super::Foundation::COLORREF, + pub to: super::super::Foundation::COLORREF, +} +pub const COLORMGMTDLGORD: u32 = 1551u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct COLORSCHEME { + pub dwSize: u32, + pub clrBtnHighlight: super::super::Foundation::COLORREF, + pub clrBtnShadow: super::super::Foundation::COLORREF, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct COMBOBOXEXITEMA { + pub mask: COMBOBOX_EX_ITEM_FLAGS, + pub iItem: isize, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub iSelectedImage: i32, + pub iOverlay: i32, + pub iIndent: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for COMBOBOXEXITEMA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct COMBOBOXEXITEMW { + pub mask: COMBOBOX_EX_ITEM_FLAGS, + pub iItem: isize, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub iSelectedImage: i32, + pub iOverlay: i32, + pub iIndent: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for COMBOBOXEXITEMW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct COMBOBOXINFO { + pub cbSize: u32, + pub rcItem: super::super::Foundation::RECT, + pub rcButton: super::super::Foundation::RECT, + pub stateButton: COMBOBOXINFO_BUTTON_STATE, + pub hwndCombo: super::super::Foundation::HWND, + pub hwndItem: super::super::Foundation::HWND, + pub hwndList: super::super::Foundation::HWND, +} +impl Default for COMBOBOXINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type COMBOBOXINFO_BUTTON_STATE = u32; +pub type COMBOBOXPARTS = i32; +pub type COMBOBOXSTYLESTATES = i32; +pub type COMBOBOX_EX_ITEM_FLAGS = u32; +pub const COMCTL32_VERSION: u32 = 6u32; +pub type COMMANDLINKGLYPHSTATES = i32; +pub type COMMANDLINKSTATES = i32; +pub type COMMUNICATIONSPARTS = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct COMPAREITEMSTRUCT { + pub CtlType: DRAWITEMSTRUCT_CTL_TYPE, + pub CtlID: u32, + pub hwndItem: super::super::Foundation::HWND, + pub itemID1: u32, + pub itemData1: usize, + pub itemID2: u32, + pub itemData2: usize, + pub dwLocaleId: u32, +} +impl Default for COMPAREITEMSTRUCT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type CONTENTALIGNMENT = i32; +pub type CONTENTAREASTATES = i32; +pub type CONTENTLINKSTATES = i32; +pub type CONTENTPANESTATES = i32; +pub type CONTROLLABELSTATES = i32; +pub type CONTROLPANELPARTS = i32; +pub type COPYSTATES = i32; +pub const CPANEL_BANNERAREA: CONTROLPANELPARTS = 18i32; +pub const CPANEL_BODYTEXT: CONTROLPANELPARTS = 6i32; +pub const CPANEL_BODYTITLE: CONTROLPANELPARTS = 19i32; +pub const CPANEL_BUTTON: CONTROLPANELPARTS = 14i32; +pub const CPANEL_CONTENTLINK: CONTROLPANELPARTS = 10i32; +pub const CPANEL_CONTENTPANE: CONTROLPANELPARTS = 2i32; +pub const CPANEL_CONTENTPANELABEL: CONTROLPANELPARTS = 4i32; +pub const CPANEL_CONTENTPANELINE: CONTROLPANELPARTS = 17i32; +pub const CPANEL_GROUPTEXT: CONTROLPANELPARTS = 9i32; +pub const CPANEL_HELPLINK: CONTROLPANELPARTS = 7i32; +pub const CPANEL_LARGECOMMANDAREA: CONTROLPANELPARTS = 12i32; +pub const CPANEL_MESSAGETEXT: CONTROLPANELPARTS = 15i32; +pub const CPANEL_NAVIGATIONPANE: CONTROLPANELPARTS = 1i32; +pub const CPANEL_NAVIGATIONPANELABEL: CONTROLPANELPARTS = 3i32; +pub const CPANEL_NAVIGATIONPANELINE: CONTROLPANELPARTS = 16i32; +pub const CPANEL_SECTIONTITLELINK: CONTROLPANELPARTS = 11i32; +pub const CPANEL_SMALLCOMMANDAREA: CONTROLPANELPARTS = 13i32; +pub const CPANEL_TASKLINK: CONTROLPANELPARTS = 8i32; +pub const CPANEL_TITLE: CONTROLPANELPARTS = 5i32; +pub const CPCL_DISABLED: CONTENTLINKSTATES = 4i32; +pub const CPCL_HOT: CONTENTLINKSTATES = 2i32; +pub const CPCL_NORMAL: CONTENTLINKSTATES = 1i32; +pub const CPCL_PRESSED: CONTENTLINKSTATES = 3i32; +pub const CPHL_DISABLED: HELPLINKSTATES = 4i32; +pub const CPHL_HOT: HELPLINKSTATES = 2i32; +pub const CPHL_NORMAL: HELPLINKSTATES = 1i32; +pub const CPHL_PRESSED: HELPLINKSTATES = 3i32; +pub const CPSTL_HOT: SECTIONTITLELINKSTATES = 2i32; +pub const CPSTL_NORMAL: SECTIONTITLELINKSTATES = 1i32; +pub const CPTL_DISABLED: TASKLINKSTATES = 4i32; +pub const CPTL_HOT: TASKLINKSTATES = 2i32; +pub const CPTL_NORMAL: TASKLINKSTATES = 1i32; +pub const CPTL_PAGE: TASKLINKSTATES = 5i32; +pub const CPTL_PRESSED: TASKLINKSTATES = 3i32; +pub const CP_BACKGROUND: COMBOBOXPARTS = 2i32; +pub const CP_BORDER: COMBOBOXPARTS = 4i32; +pub const CP_CUEBANNER: COMBOBOXPARTS = 8i32; +pub const CP_DROPDOWNBUTTON: COMBOBOXPARTS = 1i32; +pub const CP_DROPDOWNBUTTONLEFT: COMBOBOXPARTS = 7i32; +pub const CP_DROPDOWNBUTTONRIGHT: COMBOBOXPARTS = 6i32; +pub const CP_DROPDOWNITEM: COMBOBOXPARTS = 9i32; +pub const CP_READONLY: COMBOBOXPARTS = 5i32; +pub const CP_TRANSPARENTBACKGROUND: COMBOBOXPARTS = 3i32; +pub type CREATELINKSTATES = i32; +pub const CSST_TAB: COMMUNICATIONSPARTS = 1i32; +pub const CSTB_HOT: TABSTATES = 2i32; +pub const CSTB_NORMAL: TABSTATES = 1i32; +pub const CSTB_SELECTED: TABSTATES = 3i32; +pub const CS_ACTIVE: CAPTIONSTATES = 1i32; +pub const CS_DISABLED: CAPTIONSTATES = 3i32; +pub const CS_INACTIVE: CAPTIONSTATES = 2i32; +pub type CUEBANNERSTATES = i32; +pub type DATEBORDERSTATES = i32; +pub type DATEPICKERPARTS = i32; +pub type DATETEXTSTATES = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct DATETIMEPICKERINFO { + pub cbSize: u32, + pub rcCheck: super::super::Foundation::RECT, + pub stateCheck: u32, + pub rcButton: super::super::Foundation::RECT, + pub stateButton: u32, + pub hwndEdit: super::super::Foundation::HWND, + pub hwndUD: super::super::Foundation::HWND, + pub hwndDropDown: super::super::Foundation::HWND, +} +impl Default for DATETIMEPICKERINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const DATETIMEPICK_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("SysDateTimePick32"); +pub const DATETIMEPICK_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("SysDateTimePick32"); +pub const DATETIMEPICK_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysDateTimePick32"); +pub const DA_ERR: i32 = -1i32; +pub const DA_LAST: u32 = 2147483647u32; +pub const DDCOPY_HIGHLIGHT: COPYSTATES = 1i32; +pub const DDCOPY_NOHIGHLIGHT: COPYSTATES = 2i32; +pub const DDCREATELINK_HIGHLIGHT: CREATELINKSTATES = 1i32; +pub const DDCREATELINK_NOHIGHLIGHT: CREATELINKSTATES = 2i32; +pub const DDL_ARCHIVE: DLG_DIR_LIST_FILE_TYPE = 32u32; +pub const DDL_DIRECTORY: DLG_DIR_LIST_FILE_TYPE = 16u32; +pub const DDL_DRIVES: DLG_DIR_LIST_FILE_TYPE = 16384u32; +pub const DDL_EXCLUSIVE: DLG_DIR_LIST_FILE_TYPE = 32768u32; +pub const DDL_HIDDEN: DLG_DIR_LIST_FILE_TYPE = 2u32; +pub const DDL_POSTMSGS: DLG_DIR_LIST_FILE_TYPE = 8192u32; +pub const DDL_READONLY: DLG_DIR_LIST_FILE_TYPE = 1u32; +pub const DDL_READWRITE: DLG_DIR_LIST_FILE_TYPE = 0u32; +pub const DDL_SYSTEM: DLG_DIR_LIST_FILE_TYPE = 4u32; +pub const DDMOVE_HIGHLIGHT: MOVESTATES = 1i32; +pub const DDMOVE_NOHIGHLIGHT: MOVESTATES = 2i32; +pub const DDNONE_HIGHLIGHT: NONESTATES = 1i32; +pub const DDNONE_NOHIGHLIGHT: NONESTATES = 2i32; +pub const DDUPDATEMETADATA_HIGHLIGHT: UPDATEMETADATASTATES = 1i32; +pub const DDUPDATEMETADATA_NOHIGHLIGHT: UPDATEMETADATASTATES = 2i32; +pub const DDWARNING_HIGHLIGHT: WARNINGSTATES = 1i32; +pub const DDWARNING_NOHIGHLIGHT: WARNINGSTATES = 2i32; +pub const DD_COPY: DRAGDROPPARTS = 1i32; +pub const DD_CREATELINK: DRAGDROPPARTS = 4i32; +pub const DD_IMAGEBG: DRAGDROPPARTS = 7i32; +pub const DD_MOVE: DRAGDROPPARTS = 2i32; +pub const DD_NONE: DRAGDROPPARTS = 6i32; +pub const DD_TEXTBG: DRAGDROPPARTS = 8i32; +pub const DD_UPDATEMETADATA: DRAGDROPPARTS = 3i32; +pub const DD_WARNING: DRAGDROPPARTS = 5i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct DELETEITEMSTRUCT { + pub CtlType: DRAWITEMSTRUCT_CTL_TYPE, + pub CtlID: u32, + pub itemID: u32, + pub hwndItem: super::super::Foundation::HWND, + pub itemData: usize, +} +impl Default for DELETEITEMSTRUCT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type DLG_BUTTON_CHECK_STATE = u32; +pub type DLG_DIR_LIST_FILE_TYPE = u32; +pub const DL_BEGINDRAG: DRAGLISTINFO_NOTIFICATION_FLAGS = 1157u32; +pub const DL_CANCELDRAG: DRAGLISTINFO_NOTIFICATION_FLAGS = 1160u32; +pub const DL_COPYCURSOR: u32 = 2u32; +pub const DL_CURSORSET: u32 = 0u32; +pub const DL_DRAGGING: DRAGLISTINFO_NOTIFICATION_FLAGS = 1158u32; +pub const DL_DROPPED: DRAGLISTINFO_NOTIFICATION_FLAGS = 1159u32; +pub const DL_MOVECURSOR: u32 = 3u32; +pub const DL_STOPCURSOR: u32 = 1u32; +pub const DNHZS_DISABLED: DOWNHORZSTATES = 4i32; +pub const DNHZS_HOT: DOWNHORZSTATES = 2i32; +pub const DNHZS_NORMAL: DOWNHORZSTATES = 1i32; +pub const DNHZS_PRESSED: DOWNHORZSTATES = 3i32; +pub const DNS_DISABLED: DOWNSTATES = 4i32; +pub const DNS_HOT: DOWNSTATES = 2i32; +pub const DNS_NORMAL: DOWNSTATES = 1i32; +pub const DNS_PRESSED: DOWNSTATES = 3i32; +pub type DOWNHORZSTATES = i32; +pub type DOWNSTATES = i32; +pub const DPAMM_DELETE: DPAMM_MESSAGE = 2u32; +pub const DPAMM_INSERT: DPAMM_MESSAGE = 3u32; +pub const DPAMM_MERGE: DPAMM_MESSAGE = 1u32; +pub type DPAMM_MESSAGE = u32; +pub const DPAM_INTERSECT: u32 = 8u32; +pub const DPAM_NORMAL: u32 = 2u32; +pub const DPAM_SORTED: u32 = 1u32; +pub const DPAM_UNION: u32 = 4u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct DPASTREAMINFO { + pub iPos: i32, + pub pvItem: *mut core::ffi::c_void, +} +impl Default for DPASTREAMINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const DPAS_INSERTAFTER: u32 = 4u32; +pub const DPAS_INSERTBEFORE: u32 = 2u32; +pub const DPAS_SORTED: u32 = 1u32; +pub const DPA_APPEND: u32 = 2147483647u32; +pub const DPA_ERR: i32 = -1i32; +pub const DPDB_DISABLED: DATEBORDERSTATES = 4i32; +pub const DPDB_FOCUSED: DATEBORDERSTATES = 3i32; +pub const DPDB_HOT: DATEBORDERSTATES = 2i32; +pub const DPDB_NORMAL: DATEBORDERSTATES = 1i32; +pub const DPDT_DISABLED: DATETEXTSTATES = 2i32; +pub const DPDT_NORMAL: DATETEXTSTATES = 1i32; +pub const DPDT_SELECTED: DATETEXTSTATES = 3i32; +pub const DPSCBR_DISABLED: SHOWCALENDARBUTTONRIGHTSTATES = 4i32; +pub const DPSCBR_HOT: SHOWCALENDARBUTTONRIGHTSTATES = 2i32; +pub const DPSCBR_NORMAL: SHOWCALENDARBUTTONRIGHTSTATES = 1i32; +pub const DPSCBR_PRESSED: SHOWCALENDARBUTTONRIGHTSTATES = 3i32; +pub const DP_DATEBORDER: DATEPICKERPARTS = 2i32; +pub const DP_DATETEXT: DATEPICKERPARTS = 1i32; +pub const DP_SHOWCALENDARBUTTONRIGHT: DATEPICKERPARTS = 3i32; +pub type DRAGDROPPARTS = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct DRAGLISTINFO { + pub uNotification: DRAGLISTINFO_NOTIFICATION_FLAGS, + pub hWnd: super::super::Foundation::HWND, + pub ptCursor: super::super::Foundation::POINT, +} +impl Default for DRAGLISTINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type DRAGLISTINFO_NOTIFICATION_FLAGS = u32; +pub const DRAGLISTMSGSTRING: windows_sys::core::PCWSTR = windows_sys::core::w!("commctrl_DragListMsg"); +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct DRAWITEMSTRUCT { + pub CtlType: DRAWITEMSTRUCT_CTL_TYPE, + pub CtlID: u32, + pub itemID: u32, + pub itemAction: ODA_FLAGS, + pub itemState: ODS_FLAGS, + pub hwndItem: super::super::Foundation::HWND, + pub hDC: super::super::Graphics::Gdi::HDC, + pub rcItem: super::super::Foundation::RECT, + pub itemData: usize, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for DRAWITEMSTRUCT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type DRAWITEMSTRUCT_CTL_TYPE = u32; +pub type DRAW_THEME_PARENT_BACKGROUND_FLAGS = u32; +pub type DROPDOWNBUTTONLEFTSTATES = i32; +pub type DROPDOWNBUTTONRIGHTSTATES = i32; +pub type DROPDOWNITEMSTATES = i32; +pub const DSA_APPEND: u32 = 2147483647u32; +pub const DSA_ERR: i32 = -1i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct DTBGOPTS { + pub dwSize: u32, + pub dwFlags: u32, + pub rcClip: super::super::Foundation::RECT, +} +pub const DTBG_CLIPRECT: u32 = 1u32; +pub const DTBG_COMPUTINGREGION: u32 = 16u32; +pub const DTBG_DRAWSOLID: u32 = 2u32; +pub const DTBG_MIRRORDC: u32 = 32u32; +pub const DTBG_NOMIRROR: u32 = 64u32; +pub const DTBG_OMITBORDER: u32 = 4u32; +pub const DTBG_OMITCONTENT: u32 = 8u32; +pub const DTM_CLOSEMONTHCAL: u32 = 4109u32; +pub const DTM_FIRST: u32 = 4096u32; +pub const DTM_GETDATETIMEPICKERINFO: u32 = 4110u32; +pub const DTM_GETIDEALSIZE: u32 = 4111u32; +pub const DTM_GETMCCOLOR: u32 = 4103u32; +pub const DTM_GETMCFONT: u32 = 4106u32; +pub const DTM_GETMCSTYLE: u32 = 4108u32; +pub const DTM_GETMONTHCAL: u32 = 4104u32; +pub const DTM_GETRANGE: u32 = 4099u32; +pub const DTM_GETSYSTEMTIME: u32 = 4097u32; +pub const DTM_SETFORMAT: u32 = 4146u32; +pub const DTM_SETFORMATA: u32 = 4101u32; +pub const DTM_SETFORMATW: u32 = 4146u32; +pub const DTM_SETMCCOLOR: u32 = 4102u32; +pub const DTM_SETMCFONT: u32 = 4105u32; +pub const DTM_SETMCSTYLE: u32 = 4107u32; +pub const DTM_SETRANGE: u32 = 4100u32; +pub const DTM_SETSYSTEMTIME: u32 = 4098u32; +pub const DTN_CLOSEUP: u32 = 4294966543u32; +pub const DTN_DATETIMECHANGE: u32 = 4294966537u32; +pub const DTN_DROPDOWN: u32 = 4294966542u32; +pub const DTN_FIRST: u32 = 4294966556u32; +pub const DTN_FIRST2: u32 = 4294966543u32; +pub const DTN_FORMAT: u32 = 4294966553u32; +pub const DTN_FORMATA: u32 = 4294966540u32; +pub const DTN_FORMATQUERY: u32 = 4294966554u32; +pub const DTN_FORMATQUERYA: u32 = 4294966541u32; +pub const DTN_FORMATQUERYW: u32 = 4294966554u32; +pub const DTN_FORMATW: u32 = 4294966553u32; +pub const DTN_LAST: u32 = 4294966551u32; +pub const DTN_LAST2: u32 = 4294966497u32; +pub const DTN_USERSTRING: u32 = 4294966551u32; +pub const DTN_USERSTRINGA: u32 = 4294966538u32; +pub const DTN_USERSTRINGW: u32 = 4294966551u32; +pub const DTN_WMKEYDOWN: u32 = 4294966552u32; +pub const DTN_WMKEYDOWNA: u32 = 4294966539u32; +pub const DTN_WMKEYDOWNW: u32 = 4294966552u32; +pub const DTPB_USECTLCOLORSTATIC: DRAW_THEME_PARENT_BACKGROUND_FLAGS = 2u32; +pub const DTPB_USEERASEBKGND: DRAW_THEME_PARENT_BACKGROUND_FLAGS = 4u32; +pub const DTPB_WINDOWDC: DRAW_THEME_PARENT_BACKGROUND_FLAGS = 1u32; +pub const DTS_APPCANPARSE: u32 = 16u32; +pub const DTS_LONGDATEFORMAT: u32 = 4u32; +pub const DTS_RIGHTALIGN: u32 = 32u32; +pub const DTS_SHORTDATECENTURYFORMAT: u32 = 12u32; +pub const DTS_SHORTDATEFORMAT: u32 = 0u32; +pub const DTS_SHOWNONE: u32 = 2u32; +pub const DTS_TIMEFORMAT: u32 = 9u32; +pub const DTS_UPDOWN: u32 = 1u32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct DTTOPTS { + pub dwSize: u32, + pub dwFlags: DTTOPTS_FLAGS, + pub crText: super::super::Foundation::COLORREF, + pub crBorder: super::super::Foundation::COLORREF, + pub crShadow: super::super::Foundation::COLORREF, + pub iTextShadowType: i32, + pub ptShadowOffset: super::super::Foundation::POINT, + pub iBorderSize: i32, + pub iFontPropId: i32, + pub iColorPropId: i32, + pub iStateId: i32, + pub fApplyOverlay: windows_sys::core::BOOL, + pub iGlowSize: i32, + pub pfnDrawTextCallback: DTT_CALLBACK_PROC, + pub lParam: super::super::Foundation::LPARAM, +} +pub type DTTOPTS_FLAGS = u32; +pub const DTT_APPLYOVERLAY: DTTOPTS_FLAGS = 1024u32; +pub const DTT_BORDERCOLOR: DTTOPTS_FLAGS = 2u32; +pub const DTT_BORDERSIZE: DTTOPTS_FLAGS = 32u32; +pub const DTT_CALCRECT: DTTOPTS_FLAGS = 512u32; +pub const DTT_CALLBACK: DTTOPTS_FLAGS = 4096u32; +#[cfg(feature = "Win32_Graphics_Gdi")] +pub type DTT_CALLBACK_PROC = Option i32>; +pub const DTT_COLORPROP: DTTOPTS_FLAGS = 128u32; +pub const DTT_COMPOSITED: DTTOPTS_FLAGS = 8192u32; +pub const DTT_FLAGS2VALIDBITS: u32 = 1u32; +pub const DTT_FONTPROP: DTTOPTS_FLAGS = 64u32; +pub const DTT_GLOWSIZE: DTTOPTS_FLAGS = 2048u32; +pub const DTT_GRAYED: u32 = 1u32; +pub const DTT_SHADOWCOLOR: DTTOPTS_FLAGS = 4u32; +pub const DTT_SHADOWOFFSET: DTTOPTS_FLAGS = 16u32; +pub const DTT_SHADOWTYPE: DTTOPTS_FLAGS = 8u32; +pub const DTT_STATEID: DTTOPTS_FLAGS = 256u32; +pub const DTT_TEXTCOLOR: DTTOPTS_FLAGS = 1u32; +pub const DTT_VALIDBITS: DTTOPTS_FLAGS = 12287u32; +pub const EBHC_HOT: HEADERCLOSESTATES = 2i32; +pub const EBHC_NORMAL: HEADERCLOSESTATES = 1i32; +pub const EBHC_PRESSED: HEADERCLOSESTATES = 3i32; +pub const EBHP_HOT: HEADERPINSTATES = 2i32; +pub const EBHP_NORMAL: HEADERPINSTATES = 1i32; +pub const EBHP_PRESSED: HEADERPINSTATES = 3i32; +pub const EBHP_SELECTEDHOT: HEADERPINSTATES = 5i32; +pub const EBHP_SELECTEDNORMAL: HEADERPINSTATES = 4i32; +pub const EBHP_SELECTEDPRESSED: HEADERPINSTATES = 6i32; +pub const EBM_HOT: IEBARMENUSTATES = 2i32; +pub const EBM_NORMAL: IEBARMENUSTATES = 1i32; +pub const EBM_PRESSED: IEBARMENUSTATES = 3i32; +pub const EBNGC_HOT: NORMALGROUPCOLLAPSESTATES = 2i32; +pub const EBNGC_NORMAL: NORMALGROUPCOLLAPSESTATES = 1i32; +pub const EBNGC_PRESSED: NORMALGROUPCOLLAPSESTATES = 3i32; +pub const EBNGE_HOT: NORMALGROUPEXPANDSTATES = 2i32; +pub const EBNGE_NORMAL: NORMALGROUPEXPANDSTATES = 1i32; +pub const EBNGE_PRESSED: NORMALGROUPEXPANDSTATES = 3i32; +pub const EBP_HEADERBACKGROUND: EXPLORERBARPARTS = 1i32; +pub const EBP_HEADERCLOSE: EXPLORERBARPARTS = 2i32; +pub const EBP_HEADERPIN: EXPLORERBARPARTS = 3i32; +pub const EBP_IEBARMENU: EXPLORERBARPARTS = 4i32; +pub const EBP_NORMALGROUPBACKGROUND: EXPLORERBARPARTS = 5i32; +pub const EBP_NORMALGROUPCOLLAPSE: EXPLORERBARPARTS = 6i32; +pub const EBP_NORMALGROUPEXPAND: EXPLORERBARPARTS = 7i32; +pub const EBP_NORMALGROUPHEAD: EXPLORERBARPARTS = 8i32; +pub const EBP_SPECIALGROUPBACKGROUND: EXPLORERBARPARTS = 9i32; +pub const EBP_SPECIALGROUPCOLLAPSE: EXPLORERBARPARTS = 10i32; +pub const EBP_SPECIALGROUPEXPAND: EXPLORERBARPARTS = 11i32; +pub const EBP_SPECIALGROUPHEAD: EXPLORERBARPARTS = 12i32; +pub const EBSGC_HOT: SPECIALGROUPCOLLAPSESTATES = 2i32; +pub const EBSGC_NORMAL: SPECIALGROUPCOLLAPSESTATES = 1i32; +pub const EBSGC_PRESSED: SPECIALGROUPCOLLAPSESTATES = 3i32; +pub const EBSGE_HOT: SPECIALGROUPEXPANDSTATES = 2i32; +pub const EBSGE_NORMAL: SPECIALGROUPEXPANDSTATES = 1i32; +pub const EBSGE_PRESSED: SPECIALGROUPEXPANDSTATES = 3i32; +pub const EBS_ASSIST: BACKGROUNDSTATES = 6i32; +pub const EBS_DISABLED: BACKGROUNDSTATES = 3i32; +pub const EBS_FOCUSED: BACKGROUNDSTATES = 4i32; +pub const EBS_HOT: BACKGROUNDSTATES = 2i32; +pub const EBS_NORMAL: BACKGROUNDSTATES = 1i32; +pub const EBS_READONLY: BACKGROUNDSTATES = 5i32; +pub const EBWBS_DISABLED: BACKGROUNDWITHBORDERSTATES = 3i32; +pub const EBWBS_FOCUSED: BACKGROUNDWITHBORDERSTATES = 4i32; +pub const EBWBS_HOT: BACKGROUNDWITHBORDERSTATES = 2i32; +pub const EBWBS_NORMAL: BACKGROUNDWITHBORDERSTATES = 1i32; +pub const ECM_FIRST: u32 = 5376u32; +pub type EC_ENDOFLINE = i32; +pub const EC_ENDOFLINE_CR: EC_ENDOFLINE = 2i32; +pub const EC_ENDOFLINE_CRLF: EC_ENDOFLINE = 1i32; +pub const EC_ENDOFLINE_DETECTFROMCONTENT: EC_ENDOFLINE = 0i32; +pub const EC_ENDOFLINE_LF: EC_ENDOFLINE = 3i32; +pub type EC_SEARCHWEB_ENTRYPOINT = i32; +pub const EC_SEARCHWEB_ENTRYPOINT_CONTEXTMENU: EC_SEARCHWEB_ENTRYPOINT = 1i32; +pub const EC_SEARCHWEB_ENTRYPOINT_EXTERNAL: EC_SEARCHWEB_ENTRYPOINT = 0i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct EDITBALLOONTIP { + pub cbStruct: u32, + pub pszTitle: windows_sys::core::PCWSTR, + pub pszText: windows_sys::core::PCWSTR, + pub ttiIcon: EDITBALLOONTIP_ICON, +} +impl Default for EDITBALLOONTIP { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type EDITBALLOONTIP_ICON = i32; +pub type EDITBORDER_HSCROLLSTATES = i32; +pub type EDITBORDER_HVSCROLLSTATES = i32; +pub type EDITBORDER_NOSCROLLSTATES = i32; +pub type EDITBORDER_VSCROLLSTATES = i32; +pub type EDITPARTS = i32; +pub type EDITTEXTSTATES = i32; +pub type EDITWORDBREAKPROCA = Option i32>; +pub type EDITWORDBREAKPROCW = Option i32>; +pub const EMF_CENTERED: NMLVEMPTYMARKUP_FLAGS = 1u32; +pub type EMPTYMARKUPPARTS = i32; +pub const EMP_MARKUPTEXT: EMPTYMARKUPPARTS = 1i32; +pub const EMT_LINKTEXT: MARKUPTEXTSTATES = 2i32; +pub const EMT_NORMALTEXT: MARKUPTEXTSTATES = 1i32; +pub const EM_CANUNDO: u32 = 198u32; +pub const EM_CHARFROMPOS: u32 = 215u32; +pub const EM_EMPTYUNDOBUFFER: u32 = 205u32; +pub const EM_ENABLEFEATURE: u32 = 218u32; +pub const EM_ENABLESEARCHWEB: u32 = 5390u32; +pub const EM_FILELINEFROMCHAR: u32 = 5395u32; +pub const EM_FILELINEINDEX: u32 = 5396u32; +pub const EM_FILELINELENGTH: u32 = 5397u32; +pub const EM_FMTLINES: u32 = 200u32; +pub const EM_GETCARETINDEX: u32 = 5394u32; +pub const EM_GETCUEBANNER: u32 = 5378u32; +pub const EM_GETENDOFLINE: u32 = 5389u32; +pub const EM_GETEXTENDEDSTYLE: u32 = 5387u32; +pub const EM_GETFILELINE: u32 = 5398u32; +pub const EM_GETFILELINECOUNT: u32 = 5399u32; +pub const EM_GETFIRSTVISIBLELINE: u32 = 206u32; +pub const EM_GETHANDLE: u32 = 189u32; +pub const EM_GETHILITE: u32 = 5382u32; +pub const EM_GETIMESTATUS: u32 = 217u32; +pub const EM_GETLIMITTEXT: u32 = 213u32; +pub const EM_GETLINE: u32 = 196u32; +pub const EM_GETLINECOUNT: u32 = 186u32; +pub const EM_GETMARGINS: u32 = 212u32; +pub const EM_GETMODIFY: u32 = 184u32; +pub const EM_GETPASSWORDCHAR: u32 = 210u32; +pub const EM_GETRECT: u32 = 178u32; +pub const EM_GETSEL: u32 = 176u32; +pub const EM_GETTHUMB: u32 = 190u32; +pub const EM_GETWORDBREAKPROC: u32 = 209u32; +pub const EM_HIDEBALLOONTIP: u32 = 5380u32; +pub const EM_LIMITTEXT: u32 = 197u32; +pub const EM_LINEFROMCHAR: u32 = 201u32; +pub const EM_LINEINDEX: u32 = 187u32; +pub const EM_LINELENGTH: u32 = 193u32; +pub const EM_LINESCROLL: u32 = 182u32; +pub const EM_NOSETFOCUS: u32 = 5383u32; +pub const EM_POSFROMCHAR: u32 = 214u32; +pub const EM_REPLACESEL: u32 = 194u32; +pub const EM_SCROLL: u32 = 181u32; +pub const EM_SCROLLCARET: u32 = 183u32; +pub const EM_SEARCHWEB: u32 = 5391u32; +pub const EM_SETCARETINDEX: u32 = 5393u32; +pub const EM_SETCUEBANNER: u32 = 5377u32; +pub const EM_SETENDOFLINE: u32 = 5388u32; +pub const EM_SETEXTENDEDSTYLE: u32 = 5386u32; +pub const EM_SETHANDLE: u32 = 188u32; +pub const EM_SETHILITE: u32 = 5381u32; +pub const EM_SETIMESTATUS: u32 = 216u32; +pub const EM_SETLIMITTEXT: u32 = 197u32; +pub const EM_SETMARGINS: u32 = 211u32; +pub const EM_SETMODIFY: u32 = 185u32; +pub const EM_SETPASSWORDCHAR: u32 = 204u32; +pub const EM_SETREADONLY: u32 = 207u32; +pub const EM_SETRECT: u32 = 179u32; +pub const EM_SETRECTNP: u32 = 180u32; +pub const EM_SETSEL: u32 = 177u32; +pub const EM_SETTABSTOPS: u32 = 203u32; +pub const EM_SETWORDBREAKPROC: u32 = 208u32; +pub const EM_SHOWBALLOONTIP: u32 = 5379u32; +pub const EM_TAKEFOCUS: u32 = 5384u32; +pub const EM_UNDO: u32 = 199u32; +pub type ENABLE_SCROLL_BAR_ARROWS = u32; +pub const EN_FIRST: u32 = 4294965776u32; +pub const EN_LAST: u32 = 4294965756u32; +pub const EN_SEARCHWEB: u32 = 4294965776u32; +pub const EPSHV_DISABLED: EDITBORDER_HVSCROLLSTATES = 4i32; +pub const EPSHV_FOCUSED: EDITBORDER_HVSCROLLSTATES = 3i32; +pub const EPSHV_HOT: EDITBORDER_HVSCROLLSTATES = 2i32; +pub const EPSHV_NORMAL: EDITBORDER_HVSCROLLSTATES = 1i32; +pub const EPSH_DISABLED: EDITBORDER_HSCROLLSTATES = 4i32; +pub const EPSH_FOCUSED: EDITBORDER_HSCROLLSTATES = 3i32; +pub const EPSH_HOT: EDITBORDER_HSCROLLSTATES = 2i32; +pub const EPSH_NORMAL: EDITBORDER_HSCROLLSTATES = 1i32; +pub const EPSN_DISABLED: EDITBORDER_NOSCROLLSTATES = 4i32; +pub const EPSN_FOCUSED: EDITBORDER_NOSCROLLSTATES = 3i32; +pub const EPSN_HOT: EDITBORDER_NOSCROLLSTATES = 2i32; +pub const EPSN_NORMAL: EDITBORDER_NOSCROLLSTATES = 1i32; +pub const EPSV_DISABLED: EDITBORDER_VSCROLLSTATES = 4i32; +pub const EPSV_FOCUSED: EDITBORDER_VSCROLLSTATES = 3i32; +pub const EPSV_HOT: EDITBORDER_VSCROLLSTATES = 2i32; +pub const EPSV_NORMAL: EDITBORDER_VSCROLLSTATES = 1i32; +pub const EP_BACKGROUND: EDITPARTS = 3i32; +pub const EP_BACKGROUNDWITHBORDER: EDITPARTS = 5i32; +pub const EP_CARET: EDITPARTS = 2i32; +pub const EP_EDITBORDER_HSCROLL: EDITPARTS = 7i32; +pub const EP_EDITBORDER_HVSCROLL: EDITPARTS = 9i32; +pub const EP_EDITBORDER_NOSCROLL: EDITPARTS = 6i32; +pub const EP_EDITBORDER_VSCROLL: EDITPARTS = 8i32; +pub const EP_EDITTEXT: EDITPARTS = 1i32; +pub const EP_PASSWORD: EDITPARTS = 4i32; +pub const ESB_DISABLE_BOTH: ENABLE_SCROLL_BAR_ARROWS = 3u32; +pub const ESB_DISABLE_DOWN: ENABLE_SCROLL_BAR_ARROWS = 2u32; +pub const ESB_DISABLE_LEFT: ENABLE_SCROLL_BAR_ARROWS = 1u32; +pub const ESB_DISABLE_LTUP: ENABLE_SCROLL_BAR_ARROWS = 1u32; +pub const ESB_DISABLE_RIGHT: ENABLE_SCROLL_BAR_ARROWS = 2u32; +pub const ESB_DISABLE_RTDN: ENABLE_SCROLL_BAR_ARROWS = 2u32; +pub const ESB_DISABLE_UP: ENABLE_SCROLL_BAR_ARROWS = 1u32; +pub const ESB_ENABLE_BOTH: ENABLE_SCROLL_BAR_ARROWS = 0u32; +pub const ES_EX_ALLOWEOL_CR: i32 = 1i32; +pub const ES_EX_ALLOWEOL_LF: i32 = 2i32; +pub const ES_EX_CONVERT_EOL_ON_PASTE: i32 = 4i32; +pub const ES_EX_ZOOMABLE: i32 = 16i32; +pub const ETDT_DISABLE: u32 = 1u32; +pub const ETDT_ENABLE: u32 = 2u32; +pub const ETDT_USEAEROWIZARDTABTEXTURE: u32 = 8u32; +pub const ETDT_USETABTEXTURE: u32 = 4u32; +pub const ETS_ASSIST: EDITTEXTSTATES = 7i32; +pub const ETS_CUEBANNER: EDITTEXTSTATES = 8i32; +pub const ETS_DISABLED: EDITTEXTSTATES = 4i32; +pub const ETS_FOCUSED: EDITTEXTSTATES = 5i32; +pub const ETS_HOT: EDITTEXTSTATES = 2i32; +pub const ETS_NORMAL: EDITTEXTSTATES = 1i32; +pub const ETS_READONLY: EDITTEXTSTATES = 6i32; +pub const ETS_SELECTED: EDITTEXTSTATES = 3i32; +pub type EXPANDBUTTONSTATES = i32; +pub type EXPANDOBUTTONSTATES = i32; +pub type EXPLORERBARPARTS = i32; +pub const FBS_EMPHASIZED: BODYSTATES = 2i32; +pub const FBS_NORMAL: BODYSTATES = 1i32; +pub const FEEDBACK_GESTURE_PRESSANDTAP: FEEDBACK_TYPE = 11i32; +pub const FEEDBACK_MAX: FEEDBACK_TYPE = -1i32; +pub const FEEDBACK_PEN_BARRELVISUALIZATION: FEEDBACK_TYPE = 2i32; +pub const FEEDBACK_PEN_DOUBLETAP: FEEDBACK_TYPE = 4i32; +pub const FEEDBACK_PEN_PRESSANDHOLD: FEEDBACK_TYPE = 5i32; +pub const FEEDBACK_PEN_RIGHTTAP: FEEDBACK_TYPE = 6i32; +pub const FEEDBACK_PEN_TAP: FEEDBACK_TYPE = 3i32; +pub const FEEDBACK_TOUCH_CONTACTVISUALIZATION: FEEDBACK_TYPE = 1i32; +pub const FEEDBACK_TOUCH_DOUBLETAP: FEEDBACK_TYPE = 8i32; +pub const FEEDBACK_TOUCH_PRESSANDHOLD: FEEDBACK_TYPE = 9i32; +pub const FEEDBACK_TOUCH_RIGHTTAP: FEEDBACK_TYPE = 10i32; +pub const FEEDBACK_TOUCH_TAP: FEEDBACK_TYPE = 7i32; +pub type FEEDBACK_TYPE = i32; +pub const FILEOPENORD: u32 = 1536u32; +pub type FILLSTATES = i32; +pub type FILLTYPE = i32; +pub type FILLVERTSTATES = i32; +pub const FINDDLGORD: u32 = 1540u32; +pub const FLH_HOVER: LINKHEADERSTATES = 2i32; +pub const FLH_NORMAL: LINKHEADERSTATES = 1i32; +pub const FLS_DISABLED: LABELSTATES = 4i32; +pub const FLS_EMPHASIZED: LABELSTATES = 3i32; +pub const FLS_NORMAL: LABELSTATES = 1i32; +pub const FLS_SELECTED: LABELSTATES = 2i32; +pub const FLYOUTLINK_HOVER: LINKSTATES = 2i32; +pub const FLYOUTLINK_NORMAL: LINKSTATES = 1i32; +pub type FLYOUTPARTS = i32; +pub const FLYOUT_BODY: FLYOUTPARTS = 2i32; +pub const FLYOUT_DIVIDER: FLYOUTPARTS = 5i32; +pub const FLYOUT_HEADER: FLYOUTPARTS = 1i32; +pub const FLYOUT_LABEL: FLYOUTPARTS = 3i32; +pub const FLYOUT_LINK: FLYOUTPARTS = 4i32; +pub const FLYOUT_LINKAREA: FLYOUTPARTS = 7i32; +pub const FLYOUT_LINKHEADER: FLYOUTPARTS = 8i32; +pub const FLYOUT_WINDOW: FLYOUTPARTS = 6i32; +pub const FONTDLGORD: u32 = 1542u32; +pub const FORMATDLGORD30: u32 = 1544u32; +pub const FORMATDLGORD31: u32 = 1543u32; +pub type FRAMEBOTTOMSTATES = i32; +pub type FRAMELEFTSTATES = i32; +pub type FRAMERIGHTSTATES = i32; +pub type FRAMESTATES = i32; +pub const FRB_ACTIVE: FRAMEBOTTOMSTATES = 1i32; +pub const FRB_INACTIVE: FRAMEBOTTOMSTATES = 2i32; +pub const FRL_ACTIVE: FRAMELEFTSTATES = 1i32; +pub const FRL_INACTIVE: FRAMELEFTSTATES = 2i32; +pub const FRR_ACTIVE: FRAMERIGHTSTATES = 1i32; +pub const FRR_INACTIVE: FRAMERIGHTSTATES = 2i32; +pub const FSB_ENCARTA_MODE: u32 = 1u32; +pub const FSB_FLAT_MODE: u32 = 2u32; +pub const FSB_REGULAR_MODE: u32 = 0u32; +pub const FS_ACTIVE: FRAMESTATES = 1i32; +pub const FS_INACTIVE: FRAMESTATES = 2i32; +pub const FT_HORZGRADIENT: FILLTYPE = 2i32; +pub const FT_RADIALGRADIENT: FILLTYPE = 3i32; +pub const FT_SOLID: FILLTYPE = 0i32; +pub const FT_TILEIMAGE: FILLTYPE = 4i32; +pub const FT_VERTGRADIENT: FILLTYPE = 1i32; +pub const GBF_COPY: GET_THEME_BITMAP_FLAGS = 2u32; +pub const GBF_DIRECT: GET_THEME_BITMAP_FLAGS = 1u32; +pub const GBF_VALIDBITS: GET_THEME_BITMAP_FLAGS = 3u32; +pub const GBS_DISABLED: GROUPBOXSTATES = 2i32; +pub const GBS_NORMAL: GROUPBOXSTATES = 1i32; +pub const GDTR_MAX: u32 = 2u32; +pub const GDTR_MIN: u32 = 1u32; +pub const GDT_ERROR: i32 = -1i32; +pub const GDT_NONE: NMDATETIMECHANGE_FLAGS = 1u32; +pub const GDT_VALID: NMDATETIMECHANGE_FLAGS = 0u32; +pub type GET_THEME_BITMAP_FLAGS = u32; +pub const GFST_DPI: GLYPHFONTSIZINGTYPE = 2i32; +pub const GFST_NONE: GLYPHFONTSIZINGTYPE = 0i32; +pub const GFST_SIZE: GLYPHFONTSIZINGTYPE = 1i32; +pub const GLPS_CLOSED: GLYPHSTATES = 1i32; +pub const GLPS_OPENED: GLYPHSTATES = 2i32; +pub type GLYPHFONTSIZINGTYPE = i32; +pub type GLYPHSTATES = i32; +pub type GLYPHTYPE = i32; +pub const GMR_DAYSTATE: u32 = 1u32; +pub const GMR_VISIBLE: u32 = 0u32; +pub type GRIDCELLBACKGROUNDSTATES = i32; +pub type GRIDCELLSTATES = i32; +pub type GRIDCELLUPPERSTATES = i32; +pub type GRIPPERSTATES = i32; +pub type GROUPBOXSTATES = i32; +pub type GROUPHEADERLINESTATES = i32; +pub type GROUPHEADERSTATES = i32; +pub const GT_FONTGLYPH: GLYPHTYPE = 2i32; +pub const GT_IMAGEGLYPH: GLYPHTYPE = 1i32; +pub const GT_NONE: GLYPHTYPE = 0i32; +pub type HALIGN = i32; +pub const HA_CENTER: HALIGN = 1i32; +pub const HA_LEFT: HALIGN = 0i32; +pub const HA_RIGHT: HALIGN = 2i32; +pub const HBG_DETAILS: HEADERSTYLESTATES = 1i32; +pub const HBG_ICON: HEADERSTYLESTATES = 2i32; +pub const HBS_DISABLED: HELPBUTTONSTATES = 4i32; +pub const HBS_HOT: HELPBUTTONSTATES = 2i32; +pub const HBS_NORMAL: HELPBUTTONSTATES = 1i32; +pub const HBS_PUSHED: HELPBUTTONSTATES = 3i32; +pub const HDDFS_HOT: HEADERDROPDOWNFILTERSTATES = 3i32; +pub const HDDFS_NORMAL: HEADERDROPDOWNFILTERSTATES = 1i32; +pub const HDDFS_SOFTHOT: HEADERDROPDOWNFILTERSTATES = 2i32; +pub const HDDS_HOT: HEADERDROPDOWNSTATES = 3i32; +pub const HDDS_NORMAL: HEADERDROPDOWNSTATES = 1i32; +pub const HDDS_SOFTHOT: HEADERDROPDOWNSTATES = 2i32; +pub const HDFT_HASNOVALUE: HEADER_CONTROL_FORMAT_TYPE = 32768u32; +pub const HDFT_ISDATE: HEADER_CONTROL_FORMAT_TYPE = 2u32; +pub const HDFT_ISNUMBER: HEADER_CONTROL_FORMAT_TYPE = 1u32; +pub const HDFT_ISSTRING: HEADER_CONTROL_FORMAT_TYPE = 0u32; +pub const HDF_BITMAP: HEADER_CONTROL_FORMAT_FLAGS = 8192i32; +pub const HDF_BITMAP_ON_RIGHT: HEADER_CONTROL_FORMAT_FLAGS = 4096i32; +pub const HDF_CENTER: HEADER_CONTROL_FORMAT_FLAGS = 2i32; +pub const HDF_CHECKBOX: HEADER_CONTROL_FORMAT_FLAGS = 64i32; +pub const HDF_CHECKED: HEADER_CONTROL_FORMAT_FLAGS = 128i32; +pub const HDF_FIXEDWIDTH: HEADER_CONTROL_FORMAT_FLAGS = 256i32; +pub const HDF_IMAGE: HEADER_CONTROL_FORMAT_FLAGS = 2048i32; +pub const HDF_JUSTIFYMASK: HEADER_CONTROL_FORMAT_FLAGS = 3i32; +pub const HDF_LEFT: HEADER_CONTROL_FORMAT_FLAGS = 0i32; +pub const HDF_OWNERDRAW: HEADER_CONTROL_FORMAT_FLAGS = 32768i32; +pub const HDF_RIGHT: HEADER_CONTROL_FORMAT_FLAGS = 1i32; +pub const HDF_RTLREADING: HEADER_CONTROL_FORMAT_FLAGS = 4i32; +pub const HDF_SORTDOWN: HEADER_CONTROL_FORMAT_FLAGS = 512i32; +pub const HDF_SORTUP: HEADER_CONTROL_FORMAT_FLAGS = 1024i32; +pub const HDF_SPLITBUTTON: HEADER_CONTROL_FORMAT_FLAGS = 16777216i32; +pub const HDF_STRING: HEADER_CONTROL_FORMAT_FLAGS = 16384i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct HDHITTESTINFO { + pub pt: super::super::Foundation::POINT, + pub flags: HEADER_HITTEST_INFO_FLAGS, + pub iItem: i32, +} +pub const HDIS_FOCUSED: HEADER_CONTROL_FORMAT_STATE = 1u32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct HDITEMA { + pub mask: HDI_MASK, + pub cxy: i32, + pub pszText: windows_sys::core::PSTR, + pub hbm: super::super::Graphics::Gdi::HBITMAP, + pub cchTextMax: i32, + pub fmt: HEADER_CONTROL_FORMAT_FLAGS, + pub lParam: super::super::Foundation::LPARAM, + pub iImage: i32, + pub iOrder: i32, + pub r#type: HEADER_CONTROL_FORMAT_TYPE, + pub pvFilter: *mut core::ffi::c_void, + pub state: HEADER_CONTROL_FORMAT_STATE, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for HDITEMA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct HDITEMW { + pub mask: HDI_MASK, + pub cxy: i32, + pub pszText: windows_sys::core::PWSTR, + pub hbm: super::super::Graphics::Gdi::HBITMAP, + pub cchTextMax: i32, + pub fmt: HEADER_CONTROL_FORMAT_FLAGS, + pub lParam: super::super::Foundation::LPARAM, + pub iImage: i32, + pub iOrder: i32, + pub r#type: HEADER_CONTROL_FORMAT_TYPE, + pub pvFilter: *mut core::ffi::c_void, + pub state: HEADER_CONTROL_FORMAT_STATE, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for HDITEMW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const HDI_BITMAP: HDI_MASK = 16u32; +pub const HDI_DI_SETITEM: HDI_MASK = 64u32; +pub const HDI_FILTER: HDI_MASK = 256u32; +pub const HDI_FORMAT: HDI_MASK = 4u32; +pub const HDI_HEIGHT: HDI_MASK = 1u32; +pub const HDI_IMAGE: HDI_MASK = 32u32; +pub const HDI_LPARAM: HDI_MASK = 8u32; +pub type HDI_MASK = u32; +pub const HDI_ORDER: HDI_MASK = 128u32; +pub const HDI_STATE: HDI_MASK = 512u32; +pub const HDI_TEXT: HDI_MASK = 2u32; +pub const HDI_WIDTH: HDI_MASK = 1u32; +#[repr(C)] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub struct HDLAYOUT { + pub prc: *mut super::super::Foundation::RECT, + pub pwpos: *mut super::WindowsAndMessaging::WINDOWPOS, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for HDLAYOUT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const HDM_CLEARFILTER: u32 = 4632u32; +pub const HDM_CREATEDRAGIMAGE: u32 = 4624u32; +pub const HDM_DELETEITEM: u32 = 4610u32; +pub const HDM_EDITFILTER: u32 = 4631u32; +pub const HDM_FIRST: u32 = 4608u32; +pub const HDM_GETBITMAPMARGIN: u32 = 4629u32; +pub const HDM_GETFOCUSEDITEM: u32 = 4635u32; +pub const HDM_GETIMAGELIST: u32 = 4617u32; +pub const HDM_GETITEM: u32 = 4619u32; +pub const HDM_GETITEMA: u32 = 4611u32; +pub const HDM_GETITEMCOUNT: u32 = 4608u32; +pub const HDM_GETITEMDROPDOWNRECT: u32 = 4633u32; +pub const HDM_GETITEMRECT: u32 = 4615u32; +pub const HDM_GETITEMW: u32 = 4619u32; +pub const HDM_GETORDERARRAY: u32 = 4625u32; +pub const HDM_GETOVERFLOWRECT: u32 = 4634u32; +pub const HDM_GETUNICODEFORMAT: u32 = 8198u32; +pub const HDM_HITTEST: u32 = 4614u32; +pub const HDM_INSERTITEM: u32 = 4618u32; +pub const HDM_INSERTITEMA: u32 = 4609u32; +pub const HDM_INSERTITEMW: u32 = 4618u32; +pub const HDM_LAYOUT: u32 = 4613u32; +pub const HDM_ORDERTOINDEX: u32 = 4623u32; +pub const HDM_SETBITMAPMARGIN: u32 = 4628u32; +pub const HDM_SETFILTERCHANGETIMEOUT: u32 = 4630u32; +pub const HDM_SETFOCUSEDITEM: u32 = 4636u32; +pub const HDM_SETHOTDIVIDER: u32 = 4627u32; +pub const HDM_SETIMAGELIST: u32 = 4616u32; +pub const HDM_SETITEM: u32 = 4620u32; +pub const HDM_SETITEMA: u32 = 4612u32; +pub const HDM_SETITEMW: u32 = 4620u32; +pub const HDM_SETORDERARRAY: u32 = 4626u32; +pub const HDM_SETUNICODEFORMAT: u32 = 8197u32; +pub const HDN_BEGINDRAG: u32 = 4294966986u32; +pub const HDN_BEGINFILTEREDIT: u32 = 4294966982u32; +pub const HDN_BEGINTRACK: u32 = 4294966970u32; +pub const HDN_BEGINTRACKA: u32 = 4294966990u32; +pub const HDN_BEGINTRACKW: u32 = 4294966970u32; +pub const HDN_DIVIDERDBLCLICK: u32 = 4294966971u32; +pub const HDN_DIVIDERDBLCLICKA: u32 = 4294966991u32; +pub const HDN_DIVIDERDBLCLICKW: u32 = 4294966971u32; +pub const HDN_DROPDOWN: u32 = 4294966978u32; +pub const HDN_ENDDRAG: u32 = 4294966985u32; +pub const HDN_ENDFILTEREDIT: u32 = 4294966981u32; +pub const HDN_ENDTRACK: u32 = 4294966969u32; +pub const HDN_ENDTRACKA: u32 = 4294966989u32; +pub const HDN_ENDTRACKW: u32 = 4294966969u32; +pub const HDN_FILTERBTNCLICK: u32 = 4294966983u32; +pub const HDN_FILTERCHANGE: u32 = 4294966984u32; +pub const HDN_FIRST: u32 = 4294966996u32; +pub const HDN_GETDISPINFO: u32 = 4294966967u32; +pub const HDN_GETDISPINFOA: u32 = 4294966987u32; +pub const HDN_GETDISPINFOW: u32 = 4294966967u32; +pub const HDN_ITEMCHANGED: u32 = 4294966975u32; +pub const HDN_ITEMCHANGEDA: u32 = 4294966995u32; +pub const HDN_ITEMCHANGEDW: u32 = 4294966975u32; +pub const HDN_ITEMCHANGING: u32 = 4294966976u32; +pub const HDN_ITEMCHANGINGA: u32 = 4294966996u32; +pub const HDN_ITEMCHANGINGW: u32 = 4294966976u32; +pub const HDN_ITEMCLICK: u32 = 4294966974u32; +pub const HDN_ITEMCLICKA: u32 = 4294966994u32; +pub const HDN_ITEMCLICKW: u32 = 4294966974u32; +pub const HDN_ITEMDBLCLICK: u32 = 4294966973u32; +pub const HDN_ITEMDBLCLICKA: u32 = 4294966993u32; +pub const HDN_ITEMDBLCLICKW: u32 = 4294966973u32; +pub const HDN_ITEMKEYDOWN: u32 = 4294966979u32; +pub const HDN_ITEMSTATEICONCLICK: u32 = 4294966980u32; +pub const HDN_LAST: u32 = 4294966897u32; +pub const HDN_OVERFLOWCLICK: u32 = 4294966977u32; +pub const HDN_TRACK: u32 = 4294966968u32; +pub const HDN_TRACKA: u32 = 4294966988u32; +pub const HDN_TRACKW: u32 = 4294966968u32; +pub type HDPA = isize; +pub type HDSA = isize; +pub const HDSIL_NORMAL: u32 = 0u32; +pub const HDSIL_STATE: u32 = 1u32; +pub const HDS_BUTTONS: u32 = 2u32; +pub const HDS_CHECKBOXES: u32 = 1024u32; +pub const HDS_DRAGDROP: u32 = 64u32; +pub const HDS_FILTERBAR: u32 = 256u32; +pub const HDS_FLAT: u32 = 512u32; +pub const HDS_FULLDRAG: u32 = 128u32; +pub const HDS_HIDDEN: u32 = 8u32; +pub const HDS_HORZ: u32 = 0u32; +pub const HDS_HOTTRACK: u32 = 4u32; +pub const HDS_NOSIZING: u32 = 2048u32; +pub const HDS_OVERFLOW: u32 = 4096u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct HD_TEXTFILTERA { + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, +} +impl Default for HD_TEXTFILTERA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct HD_TEXTFILTERW { + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, +} +impl Default for HD_TEXTFILTERW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type HEADERAREASTATES = i32; +pub type HEADERCLOSESTATES = i32; +pub type HEADERDROPDOWNFILTERSTATES = i32; +pub type HEADERDROPDOWNSTATES = i32; +pub type HEADERITEMLEFTSTATES = i32; +pub type HEADERITEMRIGHTSTATES = i32; +pub type HEADERITEMSTATES = i32; +pub type HEADEROVERFLOWSTATES = i32; +pub type HEADERPARTS = i32; +pub type HEADERPINSTATES = i32; +pub type HEADERSORTARROWSTATES = i32; +pub type HEADERSTYLESTATES = i32; +pub type HEADER_CONTROL_FORMAT_FLAGS = i32; +pub type HEADER_CONTROL_FORMAT_STATE = u32; +pub type HEADER_CONTROL_FORMAT_TYPE = u32; +pub type HEADER_CONTROL_NOTIFICATION_BUTTON = i32; +pub const HEADER_CONTROL_NOTIFICATION_BUTTON_LEFT: HEADER_CONTROL_NOTIFICATION_BUTTON = 0i32; +pub const HEADER_CONTROL_NOTIFICATION_BUTTON_MIDDLE: HEADER_CONTROL_NOTIFICATION_BUTTON = 2i32; +pub const HEADER_CONTROL_NOTIFICATION_BUTTON_RIGHT: HEADER_CONTROL_NOTIFICATION_BUTTON = 1i32; +pub type HEADER_HITTEST_INFO_FLAGS = u32; +pub type HELPBUTTONSTATES = i32; +pub type HELPLINKSTATES = i32; +pub const HGLPS_CLOSED: HOTGLYPHSTATES = 1i32; +pub const HGLPS_OPENED: HOTGLYPHSTATES = 2i32; +pub const HHT_ABOVE: HEADER_HITTEST_INFO_FLAGS = 256u32; +pub const HHT_BELOW: HEADER_HITTEST_INFO_FLAGS = 512u32; +pub const HHT_NOWHERE: HEADER_HITTEST_INFO_FLAGS = 1u32; +pub const HHT_ONDIVIDER: HEADER_HITTEST_INFO_FLAGS = 4u32; +pub const HHT_ONDIVOPEN: HEADER_HITTEST_INFO_FLAGS = 8u32; +pub const HHT_ONDROPDOWN: HEADER_HITTEST_INFO_FLAGS = 8192u32; +pub const HHT_ONFILTER: HEADER_HITTEST_INFO_FLAGS = 16u32; +pub const HHT_ONFILTERBUTTON: HEADER_HITTEST_INFO_FLAGS = 32u32; +pub const HHT_ONHEADER: HEADER_HITTEST_INFO_FLAGS = 2u32; +pub const HHT_ONITEMSTATEICON: HEADER_HITTEST_INFO_FLAGS = 4096u32; +pub const HHT_ONOVERFLOW: HEADER_HITTEST_INFO_FLAGS = 16384u32; +pub const HHT_TOLEFT: HEADER_HITTEST_INFO_FLAGS = 2048u32; +pub const HHT_TORIGHT: HEADER_HITTEST_INFO_FLAGS = 1024u32; +pub const HICF_ACCELERATOR: NMTBHOTITEM_FLAGS = 4u32; +pub const HICF_ARROWKEYS: NMTBHOTITEM_FLAGS = 2u32; +pub const HICF_DUPACCEL: NMTBHOTITEM_FLAGS = 8u32; +pub const HICF_ENTERING: NMTBHOTITEM_FLAGS = 16u32; +pub const HICF_LEAVING: NMTBHOTITEM_FLAGS = 32u32; +pub const HICF_LMOUSE: NMTBHOTITEM_FLAGS = 128u32; +pub const HICF_MOUSE: NMTBHOTITEM_FLAGS = 1u32; +pub const HICF_OTHER: NMTBHOTITEM_FLAGS = 0u32; +pub const HICF_RESELECT: NMTBHOTITEM_FLAGS = 64u32; +pub const HICF_TOGGLEDROPDOWN: NMTBHOTITEM_FLAGS = 256u32; +pub const HILS_HOT: HEADERITEMLEFTSTATES = 2i32; +pub const HILS_NORMAL: HEADERITEMLEFTSTATES = 1i32; +pub const HILS_PRESSED: HEADERITEMLEFTSTATES = 3i32; +pub type HIMAGELIST = isize; +pub const HIRS_HOT: HEADERITEMRIGHTSTATES = 2i32; +pub const HIRS_NORMAL: HEADERITEMRIGHTSTATES = 1i32; +pub const HIRS_PRESSED: HEADERITEMRIGHTSTATES = 3i32; +pub const HIST_ADDTOFAVORITES: u32 = 3u32; +pub const HIST_BACK: u32 = 0u32; +pub const HIST_FAVORITES: u32 = 2u32; +pub const HIST_FORWARD: u32 = 1u32; +pub const HIST_VIEWTREE: u32 = 4u32; +pub const HIS_HOT: HEADERITEMSTATES = 2i32; +pub const HIS_ICONHOT: HEADERITEMSTATES = 8i32; +pub const HIS_ICONNORMAL: HEADERITEMSTATES = 7i32; +pub const HIS_ICONPRESSED: HEADERITEMSTATES = 9i32; +pub const HIS_ICONSORTEDHOT: HEADERITEMSTATES = 11i32; +pub const HIS_ICONSORTEDNORMAL: HEADERITEMSTATES = 10i32; +pub const HIS_ICONSORTEDPRESSED: HEADERITEMSTATES = 12i32; +pub const HIS_NORMAL: HEADERITEMSTATES = 1i32; +pub const HIS_PRESSED: HEADERITEMSTATES = 3i32; +pub const HIS_SORTEDHOT: HEADERITEMSTATES = 5i32; +pub const HIS_SORTEDNORMAL: HEADERITEMSTATES = 4i32; +pub const HIS_SORTEDPRESSED: HEADERITEMSTATES = 6i32; +pub type HIT_TEST_BACKGROUND_OPTIONS = u32; +pub const HKCOMB_A: u32 = 8u32; +pub const HKCOMB_C: u32 = 4u32; +pub const HKCOMB_CA: u32 = 64u32; +pub const HKCOMB_NONE: u32 = 1u32; +pub const HKCOMB_S: u32 = 2u32; +pub const HKCOMB_SA: u32 = 32u32; +pub const HKCOMB_SC: u32 = 16u32; +pub const HKCOMB_SCA: u32 = 128u32; +pub const HKM_GETHOTKEY: u32 = 1026u32; +pub const HKM_SETHOTKEY: u32 = 1025u32; +pub const HKM_SETRULES: u32 = 1027u32; +pub const HLS_LINKTEXT: HYPERLINKSTATES = 2i32; +pub const HLS_NORMALTEXT: HYPERLINKSTATES = 1i32; +pub const HOFS_HOT: HEADEROVERFLOWSTATES = 2i32; +pub const HOFS_NORMAL: HEADEROVERFLOWSTATES = 1i32; +pub type HORZSCROLLSTATES = i32; +pub type HORZTHUMBSTATES = i32; +pub type HOTGLYPHSTATES = i32; +pub const HOTKEYF_ALT: u32 = 4u32; +pub const HOTKEYF_CONTROL: u32 = 2u32; +pub const HOTKEYF_EXT: u32 = 8u32; +pub const HOTKEYF_SHIFT: u32 = 1u32; +pub const HOTKEY_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_hotkey32"); +pub const HOTKEY_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("msctls_hotkey32"); +pub const HOTKEY_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_hotkey32"); +pub type HOVERBACKGROUNDSTATES = i32; +pub const HOVER_DEFAULT: u32 = 4294967295u32; +pub type HPROPSHEETPAGE = *mut core::ffi::c_void; +pub const HP_HEADERDROPDOWN: HEADERPARTS = 5i32; +pub const HP_HEADERDROPDOWNFILTER: HEADERPARTS = 6i32; +pub const HP_HEADERITEM: HEADERPARTS = 1i32; +pub const HP_HEADERITEMLEFT: HEADERPARTS = 2i32; +pub const HP_HEADERITEMRIGHT: HEADERPARTS = 3i32; +pub const HP_HEADEROVERFLOW: HEADERPARTS = 7i32; +pub const HP_HEADERSORTARROW: HEADERPARTS = 4i32; +pub const HSAS_SORTEDDOWN: HEADERSORTARROWSTATES = 2i32; +pub const HSAS_SORTEDUP: HEADERSORTARROWSTATES = 1i32; +pub const HSS_DISABLED: HORZSCROLLSTATES = 4i32; +pub const HSS_HOT: HORZSCROLLSTATES = 2i32; +pub const HSS_NORMAL: HORZSCROLLSTATES = 1i32; +pub const HSS_PUSHED: HORZSCROLLSTATES = 3i32; +pub type HSYNTHETICPOINTERDEVICE = *mut core::ffi::c_void; +pub type HTHEME = isize; +pub type HTREEITEM = isize; +pub const HTS_DISABLED: HORZTHUMBSTATES = 4i32; +pub const HTS_HOT: HORZTHUMBSTATES = 2i32; +pub const HTS_NORMAL: HORZTHUMBSTATES = 1i32; +pub const HTS_PUSHED: HORZTHUMBSTATES = 3i32; +pub const HTTB_BACKGROUNDSEG: HIT_TEST_BACKGROUND_OPTIONS = 0u32; +pub const HTTB_CAPTION: HIT_TEST_BACKGROUND_OPTIONS = 4u32; +pub const HTTB_FIXEDBORDER: HIT_TEST_BACKGROUND_OPTIONS = 2u32; +pub const HTTB_RESIZINGBORDER: HIT_TEST_BACKGROUND_OPTIONS = 240u32; +pub const HTTB_RESIZINGBORDER_BOTTOM: HIT_TEST_BACKGROUND_OPTIONS = 128u32; +pub const HTTB_RESIZINGBORDER_LEFT: HIT_TEST_BACKGROUND_OPTIONS = 16u32; +pub const HTTB_RESIZINGBORDER_RIGHT: HIT_TEST_BACKGROUND_OPTIONS = 64u32; +pub const HTTB_RESIZINGBORDER_TOP: HIT_TEST_BACKGROUND_OPTIONS = 32u32; +pub const HTTB_SIZINGTEMPLATE: HIT_TEST_BACKGROUND_OPTIONS = 256u32; +pub const HTTB_SYSTEMSIZINGMARGINS: HIT_TEST_BACKGROUND_OPTIONS = 512u32; +pub type HYPERLINKSTATES = i32; +pub type HYPERLINKTEXTSTATES = i32; +pub const ICC_ANIMATE_CLASS: INITCOMMONCONTROLSEX_ICC = 128u32; +pub const ICC_BAR_CLASSES: INITCOMMONCONTROLSEX_ICC = 4u32; +pub const ICC_COOL_CLASSES: INITCOMMONCONTROLSEX_ICC = 1024u32; +pub const ICC_DATE_CLASSES: INITCOMMONCONTROLSEX_ICC = 256u32; +pub const ICC_HOTKEY_CLASS: INITCOMMONCONTROLSEX_ICC = 64u32; +pub const ICC_INTERNET_CLASSES: INITCOMMONCONTROLSEX_ICC = 2048u32; +pub const ICC_LINK_CLASS: INITCOMMONCONTROLSEX_ICC = 32768u32; +pub const ICC_LISTVIEW_CLASSES: INITCOMMONCONTROLSEX_ICC = 1u32; +pub const ICC_NATIVEFNTCTL_CLASS: INITCOMMONCONTROLSEX_ICC = 8192u32; +pub const ICC_PAGESCROLLER_CLASS: INITCOMMONCONTROLSEX_ICC = 4096u32; +pub const ICC_PROGRESS_CLASS: INITCOMMONCONTROLSEX_ICC = 32u32; +pub const ICC_STANDARD_CLASSES: INITCOMMONCONTROLSEX_ICC = 16384u32; +pub const ICC_TAB_CLASSES: INITCOMMONCONTROLSEX_ICC = 8u32; +pub const ICC_TREEVIEW_CLASSES: INITCOMMONCONTROLSEX_ICC = 2u32; +pub const ICC_UPDOWN_CLASS: INITCOMMONCONTROLSEX_ICC = 16u32; +pub const ICC_USEREX_CLASSES: INITCOMMONCONTROLSEX_ICC = 512u32; +pub const ICC_WIN95_CLASSES: INITCOMMONCONTROLSEX_ICC = 255u32; +pub const ICE_ALPHA: ICONEFFECT = 4i32; +pub const ICE_GLOW: ICONEFFECT = 1i32; +pub const ICE_NONE: ICONEFFECT = 0i32; +pub const ICE_PULSE: ICONEFFECT = 3i32; +pub const ICE_SHADOW: ICONEFFECT = 2i32; +pub type ICONEFFECT = i32; +pub const IDB_HIST_DISABLED: u32 = 14u32; +pub const IDB_HIST_HOT: u32 = 13u32; +pub const IDB_HIST_LARGE_COLOR: u32 = 9u32; +pub const IDB_HIST_NORMAL: u32 = 12u32; +pub const IDB_HIST_PRESSED: u32 = 15u32; +pub const IDB_HIST_SMALL_COLOR: u32 = 8u32; +pub const IDB_STD_LARGE_COLOR: u32 = 1u32; +pub const IDB_STD_SMALL_COLOR: u32 = 0u32; +pub const IDB_VIEW_LARGE_COLOR: u32 = 5u32; +pub const IDB_VIEW_SMALL_COLOR: u32 = 4u32; +pub const IDC_MANAGE_LINK: u32 = 1592u32; +pub const ID_PSRESTARTWINDOWS: u32 = 2u32; +pub type IEBARMENUSTATES = i32; +pub const ILCF_MOVE: IMAGE_LIST_COPY_FLAGS = 0u32; +pub const ILCF_SWAP: IMAGE_LIST_COPY_FLAGS = 1u32; +pub const ILC_COLOR: IMAGELIST_CREATION_FLAGS = 0u32; +pub const ILC_COLOR16: IMAGELIST_CREATION_FLAGS = 16u32; +pub const ILC_COLOR24: IMAGELIST_CREATION_FLAGS = 24u32; +pub const ILC_COLOR32: IMAGELIST_CREATION_FLAGS = 32u32; +pub const ILC_COLOR4: IMAGELIST_CREATION_FLAGS = 4u32; +pub const ILC_COLOR8: IMAGELIST_CREATION_FLAGS = 8u32; +pub const ILC_COLORDDB: IMAGELIST_CREATION_FLAGS = 254u32; +pub const ILC_HIGHQUALITYSCALE: IMAGELIST_CREATION_FLAGS = 131072u32; +pub const ILC_MASK: IMAGELIST_CREATION_FLAGS = 1u32; +pub const ILC_MIRROR: IMAGELIST_CREATION_FLAGS = 8192u32; +pub const ILC_ORIGINALSIZE: IMAGELIST_CREATION_FLAGS = 65536u32; +pub const ILC_PALETTE: IMAGELIST_CREATION_FLAGS = 2048u32; +pub const ILC_PERITEMMIRROR: IMAGELIST_CREATION_FLAGS = 32768u32; +pub const ILDI_PURGE: u32 = 1u32; +pub const ILDI_QUERYACCESS: u32 = 8u32; +pub const ILDI_RESETACCESS: u32 = 4u32; +pub const ILDI_STANDBY: u32 = 2u32; +pub const ILDRF_IMAGELOWQUALITY: u32 = 1u32; +pub const ILDRF_OVERLAYLOWQUALITY: u32 = 16u32; +pub const ILD_ASYNC: IMAGE_LIST_DRAW_STYLE = 32768u32; +pub const ILD_BLEND: IMAGE_LIST_DRAW_STYLE = 4u32; +pub const ILD_BLEND25: IMAGE_LIST_DRAW_STYLE = 2u32; +pub const ILD_BLEND50: IMAGE_LIST_DRAW_STYLE = 4u32; +pub const ILD_DPISCALE: IMAGE_LIST_DRAW_STYLE = 16384u32; +pub const ILD_FOCUS: IMAGE_LIST_DRAW_STYLE = 2u32; +pub const ILD_IMAGE: IMAGE_LIST_DRAW_STYLE = 32u32; +pub const ILD_MASK: IMAGE_LIST_DRAW_STYLE = 16u32; +pub const ILD_NORMAL: IMAGE_LIST_DRAW_STYLE = 0u32; +pub const ILD_OVERLAYMASK: IMAGE_LIST_DRAW_STYLE = 3840u32; +pub const ILD_PRESERVEALPHA: IMAGE_LIST_DRAW_STYLE = 4096u32; +pub const ILD_ROP: IMAGE_LIST_DRAW_STYLE = 64u32; +pub const ILD_SCALE: IMAGE_LIST_DRAW_STYLE = 8192u32; +pub const ILD_SELECTED: IMAGE_LIST_DRAW_STYLE = 4u32; +pub const ILD_TRANSPARENT: IMAGE_LIST_DRAW_STYLE = 1u32; +pub const ILFIP_ALWAYS: u32 = 0u32; +pub const ILFIP_FROMSTANDBY: u32 = 1u32; +pub const ILGOS_ALWAYS: u32 = 0u32; +pub const ILGOS_FROMSTANDBY: u32 = 1u32; +pub const ILGT_ASYNC: u32 = 1u32; +pub const ILGT_NORMAL: u32 = 0u32; +pub const ILIF_ALPHA: IMAGE_LIST_ITEM_FLAGS = 1u32; +pub const ILIF_LOWQUALITY: IMAGE_LIST_ITEM_FLAGS = 2u32; +pub const ILP_DOWNLEVEL: IMAGE_LIST_WRITE_STREAM_FLAGS = 1u32; +pub const ILP_NORMAL: IMAGE_LIST_WRITE_STREAM_FLAGS = 0u32; +pub const ILR_DEFAULT: u32 = 0u32; +pub const ILR_HORIZONTAL_CENTER: u32 = 1u32; +pub const ILR_HORIZONTAL_LEFT: u32 = 0u32; +pub const ILR_HORIZONTAL_RIGHT: u32 = 2u32; +pub const ILR_SCALE_ASPECTRATIO: u32 = 256u32; +pub const ILR_SCALE_CLIP: u32 = 0u32; +pub const ILR_VERTICAL_BOTTOM: u32 = 32u32; +pub const ILR_VERTICAL_CENTER: u32 = 16u32; +pub const ILR_VERTICAL_TOP: u32 = 0u32; +pub const ILS_ALPHA: u32 = 8u32; +pub const ILS_GLOW: u32 = 1u32; +pub const ILS_NORMAL: u32 = 0u32; +pub const ILS_SATURATE: u32 = 4u32; +pub const ILS_SHADOW: u32 = 2u32; +pub const IL_HORIZONTAL: IMAGELAYOUT = 1i32; +pub const IL_VERTICAL: IMAGELAYOUT = 0i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct IMAGEINFO { + pub hbmImage: super::super::Graphics::Gdi::HBITMAP, + pub hbmMask: super::super::Graphics::Gdi::HBITMAP, + pub Unused1: i32, + pub Unused2: i32, + pub rcImage: super::super::Foundation::RECT, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for IMAGEINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type IMAGELAYOUT = i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct IMAGELISTDRAWPARAMS { + pub cbSize: u32, + pub himl: HIMAGELIST, + pub i: i32, + pub hdcDst: super::super::Graphics::Gdi::HDC, + pub x: i32, + pub y: i32, + pub cx: i32, + pub cy: i32, + pub xBitmap: i32, + pub yBitmap: i32, + pub rgbBk: super::super::Foundation::COLORREF, + pub rgbFg: super::super::Foundation::COLORREF, + pub fStyle: u32, + pub dwRop: u32, + pub fState: u32, + pub Frame: u32, + pub crEffect: super::super::Foundation::COLORREF, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for IMAGELISTDRAWPARAMS { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct IMAGELISTSTATS { + pub cbSize: u32, + pub cAlloc: i32, + pub cUsed: i32, + pub cStandby: i32, +} +pub type IMAGELIST_CREATION_FLAGS = u32; +pub type IMAGESELECTTYPE = i32; +pub type IMAGE_LIST_COPY_FLAGS = u32; +pub type IMAGE_LIST_DRAW_STYLE = u32; +pub type IMAGE_LIST_ITEM_FLAGS = u32; +pub type IMAGE_LIST_WRITE_STREAM_FLAGS = u32; +pub const INFOTIPSIZE: u32 = 1024u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct INITCOMMONCONTROLSEX { + pub dwSize: u32, + pub dwICC: INITCOMMONCONTROLSEX_ICC, +} +pub type INITCOMMONCONTROLSEX_ICC = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct INTLIST { + pub iValueCount: i32, + pub iValues: [i32; 402], +} +impl Default for INTLIST { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const INVALID_LINK_INDEX: i32 = -1i32; +pub const IPM_CLEARADDRESS: u32 = 1124u32; +pub const IPM_GETADDRESS: u32 = 1126u32; +pub const IPM_ISBLANK: u32 = 1129u32; +pub const IPM_SETADDRESS: u32 = 1125u32; +pub const IPM_SETFOCUS: u32 = 1128u32; +pub const IPM_SETRANGE: u32 = 1127u32; +pub const IPN_FIELDCHANGED: u32 = 4294966436u32; +pub const IPN_FIRST: u32 = 4294966436u32; +pub const IPN_LAST: u32 = 4294966417u32; +pub const IST_DPI: IMAGESELECTTYPE = 2i32; +pub const IST_NONE: IMAGESELECTTYPE = 0i32; +pub const IST_SIZE: IMAGESELECTTYPE = 1i32; +pub type ITEMSTATES = i32; +pub const I_CHILDRENAUTO: TVITEMEXW_CHILDREN = -2i32; +pub const I_CHILDRENCALLBACK: TVITEMEXW_CHILDREN = -1i32; +pub const I_GROUPIDCALLBACK: LVITEMA_GROUP_ID = -1i32; +pub const I_GROUPIDNONE: LVITEMA_GROUP_ID = -2i32; +pub const I_IMAGECALLBACK: i32 = -1i32; +pub const I_IMAGENONE: i32 = -2i32; +pub const I_INDENTCALLBACK: i32 = -1i32; +pub const I_ONE_OR_MORE: TVITEMEXW_CHILDREN = 1i32; +pub const I_ZERO: TVITEMEXW_CHILDREN = 0i32; +pub const ImageList: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x7c476ba2_02b1_48f4_8048_b24619ddc058); +pub type LABELSTATES = i32; +pub const LBCP_BORDER_HSCROLL: LISTBOXPARTS = 1i32; +pub const LBCP_BORDER_HVSCROLL: LISTBOXPARTS = 2i32; +pub const LBCP_BORDER_NOSCROLL: LISTBOXPARTS = 3i32; +pub const LBCP_BORDER_VSCROLL: LISTBOXPARTS = 4i32; +pub const LBCP_ITEM: LISTBOXPARTS = 5i32; +pub const LBPSHV_DISABLED: BORDER_HVSCROLLSTATES = 4i32; +pub const LBPSHV_FOCUSED: BORDER_HVSCROLLSTATES = 2i32; +pub const LBPSHV_HOT: BORDER_HVSCROLLSTATES = 3i32; +pub const LBPSHV_NORMAL: BORDER_HVSCROLLSTATES = 1i32; +pub const LBPSH_DISABLED: BORDER_HSCROLLSTATES = 4i32; +pub const LBPSH_FOCUSED: BORDER_HSCROLLSTATES = 2i32; +pub const LBPSH_HOT: BORDER_HSCROLLSTATES = 3i32; +pub const LBPSH_NORMAL: BORDER_HSCROLLSTATES = 1i32; +pub const LBPSI_HOT: ITEMSTATES = 1i32; +pub const LBPSI_HOTSELECTED: ITEMSTATES = 2i32; +pub const LBPSI_SELECTED: ITEMSTATES = 3i32; +pub const LBPSI_SELECTEDNOTFOCUS: ITEMSTATES = 4i32; +pub const LBPSN_DISABLED: BORDER_NOSCROLLSTATES = 4i32; +pub const LBPSN_FOCUSED: BORDER_NOSCROLLSTATES = 2i32; +pub const LBPSN_HOT: BORDER_NOSCROLLSTATES = 3i32; +pub const LBPSN_NORMAL: BORDER_NOSCROLLSTATES = 1i32; +pub const LBPSV_DISABLED: BORDER_VSCROLLSTATES = 4i32; +pub const LBPSV_FOCUSED: BORDER_VSCROLLSTATES = 2i32; +pub const LBPSV_HOT: BORDER_VSCROLLSTATES = 3i32; +pub const LBPSV_NORMAL: BORDER_VSCROLLSTATES = 1i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LHITTESTINFO { + pub pt: super::super::Foundation::POINT, + pub item: LITEM, +} +pub const LIF_ITEMID: LIST_ITEM_FLAGS = 4u32; +pub const LIF_ITEMINDEX: LIST_ITEM_FLAGS = 1u32; +pub const LIF_STATE: LIST_ITEM_FLAGS = 2u32; +pub const LIF_URL: LIST_ITEM_FLAGS = 8u32; +pub const LIM_LARGE: _LI_METRIC = 1i32; +pub const LIM_SMALL: _LI_METRIC = 0i32; +pub type LINKHEADERSTATES = i32; +pub type LINKPARTS = i32; +pub type LINKSTATES = i32; +pub const LISS_DISABLED: LISTITEMSTATES = 4i32; +pub const LISS_HOT: LISTITEMSTATES = 2i32; +pub const LISS_HOTSELECTED: LISTITEMSTATES = 6i32; +pub const LISS_NORMAL: LISTITEMSTATES = 1i32; +pub const LISS_SELECTED: LISTITEMSTATES = 3i32; +pub const LISS_SELECTEDNOTFOCUS: LISTITEMSTATES = 5i32; +pub type LISTBOXPARTS = i32; +pub type LISTITEMSTATES = i32; +pub type LISTVIEWPARTS = i32; +pub type LIST_ITEM_FLAGS = u32; +pub type LIST_ITEM_STATE_FLAGS = u32; +pub type LIST_VIEW_BACKGROUND_IMAGE_FLAGS = u32; +pub type LIST_VIEW_GROUP_ALIGN_FLAGS = u32; +pub type LIST_VIEW_GROUP_STATE_FLAGS = u32; +pub type LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS = i32; +pub type LIST_VIEW_ITEM_FLAGS = u32; +pub type LIST_VIEW_ITEM_STATE_FLAGS = u32; +pub const LIS_DEFAULTCOLORS: LIST_ITEM_STATE_FLAGS = 16u32; +pub const LIS_ENABLED: LIST_ITEM_STATE_FLAGS = 2u32; +pub const LIS_FOCUSED: LIST_ITEM_STATE_FLAGS = 1u32; +pub const LIS_HOTTRACK: LIST_ITEM_STATE_FLAGS = 8u32; +pub const LIS_VISITED: LIST_ITEM_STATE_FLAGS = 4u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LITEM { + pub mask: LIST_ITEM_FLAGS, + pub iLink: i32, + pub state: LIST_ITEM_STATE_FLAGS, + pub stateMask: LIST_ITEM_STATE_FLAGS, + pub szID: [u16; 48], + pub szUrl: [u16; 2084], +} +impl Default for LITEM { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const LM_GETIDEALHEIGHT: u32 = 1793u32; +pub const LM_GETIDEALSIZE: u32 = 1793u32; +pub const LM_GETITEM: u32 = 1795u32; +pub const LM_HITTEST: u32 = 1792u32; +pub const LM_SETITEM: u32 = 1794u32; +pub type LOGOFFBUTTONSSTATES = i32; +pub type LPFNADDPROPSHEETPAGES = Option windows_sys::core::BOOL>; +#[cfg(feature = "Win32_Graphics_Gdi")] +pub type LPFNCCINFOA = Option u32>; +#[cfg(feature = "Win32_Graphics_Gdi")] +pub type LPFNCCINFOW = Option u32>; +#[cfg(feature = "Win32_Graphics_Gdi")] +pub type LPFNCCSIZETOTEXTA = Option i32>; +#[cfg(feature = "Win32_Graphics_Gdi")] +pub type LPFNCCSIZETOTEXTW = Option i32>; +pub type LPFNCCSTYLEA = Option windows_sys::core::BOOL>; +pub type LPFNCCSTYLEW = Option windows_sys::core::BOOL>; +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +pub type LPFNPSPCALLBACKA = Option u32>; +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +pub type LPFNPSPCALLBACKW = Option u32>; +pub type LPFNSVADDPROPSHEETPAGE = Option windows_sys::core::BOOL>; +pub const LP_HYPERLINK: LINKPARTS = 1i32; +pub const LVA_ALIGNLEFT: u32 = 1u32; +pub const LVA_ALIGNTOP: u32 = 2u32; +pub const LVA_DEFAULT: u32 = 0u32; +pub const LVA_SNAPTOGRID: u32 = 5u32; +pub const LVBKIF_FLAG_ALPHABLEND: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 536870912u32; +pub const LVBKIF_FLAG_TILEOFFSET: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 256u32; +pub const LVBKIF_SOURCE_HBITMAP: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 1u32; +pub const LVBKIF_SOURCE_MASK: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 3u32; +pub const LVBKIF_SOURCE_NONE: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 0u32; +pub const LVBKIF_SOURCE_URL: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 2u32; +pub const LVBKIF_STYLE_MASK: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 16u32; +pub const LVBKIF_STYLE_NORMAL: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 0u32; +pub const LVBKIF_STYLE_TILE: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 16u32; +pub const LVBKIF_TYPE_WATERMARK: LIST_VIEW_BACKGROUND_IMAGE_FLAGS = 268435456u32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct LVBKIMAGEA { + pub ulFlags: LIST_VIEW_BACKGROUND_IMAGE_FLAGS, + pub hbm: super::super::Graphics::Gdi::HBITMAP, + pub pszImage: windows_sys::core::PSTR, + pub cchImageMax: u32, + pub xOffsetPercent: i32, + pub yOffsetPercent: i32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for LVBKIMAGEA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct LVBKIMAGEW { + pub ulFlags: LIST_VIEW_BACKGROUND_IMAGE_FLAGS, + pub hbm: super::super::Graphics::Gdi::HBITMAP, + pub pszImage: windows_sys::core::PWSTR, + pub cchImageMax: u32, + pub xOffsetPercent: i32, + pub yOffsetPercent: i32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for LVBKIMAGEW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const LVCB_HOVER: COLLAPSEBUTTONSTATES = 2i32; +pub const LVCB_NORMAL: COLLAPSEBUTTONSTATES = 1i32; +pub const LVCB_PUSHED: COLLAPSEBUTTONSTATES = 3i32; +pub const LVCDI_GROUP: NMLVCUSTOMDRAW_ITEM_TYPE = 1u32; +pub const LVCDI_ITEM: NMLVCUSTOMDRAW_ITEM_TYPE = 0u32; +pub const LVCDI_ITEMSLIST: NMLVCUSTOMDRAW_ITEM_TYPE = 2u32; +pub const LVCDRF_NOGROUPFRAME: u32 = 131072u32; +pub const LVCDRF_NOSELECT: u32 = 65536u32; +pub const LVCFMT_BITMAP_ON_RIGHT: LVCOLUMNW_FORMAT = 4096i32; +pub const LVCFMT_CENTER: LVCOLUMNW_FORMAT = 2i32; +pub const LVCFMT_COL_HAS_IMAGES: LVCOLUMNW_FORMAT = 32768i32; +pub const LVCFMT_FILL: LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS = 2097152i32; +pub const LVCFMT_FIXED_RATIO: LVCOLUMNW_FORMAT = 524288i32; +pub const LVCFMT_FIXED_WIDTH: LVCOLUMNW_FORMAT = 256i32; +pub const LVCFMT_IMAGE: LVCOLUMNW_FORMAT = 2048i32; +pub const LVCFMT_JUSTIFYMASK: LVCOLUMNW_FORMAT = 3i32; +pub const LVCFMT_LEFT: LVCOLUMNW_FORMAT = 0i32; +pub const LVCFMT_LINE_BREAK: LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS = 1048576i32; +pub const LVCFMT_NO_DPI_SCALE: LVCOLUMNW_FORMAT = 262144i32; +pub const LVCFMT_NO_TITLE: LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS = 8388608i32; +pub const LVCFMT_RIGHT: LVCOLUMNW_FORMAT = 1i32; +pub const LVCFMT_SPLITBUTTON: LVCOLUMNW_FORMAT = 16777216i32; +pub const LVCFMT_TILE_PLACEMENTMASK: LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS = 3145728i32; +pub const LVCFMT_WRAP: LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS = 4194304i32; +pub const LVCF_DEFAULTWIDTH: LVCOLUMNW_MASK = 128u32; +pub const LVCF_FMT: LVCOLUMNW_MASK = 1u32; +pub const LVCF_IDEALWIDTH: LVCOLUMNW_MASK = 256u32; +pub const LVCF_IMAGE: LVCOLUMNW_MASK = 16u32; +pub const LVCF_MINWIDTH: LVCOLUMNW_MASK = 64u32; +pub const LVCF_ORDER: LVCOLUMNW_MASK = 32u32; +pub const LVCF_SUBITEM: LVCOLUMNW_MASK = 8u32; +pub const LVCF_TEXT: LVCOLUMNW_MASK = 4u32; +pub const LVCF_WIDTH: LVCOLUMNW_MASK = 2u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVCOLUMNA { + pub mask: LVCOLUMNW_MASK, + pub fmt: LVCOLUMNW_FORMAT, + pub cx: i32, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iSubItem: i32, + pub iImage: i32, + pub iOrder: i32, + pub cxMin: i32, + pub cxDefault: i32, + pub cxIdeal: i32, +} +impl Default for LVCOLUMNA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVCOLUMNW { + pub mask: LVCOLUMNW_MASK, + pub fmt: LVCOLUMNW_FORMAT, + pub cx: i32, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iSubItem: i32, + pub iImage: i32, + pub iOrder: i32, + pub cxMin: i32, + pub cxDefault: i32, + pub cxIdeal: i32, +} +impl Default for LVCOLUMNW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type LVCOLUMNW_FORMAT = i32; +pub type LVCOLUMNW_MASK = u32; +pub const LVEB_HOVER: EXPANDBUTTONSTATES = 2i32; +pub const LVEB_NORMAL: EXPANDBUTTONSTATES = 1i32; +pub const LVEB_PUSHED: EXPANDBUTTONSTATES = 3i32; +pub const LVFF_ITEMCOUNT: u32 = 1u32; +pub const LVFIF_STATE: LVFOOTERITEM_MASK = 2u32; +pub const LVFIF_TEXT: LVFOOTERITEM_MASK = 1u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVFINDINFOA { + pub flags: LVFINDINFOW_FLAGS, + pub psz: windows_sys::core::PCSTR, + pub lParam: super::super::Foundation::LPARAM, + pub pt: super::super::Foundation::POINT, + pub vkDirection: u32, +} +impl Default for LVFINDINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVFINDINFOW { + pub flags: LVFINDINFOW_FLAGS, + pub psz: windows_sys::core::PCWSTR, + pub lParam: super::super::Foundation::LPARAM, + pub pt: super::super::Foundation::POINT, + pub vkDirection: u32, +} +impl Default for LVFINDINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type LVFINDINFOW_FLAGS = u32; +pub const LVFIS_FOCUSED: u32 = 1u32; +pub const LVFI_NEARESTXY: LVFINDINFOW_FLAGS = 64u32; +pub const LVFI_PARAM: LVFINDINFOW_FLAGS = 1u32; +pub const LVFI_PARTIAL: LVFINDINFOW_FLAGS = 8u32; +pub const LVFI_STRING: LVFINDINFOW_FLAGS = 2u32; +pub const LVFI_SUBSTRING: LVFINDINFOW_FLAGS = 4u32; +pub const LVFI_WRAP: LVFINDINFOW_FLAGS = 32u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVFOOTERINFO { + pub mask: u32, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub cItems: u32, +} +impl Default for LVFOOTERINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVFOOTERITEM { + pub mask: LVFOOTERITEM_MASK, + pub iItem: i32, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub state: u32, + pub stateMask: u32, +} +impl Default for LVFOOTERITEM { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type LVFOOTERITEM_MASK = u32; +pub const LVGA_FOOTER_CENTER: LIST_VIEW_GROUP_ALIGN_FLAGS = 16u32; +pub const LVGA_FOOTER_LEFT: LIST_VIEW_GROUP_ALIGN_FLAGS = 8u32; +pub const LVGA_FOOTER_RIGHT: LIST_VIEW_GROUP_ALIGN_FLAGS = 32u32; +pub const LVGA_HEADER_CENTER: LIST_VIEW_GROUP_ALIGN_FLAGS = 2u32; +pub const LVGA_HEADER_LEFT: LIST_VIEW_GROUP_ALIGN_FLAGS = 1u32; +pub const LVGA_HEADER_RIGHT: LIST_VIEW_GROUP_ALIGN_FLAGS = 4u32; +pub const LVGF_ALIGN: LVGROUP_MASK = 8u32; +pub const LVGF_DESCRIPTIONBOTTOM: LVGROUP_MASK = 2048u32; +pub const LVGF_DESCRIPTIONTOP: LVGROUP_MASK = 1024u32; +pub const LVGF_EXTENDEDIMAGE: LVGROUP_MASK = 8192u32; +pub const LVGF_FOOTER: LVGROUP_MASK = 2u32; +pub const LVGF_GROUPID: LVGROUP_MASK = 16u32; +pub const LVGF_HEADER: LVGROUP_MASK = 1u32; +pub const LVGF_ITEMS: LVGROUP_MASK = 16384u32; +pub const LVGF_NONE: LVGROUP_MASK = 0u32; +pub const LVGF_STATE: LVGROUP_MASK = 4u32; +pub const LVGF_SUBSET: LVGROUP_MASK = 32768u32; +pub const LVGF_SUBSETITEMS: LVGROUP_MASK = 65536u32; +pub const LVGF_SUBTITLE: LVGROUP_MASK = 256u32; +pub const LVGF_TASK: LVGROUP_MASK = 512u32; +pub const LVGF_TITLEIMAGE: LVGROUP_MASK = 4096u32; +pub const LVGGR_GROUP: u32 = 0u32; +pub const LVGGR_HEADER: u32 = 1u32; +pub const LVGGR_LABEL: u32 = 2u32; +pub const LVGGR_SUBSETLINK: u32 = 3u32; +pub const LVGHL_CLOSE: GROUPHEADERLINESTATES = 9i32; +pub const LVGHL_CLOSEHOT: GROUPHEADERLINESTATES = 10i32; +pub const LVGHL_CLOSEMIXEDSELECTION: GROUPHEADERLINESTATES = 15i32; +pub const LVGHL_CLOSEMIXEDSELECTIONHOT: GROUPHEADERLINESTATES = 16i32; +pub const LVGHL_CLOSESELECTED: GROUPHEADERLINESTATES = 11i32; +pub const LVGHL_CLOSESELECTEDHOT: GROUPHEADERLINESTATES = 12i32; +pub const LVGHL_CLOSESELECTEDNOTFOCUSED: GROUPHEADERLINESTATES = 13i32; +pub const LVGHL_CLOSESELECTEDNOTFOCUSEDHOT: GROUPHEADERLINESTATES = 14i32; +pub const LVGHL_OPEN: GROUPHEADERLINESTATES = 1i32; +pub const LVGHL_OPENHOT: GROUPHEADERLINESTATES = 2i32; +pub const LVGHL_OPENMIXEDSELECTION: GROUPHEADERLINESTATES = 7i32; +pub const LVGHL_OPENMIXEDSELECTIONHOT: GROUPHEADERLINESTATES = 8i32; +pub const LVGHL_OPENSELECTED: GROUPHEADERLINESTATES = 3i32; +pub const LVGHL_OPENSELECTEDHOT: GROUPHEADERLINESTATES = 4i32; +pub const LVGHL_OPENSELECTEDNOTFOCUSED: GROUPHEADERLINESTATES = 5i32; +pub const LVGHL_OPENSELECTEDNOTFOCUSEDHOT: GROUPHEADERLINESTATES = 6i32; +pub const LVGH_CLOSE: GROUPHEADERSTATES = 9i32; +pub const LVGH_CLOSEHOT: GROUPHEADERSTATES = 10i32; +pub const LVGH_CLOSEMIXEDSELECTION: GROUPHEADERSTATES = 15i32; +pub const LVGH_CLOSEMIXEDSELECTIONHOT: GROUPHEADERSTATES = 16i32; +pub const LVGH_CLOSESELECTED: GROUPHEADERSTATES = 11i32; +pub const LVGH_CLOSESELECTEDHOT: GROUPHEADERSTATES = 12i32; +pub const LVGH_CLOSESELECTEDNOTFOCUSED: GROUPHEADERSTATES = 13i32; +pub const LVGH_CLOSESELECTEDNOTFOCUSEDHOT: GROUPHEADERSTATES = 14i32; +pub const LVGH_OPEN: GROUPHEADERSTATES = 1i32; +pub const LVGH_OPENHOT: GROUPHEADERSTATES = 2i32; +pub const LVGH_OPENMIXEDSELECTION: GROUPHEADERSTATES = 7i32; +pub const LVGH_OPENMIXEDSELECTIONHOT: GROUPHEADERSTATES = 8i32; +pub const LVGH_OPENSELECTED: GROUPHEADERSTATES = 3i32; +pub const LVGH_OPENSELECTEDHOT: GROUPHEADERSTATES = 4i32; +pub const LVGH_OPENSELECTEDNOTFOCUSED: GROUPHEADERSTATES = 5i32; +pub const LVGH_OPENSELECTEDNOTFOCUSEDHOT: GROUPHEADERSTATES = 6i32; +pub const LVGIT_UNFOLDED: NMLVGETINFOTIP_FLAGS = 1u32; +pub const LVGIT_ZERO: NMLVGETINFOTIP_FLAGS = 0u32; +pub const LVGMF_BORDERCOLOR: u32 = 2u32; +pub const LVGMF_BORDERSIZE: u32 = 1u32; +pub const LVGMF_NONE: u32 = 0u32; +pub const LVGMF_TEXTCOLOR: u32 = 4u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVGROUP { + pub cbSize: u32, + pub mask: LVGROUP_MASK, + pub pszHeader: windows_sys::core::PWSTR, + pub cchHeader: i32, + pub pszFooter: windows_sys::core::PWSTR, + pub cchFooter: i32, + pub iGroupId: i32, + pub stateMask: LIST_VIEW_GROUP_STATE_FLAGS, + pub state: LIST_VIEW_GROUP_STATE_FLAGS, + pub uAlign: LIST_VIEW_GROUP_ALIGN_FLAGS, + pub pszSubtitle: windows_sys::core::PWSTR, + pub cchSubtitle: u32, + pub pszTask: windows_sys::core::PWSTR, + pub cchTask: u32, + pub pszDescriptionTop: windows_sys::core::PWSTR, + pub cchDescriptionTop: u32, + pub pszDescriptionBottom: windows_sys::core::PWSTR, + pub cchDescriptionBottom: u32, + pub iTitleImage: i32, + pub iExtendedImage: i32, + pub iFirstItem: i32, + pub cItems: u32, + pub pszSubsetTitle: windows_sys::core::PWSTR, + pub cchSubsetTitle: u32, +} +impl Default for LVGROUP { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LVGROUPMETRICS { + pub cbSize: u32, + pub mask: u32, + pub Left: u32, + pub Top: u32, + pub Right: u32, + pub Bottom: u32, + pub crLeft: super::super::Foundation::COLORREF, + pub crTop: super::super::Foundation::COLORREF, + pub crRight: super::super::Foundation::COLORREF, + pub crBottom: super::super::Foundation::COLORREF, + pub crHeader: super::super::Foundation::COLORREF, + pub crFooter: super::super::Foundation::COLORREF, +} +pub type LVGROUP_MASK = u32; +pub const LVGS_COLLAPSED: LIST_VIEW_GROUP_STATE_FLAGS = 1u32; +pub const LVGS_COLLAPSIBLE: LIST_VIEW_GROUP_STATE_FLAGS = 8u32; +pub const LVGS_FOCUSED: LIST_VIEW_GROUP_STATE_FLAGS = 16u32; +pub const LVGS_HIDDEN: LIST_VIEW_GROUP_STATE_FLAGS = 2u32; +pub const LVGS_NOHEADER: LIST_VIEW_GROUP_STATE_FLAGS = 4u32; +pub const LVGS_NORMAL: LIST_VIEW_GROUP_STATE_FLAGS = 0u32; +pub const LVGS_SELECTED: LIST_VIEW_GROUP_STATE_FLAGS = 32u32; +pub const LVGS_SUBSETED: LIST_VIEW_GROUP_STATE_FLAGS = 64u32; +pub const LVGS_SUBSETLINKFOCUSED: LIST_VIEW_GROUP_STATE_FLAGS = 128u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LVHITTESTINFO { + pub pt: super::super::Foundation::POINT, + pub flags: LVHITTESTINFO_FLAGS, + pub iItem: i32, + pub iSubItem: i32, + pub iGroup: i32, +} +pub type LVHITTESTINFO_FLAGS = u32; +pub const LVHT_ABOVE: LVHITTESTINFO_FLAGS = 8u32; +pub const LVHT_BELOW: LVHITTESTINFO_FLAGS = 16u32; +pub const LVHT_EX_FOOTER: LVHITTESTINFO_FLAGS = 134217728u32; +pub const LVHT_EX_GROUP: LVHITTESTINFO_FLAGS = 4076863488u32; +pub const LVHT_EX_GROUP_BACKGROUND: LVHITTESTINFO_FLAGS = 2147483648u32; +pub const LVHT_EX_GROUP_COLLAPSE: LVHITTESTINFO_FLAGS = 1073741824u32; +pub const LVHT_EX_GROUP_FOOTER: LVHITTESTINFO_FLAGS = 536870912u32; +pub const LVHT_EX_GROUP_HEADER: LVHITTESTINFO_FLAGS = 268435456u32; +pub const LVHT_EX_GROUP_STATEICON: LVHITTESTINFO_FLAGS = 16777216u32; +pub const LVHT_EX_GROUP_SUBSETLINK: LVHITTESTINFO_FLAGS = 33554432u32; +pub const LVHT_EX_ONCONTENTS: LVHITTESTINFO_FLAGS = 67108864u32; +pub const LVHT_NOWHERE: LVHITTESTINFO_FLAGS = 1u32; +pub const LVHT_ONITEMICON: LVHITTESTINFO_FLAGS = 2u32; +pub const LVHT_ONITEMLABEL: LVHITTESTINFO_FLAGS = 4u32; +pub const LVHT_ONITEMSTATEICON: LVHITTESTINFO_FLAGS = 8u32; +pub const LVHT_TOLEFT: LVHITTESTINFO_FLAGS = 64u32; +pub const LVHT_TORIGHT: LVHITTESTINFO_FLAGS = 32u32; +pub const LVIF_COLFMT: LIST_VIEW_ITEM_FLAGS = 65536u32; +pub const LVIF_COLUMNS: LIST_VIEW_ITEM_FLAGS = 512u32; +pub const LVIF_DI_SETITEM: LIST_VIEW_ITEM_FLAGS = 4096u32; +pub const LVIF_GROUPID: LIST_VIEW_ITEM_FLAGS = 256u32; +pub const LVIF_IMAGE: LIST_VIEW_ITEM_FLAGS = 2u32; +pub const LVIF_INDENT: LIST_VIEW_ITEM_FLAGS = 16u32; +pub const LVIF_NORECOMPUTE: LIST_VIEW_ITEM_FLAGS = 2048u32; +pub const LVIF_PARAM: LIST_VIEW_ITEM_FLAGS = 4u32; +pub const LVIF_STATE: LIST_VIEW_ITEM_FLAGS = 8u32; +pub const LVIF_TEXT: LIST_VIEW_ITEM_FLAGS = 1u32; +pub const LVIM_AFTER: u32 = 1u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVINSERTGROUPSORTED { + pub pfnGroupCompare: PFNLVGROUPCOMPARE, + pub pvData: *mut core::ffi::c_void, + pub lvGroup: LVGROUP, +} +impl Default for LVINSERTGROUPSORTED { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LVINSERTMARK { + pub cbSize: u32, + pub dwFlags: u32, + pub iItem: i32, + pub dwReserved: u32, +} +pub const LVIR_BOUNDS: u32 = 0u32; +pub const LVIR_ICON: u32 = 1u32; +pub const LVIR_LABEL: u32 = 2u32; +pub const LVIR_SELECTBOUNDS: u32 = 3u32; +pub const LVIS_ACTIVATING: LIST_VIEW_ITEM_STATE_FLAGS = 32u32; +pub const LVIS_CUT: LIST_VIEW_ITEM_STATE_FLAGS = 4u32; +pub const LVIS_DROPHILITED: LIST_VIEW_ITEM_STATE_FLAGS = 8u32; +pub const LVIS_FOCUSED: LIST_VIEW_ITEM_STATE_FLAGS = 1u32; +pub const LVIS_GLOW: LIST_VIEW_ITEM_STATE_FLAGS = 16u32; +pub const LVIS_OVERLAYMASK: LIST_VIEW_ITEM_STATE_FLAGS = 3840u32; +pub const LVIS_SELECTED: LIST_VIEW_ITEM_STATE_FLAGS = 2u32; +pub const LVIS_STATEIMAGEMASK: LIST_VIEW_ITEM_STATE_FLAGS = 61440u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVITEMA { + pub mask: LIST_VIEW_ITEM_FLAGS, + pub iItem: i32, + pub iSubItem: i32, + pub state: LIST_VIEW_ITEM_STATE_FLAGS, + pub stateMask: LIST_VIEW_ITEM_STATE_FLAGS, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub lParam: super::super::Foundation::LPARAM, + pub iIndent: i32, + pub iGroupId: i32, + pub cColumns: u32, + pub puColumns: *mut u32, + pub piColFmt: *mut LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS, + pub iGroup: i32, +} +impl Default for LVITEMA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type LVITEMA_GROUP_ID = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LVITEMINDEX { + pub iItem: i32, + pub iGroup: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVITEMW { + pub mask: LIST_VIEW_ITEM_FLAGS, + pub iItem: i32, + pub iSubItem: i32, + pub state: LIST_VIEW_ITEM_STATE_FLAGS, + pub stateMask: LIST_VIEW_ITEM_STATE_FLAGS, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub lParam: super::super::Foundation::LPARAM, + pub iIndent: i32, + pub iGroupId: i32, + pub cColumns: u32, + pub puColumns: *mut u32, + pub piColFmt: *mut LIST_VIEW_ITEM_COLUMN_FORMAT_FLAGS, + pub iGroup: i32, +} +impl Default for LVITEMW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const LVKF_ALT: u32 = 1u32; +pub const LVKF_CONTROL: u32 = 2u32; +pub const LVKF_SHIFT: u32 = 4u32; +pub const LVM_APPROXIMATEVIEWRECT: u32 = 4160u32; +pub const LVM_ARRANGE: u32 = 4118u32; +pub const LVM_CANCELEDITLABEL: u32 = 4275u32; +pub const LVM_CREATEDRAGIMAGE: u32 = 4129u32; +pub const LVM_DELETEALLITEMS: u32 = 4105u32; +pub const LVM_DELETECOLUMN: u32 = 4124u32; +pub const LVM_DELETEITEM: u32 = 4104u32; +pub const LVM_EDITLABEL: u32 = 4214u32; +pub const LVM_EDITLABELA: u32 = 4119u32; +pub const LVM_EDITLABELW: u32 = 4214u32; +pub const LVM_ENABLEGROUPVIEW: u32 = 4253u32; +pub const LVM_ENSUREVISIBLE: u32 = 4115u32; +pub const LVM_FINDITEM: u32 = 4179u32; +pub const LVM_FINDITEMA: u32 = 4109u32; +pub const LVM_FINDITEMW: u32 = 4179u32; +pub const LVM_FIRST: u32 = 4096u32; +pub const LVM_GETBKCOLOR: u32 = 4096u32; +pub const LVM_GETBKIMAGE: u32 = 4235u32; +pub const LVM_GETBKIMAGEA: u32 = 4165u32; +pub const LVM_GETBKIMAGEW: u32 = 4235u32; +pub const LVM_GETCALLBACKMASK: u32 = 4106u32; +pub const LVM_GETCOLUMN: u32 = 4191u32; +pub const LVM_GETCOLUMNA: u32 = 4121u32; +pub const LVM_GETCOLUMNORDERARRAY: u32 = 4155u32; +pub const LVM_GETCOLUMNW: u32 = 4191u32; +pub const LVM_GETCOLUMNWIDTH: u32 = 4125u32; +pub const LVM_GETCOUNTPERPAGE: u32 = 4136u32; +pub const LVM_GETEDITCONTROL: u32 = 4120u32; +pub const LVM_GETEMPTYTEXT: u32 = 4300u32; +pub const LVM_GETEXTENDEDLISTVIEWSTYLE: u32 = 4151u32; +pub const LVM_GETFOCUSEDGROUP: u32 = 4189u32; +pub const LVM_GETFOOTERINFO: u32 = 4302u32; +pub const LVM_GETFOOTERITEM: u32 = 4304u32; +pub const LVM_GETFOOTERITEMRECT: u32 = 4303u32; +pub const LVM_GETFOOTERRECT: u32 = 4301u32; +pub const LVM_GETGROUPCOUNT: u32 = 4248u32; +pub const LVM_GETGROUPINFO: u32 = 4245u32; +pub const LVM_GETGROUPINFOBYINDEX: u32 = 4249u32; +pub const LVM_GETGROUPMETRICS: u32 = 4252u32; +pub const LVM_GETGROUPRECT: u32 = 4194u32; +pub const LVM_GETGROUPSTATE: u32 = 4188u32; +pub const LVM_GETHEADER: u32 = 4127u32; +pub const LVM_GETHOTCURSOR: u32 = 4159u32; +pub const LVM_GETHOTITEM: u32 = 4157u32; +pub const LVM_GETHOVERTIME: u32 = 4168u32; +pub const LVM_GETIMAGELIST: u32 = 4098u32; +pub const LVM_GETINSERTMARK: u32 = 4263u32; +pub const LVM_GETINSERTMARKCOLOR: u32 = 4267u32; +pub const LVM_GETINSERTMARKRECT: u32 = 4265u32; +pub const LVM_GETISEARCHSTRING: u32 = 4213u32; +pub const LVM_GETISEARCHSTRINGA: u32 = 4148u32; +pub const LVM_GETISEARCHSTRINGW: u32 = 4213u32; +pub const LVM_GETITEM: u32 = 4171u32; +pub const LVM_GETITEMA: u32 = 4101u32; +pub const LVM_GETITEMCOUNT: u32 = 4100u32; +pub const LVM_GETITEMINDEXRECT: u32 = 4305u32; +pub const LVM_GETITEMPOSITION: u32 = 4112u32; +pub const LVM_GETITEMRECT: u32 = 4110u32; +pub const LVM_GETITEMSPACING: u32 = 4147u32; +pub const LVM_GETITEMSTATE: u32 = 4140u32; +pub const LVM_GETITEMTEXT: u32 = 4211u32; +pub const LVM_GETITEMTEXTA: u32 = 4141u32; +pub const LVM_GETITEMTEXTW: u32 = 4211u32; +pub const LVM_GETITEMW: u32 = 4171u32; +pub const LVM_GETNEXTITEM: u32 = 4108u32; +pub const LVM_GETNEXTITEMINDEX: u32 = 4307u32; +pub const LVM_GETNUMBEROFWORKAREAS: u32 = 4169u32; +pub const LVM_GETORIGIN: u32 = 4137u32; +pub const LVM_GETOUTLINECOLOR: u32 = 4272u32; +pub const LVM_GETSELECTEDCOLUMN: u32 = 4270u32; +pub const LVM_GETSELECTEDCOUNT: u32 = 4146u32; +pub const LVM_GETSELECTIONMARK: u32 = 4162u32; +pub const LVM_GETSTRINGWIDTH: u32 = 4183u32; +pub const LVM_GETSTRINGWIDTHA: u32 = 4113u32; +pub const LVM_GETSTRINGWIDTHW: u32 = 4183u32; +pub const LVM_GETSUBITEMRECT: u32 = 4152u32; +pub const LVM_GETTEXTBKCOLOR: u32 = 4133u32; +pub const LVM_GETTEXTCOLOR: u32 = 4131u32; +pub const LVM_GETTILEINFO: u32 = 4261u32; +pub const LVM_GETTILEVIEWINFO: u32 = 4259u32; +pub const LVM_GETTOOLTIPS: u32 = 4174u32; +pub const LVM_GETTOPINDEX: u32 = 4135u32; +pub const LVM_GETUNICODEFORMAT: u32 = 8198u32; +pub const LVM_GETVIEW: u32 = 4239u32; +pub const LVM_GETVIEWRECT: u32 = 4130u32; +pub const LVM_GETWORKAREAS: u32 = 4166u32; +pub const LVM_HASGROUP: u32 = 4257u32; +pub const LVM_HITTEST: u32 = 4114u32; +pub const LVM_INSERTCOLUMN: u32 = 4193u32; +pub const LVM_INSERTCOLUMNA: u32 = 4123u32; +pub const LVM_INSERTCOLUMNW: u32 = 4193u32; +pub const LVM_INSERTGROUP: u32 = 4241u32; +pub const LVM_INSERTGROUPSORTED: u32 = 4255u32; +pub const LVM_INSERTITEM: u32 = 4173u32; +pub const LVM_INSERTITEMA: u32 = 4103u32; +pub const LVM_INSERTITEMW: u32 = 4173u32; +pub const LVM_INSERTMARKHITTEST: u32 = 4264u32; +pub const LVM_ISGROUPVIEWENABLED: u32 = 4271u32; +pub const LVM_ISITEMVISIBLE: u32 = 4278u32; +pub const LVM_MAPIDTOINDEX: u32 = 4277u32; +pub const LVM_MAPINDEXTOID: u32 = 4276u32; +pub const LVM_MOVEGROUP: u32 = 4247u32; +pub const LVM_MOVEITEMTOGROUP: u32 = 4250u32; +pub const LVM_REDRAWITEMS: u32 = 4117u32; +pub const LVM_REMOVEALLGROUPS: u32 = 4256u32; +pub const LVM_REMOVEGROUP: u32 = 4246u32; +pub const LVM_SCROLL: u32 = 4116u32; +pub const LVM_SETBKCOLOR: u32 = 4097u32; +pub const LVM_SETBKIMAGE: u32 = 4234u32; +pub const LVM_SETBKIMAGEA: u32 = 4164u32; +pub const LVM_SETBKIMAGEW: u32 = 4234u32; +pub const LVM_SETCALLBACKMASK: u32 = 4107u32; +pub const LVM_SETCOLUMN: u32 = 4192u32; +pub const LVM_SETCOLUMNA: u32 = 4122u32; +pub const LVM_SETCOLUMNORDERARRAY: u32 = 4154u32; +pub const LVM_SETCOLUMNW: u32 = 4192u32; +pub const LVM_SETCOLUMNWIDTH: u32 = 4126u32; +pub const LVM_SETEXTENDEDLISTVIEWSTYLE: u32 = 4150u32; +pub const LVM_SETGROUPINFO: u32 = 4243u32; +pub const LVM_SETGROUPMETRICS: u32 = 4251u32; +pub const LVM_SETHOTCURSOR: u32 = 4158u32; +pub const LVM_SETHOTITEM: u32 = 4156u32; +pub const LVM_SETHOVERTIME: u32 = 4167u32; +pub const LVM_SETICONSPACING: u32 = 4149u32; +pub const LVM_SETIMAGELIST: u32 = 4099u32; +pub const LVM_SETINFOTIP: u32 = 4269u32; +pub const LVM_SETINSERTMARK: u32 = 4262u32; +pub const LVM_SETINSERTMARKCOLOR: u32 = 4266u32; +pub const LVM_SETITEM: u32 = 4172u32; +pub const LVM_SETITEMA: u32 = 4102u32; +pub const LVM_SETITEMCOUNT: u32 = 4143u32; +pub const LVM_SETITEMINDEXSTATE: u32 = 4306u32; +pub const LVM_SETITEMPOSITION: u32 = 4111u32; +pub const LVM_SETITEMPOSITION32: u32 = 4145u32; +pub const LVM_SETITEMSTATE: u32 = 4139u32; +pub const LVM_SETITEMTEXT: u32 = 4212u32; +pub const LVM_SETITEMTEXTA: u32 = 4142u32; +pub const LVM_SETITEMTEXTW: u32 = 4212u32; +pub const LVM_SETITEMW: u32 = 4172u32; +pub const LVM_SETOUTLINECOLOR: u32 = 4273u32; +pub const LVM_SETSELECTEDCOLUMN: u32 = 4236u32; +pub const LVM_SETSELECTIONMARK: u32 = 4163u32; +pub const LVM_SETTEXTBKCOLOR: u32 = 4134u32; +pub const LVM_SETTEXTCOLOR: u32 = 4132u32; +pub const LVM_SETTILEINFO: u32 = 4260u32; +pub const LVM_SETTILEVIEWINFO: u32 = 4258u32; +pub const LVM_SETTOOLTIPS: u32 = 4170u32; +pub const LVM_SETUNICODEFORMAT: u32 = 8197u32; +pub const LVM_SETVIEW: u32 = 4238u32; +pub const LVM_SETWORKAREAS: u32 = 4161u32; +pub const LVM_SORTGROUPS: u32 = 4254u32; +pub const LVM_SORTITEMS: u32 = 4144u32; +pub const LVM_SORTITEMSEX: u32 = 4177u32; +pub const LVM_SUBITEMHITTEST: u32 = 4153u32; +pub const LVM_UPDATE: u32 = 4138u32; +pub const LVNI_ABOVE: u32 = 256u32; +pub const LVNI_ALL: u32 = 0u32; +pub const LVNI_BELOW: u32 = 512u32; +pub const LVNI_CUT: u32 = 4u32; +pub const LVNI_DROPHILITED: u32 = 8u32; +pub const LVNI_FOCUSED: u32 = 1u32; +pub const LVNI_PREVIOUS: u32 = 32u32; +pub const LVNI_SAMEGROUPONLY: u32 = 128u32; +pub const LVNI_SELECTED: u32 = 2u32; +pub const LVNI_TOLEFT: u32 = 1024u32; +pub const LVNI_TORIGHT: u32 = 2048u32; +pub const LVNI_VISIBLEONLY: u32 = 64u32; +pub const LVNI_VISIBLEORDER: u32 = 16u32; +pub const LVNSCH_DEFAULT: i32 = -1i32; +pub const LVNSCH_ERROR: i32 = -2i32; +pub const LVNSCH_IGNORE: i32 = -3i32; +pub const LVN_BEGINDRAG: u32 = 4294967187u32; +pub const LVN_BEGINLABELEDIT: u32 = 4294967121u32; +pub const LVN_BEGINLABELEDITA: u32 = 4294967191u32; +pub const LVN_BEGINLABELEDITW: u32 = 4294967121u32; +pub const LVN_BEGINRDRAG: u32 = 4294967185u32; +pub const LVN_BEGINSCROLL: u32 = 4294967116u32; +pub const LVN_COLUMNCLICK: u32 = 4294967188u32; +pub const LVN_COLUMNDROPDOWN: u32 = 4294967132u32; +pub const LVN_COLUMNOVERFLOWCLICK: u32 = 4294967130u32; +pub const LVN_DELETEALLITEMS: u32 = 4294967192u32; +pub const LVN_DELETEITEM: u32 = 4294967193u32; +pub const LVN_ENDLABELEDIT: u32 = 4294967120u32; +pub const LVN_ENDLABELEDITA: u32 = 4294967190u32; +pub const LVN_ENDLABELEDITW: u32 = 4294967120u32; +pub const LVN_ENDSCROLL: u32 = 4294967115u32; +pub const LVN_FIRST: u32 = 4294967196u32; +pub const LVN_GETDISPINFO: u32 = 4294967119u32; +pub const LVN_GETDISPINFOA: u32 = 4294967146u32; +pub const LVN_GETDISPINFOW: u32 = 4294967119u32; +pub const LVN_GETEMPTYMARKUP: u32 = 4294967109u32; +pub const LVN_GETINFOTIP: u32 = 4294967138u32; +pub const LVN_GETINFOTIPA: u32 = 4294967139u32; +pub const LVN_GETINFOTIPW: u32 = 4294967138u32; +pub const LVN_HOTTRACK: u32 = 4294967175u32; +pub const LVN_INCREMENTALSEARCH: u32 = 4294967133u32; +pub const LVN_INCREMENTALSEARCHA: u32 = 4294967134u32; +pub const LVN_INCREMENTALSEARCHW: u32 = 4294967133u32; +pub const LVN_INSERTITEM: u32 = 4294967194u32; +pub const LVN_ITEMACTIVATE: u32 = 4294967182u32; +pub const LVN_ITEMCHANGED: u32 = 4294967195u32; +pub const LVN_ITEMCHANGING: u32 = 4294967196u32; +pub const LVN_KEYDOWN: u32 = 4294967141u32; +pub const LVN_LAST: u32 = 4294967097u32; +pub const LVN_LINKCLICK: u32 = 4294967112u32; +pub const LVN_MARQUEEBEGIN: u32 = 4294967140u32; +pub const LVN_ODCACHEHINT: u32 = 4294967183u32; +pub const LVN_ODFINDITEM: u32 = 4294967117u32; +pub const LVN_ODFINDITEMA: u32 = 4294967144u32; +pub const LVN_ODFINDITEMW: u32 = 4294967117u32; +pub const LVN_ODSTATECHANGED: u32 = 4294967181u32; +pub const LVN_SETDISPINFO: u32 = 4294967118u32; +pub const LVN_SETDISPINFOA: u32 = 4294967145u32; +pub const LVN_SETDISPINFOW: u32 = 4294967118u32; +pub const LVP_COLLAPSEBUTTON: LISTVIEWPARTS = 9i32; +pub const LVP_COLUMNDETAIL: LISTVIEWPARTS = 10i32; +pub const LVP_EMPTYTEXT: LISTVIEWPARTS = 5i32; +pub const LVP_EXPANDBUTTON: LISTVIEWPARTS = 8i32; +pub const LVP_GROUPHEADER: LISTVIEWPARTS = 6i32; +pub const LVP_GROUPHEADERLINE: LISTVIEWPARTS = 7i32; +pub const LVP_LISTDETAIL: LISTVIEWPARTS = 3i32; +pub const LVP_LISTGROUP: LISTVIEWPARTS = 2i32; +pub const LVP_LISTITEM: LISTVIEWPARTS = 1i32; +pub const LVP_LISTSORTEDDETAIL: LISTVIEWPARTS = 4i32; +pub const LVSCW_AUTOSIZE: i32 = -1i32; +pub const LVSCW_AUTOSIZE_USEHEADER: i32 = -2i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVSETINFOTIP { + pub cbSize: u32, + pub dwFlags: u32, + pub pszText: windows_sys::core::PWSTR, + pub iItem: i32, + pub iSubItem: i32, +} +impl Default for LVSETINFOTIP { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const LVSICF_NOINVALIDATEALL: u32 = 1u32; +pub const LVSICF_NOSCROLL: u32 = 2u32; +pub const LVSIL_GROUPHEADER: u32 = 3u32; +pub const LVSIL_NORMAL: u32 = 0u32; +pub const LVSIL_SMALL: u32 = 1u32; +pub const LVSIL_STATE: u32 = 2u32; +pub const LVS_ALIGNLEFT: u32 = 2048u32; +pub const LVS_ALIGNMASK: u32 = 3072u32; +pub const LVS_ALIGNTOP: u32 = 0u32; +pub const LVS_AUTOARRANGE: u32 = 256u32; +pub const LVS_EDITLABELS: u32 = 512u32; +pub const LVS_EX_AUTOAUTOARRANGE: u32 = 16777216u32; +pub const LVS_EX_AUTOCHECKSELECT: u32 = 134217728u32; +pub const LVS_EX_AUTOSIZECOLUMNS: u32 = 268435456u32; +pub const LVS_EX_BORDERSELECT: u32 = 32768u32; +pub const LVS_EX_CHECKBOXES: u32 = 4u32; +pub const LVS_EX_COLUMNOVERFLOW: u32 = 2147483648u32; +pub const LVS_EX_COLUMNSNAPPOINTS: u32 = 1073741824u32; +pub const LVS_EX_DOUBLEBUFFER: u32 = 65536u32; +pub const LVS_EX_FLATSB: u32 = 256u32; +pub const LVS_EX_FULLROWSELECT: u32 = 32u32; +pub const LVS_EX_GRIDLINES: u32 = 1u32; +pub const LVS_EX_HEADERDRAGDROP: u32 = 16u32; +pub const LVS_EX_HEADERINALLVIEWS: u32 = 33554432u32; +pub const LVS_EX_HIDELABELS: u32 = 131072u32; +pub const LVS_EX_INFOTIP: u32 = 1024u32; +pub const LVS_EX_JUSTIFYCOLUMNS: u32 = 2097152u32; +pub const LVS_EX_LABELTIP: u32 = 16384u32; +pub const LVS_EX_MULTIWORKAREAS: u32 = 8192u32; +pub const LVS_EX_ONECLICKACTIVATE: u32 = 64u32; +pub const LVS_EX_REGIONAL: u32 = 512u32; +pub const LVS_EX_SIMPLESELECT: u32 = 1048576u32; +pub const LVS_EX_SINGLEROW: u32 = 262144u32; +pub const LVS_EX_SNAPTOGRID: u32 = 524288u32; +pub const LVS_EX_SUBITEMIMAGES: u32 = 2u32; +pub const LVS_EX_TRACKSELECT: u32 = 8u32; +pub const LVS_EX_TRANSPARENTBKGND: u32 = 4194304u32; +pub const LVS_EX_TRANSPARENTSHADOWTEXT: u32 = 8388608u32; +pub const LVS_EX_TWOCLICKACTIVATE: u32 = 128u32; +pub const LVS_EX_UNDERLINECOLD: u32 = 4096u32; +pub const LVS_EX_UNDERLINEHOT: u32 = 2048u32; +pub const LVS_ICON: u32 = 0u32; +pub const LVS_LIST: u32 = 3u32; +pub const LVS_NOCOLUMNHEADER: u32 = 16384u32; +pub const LVS_NOLABELWRAP: u32 = 128u32; +pub const LVS_NOSCROLL: u32 = 8192u32; +pub const LVS_NOSORTHEADER: u32 = 32768u32; +pub const LVS_OWNERDATA: u32 = 4096u32; +pub const LVS_OWNERDRAWFIXED: u32 = 1024u32; +pub const LVS_REPORT: u32 = 1u32; +pub const LVS_SHAREIMAGELISTS: u32 = 64u32; +pub const LVS_SHOWSELALWAYS: u32 = 8u32; +pub const LVS_SINGLESEL: u32 = 4u32; +pub const LVS_SMALLICON: u32 = 2u32; +pub const LVS_SORTASCENDING: u32 = 16u32; +pub const LVS_SORTDESCENDING: u32 = 32u32; +pub const LVS_TYPEMASK: u32 = 3u32; +pub const LVS_TYPESTYLEMASK: u32 = 64512u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct LVTILEINFO { + pub cbSize: u32, + pub iItem: i32, + pub cColumns: u32, + pub puColumns: *mut u32, + pub piColFmt: *mut i32, +} +impl Default for LVTILEINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct LVTILEVIEWINFO { + pub cbSize: u32, + pub dwMask: LVTILEVIEWINFO_MASK, + pub dwFlags: LVTILEVIEWINFO_FLAGS, + pub sizeTile: super::super::Foundation::SIZE, + pub cLines: i32, + pub rcLabelMargin: super::super::Foundation::RECT, +} +pub type LVTILEVIEWINFO_FLAGS = u32; +pub type LVTILEVIEWINFO_MASK = u32; +pub const LVTVIF_AUTOSIZE: LVTILEVIEWINFO_FLAGS = 0u32; +pub const LVTVIF_EXTENDED: u32 = 4u32; +pub const LVTVIF_FIXEDHEIGHT: LVTILEVIEWINFO_FLAGS = 2u32; +pub const LVTVIF_FIXEDSIZE: LVTILEVIEWINFO_FLAGS = 3u32; +pub const LVTVIF_FIXEDWIDTH: LVTILEVIEWINFO_FLAGS = 1u32; +pub const LVTVIM_COLUMNS: LVTILEVIEWINFO_MASK = 2u32; +pub const LVTVIM_LABELMARGIN: LVTILEVIEWINFO_MASK = 4u32; +pub const LVTVIM_TILESIZE: LVTILEVIEWINFO_MASK = 1u32; +pub const LV_MAX_WORKAREAS: u32 = 16u32; +pub const LV_VIEW_DETAILS: u32 = 1u32; +pub const LV_VIEW_ICON: u32 = 0u32; +pub const LV_VIEW_LIST: u32 = 3u32; +pub const LV_VIEW_MAX: u32 = 4u32; +pub const LV_VIEW_SMALLICON: u32 = 2u32; +pub const LV_VIEW_TILE: u32 = 4u32; +pub const LWS_IGNORERETURN: u32 = 2u32; +pub const LWS_NOPREFIX: u32 = 4u32; +pub const LWS_RIGHT: u32 = 32u32; +pub const LWS_TRANSPARENT: u32 = 1u32; +pub const LWS_USECUSTOMTEXT: u32 = 16u32; +pub const LWS_USEVISUALSTYLE: u32 = 8u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct MARGINS { + pub cxLeftWidth: i32, + pub cxRightWidth: i32, + pub cyTopHeight: i32, + pub cyBottomHeight: i32, +} +pub type MARKUPTEXTSTATES = i32; +pub const MAXBS_DISABLED: MAXBUTTONSTATES = 4i32; +pub const MAXBS_HOT: MAXBUTTONSTATES = 2i32; +pub const MAXBS_NORMAL: MAXBUTTONSTATES = 1i32; +pub const MAXBS_PUSHED: MAXBUTTONSTATES = 3i32; +pub type MAXBUTTONSTATES = i32; +pub type MAXCAPTIONSTATES = i32; +pub const MAXPROPPAGES: u32 = 100u32; +pub const MAX_INTLIST_COUNT: u32 = 402u32; +pub const MAX_LINKID_TEXT: u32 = 48u32; +pub const MAX_THEMECOLOR: u32 = 64u32; +pub const MAX_THEMESIZE: u32 = 64u32; +pub const MBI_DISABLED: BARITEMSTATES = 4i32; +pub const MBI_DISABLEDHOT: BARITEMSTATES = 5i32; +pub const MBI_DISABLEDPUSHED: BARITEMSTATES = 6i32; +pub const MBI_HOT: BARITEMSTATES = 2i32; +pub const MBI_NORMAL: BARITEMSTATES = 1i32; +pub const MBI_PUSHED: BARITEMSTATES = 3i32; +pub const MB_ACTIVE: BARBACKGROUNDSTATES = 1i32; +pub const MB_INACTIVE: BARBACKGROUNDSTATES = 2i32; +pub const MCB_BITMAP: POPUPCHECKBACKGROUNDSTATES = 3i32; +pub const MCB_DISABLED: POPUPCHECKBACKGROUNDSTATES = 1i32; +pub const MCB_NORMAL: POPUPCHECKBACKGROUNDSTATES = 2i32; +pub const MCGCB_HOT: GRIDCELLBACKGROUNDSTATES = 2i32; +pub const MCGCB_SELECTED: GRIDCELLBACKGROUNDSTATES = 1i32; +pub const MCGCB_SELECTEDHOT: GRIDCELLBACKGROUNDSTATES = 3i32; +pub const MCGCB_SELECTEDNOTFOCUSED: GRIDCELLBACKGROUNDSTATES = 4i32; +pub const MCGCB_TODAY: GRIDCELLBACKGROUNDSTATES = 5i32; +pub const MCGCB_TODAYSELECTED: GRIDCELLBACKGROUNDSTATES = 6i32; +pub const MCGCU_HASSTATE: GRIDCELLUPPERSTATES = 2i32; +pub const MCGCU_HASSTATEHOT: GRIDCELLUPPERSTATES = 3i32; +pub const MCGCU_HOT: GRIDCELLUPPERSTATES = 1i32; +pub const MCGCU_SELECTED: GRIDCELLUPPERSTATES = 4i32; +pub const MCGCU_SELECTEDHOT: GRIDCELLUPPERSTATES = 5i32; +pub const MCGC_HASSTATE: GRIDCELLSTATES = 2i32; +pub const MCGC_HASSTATEHOT: GRIDCELLSTATES = 3i32; +pub const MCGC_HOT: GRIDCELLSTATES = 1i32; +pub const MCGC_SELECTED: GRIDCELLSTATES = 6i32; +pub const MCGC_SELECTEDHOT: GRIDCELLSTATES = 7i32; +pub const MCGC_TODAY: GRIDCELLSTATES = 4i32; +pub const MCGC_TODAYSELECTED: GRIDCELLSTATES = 5i32; +pub const MCGIF_DATE: MCGRIDINFO_FLAGS = 1u32; +pub const MCGIF_NAME: MCGRIDINFO_FLAGS = 4u32; +pub const MCGIF_RECT: MCGRIDINFO_FLAGS = 2u32; +pub const MCGIP_CALENDAR: MCGRIDINFO_PART = 4u32; +pub const MCGIP_CALENDARBODY: MCGRIDINFO_PART = 6u32; +pub const MCGIP_CALENDARCELL: MCGRIDINFO_PART = 8u32; +pub const MCGIP_CALENDARCONTROL: MCGRIDINFO_PART = 0u32; +pub const MCGIP_CALENDARHEADER: MCGRIDINFO_PART = 5u32; +pub const MCGIP_CALENDARROW: MCGRIDINFO_PART = 7u32; +pub const MCGIP_FOOTER: MCGRIDINFO_PART = 3u32; +pub const MCGIP_NEXT: MCGRIDINFO_PART = 1u32; +pub const MCGIP_PREV: MCGRIDINFO_PART = 2u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct MCGRIDINFO { + pub cbSize: u32, + pub dwPart: MCGRIDINFO_PART, + pub dwFlags: MCGRIDINFO_FLAGS, + pub iCalendar: i32, + pub iRow: i32, + pub iCol: i32, + pub bSelected: windows_sys::core::BOOL, + pub stStart: super::super::Foundation::SYSTEMTIME, + pub stEnd: super::super::Foundation::SYSTEMTIME, + pub rc: super::super::Foundation::RECT, + pub pszName: windows_sys::core::PWSTR, + pub cchName: usize, +} +impl Default for MCGRIDINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type MCGRIDINFO_FLAGS = u32; +pub type MCGRIDINFO_PART = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct MCHITTESTINFO { + pub cbSize: u32, + pub pt: super::super::Foundation::POINT, + pub uHit: MCHITTESTINFO_HIT_FLAGS, + pub st: super::super::Foundation::SYSTEMTIME, + pub rc: super::super::Foundation::RECT, + pub iOffset: i32, + pub iRow: i32, + pub iCol: i32, +} +pub type MCHITTESTINFO_HIT_FLAGS = u32; +pub const MCHT_CALENDAR: MCHITTESTINFO_HIT_FLAGS = 131072u32; +pub const MCHT_CALENDARBK: MCHITTESTINFO_HIT_FLAGS = 131072u32; +pub const MCHT_CALENDARCONTROL: MCHITTESTINFO_HIT_FLAGS = 1048576u32; +pub const MCHT_CALENDARDATE: MCHITTESTINFO_HIT_FLAGS = 131073u32; +pub const MCHT_CALENDARDATEMAX: MCHITTESTINFO_HIT_FLAGS = 131077u32; +pub const MCHT_CALENDARDATEMIN: MCHITTESTINFO_HIT_FLAGS = 131076u32; +pub const MCHT_CALENDARDATENEXT: MCHITTESTINFO_HIT_FLAGS = 16908289u32; +pub const MCHT_CALENDARDATEPREV: MCHITTESTINFO_HIT_FLAGS = 33685505u32; +pub const MCHT_CALENDARDAY: MCHITTESTINFO_HIT_FLAGS = 131074u32; +pub const MCHT_CALENDARWEEKNUM: MCHITTESTINFO_HIT_FLAGS = 131075u32; +pub const MCHT_NEXT: MCHITTESTINFO_HIT_FLAGS = 16777216u32; +pub const MCHT_NOWHERE: MCHITTESTINFO_HIT_FLAGS = 0u32; +pub const MCHT_PREV: MCHITTESTINFO_HIT_FLAGS = 33554432u32; +pub const MCHT_TITLE: MCHITTESTINFO_HIT_FLAGS = 65536u32; +pub const MCHT_TITLEBK: MCHITTESTINFO_HIT_FLAGS = 65536u32; +pub const MCHT_TITLEBTNNEXT: MCHITTESTINFO_HIT_FLAGS = 16842755u32; +pub const MCHT_TITLEBTNPREV: MCHITTESTINFO_HIT_FLAGS = 33619971u32; +pub const MCHT_TITLEMONTH: MCHITTESTINFO_HIT_FLAGS = 65537u32; +pub const MCHT_TITLEYEAR: MCHITTESTINFO_HIT_FLAGS = 65538u32; +pub const MCHT_TODAYLINK: MCHITTESTINFO_HIT_FLAGS = 196608u32; +pub const MCMV_CENTURY: MONTH_CALDENDAR_MESSAGES_VIEW = 3u32; +pub const MCMV_DECADE: MONTH_CALDENDAR_MESSAGES_VIEW = 2u32; +pub const MCMV_MAX: MONTH_CALDENDAR_MESSAGES_VIEW = 3u32; +pub const MCMV_MONTH: MONTH_CALDENDAR_MESSAGES_VIEW = 0u32; +pub const MCMV_YEAR: MONTH_CALDENDAR_MESSAGES_VIEW = 1u32; +pub const MCM_FIRST: u32 = 4096u32; +pub const MCM_GETCALENDARBORDER: u32 = 4127u32; +pub const MCM_GETCALENDARCOUNT: u32 = 4119u32; +pub const MCM_GETCALENDARGRIDINFO: u32 = 4120u32; +pub const MCM_GETCALID: u32 = 4123u32; +pub const MCM_GETCOLOR: u32 = 4107u32; +pub const MCM_GETCURRENTVIEW: u32 = 4118u32; +pub const MCM_GETCURSEL: u32 = 4097u32; +pub const MCM_GETFIRSTDAYOFWEEK: u32 = 4112u32; +pub const MCM_GETMAXSELCOUNT: u32 = 4099u32; +pub const MCM_GETMAXTODAYWIDTH: u32 = 4117u32; +pub const MCM_GETMINREQRECT: u32 = 4105u32; +pub const MCM_GETMONTHDELTA: u32 = 4115u32; +pub const MCM_GETMONTHRANGE: u32 = 4103u32; +pub const MCM_GETRANGE: u32 = 4113u32; +pub const MCM_GETSELRANGE: u32 = 4101u32; +pub const MCM_GETTODAY: u32 = 4109u32; +pub const MCM_GETUNICODEFORMAT: u32 = 8198u32; +pub const MCM_HITTEST: u32 = 4110u32; +pub const MCM_SETCALENDARBORDER: u32 = 4126u32; +pub const MCM_SETCALID: u32 = 4124u32; +pub const MCM_SETCOLOR: u32 = 4106u32; +pub const MCM_SETCURRENTVIEW: u32 = 4128u32; +pub const MCM_SETCURSEL: u32 = 4098u32; +pub const MCM_SETDAYSTATE: u32 = 4104u32; +pub const MCM_SETFIRSTDAYOFWEEK: u32 = 4111u32; +pub const MCM_SETMAXSELCOUNT: u32 = 4100u32; +pub const MCM_SETMONTHDELTA: u32 = 4116u32; +pub const MCM_SETRANGE: u32 = 4114u32; +pub const MCM_SETSELRANGE: u32 = 4102u32; +pub const MCM_SETTODAY: u32 = 4108u32; +pub const MCM_SETUNICODEFORMAT: u32 = 8197u32; +pub const MCM_SIZERECTTOMIN: u32 = 4125u32; +pub const MCNN_DISABLED: NAVNEXTSTATES = 4i32; +pub const MCNN_HOT: NAVNEXTSTATES = 2i32; +pub const MCNN_NORMAL: NAVNEXTSTATES = 1i32; +pub const MCNN_PRESSED: NAVNEXTSTATES = 3i32; +pub const MCNP_DISABLED: NAVPREVSTATES = 4i32; +pub const MCNP_HOT: NAVPREVSTATES = 2i32; +pub const MCNP_NORMAL: NAVPREVSTATES = 1i32; +pub const MCNP_PRESSED: NAVPREVSTATES = 3i32; +pub const MCN_FIRST: u32 = 4294966550u32; +pub const MCN_GETDAYSTATE: u32 = 4294966549u32; +pub const MCN_LAST: u32 = 4294966544u32; +pub const MCN_SELCHANGE: u32 = 4294966547u32; +pub const MCN_SELECT: u32 = 4294966550u32; +pub const MCN_VIEWCHANGE: u32 = 4294966546u32; +pub const MCSC_BACKGROUND: u32 = 0u32; +pub const MCSC_MONTHBK: u32 = 4u32; +pub const MCSC_TEXT: u32 = 1u32; +pub const MCSC_TITLEBK: u32 = 2u32; +pub const MCSC_TITLETEXT: u32 = 3u32; +pub const MCSC_TRAILINGTEXT: u32 = 5u32; +pub const MCS_DAYSTATE: u32 = 1u32; +pub const MCS_MULTISELECT: u32 = 2u32; +pub const MCS_NOSELCHANGEONNAV: u32 = 256u32; +pub const MCS_NOTODAY: u32 = 16u32; +pub const MCS_NOTODAYCIRCLE: u32 = 8u32; +pub const MCS_NOTRAILINGDATES: u32 = 64u32; +pub const MCS_SHORTDAYSOFWEEK: u32 = 128u32; +pub const MCS_WEEKNUMBERS: u32 = 4u32; +pub const MCTGCU_HASSTATE: TRAILINGGRIDCELLUPPERSTATES = 2i32; +pub const MCTGCU_HASSTATEHOT: TRAILINGGRIDCELLUPPERSTATES = 3i32; +pub const MCTGCU_HOT: TRAILINGGRIDCELLUPPERSTATES = 1i32; +pub const MCTGCU_SELECTED: TRAILINGGRIDCELLUPPERSTATES = 4i32; +pub const MCTGCU_SELECTEDHOT: TRAILINGGRIDCELLUPPERSTATES = 5i32; +pub const MCTGC_HASSTATE: TRAILINGGRIDCELLSTATES = 2i32; +pub const MCTGC_HASSTATEHOT: TRAILINGGRIDCELLSTATES = 3i32; +pub const MCTGC_HOT: TRAILINGGRIDCELLSTATES = 1i32; +pub const MCTGC_SELECTED: TRAILINGGRIDCELLSTATES = 6i32; +pub const MCTGC_SELECTEDHOT: TRAILINGGRIDCELLSTATES = 7i32; +pub const MCTGC_TODAY: TRAILINGGRIDCELLSTATES = 4i32; +pub const MCTGC_TODAYSELECTED: TRAILINGGRIDCELLSTATES = 5i32; +pub const MC_BACKGROUND: MONTHCALPARTS = 1i32; +pub const MC_BORDERS: MONTHCALPARTS = 2i32; +pub const MC_BULLETDISABLED: POPUPCHECKSTATES = 4i32; +pub const MC_BULLETNORMAL: POPUPCHECKSTATES = 3i32; +pub const MC_CHECKMARKDISABLED: POPUPCHECKSTATES = 2i32; +pub const MC_CHECKMARKNORMAL: POPUPCHECKSTATES = 1i32; +pub const MC_COLHEADERSPLITTER: MONTHCALPARTS = 4i32; +pub const MC_GRIDBACKGROUND: MONTHCALPARTS = 3i32; +pub const MC_GRIDCELL: MONTHCALPARTS = 6i32; +pub const MC_GRIDCELLBACKGROUND: MONTHCALPARTS = 5i32; +pub const MC_GRIDCELLUPPER: MONTHCALPARTS = 7i32; +pub const MC_NAVNEXT: MONTHCALPARTS = 10i32; +pub const MC_NAVPREV: MONTHCALPARTS = 11i32; +pub const MC_TRAILINGGRIDCELL: MONTHCALPARTS = 8i32; +pub const MC_TRAILINGGRIDCELLUPPER: MONTHCALPARTS = 9i32; +pub const MDCL_DISABLED: MDICLOSEBUTTONSTATES = 4i32; +pub const MDCL_HOT: MDICLOSEBUTTONSTATES = 2i32; +pub const MDCL_NORMAL: MDICLOSEBUTTONSTATES = 1i32; +pub const MDCL_PUSHED: MDICLOSEBUTTONSTATES = 3i32; +pub type MDICLOSEBUTTONSTATES = i32; +pub type MDIMINBUTTONSTATES = i32; +pub type MDIRESTOREBUTTONSTATES = i32; +pub const MDMI_DISABLED: MDIMINBUTTONSTATES = 4i32; +pub const MDMI_HOT: MDIMINBUTTONSTATES = 2i32; +pub const MDMI_NORMAL: MDIMINBUTTONSTATES = 1i32; +pub const MDMI_PUSHED: MDIMINBUTTONSTATES = 3i32; +pub const MDP_NEWAPPBUTTON: MENUBANDPARTS = 1i32; +pub const MDP_SEPERATOR: MENUBANDPARTS = 2i32; +pub const MDRE_DISABLED: MDIRESTOREBUTTONSTATES = 4i32; +pub const MDRE_HOT: MDIRESTOREBUTTONSTATES = 2i32; +pub const MDRE_NORMAL: MDIRESTOREBUTTONSTATES = 1i32; +pub const MDRE_PUSHED: MDIRESTOREBUTTONSTATES = 3i32; +pub const MDS_CHECKED: MENUBANDSTATES = 5i32; +pub const MDS_DISABLED: MENUBANDSTATES = 4i32; +pub const MDS_HOT: MENUBANDSTATES = 2i32; +pub const MDS_HOTCHECKED: MENUBANDSTATES = 6i32; +pub const MDS_NORMAL: MENUBANDSTATES = 1i32; +pub const MDS_PRESSED: MENUBANDSTATES = 3i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct MEASUREITEMSTRUCT { + pub CtlType: DRAWITEMSTRUCT_CTL_TYPE, + pub CtlID: u32, + pub itemID: u32, + pub itemWidth: u32, + pub itemHeight: u32, + pub itemData: usize, +} +pub type MENUBANDPARTS = i32; +pub type MENUBANDSTATES = i32; +pub type MENUPARTS = i32; +pub const MENU_BARBACKGROUND: MENUPARTS = 7i32; +pub const MENU_BARITEM: MENUPARTS = 8i32; +pub const MENU_CHEVRON_TMSCHEMA: MENUPARTS = 5i32; +pub const MENU_MENUBARDROPDOWN_TMSCHEMA: MENUPARTS = 4i32; +pub const MENU_MENUBARITEM_TMSCHEMA: MENUPARTS = 3i32; +pub const MENU_MENUDROPDOWN_TMSCHEMA: MENUPARTS = 2i32; +pub const MENU_MENUITEM_TMSCHEMA: MENUPARTS = 1i32; +pub const MENU_POPUPBACKGROUND: MENUPARTS = 9i32; +pub const MENU_POPUPBORDERS: MENUPARTS = 10i32; +pub const MENU_POPUPCHECK: MENUPARTS = 11i32; +pub const MENU_POPUPCHECKBACKGROUND: MENUPARTS = 12i32; +pub const MENU_POPUPGUTTER: MENUPARTS = 13i32; +pub const MENU_POPUPITEM: MENUPARTS = 14i32; +pub const MENU_POPUPITEMKBFOCUS: MENUPARTS = 26i32; +pub const MENU_POPUPITEM_FOCUSABLE: MENUPARTS = 27i32; +pub const MENU_POPUPSEPARATOR: MENUPARTS = 15i32; +pub const MENU_POPUPSUBMENU: MENUPARTS = 16i32; +pub const MENU_POPUPSUBMENU_HCHOT: MENUPARTS = 21i32; +pub const MENU_SEPARATOR_TMSCHEMA: MENUPARTS = 6i32; +pub const MENU_SYSTEMCLOSE: MENUPARTS = 17i32; +pub const MENU_SYSTEMCLOSE_HCHOT: MENUPARTS = 22i32; +pub const MENU_SYSTEMMAXIMIZE: MENUPARTS = 18i32; +pub const MENU_SYSTEMMAXIMIZE_HCHOT: MENUPARTS = 23i32; +pub const MENU_SYSTEMMINIMIZE: MENUPARTS = 19i32; +pub const MENU_SYSTEMMINIMIZE_HCHOT: MENUPARTS = 24i32; +pub const MENU_SYSTEMRESTORE: MENUPARTS = 20i32; +pub const MENU_SYSTEMRESTORE_HCHOT: MENUPARTS = 25i32; +pub const MINBS_DISABLED: MINBUTTONSTATES = 4i32; +pub const MINBS_HOT: MINBUTTONSTATES = 2i32; +pub const MINBS_NORMAL: MINBUTTONSTATES = 1i32; +pub const MINBS_PUSHED: MINBUTTONSTATES = 3i32; +pub type MINBUTTONSTATES = i32; +pub type MINCAPTIONSTATES = i32; +pub const MNCS_ACTIVE: MINCAPTIONSTATES = 1i32; +pub const MNCS_DISABLED: MINCAPTIONSTATES = 3i32; +pub const MNCS_INACTIVE: MINCAPTIONSTATES = 2i32; +pub type MONTHCALPARTS = i32; +pub const MONTHCAL_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("SysMonthCal32"); +pub const MONTHCAL_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("SysMonthCal32"); +pub const MONTHCAL_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysMonthCal32"); +pub type MONTH_CALDENDAR_MESSAGES_VIEW = u32; +pub type MOREPROGRAMSARROWBACKSTATES = i32; +pub type MOREPROGRAMSARROWSTATES = i32; +pub type MOREPROGRAMSTABSTATES = i32; +pub type MOVESTATES = i32; +pub const MPIF_DISABLED: POPUPITEMFOCUSABLESTATES = 3i32; +pub const MPIF_DISABLEDHOT: POPUPITEMFOCUSABLESTATES = 4i32; +pub const MPIF_HOT: POPUPITEMFOCUSABLESTATES = 2i32; +pub const MPIF_NORMAL: POPUPITEMFOCUSABLESTATES = 1i32; +pub const MPIKBFOCUS_NORMAL: POPUPITEMKBFOCUSSTATES = 1i32; +pub const MPI_DISABLED: POPUPITEMSTATES = 3i32; +pub const MPI_DISABLEDHOT: POPUPITEMSTATES = 4i32; +pub const MPI_HOT: POPUPITEMSTATES = 2i32; +pub const MPI_NORMAL: POPUPITEMSTATES = 1i32; +pub const MSGF_COMMCTRL_BEGINDRAG: u32 = 16896u32; +pub const MSGF_COMMCTRL_DRAGSELECT: u32 = 16898u32; +pub const MSGF_COMMCTRL_SIZEHEADER: u32 = 16897u32; +pub const MSGF_COMMCTRL_TOOLBARCUST: u32 = 16899u32; +pub const MSMHC_HOT: POPUPSUBMENUHCHOTSTATES = 1i32; +pub const MSM_DISABLED: POPUPSUBMENUSTATES = 2i32; +pub const MSM_NORMAL: POPUPSUBMENUSTATES = 1i32; +pub const MSYSCHC_HOT: SYSTEMCLOSEHCHOTSTATES = 1i32; +pub const MSYSC_DISABLED: SYSTEMCLOSESTATES = 2i32; +pub const MSYSC_NORMAL: SYSTEMCLOSESTATES = 1i32; +pub const MSYSMNHC_HOT: SYSTEMMINIMIZEHCHOTSTATES = 1i32; +pub const MSYSMN_DISABLED: SYSTEMMINIMIZESTATES = 2i32; +pub const MSYSMN_NORMAL: SYSTEMMINIMIZESTATES = 1i32; +pub const MSYSMXHC_HOT: SYSTEMMAXIMIZEHCHOTSTATES = 1i32; +pub const MSYSMX_DISABLED: SYSTEMMAXIMIZESTATES = 2i32; +pub const MSYSMX_NORMAL: SYSTEMMAXIMIZESTATES = 1i32; +pub const MSYSRHC_HOT: SYSTEMRESTOREHCHOTSTATES = 1i32; +pub const MSYSR_DISABLED: SYSTEMRESTORESTATES = 2i32; +pub const MSYSR_NORMAL: SYSTEMRESTORESTATES = 1i32; +pub const MULTIFILEOPENORD: u32 = 1537u32; +pub const MXCS_ACTIVE: MAXCAPTIONSTATES = 1i32; +pub const MXCS_DISABLED: MAXCAPTIONSTATES = 3i32; +pub const MXCS_INACTIVE: MAXCAPTIONSTATES = 2i32; +pub type NAVIGATIONPARTS = i32; +pub type NAVNEXTSTATES = i32; +pub type NAVPREVSTATES = i32; +pub const NAV_BACKBUTTON: NAVIGATIONPARTS = 1i32; +pub type NAV_BACKBUTTONSTATES = i32; +pub const NAV_BB_DISABLED: NAV_BACKBUTTONSTATES = 4i32; +pub const NAV_BB_HOT: NAV_BACKBUTTONSTATES = 2i32; +pub const NAV_BB_NORMAL: NAV_BACKBUTTONSTATES = 1i32; +pub const NAV_BB_PRESSED: NAV_BACKBUTTONSTATES = 3i32; +pub const NAV_FB_DISABLED: NAV_FORWARDBUTTONSTATES = 4i32; +pub const NAV_FB_HOT: NAV_FORWARDBUTTONSTATES = 2i32; +pub const NAV_FB_NORMAL: NAV_FORWARDBUTTONSTATES = 1i32; +pub const NAV_FB_PRESSED: NAV_FORWARDBUTTONSTATES = 3i32; +pub const NAV_FORWARDBUTTON: NAVIGATIONPARTS = 2i32; +pub type NAV_FORWARDBUTTONSTATES = i32; +pub const NAV_MB_DISABLED: NAV_MENUBUTTONSTATES = 4i32; +pub const NAV_MB_HOT: NAV_MENUBUTTONSTATES = 2i32; +pub const NAV_MB_NORMAL: NAV_MENUBUTTONSTATES = 1i32; +pub const NAV_MB_PRESSED: NAV_MENUBUTTONSTATES = 3i32; +pub const NAV_MENUBUTTON: NAVIGATIONPARTS = 3i32; +pub type NAV_MENUBUTTONSTATES = i32; +pub const NEWFILEOPENORD: u32 = 1547u32; +pub const NEWFILEOPENV2ORD: u32 = 1552u32; +pub const NEWFILEOPENV3ORD: u32 = 1553u32; +pub const NEWFORMATDLGWITHLINK: u32 = 1591u32; +pub const NFS_ALL: u32 = 16u32; +pub const NFS_BUTTON: u32 = 8u32; +pub const NFS_EDIT: u32 = 1u32; +pub const NFS_LISTCOMBO: u32 = 4u32; +pub const NFS_STATIC: u32 = 2u32; +pub const NFS_USEFONTASSOC: u32 = 32u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMBCDROPDOWN { + pub hdr: NMHDR, + pub rcButton: super::super::Foundation::RECT, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMBCHOTITEM { + pub hdr: NMHDR, + pub dwFlags: NMTBHOTITEM_FLAGS, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMCBEDRAGBEGINA { + pub hdr: NMHDR, + pub iItemid: i32, + pub szText: [i8; 260], +} +impl Default for NMCBEDRAGBEGINA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMCBEDRAGBEGINW { + pub hdr: NMHDR, + pub iItemid: i32, + pub szText: [u16; 260], +} +impl Default for NMCBEDRAGBEGINW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMCBEENDEDITA { + pub hdr: NMHDR, + pub fChanged: windows_sys::core::BOOL, + pub iNewSelection: i32, + pub szText: [i8; 260], + pub iWhy: i32, +} +impl Default for NMCBEENDEDITA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMCBEENDEDITW { + pub hdr: NMHDR, + pub fChanged: windows_sys::core::BOOL, + pub iNewSelection: i32, + pub szText: [u16; 260], + pub iWhy: i32, +} +impl Default for NMCBEENDEDITW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMCHAR { + pub hdr: NMHDR, + pub ch: u32, + pub dwItemPrev: u32, + pub dwItemNext: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMCOMBOBOXEXA { + pub hdr: NMHDR, + pub ceItem: COMBOBOXEXITEMA, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMCOMBOBOXEXW { + pub hdr: NMHDR, + pub ceItem: COMBOBOXEXITEMW, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct NMCUSTOMDRAW { + pub hdr: NMHDR, + pub dwDrawStage: NMCUSTOMDRAW_DRAW_STAGE, + pub hdc: super::super::Graphics::Gdi::HDC, + pub rc: super::super::Foundation::RECT, + pub dwItemSpec: usize, + pub uItemState: NMCUSTOMDRAW_DRAW_STATE_FLAGS, + pub lItemlParam: super::super::Foundation::LPARAM, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for NMCUSTOMDRAW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type NMCUSTOMDRAW_DRAW_STAGE = u32; +pub type NMCUSTOMDRAW_DRAW_STATE_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMCUSTOMSPLITRECTINFO { + pub hdr: NMHDR, + pub rcClient: super::super::Foundation::RECT, + pub rcButton: super::super::Foundation::RECT, + pub rcSplit: super::super::Foundation::RECT, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct NMCUSTOMTEXT { + pub hdr: NMHDR, + pub hDC: super::super::Graphics::Gdi::HDC, + pub lpString: windows_sys::core::PCWSTR, + pub nCount: i32, + pub lpRect: *mut super::super::Foundation::RECT, + pub uFormat: u32, + pub fLink: windows_sys::core::BOOL, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for NMCUSTOMTEXT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMDATETIMECHANGE { + pub nmhdr: NMHDR, + pub dwFlags: NMDATETIMECHANGE_FLAGS, + pub st: super::super::Foundation::SYSTEMTIME, +} +pub type NMDATETIMECHANGE_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMEFORMATA { + pub nmhdr: NMHDR, + pub pszFormat: windows_sys::core::PCSTR, + pub st: super::super::Foundation::SYSTEMTIME, + pub pszDisplay: windows_sys::core::PCSTR, + pub szDisplay: [i8; 64], +} +impl Default for NMDATETIMEFORMATA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMEFORMATQUERYA { + pub nmhdr: NMHDR, + pub pszFormat: windows_sys::core::PCSTR, + pub szMax: super::super::Foundation::SIZE, +} +impl Default for NMDATETIMEFORMATQUERYA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMEFORMATQUERYW { + pub nmhdr: NMHDR, + pub pszFormat: windows_sys::core::PCWSTR, + pub szMax: super::super::Foundation::SIZE, +} +impl Default for NMDATETIMEFORMATQUERYW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMEFORMATW { + pub nmhdr: NMHDR, + pub pszFormat: windows_sys::core::PCWSTR, + pub st: super::super::Foundation::SYSTEMTIME, + pub pszDisplay: windows_sys::core::PCWSTR, + pub szDisplay: [u16; 64], +} +impl Default for NMDATETIMEFORMATW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMESTRINGA { + pub nmhdr: NMHDR, + pub pszUserString: windows_sys::core::PCSTR, + pub st: super::super::Foundation::SYSTEMTIME, + pub dwFlags: u32, +} +impl Default for NMDATETIMESTRINGA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMESTRINGW { + pub nmhdr: NMHDR, + pub pszUserString: windows_sys::core::PCWSTR, + pub st: super::super::Foundation::SYSTEMTIME, + pub dwFlags: u32, +} +impl Default for NMDATETIMESTRINGW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMEWMKEYDOWNA { + pub nmhdr: NMHDR, + pub nVirtKey: i32, + pub pszFormat: windows_sys::core::PCSTR, + pub st: super::super::Foundation::SYSTEMTIME, +} +impl Default for NMDATETIMEWMKEYDOWNA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDATETIMEWMKEYDOWNW { + pub nmhdr: NMHDR, + pub nVirtKey: i32, + pub pszFormat: windows_sys::core::PCWSTR, + pub st: super::super::Foundation::SYSTEMTIME, +} +impl Default for NMDATETIMEWMKEYDOWNW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMDAYSTATE { + pub nmhdr: NMHDR, + pub stStart: super::super::Foundation::SYSTEMTIME, + pub cDayState: i32, + pub prgDayState: *mut u32, +} +impl Default for NMDAYSTATE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMHDDISPINFOA { + pub hdr: NMHDR, + pub iItem: i32, + pub mask: HDI_MASK, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMHDDISPINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMHDDISPINFOW { + pub hdr: NMHDR, + pub iItem: i32, + pub mask: HDI_MASK, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMHDDISPINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMHDFILTERBTNCLICK { + pub hdr: NMHDR, + pub iItem: i32, + pub rc: super::super::Foundation::RECT, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMHDR { + pub hwndFrom: super::super::Foundation::HWND, + pub idFrom: usize, + pub code: u32, +} +impl Default for NMHDR { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct NMHEADERA { + pub hdr: NMHDR, + pub iItem: i32, + pub iButton: HEADER_CONTROL_NOTIFICATION_BUTTON, + pub pitem: *mut HDITEMA, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for NMHEADERA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct NMHEADERW { + pub hdr: NMHDR, + pub iItem: i32, + pub iButton: HEADER_CONTROL_NOTIFICATION_BUTTON, + pub pitem: *mut HDITEMW, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for NMHEADERW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMIPADDRESS { + pub hdr: NMHDR, + pub iField: i32, + pub iValue: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMITEMACTIVATE { + pub hdr: NMHDR, + pub iItem: i32, + pub iSubItem: i32, + pub uNewState: u32, + pub uOldState: u32, + pub uChanged: u32, + pub ptAction: super::super::Foundation::POINT, + pub lParam: super::super::Foundation::LPARAM, + pub uKeyFlags: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMKEY { + pub hdr: NMHDR, + pub nVKey: u32, + pub uFlags: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLINK { + pub hdr: NMHDR, + pub item: LITEM, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLISTVIEW { + pub hdr: NMHDR, + pub iItem: i32, + pub iSubItem: i32, + pub uNewState: u32, + pub uOldState: u32, + pub uChanged: LIST_VIEW_ITEM_FLAGS, + pub ptAction: super::super::Foundation::POINT, + pub lParam: super::super::Foundation::LPARAM, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVCACHEHINT { + pub hdr: NMHDR, + pub iFrom: i32, + pub iTo: i32, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct NMLVCUSTOMDRAW { + pub nmcd: NMCUSTOMDRAW, + pub clrText: super::super::Foundation::COLORREF, + pub clrTextBk: super::super::Foundation::COLORREF, + pub iSubItem: i32, + pub dwItemType: NMLVCUSTOMDRAW_ITEM_TYPE, + pub clrFace: super::super::Foundation::COLORREF, + pub iIconEffect: i32, + pub iIconPhase: i32, + pub iPartId: i32, + pub iStateId: i32, + pub rcText: super::super::Foundation::RECT, + pub uAlign: LIST_VIEW_GROUP_ALIGN_FLAGS, +} +pub type NMLVCUSTOMDRAW_ITEM_TYPE = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVDISPINFOA { + pub hdr: NMHDR, + pub item: LVITEMA, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVDISPINFOW { + pub hdr: NMHDR, + pub item: LVITEMW, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMLVEMPTYMARKUP { + pub hdr: NMHDR, + pub dwFlags: NMLVEMPTYMARKUP_FLAGS, + pub szMarkup: [u16; 2084], +} +impl Default for NMLVEMPTYMARKUP { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type NMLVEMPTYMARKUP_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVFINDITEMA { + pub hdr: NMHDR, + pub iStart: i32, + pub lvfi: LVFINDINFOA, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVFINDITEMW { + pub hdr: NMHDR, + pub iStart: i32, + pub lvfi: LVFINDINFOW, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMLVGETINFOTIPA { + pub hdr: NMHDR, + pub dwFlags: NMLVGETINFOTIP_FLAGS, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iItem: i32, + pub iSubItem: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMLVGETINFOTIPA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMLVGETINFOTIPW { + pub hdr: NMHDR, + pub dwFlags: NMLVGETINFOTIP_FLAGS, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iItem: i32, + pub iSubItem: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMLVGETINFOTIPW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type NMLVGETINFOTIP_FLAGS = u32; +#[repr(C, packed(1))] +#[derive(Clone, Copy, Default)] +pub struct NMLVKEYDOWN { + pub hdr: NMHDR, + pub wVKey: u16, + pub flags: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVLINK { + pub hdr: NMHDR, + pub link: LITEM, + pub iItem: i32, + pub iSubItem: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVODSTATECHANGE { + pub hdr: NMHDR, + pub iFrom: i32, + pub iTo: i32, + pub uNewState: LIST_VIEW_ITEM_STATE_FLAGS, + pub uOldState: LIST_VIEW_ITEM_STATE_FLAGS, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMLVSCROLL { + pub hdr: NMHDR, + pub dx: i32, + pub dy: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMMOUSE { + pub hdr: NMHDR, + pub dwItemSpec: usize, + pub dwItemData: usize, + pub pt: super::super::Foundation::POINT, + pub dwHitInfo: super::super::Foundation::LPARAM, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMOBJECTNOTIFY { + pub hdr: NMHDR, + pub iItem: i32, + pub piid: *const windows_sys::core::GUID, + pub pObject: *mut core::ffi::c_void, + pub hResult: windows_sys::core::HRESULT, + pub dwFlags: u32, +} +impl Default for NMOBJECTNOTIFY { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMPGCALCSIZE { + pub hdr: NMHDR, + pub dwFlag: NMPGCALCSIZE_FLAGS, + pub iWidth: i32, + pub iHeight: i32, +} +pub type NMPGCALCSIZE_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMPGHOTITEM { + pub hdr: NMHDR, + pub idOld: i32, + pub idNew: i32, + pub dwFlags: u32, +} +#[repr(C, packed(1))] +#[derive(Clone, Copy, Default)] +pub struct NMPGSCROLL { + pub hdr: NMHDR, + pub fwKeys: NMPGSCROLL_KEYS, + pub rcParent: super::super::Foundation::RECT, + pub iDir: NMPGSCROLL_DIR, + pub iXpos: i32, + pub iYpos: i32, + pub iScroll: i32, +} +pub type NMPGSCROLL_DIR = i32; +pub type NMPGSCROLL_KEYS = u16; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMRBAUTOSIZE { + pub hdr: NMHDR, + pub fChanged: windows_sys::core::BOOL, + pub rcTarget: super::super::Foundation::RECT, + pub rcActual: super::super::Foundation::RECT, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMREBAR { + pub hdr: NMHDR, + pub dwMask: NMREBAR_MASK_FLAGS, + pub uBand: u32, + pub fStyle: u32, + pub wID: u32, + pub lParam: super::super::Foundation::LPARAM, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMREBARAUTOBREAK { + pub hdr: NMHDR, + pub uBand: u32, + pub wID: u32, + pub lParam: super::super::Foundation::LPARAM, + pub uMsg: u32, + pub fStyleCurrent: u32, + pub fAutoBreak: windows_sys::core::BOOL, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMREBARCHEVRON { + pub hdr: NMHDR, + pub uBand: u32, + pub wID: u32, + pub lParam: super::super::Foundation::LPARAM, + pub rc: super::super::Foundation::RECT, + pub lParamNM: super::super::Foundation::LPARAM, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMREBARCHILDSIZE { + pub hdr: NMHDR, + pub uBand: u32, + pub wID: u32, + pub rcChild: super::super::Foundation::RECT, + pub rcBand: super::super::Foundation::RECT, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMREBARSPLITTER { + pub hdr: NMHDR, + pub rcSizing: super::super::Foundation::RECT, +} +pub type NMREBAR_MASK_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMSEARCHWEB { + pub hdr: NMHDR, + pub entrypoint: EC_SEARCHWEB_ENTRYPOINT, + pub hasQueryText: windows_sys::core::BOOL, + pub invokeSucceeded: windows_sys::core::BOOL, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMSELCHANGE { + pub nmhdr: NMHDR, + pub stSelStart: super::super::Foundation::SYSTEMTIME, + pub stSelEnd: super::super::Foundation::SYSTEMTIME, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct NMTBCUSTOMDRAW { + pub nmcd: NMCUSTOMDRAW, + pub hbrMonoDither: super::super::Graphics::Gdi::HBRUSH, + pub hbrLines: super::super::Graphics::Gdi::HBRUSH, + pub hpenLines: super::super::Graphics::Gdi::HPEN, + pub clrText: super::super::Foundation::COLORREF, + pub clrMark: super::super::Foundation::COLORREF, + pub clrTextHighlight: super::super::Foundation::COLORREF, + pub clrBtnFace: super::super::Foundation::COLORREF, + pub clrBtnHighlight: super::super::Foundation::COLORREF, + pub clrHighlightHotTrack: super::super::Foundation::COLORREF, + pub rcText: super::super::Foundation::RECT, + pub nStringBkMode: i32, + pub nHLStringBkMode: i32, + pub iListGap: i32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for NMTBCUSTOMDRAW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTBDISPINFOA { + pub hdr: NMHDR, + pub dwMask: NMTBDISPINFOW_MASK, + pub idCommand: i32, + pub lParam: usize, + pub iImage: i32, + pub pszText: windows_sys::core::PSTR, + pub cchText: i32, +} +impl Default for NMTBDISPINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTBDISPINFOW { + pub hdr: NMHDR, + pub dwMask: NMTBDISPINFOW_MASK, + pub idCommand: i32, + pub lParam: usize, + pub iImage: i32, + pub pszText: windows_sys::core::PWSTR, + pub cchText: i32, +} +impl Default for NMTBDISPINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type NMTBDISPINFOW_MASK = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTBGETINFOTIPA { + pub hdr: NMHDR, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iItem: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMTBGETINFOTIPA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTBGETINFOTIPW { + pub hdr: NMHDR, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iItem: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMTBGETINFOTIPW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTBHOTITEM { + pub hdr: NMHDR, + pub idOld: i32, + pub idNew: i32, + pub dwFlags: NMTBHOTITEM_FLAGS, +} +pub type NMTBHOTITEM_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTBRESTORE { + pub hdr: NMHDR, + pub pData: *mut u32, + pub pCurrent: *mut u32, + pub cbData: u32, + pub iItem: i32, + pub cButtons: i32, + pub cbBytesPerRecord: i32, + pub tbButton: TBBUTTON, +} +impl Default for NMTBRESTORE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTBSAVE { + pub hdr: NMHDR, + pub pData: *mut u32, + pub pCurrent: *mut u32, + pub cbData: u32, + pub iItem: i32, + pub cButtons: i32, + pub tbButton: TBBUTTON, +} +impl Default for NMTBSAVE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[derive(Clone, Copy, Default)] +pub struct NMTCKEYDOWN { + pub hdr: NMHDR, + pub wVKey: u16, + pub flags: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTOOLBARA { + pub hdr: NMHDR, + pub iItem: i32, + pub tbButton: TBBUTTON, + pub cchText: i32, + pub pszText: windows_sys::core::PSTR, + pub rcButton: super::super::Foundation::RECT, +} +impl Default for NMTOOLBARA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTOOLBARW { + pub hdr: NMHDR, + pub iItem: i32, + pub tbButton: TBBUTTON, + pub cchText: i32, + pub pszText: windows_sys::core::PWSTR, + pub rcButton: super::super::Foundation::RECT, +} +impl Default for NMTOOLBARW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTOOLTIPSCREATED { + pub hdr: NMHDR, + pub hwndToolTips: super::super::Foundation::HWND, +} +impl Default for NMTOOLTIPSCREATED { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTRBTHUMBPOSCHANGING { + pub hdr: NMHDR, + pub dwPos: u32, + pub nReason: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTREEVIEWA { + pub hdr: NMHDR, + pub action: NM_TREEVIEW_ACTION, + pub itemOld: TVITEMA, + pub itemNew: TVITEMA, + pub ptDrag: super::super::Foundation::POINT, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTREEVIEWW { + pub hdr: NMHDR, + pub action: NM_TREEVIEW_ACTION, + pub itemOld: TVITEMW, + pub itemNew: TVITEMW, + pub ptDrag: super::super::Foundation::POINT, +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct NMTTCUSTOMDRAW { + pub nmcd: NMCUSTOMDRAW, + pub uDrawFlags: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTTDISPINFOA { + pub hdr: NMHDR, + pub lpszText: windows_sys::core::PSTR, + pub szText: [i8; 80], + pub hinst: super::super::Foundation::HINSTANCE, + pub uFlags: TOOLTIP_FLAGS, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMTTDISPINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTTDISPINFOW { + pub hdr: NMHDR, + pub lpszText: windows_sys::core::PWSTR, + pub szText: [u16; 80], + pub hinst: super::super::Foundation::HINSTANCE, + pub uFlags: TOOLTIP_FLAGS, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMTTDISPINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct NMTVASYNCDRAW { + pub hdr: NMHDR, + pub pimldp: *mut IMAGELISTDRAWPARAMS, + pub hr: windows_sys::core::HRESULT, + pub hItem: HTREEITEM, + pub lParam: super::super::Foundation::LPARAM, + pub dwRetFlags: u32, + pub iRetImageIndex: i32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for NMTVASYNCDRAW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy, Default)] +pub struct NMTVCUSTOMDRAW { + pub nmcd: NMCUSTOMDRAW, + pub clrText: super::super::Foundation::COLORREF, + pub clrTextBk: super::super::Foundation::COLORREF, + pub iLevel: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTVDISPINFOA { + pub hdr: NMHDR, + pub item: TVITEMA, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTVDISPINFOEXA { + pub hdr: NMHDR, + pub item: TVITEMEXA, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTVDISPINFOEXW { + pub hdr: NMHDR, + pub item: TVITEMEXW, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTVDISPINFOW { + pub hdr: NMHDR, + pub item: TVITEMW, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTVGETINFOTIPA { + pub hdr: NMHDR, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub hItem: HTREEITEM, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMTVGETINFOTIPA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct NMTVGETINFOTIPW { + pub hdr: NMHDR, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub hItem: HTREEITEM, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for NMTVGETINFOTIPW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTVITEMCHANGE { + pub hdr: NMHDR, + pub uChanged: u32, + pub hItem: HTREEITEM, + pub uStateNew: u32, + pub uStateOld: u32, + pub lParam: super::super::Foundation::LPARAM, +} +#[repr(C, packed(1))] +#[derive(Clone, Copy, Default)] +pub struct NMTVKEYDOWN { + pub hdr: NMHDR, + pub wVKey: u16, + pub flags: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMTVSTATEIMAGECHANGING { + pub hdr: NMHDR, + pub hti: HTREEITEM, + pub iOldStateImageIndex: i32, + pub iNewStateImageIndex: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMUPDOWN { + pub hdr: NMHDR, + pub iPos: i32, + pub iDelta: i32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NMVIEWCHANGE { + pub nmhdr: NMHDR, + pub dwOldView: MONTH_CALDENDAR_MESSAGES_VIEW, + pub dwNewView: MONTH_CALDENDAR_MESSAGES_VIEW, +} +pub const NM_CHAR: u32 = 4294967278u32; +pub const NM_CLICK: u32 = 4294967294u32; +pub const NM_CUSTOMDRAW: u32 = 4294967284u32; +pub const NM_CUSTOMTEXT: u32 = 4294967272u32; +pub const NM_DBLCLK: u32 = 4294967293u32; +pub const NM_FIRST: u32 = 0u32; +pub const NM_FONTCHANGED: u32 = 4294967273u32; +pub const NM_GETCUSTOMSPLITRECT: u32 = 4294966049u32; +pub const NM_HOVER: u32 = 4294967283u32; +pub const NM_KEYDOWN: u32 = 4294967281u32; +pub const NM_KILLFOCUS: u32 = 4294967288u32; +pub const NM_LAST: u32 = 4294967197u32; +pub const NM_LDOWN: u32 = 4294967276u32; +pub const NM_NCHITTEST: u32 = 4294967282u32; +pub const NM_OUTOFMEMORY: u32 = 4294967295u32; +pub const NM_RCLICK: u32 = 4294967291u32; +pub const NM_RDBLCLK: u32 = 4294967290u32; +pub const NM_RDOWN: u32 = 4294967275u32; +pub const NM_RELEASEDCAPTURE: u32 = 4294967280u32; +pub const NM_RETURN: u32 = 4294967292u32; +pub const NM_SETCURSOR: u32 = 4294967279u32; +pub const NM_SETFOCUS: u32 = 4294967289u32; +pub const NM_THEMECHANGED: u32 = 4294967274u32; +pub const NM_TOOLTIPSCREATED: u32 = 4294967277u32; +pub type NM_TREEVIEW_ACTION = u32; +pub const NM_TVSTATEIMAGECHANGING: u32 = 4294967272u32; +pub type NONESTATES = i32; +pub type NORMALGROUPCOLLAPSESTATES = i32; +pub type NORMALGROUPEXPANDSTATES = i32; +pub const ODA_DRAWENTIRE: ODA_FLAGS = 1u32; +pub type ODA_FLAGS = u32; +pub const ODA_FOCUS: ODA_FLAGS = 4u32; +pub const ODA_SELECT: ODA_FLAGS = 2u32; +pub const ODS_CHECKED: ODS_FLAGS = 8u32; +pub const ODS_COMBOBOXEDIT: ODS_FLAGS = 4096u32; +pub const ODS_DEFAULT: ODS_FLAGS = 32u32; +pub const ODS_DISABLED: ODS_FLAGS = 4u32; +pub type ODS_FLAGS = u32; +pub const ODS_FOCUS: ODS_FLAGS = 16u32; +pub const ODS_GRAYED: ODS_FLAGS = 2u32; +pub const ODS_HOTLIGHT: ODS_FLAGS = 64u32; +pub const ODS_INACTIVE: ODS_FLAGS = 128u32; +pub const ODS_NOACCEL: ODS_FLAGS = 256u32; +pub const ODS_NOFOCUSRECT: ODS_FLAGS = 512u32; +pub const ODS_SELECTED: ODS_FLAGS = 1u32; +pub const ODT_BUTTON: DRAWITEMSTRUCT_CTL_TYPE = 4u32; +pub const ODT_COMBOBOX: DRAWITEMSTRUCT_CTL_TYPE = 3u32; +pub const ODT_HEADER: u32 = 100u32; +pub const ODT_LISTBOX: DRAWITEMSTRUCT_CTL_TYPE = 2u32; +pub const ODT_LISTVIEW: DRAWITEMSTRUCT_CTL_TYPE = 102u32; +pub const ODT_MENU: DRAWITEMSTRUCT_CTL_TYPE = 1u32; +pub const ODT_STATIC: DRAWITEMSTRUCT_CTL_TYPE = 5u32; +pub const ODT_TAB: DRAWITEMSTRUCT_CTL_TYPE = 101u32; +pub type OFFSETTYPE = i32; +pub type OPENBOXSTATES = i32; +pub type OPEN_THEME_DATA_FLAGS = u32; +pub const OTD_FORCE_RECT_SIZING: OPEN_THEME_DATA_FLAGS = 1u32; +pub const OTD_NONCLIENT: OPEN_THEME_DATA_FLAGS = 2u32; +pub const OT_ABOVELASTBUTTON: OFFSETTYPE = 12i32; +pub const OT_BELOWLASTBUTTON: OFFSETTYPE = 13i32; +pub const OT_BOTTOMLEFT: OFFSETTYPE = 3i32; +pub const OT_BOTTOMMIDDLE: OFFSETTYPE = 5i32; +pub const OT_BOTTOMRIGHT: OFFSETTYPE = 4i32; +pub const OT_LEFTOFCAPTION: OFFSETTYPE = 8i32; +pub const OT_LEFTOFLASTBUTTON: OFFSETTYPE = 10i32; +pub const OT_MIDDLELEFT: OFFSETTYPE = 6i32; +pub const OT_MIDDLERIGHT: OFFSETTYPE = 7i32; +pub const OT_RIGHTOFCAPTION: OFFSETTYPE = 9i32; +pub const OT_RIGHTOFLASTBUTTON: OFFSETTYPE = 11i32; +pub const OT_TOPLEFT: OFFSETTYPE = 0i32; +pub const OT_TOPMIDDLE: OFFSETTYPE = 2i32; +pub const OT_TOPRIGHT: OFFSETTYPE = 1i32; +pub type PAGEPARTS = i32; +pub const PAGESETUPDLGORD: u32 = 1546u32; +pub const PAGESETUPDLGORDMOTIF: u32 = 1550u32; +pub const PBBS_NORMAL: TRANSPARENTBARSTATES = 1i32; +pub const PBBS_PARTIAL: TRANSPARENTBARSTATES = 2i32; +pub const PBBVS_NORMAL: TRANSPARENTBARVERTSTATES = 1i32; +pub const PBBVS_PARTIAL: TRANSPARENTBARVERTSTATES = 2i32; +pub const PBDDS_DISABLED: PUSHBUTTONDROPDOWNSTATES = 2i32; +pub const PBDDS_NORMAL: PUSHBUTTONDROPDOWNSTATES = 1i32; +pub const PBFS_ERROR: FILLSTATES = 2i32; +pub const PBFS_NORMAL: FILLSTATES = 1i32; +pub const PBFS_PARTIAL: FILLSTATES = 4i32; +pub const PBFS_PAUSED: FILLSTATES = 3i32; +pub const PBFVS_ERROR: FILLVERTSTATES = 2i32; +pub const PBFVS_NORMAL: FILLVERTSTATES = 1i32; +pub const PBFVS_PARTIAL: FILLVERTSTATES = 4i32; +pub const PBFVS_PAUSED: FILLVERTSTATES = 3i32; +pub const PBM_DELTAPOS: u32 = 1027u32; +pub const PBM_GETBARCOLOR: u32 = 1039u32; +pub const PBM_GETBKCOLOR: u32 = 1038u32; +pub const PBM_GETPOS: u32 = 1032u32; +pub const PBM_GETRANGE: u32 = 1031u32; +pub const PBM_GETSTATE: u32 = 1041u32; +pub const PBM_GETSTEP: u32 = 1037u32; +pub const PBM_SETBARCOLOR: u32 = 1033u32; +pub const PBM_SETBKCOLOR: u32 = 8193u32; +pub const PBM_SETMARQUEE: u32 = 1034u32; +pub const PBM_SETPOS: u32 = 1026u32; +pub const PBM_SETRANGE: u32 = 1025u32; +pub const PBM_SETRANGE32: u32 = 1030u32; +pub const PBM_SETSTATE: u32 = 1040u32; +pub const PBM_SETSTEP: u32 = 1028u32; +pub const PBM_STEPIT: u32 = 1029u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct PBRANGE { + pub iLow: i32, + pub iHigh: i32, +} +pub const PBST_ERROR: u32 = 2u32; +pub const PBST_NORMAL: u32 = 1u32; +pub const PBST_PAUSED: u32 = 3u32; +pub const PBS_DEFAULTED: PUSHBUTTONSTATES = 5i32; +pub const PBS_DEFAULTED_ANIMATING: PUSHBUTTONSTATES = 6i32; +pub const PBS_DISABLED: PUSHBUTTONSTATES = 4i32; +pub const PBS_HOT: PUSHBUTTONSTATES = 2i32; +pub const PBS_MARQUEE: u32 = 8u32; +pub const PBS_NORMAL: PUSHBUTTONSTATES = 1i32; +pub const PBS_PRESSED: PUSHBUTTONSTATES = 3i32; +pub const PBS_SMOOTH: u32 = 1u32; +pub const PBS_SMOOTHREVERSE: u32 = 16u32; +pub const PBS_VERTICAL: u32 = 4u32; +pub type PFNDACOMPARE = Option i32>; +pub type PFNDACOMPARECONST = Option i32>; +pub type PFNDAENUMCALLBACK = Option i32>; +pub type PFNDAENUMCALLBACKCONST = Option i32>; +pub type PFNDPAMERGE = Option *mut core::ffi::c_void>; +pub type PFNDPAMERGECONST = Option *mut core::ffi::c_void>; +#[cfg(feature = "Win32_System_Com")] +pub type PFNDPASTREAM = Option windows_sys::core::HRESULT>; +pub type PFNLVCOMPARE = Option i32>; +pub type PFNLVGROUPCOMPARE = Option i32>; +pub type PFNPROPSHEETCALLBACK = Option i32>; +pub type PFNTVCOMPARE = Option i32>; +pub type PFTASKDIALOGCALLBACK = Option windows_sys::core::HRESULT>; +pub const PGB_BOTTOMORRIGHT: u32 = 1u32; +pub const PGB_TOPORLEFT: u32 = 0u32; +pub const PGF_CALCHEIGHT: NMPGCALCSIZE_FLAGS = 2u32; +pub const PGF_CALCWIDTH: NMPGCALCSIZE_FLAGS = 1u32; +pub const PGF_DEPRESSED: u32 = 4u32; +pub const PGF_GRAYED: u32 = 2u32; +pub const PGF_HOT: u32 = 8u32; +pub const PGF_INVISIBLE: u32 = 0u32; +pub const PGF_NORMAL: u32 = 1u32; +pub const PGF_SCROLLDOWN: NMPGSCROLL_DIR = 2i32; +pub const PGF_SCROLLLEFT: NMPGSCROLL_DIR = 4i32; +pub const PGF_SCROLLRIGHT: NMPGSCROLL_DIR = 8i32; +pub const PGF_SCROLLUP: NMPGSCROLL_DIR = 1i32; +pub const PGK_CONTROL: NMPGSCROLL_KEYS = 2u16; +pub const PGK_MENU: NMPGSCROLL_KEYS = 4u16; +pub const PGK_NONE: NMPGSCROLL_KEYS = 0u16; +pub const PGK_SHIFT: NMPGSCROLL_KEYS = 1u16; +pub const PGM_FIRST: u32 = 5120u32; +pub const PGM_FORWARDMOUSE: u32 = 5123u32; +pub const PGM_GETBKCOLOR: u32 = 5125u32; +pub const PGM_GETBORDER: u32 = 5127u32; +pub const PGM_GETBUTTONSIZE: u32 = 5131u32; +pub const PGM_GETBUTTONSTATE: u32 = 5132u32; +pub const PGM_GETDROPTARGET: u32 = 8196u32; +pub const PGM_GETPOS: u32 = 5129u32; +pub const PGM_RECALCSIZE: u32 = 5122u32; +pub const PGM_SETBKCOLOR: u32 = 5124u32; +pub const PGM_SETBORDER: u32 = 5126u32; +pub const PGM_SETBUTTONSIZE: u32 = 5130u32; +pub const PGM_SETCHILD: u32 = 5121u32; +pub const PGM_SETPOS: u32 = 5128u32; +pub const PGM_SETSCROLLINFO: u32 = 5133u32; +pub const PGN_CALCSIZE: u32 = 4294966394u32; +pub const PGN_FIRST: u32 = 4294966396u32; +pub const PGN_HOTITEMCHANGE: u32 = 4294966393u32; +pub const PGN_LAST: u32 = 4294966346u32; +pub const PGN_SCROLL: u32 = 4294966395u32; +pub const PGRP_DOWN: PAGEPARTS = 2i32; +pub const PGRP_DOWNHORZ: PAGEPARTS = 4i32; +pub const PGRP_UP: PAGEPARTS = 1i32; +pub const PGRP_UPHORZ: PAGEPARTS = 3i32; +pub const PGS_AUTOSCROLL: u32 = 2u32; +pub const PGS_DRAGNDROP: u32 = 4u32; +pub const PGS_HORZ: u32 = 1u32; +pub const PGS_VERT: u32 = 0u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct POINTER_DEVICE_CURSOR_INFO { + pub cursorId: u32, + pub cursor: POINTER_DEVICE_CURSOR_TYPE, +} +pub type POINTER_DEVICE_CURSOR_TYPE = i32; +pub const POINTER_DEVICE_CURSOR_TYPE_ERASER: POINTER_DEVICE_CURSOR_TYPE = 2i32; +pub const POINTER_DEVICE_CURSOR_TYPE_MAX: POINTER_DEVICE_CURSOR_TYPE = -1i32; +pub const POINTER_DEVICE_CURSOR_TYPE_TIP: POINTER_DEVICE_CURSOR_TYPE = 1i32; +pub const POINTER_DEVICE_CURSOR_TYPE_UNKNOWN: POINTER_DEVICE_CURSOR_TYPE = 0i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct POINTER_DEVICE_INFO { + pub displayOrientation: u32, + pub device: super::super::Foundation::HANDLE, + pub pointerDeviceType: POINTER_DEVICE_TYPE, + pub monitor: super::super::Graphics::Gdi::HMONITOR, + pub startingCursorId: u32, + pub maxActiveContacts: u16, + pub productString: [u16; 520], +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for POINTER_DEVICE_INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct POINTER_DEVICE_PROPERTY { + pub logicalMin: i32, + pub logicalMax: i32, + pub physicalMin: i32, + pub physicalMax: i32, + pub unit: u32, + pub unitExponent: u32, + pub usagePageId: u16, + pub usageId: u16, +} +pub type POINTER_DEVICE_TYPE = i32; +pub const POINTER_DEVICE_TYPE_EXTERNAL_PEN: POINTER_DEVICE_TYPE = 2i32; +pub const POINTER_DEVICE_TYPE_INTEGRATED_PEN: POINTER_DEVICE_TYPE = 1i32; +pub const POINTER_DEVICE_TYPE_MAX: POINTER_DEVICE_TYPE = -1i32; +pub const POINTER_DEVICE_TYPE_TOUCH: POINTER_DEVICE_TYPE = 3i32; +pub const POINTER_DEVICE_TYPE_TOUCH_PAD: POINTER_DEVICE_TYPE = 4i32; +pub const POINTER_FEEDBACK_DEFAULT: POINTER_FEEDBACK_MODE = 1i32; +pub const POINTER_FEEDBACK_INDIRECT: POINTER_FEEDBACK_MODE = 2i32; +pub type POINTER_FEEDBACK_MODE = i32; +pub const POINTER_FEEDBACK_NONE: POINTER_FEEDBACK_MODE = 3i32; +#[repr(C)] +#[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct POINTER_TYPE_INFO { + pub r#type: super::WindowsAndMessaging::POINTER_INPUT_TYPE, + pub Anonymous: POINTER_TYPE_INFO_0, +} +#[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for POINTER_TYPE_INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union POINTER_TYPE_INFO_0 { + pub touchInfo: super::Input::Pointer::POINTER_TOUCH_INFO, + pub penInfo: super::Input::Pointer::POINTER_PEN_INFO, +} +#[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for POINTER_TYPE_INFO_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type POPUPCHECKBACKGROUNDSTATES = i32; +pub type POPUPCHECKSTATES = i32; +pub type POPUPITEMFOCUSABLESTATES = i32; +pub type POPUPITEMKBFOCUSSTATES = i32; +pub type POPUPITEMSTATES = i32; +pub type POPUPSUBMENUHCHOTSTATES = i32; +pub type POPUPSUBMENUSTATES = i32; +pub const PO_CLASS: PROPERTYORIGIN = 2i32; +pub const PO_GLOBAL: PROPERTYORIGIN = 3i32; +pub const PO_NOTFOUND: PROPERTYORIGIN = 4i32; +pub const PO_PART: PROPERTYORIGIN = 1i32; +pub const PO_STATE: PROPERTYORIGIN = 0i32; +pub const PP_BAR: PROGRESSPARTS = 1i32; +pub const PP_BARVERT: PROGRESSPARTS = 2i32; +pub const PP_CHUNK: PROGRESSPARTS = 3i32; +pub const PP_CHUNKVERT: PROGRESSPARTS = 4i32; +pub const PP_FILL: PROGRESSPARTS = 5i32; +pub const PP_FILLVERT: PROGRESSPARTS = 6i32; +pub const PP_MOVEOVERLAY: PROGRESSPARTS = 8i32; +pub const PP_MOVEOVERLAYVERT: PROGRESSPARTS = 10i32; +pub const PP_PULSEOVERLAY: PROGRESSPARTS = 7i32; +pub const PP_PULSEOVERLAYVERT: PROGRESSPARTS = 9i32; +pub const PP_TRANSPARENTBAR: PROGRESSPARTS = 11i32; +pub const PP_TRANSPARENTBARVERT: PROGRESSPARTS = 12i32; +pub const PRINTDLGEXORD: u32 = 1549u32; +pub const PRINTDLGORD: u32 = 1538u32; +pub const PRNSETUPDLGORD: u32 = 1539u32; +pub type PROGRESSPARTS = i32; +pub const PROGRESS_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_progress32"); +pub const PROGRESS_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("msctls_progress32"); +pub const PROGRESS_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_progress32"); +pub type PROPERTYORIGIN = i32; +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETHEADERA_V1 { + pub dwSize: u32, + pub dwFlags: u32, + pub hwndParent: super::super::Foundation::HWND, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETHEADERA_V1_0, + pub pszCaption: windows_sys::core::PCSTR, + pub nPages: u32, + pub Anonymous2: PROPSHEETHEADERA_V1_1, + pub Anonymous3: PROPSHEETHEADERA_V1_2, + pub pfnCallback: PFNPROPSHEETCALLBACK, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V1_0 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V1_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V1_1 { + pub nStartPage: u32, + pub pStartPage: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V1_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V1_2 { + pub ppsp: *mut PROPSHEETPAGEA, + pub phpage: *mut HPROPSHEETPAGE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V1_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETHEADERA_V2 { + pub dwSize: u32, + pub dwFlags: u32, + pub hwndParent: super::super::Foundation::HWND, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETHEADERA_V2_0, + pub pszCaption: windows_sys::core::PCSTR, + pub nPages: u32, + pub Anonymous2: PROPSHEETHEADERA_V2_1, + pub Anonymous3: PROPSHEETHEADERA_V2_2, + pub pfnCallback: PFNPROPSHEETCALLBACK, + pub Anonymous4: PROPSHEETHEADERA_V2_3, + pub hplWatermark: super::super::Graphics::Gdi::HPALETTE, + pub Anonymous5: PROPSHEETHEADERA_V2_4, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V2_0 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V2_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V2_1 { + pub nStartPage: u32, + pub pStartPage: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V2_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V2_2 { + pub ppsp: *mut PROPSHEETPAGEA, + pub phpage: *mut HPROPSHEETPAGE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V2_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V2_3 { + pub hbmWatermark: super::super::Graphics::Gdi::HBITMAP, + pub pszbmWatermark: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V2_3 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERA_V2_4 { + pub hbmHeader: super::super::Graphics::Gdi::HBITMAP, + pub pszbmHeader: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERA_V2_4 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETHEADERW_V1 { + pub dwSize: u32, + pub dwFlags: u32, + pub hwndParent: super::super::Foundation::HWND, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETHEADERW_V1_0, + pub pszCaption: windows_sys::core::PCWSTR, + pub nPages: u32, + pub Anonymous2: PROPSHEETHEADERW_V1_1, + pub Anonymous3: PROPSHEETHEADERW_V1_2, + pub pfnCallback: PFNPROPSHEETCALLBACK, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V1_0 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V1_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V1_1 { + pub nStartPage: u32, + pub pStartPage: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V1_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V1_2 { + pub ppsp: *mut PROPSHEETPAGEW, + pub phpage: *mut HPROPSHEETPAGE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V1_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETHEADERW_V2 { + pub dwSize: u32, + pub dwFlags: u32, + pub hwndParent: super::super::Foundation::HWND, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETHEADERW_V2_0, + pub pszCaption: windows_sys::core::PCWSTR, + pub nPages: u32, + pub Anonymous2: PROPSHEETHEADERW_V2_1, + pub Anonymous3: PROPSHEETHEADERW_V2_2, + pub pfnCallback: PFNPROPSHEETCALLBACK, + pub Anonymous4: PROPSHEETHEADERW_V2_3, + pub hplWatermark: super::super::Graphics::Gdi::HPALETTE, + pub Anonymous5: PROPSHEETHEADERW_V2_4, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V2_0 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V2_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V2_1 { + pub nStartPage: u32, + pub pStartPage: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V2_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V2_2 { + pub ppsp: *mut PROPSHEETPAGEW, + pub phpage: *mut HPROPSHEETPAGE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V2_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V2_3 { + pub hbmWatermark: super::super::Graphics::Gdi::HBITMAP, + pub pszbmWatermark: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V2_3 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETHEADERW_V2_4 { + pub hbmHeader: super::super::Graphics::Gdi::HBITMAP, + pub pszbmHeader: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETHEADERW_V2_4 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEA { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEA_0, + pub Anonymous2: PROPSHEETPAGEA_1, + pub pszTitle: windows_sys::core::PCSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKA, + pub pcRefParent: *mut u32, + pub pszHeaderTitle: windows_sys::core::PCSTR, + pub pszHeaderSubTitle: windows_sys::core::PCSTR, + pub hActCtx: super::super::Foundation::HANDLE, + pub Anonymous3: PROPSHEETPAGEA_2, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_0 { + pub pszTemplate: windows_sys::core::PCSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_2 { + pub hbmHeader: super::super::Graphics::Gdi::HBITMAP, + pub pszbmHeader: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEA_V1 { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEA_V1_0, + pub Anonymous2: PROPSHEETPAGEA_V1_1, + pub pszTitle: windows_sys::core::PCSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKA, + pub pcRefParent: *mut u32, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_V1_0 { + pub pszTemplate: windows_sys::core::PCSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V1_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_V1_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V1_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEA_V2 { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEA_V2_0, + pub Anonymous2: PROPSHEETPAGEA_V2_1, + pub pszTitle: windows_sys::core::PCSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKA, + pub pcRefParent: *mut u32, + pub pszHeaderTitle: windows_sys::core::PCSTR, + pub pszHeaderSubTitle: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_V2_0 { + pub pszTemplate: windows_sys::core::PCSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V2_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_V2_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V2_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEA_V3 { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEA_V3_0, + pub Anonymous2: PROPSHEETPAGEA_V3_1, + pub pszTitle: windows_sys::core::PCSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKA, + pub pcRefParent: *mut u32, + pub pszHeaderTitle: windows_sys::core::PCSTR, + pub pszHeaderSubTitle: windows_sys::core::PCSTR, + pub hActCtx: super::super::Foundation::HANDLE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V3 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_V3_0 { + pub pszTemplate: windows_sys::core::PCSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V3_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEA_V3_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEA_V3_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEW { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEW_0, + pub Anonymous2: PROPSHEETPAGEW_1, + pub pszTitle: windows_sys::core::PCWSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKW, + pub pcRefParent: *mut u32, + pub pszHeaderTitle: windows_sys::core::PCWSTR, + pub pszHeaderSubTitle: windows_sys::core::PCWSTR, + pub hActCtx: super::super::Foundation::HANDLE, + pub Anonymous3: PROPSHEETPAGEW_2, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_0 { + pub pszTemplate: windows_sys::core::PCWSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_2 { + pub hbmHeader: super::super::Graphics::Gdi::HBITMAP, + pub pszbmHeader: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEW_V1 { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEW_V1_0, + pub Anonymous2: PROPSHEETPAGEW_V1_1, + pub pszTitle: windows_sys::core::PCWSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKW, + pub pcRefParent: *mut u32, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_V1_0 { + pub pszTemplate: windows_sys::core::PCWSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V1_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_V1_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V1_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEW_V2 { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEW_V2_0, + pub Anonymous2: PROPSHEETPAGEW_V2_1, + pub pszTitle: windows_sys::core::PCWSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKW, + pub pcRefParent: *mut u32, + pub pszHeaderTitle: windows_sys::core::PCWSTR, + pub pszHeaderSubTitle: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_V2_0 { + pub pszTemplate: windows_sys::core::PCWSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V2_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_V2_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V2_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub struct PROPSHEETPAGEW_V3 { + pub dwSize: u32, + pub dwFlags: u32, + pub hInstance: super::super::Foundation::HINSTANCE, + pub Anonymous1: PROPSHEETPAGEW_V3_0, + pub Anonymous2: PROPSHEETPAGEW_V3_1, + pub pszTitle: windows_sys::core::PCWSTR, + pub pfnDlgProc: super::WindowsAndMessaging::DLGPROC, + pub lParam: super::super::Foundation::LPARAM, + pub pfnCallback: LPFNPSPCALLBACKW, + pub pcRefParent: *mut u32, + pub pszHeaderTitle: windows_sys::core::PCWSTR, + pub pszHeaderSubTitle: windows_sys::core::PCWSTR, + pub hActCtx: super::super::Foundation::HANDLE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V3 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_V3_0 { + pub pszTemplate: windows_sys::core::PCWSTR, + pub pResource: *mut super::WindowsAndMessaging::DLGTEMPLATE, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V3_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +#[derive(Clone, Copy)] +pub union PROPSHEETPAGEW_V3_1 { + pub hIcon: super::WindowsAndMessaging::HICON, + pub pszIcon: windows_sys::core::PCWSTR, +} +#[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] +impl Default for PROPSHEETPAGEW_V3_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const PROP_LG_CXDLG: u32 = 252u32; +pub const PROP_LG_CYDLG: u32 = 218u32; +pub const PROP_MED_CXDLG: u32 = 227u32; +pub const PROP_MED_CYDLG: u32 = 215u32; +pub const PROP_SM_CXDLG: u32 = 212u32; +pub const PROP_SM_CYDLG: u32 = 188u32; +pub const PSBTN_APPLYNOW: u32 = 4u32; +pub const PSBTN_BACK: u32 = 0u32; +pub const PSBTN_CANCEL: u32 = 5u32; +pub const PSBTN_FINISH: u32 = 2u32; +pub const PSBTN_HELP: u32 = 6u32; +pub const PSBTN_MAX: u32 = 6u32; +pub const PSBTN_NEXT: u32 = 1u32; +pub const PSBTN_OK: u32 = 3u32; +pub const PSCB_BUTTONPRESSED: u32 = 3u32; +pub const PSCB_INITIALIZED: u32 = 1u32; +pub const PSCB_PRECREATE: u32 = 2u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct PSHNOTIFY { + pub hdr: NMHDR, + pub lParam: super::super::Foundation::LPARAM, +} +pub const PSH_AEROWIZARD: u32 = 16384u32; +pub const PSH_DEFAULT: u32 = 0u32; +pub const PSH_HASHELP: u32 = 512u32; +pub const PSH_HEADER: u32 = 524288u32; +pub const PSH_HEADERBITMAP: u32 = 134217728u32; +pub const PSH_MODELESS: u32 = 1024u32; +pub const PSH_NOAPPLYNOW: u32 = 128u32; +pub const PSH_NOCONTEXTHELP: u32 = 33554432u32; +pub const PSH_NOMARGIN: u32 = 268435456u32; +pub const PSH_PROPSHEETPAGE: u32 = 8u32; +pub const PSH_PROPTITLE: u32 = 1u32; +pub const PSH_RESIZABLE: u32 = 67108864u32; +pub const PSH_RTLREADING: u32 = 2048u32; +pub const PSH_STRETCHWATERMARK: u32 = 262144u32; +pub const PSH_USECALLBACK: u32 = 256u32; +pub const PSH_USEHBMHEADER: u32 = 1048576u32; +pub const PSH_USEHBMWATERMARK: u32 = 65536u32; +pub const PSH_USEHICON: u32 = 2u32; +pub const PSH_USEHPLWATERMARK: u32 = 131072u32; +pub const PSH_USEICONID: u32 = 4u32; +pub const PSH_USEPAGELANG: u32 = 2097152u32; +pub const PSH_USEPSTARTPAGE: u32 = 64u32; +pub const PSH_WATERMARK: u32 = 32768u32; +pub const PSH_WIZARD: u32 = 32u32; +pub const PSH_WIZARD97: u32 = 8192u32; +pub const PSH_WIZARDCONTEXTHELP: u32 = 4096u32; +pub const PSH_WIZARDHASFINISH: u32 = 16u32; +pub const PSH_WIZARD_LITE: u32 = 4194304u32; +pub const PSM_ADDPAGE: u32 = 1127u32; +pub const PSM_APPLY: u32 = 1134u32; +pub const PSM_CANCELTOCLOSE: u32 = 1131u32; +pub const PSM_CHANGED: u32 = 1128u32; +pub const PSM_ENABLEWIZBUTTONS: u32 = 1163u32; +pub const PSM_GETCURRENTPAGEHWND: u32 = 1142u32; +pub const PSM_GETRESULT: u32 = 1159u32; +pub const PSM_GETTABCONTROL: u32 = 1140u32; +pub const PSM_HWNDTOINDEX: u32 = 1153u32; +pub const PSM_IDTOINDEX: u32 = 1157u32; +pub const PSM_INDEXTOHWND: u32 = 1154u32; +pub const PSM_INDEXTOID: u32 = 1158u32; +pub const PSM_INDEXTOPAGE: u32 = 1156u32; +pub const PSM_INSERTPAGE: u32 = 1143u32; +pub const PSM_ISDIALOGMESSAGE: u32 = 1141u32; +pub const PSM_PAGETOINDEX: u32 = 1155u32; +pub const PSM_PRESSBUTTON: u32 = 1137u32; +pub const PSM_QUERYSIBLINGS: u32 = 1132u32; +pub const PSM_REBOOTSYSTEM: u32 = 1130u32; +pub const PSM_RECALCPAGESIZES: u32 = 1160u32; +pub const PSM_REMOVEPAGE: u32 = 1126u32; +pub const PSM_RESTARTWINDOWS: u32 = 1129u32; +pub const PSM_SETBUTTONTEXT: u32 = 1164u32; +pub const PSM_SETBUTTONTEXTW: u32 = 1164u32; +pub const PSM_SETCURSEL: u32 = 1125u32; +pub const PSM_SETCURSELID: u32 = 1138u32; +pub const PSM_SETFINISHTEXT: u32 = 1145u32; +pub const PSM_SETFINISHTEXTA: u32 = 1139u32; +pub const PSM_SETFINISHTEXTW: u32 = 1145u32; +pub const PSM_SETHEADERSUBTITLE: u32 = 1152u32; +pub const PSM_SETHEADERSUBTITLEA: u32 = 1151u32; +pub const PSM_SETHEADERSUBTITLEW: u32 = 1152u32; +pub const PSM_SETHEADERTITLE: u32 = 1150u32; +pub const PSM_SETHEADERTITLEA: u32 = 1149u32; +pub const PSM_SETHEADERTITLEW: u32 = 1150u32; +pub const PSM_SETNEXTTEXT: u32 = 1161u32; +pub const PSM_SETNEXTTEXTW: u32 = 1161u32; +pub const PSM_SETTITLE: u32 = 1144u32; +pub const PSM_SETTITLEA: u32 = 1135u32; +pub const PSM_SETTITLEW: u32 = 1144u32; +pub const PSM_SETWIZBUTTONS: u32 = 1136u32; +pub const PSM_SHOWWIZBUTTONS: u32 = 1162u32; +pub const PSM_UNCHANGED: u32 = 1133u32; +pub const PSNRET_INVALID: u32 = 1u32; +pub const PSNRET_INVALID_NOCHANGEPAGE: u32 = 2u32; +pub const PSNRET_MESSAGEHANDLED: u32 = 3u32; +pub const PSNRET_NOERROR: u32 = 0u32; +pub const PSN_APPLY: u32 = 4294967094u32; +pub const PSN_FIRST: u32 = 4294967096u32; +pub const PSN_GETOBJECT: u32 = 4294967086u32; +pub const PSN_HELP: u32 = 4294967091u32; +pub const PSN_KILLACTIVE: u32 = 4294967095u32; +pub const PSN_LAST: u32 = 4294966997u32; +pub const PSN_QUERYCANCEL: u32 = 4294967087u32; +pub const PSN_QUERYINITIALFOCUS: u32 = 4294967083u32; +pub const PSN_RESET: u32 = 4294967093u32; +pub const PSN_SETACTIVE: u32 = 4294967096u32; +pub const PSN_TRANSLATEACCELERATOR: u32 = 4294967084u32; +pub const PSN_WIZBACK: u32 = 4294967090u32; +pub const PSN_WIZFINISH: u32 = 4294967088u32; +pub const PSN_WIZNEXT: u32 = 4294967089u32; +pub const PSPCB_ADDREF: PSPCB_MESSAGE = 0u32; +pub const PSPCB_CREATE: PSPCB_MESSAGE = 2u32; +pub type PSPCB_MESSAGE = u32; +pub const PSPCB_RELEASE: PSPCB_MESSAGE = 1u32; +pub const PSPCB_SI_INITDIALOG: PSPCB_MESSAGE = 1025u32; +pub const PSP_DEFAULT: u32 = 0u32; +pub const PSP_DLGINDIRECT: u32 = 1u32; +pub const PSP_HASHELP: u32 = 32u32; +pub const PSP_HIDEHEADER: u32 = 2048u32; +pub const PSP_PREMATURE: u32 = 1024u32; +pub const PSP_RTLREADING: u32 = 16u32; +pub const PSP_USECALLBACK: u32 = 128u32; +pub const PSP_USEFUSIONCONTEXT: u32 = 16384u32; +pub const PSP_USEHEADERSUBTITLE: u32 = 8192u32; +pub const PSP_USEHEADERTITLE: u32 = 4096u32; +pub const PSP_USEHICON: u32 = 2u32; +pub const PSP_USEICONID: u32 = 4u32; +pub const PSP_USEREFPARENT: u32 = 64u32; +pub const PSP_USETITLE: u32 = 8u32; +pub const PSWIZBF_ELEVATIONREQUIRED: u32 = 1u32; +pub const PSWIZB_BACK: u32 = 1u32; +pub const PSWIZB_CANCEL: u32 = 16u32; +pub const PSWIZB_DISABLEDFINISH: u32 = 8u32; +pub const PSWIZB_FINISH: u32 = 4u32; +pub const PSWIZB_NEXT: u32 = 2u32; +pub const PSWIZB_RESTORE: u32 = 1u32; +pub const PSWIZB_SHOW: u32 = 0u32; +pub type PUSHBUTTONDROPDOWNSTATES = i32; +pub type PUSHBUTTONSTATES = i32; +pub type RADIOBUTTONSTATES = i32; +pub const RBAB_ADDBAND: u32 = 2u32; +pub const RBAB_AUTOSIZE: u32 = 1u32; +pub const RBBIM_BACKGROUND: u32 = 128u32; +pub const RBBIM_CHEVRONLOCATION: u32 = 4096u32; +pub const RBBIM_CHEVRONSTATE: u32 = 8192u32; +pub const RBBIM_CHILD: u32 = 16u32; +pub const RBBIM_CHILDSIZE: u32 = 32u32; +pub const RBBIM_COLORS: u32 = 2u32; +pub const RBBIM_HEADERSIZE: u32 = 2048u32; +pub const RBBIM_ID: u32 = 256u32; +pub const RBBIM_IDEALSIZE: u32 = 512u32; +pub const RBBIM_IMAGE: u32 = 8u32; +pub const RBBIM_LPARAM: u32 = 1024u32; +pub const RBBIM_SIZE: u32 = 64u32; +pub const RBBIM_STYLE: u32 = 1u32; +pub const RBBIM_TEXT: u32 = 4u32; +pub const RBBS_BREAK: u32 = 1u32; +pub const RBBS_CHILDEDGE: u32 = 4u32; +pub const RBBS_FIXEDBMP: u32 = 32u32; +pub const RBBS_FIXEDSIZE: u32 = 2u32; +pub const RBBS_GRIPPERALWAYS: u32 = 128u32; +pub const RBBS_HIDDEN: u32 = 8u32; +pub const RBBS_HIDETITLE: u32 = 1024u32; +pub const RBBS_NOGRIPPER: u32 = 256u32; +pub const RBBS_NOVERT: u32 = 16u32; +pub const RBBS_TOPALIGN: u32 = 2048u32; +pub const RBBS_USECHEVRON: u32 = 512u32; +pub const RBBS_VARIABLEHEIGHT: u32 = 64u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RBHITTESTINFO { + pub pt: super::super::Foundation::POINT, + pub flags: u32, + pub iBand: i32, +} +pub const RBHT_CAPTION: u32 = 2u32; +pub const RBHT_CHEVRON: u32 = 8u32; +pub const RBHT_CLIENT: u32 = 3u32; +pub const RBHT_GRABBER: u32 = 4u32; +pub const RBHT_NOWHERE: u32 = 1u32; +pub const RBHT_SPLITTER: u32 = 16u32; +pub const RBIM_IMAGELIST: u32 = 1u32; +pub const RBNM_ID: NMREBAR_MASK_FLAGS = 1u32; +pub const RBNM_LPARAM: NMREBAR_MASK_FLAGS = 4u32; +pub const RBNM_STYLE: NMREBAR_MASK_FLAGS = 2u32; +pub const RBN_AUTOBREAK: u32 = 4294966443u32; +pub const RBN_AUTOSIZE: u32 = 4294966462u32; +pub const RBN_BEGINDRAG: u32 = 4294966461u32; +pub const RBN_CHEVRONPUSHED: u32 = 4294966455u32; +pub const RBN_CHILDSIZE: u32 = 4294966457u32; +pub const RBN_DELETEDBAND: u32 = 4294966458u32; +pub const RBN_DELETINGBAND: u32 = 4294966459u32; +pub const RBN_ENDDRAG: u32 = 4294966460u32; +pub const RBN_FIRST: u32 = 4294966465u32; +pub const RBN_GETOBJECT: u32 = 4294966464u32; +pub const RBN_HEIGHTCHANGE: u32 = 4294966465u32; +pub const RBN_LAST: u32 = 4294966437u32; +pub const RBN_LAYOUTCHANGED: u32 = 4294966463u32; +pub const RBN_MINMAX: u32 = 4294966444u32; +pub const RBN_SPLITTERDRAG: u32 = 4294966454u32; +pub const RBSTR_CHANGERECT: u32 = 1u32; +pub const RBS_AUTOSIZE: u32 = 8192u32; +pub const RBS_BANDBORDERS: u32 = 1024u32; +pub const RBS_CHECKEDDISABLED: RADIOBUTTONSTATES = 8i32; +pub const RBS_CHECKEDHOT: RADIOBUTTONSTATES = 6i32; +pub const RBS_CHECKEDNORMAL: RADIOBUTTONSTATES = 5i32; +pub const RBS_CHECKEDPRESSED: RADIOBUTTONSTATES = 7i32; +pub const RBS_DBLCLKTOGGLE: u32 = 32768u32; +pub const RBS_DISABLED: RESTOREBUTTONSTATES = 4i32; +pub const RBS_FIXEDORDER: u32 = 2048u32; +pub const RBS_HOT: RESTOREBUTTONSTATES = 2i32; +pub const RBS_NORMAL: RESTOREBUTTONSTATES = 1i32; +pub const RBS_PUSHED: RESTOREBUTTONSTATES = 3i32; +pub const RBS_REGISTERDROP: u32 = 4096u32; +pub const RBS_TOOLTIPS: u32 = 256u32; +pub const RBS_UNCHECKEDDISABLED: RADIOBUTTONSTATES = 4i32; +pub const RBS_UNCHECKEDHOT: RADIOBUTTONSTATES = 2i32; +pub const RBS_UNCHECKEDNORMAL: RADIOBUTTONSTATES = 1i32; +pub const RBS_UNCHECKEDPRESSED: RADIOBUTTONSTATES = 3i32; +pub const RBS_VARHEIGHT: u32 = 512u32; +pub const RBS_VERTICALGRIPPER: u32 = 16384u32; +pub const RB_BEGINDRAG: u32 = 1048u32; +pub const RB_DELETEBAND: u32 = 1026u32; +pub const RB_DRAGMOVE: u32 = 1050u32; +pub const RB_ENDDRAG: u32 = 1049u32; +pub const RB_GETBANDBORDERS: u32 = 1058u32; +pub const RB_GETBANDCOUNT: u32 = 1036u32; +pub const RB_GETBANDINFO: u32 = 1052u32; +pub const RB_GETBANDINFOA: u32 = 1053u32; +pub const RB_GETBANDINFOW: u32 = 1052u32; +pub const RB_GETBANDMARGINS: u32 = 1064u32; +pub const RB_GETBARHEIGHT: u32 = 1051u32; +pub const RB_GETBARINFO: u32 = 1027u32; +pub const RB_GETBKCOLOR: u32 = 1044u32; +pub const RB_GETCOLORSCHEME: u32 = 8195u32; +pub const RB_GETDROPTARGET: u32 = 8196u32; +pub const RB_GETEXTENDEDSTYLE: u32 = 1066u32; +pub const RB_GETPALETTE: u32 = 1062u32; +pub const RB_GETRECT: u32 = 1033u32; +pub const RB_GETROWCOUNT: u32 = 1037u32; +pub const RB_GETROWHEIGHT: u32 = 1038u32; +pub const RB_GETTEXTCOLOR: u32 = 1046u32; +pub const RB_GETTOOLTIPS: u32 = 1041u32; +pub const RB_GETUNICODEFORMAT: u32 = 8198u32; +pub const RB_HITTEST: u32 = 1032u32; +pub const RB_IDTOINDEX: u32 = 1040u32; +pub const RB_INSERTBAND: u32 = 1034u32; +pub const RB_INSERTBANDA: u32 = 1025u32; +pub const RB_INSERTBANDW: u32 = 1034u32; +pub const RB_MAXIMIZEBAND: u32 = 1055u32; +pub const RB_MINIMIZEBAND: u32 = 1054u32; +pub const RB_MOVEBAND: u32 = 1063u32; +pub const RB_PUSHCHEVRON: u32 = 1067u32; +pub const RB_SETBANDINFO: u32 = 1035u32; +pub const RB_SETBANDINFOA: u32 = 1030u32; +pub const RB_SETBANDINFOW: u32 = 1035u32; +pub const RB_SETBANDWIDTH: u32 = 1068u32; +pub const RB_SETBARINFO: u32 = 1028u32; +pub const RB_SETBKCOLOR: u32 = 1043u32; +pub const RB_SETCOLORSCHEME: u32 = 8194u32; +pub const RB_SETEXTENDEDSTYLE: u32 = 1065u32; +pub const RB_SETPALETTE: u32 = 1061u32; +pub const RB_SETPARENT: u32 = 1031u32; +pub const RB_SETTEXTCOLOR: u32 = 1045u32; +pub const RB_SETTOOLTIPS: u32 = 1042u32; +pub const RB_SETUNICODEFORMAT: u32 = 8197u32; +pub const RB_SETWINDOWTHEME: u32 = 8203u32; +pub const RB_SHOWBAND: u32 = 1059u32; +pub const RB_SIZETORECT: u32 = 1047u32; +pub type READONLYSTATES = i32; +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct REBARBANDINFOA { + pub cbSize: u32, + pub fMask: u32, + pub fStyle: u32, + pub clrFore: super::super::Foundation::COLORREF, + pub clrBack: super::super::Foundation::COLORREF, + pub lpText: windows_sys::core::PSTR, + pub cch: u32, + pub iImage: i32, + pub hwndChild: super::super::Foundation::HWND, + pub cxMinChild: u32, + pub cyMinChild: u32, + pub cx: u32, + pub hbmBack: super::super::Graphics::Gdi::HBITMAP, + pub wID: u32, + pub cyChild: u32, + pub cyMaxChild: u32, + pub cyIntegral: u32, + pub cxIdeal: u32, + pub lParam: super::super::Foundation::LPARAM, + pub cxHeader: u32, + pub rcChevronLocation: super::super::Foundation::RECT, + pub uChevronState: u32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for REBARBANDINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_Graphics_Gdi")] +#[derive(Clone, Copy)] +pub struct REBARBANDINFOW { + pub cbSize: u32, + pub fMask: u32, + pub fStyle: u32, + pub clrFore: super::super::Foundation::COLORREF, + pub clrBack: super::super::Foundation::COLORREF, + pub lpText: windows_sys::core::PWSTR, + pub cch: u32, + pub iImage: i32, + pub hwndChild: super::super::Foundation::HWND, + pub cxMinChild: u32, + pub cyMinChild: u32, + pub cx: u32, + pub hbmBack: super::super::Graphics::Gdi::HBITMAP, + pub wID: u32, + pub cyChild: u32, + pub cyMaxChild: u32, + pub cyIntegral: u32, + pub cxIdeal: u32, + pub lParam: super::super::Foundation::LPARAM, + pub cxHeader: u32, + pub rcChevronLocation: super::super::Foundation::RECT, + pub uChevronState: u32, +} +#[cfg(feature = "Win32_Graphics_Gdi")] +impl Default for REBARBANDINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const REBARCLASSNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("ReBarWindow32"); +pub const REBARCLASSNAMEA: windows_sys::core::PCSTR = windows_sys::core::s!("ReBarWindow32"); +pub const REBARCLASSNAMEW: windows_sys::core::PCWSTR = windows_sys::core::w!("ReBarWindow32"); +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct REBARINFO { + pub cbSize: u32, + pub fMask: u32, + pub himl: HIMAGELIST, +} +pub type REBARPARTS = i32; +pub const REPLACEDLGORD: u32 = 1541u32; +pub type RESTOREBUTTONSTATES = i32; +pub const RP_BACKGROUND: REBARPARTS = 6i32; +pub const RP_BAND: REBARPARTS = 3i32; +pub const RP_CHEVRON: REBARPARTS = 4i32; +pub const RP_CHEVRONVERT: REBARPARTS = 5i32; +pub const RP_GRIPPER: REBARPARTS = 1i32; +pub const RP_GRIPPERVERT: REBARPARTS = 2i32; +pub const RP_SPLITTER: REBARPARTS = 7i32; +pub const RP_SPLITTERVERT: REBARPARTS = 8i32; +pub const RUNDLGORD: u32 = 1545u32; +pub const SBARS_SIZEGRIP: u32 = 256u32; +pub const SBARS_TOOLTIPS: u32 = 2048u32; +pub const SBN_FIRST: u32 = 4294966416u32; +pub const SBN_LAST: u32 = 4294966397u32; +pub const SBN_SIMPLEMODECHANGE: u32 = 4294966416u32; +pub const SBP_ARROWBTN: SCROLLBARPARTS = 1i32; +pub const SBP_GRIPPERHORZ: SCROLLBARPARTS = 8i32; +pub const SBP_GRIPPERVERT: SCROLLBARPARTS = 9i32; +pub const SBP_LOWERTRACKHORZ: SCROLLBARPARTS = 4i32; +pub const SBP_LOWERTRACKVERT: SCROLLBARPARTS = 6i32; +pub const SBP_SIZEBOX: SCROLLBARPARTS = 10i32; +pub const SBP_SIZEBOXBKGND: SCROLLBARPARTS = 11i32; +pub const SBP_THUMBBTNHORZ: SCROLLBARPARTS = 2i32; +pub const SBP_THUMBBTNVERT: SCROLLBARPARTS = 3i32; +pub const SBP_UPPERTRACKHORZ: SCROLLBARPARTS = 5i32; +pub const SBP_UPPERTRACKVERT: SCROLLBARPARTS = 7i32; +pub const SBS_DISABLED: SYSBUTTONSTATES = 4i32; +pub const SBS_HOT: SYSBUTTONSTATES = 2i32; +pub const SBS_NORMAL: SYSBUTTONSTATES = 1i32; +pub const SBS_PUSHED: SYSBUTTONSTATES = 3i32; +pub const SBT_NOBORDERS: u32 = 256u32; +pub const SBT_NOTABPARSING: u32 = 2048u32; +pub const SBT_OWNERDRAW: u32 = 4096u32; +pub const SBT_POPOUT: u32 = 512u32; +pub const SBT_RTLREADING: u32 = 1024u32; +pub const SBT_TOOLTIPS: u32 = 2048u32; +pub const SB_GETBORDERS: u32 = 1031u32; +pub const SB_GETICON: u32 = 1044u32; +pub const SB_GETPARTS: u32 = 1030u32; +pub const SB_GETRECT: u32 = 1034u32; +pub const SB_GETTEXT: u32 = 1037u32; +pub const SB_GETTEXTA: u32 = 1026u32; +pub const SB_GETTEXTLENGTH: u32 = 1036u32; +pub const SB_GETTEXTLENGTHA: u32 = 1027u32; +pub const SB_GETTEXTLENGTHW: u32 = 1036u32; +pub const SB_GETTEXTW: u32 = 1037u32; +pub const SB_GETTIPTEXTA: u32 = 1042u32; +pub const SB_GETTIPTEXTW: u32 = 1043u32; +pub const SB_GETUNICODEFORMAT: u32 = 8198u32; +pub const SB_ISSIMPLE: u32 = 1038u32; +pub const SB_SETBKCOLOR: u32 = 8193u32; +pub const SB_SETICON: u32 = 1039u32; +pub const SB_SETMINHEIGHT: u32 = 1032u32; +pub const SB_SETPARTS: u32 = 1028u32; +pub const SB_SETTEXT: u32 = 1035u32; +pub const SB_SETTEXTA: u32 = 1025u32; +pub const SB_SETTEXTW: u32 = 1035u32; +pub const SB_SETTIPTEXTA: u32 = 1040u32; +pub const SB_SETTIPTEXTW: u32 = 1041u32; +pub const SB_SETUNICODEFORMAT: u32 = 8197u32; +pub const SB_SIMPLE: u32 = 1033u32; +pub const SB_SIMPLEID: u32 = 255u32; +pub const SCBS_DISABLED: SMALLCLOSEBUTTONSTATES = 4i32; +pub const SCBS_HOT: SMALLCLOSEBUTTONSTATES = 2i32; +pub const SCBS_NORMAL: SMALLCLOSEBUTTONSTATES = 1i32; +pub const SCBS_PUSHED: SMALLCLOSEBUTTONSTATES = 3i32; +pub const SCRBS_DISABLED: SCROLLBARSTYLESTATES = 4i32; +pub const SCRBS_HOT: SCROLLBARSTYLESTATES = 2i32; +pub const SCRBS_HOVER: SCROLLBARSTYLESTATES = 5i32; +pub const SCRBS_NORMAL: SCROLLBARSTYLESTATES = 1i32; +pub const SCRBS_PRESSED: SCROLLBARSTYLESTATES = 3i32; +pub type SCROLLBARPARTS = i32; +pub type SCROLLBARSTYLESTATES = i32; +pub const SCS_ACTIVE: SMALLCAPTIONSTATES = 1i32; +pub const SCS_DISABLED: SMALLCAPTIONSTATES = 3i32; +pub const SCS_INACTIVE: SMALLCAPTIONSTATES = 2i32; +pub type SECTIONTITLELINKSTATES = i32; +pub type SET_THEME_APP_PROPERTIES_FLAGS = u32; +pub const SFRB_ACTIVE: SMALLFRAMEBOTTOMSTATES = 1i32; +pub const SFRB_INACTIVE: SMALLFRAMEBOTTOMSTATES = 2i32; +pub const SFRL_ACTIVE: SMALLFRAMELEFTSTATES = 1i32; +pub const SFRL_INACTIVE: SMALLFRAMELEFTSTATES = 2i32; +pub const SFRR_ACTIVE: SMALLFRAMERIGHTSTATES = 1i32; +pub const SFRR_INACTIVE: SMALLFRAMERIGHTSTATES = 2i32; +pub type SHOWCALENDARBUTTONRIGHTSTATES = i32; +pub type SIZEBOXSTATES = i32; +pub type SIZINGTYPE = i32; +pub type SMALLCAPTIONSTATES = i32; +pub type SMALLCLOSEBUTTONSTATES = i32; +pub type SMALLFRAMEBOTTOMSTATES = i32; +pub type SMALLFRAMELEFTSTATES = i32; +pub type SMALLFRAMERIGHTSTATES = i32; +pub type SOFTWAREEXPLORERSTATES = i32; +pub type SPECIALGROUPCOLLAPSESTATES = i32; +pub type SPECIALGROUPEXPANDSTATES = i32; +pub type SPINPARTS = i32; +pub const SPLITSV_HOT: SPLITTERVERTSTATES = 2i32; +pub const SPLITSV_NORMAL: SPLITTERVERTSTATES = 1i32; +pub const SPLITSV_PRESSED: SPLITTERVERTSTATES = 3i32; +pub const SPLITS_HOT: SPLITTERSTATES = 2i32; +pub const SPLITS_NORMAL: SPLITTERSTATES = 1i32; +pub const SPLITS_PRESSED: SPLITTERSTATES = 3i32; +pub type SPLITTERSTATES = i32; +pub type SPLITTERVERTSTATES = i32; +pub const SPLS_HOT: LOGOFFBUTTONSSTATES = 2i32; +pub const SPLS_NORMAL: LOGOFFBUTTONSSTATES = 1i32; +pub const SPLS_PRESSED: LOGOFFBUTTONSSTATES = 3i32; +pub const SPMPT_DISABLED: MOREPROGRAMSTABSTATES = 4i32; +pub const SPMPT_FOCUSED: MOREPROGRAMSTABSTATES = 5i32; +pub const SPMPT_HOT: MOREPROGRAMSTABSTATES = 2i32; +pub const SPMPT_NORMAL: MOREPROGRAMSTABSTATES = 1i32; +pub const SPMPT_SELECTED: MOREPROGRAMSTABSTATES = 3i32; +pub const SPNP_DOWN: SPINPARTS = 2i32; +pub const SPNP_DOWNHORZ: SPINPARTS = 4i32; +pub const SPNP_UP: SPINPARTS = 1i32; +pub const SPNP_UPHORZ: SPINPARTS = 3i32; +pub const SPOB_DISABLED: OPENBOXSTATES = 4i32; +pub const SPOB_FOCUSED: OPENBOXSTATES = 5i32; +pub const SPOB_HOT: OPENBOXSTATES = 2i32; +pub const SPOB_NORMAL: OPENBOXSTATES = 1i32; +pub const SPOB_SELECTED: OPENBOXSTATES = 3i32; +pub const SPP_LOGOFF: STARTPANELPARTS = 8i32; +pub const SPP_LOGOFFBUTTONS: STARTPANELPARTS = 9i32; +pub const SPP_LOGOFFSPLITBUTTONDROPDOWN: STARTPANELPARTS = 19i32; +pub const SPP_MOREPROGRAMS: STARTPANELPARTS = 2i32; +pub const SPP_MOREPROGRAMSARROW: STARTPANELPARTS = 3i32; +pub const SPP_MOREPROGRAMSARROWBACK: STARTPANELPARTS = 17i32; +pub const SPP_MOREPROGRAMSTAB: STARTPANELPARTS = 12i32; +pub const SPP_NSCHOST: STARTPANELPARTS = 13i32; +pub const SPP_OPENBOX: STARTPANELPARTS = 15i32; +pub const SPP_PLACESLIST: STARTPANELPARTS = 6i32; +pub const SPP_PLACESLISTSEPARATOR: STARTPANELPARTS = 7i32; +pub const SPP_PREVIEW: STARTPANELPARTS = 11i32; +pub const SPP_PROGLIST: STARTPANELPARTS = 4i32; +pub const SPP_PROGLISTSEPARATOR: STARTPANELPARTS = 5i32; +pub const SPP_SEARCHVIEW: STARTPANELPARTS = 16i32; +pub const SPP_SOFTWAREEXPLORER: STARTPANELPARTS = 14i32; +pub const SPP_TOPMATCH: STARTPANELPARTS = 18i32; +pub const SPP_USERPANE: STARTPANELPARTS = 1i32; +pub const SPP_USERPICTURE: STARTPANELPARTS = 10i32; +pub const SPSB_HOT: MOREPROGRAMSARROWBACKSTATES = 2i32; +pub const SPSB_NORMAL: MOREPROGRAMSARROWBACKSTATES = 1i32; +pub const SPSB_PRESSED: MOREPROGRAMSARROWBACKSTATES = 3i32; +pub const SPSE_DISABLED: SOFTWAREEXPLORERSTATES = 4i32; +pub const SPSE_FOCUSED: SOFTWAREEXPLORERSTATES = 5i32; +pub const SPSE_HOT: SOFTWAREEXPLORERSTATES = 2i32; +pub const SPSE_NORMAL: SOFTWAREEXPLORERSTATES = 1i32; +pub const SPSE_SELECTED: SOFTWAREEXPLORERSTATES = 3i32; +pub const SPS_HOT: MOREPROGRAMSARROWSTATES = 2i32; +pub const SPS_NORMAL: MOREPROGRAMSARROWSTATES = 1i32; +pub const SPS_PRESSED: MOREPROGRAMSARROWSTATES = 3i32; +pub const SP_GRIPPER: STATUSPARTS = 3i32; +pub const SP_GRIPPERPANE: STATUSPARTS = 2i32; +pub const SP_PANE: STATUSPARTS = 1i32; +pub type STANDARDSTATES = i32; +pub type STARTPANELPARTS = i32; +pub const STATE_SYSTEM_FOCUSABLE: COMBOBOXINFO_BUTTON_STATE = 1048576u32; +pub const STATE_SYSTEM_INVISIBLE: COMBOBOXINFO_BUTTON_STATE = 32768u32; +pub const STATE_SYSTEM_OFFSCREEN: COMBOBOXINFO_BUTTON_STATE = 65536u32; +pub const STATE_SYSTEM_PRESSED: COMBOBOXINFO_BUTTON_STATE = 8u32; +pub const STATE_SYSTEM_UNAVAILABLE: COMBOBOXINFO_BUTTON_STATE = 1u32; +pub type STATICPARTS = i32; +pub const STATUSCLASSNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_statusbar32"); +pub const STATUSCLASSNAMEA: windows_sys::core::PCSTR = windows_sys::core::s!("msctls_statusbar32"); +pub const STATUSCLASSNAMEW: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_statusbar32"); +pub type STATUSPARTS = i32; +pub const STAT_TEXT: STATICPARTS = 1i32; +pub const STD_COPY: u32 = 1u32; +pub const STD_CUT: u32 = 0u32; +pub const STD_DELETE: u32 = 5u32; +pub const STD_FILENEW: u32 = 6u32; +pub const STD_FILEOPEN: u32 = 7u32; +pub const STD_FILESAVE: u32 = 8u32; +pub const STD_FIND: u32 = 12u32; +pub const STD_HELP: u32 = 11u32; +pub const STD_PASTE: u32 = 2u32; +pub const STD_PRINT: u32 = 14u32; +pub const STD_PRINTPRE: u32 = 9u32; +pub const STD_PROPERTIES: u32 = 10u32; +pub const STD_REDOW: u32 = 4u32; +pub const STD_REPLACE: u32 = 13u32; +pub const STD_UNDO: u32 = 3u32; +pub const ST_STRETCH: SIZINGTYPE = 1i32; +pub const ST_TILE: SIZINGTYPE = 2i32; +pub const ST_TRUESIZE: SIZINGTYPE = 0i32; +pub type SYSBUTTONSTATES = i32; +pub type SYSTEMCLOSEHCHOTSTATES = i32; +pub type SYSTEMCLOSESTATES = i32; +pub type SYSTEMMAXIMIZEHCHOTSTATES = i32; +pub type SYSTEMMAXIMIZESTATES = i32; +pub type SYSTEMMINIMIZEHCHOTSTATES = i32; +pub type SYSTEMMINIMIZESTATES = i32; +pub type SYSTEMRESTOREHCHOTSTATES = i32; +pub type SYSTEMRESTORESTATES = i32; +pub const SZB_HALFBOTTOMLEFTALIGN: SIZEBOXSTATES = 6i32; +pub const SZB_HALFBOTTOMRIGHTALIGN: SIZEBOXSTATES = 5i32; +pub const SZB_HALFTOPLEFTALIGN: SIZEBOXSTATES = 8i32; +pub const SZB_HALFTOPRIGHTALIGN: SIZEBOXSTATES = 7i32; +pub const SZB_LEFTALIGN: SIZEBOXSTATES = 2i32; +pub const SZB_RIGHTALIGN: SIZEBOXSTATES = 1i32; +pub const SZB_TOPLEFTALIGN: SIZEBOXSTATES = 4i32; +pub const SZB_TOPRIGHTALIGN: SIZEBOXSTATES = 3i32; +pub const SZ_THDOCPROP_AUTHOR: windows_sys::core::PCWSTR = windows_sys::core::w!("author"); +pub const SZ_THDOCPROP_CANONICALNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("ThemeName"); +pub const SZ_THDOCPROP_DISPLAYNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("DisplayName"); +pub const SZ_THDOCPROP_TOOLTIP: windows_sys::core::PCWSTR = windows_sys::core::w!("ToolTip"); +pub type TABITEMBOTHEDGESTATES = i32; +pub type TABITEMLEFTEDGESTATES = i32; +pub type TABITEMRIGHTEDGESTATES = i32; +pub type TABITEMSTATES = i32; +pub type TABPARTS = i32; +pub const TABP_AEROWIZARDBODY: TABPARTS = 11i32; +pub const TABP_BODY: TABPARTS = 10i32; +pub const TABP_PANE: TABPARTS = 9i32; +pub const TABP_TABITEM: TABPARTS = 1i32; +pub const TABP_TABITEMBOTHEDGE: TABPARTS = 4i32; +pub const TABP_TABITEMLEFTEDGE: TABPARTS = 2i32; +pub const TABP_TABITEMRIGHTEDGE: TABPARTS = 3i32; +pub const TABP_TOPTABITEM: TABPARTS = 5i32; +pub const TABP_TOPTABITEMBOTHEDGE: TABPARTS = 8i32; +pub const TABP_TOPTABITEMLEFTEDGE: TABPARTS = 6i32; +pub const TABP_TOPTABITEMRIGHTEDGE: TABPARTS = 7i32; +pub type TABSTATES = i32; +pub type TAB_CONTROL_ITEM_STATE = u32; +pub const TAPF_ALLOWCOLLECTION: TA_PROPERTY_FLAG = 4i32; +pub const TAPF_HASBACKGROUND: TA_PROPERTY_FLAG = 8i32; +pub const TAPF_HASPERSPECTIVE: TA_PROPERTY_FLAG = 16i32; +pub const TAPF_HASSTAGGER: TA_PROPERTY_FLAG = 1i32; +pub const TAPF_ISRTLAWARE: TA_PROPERTY_FLAG = 2i32; +pub const TAPF_NONE: TA_PROPERTY_FLAG = 0i32; +pub const TAP_FLAGS: TA_PROPERTY = 0i32; +pub const TAP_STAGGERDELAY: TA_PROPERTY = 2i32; +pub const TAP_STAGGERDELAYCAP: TA_PROPERTY = 3i32; +pub const TAP_STAGGERDELAYFACTOR: TA_PROPERTY = 4i32; +pub const TAP_TRANSFORMCOUNT: TA_PROPERTY = 1i32; +pub const TAP_ZORDER: TA_PROPERTY = 5i32; +pub type TASKBANDPARTS = i32; +pub type TASKBARPARTS = i32; +#[repr(C, packed(1))] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub struct TASKDIALOGCONFIG { + pub cbSize: u32, + pub hwndParent: super::super::Foundation::HWND, + pub hInstance: super::super::Foundation::HINSTANCE, + pub dwFlags: TASKDIALOG_FLAGS, + pub dwCommonButtons: TASKDIALOG_COMMON_BUTTON_FLAGS, + pub pszWindowTitle: windows_sys::core::PCWSTR, + pub Anonymous1: TASKDIALOGCONFIG_0, + pub pszMainInstruction: windows_sys::core::PCWSTR, + pub pszContent: windows_sys::core::PCWSTR, + pub cButtons: u32, + pub pButtons: *const TASKDIALOG_BUTTON, + pub nDefaultButton: i32, + pub cRadioButtons: u32, + pub pRadioButtons: *const TASKDIALOG_BUTTON, + pub nDefaultRadioButton: i32, + pub pszVerificationText: windows_sys::core::PCWSTR, + pub pszExpandedInformation: windows_sys::core::PCWSTR, + pub pszExpandedControlText: windows_sys::core::PCWSTR, + pub pszCollapsedControlText: windows_sys::core::PCWSTR, + pub Anonymous2: TASKDIALOGCONFIG_1, + pub pszFooter: windows_sys::core::PCWSTR, + pub pfCallback: PFTASKDIALOGCALLBACK, + pub lpCallbackData: isize, + pub cxWidth: u32, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for TASKDIALOGCONFIG { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub union TASKDIALOGCONFIG_0 { + pub hMainIcon: super::WindowsAndMessaging::HICON, + pub pszMainIcon: windows_sys::core::PCWSTR, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for TASKDIALOGCONFIG_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C, packed(1))] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub union TASKDIALOGCONFIG_1 { + pub hFooterIcon: super::WindowsAndMessaging::HICON, + pub pszFooterIcon: windows_sys::core::PCWSTR, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for TASKDIALOGCONFIG_1 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TASKDIALOGPARTS = i32; +#[repr(C, packed(1))] +#[derive(Clone, Copy)] +pub struct TASKDIALOG_BUTTON { + pub nButtonID: i32, + pub pszButtonText: windows_sys::core::PCWSTR, +} +impl Default for TASKDIALOG_BUTTON { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TASKDIALOG_COMMON_BUTTON_FLAGS = i32; +pub type TASKDIALOG_ELEMENTS = i32; +pub type TASKDIALOG_FLAGS = i32; +pub type TASKDIALOG_ICON_ELEMENTS = i32; +pub type TASKDIALOG_MESSAGES = i32; +pub type TASKDIALOG_NOTIFICATIONS = i32; +pub type TASKLINKSTATES = i32; +pub const TATF_HASINITIALVALUES: TA_TRANSFORM_FLAG = 2i32; +pub const TATF_HASORIGINVALUES: TA_TRANSFORM_FLAG = 4i32; +pub const TATF_NONE: TA_TRANSFORM_FLAG = 0i32; +pub const TATF_TARGETVALUES_USER: TA_TRANSFORM_FLAG = 1i32; +pub const TATT_CLIP: TA_TRANSFORM_TYPE = 3i32; +pub const TATT_OPACITY: TA_TRANSFORM_TYPE = 2i32; +pub const TATT_SCALE_2D: TA_TRANSFORM_TYPE = 1i32; +pub const TATT_TRANSLATE_2D: TA_TRANSFORM_TYPE = 0i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TA_CUBIC_BEZIER { + pub header: TA_TIMINGFUNCTION, + pub rX0: f32, + pub rY0: f32, + pub rX1: f32, + pub rY1: f32, +} +pub type TA_PROPERTY = i32; +pub type TA_PROPERTY_FLAG = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TA_TIMINGFUNCTION { + pub eTimingFunctionType: TA_TIMINGFUNCTION_TYPE, +} +pub type TA_TIMINGFUNCTION_TYPE = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TA_TRANSFORM { + pub eTransformType: TA_TRANSFORM_TYPE, + pub dwTimingFunctionId: u32, + pub dwStartTime: u32, + pub dwDurationTime: u32, + pub eFlags: TA_TRANSFORM_FLAG, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TA_TRANSFORM_2D { + pub header: TA_TRANSFORM, + pub rX: f32, + pub rY: f32, + pub rInitialX: f32, + pub rInitialY: f32, + pub rOriginX: f32, + pub rOriginY: f32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TA_TRANSFORM_CLIP { + pub header: TA_TRANSFORM, + pub rLeft: f32, + pub rTop: f32, + pub rRight: f32, + pub rBottom: f32, + pub rInitialLeft: f32, + pub rInitialTop: f32, + pub rInitialRight: f32, + pub rInitialBottom: f32, +} +pub type TA_TRANSFORM_FLAG = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TA_TRANSFORM_OPACITY { + pub header: TA_TRANSFORM, + pub rOpacity: f32, + pub rInitialOpacity: f32, +} +pub type TA_TRANSFORM_TYPE = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TBADDBITMAP { + pub hInst: super::super::Foundation::HINSTANCE, + pub nID: usize, +} +impl Default for TBADDBITMAP { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TBBF_LARGE: u32 = 1u32; +#[repr(C)] +#[cfg(target_arch = "x86")] +#[derive(Clone, Copy)] +pub struct TBBUTTON { + pub iBitmap: i32, + pub idCommand: i32, + pub fsState: u8, + pub fsStyle: u8, + pub bReserved: [u8; 2], + pub dwData: usize, + pub iString: isize, +} +#[cfg(target_arch = "x86")] +impl Default for TBBUTTON { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] +#[derive(Clone, Copy)] +pub struct TBBUTTON { + pub iBitmap: i32, + pub idCommand: i32, + pub fsState: u8, + pub fsStyle: u8, + pub bReserved: [u8; 6], + pub dwData: usize, + pub iString: isize, +} +#[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] +impl Default for TBBUTTON { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TBBUTTONINFOA { + pub cbSize: u32, + pub dwMask: TBBUTTONINFOW_MASK, + pub idCommand: i32, + pub iImage: i32, + pub fsState: u8, + pub fsStyle: u8, + pub cx: u16, + pub lParam: usize, + pub pszText: windows_sys::core::PSTR, + pub cchText: i32, +} +impl Default for TBBUTTONINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TBBUTTONINFOW { + pub cbSize: u32, + pub dwMask: TBBUTTONINFOW_MASK, + pub idCommand: i32, + pub iImage: i32, + pub fsState: u8, + pub fsStyle: u8, + pub cx: u16, + pub lParam: usize, + pub pszText: windows_sys::core::PWSTR, + pub cchText: i32, +} +impl Default for TBBUTTONINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TBBUTTONINFOW_MASK = u32; +pub const TBCDRF_BLENDICON: u32 = 2097152u32; +pub const TBCDRF_HILITEHOTTRACK: u32 = 131072u32; +pub const TBCDRF_NOBACKGROUND: u32 = 4194304u32; +pub const TBCDRF_NOEDGES: u32 = 65536u32; +pub const TBCDRF_NOETCHEDEFFECT: u32 = 1048576u32; +pub const TBCDRF_NOMARK: u32 = 524288u32; +pub const TBCDRF_NOOFFSET: u32 = 262144u32; +pub const TBCDRF_USECDCOLORS: u32 = 8388608u32; +pub const TBCD_CHANNEL: u32 = 3u32; +pub const TBCD_THUMB: u32 = 2u32; +pub const TBCD_TICS: u32 = 1u32; +pub const TBDDRET_DEFAULT: u32 = 0u32; +pub const TBDDRET_NODEFAULT: u32 = 1u32; +pub const TBDDRET_TREATPRESSED: u32 = 2u32; +pub const TBIF_BYINDEX: TBBUTTONINFOW_MASK = 2147483648u32; +pub const TBIF_COMMAND: TBBUTTONINFOW_MASK = 32u32; +pub const TBIF_IMAGE: TBBUTTONINFOW_MASK = 1u32; +pub const TBIF_LPARAM: TBBUTTONINFOW_MASK = 16u32; +pub const TBIF_SIZE: TBBUTTONINFOW_MASK = 64u32; +pub const TBIF_STATE: TBBUTTONINFOW_MASK = 4u32; +pub const TBIF_STYLE: TBBUTTONINFOW_MASK = 8u32; +pub const TBIF_TEXT: TBBUTTONINFOW_MASK = 2u32; +pub const TBIMHT_AFTER: TBINSERTMARK_FLAGS = 1u32; +pub const TBIMHT_BACKGROUND: TBINSERTMARK_FLAGS = 2u32; +pub const TBIMHT_NONE: TBINSERTMARK_FLAGS = 0u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TBINSERTMARK { + pub iButton: i32, + pub dwFlags: TBINSERTMARK_FLAGS, +} +pub type TBINSERTMARK_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TBMETRICS { + pub cbSize: u32, + pub dwMask: u32, + pub cxPad: i32, + pub cyPad: i32, + pub cxBarPad: i32, + pub cyBarPad: i32, + pub cxButtonSpacing: i32, + pub cyButtonSpacing: i32, +} +pub const TBMF_BARPAD: u32 = 2u32; +pub const TBMF_BUTTONSPACING: u32 = 4u32; +pub const TBMF_PAD: u32 = 1u32; +pub const TBM_CLEARSEL: u32 = 1043u32; +pub const TBM_CLEARTICS: u32 = 1033u32; +pub const TBM_GETBUDDY: u32 = 1057u32; +pub const TBM_GETCHANNELRECT: u32 = 1050u32; +pub const TBM_GETLINESIZE: u32 = 1048u32; +pub const TBM_GETNUMTICS: u32 = 1040u32; +pub const TBM_GETPAGESIZE: u32 = 1046u32; +pub const TBM_GETPTICS: u32 = 1038u32; +pub const TBM_GETRANGEMAX: u32 = 1026u32; +pub const TBM_GETRANGEMIN: u32 = 1025u32; +pub const TBM_GETSELEND: u32 = 1042u32; +pub const TBM_GETSELSTART: u32 = 1041u32; +pub const TBM_GETTHUMBLENGTH: u32 = 1052u32; +pub const TBM_GETTHUMBRECT: u32 = 1049u32; +pub const TBM_GETTIC: u32 = 1027u32; +pub const TBM_GETTICPOS: u32 = 1039u32; +pub const TBM_GETTOOLTIPS: u32 = 1054u32; +pub const TBM_GETUNICODEFORMAT: u32 = 8198u32; +pub const TBM_SETBUDDY: u32 = 1056u32; +pub const TBM_SETLINESIZE: u32 = 1047u32; +pub const TBM_SETPAGESIZE: u32 = 1045u32; +pub const TBM_SETPOS: u32 = 1029u32; +pub const TBM_SETPOSNOTIFY: u32 = 1058u32; +pub const TBM_SETRANGE: u32 = 1030u32; +pub const TBM_SETRANGEMAX: u32 = 1032u32; +pub const TBM_SETRANGEMIN: u32 = 1031u32; +pub const TBM_SETSEL: u32 = 1034u32; +pub const TBM_SETSELEND: u32 = 1036u32; +pub const TBM_SETSELSTART: u32 = 1035u32; +pub const TBM_SETTHUMBLENGTH: u32 = 1051u32; +pub const TBM_SETTIC: u32 = 1028u32; +pub const TBM_SETTICFREQ: u32 = 1044u32; +pub const TBM_SETTIPSIDE: u32 = 1055u32; +pub const TBM_SETTOOLTIPS: u32 = 1053u32; +pub const TBM_SETUNICODEFORMAT: u32 = 8197u32; +pub const TBNF_DI_SETITEM: NMTBDISPINFOW_MASK = 268435456u32; +pub const TBNF_IMAGE: NMTBDISPINFOW_MASK = 1u32; +pub const TBNF_TEXT: NMTBDISPINFOW_MASK = 2u32; +pub const TBNRF_ENDCUSTOMIZE: u32 = 2u32; +pub const TBNRF_HIDEHELP: u32 = 1u32; +pub const TBN_BEGINADJUST: u32 = 4294966593u32; +pub const TBN_BEGINDRAG: u32 = 4294966595u32; +pub const TBN_CUSTHELP: u32 = 4294966587u32; +pub const TBN_DELETINGBUTTON: u32 = 4294966581u32; +pub const TBN_DRAGOUT: u32 = 4294966582u32; +pub const TBN_DRAGOVER: u32 = 4294966569u32; +pub const TBN_DROPDOWN: u32 = 4294966586u32; +pub const TBN_DUPACCELERATOR: u32 = 4294966571u32; +pub const TBN_ENDADJUST: u32 = 4294966592u32; +pub const TBN_ENDDRAG: u32 = 4294966594u32; +pub const TBN_FIRST: u32 = 4294966596u32; +pub const TBN_GETBUTTONINFO: u32 = 4294966576u32; +pub const TBN_GETBUTTONINFOA: u32 = 4294966596u32; +pub const TBN_GETBUTTONINFOW: u32 = 4294966576u32; +pub const TBN_GETDISPINFO: u32 = 4294966579u32; +pub const TBN_GETDISPINFOA: u32 = 4294966580u32; +pub const TBN_GETDISPINFOW: u32 = 4294966579u32; +pub const TBN_GETINFOTIP: u32 = 4294966577u32; +pub const TBN_GETINFOTIPA: u32 = 4294966578u32; +pub const TBN_GETINFOTIPW: u32 = 4294966577u32; +pub const TBN_GETOBJECT: u32 = 4294966584u32; +pub const TBN_HOTITEMCHANGE: u32 = 4294966583u32; +pub const TBN_INITCUSTOMIZE: u32 = 4294966573u32; +pub const TBN_LAST: u32 = 4294966576u32; +pub const TBN_MAPACCELERATOR: u32 = 4294966568u32; +pub const TBN_QUERYDELETE: u32 = 4294966589u32; +pub const TBN_QUERYINSERT: u32 = 4294966590u32; +pub const TBN_RESET: u32 = 4294966591u32; +pub const TBN_RESTORE: u32 = 4294966575u32; +pub const TBN_SAVE: u32 = 4294966574u32; +pub const TBN_TOOLBARCHANGE: u32 = 4294966588u32; +pub const TBN_WRAPACCELERATOR: u32 = 4294966570u32; +pub const TBN_WRAPHOTITEM: u32 = 4294966572u32; +pub const TBP_BACKGROUNDBOTTOM: TASKBARPARTS = 1i32; +pub const TBP_BACKGROUNDLEFT: TASKBARPARTS = 4i32; +pub const TBP_BACKGROUNDRIGHT: TASKBARPARTS = 2i32; +pub const TBP_BACKGROUNDTOP: TASKBARPARTS = 3i32; +pub const TBP_SIZINGBARBOTTOM: TASKBARPARTS = 5i32; +pub const TBP_SIZINGBARLEFT: TASKBARPARTS = 8i32; +pub const TBP_SIZINGBARRIGHT: TASKBARPARTS = 6i32; +pub const TBP_SIZINGBARTOP: TASKBARPARTS = 7i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TBREPLACEBITMAP { + pub hInstOld: super::super::Foundation::HINSTANCE, + pub nIDOld: usize, + pub hInstNew: super::super::Foundation::HINSTANCE, + pub nIDNew: usize, + pub nButtons: i32, +} +impl Default for TBREPLACEBITMAP { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_System_Registry")] +#[derive(Clone, Copy)] +pub struct TBSAVEPARAMSA { + pub hkr: super::super::System::Registry::HKEY, + pub pszSubKey: windows_sys::core::PCSTR, + pub pszValueName: windows_sys::core::PCSTR, +} +#[cfg(feature = "Win32_System_Registry")] +impl Default for TBSAVEPARAMSA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_System_Registry")] +#[derive(Clone, Copy)] +pub struct TBSAVEPARAMSW { + pub hkr: super::super::System::Registry::HKEY, + pub pszSubKey: windows_sys::core::PCWSTR, + pub pszValueName: windows_sys::core::PCWSTR, +} +#[cfg(feature = "Win32_System_Registry")] +impl Default for TBSAVEPARAMSW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TBSTATE_CHECKED: u32 = 1u32; +pub const TBSTATE_ELLIPSES: u32 = 64u32; +pub const TBSTATE_ENABLED: u32 = 4u32; +pub const TBSTATE_HIDDEN: u32 = 8u32; +pub const TBSTATE_INDETERMINATE: u32 = 16u32; +pub const TBSTATE_MARKED: u32 = 128u32; +pub const TBSTATE_PRESSED: u32 = 2u32; +pub const TBSTATE_WRAP: u32 = 32u32; +pub const TBSTYLE_ALTDRAG: u32 = 1024u32; +pub const TBSTYLE_AUTOSIZE: u32 = 16u32; +pub const TBSTYLE_BUTTON: u32 = 0u32; +pub const TBSTYLE_CHECK: u32 = 2u32; +pub const TBSTYLE_CUSTOMERASE: u32 = 8192u32; +pub const TBSTYLE_DROPDOWN: u32 = 8u32; +pub const TBSTYLE_EX_DOUBLEBUFFER: u32 = 128u32; +pub const TBSTYLE_EX_DRAWDDARROWS: u32 = 1u32; +pub const TBSTYLE_EX_HIDECLIPPEDBUTTONS: u32 = 16u32; +pub const TBSTYLE_EX_MIXEDBUTTONS: u32 = 8u32; +pub const TBSTYLE_EX_MULTICOLUMN: u32 = 2u32; +pub const TBSTYLE_EX_VERTICAL: u32 = 4u32; +pub const TBSTYLE_FLAT: u32 = 2048u32; +pub const TBSTYLE_GROUP: u32 = 4u32; +pub const TBSTYLE_LIST: u32 = 4096u32; +pub const TBSTYLE_NOPREFIX: u32 = 32u32; +pub const TBSTYLE_REGISTERDROP: u32 = 16384u32; +pub const TBSTYLE_SEP: u32 = 1u32; +pub const TBSTYLE_TOOLTIPS: u32 = 256u32; +pub const TBSTYLE_TRANSPARENT: u32 = 32768u32; +pub const TBSTYLE_WRAPABLE: u32 = 512u32; +pub const TBS_AUTOTICKS: u32 = 1u32; +pub const TBS_BOTH: u32 = 8u32; +pub const TBS_BOTTOM: u32 = 0u32; +pub const TBS_DOWNISLEFT: u32 = 1024u32; +pub const TBS_ENABLESELRANGE: u32 = 32u32; +pub const TBS_FIXEDLENGTH: u32 = 64u32; +pub const TBS_HORZ: u32 = 0u32; +pub const TBS_LEFT: u32 = 4u32; +pub const TBS_NOTHUMB: u32 = 128u32; +pub const TBS_NOTICKS: u32 = 16u32; +pub const TBS_NOTIFYBEFOREMOVE: u32 = 2048u32; +pub const TBS_REVERSED: u32 = 512u32; +pub const TBS_RIGHT: u32 = 0u32; +pub const TBS_TOOLTIPS: u32 = 256u32; +pub const TBS_TOP: u32 = 4u32; +pub const TBS_TRANSPARENTBKGND: u32 = 4096u32; +pub const TBS_VERT: u32 = 2u32; +pub const TBTS_BOTTOM: u32 = 2u32; +pub const TBTS_LEFT: u32 = 1u32; +pub const TBTS_RIGHT: u32 = 3u32; +pub const TBTS_TOP: u32 = 0u32; +pub const TB_ADDBITMAP: u32 = 1043u32; +pub const TB_ADDBUTTONS: u32 = 1092u32; +pub const TB_ADDBUTTONSA: u32 = 1044u32; +pub const TB_ADDBUTTONSW: u32 = 1092u32; +pub const TB_ADDSTRING: u32 = 1101u32; +pub const TB_ADDSTRINGA: u32 = 1052u32; +pub const TB_ADDSTRINGW: u32 = 1101u32; +pub const TB_AUTOSIZE: u32 = 1057u32; +pub const TB_BOTTOM: u32 = 7u32; +pub const TB_BUTTONCOUNT: u32 = 1048u32; +pub const TB_BUTTONSTRUCTSIZE: u32 = 1054u32; +pub const TB_CHANGEBITMAP: u32 = 1067u32; +pub const TB_CHECKBUTTON: u32 = 1026u32; +pub const TB_COMMANDTOINDEX: u32 = 1049u32; +pub const TB_CUSTOMIZE: u32 = 1051u32; +pub const TB_DELETEBUTTON: u32 = 1046u32; +pub const TB_ENABLEBUTTON: u32 = 1025u32; +pub const TB_ENDTRACK: u32 = 8u32; +pub const TB_GETANCHORHIGHLIGHT: u32 = 1098u32; +pub const TB_GETBITMAP: u32 = 1068u32; +pub const TB_GETBITMAPFLAGS: u32 = 1065u32; +pub const TB_GETBUTTON: u32 = 1047u32; +pub const TB_GETBUTTONINFO: u32 = 1087u32; +pub const TB_GETBUTTONINFOA: u32 = 1089u32; +pub const TB_GETBUTTONINFOW: u32 = 1087u32; +pub const TB_GETBUTTONSIZE: u32 = 1082u32; +pub const TB_GETBUTTONTEXT: u32 = 1099u32; +pub const TB_GETBUTTONTEXTA: u32 = 1069u32; +pub const TB_GETBUTTONTEXTW: u32 = 1099u32; +pub const TB_GETCOLORSCHEME: u32 = 8195u32; +pub const TB_GETDISABLEDIMAGELIST: u32 = 1079u32; +pub const TB_GETEXTENDEDSTYLE: u32 = 1109u32; +pub const TB_GETHOTIMAGELIST: u32 = 1077u32; +pub const TB_GETHOTITEM: u32 = 1095u32; +pub const TB_GETIDEALSIZE: u32 = 1123u32; +pub const TB_GETIMAGELIST: u32 = 1073u32; +pub const TB_GETIMAGELISTCOUNT: u32 = 1122u32; +pub const TB_GETINSERTMARK: u32 = 1103u32; +pub const TB_GETINSERTMARKCOLOR: u32 = 1113u32; +pub const TB_GETITEMDROPDOWNRECT: u32 = 1127u32; +pub const TB_GETITEMRECT: u32 = 1053u32; +pub const TB_GETMAXSIZE: u32 = 1107u32; +pub const TB_GETMETRICS: u32 = 1125u32; +pub const TB_GETOBJECT: u32 = 1086u32; +pub const TB_GETPADDING: u32 = 1110u32; +pub const TB_GETPRESSEDIMAGELIST: u32 = 1129u32; +pub const TB_GETRECT: u32 = 1075u32; +pub const TB_GETROWS: u32 = 1064u32; +pub const TB_GETSTATE: u32 = 1042u32; +pub const TB_GETSTRING: u32 = 1115u32; +pub const TB_GETSTRINGA: u32 = 1116u32; +pub const TB_GETSTRINGW: u32 = 1115u32; +pub const TB_GETSTYLE: u32 = 1081u32; +pub const TB_GETTEXTROWS: u32 = 1085u32; +pub const TB_GETTOOLTIPS: u32 = 1059u32; +pub const TB_GETUNICODEFORMAT: u32 = 8198u32; +pub const TB_HASACCELERATOR: u32 = 1119u32; +pub const TB_HIDEBUTTON: u32 = 1028u32; +pub const TB_HITTEST: u32 = 1093u32; +pub const TB_INDETERMINATE: u32 = 1029u32; +pub const TB_INSERTBUTTON: u32 = 1091u32; +pub const TB_INSERTBUTTONA: u32 = 1045u32; +pub const TB_INSERTBUTTONW: u32 = 1091u32; +pub const TB_INSERTMARKHITTEST: u32 = 1105u32; +pub const TB_ISBUTTONCHECKED: u32 = 1034u32; +pub const TB_ISBUTTONENABLED: u32 = 1033u32; +pub const TB_ISBUTTONHIDDEN: u32 = 1036u32; +pub const TB_ISBUTTONHIGHLIGHTED: u32 = 1038u32; +pub const TB_ISBUTTONINDETERMINATE: u32 = 1037u32; +pub const TB_ISBUTTONPRESSED: u32 = 1035u32; +pub const TB_LINEDOWN: u32 = 1u32; +pub const TB_LINEUP: u32 = 0u32; +pub const TB_LOADIMAGES: u32 = 1074u32; +pub const TB_MAPACCELERATOR: u32 = 1114u32; +pub const TB_MAPACCELERATORA: u32 = 1102u32; +pub const TB_MAPACCELERATORW: u32 = 1114u32; +pub const TB_MARKBUTTON: u32 = 1030u32; +pub const TB_MOVEBUTTON: u32 = 1106u32; +pub const TB_PAGEDOWN: u32 = 3u32; +pub const TB_PAGEUP: u32 = 2u32; +pub const TB_PRESSBUTTON: u32 = 1027u32; +pub const TB_REPLACEBITMAP: u32 = 1070u32; +pub const TB_SAVERESTORE: u32 = 1100u32; +pub const TB_SAVERESTOREA: u32 = 1050u32; +pub const TB_SAVERESTOREW: u32 = 1100u32; +pub const TB_SETANCHORHIGHLIGHT: u32 = 1097u32; +pub const TB_SETBITMAPSIZE: u32 = 1056u32; +pub const TB_SETBOUNDINGSIZE: u32 = 1117u32; +pub const TB_SETBUTTONINFO: u32 = 1088u32; +pub const TB_SETBUTTONINFOA: u32 = 1090u32; +pub const TB_SETBUTTONINFOW: u32 = 1088u32; +pub const TB_SETBUTTONSIZE: u32 = 1055u32; +pub const TB_SETBUTTONWIDTH: u32 = 1083u32; +pub const TB_SETCMDID: u32 = 1066u32; +pub const TB_SETCOLORSCHEME: u32 = 8194u32; +pub const TB_SETDISABLEDIMAGELIST: u32 = 1078u32; +pub const TB_SETDRAWTEXTFLAGS: u32 = 1094u32; +pub const TB_SETEXTENDEDSTYLE: u32 = 1108u32; +pub const TB_SETHOTIMAGELIST: u32 = 1076u32; +pub const TB_SETHOTITEM: u32 = 1096u32; +pub const TB_SETHOTITEM2: u32 = 1118u32; +pub const TB_SETIMAGELIST: u32 = 1072u32; +pub const TB_SETINDENT: u32 = 1071u32; +pub const TB_SETINSERTMARK: u32 = 1104u32; +pub const TB_SETINSERTMARKCOLOR: u32 = 1112u32; +pub const TB_SETLISTGAP: u32 = 1120u32; +pub const TB_SETMAXTEXTROWS: u32 = 1084u32; +pub const TB_SETMETRICS: u32 = 1126u32; +pub const TB_SETPADDING: u32 = 1111u32; +pub const TB_SETPARENT: u32 = 1061u32; +pub const TB_SETPRESSEDIMAGELIST: u32 = 1128u32; +pub const TB_SETROWS: u32 = 1063u32; +pub const TB_SETSTATE: u32 = 1041u32; +pub const TB_SETSTYLE: u32 = 1080u32; +pub const TB_SETTOOLTIPS: u32 = 1060u32; +pub const TB_SETUNICODEFORMAT: u32 = 8197u32; +pub const TB_SETWINDOWTHEME: u32 = 8203u32; +pub const TB_THUMBPOSITION: u32 = 4u32; +pub const TB_THUMBTRACK: u32 = 5u32; +pub const TB_TOP: u32 = 6u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TCHITTESTINFO { + pub pt: super::super::Foundation::POINT, + pub flags: TCHITTESTINFO_FLAGS, +} +pub type TCHITTESTINFO_FLAGS = u32; +pub const TCHT_NOWHERE: TCHITTESTINFO_FLAGS = 1u32; +pub const TCHT_ONITEM: TCHITTESTINFO_FLAGS = 6u32; +pub const TCHT_ONITEMICON: TCHITTESTINFO_FLAGS = 2u32; +pub const TCHT_ONITEMLABEL: TCHITTESTINFO_FLAGS = 4u32; +pub const TCIF_IMAGE: TCITEMHEADERA_MASK = 2u32; +pub const TCIF_PARAM: TCITEMHEADERA_MASK = 8u32; +pub const TCIF_RTLREADING: TCITEMHEADERA_MASK = 4u32; +pub const TCIF_STATE: TCITEMHEADERA_MASK = 16u32; +pub const TCIF_TEXT: TCITEMHEADERA_MASK = 1u32; +pub const TCIS_BUTTONPRESSED: TAB_CONTROL_ITEM_STATE = 1u32; +pub const TCIS_HIGHLIGHTED: TAB_CONTROL_ITEM_STATE = 2u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TCITEMA { + pub mask: TCITEMHEADERA_MASK, + pub dwState: TAB_CONTROL_ITEM_STATE, + pub dwStateMask: TAB_CONTROL_ITEM_STATE, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for TCITEMA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TCITEMHEADERA { + pub mask: TCITEMHEADERA_MASK, + pub lpReserved1: u32, + pub lpReserved2: u32, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iImage: i32, +} +impl Default for TCITEMHEADERA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TCITEMHEADERA_MASK = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TCITEMHEADERW { + pub mask: TCITEMHEADERA_MASK, + pub lpReserved1: u32, + pub lpReserved2: u32, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iImage: i32, +} +impl Default for TCITEMHEADERW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TCITEMW { + pub mask: TCITEMHEADERA_MASK, + pub dwState: TAB_CONTROL_ITEM_STATE, + pub dwStateMask: TAB_CONTROL_ITEM_STATE, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for TCITEMW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TCM_ADJUSTRECT: u32 = 4904u32; +pub const TCM_DELETEALLITEMS: u32 = 4873u32; +pub const TCM_DELETEITEM: u32 = 4872u32; +pub const TCM_DESELECTALL: u32 = 4914u32; +pub const TCM_FIRST: u32 = 4864u32; +pub const TCM_GETCURFOCUS: u32 = 4911u32; +pub const TCM_GETCURSEL: u32 = 4875u32; +pub const TCM_GETEXTENDEDSTYLE: u32 = 4917u32; +pub const TCM_GETIMAGELIST: u32 = 4866u32; +pub const TCM_GETITEM: u32 = 4924u32; +pub const TCM_GETITEMA: u32 = 4869u32; +pub const TCM_GETITEMCOUNT: u32 = 4868u32; +pub const TCM_GETITEMRECT: u32 = 4874u32; +pub const TCM_GETITEMW: u32 = 4924u32; +pub const TCM_GETROWCOUNT: u32 = 4908u32; +pub const TCM_GETTOOLTIPS: u32 = 4909u32; +pub const TCM_GETUNICODEFORMAT: u32 = 8198u32; +pub const TCM_HIGHLIGHTITEM: u32 = 4915u32; +pub const TCM_HITTEST: u32 = 4877u32; +pub const TCM_INSERTITEM: u32 = 4926u32; +pub const TCM_INSERTITEMA: u32 = 4871u32; +pub const TCM_INSERTITEMW: u32 = 4926u32; +pub const TCM_REMOVEIMAGE: u32 = 4906u32; +pub const TCM_SETCURFOCUS: u32 = 4912u32; +pub const TCM_SETCURSEL: u32 = 4876u32; +pub const TCM_SETEXTENDEDSTYLE: u32 = 4916u32; +pub const TCM_SETIMAGELIST: u32 = 4867u32; +pub const TCM_SETITEM: u32 = 4925u32; +pub const TCM_SETITEMA: u32 = 4870u32; +pub const TCM_SETITEMEXTRA: u32 = 4878u32; +pub const TCM_SETITEMSIZE: u32 = 4905u32; +pub const TCM_SETITEMW: u32 = 4925u32; +pub const TCM_SETMINTABWIDTH: u32 = 4913u32; +pub const TCM_SETPADDING: u32 = 4907u32; +pub const TCM_SETTOOLTIPS: u32 = 4910u32; +pub const TCM_SETUNICODEFORMAT: u32 = 8197u32; +pub const TCN_FIRST: u32 = 4294966746u32; +pub const TCN_FOCUSCHANGE: u32 = 4294966742u32; +pub const TCN_GETOBJECT: u32 = 4294966743u32; +pub const TCN_KEYDOWN: u32 = 4294966746u32; +pub const TCN_LAST: u32 = 4294966716u32; +pub const TCN_SELCHANGE: u32 = 4294966745u32; +pub const TCN_SELCHANGING: u32 = 4294966744u32; +pub const TCS_BOTTOM: u32 = 2u32; +pub const TCS_BUTTONS: u32 = 256u32; +pub const TCS_EX_FLATSEPARATORS: u32 = 1u32; +pub const TCS_EX_REGISTERDROP: u32 = 2u32; +pub const TCS_FIXEDWIDTH: u32 = 1024u32; +pub const TCS_FLATBUTTONS: u32 = 8u32; +pub const TCS_FOCUSNEVER: u32 = 32768u32; +pub const TCS_FOCUSONBUTTONDOWN: u32 = 4096u32; +pub const TCS_FORCEICONLEFT: u32 = 16u32; +pub const TCS_FORCELABELLEFT: u32 = 32u32; +pub const TCS_HOTTRACK: u32 = 64u32; +pub const TCS_MULTILINE: u32 = 512u32; +pub const TCS_MULTISELECT: u32 = 4u32; +pub const TCS_OWNERDRAWFIXED: u32 = 8192u32; +pub const TCS_RAGGEDRIGHT: u32 = 2048u32; +pub const TCS_RIGHT: u32 = 2u32; +pub const TCS_RIGHTJUSTIFY: u32 = 0u32; +pub const TCS_SCROLLOPPOSITE: u32 = 1u32; +pub const TCS_SINGLELINE: u32 = 0u32; +pub const TCS_TABS: u32 = 0u32; +pub const TCS_TOOLTIPS: u32 = 16384u32; +pub const TCS_VERTICAL: u32 = 128u32; +pub const TDCBF_ABORT_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 65536i32; +pub const TDCBF_CANCEL_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 8i32; +pub const TDCBF_CLOSE_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 32i32; +pub const TDCBF_CONTINUE_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 524288i32; +pub const TDCBF_HELP_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 1048576i32; +pub const TDCBF_IGNORE_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 131072i32; +pub const TDCBF_NO_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 4i32; +pub const TDCBF_OK_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 1i32; +pub const TDCBF_RETRY_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 16i32; +pub const TDCBF_TRYAGAIN_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 262144i32; +pub const TDCBF_YES_BUTTON: TASKDIALOG_COMMON_BUTTON_FLAGS = 2i32; +pub const TDE_CONTENT: TASKDIALOG_ELEMENTS = 0i32; +pub const TDE_EXPANDED_INFORMATION: TASKDIALOG_ELEMENTS = 1i32; +pub const TDE_FOOTER: TASKDIALOG_ELEMENTS = 2i32; +pub const TDE_MAIN_INSTRUCTION: TASKDIALOG_ELEMENTS = 3i32; +pub const TDF_ALLOW_DIALOG_CANCELLATION: TASKDIALOG_FLAGS = 8i32; +pub const TDF_CALLBACK_TIMER: TASKDIALOG_FLAGS = 2048i32; +pub const TDF_CAN_BE_MINIMIZED: TASKDIALOG_FLAGS = 32768i32; +pub const TDF_ENABLE_HYPERLINKS: TASKDIALOG_FLAGS = 1i32; +pub const TDF_EXPANDED_BY_DEFAULT: TASKDIALOG_FLAGS = 128i32; +pub const TDF_EXPAND_FOOTER_AREA: TASKDIALOG_FLAGS = 64i32; +pub const TDF_NO_DEFAULT_RADIO_BUTTON: TASKDIALOG_FLAGS = 16384i32; +pub const TDF_NO_SET_FOREGROUND: TASKDIALOG_FLAGS = 65536i32; +pub const TDF_POSITION_RELATIVE_TO_WINDOW: TASKDIALOG_FLAGS = 4096i32; +pub const TDF_RTL_LAYOUT: TASKDIALOG_FLAGS = 8192i32; +pub const TDF_SHOW_MARQUEE_PROGRESS_BAR: TASKDIALOG_FLAGS = 1024i32; +pub const TDF_SHOW_PROGRESS_BAR: TASKDIALOG_FLAGS = 512i32; +pub const TDF_SIZE_TO_CONTENT: TASKDIALOG_FLAGS = 16777216i32; +pub const TDF_USE_COMMAND_LINKS: TASKDIALOG_FLAGS = 16i32; +pub const TDF_USE_COMMAND_LINKS_NO_ICON: TASKDIALOG_FLAGS = 32i32; +pub const TDF_USE_HICON_FOOTER: TASKDIALOG_FLAGS = 4i32; +pub const TDF_USE_HICON_MAIN: TASKDIALOG_FLAGS = 2i32; +pub const TDF_VERIFICATION_FLAG_CHECKED: TASKDIALOG_FLAGS = 256i32; +pub const TDIE_ICON_FOOTER: TASKDIALOG_ICON_ELEMENTS = 1i32; +pub const TDIE_ICON_MAIN: TASKDIALOG_ICON_ELEMENTS = 0i32; +pub const TDLGCPS_STANDALONE: CONTENTPANESTATES = 1i32; +pub const TDLGEBS_EXPANDEDDISABLED: EXPANDOBUTTONSTATES = 8i32; +pub const TDLGEBS_EXPANDEDHOVER: EXPANDOBUTTONSTATES = 5i32; +pub const TDLGEBS_EXPANDEDNORMAL: EXPANDOBUTTONSTATES = 4i32; +pub const TDLGEBS_EXPANDEDPRESSED: EXPANDOBUTTONSTATES = 6i32; +pub const TDLGEBS_HOVER: EXPANDOBUTTONSTATES = 2i32; +pub const TDLGEBS_NORMAL: EXPANDOBUTTONSTATES = 1i32; +pub const TDLGEBS_NORMALDISABLED: EXPANDOBUTTONSTATES = 7i32; +pub const TDLGEBS_PRESSED: EXPANDOBUTTONSTATES = 3i32; +pub const TDLG_BUTTONSECTION: TASKDIALOGPARTS = 10i32; +pub const TDLG_BUTTONWRAPPER: TASKDIALOGPARTS = 11i32; +pub const TDLG_COMMANDLINKPANE: TASKDIALOGPARTS = 7i32; +pub const TDLG_CONTENTICON: TASKDIALOGPARTS = 5i32; +pub const TDLG_CONTENTPANE: TASKDIALOGPARTS = 4i32; +pub const TDLG_CONTROLPANE: TASKDIALOGPARTS = 9i32; +pub const TDLG_EXPANDEDCONTENT: TASKDIALOGPARTS = 6i32; +pub const TDLG_EXPANDEDFOOTERAREA: TASKDIALOGPARTS = 18i32; +pub const TDLG_EXPANDOBUTTON: TASKDIALOGPARTS = 13i32; +pub const TDLG_EXPANDOTEXT: TASKDIALOGPARTS = 12i32; +pub const TDLG_FOOTNOTEAREA: TASKDIALOGPARTS = 16i32; +pub const TDLG_FOOTNOTEPANE: TASKDIALOGPARTS = 15i32; +pub const TDLG_FOOTNOTESEPARATOR: TASKDIALOGPARTS = 17i32; +pub const TDLG_IMAGEALIGNMENT: TASKDIALOGPARTS = 20i32; +pub const TDLG_MAINICON: TASKDIALOGPARTS = 3i32; +pub const TDLG_MAININSTRUCTIONPANE: TASKDIALOGPARTS = 2i32; +pub const TDLG_PRIMARYPANEL: TASKDIALOGPARTS = 1i32; +pub const TDLG_PROGRESSBAR: TASKDIALOGPARTS = 19i32; +pub const TDLG_RADIOBUTTONPANE: TASKDIALOGPARTS = 21i32; +pub const TDLG_SECONDARYPANEL: TASKDIALOGPARTS = 8i32; +pub const TDLG_VERIFICATIONTEXT: TASKDIALOGPARTS = 14i32; +pub const TDM_CLICK_BUTTON: TASKDIALOG_MESSAGES = 1126i32; +pub const TDM_CLICK_RADIO_BUTTON: TASKDIALOG_MESSAGES = 1134i32; +pub const TDM_CLICK_VERIFICATION: TASKDIALOG_MESSAGES = 1137i32; +pub const TDM_ENABLE_BUTTON: TASKDIALOG_MESSAGES = 1135i32; +pub const TDM_ENABLE_RADIO_BUTTON: TASKDIALOG_MESSAGES = 1136i32; +pub const TDM_NAVIGATE_PAGE: TASKDIALOG_MESSAGES = 1125i32; +pub const TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE: TASKDIALOG_MESSAGES = 1139i32; +pub const TDM_SET_ELEMENT_TEXT: TASKDIALOG_MESSAGES = 1132i32; +pub const TDM_SET_MARQUEE_PROGRESS_BAR: TASKDIALOG_MESSAGES = 1127i32; +pub const TDM_SET_PROGRESS_BAR_MARQUEE: TASKDIALOG_MESSAGES = 1131i32; +pub const TDM_SET_PROGRESS_BAR_POS: TASKDIALOG_MESSAGES = 1130i32; +pub const TDM_SET_PROGRESS_BAR_RANGE: TASKDIALOG_MESSAGES = 1129i32; +pub const TDM_SET_PROGRESS_BAR_STATE: TASKDIALOG_MESSAGES = 1128i32; +pub const TDM_UPDATE_ELEMENT_TEXT: TASKDIALOG_MESSAGES = 1138i32; +pub const TDM_UPDATE_ICON: TASKDIALOG_MESSAGES = 1140i32; +pub const TDN_BUTTON_CLICKED: TASKDIALOG_NOTIFICATIONS = 2i32; +pub const TDN_CREATED: TASKDIALOG_NOTIFICATIONS = 0i32; +pub const TDN_DESTROYED: TASKDIALOG_NOTIFICATIONS = 5i32; +pub const TDN_DIALOG_CONSTRUCTED: TASKDIALOG_NOTIFICATIONS = 7i32; +pub const TDN_EXPANDO_BUTTON_CLICKED: TASKDIALOG_NOTIFICATIONS = 10i32; +pub const TDN_HELP: TASKDIALOG_NOTIFICATIONS = 9i32; +pub const TDN_HYPERLINK_CLICKED: TASKDIALOG_NOTIFICATIONS = 3i32; +pub const TDN_NAVIGATED: TASKDIALOG_NOTIFICATIONS = 1i32; +pub const TDN_RADIO_BUTTON_CLICKED: TASKDIALOG_NOTIFICATIONS = 6i32; +pub const TDN_TIMER: TASKDIALOG_NOTIFICATIONS = 4i32; +pub const TDN_VERIFICATION_CLICKED: TASKDIALOG_NOTIFICATIONS = 8i32; +pub const TDP_FLASHBUTTON: TASKBANDPARTS = 2i32; +pub const TDP_FLASHBUTTONGROUPMENU: TASKBANDPARTS = 3i32; +pub const TDP_GROUPCOUNT: TASKBANDPARTS = 1i32; +pub const TD_ERROR_ICON: windows_sys::core::PCWSTR = 65534u16 as _; +pub const TD_INFORMATION_ICON: windows_sys::core::PCWSTR = 65533u16 as _; +pub const TD_SHIELD_ICON: windows_sys::core::PCWSTR = 65532u16 as _; +pub const TD_WARNING_ICON: windows_sys::core::PCWSTR = 65535u16 as _; +pub type TEXTSELECTIONGRIPPERPARTS = i32; +pub type TEXTSHADOWTYPE = i32; +pub type TEXTSTYLEPARTS = i32; +pub const TEXT_BODYTEXT: TEXTSTYLEPARTS = 4i32; +pub const TEXT_BODYTITLE: TEXTSTYLEPARTS = 3i32; +pub const TEXT_CONTROLLABEL: TEXTSTYLEPARTS = 9i32; +pub const TEXT_EXPANDED: TEXTSTYLEPARTS = 7i32; +pub const TEXT_HYPERLINKTEXT: TEXTSTYLEPARTS = 6i32; +pub const TEXT_INSTRUCTION: TEXTSTYLEPARTS = 2i32; +pub const TEXT_LABEL: TEXTSTYLEPARTS = 8i32; +pub const TEXT_MAININSTRUCTION: TEXTSTYLEPARTS = 1i32; +pub const TEXT_SECONDARYTEXT: TEXTSTYLEPARTS = 5i32; +pub type THEMESIZE = i32; +pub type THEME_PROPERTY_SYMBOL_ID = u32; +pub type THUMBBOTTOMSTATES = i32; +pub type THUMBLEFTSTATES = i32; +pub type THUMBRIGHTSTATES = i32; +pub type THUMBSTATES = i32; +pub type THUMBTOPSTATES = i32; +pub type THUMBVERTSTATES = i32; +pub const TIBES_DISABLED: TABITEMBOTHEDGESTATES = 4i32; +pub const TIBES_FOCUSED: TABITEMBOTHEDGESTATES = 5i32; +pub const TIBES_HOT: TABITEMBOTHEDGESTATES = 2i32; +pub const TIBES_NORMAL: TABITEMBOTHEDGESTATES = 1i32; +pub const TIBES_SELECTED: TABITEMBOTHEDGESTATES = 3i32; +pub type TICSSTATES = i32; +pub type TICSVERTSTATES = i32; +pub const TILES_DISABLED: TABITEMLEFTEDGESTATES = 4i32; +pub const TILES_FOCUSED: TABITEMLEFTEDGESTATES = 5i32; +pub const TILES_HOT: TABITEMLEFTEDGESTATES = 2i32; +pub const TILES_NORMAL: TABITEMLEFTEDGESTATES = 1i32; +pub const TILES_SELECTED: TABITEMLEFTEDGESTATES = 3i32; +pub const TIRES_DISABLED: TABITEMRIGHTEDGESTATES = 4i32; +pub const TIRES_FOCUSED: TABITEMRIGHTEDGESTATES = 5i32; +pub const TIRES_HOT: TABITEMRIGHTEDGESTATES = 2i32; +pub const TIRES_NORMAL: TABITEMRIGHTEDGESTATES = 1i32; +pub const TIRES_SELECTED: TABITEMRIGHTEDGESTATES = 3i32; +pub const TIS_DISABLED: TABITEMSTATES = 4i32; +pub const TIS_FOCUSED: TABITEMSTATES = 5i32; +pub const TIS_HOT: TABITEMSTATES = 2i32; +pub const TIS_NORMAL: TABITEMSTATES = 1i32; +pub const TIS_SELECTED: TABITEMSTATES = 3i32; +pub type TITLEBARSTATES = i32; +pub const TKP_THUMB: TRACKBARPARTS = 3i32; +pub const TKP_THUMBBOTTOM: TRACKBARPARTS = 4i32; +pub const TKP_THUMBLEFT: TRACKBARPARTS = 7i32; +pub const TKP_THUMBRIGHT: TRACKBARPARTS = 8i32; +pub const TKP_THUMBTOP: TRACKBARPARTS = 5i32; +pub const TKP_THUMBVERT: TRACKBARPARTS = 6i32; +pub const TKP_TICS: TRACKBARPARTS = 9i32; +pub const TKP_TICSVERT: TRACKBARPARTS = 10i32; +pub const TKP_TRACK: TRACKBARPARTS = 1i32; +pub const TKP_TRACKVERT: TRACKBARPARTS = 2i32; +pub const TKS_NORMAL: TRACKBARSTYLESTATES = 1i32; +pub const TMTVS_RESERVEDHIGH: u32 = 19999u32; +pub const TMTVS_RESERVEDLOW: u32 = 100000u32; +pub const TMT_ACCENTCOLORHINT: THEME_PROPERTY_SYMBOL_ID = 3823u32; +pub const TMT_ACTIVEBORDER: THEME_PROPERTY_SYMBOL_ID = 1611u32; +pub const TMT_ACTIVECAPTION: THEME_PROPERTY_SYMBOL_ID = 1603u32; +pub const TMT_ALIAS: THEME_PROPERTY_SYMBOL_ID = 1404u32; +pub const TMT_ALPHALEVEL: THEME_PROPERTY_SYMBOL_ID = 2402u32; +pub const TMT_ALPHATHRESHOLD: THEME_PROPERTY_SYMBOL_ID = 2415u32; +pub const TMT_ALWAYSSHOWSIZINGBAR: THEME_PROPERTY_SYMBOL_ID = 2208u32; +pub const TMT_ANIMATIONBUTTONRECT: THEME_PROPERTY_SYMBOL_ID = 5005u32; +pub const TMT_ANIMATIONDELAY: THEME_PROPERTY_SYMBOL_ID = 2428u32; +pub const TMT_ANIMATIONDURATION: THEME_PROPERTY_SYMBOL_ID = 5006u32; +pub const TMT_APPWORKSPACE: THEME_PROPERTY_SYMBOL_ID = 1613u32; +pub const TMT_ATLASIMAGE: THEME_PROPERTY_SYMBOL_ID = 8000u32; +pub const TMT_ATLASINPUTIMAGE: THEME_PROPERTY_SYMBOL_ID = 8001u32; +pub const TMT_ATLASRECT: THEME_PROPERTY_SYMBOL_ID = 8002u32; +pub const TMT_AUTHOR: THEME_PROPERTY_SYMBOL_ID = 604u32; +pub const TMT_AUTOSIZE: THEME_PROPERTY_SYMBOL_ID = 2202u32; +pub const TMT_BACKGROUND: THEME_PROPERTY_SYMBOL_ID = 1602u32; +pub const TMT_BGFILL: THEME_PROPERTY_SYMBOL_ID = 2205u32; +pub const TMT_BGTYPE: THEME_PROPERTY_SYMBOL_ID = 4001u32; +pub const TMT_BITMAPREF: THEME_PROPERTY_SYMBOL_ID = 215u32; +pub const TMT_BLENDCOLOR: THEME_PROPERTY_SYMBOL_ID = 5003u32; +pub const TMT_BODYFONT: THEME_PROPERTY_SYMBOL_ID = 809u32; +pub const TMT_BODYTEXTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3827u32; +pub const TMT_BOOL: THEME_PROPERTY_SYMBOL_ID = 203u32; +pub const TMT_BORDERCOLOR: THEME_PROPERTY_SYMBOL_ID = 3801u32; +pub const TMT_BORDERCOLORHINT: THEME_PROPERTY_SYMBOL_ID = 3822u32; +pub const TMT_BORDERONLY: THEME_PROPERTY_SYMBOL_ID = 2203u32; +pub const TMT_BORDERSIZE: THEME_PROPERTY_SYMBOL_ID = 2403u32; +pub const TMT_BORDERTYPE: THEME_PROPERTY_SYMBOL_ID = 4002u32; +pub const TMT_BTNFACE: THEME_PROPERTY_SYMBOL_ID = 1616u32; +pub const TMT_BTNHIGHLIGHT: THEME_PROPERTY_SYMBOL_ID = 1621u32; +pub const TMT_BTNSHADOW: THEME_PROPERTY_SYMBOL_ID = 1617u32; +pub const TMT_BTNTEXT: THEME_PROPERTY_SYMBOL_ID = 1619u32; +pub const TMT_BUTTONALTERNATEFACE: THEME_PROPERTY_SYMBOL_ID = 1626u32; +pub const TMT_CAPTIONBARHEIGHT: THEME_PROPERTY_SYMBOL_ID = 1205u32; +pub const TMT_CAPTIONBARWIDTH: THEME_PROPERTY_SYMBOL_ID = 1204u32; +pub const TMT_CAPTIONFONT: THEME_PROPERTY_SYMBOL_ID = 801u32; +pub const TMT_CAPTIONMARGINS: THEME_PROPERTY_SYMBOL_ID = 3603u32; +pub const TMT_CAPTIONTEXT: THEME_PROPERTY_SYMBOL_ID = 1610u32; +pub const TMT_CHARSET: THEME_PROPERTY_SYMBOL_ID = 403u32; +pub const TMT_CLASSICVALUE: THEME_PROPERTY_SYMBOL_ID = 3202u32; +pub const TMT_COLOR: THEME_PROPERTY_SYMBOL_ID = 204u32; +pub const TMT_COLORIZATIONCOLOR: THEME_PROPERTY_SYMBOL_ID = 2431u32; +pub const TMT_COLORIZATIONOPACITY: THEME_PROPERTY_SYMBOL_ID = 2432u32; +pub const TMT_COLORSCHEMES: THEME_PROPERTY_SYMBOL_ID = 401u32; +pub const TMT_COMPANY: THEME_PROPERTY_SYMBOL_ID = 603u32; +pub const TMT_COMPOSITED: THEME_PROPERTY_SYMBOL_ID = 2204u32; +pub const TMT_COMPOSITEDOPAQUE: THEME_PROPERTY_SYMBOL_ID = 2219u32; +pub const TMT_CONTENTALIGNMENT: THEME_PROPERTY_SYMBOL_ID = 4006u32; +pub const TMT_CONTENTMARGINS: THEME_PROPERTY_SYMBOL_ID = 3602u32; +pub const TMT_COPYRIGHT: THEME_PROPERTY_SYMBOL_ID = 605u32; +pub const TMT_CSSNAME: THEME_PROPERTY_SYMBOL_ID = 1401u32; +pub const TMT_CUSTOMSPLITRECT: THEME_PROPERTY_SYMBOL_ID = 5004u32; +pub const TMT_DEFAULTPANESIZE: THEME_PROPERTY_SYMBOL_ID = 5002u32; +pub const TMT_DESCRIPTION: THEME_PROPERTY_SYMBOL_ID = 608u32; +pub const TMT_DIBDATA: THEME_PROPERTY_SYMBOL_ID = 2u32; +pub const TMT_DISKSTREAM: THEME_PROPERTY_SYMBOL_ID = 213u32; +pub const TMT_DISPLAYNAME: THEME_PROPERTY_SYMBOL_ID = 601u32; +pub const TMT_DKSHADOW3D: THEME_PROPERTY_SYMBOL_ID = 1622u32; +pub const TMT_DRAWBORDERS: THEME_PROPERTY_SYMBOL_ID = 2214u32; +pub const TMT_EDGEDKSHADOWCOLOR: THEME_PROPERTY_SYMBOL_ID = 3807u32; +pub const TMT_EDGEFILLCOLOR: THEME_PROPERTY_SYMBOL_ID = 3808u32; +pub const TMT_EDGEHIGHLIGHTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3805u32; +pub const TMT_EDGELIGHTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3804u32; +pub const TMT_EDGESHADOWCOLOR: THEME_PROPERTY_SYMBOL_ID = 3806u32; +pub const TMT_ENUM: THEME_PROPERTY_SYMBOL_ID = 200u32; +pub const TMT_FILENAME: THEME_PROPERTY_SYMBOL_ID = 206u32; +pub const TMT_FILLCOLOR: THEME_PROPERTY_SYMBOL_ID = 3802u32; +pub const TMT_FILLCOLORHINT: THEME_PROPERTY_SYMBOL_ID = 3821u32; +pub const TMT_FILLTYPE: THEME_PROPERTY_SYMBOL_ID = 4003u32; +pub const TMT_FIRSTBOOL: THEME_PROPERTY_SYMBOL_ID = 1001u32; +pub const TMT_FIRSTCOLOR: THEME_PROPERTY_SYMBOL_ID = 1601u32; +pub const TMT_FIRSTFONT: THEME_PROPERTY_SYMBOL_ID = 801u32; +pub const TMT_FIRSTINT: THEME_PROPERTY_SYMBOL_ID = 1301u32; +pub const TMT_FIRSTSIZE: THEME_PROPERTY_SYMBOL_ID = 1201u32; +pub const TMT_FIRSTSTRING: THEME_PROPERTY_SYMBOL_ID = 1401u32; +pub const TMT_FIRST_RCSTRING_NAME: THEME_PROPERTY_SYMBOL_ID = 601u32; +pub const TMT_FLATMENUS: THEME_PROPERTY_SYMBOL_ID = 1001u32; +pub const TMT_FLOAT: THEME_PROPERTY_SYMBOL_ID = 216u32; +pub const TMT_FLOATLIST: THEME_PROPERTY_SYMBOL_ID = 217u32; +pub const TMT_FONT: THEME_PROPERTY_SYMBOL_ID = 210u32; +pub const TMT_FRAMESPERSECOND: THEME_PROPERTY_SYMBOL_ID = 2426u32; +pub const TMT_FROMCOLOR1: THEME_PROPERTY_SYMBOL_ID = 2001u32; +pub const TMT_FROMCOLOR2: THEME_PROPERTY_SYMBOL_ID = 2002u32; +pub const TMT_FROMCOLOR3: THEME_PROPERTY_SYMBOL_ID = 2003u32; +pub const TMT_FROMCOLOR4: THEME_PROPERTY_SYMBOL_ID = 2004u32; +pub const TMT_FROMCOLOR5: THEME_PROPERTY_SYMBOL_ID = 2005u32; +pub const TMT_FROMHUE1: THEME_PROPERTY_SYMBOL_ID = 1801u32; +pub const TMT_FROMHUE2: THEME_PROPERTY_SYMBOL_ID = 1802u32; +pub const TMT_FROMHUE3: THEME_PROPERTY_SYMBOL_ID = 1803u32; +pub const TMT_FROMHUE4: THEME_PROPERTY_SYMBOL_ID = 1804u32; +pub const TMT_FROMHUE5: THEME_PROPERTY_SYMBOL_ID = 1805u32; +pub const TMT_GLOWCOLOR: THEME_PROPERTY_SYMBOL_ID = 3816u32; +pub const TMT_GLOWINTENSITY: THEME_PROPERTY_SYMBOL_ID = 2429u32; +pub const TMT_GLYPHDIBDATA: THEME_PROPERTY_SYMBOL_ID = 8u32; +pub const TMT_GLYPHFONT: THEME_PROPERTY_SYMBOL_ID = 2601u32; +pub const TMT_GLYPHFONTSIZINGTYPE: THEME_PROPERTY_SYMBOL_ID = 4014u32; +pub const TMT_GLYPHIMAGEFILE: THEME_PROPERTY_SYMBOL_ID = 3008u32; +pub const TMT_GLYPHINDEX: THEME_PROPERTY_SYMBOL_ID = 2418u32; +pub const TMT_GLYPHONLY: THEME_PROPERTY_SYMBOL_ID = 2207u32; +pub const TMT_GLYPHTEXTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3819u32; +pub const TMT_GLYPHTRANSPARENT: THEME_PROPERTY_SYMBOL_ID = 2206u32; +pub const TMT_GLYPHTRANSPARENTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3820u32; +pub const TMT_GLYPHTYPE: THEME_PROPERTY_SYMBOL_ID = 4012u32; +pub const TMT_GRADIENTACTIVECAPTION: THEME_PROPERTY_SYMBOL_ID = 1628u32; +pub const TMT_GRADIENTCOLOR1: THEME_PROPERTY_SYMBOL_ID = 3810u32; +pub const TMT_GRADIENTCOLOR2: THEME_PROPERTY_SYMBOL_ID = 3811u32; +pub const TMT_GRADIENTCOLOR3: THEME_PROPERTY_SYMBOL_ID = 3812u32; +pub const TMT_GRADIENTCOLOR4: THEME_PROPERTY_SYMBOL_ID = 3813u32; +pub const TMT_GRADIENTCOLOR5: THEME_PROPERTY_SYMBOL_ID = 3814u32; +pub const TMT_GRADIENTINACTIVECAPTION: THEME_PROPERTY_SYMBOL_ID = 1629u32; +pub const TMT_GRADIENTRATIO1: THEME_PROPERTY_SYMBOL_ID = 2406u32; +pub const TMT_GRADIENTRATIO2: THEME_PROPERTY_SYMBOL_ID = 2407u32; +pub const TMT_GRADIENTRATIO3: THEME_PROPERTY_SYMBOL_ID = 2408u32; +pub const TMT_GRADIENTRATIO4: THEME_PROPERTY_SYMBOL_ID = 2409u32; +pub const TMT_GRADIENTRATIO5: THEME_PROPERTY_SYMBOL_ID = 2410u32; +pub const TMT_GRAYTEXT: THEME_PROPERTY_SYMBOL_ID = 1618u32; +pub const TMT_HALIGN: THEME_PROPERTY_SYMBOL_ID = 4005u32; +pub const TMT_HBITMAP: THEME_PROPERTY_SYMBOL_ID = 212u32; +pub const TMT_HEADING1FONT: THEME_PROPERTY_SYMBOL_ID = 807u32; +pub const TMT_HEADING1TEXTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3825u32; +pub const TMT_HEADING2FONT: THEME_PROPERTY_SYMBOL_ID = 808u32; +pub const TMT_HEADING2TEXTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3826u32; +pub const TMT_HEIGHT: THEME_PROPERTY_SYMBOL_ID = 2417u32; +pub const TMT_HIGHLIGHT: THEME_PROPERTY_SYMBOL_ID = 1614u32; +pub const TMT_HIGHLIGHTTEXT: THEME_PROPERTY_SYMBOL_ID = 1615u32; +pub const TMT_HOTTRACKING: THEME_PROPERTY_SYMBOL_ID = 1627u32; +pub const TMT_ICONEFFECT: THEME_PROPERTY_SYMBOL_ID = 4009u32; +pub const TMT_ICONTITLEFONT: THEME_PROPERTY_SYMBOL_ID = 806u32; +pub const TMT_IMAGECOUNT: THEME_PROPERTY_SYMBOL_ID = 2401u32; +pub const TMT_IMAGEFILE: THEME_PROPERTY_SYMBOL_ID = 3001u32; +pub const TMT_IMAGEFILE1: THEME_PROPERTY_SYMBOL_ID = 3002u32; +pub const TMT_IMAGEFILE2: THEME_PROPERTY_SYMBOL_ID = 3003u32; +pub const TMT_IMAGEFILE3: THEME_PROPERTY_SYMBOL_ID = 3004u32; +pub const TMT_IMAGEFILE4: THEME_PROPERTY_SYMBOL_ID = 3005u32; +pub const TMT_IMAGEFILE5: THEME_PROPERTY_SYMBOL_ID = 3006u32; +pub const TMT_IMAGEFILE6: THEME_PROPERTY_SYMBOL_ID = 3009u32; +pub const TMT_IMAGEFILE7: THEME_PROPERTY_SYMBOL_ID = 3010u32; +pub const TMT_IMAGELAYOUT: THEME_PROPERTY_SYMBOL_ID = 4011u32; +pub const TMT_IMAGESELECTTYPE: THEME_PROPERTY_SYMBOL_ID = 4013u32; +pub const TMT_INACTIVEBORDER: THEME_PROPERTY_SYMBOL_ID = 1612u32; +pub const TMT_INACTIVECAPTION: THEME_PROPERTY_SYMBOL_ID = 1604u32; +pub const TMT_INACTIVECAPTIONTEXT: THEME_PROPERTY_SYMBOL_ID = 1620u32; +pub const TMT_INFOBK: THEME_PROPERTY_SYMBOL_ID = 1625u32; +pub const TMT_INFOTEXT: THEME_PROPERTY_SYMBOL_ID = 1624u32; +pub const TMT_INT: THEME_PROPERTY_SYMBOL_ID = 202u32; +pub const TMT_INTEGRALSIZING: THEME_PROPERTY_SYMBOL_ID = 2211u32; +pub const TMT_INTLIST: THEME_PROPERTY_SYMBOL_ID = 211u32; +pub const TMT_LASTBOOL: THEME_PROPERTY_SYMBOL_ID = 1001u32; +pub const TMT_LASTCOLOR: THEME_PROPERTY_SYMBOL_ID = 1631u32; +pub const TMT_LASTFONT: THEME_PROPERTY_SYMBOL_ID = 809u32; +pub const TMT_LASTINT: THEME_PROPERTY_SYMBOL_ID = 1301u32; +pub const TMT_LASTSIZE: THEME_PROPERTY_SYMBOL_ID = 1210u32; +pub const TMT_LASTSTRING: THEME_PROPERTY_SYMBOL_ID = 1404u32; +pub const TMT_LASTUPDATED: THEME_PROPERTY_SYMBOL_ID = 1403u32; +pub const TMT_LAST_RCSTRING_NAME: THEME_PROPERTY_SYMBOL_ID = 608u32; +pub const TMT_LIGHT3D: THEME_PROPERTY_SYMBOL_ID = 1623u32; +pub const TMT_LOCALIZEDMIRRORIMAGE: THEME_PROPERTY_SYMBOL_ID = 2220u32; +pub const TMT_MARGINS: THEME_PROPERTY_SYMBOL_ID = 205u32; +pub const TMT_MENU: THEME_PROPERTY_SYMBOL_ID = 1605u32; +pub const TMT_MENUBAR: THEME_PROPERTY_SYMBOL_ID = 1631u32; +pub const TMT_MENUBARHEIGHT: THEME_PROPERTY_SYMBOL_ID = 1209u32; +pub const TMT_MENUBARWIDTH: THEME_PROPERTY_SYMBOL_ID = 1208u32; +pub const TMT_MENUFONT: THEME_PROPERTY_SYMBOL_ID = 803u32; +pub const TMT_MENUHILIGHT: THEME_PROPERTY_SYMBOL_ID = 1630u32; +pub const TMT_MENUTEXT: THEME_PROPERTY_SYMBOL_ID = 1608u32; +pub const TMT_MINCOLORDEPTH: THEME_PROPERTY_SYMBOL_ID = 1301u32; +pub const TMT_MINDPI1: THEME_PROPERTY_SYMBOL_ID = 2420u32; +pub const TMT_MINDPI2: THEME_PROPERTY_SYMBOL_ID = 2421u32; +pub const TMT_MINDPI3: THEME_PROPERTY_SYMBOL_ID = 2422u32; +pub const TMT_MINDPI4: THEME_PROPERTY_SYMBOL_ID = 2423u32; +pub const TMT_MINDPI5: THEME_PROPERTY_SYMBOL_ID = 2424u32; +pub const TMT_MINDPI6: THEME_PROPERTY_SYMBOL_ID = 2433u32; +pub const TMT_MINDPI7: THEME_PROPERTY_SYMBOL_ID = 2434u32; +pub const TMT_MINSIZE: THEME_PROPERTY_SYMBOL_ID = 3403u32; +pub const TMT_MINSIZE1: THEME_PROPERTY_SYMBOL_ID = 3404u32; +pub const TMT_MINSIZE2: THEME_PROPERTY_SYMBOL_ID = 3405u32; +pub const TMT_MINSIZE3: THEME_PROPERTY_SYMBOL_ID = 3406u32; +pub const TMT_MINSIZE4: THEME_PROPERTY_SYMBOL_ID = 3407u32; +pub const TMT_MINSIZE5: THEME_PROPERTY_SYMBOL_ID = 3408u32; +pub const TMT_MINSIZE6: THEME_PROPERTY_SYMBOL_ID = 3410u32; +pub const TMT_MINSIZE7: THEME_PROPERTY_SYMBOL_ID = 3411u32; +pub const TMT_MIRRORIMAGE: THEME_PROPERTY_SYMBOL_ID = 2209u32; +pub const TMT_MSGBOXFONT: THEME_PROPERTY_SYMBOL_ID = 805u32; +pub const TMT_NAME: THEME_PROPERTY_SYMBOL_ID = 600u32; +pub const TMT_NOETCHEDEFFECT: THEME_PROPERTY_SYMBOL_ID = 2215u32; +pub const TMT_NORMALSIZE: THEME_PROPERTY_SYMBOL_ID = 3409u32; +pub const TMT_OFFSET: THEME_PROPERTY_SYMBOL_ID = 3401u32; +pub const TMT_OFFSETTYPE: THEME_PROPERTY_SYMBOL_ID = 4008u32; +pub const TMT_OPACITY: THEME_PROPERTY_SYMBOL_ID = 2430u32; +pub const TMT_PADDEDBORDERWIDTH: THEME_PROPERTY_SYMBOL_ID = 1210u32; +pub const TMT_PIXELSPERFRAME: THEME_PROPERTY_SYMBOL_ID = 2427u32; +pub const TMT_POSITION: THEME_PROPERTY_SYMBOL_ID = 208u32; +pub const TMT_PROGRESSCHUNKSIZE: THEME_PROPERTY_SYMBOL_ID = 2411u32; +pub const TMT_PROGRESSSPACESIZE: THEME_PROPERTY_SYMBOL_ID = 2412u32; +pub const TMT_RECT: THEME_PROPERTY_SYMBOL_ID = 209u32; +pub const TMT_RESERVEDHIGH: THEME_PROPERTY_SYMBOL_ID = 7999u32; +pub const TMT_RESERVEDLOW: THEME_PROPERTY_SYMBOL_ID = 0u32; +pub const TMT_ROUNDCORNERHEIGHT: THEME_PROPERTY_SYMBOL_ID = 2405u32; +pub const TMT_ROUNDCORNERWIDTH: THEME_PROPERTY_SYMBOL_ID = 2404u32; +pub const TMT_SATURATION: THEME_PROPERTY_SYMBOL_ID = 2413u32; +pub const TMT_SCALEDBACKGROUND: THEME_PROPERTY_SYMBOL_ID = 7001u32; +pub const TMT_SCROLLBAR: THEME_PROPERTY_SYMBOL_ID = 1601u32; +pub const TMT_SCROLLBARHEIGHT: THEME_PROPERTY_SYMBOL_ID = 1203u32; +pub const TMT_SCROLLBARWIDTH: THEME_PROPERTY_SYMBOL_ID = 1202u32; +pub const TMT_SHADOWCOLOR: THEME_PROPERTY_SYMBOL_ID = 3815u32; +pub const TMT_SIZE: THEME_PROPERTY_SYMBOL_ID = 207u32; +pub const TMT_SIZES: THEME_PROPERTY_SYMBOL_ID = 402u32; +pub const TMT_SIZINGBORDERWIDTH: THEME_PROPERTY_SYMBOL_ID = 1201u32; +pub const TMT_SIZINGMARGINS: THEME_PROPERTY_SYMBOL_ID = 3601u32; +pub const TMT_SIZINGTYPE: THEME_PROPERTY_SYMBOL_ID = 4004u32; +pub const TMT_SMALLCAPTIONFONT: THEME_PROPERTY_SYMBOL_ID = 802u32; +pub const TMT_SMCAPTIONBARHEIGHT: THEME_PROPERTY_SYMBOL_ID = 1207u32; +pub const TMT_SMCAPTIONBARWIDTH: THEME_PROPERTY_SYMBOL_ID = 1206u32; +pub const TMT_SOURCEGROW: THEME_PROPERTY_SYMBOL_ID = 2212u32; +pub const TMT_SOURCESHRINK: THEME_PROPERTY_SYMBOL_ID = 2213u32; +pub const TMT_STATUSFONT: THEME_PROPERTY_SYMBOL_ID = 804u32; +pub const TMT_STREAM: THEME_PROPERTY_SYMBOL_ID = 214u32; +pub const TMT_STRING: THEME_PROPERTY_SYMBOL_ID = 201u32; +pub const TMT_TEXT: THEME_PROPERTY_SYMBOL_ID = 3201u32; +pub const TMT_TEXTAPPLYOVERLAY: THEME_PROPERTY_SYMBOL_ID = 2216u32; +pub const TMT_TEXTBORDERCOLOR: THEME_PROPERTY_SYMBOL_ID = 3817u32; +pub const TMT_TEXTBORDERSIZE: THEME_PROPERTY_SYMBOL_ID = 2414u32; +pub const TMT_TEXTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3803u32; +pub const TMT_TEXTCOLORHINT: THEME_PROPERTY_SYMBOL_ID = 3824u32; +pub const TMT_TEXTGLOW: THEME_PROPERTY_SYMBOL_ID = 2217u32; +pub const TMT_TEXTGLOWSIZE: THEME_PROPERTY_SYMBOL_ID = 2425u32; +pub const TMT_TEXTITALIC: THEME_PROPERTY_SYMBOL_ID = 2218u32; +pub const TMT_TEXTSHADOWCOLOR: THEME_PROPERTY_SYMBOL_ID = 3818u32; +pub const TMT_TEXTSHADOWOFFSET: THEME_PROPERTY_SYMBOL_ID = 3402u32; +pub const TMT_TEXTSHADOWTYPE: THEME_PROPERTY_SYMBOL_ID = 4010u32; +pub const TMT_TOCOLOR1: THEME_PROPERTY_SYMBOL_ID = 2006u32; +pub const TMT_TOCOLOR2: THEME_PROPERTY_SYMBOL_ID = 2007u32; +pub const TMT_TOCOLOR3: THEME_PROPERTY_SYMBOL_ID = 2008u32; +pub const TMT_TOCOLOR4: THEME_PROPERTY_SYMBOL_ID = 2009u32; +pub const TMT_TOCOLOR5: THEME_PROPERTY_SYMBOL_ID = 2010u32; +pub const TMT_TOHUE1: THEME_PROPERTY_SYMBOL_ID = 1806u32; +pub const TMT_TOHUE2: THEME_PROPERTY_SYMBOL_ID = 1807u32; +pub const TMT_TOHUE3: THEME_PROPERTY_SYMBOL_ID = 1808u32; +pub const TMT_TOHUE4: THEME_PROPERTY_SYMBOL_ID = 1809u32; +pub const TMT_TOHUE5: THEME_PROPERTY_SYMBOL_ID = 1810u32; +pub const TMT_TOOLTIP: THEME_PROPERTY_SYMBOL_ID = 602u32; +pub const TMT_TRANSITIONDURATIONS: THEME_PROPERTY_SYMBOL_ID = 6000u32; +pub const TMT_TRANSPARENT: THEME_PROPERTY_SYMBOL_ID = 2201u32; +pub const TMT_TRANSPARENTCOLOR: THEME_PROPERTY_SYMBOL_ID = 3809u32; +pub const TMT_TRUESIZESCALINGTYPE: THEME_PROPERTY_SYMBOL_ID = 4015u32; +pub const TMT_TRUESIZESTRETCHMARK: THEME_PROPERTY_SYMBOL_ID = 2419u32; +pub const TMT_UNIFORMSIZING: THEME_PROPERTY_SYMBOL_ID = 2210u32; +pub const TMT_URL: THEME_PROPERTY_SYMBOL_ID = 606u32; +pub const TMT_USERPICTURE: THEME_PROPERTY_SYMBOL_ID = 5001u32; +pub const TMT_VALIGN: THEME_PROPERTY_SYMBOL_ID = 4007u32; +pub const TMT_VERSION: THEME_PROPERTY_SYMBOL_ID = 607u32; +pub const TMT_WIDTH: THEME_PROPERTY_SYMBOL_ID = 2416u32; +pub const TMT_WINDOW: THEME_PROPERTY_SYMBOL_ID = 1606u32; +pub const TMT_WINDOWFRAME: THEME_PROPERTY_SYMBOL_ID = 1607u32; +pub const TMT_WINDOWTEXT: THEME_PROPERTY_SYMBOL_ID = 1609u32; +pub const TMT_XMLNAME: THEME_PROPERTY_SYMBOL_ID = 1402u32; +pub const TNP_ANIMBACKGROUND: TRAYNOTIFYPARTS = 2i32; +pub const TNP_BACKGROUND: TRAYNOTIFYPARTS = 1i32; +pub const TOOLBARCLASSNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("ToolbarWindow32"); +pub const TOOLBARCLASSNAMEA: windows_sys::core::PCSTR = windows_sys::core::s!("ToolbarWindow32"); +pub const TOOLBARCLASSNAMEW: windows_sys::core::PCWSTR = windows_sys::core::w!("ToolbarWindow32"); +pub type TOOLBARPARTS = i32; +pub type TOOLBARSTYLESTATES = i32; +pub type TOOLTIPPARTS = i32; +pub const TOOLTIPS_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("tooltips_class32"); +pub const TOOLTIPS_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("tooltips_class32"); +pub const TOOLTIPS_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("tooltips_class32"); +pub type TOOLTIP_FLAGS = u32; +pub type TOPTABITEMBOTHEDGESTATES = i32; +pub type TOPTABITEMLEFTEDGESTATES = i32; +pub type TOPTABITEMRIGHTEDGESTATES = i32; +pub type TOPTABITEMSTATES = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOUCH_HIT_TESTING_INPUT { + pub pointerId: u32, + pub point: super::super::Foundation::POINT, + pub boundingBox: super::super::Foundation::RECT, + pub nonOccludedBoundingBox: super::super::Foundation::RECT, + pub orientation: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TOUCH_HIT_TESTING_PROXIMITY_EVALUATION { + pub score: u16, + pub adjustedPoint: super::super::Foundation::POINT, +} +pub const TP_BUTTON: TOOLBARPARTS = 1i32; +pub const TP_DROPDOWNBUTTON: TOOLBARPARTS = 2i32; +pub const TP_DROPDOWNBUTTONGLYPH: TOOLBARPARTS = 7i32; +pub const TP_SEPARATOR: TOOLBARPARTS = 5i32; +pub const TP_SEPARATORVERT: TOOLBARPARTS = 6i32; +pub const TP_SPLITBUTTON: TOOLBARPARTS = 3i32; +pub const TP_SPLITBUTTONDROPDOWN: TOOLBARPARTS = 4i32; +pub type TRACKBARPARTS = i32; +pub type TRACKBARSTYLESTATES = i32; +pub const TRACKBAR_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_trackbar32"); +pub const TRACKBAR_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("msctls_trackbar32"); +pub const TRACKBAR_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_trackbar32"); +pub type TRACKSTATES = i32; +pub type TRACKVERTSTATES = i32; +pub type TRAILINGGRIDCELLSTATES = i32; +pub type TRAILINGGRIDCELLUPPERSTATES = i32; +pub type TRANSPARENTBACKGROUNDSTATES = i32; +pub type TRANSPARENTBARSTATES = i32; +pub type TRANSPARENTBARVERTSTATES = i32; +pub type TRAYNOTIFYPARTS = i32; +pub const TRBN_FIRST: u32 = 4294965795u32; +pub const TRBN_LAST: u32 = 4294965777u32; +pub const TRBN_THUMBPOSCHANGING: u32 = 4294965794u32; +pub type TREEITEMSTATES = i32; +pub type TREEVIEWPARTS = i32; +pub type TREE_VIEW_ITEM_STATE_FLAGS = u32; +pub const TREIS_DISABLED: TREEITEMSTATES = 4i32; +pub const TREIS_HOT: TREEITEMSTATES = 2i32; +pub const TREIS_HOTSELECTED: TREEITEMSTATES = 6i32; +pub const TREIS_NORMAL: TREEITEMSTATES = 1i32; +pub const TREIS_SELECTED: TREEITEMSTATES = 3i32; +pub const TREIS_SELECTEDNOTFOCUS: TREEITEMSTATES = 5i32; +pub const TRS_NORMAL: TRACKSTATES = 1i32; +pub type TRUESIZESCALINGTYPE = i32; +pub const TRVS_NORMAL: TRACKVERTSTATES = 1i32; +pub const TSGP_GRIPPER: TEXTSELECTIONGRIPPERPARTS = 1i32; +pub const TSGS_CENTERED: GRIPPERSTATES = 2i32; +pub const TSGS_NORMAL: GRIPPERSTATES = 1i32; +pub const TSST_DPI: TRUESIZESCALINGTYPE = 2i32; +pub const TSST_NONE: TRUESIZESCALINGTYPE = 0i32; +pub const TSST_SIZE: TRUESIZESCALINGTYPE = 1i32; +pub const TSS_NORMAL: TICSSTATES = 1i32; +pub const TST_CONTINUOUS: TEXTSHADOWTYPE = 2i32; +pub const TST_NONE: TEXTSHADOWTYPE = 0i32; +pub const TST_SINGLE: TEXTSHADOWTYPE = 1i32; +pub const TSVS_NORMAL: TICSVERTSTATES = 1i32; +pub const TS_CHECKED: TOOLBARSTYLESTATES = 5i32; +pub const TS_CONTROLLABEL_DISABLED: CONTROLLABELSTATES = 2i32; +pub const TS_CONTROLLABEL_NORMAL: CONTROLLABELSTATES = 1i32; +pub const TS_DISABLED: TOOLBARSTYLESTATES = 4i32; +pub const TS_DRAW: THEMESIZE = 2i32; +pub const TS_HOT: TOOLBARSTYLESTATES = 2i32; +pub const TS_HOTCHECKED: TOOLBARSTYLESTATES = 6i32; +pub const TS_HYPERLINK_DISABLED: HYPERLINKTEXTSTATES = 4i32; +pub const TS_HYPERLINK_HOT: HYPERLINKTEXTSTATES = 2i32; +pub const TS_HYPERLINK_NORMAL: HYPERLINKTEXTSTATES = 1i32; +pub const TS_HYPERLINK_PRESSED: HYPERLINKTEXTSTATES = 3i32; +pub const TS_MIN: THEMESIZE = 0i32; +pub const TS_NEARHOT: TOOLBARSTYLESTATES = 7i32; +pub const TS_NORMAL: TOOLBARSTYLESTATES = 1i32; +pub const TS_OTHERSIDEHOT: TOOLBARSTYLESTATES = 8i32; +pub const TS_PRESSED: TOOLBARSTYLESTATES = 3i32; +pub const TS_TRUE: THEMESIZE = 1i32; +pub const TTBSS_POINTINGDOWNCENTERED: BALLOONSTEMSTATES = 5i32; +pub const TTBSS_POINTINGDOWNLEFTWALL: BALLOONSTEMSTATES = 6i32; +pub const TTBSS_POINTINGDOWNRIGHTWALL: BALLOONSTEMSTATES = 4i32; +pub const TTBSS_POINTINGUPCENTERED: BALLOONSTEMSTATES = 2i32; +pub const TTBSS_POINTINGUPLEFTWALL: BALLOONSTEMSTATES = 1i32; +pub const TTBSS_POINTINGUPRIGHTWALL: BALLOONSTEMSTATES = 3i32; +pub const TTBS_LINK: BALLOONSTATES = 2i32; +pub const TTBS_NORMAL: BALLOONSTATES = 1i32; +pub const TTCS_HOT: CLOSESTATES = 2i32; +pub const TTCS_NORMAL: CLOSESTATES = 1i32; +pub const TTCS_PRESSED: CLOSESTATES = 3i32; +pub const TTDT_AUTOMATIC: u32 = 0u32; +pub const TTDT_AUTOPOP: u32 = 2u32; +pub const TTDT_INITIAL: u32 = 3u32; +pub const TTDT_RESHOW: u32 = 1u32; +pub const TTFT_CUBIC_BEZIER: TA_TIMINGFUNCTION_TYPE = 1i32; +pub const TTFT_UNDEFINED: TA_TIMINGFUNCTION_TYPE = 0i32; +pub const TTF_ABSOLUTE: TOOLTIP_FLAGS = 128u32; +pub const TTF_CENTERTIP: TOOLTIP_FLAGS = 2u32; +pub const TTF_DI_SETITEM: TOOLTIP_FLAGS = 32768u32; +pub const TTF_IDISHWND: TOOLTIP_FLAGS = 1u32; +pub const TTF_PARSELINKS: TOOLTIP_FLAGS = 4096u32; +pub const TTF_RTLREADING: TOOLTIP_FLAGS = 4u32; +pub const TTF_SUBCLASS: TOOLTIP_FLAGS = 16u32; +pub const TTF_TRACK: TOOLTIP_FLAGS = 32u32; +pub const TTF_TRANSPARENT: TOOLTIP_FLAGS = 256u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TTGETTITLE { + pub dwSize: u32, + pub uTitleBitmap: u32, + pub cch: u32, + pub pszTitle: windows_sys::core::PWSTR, +} +impl Default for TTGETTITLE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TTHITTESTINFOA { + pub hwnd: super::super::Foundation::HWND, + pub pt: super::super::Foundation::POINT, + pub ti: TTTOOLINFOA, +} +impl Default for TTHITTESTINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TTHITTESTINFOW { + pub hwnd: super::super::Foundation::HWND, + pub pt: super::super::Foundation::POINT, + pub ti: TTTOOLINFOW, +} +impl Default for TTHITTESTINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TTIBES_DISABLED: TOPTABITEMBOTHEDGESTATES = 4i32; +pub const TTIBES_FOCUSED: TOPTABITEMBOTHEDGESTATES = 5i32; +pub const TTIBES_HOT: TOPTABITEMBOTHEDGESTATES = 2i32; +pub const TTIBES_NORMAL: TOPTABITEMBOTHEDGESTATES = 1i32; +pub const TTIBES_SELECTED: TOPTABITEMBOTHEDGESTATES = 3i32; +pub const TTILES_DISABLED: TOPTABITEMLEFTEDGESTATES = 4i32; +pub const TTILES_FOCUSED: TOPTABITEMLEFTEDGESTATES = 5i32; +pub const TTILES_HOT: TOPTABITEMLEFTEDGESTATES = 2i32; +pub const TTILES_NORMAL: TOPTABITEMLEFTEDGESTATES = 1i32; +pub const TTILES_SELECTED: TOPTABITEMLEFTEDGESTATES = 3i32; +pub const TTIRES_DISABLED: TOPTABITEMRIGHTEDGESTATES = 4i32; +pub const TTIRES_FOCUSED: TOPTABITEMRIGHTEDGESTATES = 5i32; +pub const TTIRES_HOT: TOPTABITEMRIGHTEDGESTATES = 2i32; +pub const TTIRES_NORMAL: TOPTABITEMRIGHTEDGESTATES = 1i32; +pub const TTIRES_SELECTED: TOPTABITEMRIGHTEDGESTATES = 3i32; +pub const TTIS_DISABLED: TOPTABITEMSTATES = 4i32; +pub const TTIS_FOCUSED: TOPTABITEMSTATES = 5i32; +pub const TTIS_HOT: TOPTABITEMSTATES = 2i32; +pub const TTIS_NORMAL: TOPTABITEMSTATES = 1i32; +pub const TTIS_SELECTED: TOPTABITEMSTATES = 3i32; +pub const TTI_ERROR: EDITBALLOONTIP_ICON = 3i32; +pub const TTI_ERROR_LARGE: EDITBALLOONTIP_ICON = 6i32; +pub const TTI_INFO: EDITBALLOONTIP_ICON = 1i32; +pub const TTI_INFO_LARGE: EDITBALLOONTIP_ICON = 4i32; +pub const TTI_NONE: EDITBALLOONTIP_ICON = 0i32; +pub const TTI_WARNING: EDITBALLOONTIP_ICON = 2i32; +pub const TTI_WARNING_LARGE: EDITBALLOONTIP_ICON = 5i32; +pub const TTM_ACTIVATE: u32 = 1025u32; +pub const TTM_ADDTOOL: u32 = 1074u32; +pub const TTM_ADDTOOLA: u32 = 1028u32; +pub const TTM_ADDTOOLW: u32 = 1074u32; +pub const TTM_ADJUSTRECT: u32 = 1055u32; +pub const TTM_DELTOOL: u32 = 1075u32; +pub const TTM_DELTOOLA: u32 = 1029u32; +pub const TTM_DELTOOLW: u32 = 1075u32; +pub const TTM_ENUMTOOLS: u32 = 1082u32; +pub const TTM_ENUMTOOLSA: u32 = 1038u32; +pub const TTM_ENUMTOOLSW: u32 = 1082u32; +pub const TTM_GETBUBBLESIZE: u32 = 1054u32; +pub const TTM_GETCURRENTTOOL: u32 = 1083u32; +pub const TTM_GETCURRENTTOOLA: u32 = 1039u32; +pub const TTM_GETCURRENTTOOLW: u32 = 1083u32; +pub const TTM_GETDELAYTIME: u32 = 1045u32; +pub const TTM_GETMARGIN: u32 = 1051u32; +pub const TTM_GETMAXTIPWIDTH: u32 = 1049u32; +pub const TTM_GETTEXT: u32 = 1080u32; +pub const TTM_GETTEXTA: u32 = 1035u32; +pub const TTM_GETTEXTW: u32 = 1080u32; +pub const TTM_GETTIPBKCOLOR: u32 = 1046u32; +pub const TTM_GETTIPTEXTCOLOR: u32 = 1047u32; +pub const TTM_GETTITLE: u32 = 1059u32; +pub const TTM_GETTOOLCOUNT: u32 = 1037u32; +pub const TTM_GETTOOLINFO: u32 = 1077u32; +pub const TTM_GETTOOLINFOA: u32 = 1032u32; +pub const TTM_GETTOOLINFOW: u32 = 1077u32; +pub const TTM_HITTEST: u32 = 1079u32; +pub const TTM_HITTESTA: u32 = 1034u32; +pub const TTM_HITTESTW: u32 = 1079u32; +pub const TTM_NEWTOOLRECT: u32 = 1076u32; +pub const TTM_NEWTOOLRECTA: u32 = 1030u32; +pub const TTM_NEWTOOLRECTW: u32 = 1076u32; +pub const TTM_POP: u32 = 1052u32; +pub const TTM_POPUP: u32 = 1058u32; +pub const TTM_RELAYEVENT: u32 = 1031u32; +pub const TTM_SETDELAYTIME: u32 = 1027u32; +pub const TTM_SETMARGIN: u32 = 1050u32; +pub const TTM_SETMAXTIPWIDTH: u32 = 1048u32; +pub const TTM_SETTIPBKCOLOR: u32 = 1043u32; +pub const TTM_SETTIPTEXTCOLOR: u32 = 1044u32; +pub const TTM_SETTITLE: u32 = 1057u32; +pub const TTM_SETTITLEA: u32 = 1056u32; +pub const TTM_SETTITLEW: u32 = 1057u32; +pub const TTM_SETTOOLINFO: u32 = 1078u32; +pub const TTM_SETTOOLINFOA: u32 = 1033u32; +pub const TTM_SETTOOLINFOW: u32 = 1078u32; +pub const TTM_SETWINDOWTHEME: u32 = 8203u32; +pub const TTM_TRACKACTIVATE: u32 = 1041u32; +pub const TTM_TRACKPOSITION: u32 = 1042u32; +pub const TTM_UPDATE: u32 = 1053u32; +pub const TTM_UPDATETIPTEXT: u32 = 1081u32; +pub const TTM_UPDATETIPTEXTA: u32 = 1036u32; +pub const TTM_UPDATETIPTEXTW: u32 = 1081u32; +pub const TTM_WINDOWFROMPOINT: u32 = 1040u32; +pub const TTN_FIRST: u32 = 4294966776u32; +pub const TTN_GETDISPINFO: u32 = 4294966766u32; +pub const TTN_GETDISPINFOA: u32 = 4294966776u32; +pub const TTN_GETDISPINFOW: u32 = 4294966766u32; +pub const TTN_LAST: u32 = 4294966747u32; +pub const TTN_LINKCLICK: u32 = 4294966773u32; +pub const TTN_NEEDTEXT: u32 = 4294966766u32; +pub const TTN_NEEDTEXTA: u32 = 4294966776u32; +pub const TTN_NEEDTEXTW: u32 = 4294966766u32; +pub const TTN_POP: u32 = 4294966774u32; +pub const TTN_SHOW: u32 = 4294966775u32; +pub const TTP_BALLOON: TOOLTIPPARTS = 3i32; +pub const TTP_BALLOONSTEM: TOOLTIPPARTS = 6i32; +pub const TTP_BALLOONTITLE: TOOLTIPPARTS = 4i32; +pub const TTP_CLOSE: TOOLTIPPARTS = 5i32; +pub const TTP_STANDARD: TOOLTIPPARTS = 1i32; +pub const TTP_STANDARDTITLE: TOOLTIPPARTS = 2i32; +pub const TTP_WRENCH: TOOLTIPPARTS = 7i32; +pub const TTSS_LINK: STANDARDSTATES = 2i32; +pub const TTSS_NORMAL: STANDARDSTATES = 1i32; +pub const TTS_ALWAYSTIP: u32 = 1u32; +pub const TTS_BALLOON: u32 = 64u32; +pub const TTS_CLOSE: u32 = 128u32; +pub const TTS_NOANIMATE: u32 = 16u32; +pub const TTS_NOFADE: u32 = 32u32; +pub const TTS_NOPREFIX: u32 = 2u32; +pub const TTS_USEVISUALSTYLE: u32 = 256u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TTTOOLINFOA { + pub cbSize: u32, + pub uFlags: TOOLTIP_FLAGS, + pub hwnd: super::super::Foundation::HWND, + pub uId: usize, + pub rect: super::super::Foundation::RECT, + pub hinst: super::super::Foundation::HINSTANCE, + pub lpszText: windows_sys::core::PSTR, + pub lParam: super::super::Foundation::LPARAM, + pub lpReserved: *mut core::ffi::c_void, +} +impl Default for TTTOOLINFOA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TTTOOLINFOW { + pub cbSize: u32, + pub uFlags: TOOLTIP_FLAGS, + pub hwnd: super::super::Foundation::HWND, + pub uId: usize, + pub rect: super::super::Foundation::RECT, + pub hinst: super::super::Foundation::HINSTANCE, + pub lpszText: windows_sys::core::PWSTR, + pub lParam: super::super::Foundation::LPARAM, + pub lpReserved: *mut core::ffi::c_void, +} +impl Default for TTTOOLINFOW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TTWS_HOT: WRENCHSTATES = 2i32; +pub const TTWS_NORMAL: WRENCHSTATES = 1i32; +pub const TTWS_PRESSED: WRENCHSTATES = 3i32; +pub const TUBS_DISABLED: THUMBBOTTOMSTATES = 5i32; +pub const TUBS_FOCUSED: THUMBBOTTOMSTATES = 4i32; +pub const TUBS_HOT: THUMBBOTTOMSTATES = 2i32; +pub const TUBS_NORMAL: THUMBBOTTOMSTATES = 1i32; +pub const TUBS_PRESSED: THUMBBOTTOMSTATES = 3i32; +pub const TUS_DISABLED: THUMBSTATES = 5i32; +pub const TUS_FOCUSED: THUMBSTATES = 4i32; +pub const TUS_HOT: THUMBSTATES = 2i32; +pub const TUS_NORMAL: THUMBSTATES = 1i32; +pub const TUS_PRESSED: THUMBSTATES = 3i32; +pub const TUTS_DISABLED: THUMBTOPSTATES = 5i32; +pub const TUTS_FOCUSED: THUMBTOPSTATES = 4i32; +pub const TUTS_HOT: THUMBTOPSTATES = 2i32; +pub const TUTS_NORMAL: THUMBTOPSTATES = 1i32; +pub const TUTS_PRESSED: THUMBTOPSTATES = 3i32; +pub const TUVLS_DISABLED: THUMBLEFTSTATES = 5i32; +pub const TUVLS_FOCUSED: THUMBLEFTSTATES = 4i32; +pub const TUVLS_HOT: THUMBLEFTSTATES = 2i32; +pub const TUVLS_NORMAL: THUMBLEFTSTATES = 1i32; +pub const TUVLS_PRESSED: THUMBLEFTSTATES = 3i32; +pub const TUVRS_DISABLED: THUMBRIGHTSTATES = 5i32; +pub const TUVRS_FOCUSED: THUMBRIGHTSTATES = 4i32; +pub const TUVRS_HOT: THUMBRIGHTSTATES = 2i32; +pub const TUVRS_NORMAL: THUMBRIGHTSTATES = 1i32; +pub const TUVRS_PRESSED: THUMBRIGHTSTATES = 3i32; +pub const TUVS_DISABLED: THUMBVERTSTATES = 5i32; +pub const TUVS_FOCUSED: THUMBVERTSTATES = 4i32; +pub const TUVS_HOT: THUMBVERTSTATES = 2i32; +pub const TUVS_NORMAL: THUMBVERTSTATES = 1i32; +pub const TUVS_PRESSED: THUMBVERTSTATES = 3i32; +pub const TVCDRF_NOIMAGES: u32 = 65536u32; +pub const TVC_BYKEYBOARD: NM_TREEVIEW_ACTION = 2u32; +pub const TVC_BYMOUSE: NM_TREEVIEW_ACTION = 1u32; +pub const TVC_UNKNOWN: NM_TREEVIEW_ACTION = 0u32; +pub const TVE_COLLAPSE: NM_TREEVIEW_ACTION = 1u32; +pub const TVE_COLLAPSERESET: NM_TREEVIEW_ACTION = 32768u32; +pub const TVE_EXPAND: NM_TREEVIEW_ACTION = 2u32; +pub const TVE_EXPANDPARTIAL: NM_TREEVIEW_ACTION = 16384u32; +pub const TVE_TOGGLE: NM_TREEVIEW_ACTION = 3u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TVGETITEMPARTRECTINFO { + pub hti: HTREEITEM, + pub prc: *mut super::super::Foundation::RECT, + pub partID: TVITEMPART, +} +impl Default for TVGETITEMPARTRECTINFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TVGIPR_BUTTON: TVITEMPART = 1i32; +pub const TVGN_CARET: u32 = 9u32; +pub const TVGN_CHILD: u32 = 4u32; +pub const TVGN_DROPHILITE: u32 = 8u32; +pub const TVGN_FIRSTVISIBLE: u32 = 5u32; +pub const TVGN_LASTVISIBLE: u32 = 10u32; +pub const TVGN_NEXT: u32 = 1u32; +pub const TVGN_NEXTSELECTED: u32 = 11u32; +pub const TVGN_NEXTVISIBLE: u32 = 6u32; +pub const TVGN_PARENT: u32 = 3u32; +pub const TVGN_PREVIOUS: u32 = 2u32; +pub const TVGN_PREVIOUSVISIBLE: u32 = 7u32; +pub const TVGN_ROOT: u32 = 0u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TVHITTESTINFO { + pub pt: super::super::Foundation::POINT, + pub flags: TVHITTESTINFO_FLAGS, + pub hItem: HTREEITEM, +} +pub type TVHITTESTINFO_FLAGS = u32; +pub const TVHT_ABOVE: TVHITTESTINFO_FLAGS = 256u32; +pub const TVHT_BELOW: TVHITTESTINFO_FLAGS = 512u32; +pub const TVHT_NOWHERE: TVHITTESTINFO_FLAGS = 1u32; +pub const TVHT_ONITEM: TVHITTESTINFO_FLAGS = 70u32; +pub const TVHT_ONITEMBUTTON: TVHITTESTINFO_FLAGS = 16u32; +pub const TVHT_ONITEMICON: TVHITTESTINFO_FLAGS = 2u32; +pub const TVHT_ONITEMINDENT: TVHITTESTINFO_FLAGS = 8u32; +pub const TVHT_ONITEMLABEL: TVHITTESTINFO_FLAGS = 4u32; +pub const TVHT_ONITEMRIGHT: TVHITTESTINFO_FLAGS = 32u32; +pub const TVHT_ONITEMSTATEICON: TVHITTESTINFO_FLAGS = 64u32; +pub const TVHT_TOLEFT: TVHITTESTINFO_FLAGS = 2048u32; +pub const TVHT_TORIGHT: TVHITTESTINFO_FLAGS = 1024u32; +pub const TVIF_CHILDREN: TVITEM_MASK = 64u32; +pub const TVIF_DI_SETITEM: TVITEM_MASK = 4096u32; +pub const TVIF_EXPANDEDIMAGE: TVITEM_MASK = 512u32; +pub const TVIF_HANDLE: TVITEM_MASK = 16u32; +pub const TVIF_IMAGE: TVITEM_MASK = 2u32; +pub const TVIF_INTEGRAL: TVITEM_MASK = 128u32; +pub const TVIF_PARAM: TVITEM_MASK = 4u32; +pub const TVIF_SELECTEDIMAGE: TVITEM_MASK = 32u32; +pub const TVIF_STATE: TVITEM_MASK = 8u32; +pub const TVIF_STATEEX: TVITEM_MASK = 256u32; +pub const TVIF_TEXT: TVITEM_MASK = 1u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TVINSERTSTRUCTA { + pub hParent: HTREEITEM, + pub hInsertAfter: HTREEITEM, + pub Anonymous: TVINSERTSTRUCTA_0, +} +impl Default for TVINSERTSTRUCTA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union TVINSERTSTRUCTA_0 { + pub itemex: TVITEMEXA, + pub item: TVITEMA, +} +impl Default for TVINSERTSTRUCTA_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TVINSERTSTRUCTW { + pub hParent: HTREEITEM, + pub hInsertAfter: HTREEITEM, + pub Anonymous: TVINSERTSTRUCTW_0, +} +impl Default for TVINSERTSTRUCTW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union TVINSERTSTRUCTW_0 { + pub itemex: TVITEMEXW, + pub item: TVITEMW, +} +impl Default for TVINSERTSTRUCTW_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const TVIS_BOLD: TREE_VIEW_ITEM_STATE_FLAGS = 16u32; +pub const TVIS_CUT: TREE_VIEW_ITEM_STATE_FLAGS = 4u32; +pub const TVIS_DROPHILITED: TREE_VIEW_ITEM_STATE_FLAGS = 8u32; +pub const TVIS_EXPANDED: TREE_VIEW_ITEM_STATE_FLAGS = 32u32; +pub const TVIS_EXPANDEDONCE: TREE_VIEW_ITEM_STATE_FLAGS = 64u32; +pub const TVIS_EXPANDPARTIAL: TREE_VIEW_ITEM_STATE_FLAGS = 128u32; +pub const TVIS_EX_ALL: TREE_VIEW_ITEM_STATE_FLAGS = 2u32; +pub const TVIS_EX_DISABLED: TREE_VIEW_ITEM_STATE_FLAGS = 2u32; +pub const TVIS_EX_FLAT: TREE_VIEW_ITEM_STATE_FLAGS = 1u32; +pub const TVIS_OVERLAYMASK: TREE_VIEW_ITEM_STATE_FLAGS = 3840u32; +pub const TVIS_SELECTED: TREE_VIEW_ITEM_STATE_FLAGS = 2u32; +pub const TVIS_STATEIMAGEMASK: TREE_VIEW_ITEM_STATE_FLAGS = 61440u32; +pub const TVIS_USERMASK: TREE_VIEW_ITEM_STATE_FLAGS = 61440u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TVITEMA { + pub mask: TVITEM_MASK, + pub hItem: HTREEITEM, + pub state: TREE_VIEW_ITEM_STATE_FLAGS, + pub stateMask: TREE_VIEW_ITEM_STATE_FLAGS, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub iSelectedImage: i32, + pub cChildren: TVITEMEXW_CHILDREN, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for TVITEMA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TVITEMEXA { + pub mask: TVITEM_MASK, + pub hItem: HTREEITEM, + pub state: u32, + pub stateMask: u32, + pub pszText: windows_sys::core::PSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub iSelectedImage: i32, + pub cChildren: TVITEMEXW_CHILDREN, + pub lParam: super::super::Foundation::LPARAM, + pub iIntegral: i32, + pub uStateEx: u32, + pub hwnd: super::super::Foundation::HWND, + pub iExpandedImage: i32, + pub iReserved: i32, +} +impl Default for TVITEMEXA { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TVITEMEXW { + pub mask: TVITEM_MASK, + pub hItem: HTREEITEM, + pub state: u32, + pub stateMask: u32, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub iSelectedImage: i32, + pub cChildren: TVITEMEXW_CHILDREN, + pub lParam: super::super::Foundation::LPARAM, + pub iIntegral: i32, + pub uStateEx: u32, + pub hwnd: super::super::Foundation::HWND, + pub iExpandedImage: i32, + pub iReserved: i32, +} +impl Default for TVITEMEXW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TVITEMEXW_CHILDREN = i32; +pub type TVITEMPART = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct TVITEMW { + pub mask: TVITEM_MASK, + pub hItem: HTREEITEM, + pub state: TREE_VIEW_ITEM_STATE_FLAGS, + pub stateMask: TREE_VIEW_ITEM_STATE_FLAGS, + pub pszText: windows_sys::core::PWSTR, + pub cchTextMax: i32, + pub iImage: i32, + pub iSelectedImage: i32, + pub cChildren: TVITEMEXW_CHILDREN, + pub lParam: super::super::Foundation::LPARAM, +} +impl Default for TVITEMW { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type TVITEM_MASK = u32; +pub const TVI_FIRST: HTREEITEM = -65535i32 as _; +pub const TVI_LAST: HTREEITEM = -65534i32 as _; +pub const TVI_ROOT: HTREEITEM = -65536i32 as _; +pub const TVI_SORT: HTREEITEM = -65533i32 as _; +pub const TVM_CREATEDRAGIMAGE: u32 = 4370u32; +pub const TVM_DELETEITEM: u32 = 4353u32; +pub const TVM_EDITLABEL: u32 = 4417u32; +pub const TVM_EDITLABELA: u32 = 4366u32; +pub const TVM_EDITLABELW: u32 = 4417u32; +pub const TVM_ENDEDITLABELNOW: u32 = 4374u32; +pub const TVM_ENSUREVISIBLE: u32 = 4372u32; +pub const TVM_EXPAND: u32 = 4354u32; +pub const TVM_GETBKCOLOR: u32 = 4383u32; +pub const TVM_GETCOUNT: u32 = 4357u32; +pub const TVM_GETEDITCONTROL: u32 = 4367u32; +pub const TVM_GETEXTENDEDSTYLE: u32 = 4397u32; +pub const TVM_GETIMAGELIST: u32 = 4360u32; +pub const TVM_GETINDENT: u32 = 4358u32; +pub const TVM_GETINSERTMARKCOLOR: u32 = 4390u32; +pub const TVM_GETISEARCHSTRING: u32 = 4416u32; +pub const TVM_GETISEARCHSTRINGA: u32 = 4375u32; +pub const TVM_GETISEARCHSTRINGW: u32 = 4416u32; +pub const TVM_GETITEM: u32 = 4414u32; +pub const TVM_GETITEMA: u32 = 4364u32; +pub const TVM_GETITEMHEIGHT: u32 = 4380u32; +pub const TVM_GETITEMPARTRECT: u32 = 4424u32; +pub const TVM_GETITEMRECT: u32 = 4356u32; +pub const TVM_GETITEMSTATE: u32 = 4391u32; +pub const TVM_GETITEMW: u32 = 4414u32; +pub const TVM_GETLINECOLOR: u32 = 4393u32; +pub const TVM_GETNEXTITEM: u32 = 4362u32; +pub const TVM_GETSCROLLTIME: u32 = 4386u32; +pub const TVM_GETSELECTEDCOUNT: u32 = 4422u32; +pub const TVM_GETTEXTCOLOR: u32 = 4384u32; +pub const TVM_GETTOOLTIPS: u32 = 4377u32; +pub const TVM_GETUNICODEFORMAT: u32 = 8198u32; +pub const TVM_GETVISIBLECOUNT: u32 = 4368u32; +pub const TVM_HITTEST: u32 = 4369u32; +pub const TVM_INSERTITEM: u32 = 4402u32; +pub const TVM_INSERTITEMA: u32 = 4352u32; +pub const TVM_INSERTITEMW: u32 = 4402u32; +pub const TVM_MAPACCIDTOHTREEITEM: u32 = 4394u32; +pub const TVM_MAPHTREEITEMTOACCID: u32 = 4395u32; +pub const TVM_SELECTITEM: u32 = 4363u32; +pub const TVM_SETAUTOSCROLLINFO: u32 = 4411u32; +pub const TVM_SETBKCOLOR: u32 = 4381u32; +pub const TVM_SETBORDER: u32 = 4387u32; +pub const TVM_SETEXTENDEDSTYLE: u32 = 4396u32; +pub const TVM_SETHOT: u32 = 4410u32; +pub const TVM_SETIMAGELIST: u32 = 4361u32; +pub const TVM_SETINDENT: u32 = 4359u32; +pub const TVM_SETINSERTMARK: u32 = 4378u32; +pub const TVM_SETINSERTMARKCOLOR: u32 = 4389u32; +pub const TVM_SETITEM: u32 = 4415u32; +pub const TVM_SETITEMA: u32 = 4365u32; +pub const TVM_SETITEMHEIGHT: u32 = 4379u32; +pub const TVM_SETITEMW: u32 = 4415u32; +pub const TVM_SETLINECOLOR: u32 = 4392u32; +pub const TVM_SETSCROLLTIME: u32 = 4385u32; +pub const TVM_SETTEXTCOLOR: u32 = 4382u32; +pub const TVM_SETTOOLTIPS: u32 = 4376u32; +pub const TVM_SETUNICODEFORMAT: u32 = 8197u32; +pub const TVM_SHOWINFOTIP: u32 = 4423u32; +pub const TVM_SORTCHILDREN: u32 = 4371u32; +pub const TVM_SORTCHILDRENCB: u32 = 4373u32; +pub const TVNRET_DEFAULT: u32 = 0u32; +pub const TVNRET_SKIPNEW: u32 = 2u32; +pub const TVNRET_SKIPOLD: u32 = 1u32; +pub const TVN_ASYNCDRAW: u32 = 4294966876u32; +pub const TVN_BEGINDRAG: u32 = 4294966840u32; +pub const TVN_BEGINDRAGA: u32 = 4294966889u32; +pub const TVN_BEGINDRAGW: u32 = 4294966840u32; +pub const TVN_BEGINLABELEDIT: u32 = 4294966837u32; +pub const TVN_BEGINLABELEDITA: u32 = 4294966886u32; +pub const TVN_BEGINLABELEDITW: u32 = 4294966837u32; +pub const TVN_BEGINRDRAG: u32 = 4294966839u32; +pub const TVN_BEGINRDRAGA: u32 = 4294966888u32; +pub const TVN_BEGINRDRAGW: u32 = 4294966839u32; +pub const TVN_DELETEITEM: u32 = 4294966838u32; +pub const TVN_DELETEITEMA: u32 = 4294966887u32; +pub const TVN_DELETEITEMW: u32 = 4294966838u32; +pub const TVN_ENDLABELEDIT: u32 = 4294966836u32; +pub const TVN_ENDLABELEDITA: u32 = 4294966885u32; +pub const TVN_ENDLABELEDITW: u32 = 4294966836u32; +pub const TVN_FIRST: u32 = 4294966896u32; +pub const TVN_GETDISPINFO: u32 = 4294966844u32; +pub const TVN_GETDISPINFOA: u32 = 4294966893u32; +pub const TVN_GETDISPINFOW: u32 = 4294966844u32; +pub const TVN_GETINFOTIP: u32 = 4294966882u32; +pub const TVN_GETINFOTIPA: u32 = 4294966883u32; +pub const TVN_GETINFOTIPW: u32 = 4294966882u32; +pub const TVN_ITEMCHANGED: u32 = 4294966877u32; +pub const TVN_ITEMCHANGEDA: u32 = 4294966878u32; +pub const TVN_ITEMCHANGEDW: u32 = 4294966877u32; +pub const TVN_ITEMCHANGING: u32 = 4294966879u32; +pub const TVN_ITEMCHANGINGA: u32 = 4294966880u32; +pub const TVN_ITEMCHANGINGW: u32 = 4294966879u32; +pub const TVN_ITEMEXPANDED: u32 = 4294966841u32; +pub const TVN_ITEMEXPANDEDA: u32 = 4294966890u32; +pub const TVN_ITEMEXPANDEDW: u32 = 4294966841u32; +pub const TVN_ITEMEXPANDING: u32 = 4294966842u32; +pub const TVN_ITEMEXPANDINGA: u32 = 4294966891u32; +pub const TVN_ITEMEXPANDINGW: u32 = 4294966842u32; +pub const TVN_KEYDOWN: u32 = 4294966884u32; +pub const TVN_LAST: u32 = 4294966797u32; +pub const TVN_SELCHANGED: u32 = 4294966845u32; +pub const TVN_SELCHANGEDA: u32 = 4294966894u32; +pub const TVN_SELCHANGEDW: u32 = 4294966845u32; +pub const TVN_SELCHANGING: u32 = 4294966846u32; +pub const TVN_SELCHANGINGA: u32 = 4294966895u32; +pub const TVN_SELCHANGINGW: u32 = 4294966846u32; +pub const TVN_SETDISPINFO: u32 = 4294966843u32; +pub const TVN_SETDISPINFOA: u32 = 4294966892u32; +pub const TVN_SETDISPINFOW: u32 = 4294966843u32; +pub const TVN_SINGLEEXPAND: u32 = 4294966881u32; +pub const TVP_BRANCH: TREEVIEWPARTS = 3i32; +pub const TVP_GLYPH: TREEVIEWPARTS = 2i32; +pub const TVP_HOTGLYPH: TREEVIEWPARTS = 4i32; +pub const TVP_TREEITEM: TREEVIEWPARTS = 1i32; +pub const TVSBF_XBORDER: u32 = 1u32; +pub const TVSBF_YBORDER: u32 = 2u32; +pub const TVSIL_NORMAL: u32 = 0u32; +pub const TVSIL_STATE: u32 = 2u32; +pub const TVSI_NOSINGLEEXPAND: u32 = 32768u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct TVSORTCB { + pub hParent: HTREEITEM, + pub lpfnCompare: PFNTVCOMPARE, + pub lParam: super::super::Foundation::LPARAM, +} +pub const TVS_CHECKBOXES: u32 = 256u32; +pub const TVS_DISABLEDRAGDROP: u32 = 16u32; +pub const TVS_EDITLABELS: u32 = 8u32; +pub const TVS_EX_AUTOHSCROLL: u32 = 32u32; +pub const TVS_EX_DIMMEDCHECKBOXES: u32 = 512u32; +pub const TVS_EX_DOUBLEBUFFER: u32 = 4u32; +pub const TVS_EX_DRAWIMAGEASYNC: u32 = 1024u32; +pub const TVS_EX_EXCLUSIONCHECKBOXES: u32 = 256u32; +pub const TVS_EX_FADEINOUTEXPANDOS: u32 = 64u32; +pub const TVS_EX_MULTISELECT: u32 = 2u32; +pub const TVS_EX_NOINDENTSTATE: u32 = 8u32; +pub const TVS_EX_NOSINGLECOLLAPSE: u32 = 1u32; +pub const TVS_EX_PARTIALCHECKBOXES: u32 = 128u32; +pub const TVS_EX_RICHTOOLTIP: u32 = 16u32; +pub const TVS_FULLROWSELECT: u32 = 4096u32; +pub const TVS_HASBUTTONS: u32 = 1u32; +pub const TVS_HASLINES: u32 = 2u32; +pub const TVS_INFOTIP: u32 = 2048u32; +pub const TVS_LINESATROOT: u32 = 4u32; +pub const TVS_NOHSCROLL: u32 = 32768u32; +pub const TVS_NONEVENHEIGHT: u32 = 16384u32; +pub const TVS_NOSCROLL: u32 = 8192u32; +pub const TVS_NOTOOLTIPS: u32 = 128u32; +pub const TVS_RTLREADING: u32 = 64u32; +pub const TVS_SHOWSELALWAYS: u32 = 32u32; +pub const TVS_SINGLEEXPAND: u32 = 1024u32; +pub const TVS_TRACKSELECT: u32 = 512u32; +pub const TV_FIRST: u32 = 4352u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct UDACCEL { + pub nSec: u32, + pub nInc: u32, +} +pub const UDM_GETACCEL: u32 = 1132u32; +pub const UDM_GETBASE: u32 = 1134u32; +pub const UDM_GETBUDDY: u32 = 1130u32; +pub const UDM_GETPOS: u32 = 1128u32; +pub const UDM_GETPOS32: u32 = 1138u32; +pub const UDM_GETRANGE: u32 = 1126u32; +pub const UDM_GETRANGE32: u32 = 1136u32; +pub const UDM_GETUNICODEFORMAT: u32 = 8198u32; +pub const UDM_SETACCEL: u32 = 1131u32; +pub const UDM_SETBASE: u32 = 1133u32; +pub const UDM_SETBUDDY: u32 = 1129u32; +pub const UDM_SETPOS: u32 = 1127u32; +pub const UDM_SETPOS32: u32 = 1137u32; +pub const UDM_SETRANGE: u32 = 1125u32; +pub const UDM_SETRANGE32: u32 = 1135u32; +pub const UDM_SETUNICODEFORMAT: u32 = 8197u32; +pub const UDN_DELTAPOS: u32 = 4294966574u32; +pub const UDN_FIRST: u32 = 4294966575u32; +pub const UDN_LAST: u32 = 4294966567u32; +pub const UDS_ALIGNLEFT: u32 = 8u32; +pub const UDS_ALIGNRIGHT: u32 = 4u32; +pub const UDS_ARROWKEYS: u32 = 32u32; +pub const UDS_AUTOBUDDY: u32 = 16u32; +pub const UDS_HORZ: u32 = 64u32; +pub const UDS_HOTTRACK: u32 = 256u32; +pub const UDS_NOTHOUSANDS: u32 = 128u32; +pub const UDS_SETBUDDYINT: u32 = 2u32; +pub const UDS_WRAP: u32 = 1u32; +pub const UD_MAXVAL: u32 = 32767u32; +pub type UPDATEMETADATASTATES = i32; +pub const UPDOWN_CLASS: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_updown32"); +pub const UPDOWN_CLASSA: windows_sys::core::PCSTR = windows_sys::core::s!("msctls_updown32"); +pub const UPDOWN_CLASSW: windows_sys::core::PCWSTR = windows_sys::core::w!("msctls_updown32"); +pub type UPHORZSTATES = i32; +pub const UPHZS_DISABLED: UPHORZSTATES = 4i32; +pub const UPHZS_HOT: UPHORZSTATES = 2i32; +pub const UPHZS_NORMAL: UPHORZSTATES = 1i32; +pub const UPHZS_PRESSED: UPHORZSTATES = 3i32; +pub type UPSTATES = i32; +pub const UPS_DISABLED: UPSTATES = 4i32; +pub const UPS_HOT: UPSTATES = 2i32; +pub const UPS_NORMAL: UPSTATES = 1i32; +pub const UPS_PRESSED: UPSTATES = 3i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct USAGE_PROPERTIES { + pub level: u16, + pub page: u16, + pub usage: u16, + pub logicalMinimum: i32, + pub logicalMaximum: i32, + pub unit: u16, + pub exponent: u16, + pub count: u8, + pub physicalMinimum: i32, + pub physicalMaximum: i32, +} +pub type USERTILEPARTS = i32; +pub const UTP_HOVERBACKGROUND: USERTILEPARTS = 2i32; +pub const UTP_STROKEBACKGROUND: USERTILEPARTS = 1i32; +pub const UTS_HOT: HOVERBACKGROUNDSTATES = 2i32; +pub const UTS_NORMAL: HOVERBACKGROUNDSTATES = 1i32; +pub const UTS_PRESSED: HOVERBACKGROUNDSTATES = 3i32; +pub const VALIDBITS: SET_THEME_APP_PROPERTIES_FLAGS = 7u32; +pub type VALIGN = i32; +pub const VA_BOTTOM: VALIGN = 2i32; +pub const VA_CENTER: VALIGN = 1i32; +pub const VA_TOP: VALIGN = 0i32; +pub type VERTSCROLLSTATES = i32; +pub type VERTTHUMBSTATES = i32; +pub const VIEW_DETAILS: u32 = 3u32; +pub const VIEW_LARGEICONS: u32 = 0u32; +pub const VIEW_LIST: u32 = 2u32; +pub const VIEW_NETCONNECT: u32 = 9u32; +pub const VIEW_NETDISCONNECT: u32 = 10u32; +pub const VIEW_NEWFOLDER: u32 = 11u32; +pub const VIEW_PARENTFOLDER: u32 = 8u32; +pub const VIEW_SMALLICONS: u32 = 1u32; +pub const VIEW_SORTDATE: u32 = 6u32; +pub const VIEW_SORTNAME: u32 = 4u32; +pub const VIEW_SORTSIZE: u32 = 5u32; +pub const VIEW_SORTTYPE: u32 = 7u32; +pub const VIEW_VIEWMENU: u32 = 12u32; +pub const VSCLASS_AEROWIZARD: windows_sys::core::PCWSTR = windows_sys::core::w!("AEROWIZARD"); +pub const VSCLASS_AEROWIZARDSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("AEROWIZARDSTYLE"); +pub const VSCLASS_BUTTON: windows_sys::core::PCWSTR = windows_sys::core::w!("BUTTON"); +pub const VSCLASS_BUTTONSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("BUTTONSTYLE"); +pub const VSCLASS_CLOCK: windows_sys::core::PCWSTR = windows_sys::core::w!("CLOCK"); +pub const VSCLASS_COMBOBOX: windows_sys::core::PCWSTR = windows_sys::core::w!("COMBOBOX"); +pub const VSCLASS_COMBOBOXSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("COMBOBOXSTYLE"); +pub const VSCLASS_COMMUNICATIONS: windows_sys::core::PCWSTR = windows_sys::core::w!("COMMUNICATIONS"); +pub const VSCLASS_COMMUNICATIONSSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("COMMUNICATIONSSTYLE"); +pub const VSCLASS_CONTROLPANEL: windows_sys::core::PCWSTR = windows_sys::core::w!("CONTROLPANEL"); +pub const VSCLASS_CONTROLPANELSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("CONTROLPANELSTYLE"); +pub const VSCLASS_DATEPICKER: windows_sys::core::PCWSTR = windows_sys::core::w!("DATEPICKER"); +pub const VSCLASS_DATEPICKERSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("DATEPICKERSTYLE"); +pub const VSCLASS_DRAGDROP: windows_sys::core::PCWSTR = windows_sys::core::w!("DRAGDROP"); +pub const VSCLASS_DRAGDROPSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("DRAGDROPSTYLE"); +pub const VSCLASS_EDIT: windows_sys::core::PCWSTR = windows_sys::core::w!("EDIT"); +pub const VSCLASS_EDITSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("EDITSTYLE"); +pub const VSCLASS_EMPTYMARKUP: windows_sys::core::PCWSTR = windows_sys::core::w!("EMPTYMARKUP"); +pub const VSCLASS_EXPLORERBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("EXPLORERBAR"); +pub const VSCLASS_EXPLORERBARSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("EXPLORERBARSTYLE"); +pub const VSCLASS_FLYOUT: windows_sys::core::PCWSTR = windows_sys::core::w!("FLYOUT"); +pub const VSCLASS_FLYOUTSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("FLYOUTSTYLE"); +pub const VSCLASS_HEADER: windows_sys::core::PCWSTR = windows_sys::core::w!("HEADER"); +pub const VSCLASS_HEADERSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("HEADERSTYLE"); +pub const VSCLASS_LINK: windows_sys::core::PCWSTR = windows_sys::core::w!("LINK"); +pub const VSCLASS_LISTBOX: windows_sys::core::PCWSTR = windows_sys::core::w!("LISTBOX"); +pub const VSCLASS_LISTBOXSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("LISTBOXSTYLE"); +pub const VSCLASS_LISTVIEW: windows_sys::core::PCWSTR = windows_sys::core::w!("LISTVIEW"); +pub const VSCLASS_LISTVIEWSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("LISTVIEWSTYLE"); +pub const VSCLASS_MENU: windows_sys::core::PCWSTR = windows_sys::core::w!("MENU"); +pub const VSCLASS_MENUBAND: windows_sys::core::PCWSTR = windows_sys::core::w!("MENUBAND"); +pub const VSCLASS_MENUSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("MENUSTYLE"); +pub const VSCLASS_MONTHCAL: windows_sys::core::PCWSTR = windows_sys::core::w!("MONTHCAL"); +pub const VSCLASS_NAVIGATION: windows_sys::core::PCWSTR = windows_sys::core::w!("NAVIGATION"); +pub const VSCLASS_PAGE: windows_sys::core::PCWSTR = windows_sys::core::w!("PAGE"); +pub const VSCLASS_PROGRESS: windows_sys::core::PCWSTR = windows_sys::core::w!("PROGRESS"); +pub const VSCLASS_PROGRESSSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("PROGRESSSTYLE"); +pub const VSCLASS_REBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("REBAR"); +pub const VSCLASS_REBARSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("REBARSTYLE"); +pub const VSCLASS_SCROLLBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("SCROLLBAR"); +pub const VSCLASS_SCROLLBARSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("SCROLLBARSTYLE"); +pub const VSCLASS_SPIN: windows_sys::core::PCWSTR = windows_sys::core::w!("SPIN"); +pub const VSCLASS_SPINSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("SPINSTYLE"); +pub const VSCLASS_STARTPANEL: windows_sys::core::PCWSTR = windows_sys::core::w!("STARTPANEL"); +pub const VSCLASS_STATIC: windows_sys::core::PCWSTR = windows_sys::core::w!("STATIC"); +pub const VSCLASS_STATUS: windows_sys::core::PCWSTR = windows_sys::core::w!("STATUS"); +pub const VSCLASS_STATUSSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("STATUSSTYLE"); +pub const VSCLASS_TAB: windows_sys::core::PCWSTR = windows_sys::core::w!("TAB"); +pub const VSCLASS_TABSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("TABSTYLE"); +pub const VSCLASS_TASKBAND: windows_sys::core::PCWSTR = windows_sys::core::w!("TASKBAND"); +pub const VSCLASS_TASKBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("TASKBAR"); +pub const VSCLASS_TASKDIALOG: windows_sys::core::PCWSTR = windows_sys::core::w!("TASKDIALOG"); +pub const VSCLASS_TASKDIALOGSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("TASKDIALOGSTYLE"); +pub const VSCLASS_TEXTSELECTIONGRIPPER: windows_sys::core::PCWSTR = windows_sys::core::w!("TEXTSELECTIONGRIPPER"); +pub const VSCLASS_TEXTSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("TEXTSTYLE"); +pub const VSCLASS_TOOLBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("TOOLBAR"); +pub const VSCLASS_TOOLBARSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("TOOLBARSTYLE"); +pub const VSCLASS_TOOLTIP: windows_sys::core::PCWSTR = windows_sys::core::w!("TOOLTIP"); +pub const VSCLASS_TOOLTIPSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("TOOLTIPSTYLE"); +pub const VSCLASS_TRACKBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("TRACKBAR"); +pub const VSCLASS_TRACKBARSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("TRACKBARSTYLE"); +pub const VSCLASS_TRAYNOTIFY: windows_sys::core::PCWSTR = windows_sys::core::w!("TRAYNOTIFY"); +pub const VSCLASS_TREEVIEW: windows_sys::core::PCWSTR = windows_sys::core::w!("TREEVIEW"); +pub const VSCLASS_TREEVIEWSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("TREEVIEWSTYLE"); +pub const VSCLASS_USERTILE: windows_sys::core::PCWSTR = windows_sys::core::w!("USERTILE"); +pub const VSCLASS_WINDOW: windows_sys::core::PCWSTR = windows_sys::core::w!("WINDOW"); +pub const VSCLASS_WINDOWSTYLE: windows_sys::core::PCWSTR = windows_sys::core::w!("WINDOWSTYLE"); +pub const VSS_DISABLED: VERTSCROLLSTATES = 4i32; +pub const VSS_HOT: VERTSCROLLSTATES = 2i32; +pub const VSS_NORMAL: VERTSCROLLSTATES = 1i32; +pub const VSS_PUSHED: VERTSCROLLSTATES = 3i32; +pub const VTS_DISABLED: VERTTHUMBSTATES = 4i32; +pub const VTS_HOT: VERTTHUMBSTATES = 2i32; +pub const VTS_NORMAL: VERTTHUMBSTATES = 1i32; +pub const VTS_PUSHED: VERTTHUMBSTATES = 3i32; +pub type WARNINGSTATES = i32; +pub const WB_CLASSIFY: WORD_BREAK_ACTION = 3i32; +pub const WB_ISDELIMITER: WORD_BREAK_ACTION = 2i32; +pub const WB_LEFT: WORD_BREAK_ACTION = 0i32; +pub const WB_LEFTBREAK: WORD_BREAK_ACTION = 6i32; +pub const WB_MOVEWORDLEFT: WORD_BREAK_ACTION = 4i32; +pub const WB_MOVEWORDRIGHT: WORD_BREAK_ACTION = 5i32; +pub const WB_RIGHT: WORD_BREAK_ACTION = 1i32; +pub const WB_RIGHTBREAK: WORD_BREAK_ACTION = 7i32; +pub const WC_BUTTON: windows_sys::core::PCWSTR = windows_sys::core::w!("Button"); +pub const WC_BUTTONA: windows_sys::core::PCSTR = windows_sys::core::s!("Button"); +pub const WC_BUTTONW: windows_sys::core::PCWSTR = windows_sys::core::w!("Button"); +pub const WC_COMBOBOX: windows_sys::core::PCWSTR = windows_sys::core::w!("ComboBox"); +pub const WC_COMBOBOXA: windows_sys::core::PCSTR = windows_sys::core::s!("ComboBox"); +pub const WC_COMBOBOXEX: windows_sys::core::PCWSTR = windows_sys::core::w!("ComboBoxEx32"); +pub const WC_COMBOBOXEXA: windows_sys::core::PCSTR = windows_sys::core::s!("ComboBoxEx32"); +pub const WC_COMBOBOXEXW: windows_sys::core::PCWSTR = windows_sys::core::w!("ComboBoxEx32"); +pub const WC_COMBOBOXW: windows_sys::core::PCWSTR = windows_sys::core::w!("ComboBox"); +pub const WC_EDIT: windows_sys::core::PCWSTR = windows_sys::core::w!("Edit"); +pub const WC_EDITA: windows_sys::core::PCSTR = windows_sys::core::s!("Edit"); +pub const WC_EDITW: windows_sys::core::PCWSTR = windows_sys::core::w!("Edit"); +pub const WC_HEADER: windows_sys::core::PCWSTR = windows_sys::core::w!("SysHeader32"); +pub const WC_HEADERA: windows_sys::core::PCSTR = windows_sys::core::s!("SysHeader32"); +pub const WC_HEADERW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysHeader32"); +pub const WC_IPADDRESS: windows_sys::core::PCWSTR = windows_sys::core::w!("SysIPAddress32"); +pub const WC_IPADDRESSA: windows_sys::core::PCSTR = windows_sys::core::s!("SysIPAddress32"); +pub const WC_IPADDRESSW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysIPAddress32"); +pub const WC_LINK: windows_sys::core::PCWSTR = windows_sys::core::w!("SysLink"); +pub const WC_LISTBOX: windows_sys::core::PCWSTR = windows_sys::core::w!("ListBox"); +pub const WC_LISTBOXA: windows_sys::core::PCSTR = windows_sys::core::s!("ListBox"); +pub const WC_LISTBOXW: windows_sys::core::PCWSTR = windows_sys::core::w!("ListBox"); +pub const WC_LISTVIEW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysListView32"); +pub const WC_LISTVIEWA: windows_sys::core::PCSTR = windows_sys::core::s!("SysListView32"); +pub const WC_LISTVIEWW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysListView32"); +pub const WC_NATIVEFONTCTL: windows_sys::core::PCWSTR = windows_sys::core::w!("NativeFontCtl"); +pub const WC_NATIVEFONTCTLA: windows_sys::core::PCSTR = windows_sys::core::s!("NativeFontCtl"); +pub const WC_NATIVEFONTCTLW: windows_sys::core::PCWSTR = windows_sys::core::w!("NativeFontCtl"); +pub const WC_PAGESCROLLER: windows_sys::core::PCWSTR = windows_sys::core::w!("SysPager"); +pub const WC_PAGESCROLLERA: windows_sys::core::PCSTR = windows_sys::core::s!("SysPager"); +pub const WC_PAGESCROLLERW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysPager"); +pub const WC_SCROLLBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("ScrollBar"); +pub const WC_SCROLLBARA: windows_sys::core::PCSTR = windows_sys::core::s!("ScrollBar"); +pub const WC_SCROLLBARW: windows_sys::core::PCWSTR = windows_sys::core::w!("ScrollBar"); +pub const WC_STATIC: windows_sys::core::PCWSTR = windows_sys::core::w!("Static"); +pub const WC_STATICA: windows_sys::core::PCSTR = windows_sys::core::s!("Static"); +pub const WC_STATICW: windows_sys::core::PCWSTR = windows_sys::core::w!("Static"); +pub const WC_TABCONTROL: windows_sys::core::PCWSTR = windows_sys::core::w!("SysTabControl32"); +pub const WC_TABCONTROLA: windows_sys::core::PCSTR = windows_sys::core::s!("SysTabControl32"); +pub const WC_TABCONTROLW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysTabControl32"); +pub const WC_TREEVIEW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysTreeView32"); +pub const WC_TREEVIEWA: windows_sys::core::PCSTR = windows_sys::core::s!("SysTreeView32"); +pub const WC_TREEVIEWW: windows_sys::core::PCWSTR = windows_sys::core::w!("SysTreeView32"); +pub type WINDOWPARTS = i32; +pub type WINDOWTHEMEATTRIBUTETYPE = i32; +pub const WIZ_BODYCX: u32 = 184u32; +pub const WIZ_BODYX: u32 = 92u32; +pub const WIZ_CXBMP: u32 = 80u32; +pub const WIZ_CXDLG: u32 = 276u32; +pub const WIZ_CYDLG: u32 = 140u32; +pub const WMN_FIRST: u32 = 4294966296u32; +pub const WMN_LAST: u32 = 4294966096u32; +pub const WM_CTLCOLOR: u32 = 25u32; +pub const WM_MOUSEHOVER: u32 = 673u32; +pub const WM_MOUSELEAVE: u32 = 675u32; +pub type WORD_BREAK_ACTION = i32; +pub const WP_BORDER: WINDOWPARTS = 39i32; +pub const WP_CAPTION: WINDOWPARTS = 1i32; +pub const WP_CAPTIONSIZINGTEMPLATE: WINDOWPARTS = 30i32; +pub const WP_CLOSEBUTTON: WINDOWPARTS = 18i32; +pub const WP_DIALOG: WINDOWPARTS = 29i32; +pub const WP_FRAME: WINDOWPARTS = 38i32; +pub const WP_FRAMEBOTTOM: WINDOWPARTS = 9i32; +pub const WP_FRAMEBOTTOMSIZINGTEMPLATE: WINDOWPARTS = 36i32; +pub const WP_FRAMELEFT: WINDOWPARTS = 7i32; +pub const WP_FRAMELEFTSIZINGTEMPLATE: WINDOWPARTS = 32i32; +pub const WP_FRAMERIGHT: WINDOWPARTS = 8i32; +pub const WP_FRAMERIGHTSIZINGTEMPLATE: WINDOWPARTS = 34i32; +pub const WP_HELPBUTTON: WINDOWPARTS = 23i32; +pub const WP_HORZSCROLL: WINDOWPARTS = 25i32; +pub const WP_HORZTHUMB: WINDOWPARTS = 26i32; +pub const WP_MAXBUTTON: WINDOWPARTS = 17i32; +pub const WP_MAXCAPTION: WINDOWPARTS = 5i32; +pub const WP_MDICLOSEBUTTON: WINDOWPARTS = 20i32; +pub const WP_MDIHELPBUTTON: WINDOWPARTS = 24i32; +pub const WP_MDIMINBUTTON: WINDOWPARTS = 16i32; +pub const WP_MDIRESTOREBUTTON: WINDOWPARTS = 22i32; +pub const WP_MDISYSBUTTON: WINDOWPARTS = 14i32; +pub const WP_MINBUTTON: WINDOWPARTS = 15i32; +pub const WP_MINCAPTION: WINDOWPARTS = 3i32; +pub const WP_RESTOREBUTTON: WINDOWPARTS = 21i32; +pub const WP_SMALLCAPTION: WINDOWPARTS = 2i32; +pub const WP_SMALLCAPTIONSIZINGTEMPLATE: WINDOWPARTS = 31i32; +pub const WP_SMALLCLOSEBUTTON: WINDOWPARTS = 19i32; +pub const WP_SMALLFRAMEBOTTOM: WINDOWPARTS = 12i32; +pub const WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE: WINDOWPARTS = 37i32; +pub const WP_SMALLFRAMELEFT: WINDOWPARTS = 10i32; +pub const WP_SMALLFRAMELEFTSIZINGTEMPLATE: WINDOWPARTS = 33i32; +pub const WP_SMALLFRAMERIGHT: WINDOWPARTS = 11i32; +pub const WP_SMALLFRAMERIGHTSIZINGTEMPLATE: WINDOWPARTS = 35i32; +pub const WP_SMALLMAXCAPTION: WINDOWPARTS = 6i32; +pub const WP_SMALLMINCAPTION: WINDOWPARTS = 4i32; +pub const WP_SYSBUTTON: WINDOWPARTS = 13i32; +pub const WP_VERTSCROLL: WINDOWPARTS = 27i32; +pub const WP_VERTTHUMB: WINDOWPARTS = 28i32; +pub type WRENCHSTATES = i32; +pub type WSB_PROP = i32; +pub const WSB_PROP_CXHSCROLL: WSB_PROP = 2i32; +pub const WSB_PROP_CXHTHUMB: WSB_PROP = 16i32; +pub const WSB_PROP_CXVSCROLL: WSB_PROP = 8i32; +pub const WSB_PROP_CYHSCROLL: WSB_PROP = 4i32; +pub const WSB_PROP_CYVSCROLL: WSB_PROP = 1i32; +pub const WSB_PROP_CYVTHUMB: WSB_PROP = 32i32; +pub const WSB_PROP_HBKGCOLOR: WSB_PROP = 128i32; +pub const WSB_PROP_HSTYLE: WSB_PROP = 512i32; +pub const WSB_PROP_MASK: i32 = 4095i32; +pub const WSB_PROP_PALETTE: WSB_PROP = 2048i32; +pub const WSB_PROP_VBKGCOLOR: WSB_PROP = 64i32; +pub const WSB_PROP_VSTYLE: WSB_PROP = 256i32; +pub const WSB_PROP_WINSTYLE: WSB_PROP = 1024i32; +pub const WTA_NONCLIENT: WINDOWTHEMEATTRIBUTETYPE = 1i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct WTA_OPTIONS { + pub dwFlags: u32, + pub dwMask: u32, +} +pub const WTNCA_NODRAWCAPTION: u32 = 1u32; +pub const WTNCA_NODRAWICON: u32 = 2u32; +pub const WTNCA_NOMIRRORHELP: u32 = 8u32; +pub const WTNCA_NOSYSMENU: u32 = 4u32; +pub type _LI_METRIC = i32; +pub const chx1: u32 = 1040u32; +pub const chx10: u32 = 1049u32; +pub const chx11: u32 = 1050u32; +pub const chx12: u32 = 1051u32; +pub const chx13: u32 = 1052u32; +pub const chx14: u32 = 1053u32; +pub const chx15: u32 = 1054u32; +pub const chx16: u32 = 1055u32; +pub const chx2: u32 = 1041u32; +pub const chx3: u32 = 1042u32; +pub const chx4: u32 = 1043u32; +pub const chx5: u32 = 1044u32; +pub const chx6: u32 = 1045u32; +pub const chx7: u32 = 1046u32; +pub const chx8: u32 = 1047u32; +pub const chx9: u32 = 1048u32; +pub const cmb1: u32 = 1136u32; +pub const cmb10: u32 = 1145u32; +pub const cmb11: u32 = 1146u32; +pub const cmb12: u32 = 1147u32; +pub const cmb13: u32 = 1148u32; +pub const cmb14: u32 = 1149u32; +pub const cmb15: u32 = 1150u32; +pub const cmb16: u32 = 1151u32; +pub const cmb2: u32 = 1137u32; +pub const cmb3: u32 = 1138u32; +pub const cmb4: u32 = 1139u32; +pub const cmb5: u32 = 1140u32; +pub const cmb6: u32 = 1141u32; +pub const cmb7: u32 = 1142u32; +pub const cmb8: u32 = 1143u32; +pub const cmb9: u32 = 1144u32; +pub const ctl1: u32 = 1184u32; +pub const ctlFirst: u32 = 1024u32; +pub const ctlLast: u32 = 1279u32; +pub const edt1: u32 = 1152u32; +pub const edt10: u32 = 1161u32; +pub const edt11: u32 = 1162u32; +pub const edt12: u32 = 1163u32; +pub const edt13: u32 = 1164u32; +pub const edt14: u32 = 1165u32; +pub const edt15: u32 = 1166u32; +pub const edt16: u32 = 1167u32; +pub const edt2: u32 = 1153u32; +pub const edt3: u32 = 1154u32; +pub const edt4: u32 = 1155u32; +pub const edt5: u32 = 1156u32; +pub const edt6: u32 = 1157u32; +pub const edt7: u32 = 1158u32; +pub const edt8: u32 = 1159u32; +pub const edt9: u32 = 1160u32; +pub const frm1: u32 = 1076u32; +pub const frm2: u32 = 1077u32; +pub const frm3: u32 = 1078u32; +pub const frm4: u32 = 1079u32; +pub const grp1: u32 = 1072u32; +pub const grp2: u32 = 1073u32; +pub const grp3: u32 = 1074u32; +pub const grp4: u32 = 1075u32; +pub const ico1: u32 = 1084u32; +pub const ico2: u32 = 1085u32; +pub const ico3: u32 = 1086u32; +pub const ico4: u32 = 1087u32; +pub const lst1: u32 = 1120u32; +pub const lst10: u32 = 1129u32; +pub const lst11: u32 = 1130u32; +pub const lst12: u32 = 1131u32; +pub const lst13: u32 = 1132u32; +pub const lst14: u32 = 1133u32; +pub const lst15: u32 = 1134u32; +pub const lst16: u32 = 1135u32; +pub const lst2: u32 = 1121u32; +pub const lst3: u32 = 1122u32; +pub const lst4: u32 = 1123u32; +pub const lst5: u32 = 1124u32; +pub const lst6: u32 = 1125u32; +pub const lst7: u32 = 1126u32; +pub const lst8: u32 = 1127u32; +pub const lst9: u32 = 1128u32; +pub const psh1: u32 = 1024u32; +pub const psh10: u32 = 1033u32; +pub const psh11: u32 = 1034u32; +pub const psh12: u32 = 1035u32; +pub const psh13: u32 = 1036u32; +pub const psh14: u32 = 1037u32; +pub const psh15: u32 = 1038u32; +pub const psh16: u32 = 1039u32; +pub const psh2: u32 = 1025u32; +pub const psh3: u32 = 1026u32; +pub const psh4: u32 = 1027u32; +pub const psh5: u32 = 1028u32; +pub const psh6: u32 = 1029u32; +pub const psh7: u32 = 1030u32; +pub const psh8: u32 = 1031u32; +pub const psh9: u32 = 1032u32; +pub const pshHelp: u32 = 1038u32; +pub const rad1: u32 = 1056u32; +pub const rad10: u32 = 1065u32; +pub const rad11: u32 = 1066u32; +pub const rad12: u32 = 1067u32; +pub const rad13: u32 = 1068u32; +pub const rad14: u32 = 1069u32; +pub const rad15: u32 = 1070u32; +pub const rad16: u32 = 1071u32; +pub const rad2: u32 = 1057u32; +pub const rad3: u32 = 1058u32; +pub const rad4: u32 = 1059u32; +pub const rad5: u32 = 1060u32; +pub const rad6: u32 = 1061u32; +pub const rad7: u32 = 1062u32; +pub const rad8: u32 = 1063u32; +pub const rad9: u32 = 1064u32; +pub const rct1: u32 = 1080u32; +pub const rct2: u32 = 1081u32; +pub const rct3: u32 = 1082u32; +pub const rct4: u32 = 1083u32; +pub const scr1: u32 = 1168u32; +pub const scr2: u32 = 1169u32; +pub const scr3: u32 = 1170u32; +pub const scr4: u32 = 1171u32; +pub const scr5: u32 = 1172u32; +pub const scr6: u32 = 1173u32; +pub const scr7: u32 = 1174u32; +pub const scr8: u32 = 1175u32; +pub const stc1: u32 = 1088u32; +pub const stc10: u32 = 1097u32; +pub const stc11: u32 = 1098u32; +pub const stc12: u32 = 1099u32; +pub const stc13: u32 = 1100u32; +pub const stc14: u32 = 1101u32; +pub const stc15: u32 = 1102u32; +pub const stc16: u32 = 1103u32; +pub const stc17: u32 = 1104u32; +pub const stc18: u32 = 1105u32; +pub const stc19: u32 = 1106u32; +pub const stc2: u32 = 1089u32; +pub const stc20: u32 = 1107u32; +pub const stc21: u32 = 1108u32; +pub const stc22: u32 = 1109u32; +pub const stc23: u32 = 1110u32; +pub const stc24: u32 = 1111u32; +pub const stc25: u32 = 1112u32; +pub const stc26: u32 = 1113u32; +pub const stc27: u32 = 1114u32; +pub const stc28: u32 = 1115u32; +pub const stc29: u32 = 1116u32; +pub const stc3: u32 = 1090u32; +pub const stc30: u32 = 1117u32; +pub const stc31: u32 = 1118u32; +pub const stc32: u32 = 1119u32; +pub const stc4: u32 = 1091u32; +pub const stc5: u32 = 1092u32; +pub const stc6: u32 = 1093u32; +pub const stc7: u32 = 1094u32; +pub const stc8: u32 = 1095u32; +pub const stc9: u32 = 1096u32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/HiDpi/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/HiDpi/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..66b7649879bb65597637286a78956a8fd73522e4 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/HiDpi/mod.rs @@ -0,0 +1,66 @@ +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn AdjustWindowRectExForDpi(lprect : *mut super::super::Foundation:: RECT, dwstyle : super::WindowsAndMessaging:: WINDOW_STYLE, bmenu : windows_sys::core::BOOL, dwexstyle : super::WindowsAndMessaging:: WINDOW_EX_STYLE, dpi : u32) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn AreDpiAwarenessContextsEqual(dpicontexta : DPI_AWARENESS_CONTEXT, dpicontextb : DPI_AWARENESS_CONTEXT) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn EnableNonClientDpiScaling(hwnd : super::super::Foundation:: HWND) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn GetAwarenessFromDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> DPI_AWARENESS); +windows_link::link!("user32.dll" "system" fn GetDialogControlDpiChangeBehavior(hwnd : super::super::Foundation:: HWND) -> DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS); +windows_link::link!("user32.dll" "system" fn GetDialogDpiChangeBehavior(hdlg : super::super::Foundation:: HWND) -> DIALOG_DPI_CHANGE_BEHAVIORS); +windows_link::link!("user32.dll" "system" fn GetDpiAwarenessContextForProcess(hprocess : super::super::Foundation:: HANDLE) -> DPI_AWARENESS_CONTEXT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("api-ms-win-shcore-scaling-l1-1-1.dll" "system" fn GetDpiForMonitor(hmonitor : super::super::Graphics::Gdi:: HMONITOR, dpitype : MONITOR_DPI_TYPE, dpix : *mut u32, dpiy : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn GetDpiForSystem() -> u32); +windows_link::link!("user32.dll" "system" fn GetDpiForWindow(hwnd : super::super::Foundation:: HWND) -> u32); +windows_link::link!("user32.dll" "system" fn GetDpiFromDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> u32); +windows_link::link!("api-ms-win-shcore-scaling-l1-1-1.dll" "system" fn GetProcessDpiAwareness(hprocess : super::super::Foundation:: HANDLE, value : *mut PROCESS_DPI_AWARENESS) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn GetSystemDpiForProcess(hprocess : super::super::Foundation:: HANDLE) -> u32); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("user32.dll" "system" fn GetSystemMetricsForDpi(nindex : super::WindowsAndMessaging:: SYSTEM_METRICS_INDEX, dpi : u32) -> i32); +windows_link::link!("user32.dll" "system" fn GetThreadDpiAwarenessContext() -> DPI_AWARENESS_CONTEXT); +windows_link::link!("user32.dll" "system" fn GetThreadDpiHostingBehavior() -> DPI_HOSTING_BEHAVIOR); +windows_link::link!("user32.dll" "system" fn GetWindowDpiAwarenessContext(hwnd : super::super::Foundation:: HWND) -> DPI_AWARENESS_CONTEXT); +windows_link::link!("user32.dll" "system" fn GetWindowDpiHostingBehavior(hwnd : super::super::Foundation:: HWND) -> DPI_HOSTING_BEHAVIOR); +windows_link::link!("user32.dll" "system" fn IsValidDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn LogicalToPhysicalPointForPerMonitorDPI(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_UI_Controls")] +windows_link::link!("uxtheme.dll" "system" fn OpenThemeDataForDpi(hwnd : super::super::Foundation:: HWND, pszclasslist : windows_sys::core::PCWSTR, dpi : u32) -> super::Controls:: HTHEME); +windows_link::link!("user32.dll" "system" fn PhysicalToLogicalPointForPerMonitorDPI(hwnd : super::super::Foundation:: HWND, lppoint : *mut super::super::Foundation:: POINT) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn SetDialogControlDpiChangeBehavior(hwnd : super::super::Foundation:: HWND, mask : DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values : DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn SetDialogDpiChangeBehavior(hdlg : super::super::Foundation:: HWND, mask : DIALOG_DPI_CHANGE_BEHAVIORS, values : DIALOG_DPI_CHANGE_BEHAVIORS) -> windows_sys::core::BOOL); +windows_link::link!("api-ms-win-shcore-scaling-l1-1-1.dll" "system" fn SetProcessDpiAwareness(value : PROCESS_DPI_AWARENESS) -> windows_sys::core::HRESULT); +windows_link::link!("user32.dll" "system" fn SetProcessDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn SetThreadDpiAwarenessContext(dpicontext : DPI_AWARENESS_CONTEXT) -> DPI_AWARENESS_CONTEXT); +windows_link::link!("user32.dll" "system" fn SetThreadDpiHostingBehavior(value : DPI_HOSTING_BEHAVIOR) -> DPI_HOSTING_BEHAVIOR); +windows_link::link!("user32.dll" "system" fn SystemParametersInfoForDpi(uiaction : u32, uiparam : u32, pvparam : *mut core::ffi::c_void, fwinini : u32, dpi : u32) -> windows_sys::core::BOOL); +pub const DCDC_DEFAULT: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = 0i32; +pub const DCDC_DISABLE_FONT_UPDATE: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = 1i32; +pub const DCDC_DISABLE_RELAYOUT: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = 2i32; +pub const DDC_DEFAULT: DIALOG_DPI_CHANGE_BEHAVIORS = 0i32; +pub const DDC_DISABLE_ALL: DIALOG_DPI_CHANGE_BEHAVIORS = 1i32; +pub const DDC_DISABLE_CONTROL_RELAYOUT: DIALOG_DPI_CHANGE_BEHAVIORS = 4i32; +pub const DDC_DISABLE_RESIZE: DIALOG_DPI_CHANGE_BEHAVIORS = 2i32; +pub type DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = i32; +pub type DIALOG_DPI_CHANGE_BEHAVIORS = i32; +pub type DPI_AWARENESS = i32; +pub type DPI_AWARENESS_CONTEXT = *mut core::ffi::c_void; +pub const DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE: DPI_AWARENESS_CONTEXT = -3i32 as _; +pub const DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2: DPI_AWARENESS_CONTEXT = -4i32 as _; +pub const DPI_AWARENESS_CONTEXT_SYSTEM_AWARE: DPI_AWARENESS_CONTEXT = -2i32 as _; +pub const DPI_AWARENESS_CONTEXT_UNAWARE: DPI_AWARENESS_CONTEXT = -1i32 as _; +pub const DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED: DPI_AWARENESS_CONTEXT = -5i32 as _; +pub const DPI_AWARENESS_INVALID: DPI_AWARENESS = -1i32; +pub const DPI_AWARENESS_PER_MONITOR_AWARE: DPI_AWARENESS = 2i32; +pub const DPI_AWARENESS_SYSTEM_AWARE: DPI_AWARENESS = 1i32; +pub const DPI_AWARENESS_UNAWARE: DPI_AWARENESS = 0i32; +pub type DPI_HOSTING_BEHAVIOR = i32; +pub const DPI_HOSTING_BEHAVIOR_DEFAULT: DPI_HOSTING_BEHAVIOR = 0i32; +pub const DPI_HOSTING_BEHAVIOR_INVALID: DPI_HOSTING_BEHAVIOR = -1i32; +pub const DPI_HOSTING_BEHAVIOR_MIXED: DPI_HOSTING_BEHAVIOR = 1i32; +pub const MDT_ANGULAR_DPI: MONITOR_DPI_TYPE = 1i32; +pub const MDT_DEFAULT: MONITOR_DPI_TYPE = 0i32; +pub const MDT_EFFECTIVE_DPI: MONITOR_DPI_TYPE = 0i32; +pub const MDT_RAW_DPI: MONITOR_DPI_TYPE = 2i32; +pub type MONITOR_DPI_TYPE = i32; +pub type PROCESS_DPI_AWARENESS = i32; +pub const PROCESS_DPI_UNAWARE: PROCESS_DPI_AWARENESS = 0i32; +pub const PROCESS_PER_MONITOR_DPI_AWARE: PROCESS_DPI_AWARENESS = 2i32; +pub const PROCESS_SYSTEM_DPI_AWARE: PROCESS_DPI_AWARENESS = 1i32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Input/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Input/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..2c5bb5ab8c40509e225f01b0bacb7f1e6effc828 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/Input/mod.rs @@ -0,0 +1,232 @@ +#[cfg(feature = "Win32_UI_Input_Ime")] +pub mod Ime; +#[cfg(feature = "Win32_UI_Input_KeyboardAndMouse")] +pub mod KeyboardAndMouse; +#[cfg(feature = "Win32_UI_Input_Pointer")] +pub mod Pointer; +#[cfg(feature = "Win32_UI_Input_Touch")] +pub mod Touch; +#[cfg(feature = "Win32_UI_Input_XboxController")] +pub mod XboxController; +windows_link::link!("user32.dll" "system" fn DefRawInputProc(parawinput : *const *const RAWINPUT, ninput : i32, cbsizeheader : u32) -> super::super::Foundation:: LRESULT); +windows_link::link!("user32.dll" "system" fn GetCIMSSM(inputmessagesource : *mut INPUT_MESSAGE_SOURCE) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn GetCurrentInputMessageSource(inputmessagesource : *mut INPUT_MESSAGE_SOURCE) -> windows_sys::core::BOOL); +windows_link::link!("user32.dll" "system" fn GetRawInputBuffer(pdata : *mut RAWINPUT, pcbsize : *mut u32, cbsizeheader : u32) -> u32); +windows_link::link!("user32.dll" "system" fn GetRawInputData(hrawinput : HRAWINPUT, uicommand : RAW_INPUT_DATA_COMMAND_FLAGS, pdata : *mut core::ffi::c_void, pcbsize : *mut u32, cbsizeheader : u32) -> u32); +windows_link::link!("user32.dll" "system" fn GetRawInputDeviceInfoA(hdevice : super::super::Foundation:: HANDLE, uicommand : RAW_INPUT_DEVICE_INFO_COMMAND, pdata : *mut core::ffi::c_void, pcbsize : *mut u32) -> u32); +windows_link::link!("user32.dll" "system" fn GetRawInputDeviceInfoW(hdevice : super::super::Foundation:: HANDLE, uicommand : RAW_INPUT_DEVICE_INFO_COMMAND, pdata : *mut core::ffi::c_void, pcbsize : *mut u32) -> u32); +windows_link::link!("user32.dll" "system" fn GetRawInputDeviceList(prawinputdevicelist : *mut RAWINPUTDEVICELIST, puinumdevices : *mut u32, cbsize : u32) -> u32); +windows_link::link!("user32.dll" "system" fn GetRegisteredRawInputDevices(prawinputdevices : *mut RAWINPUTDEVICE, puinumdevices : *mut u32, cbsize : u32) -> u32); +windows_link::link!("user32.dll" "system" fn RegisterRawInputDevices(prawinputdevices : *const RAWINPUTDEVICE, uinumdevices : u32, cbsize : u32) -> windows_sys::core::BOOL); +pub type HRAWINPUT = *mut core::ffi::c_void; +pub const IMDT_KEYBOARD: INPUT_MESSAGE_DEVICE_TYPE = 1i32; +pub const IMDT_MOUSE: INPUT_MESSAGE_DEVICE_TYPE = 2i32; +pub const IMDT_PEN: INPUT_MESSAGE_DEVICE_TYPE = 8i32; +pub const IMDT_TOUCH: INPUT_MESSAGE_DEVICE_TYPE = 4i32; +pub const IMDT_TOUCHPAD: INPUT_MESSAGE_DEVICE_TYPE = 16i32; +pub const IMDT_UNAVAILABLE: INPUT_MESSAGE_DEVICE_TYPE = 0i32; +pub const IMO_HARDWARE: INPUT_MESSAGE_ORIGIN_ID = 1i32; +pub const IMO_INJECTED: INPUT_MESSAGE_ORIGIN_ID = 2i32; +pub const IMO_SYSTEM: INPUT_MESSAGE_ORIGIN_ID = 4i32; +pub const IMO_UNAVAILABLE: INPUT_MESSAGE_ORIGIN_ID = 0i32; +pub type INPUT_MESSAGE_DEVICE_TYPE = i32; +pub type INPUT_MESSAGE_ORIGIN_ID = i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct INPUT_MESSAGE_SOURCE { + pub deviceType: INPUT_MESSAGE_DEVICE_TYPE, + pub originId: INPUT_MESSAGE_ORIGIN_ID, +} +pub const MOUSE_ATTRIBUTES_CHANGED: MOUSE_STATE = 4u16; +pub const MOUSE_MOVE_ABSOLUTE: MOUSE_STATE = 1u16; +pub const MOUSE_MOVE_NOCOALESCE: MOUSE_STATE = 8u16; +pub const MOUSE_MOVE_RELATIVE: MOUSE_STATE = 0u16; +pub type MOUSE_STATE = u16; +pub const MOUSE_VIRTUAL_DESKTOP: MOUSE_STATE = 2u16; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RAWHID { + pub dwSizeHid: u32, + pub dwCount: u32, + pub bRawData: [u8; 1], +} +impl Default for RAWHID { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RAWINPUT { + pub header: RAWINPUTHEADER, + pub data: RAWINPUT_0, +} +impl Default for RAWINPUT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union RAWINPUT_0 { + pub mouse: RAWMOUSE, + pub keyboard: RAWKEYBOARD, + pub hid: RAWHID, +} +impl Default for RAWINPUT_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RAWINPUTDEVICE { + pub usUsagePage: u16, + pub usUsage: u16, + pub dwFlags: RAWINPUTDEVICE_FLAGS, + pub hwndTarget: super::super::Foundation::HWND, +} +impl Default for RAWINPUTDEVICE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RAWINPUTDEVICELIST { + pub hDevice: super::super::Foundation::HANDLE, + pub dwType: RID_DEVICE_INFO_TYPE, +} +impl Default for RAWINPUTDEVICELIST { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub type RAWINPUTDEVICE_FLAGS = u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RAWINPUTHEADER { + pub dwType: u32, + pub dwSize: u32, + pub hDevice: super::super::Foundation::HANDLE, + pub wParam: super::super::Foundation::WPARAM, +} +impl Default for RAWINPUTHEADER { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RAWKEYBOARD { + pub MakeCode: u16, + pub Flags: u16, + pub Reserved: u16, + pub VKey: u16, + pub Message: u32, + pub ExtraInformation: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RAWMOUSE { + pub usFlags: MOUSE_STATE, + pub Anonymous: RAWMOUSE_0, + pub ulRawButtons: u32, + pub lLastX: i32, + pub lLastY: i32, + pub ulExtraInformation: u32, +} +impl Default for RAWMOUSE { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union RAWMOUSE_0 { + pub ulButtons: u32, + pub Anonymous: RAWMOUSE_0_0, +} +impl Default for RAWMOUSE_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RAWMOUSE_0_0 { + pub usButtonFlags: u16, + pub usButtonData: u16, +} +pub type RAW_INPUT_DATA_COMMAND_FLAGS = u32; +pub type RAW_INPUT_DEVICE_INFO_COMMAND = u32; +pub const RIDEV_APPKEYS: RAWINPUTDEVICE_FLAGS = 1024u32; +pub const RIDEV_CAPTUREMOUSE: RAWINPUTDEVICE_FLAGS = 512u32; +pub const RIDEV_DEVNOTIFY: RAWINPUTDEVICE_FLAGS = 8192u32; +pub const RIDEV_EXCLUDE: RAWINPUTDEVICE_FLAGS = 16u32; +pub const RIDEV_EXINPUTSINK: RAWINPUTDEVICE_FLAGS = 4096u32; +pub const RIDEV_INPUTSINK: RAWINPUTDEVICE_FLAGS = 256u32; +pub const RIDEV_NOHOTKEYS: RAWINPUTDEVICE_FLAGS = 512u32; +pub const RIDEV_NOLEGACY: RAWINPUTDEVICE_FLAGS = 48u32; +pub const RIDEV_PAGEONLY: RAWINPUTDEVICE_FLAGS = 32u32; +pub const RIDEV_REMOVE: RAWINPUTDEVICE_FLAGS = 1u32; +pub const RIDI_DEVICEINFO: RAW_INPUT_DEVICE_INFO_COMMAND = 536870923u32; +pub const RIDI_DEVICENAME: RAW_INPUT_DEVICE_INFO_COMMAND = 536870919u32; +pub const RIDI_PREPARSEDDATA: RAW_INPUT_DEVICE_INFO_COMMAND = 536870917u32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct RID_DEVICE_INFO { + pub cbSize: u32, + pub dwType: RID_DEVICE_INFO_TYPE, + pub Anonymous: RID_DEVICE_INFO_0, +} +impl Default for RID_DEVICE_INFO { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union RID_DEVICE_INFO_0 { + pub mouse: RID_DEVICE_INFO_MOUSE, + pub keyboard: RID_DEVICE_INFO_KEYBOARD, + pub hid: RID_DEVICE_INFO_HID, +} +impl Default for RID_DEVICE_INFO_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RID_DEVICE_INFO_HID { + pub dwVendorId: u32, + pub dwProductId: u32, + pub dwVersionNumber: u32, + pub usUsagePage: u16, + pub usUsage: u16, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RID_DEVICE_INFO_KEYBOARD { + pub dwType: u32, + pub dwSubType: u32, + pub dwKeyboardMode: u32, + pub dwNumberOfFunctionKeys: u32, + pub dwNumberOfIndicators: u32, + pub dwNumberOfKeysTotal: u32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct RID_DEVICE_INFO_MOUSE { + pub dwId: u32, + pub dwNumberOfButtons: u32, + pub dwSampleRate: u32, + pub fHasHorizontalWheel: windows_sys::core::BOOL, +} +pub type RID_DEVICE_INFO_TYPE = u32; +pub const RID_HEADER: RAW_INPUT_DATA_COMMAND_FLAGS = 268435461u32; +pub const RID_INPUT: RAW_INPUT_DATA_COMMAND_FLAGS = 268435459u32; +pub const RIM_TYPEHID: RID_DEVICE_INFO_TYPE = 2u32; +pub const RIM_TYPEKEYBOARD: RID_DEVICE_INFO_TYPE = 1u32; +pub const RIM_TYPEMOUSE: RID_DEVICE_INFO_TYPE = 0u32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/InteractionContext/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/InteractionContext/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..a5fa1cd0c7790a4a0e6e42221689e17e3153fe72 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/InteractionContext/mod.rs @@ -0,0 +1,254 @@ +windows_link::link!("ninput.dll" "system" fn AddPointerInteractionContext(interactioncontext : HINTERACTIONCONTEXT, pointerid : u32) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] +windows_link::link!("ninput.dll" "system" fn BufferPointerPacketsInteractionContext(interactioncontext : HINTERACTIONCONTEXT, entriescount : u32, pointerinfo : *const super::Input::Pointer:: POINTER_INFO) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn CreateInteractionContext(interactioncontext : *mut HINTERACTIONCONTEXT) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn DestroyInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetCrossSlideParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, threshold : CROSS_SLIDE_THRESHOLD, distance : *mut f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetHoldParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : HOLD_PARAMETER, value : *mut f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetInertiaParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, inertiaparameter : INERTIA_PARAMETER, value : *mut f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetInteractionConfigurationInteractionContext(interactioncontext : HINTERACTIONCONTEXT, configurationcount : u32, configuration : *mut INTERACTION_CONTEXT_CONFIGURATION) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetMouseWheelParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : MOUSE_WHEEL_PARAMETER, value : *mut f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetPropertyInteractionContext(interactioncontext : HINTERACTIONCONTEXT, contextproperty : INTERACTION_CONTEXT_PROPERTY, value : *mut u32) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] +windows_link::link!("ninput.dll" "system" fn GetStateInteractionContext(interactioncontext : HINTERACTIONCONTEXT, pointerinfo : *const super::Input::Pointer:: POINTER_INFO, state : *mut INTERACTION_STATE) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetTapParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TAP_PARAMETER, value : *mut f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn GetTranslationParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TRANSLATION_PARAMETER, value : *mut f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn ProcessBufferedPacketsInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn ProcessInertiaInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_UI_Input_Pointer", feature = "Win32_UI_WindowsAndMessaging"))] +windows_link::link!("ninput.dll" "system" fn ProcessPointerFramesInteractionContext(interactioncontext : HINTERACTIONCONTEXT, entriescount : u32, pointercount : u32, pointerinfo : *const super::Input::Pointer:: POINTER_INFO) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("ninput.dll" "system" fn RegisterOutputCallbackInteractionContext(interactioncontext : HINTERACTIONCONTEXT, outputcallback : INTERACTION_CONTEXT_OUTPUT_CALLBACK, clientdata : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +windows_link::link!("ninput.dll" "system" fn RegisterOutputCallbackInteractionContext2(interactioncontext : HINTERACTIONCONTEXT, outputcallback : INTERACTION_CONTEXT_OUTPUT_CALLBACK2, clientdata : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn RemovePointerInteractionContext(interactioncontext : HINTERACTIONCONTEXT, pointerid : u32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn ResetInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetCrossSlideParametersInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parametercount : u32, crossslideparameters : *const CROSS_SLIDE_PARAMETER) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetHoldParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : HOLD_PARAMETER, value : f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetInertiaParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, inertiaparameter : INERTIA_PARAMETER, value : f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetInteractionConfigurationInteractionContext(interactioncontext : HINTERACTIONCONTEXT, configurationcount : u32, configuration : *const INTERACTION_CONTEXT_CONFIGURATION) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetMouseWheelParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : MOUSE_WHEEL_PARAMETER, value : f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetPivotInteractionContext(interactioncontext : HINTERACTIONCONTEXT, x : f32, y : f32, radius : f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetPropertyInteractionContext(interactioncontext : HINTERACTIONCONTEXT, contextproperty : INTERACTION_CONTEXT_PROPERTY, value : u32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetTapParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TAP_PARAMETER, value : f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn SetTranslationParameterInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parameter : TRANSLATION_PARAMETER, value : f32) -> windows_sys::core::HRESULT); +windows_link::link!("ninput.dll" "system" fn StopInteractionContext(interactioncontext : HINTERACTIONCONTEXT) -> windows_sys::core::HRESULT); +pub type CROSS_SLIDE_FLAGS = u32; +pub const CROSS_SLIDE_FLAGS_MAX: CROSS_SLIDE_FLAGS = 4294967295u32; +pub const CROSS_SLIDE_FLAGS_NONE: CROSS_SLIDE_FLAGS = 0u32; +pub const CROSS_SLIDE_FLAGS_REARRANGE: CROSS_SLIDE_FLAGS = 4u32; +pub const CROSS_SLIDE_FLAGS_SELECT: CROSS_SLIDE_FLAGS = 1u32; +pub const CROSS_SLIDE_FLAGS_SPEED_BUMP: CROSS_SLIDE_FLAGS = 2u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct CROSS_SLIDE_PARAMETER { + pub threshold: CROSS_SLIDE_THRESHOLD, + pub distance: f32, +} +pub type CROSS_SLIDE_THRESHOLD = i32; +pub const CROSS_SLIDE_THRESHOLD_COUNT: CROSS_SLIDE_THRESHOLD = 4i32; +pub const CROSS_SLIDE_THRESHOLD_MAX: CROSS_SLIDE_THRESHOLD = -1i32; +pub const CROSS_SLIDE_THRESHOLD_REARRANGE_START: CROSS_SLIDE_THRESHOLD = 3i32; +pub const CROSS_SLIDE_THRESHOLD_SELECT_START: CROSS_SLIDE_THRESHOLD = 0i32; +pub const CROSS_SLIDE_THRESHOLD_SPEED_BUMP_END: CROSS_SLIDE_THRESHOLD = 2i32; +pub const CROSS_SLIDE_THRESHOLD_SPEED_BUMP_START: CROSS_SLIDE_THRESHOLD = 1i32; +pub type HINTERACTIONCONTEXT = *mut core::ffi::c_void; +pub type HOLD_PARAMETER = i32; +pub const HOLD_PARAMETER_MAX: HOLD_PARAMETER = -1i32; +pub const HOLD_PARAMETER_MAX_CONTACT_COUNT: HOLD_PARAMETER = 1i32; +pub const HOLD_PARAMETER_MIN_CONTACT_COUNT: HOLD_PARAMETER = 0i32; +pub const HOLD_PARAMETER_THRESHOLD_RADIUS: HOLD_PARAMETER = 2i32; +pub const HOLD_PARAMETER_THRESHOLD_START_DELAY: HOLD_PARAMETER = 3i32; +pub type INERTIA_PARAMETER = i32; +pub const INERTIA_PARAMETER_EXPANSION_DECELERATION: INERTIA_PARAMETER = 5i32; +pub const INERTIA_PARAMETER_EXPANSION_EXPANSION: INERTIA_PARAMETER = 6i32; +pub const INERTIA_PARAMETER_MAX: INERTIA_PARAMETER = -1i32; +pub const INERTIA_PARAMETER_ROTATION_ANGLE: INERTIA_PARAMETER = 4i32; +pub const INERTIA_PARAMETER_ROTATION_DECELERATION: INERTIA_PARAMETER = 3i32; +pub const INERTIA_PARAMETER_TRANSLATION_DECELERATION: INERTIA_PARAMETER = 1i32; +pub const INERTIA_PARAMETER_TRANSLATION_DISPLACEMENT: INERTIA_PARAMETER = 2i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct INTERACTION_ARGUMENTS_CROSS_SLIDE { + pub flags: CROSS_SLIDE_FLAGS, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct INTERACTION_ARGUMENTS_MANIPULATION { + pub delta: MANIPULATION_TRANSFORM, + pub cumulative: MANIPULATION_TRANSFORM, + pub velocity: MANIPULATION_VELOCITY, + pub railsState: MANIPULATION_RAILS_STATE, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct INTERACTION_ARGUMENTS_TAP { + pub count: u32, +} +pub type INTERACTION_CONFIGURATION_FLAGS = u32; +pub const INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE: INTERACTION_CONFIGURATION_FLAGS = 1u32; +pub const INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_EXACT: INTERACTION_CONFIGURATION_FLAGS = 32u32; +pub const INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_HORIZONTAL: INTERACTION_CONFIGURATION_FLAGS = 2u32; +pub const INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_REARRANGE: INTERACTION_CONFIGURATION_FLAGS = 16u32; +pub const INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_SELECT: INTERACTION_CONFIGURATION_FLAGS = 4u32; +pub const INTERACTION_CONFIGURATION_FLAG_CROSS_SLIDE_SPEED_BUMP: INTERACTION_CONFIGURATION_FLAGS = 8u32; +pub const INTERACTION_CONFIGURATION_FLAG_DRAG: INTERACTION_CONFIGURATION_FLAGS = 1u32; +pub const INTERACTION_CONFIGURATION_FLAG_HOLD: INTERACTION_CONFIGURATION_FLAGS = 1u32; +pub const INTERACTION_CONFIGURATION_FLAG_HOLD_MOUSE: INTERACTION_CONFIGURATION_FLAGS = 2u32; +pub const INTERACTION_CONFIGURATION_FLAG_HOLD_MULTIPLE_FINGER: INTERACTION_CONFIGURATION_FLAGS = 4u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION: INTERACTION_CONFIGURATION_FLAGS = 1u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_EXACT: INTERACTION_CONFIGURATION_FLAGS = 1024u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_MULTIPLE_FINGER_PANNING: INTERACTION_CONFIGURATION_FLAGS = 2048u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_RAILS_X: INTERACTION_CONFIGURATION_FLAGS = 256u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_RAILS_Y: INTERACTION_CONFIGURATION_FLAGS = 512u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_ROTATION: INTERACTION_CONFIGURATION_FLAGS = 8u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_ROTATION_INERTIA: INTERACTION_CONFIGURATION_FLAGS = 64u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_SCALING: INTERACTION_CONFIGURATION_FLAGS = 16u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_SCALING_INERTIA: INTERACTION_CONFIGURATION_FLAGS = 128u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_INERTIA: INTERACTION_CONFIGURATION_FLAGS = 32u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_X: INTERACTION_CONFIGURATION_FLAGS = 2u32; +pub const INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_Y: INTERACTION_CONFIGURATION_FLAGS = 4u32; +pub const INTERACTION_CONFIGURATION_FLAG_MAX: INTERACTION_CONFIGURATION_FLAGS = 4294967295u32; +pub const INTERACTION_CONFIGURATION_FLAG_NONE: INTERACTION_CONFIGURATION_FLAGS = 0u32; +pub const INTERACTION_CONFIGURATION_FLAG_SECONDARY_TAP: INTERACTION_CONFIGURATION_FLAGS = 1u32; +pub const INTERACTION_CONFIGURATION_FLAG_TAP: INTERACTION_CONFIGURATION_FLAGS = 1u32; +pub const INTERACTION_CONFIGURATION_FLAG_TAP_DOUBLE: INTERACTION_CONFIGURATION_FLAGS = 2u32; +pub const INTERACTION_CONFIGURATION_FLAG_TAP_MULTIPLE_FINGER: INTERACTION_CONFIGURATION_FLAGS = 4u32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct INTERACTION_CONTEXT_CONFIGURATION { + pub interactionId: INTERACTION_ID, + pub enable: INTERACTION_CONFIGURATION_FLAGS, +} +#[repr(C)] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub struct INTERACTION_CONTEXT_OUTPUT { + pub interactionId: INTERACTION_ID, + pub interactionFlags: INTERACTION_FLAGS, + pub inputType: super::WindowsAndMessaging::POINTER_INPUT_TYPE, + pub x: f32, + pub y: f32, + pub arguments: INTERACTION_CONTEXT_OUTPUT_0, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for INTERACTION_CONTEXT_OUTPUT { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub union INTERACTION_CONTEXT_OUTPUT_0 { + pub manipulation: INTERACTION_ARGUMENTS_MANIPULATION, + pub tap: INTERACTION_ARGUMENTS_TAP, + pub crossSlide: INTERACTION_ARGUMENTS_CROSS_SLIDE, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for INTERACTION_CONTEXT_OUTPUT_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub struct INTERACTION_CONTEXT_OUTPUT2 { + pub interactionId: INTERACTION_ID, + pub interactionFlags: INTERACTION_FLAGS, + pub inputType: super::WindowsAndMessaging::POINTER_INPUT_TYPE, + pub contactCount: u32, + pub currentContactCount: u32, + pub x: f32, + pub y: f32, + pub arguments: INTERACTION_CONTEXT_OUTPUT2_0, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for INTERACTION_CONTEXT_OUTPUT2 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[repr(C)] +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +#[derive(Clone, Copy)] +pub union INTERACTION_CONTEXT_OUTPUT2_0 { + pub manipulation: INTERACTION_ARGUMENTS_MANIPULATION, + pub tap: INTERACTION_ARGUMENTS_TAP, + pub crossSlide: INTERACTION_ARGUMENTS_CROSS_SLIDE, +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +impl Default for INTERACTION_CONTEXT_OUTPUT2_0 { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +pub type INTERACTION_CONTEXT_OUTPUT_CALLBACK = Option; +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +pub type INTERACTION_CONTEXT_OUTPUT_CALLBACK2 = Option; +pub type INTERACTION_CONTEXT_PROPERTY = i32; +pub const INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS: INTERACTION_CONTEXT_PROPERTY = 3i32; +pub const INTERACTION_CONTEXT_PROPERTY_INTERACTION_UI_FEEDBACK: INTERACTION_CONTEXT_PROPERTY = 2i32; +pub const INTERACTION_CONTEXT_PROPERTY_MAX: INTERACTION_CONTEXT_PROPERTY = -1i32; +pub const INTERACTION_CONTEXT_PROPERTY_MEASUREMENT_UNITS: INTERACTION_CONTEXT_PROPERTY = 1i32; +pub type INTERACTION_FLAGS = u32; +pub const INTERACTION_FLAG_BEGIN: INTERACTION_FLAGS = 1u32; +pub const INTERACTION_FLAG_CANCEL: INTERACTION_FLAGS = 4u32; +pub const INTERACTION_FLAG_END: INTERACTION_FLAGS = 2u32; +pub const INTERACTION_FLAG_INERTIA: INTERACTION_FLAGS = 8u32; +pub const INTERACTION_FLAG_MAX: INTERACTION_FLAGS = 4294967295u32; +pub const INTERACTION_FLAG_NONE: INTERACTION_FLAGS = 0u32; +pub type INTERACTION_ID = i32; +pub const INTERACTION_ID_CROSS_SLIDE: INTERACTION_ID = 6i32; +pub const INTERACTION_ID_DRAG: INTERACTION_ID = 5i32; +pub const INTERACTION_ID_HOLD: INTERACTION_ID = 4i32; +pub const INTERACTION_ID_MANIPULATION: INTERACTION_ID = 1i32; +pub const INTERACTION_ID_MAX: INTERACTION_ID = -1i32; +pub const INTERACTION_ID_NONE: INTERACTION_ID = 0i32; +pub const INTERACTION_ID_SECONDARY_TAP: INTERACTION_ID = 3i32; +pub const INTERACTION_ID_TAP: INTERACTION_ID = 2i32; +pub type INTERACTION_STATE = i32; +pub const INTERACTION_STATE_IDLE: INTERACTION_STATE = 0i32; +pub const INTERACTION_STATE_IN_INTERACTION: INTERACTION_STATE = 1i32; +pub const INTERACTION_STATE_MAX: INTERACTION_STATE = -1i32; +pub const INTERACTION_STATE_POSSIBLE_DOUBLE_TAP: INTERACTION_STATE = 2i32; +pub type MANIPULATION_RAILS_STATE = i32; +pub const MANIPULATION_RAILS_STATE_FREE: MANIPULATION_RAILS_STATE = 1i32; +pub const MANIPULATION_RAILS_STATE_MAX: MANIPULATION_RAILS_STATE = -1i32; +pub const MANIPULATION_RAILS_STATE_RAILED: MANIPULATION_RAILS_STATE = 2i32; +pub const MANIPULATION_RAILS_STATE_UNDECIDED: MANIPULATION_RAILS_STATE = 0i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct MANIPULATION_TRANSFORM { + pub translationX: f32, + pub translationY: f32, + pub scale: f32, + pub expansion: f32, + pub rotation: f32, +} +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct MANIPULATION_VELOCITY { + pub velocityX: f32, + pub velocityY: f32, + pub velocityExpansion: f32, + pub velocityAngular: f32, +} +pub type MOUSE_WHEEL_PARAMETER = i32; +pub const MOUSE_WHEEL_PARAMETER_CHAR_TRANSLATION_X: MOUSE_WHEEL_PARAMETER = 1i32; +pub const MOUSE_WHEEL_PARAMETER_CHAR_TRANSLATION_Y: MOUSE_WHEEL_PARAMETER = 2i32; +pub const MOUSE_WHEEL_PARAMETER_DELTA_ROTATION: MOUSE_WHEEL_PARAMETER = 4i32; +pub const MOUSE_WHEEL_PARAMETER_DELTA_SCALE: MOUSE_WHEEL_PARAMETER = 3i32; +pub const MOUSE_WHEEL_PARAMETER_MAX: MOUSE_WHEEL_PARAMETER = -1i32; +pub const MOUSE_WHEEL_PARAMETER_PAGE_TRANSLATION_X: MOUSE_WHEEL_PARAMETER = 5i32; +pub const MOUSE_WHEEL_PARAMETER_PAGE_TRANSLATION_Y: MOUSE_WHEEL_PARAMETER = 6i32; +pub type TAP_PARAMETER = i32; +pub const TAP_PARAMETER_MAX: TAP_PARAMETER = -1i32; +pub const TAP_PARAMETER_MAX_CONTACT_COUNT: TAP_PARAMETER = 1i32; +pub const TAP_PARAMETER_MIN_CONTACT_COUNT: TAP_PARAMETER = 0i32; +pub type TRANSLATION_PARAMETER = i32; +pub const TRANSLATION_PARAMETER_MAX: TRANSLATION_PARAMETER = -1i32; +pub const TRANSLATION_PARAMETER_MAX_CONTACT_COUNT: TRANSLATION_PARAMETER = 1i32; +pub const TRANSLATION_PARAMETER_MIN_CONTACT_COUNT: TRANSLATION_PARAMETER = 0i32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..a61f709f092e307eff0975577c7d52b71b206b0b --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/UI/mod.rs @@ -0,0 +1,22 @@ +#[cfg(feature = "Win32_UI_Accessibility")] +pub mod Accessibility; +#[cfg(feature = "Win32_UI_ColorSystem")] +pub mod ColorSystem; +#[cfg(feature = "Win32_UI_Controls")] +pub mod Controls; +#[cfg(feature = "Win32_UI_HiDpi")] +pub mod HiDpi; +#[cfg(feature = "Win32_UI_Input")] +pub mod Input; +#[cfg(feature = "Win32_UI_InteractionContext")] +pub mod InteractionContext; +#[cfg(feature = "Win32_UI_Magnification")] +pub mod Magnification; +#[cfg(feature = "Win32_UI_Shell")] +pub mod Shell; +#[cfg(feature = "Win32_UI_TabletPC")] +pub mod TabletPC; +#[cfg(feature = "Win32_UI_TextServices")] +pub mod TextServices; +#[cfg(feature = "Win32_UI_WindowsAndMessaging")] +pub mod WindowsAndMessaging; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Web/InternetExplorer/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Web/InternetExplorer/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..d51e9bb88f097e0b1ce5d7d01cff72afb9311957 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Web/InternetExplorer/mod.rs @@ -0,0 +1,634 @@ +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("imgutil.dll" "system" fn ComputeInvCMAP(prgbcolors : *const super::super::Graphics::Gdi:: RGBQUAD, ncolors : u32, pinvtable : *mut u8, cbtable : u32) -> windows_sys::core::HRESULT); +windows_link::link!("imgutil.dll" "system" fn CreateMIMEMap(ppmap : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("imgutil.dll" "system" fn DecodeImage(pstream : * mut core::ffi::c_void, pmap : * mut core::ffi::c_void, peventsink : * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("imgutil.dll" "system" fn DecodeImageEx(pstream : * mut core::ffi::c_void, pmap : * mut core::ffi::c_void, peventsink : * mut core::ffi::c_void, pszmimetypeparam : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Graphics_Gdi")] +windows_link::link!("imgutil.dll" "system" fn DitherTo8(pdestbits : *mut u8, ndestpitch : i32, psrcbits : *mut u8, nsrcpitch : i32, bfidsrc : *const windows_sys::core::GUID, prgbdestcolors : *mut super::super::Graphics::Gdi:: RGBQUAD, prgbsrccolors : *mut super::super::Graphics::Gdi:: RGBQUAD, pbdestinvmap : *mut u8, x : i32, y : i32, cx : i32, cy : i32, ldesttrans : i32, lsrctrans : i32) -> windows_sys::core::HRESULT); +windows_link::link!("imgutil.dll" "system" fn GetMaxMIMEIDBytes(pnmaxbytes : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IEAssociateThreadWithTab(dwtabthreadid : u32, dwassociatedthreadid : u32) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IECancelSaveFile(hstate : super::super::Foundation:: HANDLE) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Security")] +windows_link::link!("ieframe.dll" "system" fn IECreateDirectory(lppathname : windows_sys::core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> windows_sys::core::BOOL); +#[cfg(feature = "Win32_Security")] +windows_link::link!("ieframe.dll" "system" fn IECreateFile(lpfilename : windows_sys::core::PCWSTR, dwdesiredaccess : u32, dwsharemode : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwcreationdisposition : u32, dwflagsandattributes : u32, htemplatefile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); +windows_link::link!("ieframe.dll" "system" fn IEDeleteFile(lpfilename : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("ieframe.dll" "system" fn IEDisassociateThreadWithTab(dwtabthreadid : u32, dwassociatedthreadid : u32) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_Storage_FileSystem")] +windows_link::link!("ieframe.dll" "system" fn IEFindFirstFile(lpfilename : windows_sys::core::PCWSTR, lpfindfiledata : *const super::super::Storage::FileSystem:: WIN32_FIND_DATAA) -> super::super::Foundation:: HANDLE); +#[cfg(feature = "Win32_Storage_FileSystem")] +windows_link::link!("ieframe.dll" "system" fn IEGetFileAttributesEx(lpfilename : windows_sys::core::PCWSTR, finfolevelid : super::super::Storage::FileSystem:: GET_FILEEX_INFO_LEVELS, lpfileinformation : *const core::ffi::c_void) -> windows_sys::core::BOOL); +windows_link::link!("ieframe.dll" "system" fn IEGetProtectedModeCookie(lpszurl : windows_sys::core::PCWSTR, lpszcookiename : windows_sys::core::PCWSTR, lpszcookiedata : windows_sys::core::PWSTR, pcchcookiedata : *mut u32, dwflags : u32) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IEGetWriteableFolderPath(clsidfolderid : *const windows_sys::core::GUID, lppwstrpath : *mut windows_sys::core::PWSTR) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Registry")] +windows_link::link!("ieframe.dll" "system" fn IEGetWriteableLowHKCU(phkey : *mut super::super::System::Registry:: HKEY) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IEInPrivateFilteringEnabled() -> windows_sys::core::BOOL); +windows_link::link!("ieframe.dll" "system" fn IEIsInPrivateBrowsing() -> windows_sys::core::BOOL); +windows_link::link!("ieframe.dll" "system" fn IEIsProtectedModeProcess(pbresult : *mut windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IEIsProtectedModeURL(lpwstrurl : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Threading")] +windows_link::link!("ieframe.dll" "system" fn IELaunchURL(lpwstrurl : windows_sys::core::PCWSTR, lpprocinfo : *mut super::super::System::Threading:: PROCESS_INFORMATION, lpinfo : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IEMoveFileEx(lpexistingfilename : windows_sys::core::PCWSTR, lpnewfilename : windows_sys::core::PCWSTR, dwflags : u32) -> windows_sys::core::BOOL); +windows_link::link!("ieframe.dll" "system" fn IERefreshElevationPolicy() -> windows_sys::core::HRESULT); +#[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] +windows_link::link!("ieframe.dll" "system" fn IERegCreateKeyEx(lpsubkey : windows_sys::core::PCWSTR, reserved : u32, lpclass : windows_sys::core::PCWSTR, dwoptions : u32, samdesired : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut super::super::System::Registry:: HKEY, lpdwdisposition : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IERegSetValueEx(lpsubkey : windows_sys::core::PCWSTR, lpvaluename : windows_sys::core::PCWSTR, reserved : u32, dwtype : u32, lpdata : *const u8, cbdata : u32) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IERegisterWritableRegistryKey(guid : windows_sys::core::GUID, lpsubkey : windows_sys::core::PCWSTR, fsubkeyallowed : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IERegisterWritableRegistryValue(guid : windows_sys::core::GUID, lppath : windows_sys::core::PCWSTR, lpvaluename : windows_sys::core::PCWSTR, dwtype : u32, lpdata : *const u8, cbmaxdata : u32) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IERemoveDirectory(lppathname : windows_sys::core::PCWSTR) -> windows_sys::core::BOOL); +windows_link::link!("ieframe.dll" "system" fn IESaveFile(hstate : super::super::Foundation:: HANDLE, lpwstrsourcefile : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IESetProtectedModeCookie(lpszurl : windows_sys::core::PCWSTR, lpszcookiename : windows_sys::core::PCWSTR, lpszcookiedata : windows_sys::core::PCWSTR, dwflags : u32) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IEShowOpenFileDialog(hwnd : super::super::Foundation:: HWND, lpwstrfilename : windows_sys::core::PWSTR, cchmaxfilename : u32, lpwstrinitialdir : windows_sys::core::PCWSTR, lpwstrfilter : windows_sys::core::PCWSTR, lpwstrdefext : windows_sys::core::PCWSTR, dwfilterindex : u32, dwflags : u32, phfile : *mut super::super::Foundation:: HANDLE) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IEShowSaveFileDialog(hwnd : super::super::Foundation:: HWND, lpwstrinitialfilename : windows_sys::core::PCWSTR, lpwstrinitialdir : windows_sys::core::PCWSTR, lpwstrfilter : windows_sys::core::PCWSTR, lpwstrdefext : windows_sys::core::PCWSTR, dwfilterindex : u32, dwflags : u32, lppwstrdestinationfilepath : *mut windows_sys::core::PWSTR, phstate : *mut super::super::Foundation:: HANDLE) -> windows_sys::core::HRESULT); +windows_link::link!("ieframe.dll" "system" fn IETrackingProtectionEnabled() -> windows_sys::core::BOOL); +windows_link::link!("ieframe.dll" "system" fn IEUnregisterWritableRegistry(guid : windows_sys::core::GUID) -> windows_sys::core::HRESULT); +windows_link::link!("imgutil.dll" "system" fn IdentifyMIMEType(pbbytes : *const u8, nbytes : u32, pnformat : *mut u32) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingAccessDeniedDialog(hdlg : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCSTR, pszcontentdescription : windows_sys::core::PCSTR, pratingdetails : *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingAccessDeniedDialog2(hdlg : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCSTR, pratingdetails : *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingAccessDeniedDialog2W(hdlg : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCWSTR, pratingdetails : *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingAccessDeniedDialogW(hdlg : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCWSTR, pszcontentdescription : windows_sys::core::PCWSTR, pratingdetails : *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingAddToApprovedSites(hdlg : super::super::Foundation:: HWND, cbpasswordblob : u32, pbpasswordblob : *mut u8, lpszurl : windows_sys::core::PCWSTR, falwaysnever : windows_sys::core::BOOL, fsitepage : windows_sys::core::BOOL, fapprovedsitesenforced : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingCheckUserAccess(pszusername : windows_sys::core::PCSTR, pszurl : windows_sys::core::PCSTR, pszratinginfo : windows_sys::core::PCSTR, pdata : *const u8, cbdata : u32, ppratingdetails : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingCheckUserAccessW(pszusername : windows_sys::core::PCWSTR, pszurl : windows_sys::core::PCWSTR, pszratinginfo : windows_sys::core::PCWSTR, pdata : *const u8, cbdata : u32, ppratingdetails : *mut *mut core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingClickedOnPRFInternal(hwndowner : super::super::Foundation:: HWND, param1 : super::super::Foundation:: HINSTANCE, lpszfilename : windows_sys::core::PCSTR, nshow : i32) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingClickedOnRATInternal(hwndowner : super::super::Foundation:: HWND, param1 : super::super::Foundation:: HINSTANCE, lpszfilename : windows_sys::core::PCSTR, nshow : i32) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingEnable(hwndparent : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCSTR, fenable : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingEnableW(hwndparent : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCWSTR, fenable : windows_sys::core::BOOL) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingEnabledQuery() -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingFreeDetails(pratingdetails : *const core::ffi::c_void) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingInit() -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingObtainCancel(hratingobtainquery : super::super::Foundation:: HANDLE) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingObtainQuery(psztargeturl : windows_sys::core::PCSTR, dwuserdata : u32, fcallback : isize, phratingobtainquery : *mut super::super::Foundation:: HANDLE) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingObtainQueryW(psztargeturl : windows_sys::core::PCWSTR, dwuserdata : u32, fcallback : isize, phratingobtainquery : *mut super::super::Foundation:: HANDLE) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingSetupUI(hdlg : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCSTR) -> windows_sys::core::HRESULT); +windows_link::link!("msrating.dll" "system" fn RatingSetupUIW(hdlg : super::super::Foundation:: HWND, pszusername : windows_sys::core::PCWSTR) -> windows_sys::core::HRESULT); +#[cfg(feature = "Win32_System_Com")] +windows_link::link!("imgutil.dll" "system" fn SniffStream(pinstream : * mut core::ffi::c_void, pnformat : *mut u32, ppoutstream : *mut * mut core::ffi::c_void) -> windows_sys::core::HRESULT); +pub const ADDRESSBAND: u32 = 2u32; +pub const ADDURL_ADDTOCACHE: ADDURL_FLAG = 1i32; +pub const ADDURL_ADDTOHISTORYANDCACHE: ADDURL_FLAG = 0i32; +pub const ADDURL_FIRST: ADDURL_FLAG = 0i32; +pub type ADDURL_FLAG = i32; +pub const ADDURL_Max: ADDURL_FLAG = 2147483647i32; +pub const ActivityContentCount: OpenServiceActivityContentType = 3i32; +pub const ActivityContentDocument: OpenServiceActivityContentType = 0i32; +pub const ActivityContentLink: OpenServiceActivityContentType = 2i32; +pub const ActivityContentNone: OpenServiceActivityContentType = -1i32; +pub const ActivityContentSelection: OpenServiceActivityContentType = 1i32; +pub const AnchorClick: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x13d5413c_33b9_11d2_95a7_00c04f8ecb02); +pub const CATID_MSOfficeAntiVirus: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x56ffcc30_d398_11d0_b2ae_00a0c908fa49); +pub const CDeviceRect: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f6d4_98b5_11cf_bb82_00aa00bdce0b); +pub const CDownloadBehavior: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f5be_98b5_11cf_bb82_00aa00bdce0b); +pub const CHeaderFooter: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f6cd_98b5_11cf_bb82_00aa00bdce0b); +pub const CLayoutRect: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f664_98b5_11cf_bb82_00aa00bdce0b); +pub const COLOR_NO_TRANSPARENT: u32 = 4294967295u32; +pub const CPersistDataPeer: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f487_98b5_11cf_bb82_00aa00bdce0b); +pub const CPersistHistory: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f4c8_98b5_11cf_bb82_00aa00bdce0b); +pub const CPersistShortcut: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f4c6_98b5_11cf_bb82_00aa00bdce0b); +pub const CPersistSnapshot: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f4c9_98b5_11cf_bb82_00aa00bdce0b); +pub const CPersistUserData: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f48e_98b5_11cf_bb82_00aa00bdce0b); +pub const CoDitherToRGB8: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xa860ce50_3910_11d0_86fc_00a0c913f750); +pub const CoMapMIMEToCLSID: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x30c3b080_30fb_11d0_b724_00aa006c1a01); +pub const CoSniffStream: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x6a01fda0_30df_11d0_b724_00aa006c1a01); +pub const DISPID_ACTIVEXFILTERINGENABLED: u32 = 61u32; +pub const DISPID_ADDCHANNEL: u32 = 5u32; +pub const DISPID_ADDDESKTOPCOMPONENT: u32 = 6u32; +pub const DISPID_ADDFAVORITE: u32 = 4u32; +pub const DISPID_ADDSEARCHPROVIDER: u32 = 14u32; +pub const DISPID_ADDSERVICE: u32 = 30u32; +pub const DISPID_ADDSITEMODE: u32 = 49u32; +pub const DISPID_ADDTHUMBNAILBUTTONS: u32 = 48u32; +pub const DISPID_ADDTOFAVORITESBAR: u32 = 32u32; +pub const DISPID_ADDTRACKINGPROTECTIONLIST: u32 = 57u32; +pub const DISPID_ADVANCEERROR: u32 = 10u32; +pub const DISPID_AMBIENT_OFFLINEIFNOTCONNECTED: i32 = -5501i32; +pub const DISPID_AMBIENT_SILENT: i32 = -5502i32; +pub const DISPID_AUTOCOMPLETEATTACH: u32 = 12u32; +pub const DISPID_AUTOCOMPLETESAVEFORM: u32 = 10u32; +pub const DISPID_AUTOSCAN: u32 = 11u32; +pub const DISPID_BEFORENAVIGATE: u32 = 100u32; +pub const DISPID_BEFORENAVIGATE2: u32 = 250u32; +pub const DISPID_BEFORESCRIPTEXECUTE: u32 = 290u32; +pub const DISPID_BRANDIMAGEURI: u32 = 20u32; +pub const DISPID_BUILDNEWTABPAGE: u32 = 33u32; +pub const DISPID_CANADVANCEERROR: u32 = 12u32; +pub const DISPID_CANRETREATERROR: u32 = 13u32; +pub const DISPID_CHANGEDEFAULTBROWSER: u32 = 68u32; +pub const DISPID_CLEARNOTIFICATION: u32 = 71u32; +pub const DISPID_CLEARSITEMODEICONOVERLAY: u32 = 45u32; +pub const DISPID_CLIENTTOHOSTWINDOW: u32 = 268u32; +pub const DISPID_COMMANDSTATECHANGE: u32 = 105u32; +pub const DISPID_CONTENTDISCOVERYRESET: u32 = 36u32; +pub const DISPID_COUNTVIEWTYPES: u32 = 22u32; +pub const DISPID_CREATESUBSCRIPTION: u32 = 11u32; +pub const DISPID_CUSTOMIZECLEARTYPE: u32 = 23u32; +pub const DISPID_CUSTOMIZESETTINGS: u32 = 17u32; +pub const DISPID_DEFAULTSEARCHPROVIDER: u32 = 26u32; +pub const DISPID_DELETESUBSCRIPTION: u32 = 12u32; +pub const DISPID_DEPTH: u32 = 17u32; +pub const DISPID_DIAGNOSECONNECTION: u32 = 22u32; +pub const DISPID_DIAGNOSECONNECTIONUILESS: u32 = 66u32; +pub const DISPID_DOCUMENTCOMPLETE: u32 = 259u32; +pub const DISPID_DOUBLECLICK: u32 = 3u32; +pub const DISPID_DOWNLOADBEGIN: u32 = 106u32; +pub const DISPID_DOWNLOADCOMPLETE: u32 = 104u32; +pub const DISPID_ENABLENOTIFICATIONQUEUE: u32 = 72u32; +pub const DISPID_ENABLENOTIFICATIONQUEUELARGE: u32 = 78u32; +pub const DISPID_ENABLENOTIFICATIONQUEUESQUARE: u32 = 76u32; +pub const DISPID_ENABLENOTIFICATIONQUEUEWIDE: u32 = 77u32; +pub const DISPID_ENABLESUGGESTEDSITES: u32 = 39u32; +pub const DISPID_ENUMOPTIONS: u32 = 14u32; +pub const DISPID_EXPAND: u32 = 25u32; +pub const DISPID_EXPORT: u32 = 7u32; +pub const DISPID_FAVSELECTIONCHANGE: u32 = 1u32; +pub const DISPID_FILEDOWNLOAD: u32 = 270u32; +pub const DISPID_FLAGS: u32 = 19u32; +pub const DISPID_FRAMEBEFORENAVIGATE: u32 = 200u32; +pub const DISPID_FRAMENAVIGATECOMPLETE: u32 = 201u32; +pub const DISPID_FRAMENEWWINDOW: u32 = 204u32; +pub const DISPID_GETALWAYSSHOWLOCKSTATE: u32 = 23u32; +pub const DISPID_GETCVLISTDATA: u32 = 93u32; +pub const DISPID_GETCVLISTLOCALDATA: u32 = 94u32; +pub const DISPID_GETDETAILSSTATE: u32 = 19u32; +pub const DISPID_GETEMIELISTDATA: u32 = 95u32; +pub const DISPID_GETEMIELISTLOCALDATA: u32 = 96u32; +pub const DISPID_GETERRORCHAR: u32 = 15u32; +pub const DISPID_GETERRORCODE: u32 = 16u32; +pub const DISPID_GETERRORLINE: u32 = 14u32; +pub const DISPID_GETERRORMSG: u32 = 17u32; +pub const DISPID_GETERRORURL: u32 = 18u32; +pub const DISPID_GETEXPERIMENTALFLAG: u32 = 85u32; +pub const DISPID_GETEXPERIMENTALVALUE: u32 = 87u32; +pub const DISPID_GETNEEDHVSIAUTOLAUNCHFLAG: u32 = 100u32; +pub const DISPID_GETNEEDIEAUTOLAUNCHFLAG: u32 = 89u32; +pub const DISPID_GETOSSKU: u32 = 103u32; +pub const DISPID_GETPERERRSTATE: u32 = 21u32; +pub const DISPID_HASNEEDHVSIAUTOLAUNCHFLAG: u32 = 102u32; +pub const DISPID_HASNEEDIEAUTOLAUNCHFLAG: u32 = 88u32; +pub const DISPID_IMPORT: u32 = 6u32; +pub const DISPID_IMPORTEXPORTFAVORITES: u32 = 9u32; +pub const DISPID_INITIALIZED: u32 = 4u32; +pub const DISPID_INPRIVATEFILTERINGENABLED: u32 = 37u32; +pub const DISPID_INVOKECONTEXTMENU: u32 = 8u32; +pub const DISPID_ISMETAREFERRERAVAILABLE: u32 = 83u32; +pub const DISPID_ISSEARCHMIGRATED: u32 = 25u32; +pub const DISPID_ISSEARCHPROVIDERINSTALLED: u32 = 24u32; +pub const DISPID_ISSERVICEINSTALLED: u32 = 31u32; +pub const DISPID_ISSITEMODE: u32 = 43u32; +pub const DISPID_ISSITEMODEFIRSTRUN: u32 = 59u32; +pub const DISPID_ISSUBSCRIBED: u32 = 7u32; +pub const DISPID_LAUNCHIE: u32 = 91u32; +pub const DISPID_LAUNCHINHVSI: u32 = 99u32; +pub const DISPID_LAUNCHINTERNETOPTIONS: u32 = 74u32; +pub const DISPID_LAUNCHNETWORKCLIENTHELP: u32 = 67u32; +pub const DISPID_MODE: u32 = 18u32; +pub const DISPID_MOVESELECTIONDOWN: u32 = 2u32; +pub const DISPID_MOVESELECTIONTO: u32 = 9u32; +pub const DISPID_MOVESELECTIONUP: u32 = 1u32; +pub const DISPID_NAVIGATEANDFIND: u32 = 8u32; +pub const DISPID_NAVIGATECOMPLETE: u32 = 101u32; +pub const DISPID_NAVIGATECOMPLETE2: u32 = 252u32; +pub const DISPID_NAVIGATEERROR: u32 = 271u32; +pub const DISPID_NAVIGATETOSUGGESTEDSITES: u32 = 40u32; +pub const DISPID_NEWFOLDER: u32 = 4u32; +pub const DISPID_NEWPROCESS: u32 = 284u32; +pub const DISPID_NEWWINDOW: u32 = 107u32; +pub const DISPID_NEWWINDOW2: u32 = 251u32; +pub const DISPID_NEWWINDOW3: u32 = 273u32; +pub const DISPID_NSCOLUMNS: u32 = 21u32; +pub const DISPID_ONADDRESSBAR: u32 = 261u32; +pub const DISPID_ONFULLSCREEN: u32 = 258u32; +pub const DISPID_ONMENUBAR: u32 = 256u32; +pub const DISPID_ONQUIT: u32 = 253u32; +pub const DISPID_ONSTATUSBAR: u32 = 257u32; +pub const DISPID_ONTHEATERMODE: u32 = 260u32; +pub const DISPID_ONTOOLBAR: u32 = 255u32; +pub const DISPID_ONVISIBLE: u32 = 254u32; +pub const DISPID_OPENFAVORITESPANE: u32 = 97u32; +pub const DISPID_OPENFAVORITESSETTINGS: u32 = 98u32; +pub const DISPID_PHISHINGENABLED: u32 = 19u32; +pub const DISPID_PINNEDSITESTATE: u32 = 73u32; +pub const DISPID_PRINTTEMPLATEINSTANTIATION: u32 = 225u32; +pub const DISPID_PRINTTEMPLATETEARDOWN: u32 = 226u32; +pub const DISPID_PRIVACYIMPACTEDSTATECHANGE: u32 = 272u32; +pub const DISPID_PROGRESSCHANGE: u32 = 108u32; +pub const DISPID_PROPERTYCHANGE: u32 = 112u32; +pub const DISPID_PROVISIONNETWORKS: u32 = 62u32; +pub const DISPID_QUIT: u32 = 103u32; +pub const DISPID_REDIRECTXDOMAINBLOCKED: u32 = 286u32; +pub const DISPID_REFRESHOFFLINEDESKTOP: u32 = 3u32; +pub const DISPID_REMOVESCHEDULEDTILENOTIFICATION: u32 = 80u32; +pub const DISPID_REPORTSAFEURL: u32 = 63u32; +pub const DISPID_RESETEXPERIMENTALFLAGS: u32 = 92u32; +pub const DISPID_RESETFIRSTBOOTMODE: u32 = 1u32; +pub const DISPID_RESETSAFEMODE: u32 = 2u32; +pub const DISPID_RESETSORT: u32 = 3u32; +pub const DISPID_RETREATERROR: u32 = 11u32; +pub const DISPID_ROOT: u32 = 16u32; +pub const DISPID_RUNONCEHASSHOWN: u32 = 28u32; +pub const DISPID_RUNONCEREQUIREDSETTINGSCOMPLETE: u32 = 27u32; +pub const DISPID_RUNONCESHOWN: u32 = 15u32; +pub const DISPID_SCHEDULEDTILENOTIFICATION: u32 = 79u32; +pub const DISPID_SEARCHGUIDEURL: u32 = 29u32; +pub const DISPID_SELECTEDITEM: u32 = 15u32; +pub const DISPID_SELECTEDITEMS: u32 = 24u32; +pub const DISPID_SELECTIONCHANGE: u32 = 2u32; +pub const DISPID_SETACTIVITIESVISIBLE: u32 = 35u32; +pub const DISPID_SETDETAILSSTATE: u32 = 20u32; +pub const DISPID_SETEXPERIMENTALFLAG: u32 = 84u32; +pub const DISPID_SETEXPERIMENTALVALUE: u32 = 86u32; +pub const DISPID_SETMSDEFAULTS: u32 = 104u32; +pub const DISPID_SETNEEDHVSIAUTOLAUNCHFLAG: u32 = 101u32; +pub const DISPID_SETNEEDIEAUTOLAUNCHFLAG: u32 = 90u32; +pub const DISPID_SETPERERRSTATE: u32 = 22u32; +pub const DISPID_SETPHISHINGFILTERSTATUS: u32 = 282u32; +pub const DISPID_SETRECENTLYCLOSEDVISIBLE: u32 = 34u32; +pub const DISPID_SETROOT: u32 = 13u32; +pub const DISPID_SETSECURELOCKICON: u32 = 269u32; +pub const DISPID_SETSITEMODEICONOVERLAY: u32 = 44u32; +pub const DISPID_SETSITEMODEPROPERTIES: u32 = 50u32; +pub const DISPID_SETTHUMBNAILBUTTONS: u32 = 47u32; +pub const DISPID_SETVIEWTYPE: u32 = 23u32; +pub const DISPID_SHELLUIHELPERLAST: u32 = 105u32; +pub const DISPID_SHOWBROWSERUI: u32 = 13u32; +pub const DISPID_SHOWINPRIVATEHELP: u32 = 42u32; +pub const DISPID_SHOWTABSHELP: u32 = 41u32; +pub const DISPID_SITEMODEACTIVATE: u32 = 58u32; +pub const DISPID_SITEMODEADDBUTTONSTYLE: u32 = 54u32; +pub const DISPID_SITEMODEADDJUMPLISTITEM: u32 = 52u32; +pub const DISPID_SITEMODECLEARBADGE: u32 = 65u32; +pub const DISPID_SITEMODECLEARJUMPLIST: u32 = 53u32; +pub const DISPID_SITEMODECREATEJUMPLIST: u32 = 51u32; +pub const DISPID_SITEMODEREFRESHBADGE: u32 = 64u32; +pub const DISPID_SITEMODESHOWBUTTONSTYLE: u32 = 55u32; +pub const DISPID_SITEMODESHOWJUMPLIST: u32 = 56u32; +pub const DISPID_SKIPRUNONCE: u32 = 16u32; +pub const DISPID_SKIPTABSWELCOME: u32 = 21u32; +pub const DISPID_SQMENABLED: u32 = 18u32; +pub const DISPID_STARTBADGEUPDATE: u32 = 81u32; +pub const DISPID_STARTPERIODICUPDATE: u32 = 70u32; +pub const DISPID_STARTPERIODICUPDATEBATCH: u32 = 75u32; +pub const DISPID_STATUSTEXTCHANGE: u32 = 102u32; +pub const DISPID_STOPBADGEUPDATE: u32 = 82u32; +pub const DISPID_STOPPERIODICUPDATE: u32 = 69u32; +pub const DISPID_SUBSCRIPTIONSENABLED: u32 = 10u32; +pub const DISPID_SUGGESTEDSITESENABLED: u32 = 38u32; +pub const DISPID_SYNCHRONIZE: u32 = 5u32; +pub const DISPID_THIRDPARTYURLBLOCKED: u32 = 285u32; +pub const DISPID_TITLECHANGE: u32 = 113u32; +pub const DISPID_TITLEICONCHANGE: u32 = 114u32; +pub const DISPID_TRACKINGPROTECTIONENABLED: u32 = 60u32; +pub const DISPID_TVFLAGS: u32 = 20u32; +pub const DISPID_UNSELECTALL: u32 = 26u32; +pub const DISPID_UPDATEPAGESTATUS: u32 = 227u32; +pub const DISPID_UPDATETHUMBNAILBUTTON: u32 = 46u32; +pub const DISPID_VIEWUPDATE: u32 = 281u32; +pub const DISPID_WEBWORKERFINISHED: u32 = 289u32; +pub const DISPID_WEBWORKERSTARTED: u32 = 288u32; +pub const DISPID_WINDOWACTIVATE: u32 = 111u32; +pub const DISPID_WINDOWCLOSING: u32 = 263u32; +pub const DISPID_WINDOWMOVE: u32 = 109u32; +pub const DISPID_WINDOWREGISTERED: u32 = 200u32; +pub const DISPID_WINDOWRESIZE: u32 = 110u32; +pub const DISPID_WINDOWREVOKED: u32 = 201u32; +pub const DISPID_WINDOWSETHEIGHT: u32 = 267u32; +pub const DISPID_WINDOWSETLEFT: u32 = 264u32; +pub const DISPID_WINDOWSETRESIZABLE: u32 = 262u32; +pub const DISPID_WINDOWSETTOP: u32 = 265u32; +pub const DISPID_WINDOWSETWIDTH: u32 = 266u32; +pub const DISPID_WINDOWSTATECHANGED: u32 = 283u32; +pub const E_SURFACE_DISCARDED: i32 = -2147434493i32; +pub const E_SURFACE_NODC: i32 = -2147434492i32; +pub const E_SURFACE_NOSURFACE: i32 = -2147434496i32; +pub const E_SURFACE_NOTMYDC: i32 = -2147434491i32; +pub const E_SURFACE_NOTMYPOINTER: i32 = -2147434494i32; +pub const E_SURFACE_UNKNOWN_FORMAT: i32 = -2147434495i32; +pub const ExtensionValidationContextDynamic: ExtensionValidationContexts = 1i32; +pub const ExtensionValidationContextNone: ExtensionValidationContexts = 0i32; +pub const ExtensionValidationContextParsed: ExtensionValidationContexts = 2i32; +pub type ExtensionValidationContexts = i32; +pub const ExtensionValidationResultArrestPageLoad: ExtensionValidationResults = 2i32; +pub const ExtensionValidationResultDoNotInstantiate: ExtensionValidationResults = 1i32; +pub const ExtensionValidationResultNone: ExtensionValidationResults = 0i32; +pub type ExtensionValidationResults = i32; +pub type FINDFRAME_FLAGS = i32; +pub const FINDFRAME_INTERNAL: FINDFRAME_FLAGS = -2147483648i32; +pub const FINDFRAME_JUSTTESTEXISTENCE: FINDFRAME_FLAGS = 1i32; +pub const FINDFRAME_NONE: FINDFRAME_FLAGS = 0i32; +pub const FRAMEOPTIONS_BROWSERBAND: FRAMEOPTIONS_FLAGS = 64i32; +pub const FRAMEOPTIONS_DESKTOP: FRAMEOPTIONS_FLAGS = 32i32; +pub type FRAMEOPTIONS_FLAGS = i32; +pub const FRAMEOPTIONS_NO3DBORDER: FRAMEOPTIONS_FLAGS = 16i32; +pub const FRAMEOPTIONS_NORESIZE: FRAMEOPTIONS_FLAGS = 8i32; +pub const FRAMEOPTIONS_SCROLL_AUTO: FRAMEOPTIONS_FLAGS = 4i32; +pub const FRAMEOPTIONS_SCROLL_NO: FRAMEOPTIONS_FLAGS = 2i32; +pub const FRAMEOPTIONS_SCROLL_YES: FRAMEOPTIONS_FLAGS = 1i32; +pub const HomePage: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x766bf2ae_d650_11d1_9811_00c04fc31d2e); +pub const HomePageSetting: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x374cede0_873a_4c4f_bc86_bcc8cf5116a3); +pub const IECMDID_ARG_CLEAR_FORMS_ALL: u32 = 0u32; +pub const IECMDID_ARG_CLEAR_FORMS_ALL_BUT_PASSWORDS: u32 = 1u32; +pub const IECMDID_ARG_CLEAR_FORMS_PASSWORDS_ONLY: u32 = 2u32; +pub const IECMDID_BEFORENAVIGATE_DOEXTERNALBROWSE: u32 = 3u32; +pub const IECMDID_BEFORENAVIGATE_GETIDLIST: u32 = 4u32; +pub const IECMDID_BEFORENAVIGATE_GETSHELLBROWSE: u32 = 2u32; +pub const IECMDID_CLEAR_AUTOCOMPLETE_FOR_FORMS: u32 = 0u32; +pub const IECMDID_GET_INVOKE_DEFAULT_BROWSER_ON_NEW_WINDOW: u32 = 6u32; +pub const IECMDID_SETID_AUTOCOMPLETE_FOR_FORMS: u32 = 1u32; +pub const IECMDID_SET_INVOKE_DEFAULT_BROWSER_ON_NEW_WINDOW: u32 = 5u32; +pub const IEGetProcessModule_PROC_NAME: windows_sys::core::PCSTR = windows_sys::core::s!("IEGetProcessModule"); +pub const IEGetTabWindowExports_PROC_NAME: windows_sys::core::PCSTR = windows_sys::core::s!("IEGetTabWindowExports"); +pub type IELAUNCHOPTION_FLAGS = i32; +pub const IELAUNCHOPTION_FORCE_COMPAT: IELAUNCHOPTION_FLAGS = 2i32; +pub const IELAUNCHOPTION_FORCE_EDGE: IELAUNCHOPTION_FLAGS = 4i32; +pub const IELAUNCHOPTION_LOCK_ENGINE: IELAUNCHOPTION_FLAGS = 8i32; +pub const IELAUNCHOPTION_SCRIPTDEBUG: IELAUNCHOPTION_FLAGS = 1i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct IELAUNCHURLINFO { + pub cbSize: u32, + pub dwCreationFlags: u32, + pub dwLaunchOptionFlags: u32, +} +pub const IEPROCESS_MODULE_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("IERtUtil.dll"); +pub const IEWebDriverManager: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x90314af2_5250_47b3_89d8_6295fc23bc22); +pub const IE_USE_OE_MAIL_HKEY: i32 = -2147483647i32; +pub const IE_USE_OE_MAIL_KEY: windows_sys::core::PCWSTR = windows_sys::core::w!("Software\\Microsoft\\Internet Explorer\\Mail"); +pub const IE_USE_OE_MAIL_VALUE: windows_sys::core::PCWSTR = windows_sys::core::w!("Use Outlook Express"); +pub const IE_USE_OE_NEWS_HKEY: i32 = -2147483647i32; +pub const IE_USE_OE_NEWS_KEY: windows_sys::core::PCWSTR = windows_sys::core::w!("Software\\Microsoft\\Internet Explorer\\News"); +pub const IE_USE_OE_NEWS_VALUE: windows_sys::core::PCWSTR = windows_sys::core::w!("Use Outlook Express"); +pub const IE_USE_OE_PRESENT_HKEY: i32 = -2147483646i32; +pub const IE_USE_OE_PRESENT_KEY: windows_sys::core::PCWSTR = windows_sys::core::w!("Software\\Microsoft\\Windows\\CurrentVersion\\app.paths\\msimn.exe"); +pub const IMGDECODE_EVENT_BEGINBITS: u32 = 4u32; +pub const IMGDECODE_EVENT_BITSCOMPLETE: u32 = 8u32; +pub const IMGDECODE_EVENT_PALETTE: u32 = 2u32; +pub const IMGDECODE_EVENT_PROGRESS: u32 = 1u32; +pub const IMGDECODE_EVENT_USEDDRAW: u32 = 16u32; +pub const IMGDECODE_HINT_BOTTOMUP: u32 = 2u32; +pub const IMGDECODE_HINT_FULLWIDTH: u32 = 4u32; +pub const IMGDECODE_HINT_TOPDOWN: u32 = 1u32; +pub type INTERNETEXPLORERCONFIGURATION = i32; +pub const INTERNETEXPLORERCONFIGURATION_HOST: INTERNETEXPLORERCONFIGURATION = 1i32; +pub const INTERNETEXPLORERCONFIGURATION_WEB_DRIVER: INTERNETEXPLORERCONFIGURATION = 2i32; +pub const INTERNETEXPLORERCONFIGURATION_WEB_DRIVER_EDGE: INTERNETEXPLORERCONFIGURATION = 4i32; +pub const IntelliForms: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x613ab92e_16bf_11d2_bca5_00c04fd929db); +pub const InternetExplorerManager: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xdf4fcc34_067a_4e0a_8352_4a1a5095346e); +pub const LINKSBAND: u32 = 4u32; +pub const MAPMIME_CLSID: u32 = 1u32; +pub const MAPMIME_DEFAULT: u32 = 0u32; +pub const MAPMIME_DEFAULT_ALWAYS: u32 = 3u32; +pub const MAPMIME_DISABLE: u32 = 2u32; +pub const MAX_SEARCH_FORMAT_STRING: u32 = 255u32; +pub type MEDIA_ACTIVITY_NOTIFY_TYPE = i32; +pub const MediaCasting: MEDIA_ACTIVITY_NOTIFY_TYPE = 2i32; +pub const MediaPlayback: MEDIA_ACTIVITY_NOTIFY_TYPE = 0i32; +pub const MediaRecording: MEDIA_ACTIVITY_NOTIFY_TYPE = 1i32; +#[repr(C)] +#[derive(Clone, Copy, Default)] +pub struct NAVIGATEDATA { + pub ulTarget: u32, + pub ulURL: u32, + pub ulRefURL: u32, + pub ulPostData: u32, + pub dwFlags: u32, +} +pub type NAVIGATEFRAME_FLAGS = i32; +pub const NAVIGATEFRAME_FL_AUTH_FAIL_CACHE_OK: NAVIGATEFRAME_FLAGS = 16i32; +pub const NAVIGATEFRAME_FL_NO_DOC_CACHE: NAVIGATEFRAME_FLAGS = 4i32; +pub const NAVIGATEFRAME_FL_NO_IMAGE_CACHE: NAVIGATEFRAME_FLAGS = 8i32; +pub const NAVIGATEFRAME_FL_POST: NAVIGATEFRAME_FLAGS = 2i32; +pub const NAVIGATEFRAME_FL_REALLY_SENDING_FROM_FORM: NAVIGATEFRAME_FLAGS = 64i32; +pub const NAVIGATEFRAME_FL_RECORD: NAVIGATEFRAME_FLAGS = 1i32; +pub const NAVIGATEFRAME_FL_SENDING_FROM_FORM: NAVIGATEFRAME_FLAGS = 32i32; +pub const OS_E_CANCELLED: OpenServiceErrors = -2147471631i32; +pub const OS_E_GPDISABLED: OpenServiceErrors = -1072886820i32; +pub const OS_E_NOTFOUND: OpenServiceErrors = -2147287038i32; +pub const OS_E_NOTSUPPORTED: OpenServiceErrors = -2147467231i32; +pub type OpenServiceActivityContentType = i32; +pub const OpenServiceActivityManager: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xc5efd803_50f8_43cd_9ab8_aafc1394c9e0); +pub type OpenServiceErrors = i32; +pub const OpenServiceManager: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x098870b6_39ea_480b_b8b5_dd0167c4db59); +pub const PeerFactory: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0x3050f4cf_98b5_11cf_bb82_00aa00bdce0b); +pub const REGSTRA_VAL_STARTPAGE: windows_sys::core::PCSTR = windows_sys::core::s!("Start Page"); +pub const REGSTR_PATH_CURRENT: windows_sys::core::PCWSTR = windows_sys::core::w!("current"); +pub const REGSTR_PATH_DEFAULT: windows_sys::core::PCWSTR = windows_sys::core::w!("default"); +pub const REGSTR_PATH_INETCPL_RESTRICTIONS: windows_sys::core::PCWSTR = windows_sys::core::w!("Software\\Policies\\Microsoft\\Internet Explorer\\Control Panel"); +pub const REGSTR_PATH_MIME_DATABASE: windows_sys::core::PCWSTR = windows_sys::core::w!("MIME\\Database"); +pub const REGSTR_PATH_REMOTEACCESS: windows_sys::core::PCWSTR = windows_sys::core::w!("RemoteAccess"); +pub const REGSTR_PATH_REMOTEACESS: windows_sys::core::PCWSTR = windows_sys::core::w!("RemoteAccess"); +pub const REGSTR_SHIFTQUICKSUFFIX: windows_sys::core::PCWSTR = windows_sys::core::w!("ShiftQuickCompleteSuffix"); +pub const REGSTR_VAL_ACCEPT_LANGUAGE: windows_sys::core::PCWSTR = windows_sys::core::w!("AcceptLanguage"); +pub const REGSTR_VAL_ACCESSMEDIUM: windows_sys::core::PCWSTR = windows_sys::core::w!("AccessMedium"); +pub const REGSTR_VAL_ACCESSTYPE: windows_sys::core::PCWSTR = windows_sys::core::w!("AccessType"); +pub const REGSTR_VAL_ALIASTO: windows_sys::core::PCWSTR = windows_sys::core::w!("AliasForCharset"); +pub const REGSTR_VAL_ANCHORCOLOR: windows_sys::core::PCWSTR = windows_sys::core::w!("Anchor Color"); +pub const REGSTR_VAL_ANCHORCOLORHOVER: windows_sys::core::PCWSTR = windows_sys::core::w!("Anchor Color Hover"); +pub const REGSTR_VAL_ANCHORCOLORVISITED: windows_sys::core::PCWSTR = windows_sys::core::w!("Anchor Color Visited"); +pub const REGSTR_VAL_ANCHORUNDERLINE: windows_sys::core::PCWSTR = windows_sys::core::w!("Anchor Underline"); +pub const REGSTR_VAL_AUTODETECT: windows_sys::core::PCWSTR = windows_sys::core::w!("AutoDetect"); +pub const REGSTR_VAL_AUTODIALDLLNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("AutodialDllName"); +pub const REGSTR_VAL_AUTODIALFCNNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("AutodialFcnName"); +pub const REGSTR_VAL_AUTODIAL_MONITORCLASSNAME: windows_sys::core::PCWSTR = windows_sys::core::w!("MS_AutodialMonitor"); +pub const REGSTR_VAL_AUTODIAL_TRYONLYONCE: windows_sys::core::PCWSTR = windows_sys::core::w!("TryAutodialOnce"); +pub const REGSTR_VAL_AUTONAVIGATE: windows_sys::core::PCWSTR = windows_sys::core::w!("SearchForExtensions"); +pub const REGSTR_VAL_AUTOSEARCH: windows_sys::core::PCWSTR = windows_sys::core::w!("Do404Search"); +pub const REGSTR_VAL_BACKBITMAP: windows_sys::core::PCWSTR = windows_sys::core::w!("BackBitmap"); +pub const REGSTR_VAL_BACKGROUNDCOLOR: windows_sys::core::PCWSTR = windows_sys::core::w!("Background Color"); +pub const REGSTR_VAL_BODYCHARSET: windows_sys::core::PCWSTR = windows_sys::core::w!("BodyCharset"); +pub const REGSTR_VAL_BYPASSAUTOCONFIG: windows_sys::core::PCWSTR = windows_sys::core::w!("BypassAutoconfig"); +pub const REGSTR_VAL_CACHEPREFIX: windows_sys::core::PCWSTR = windows_sys::core::w!("CachePrefix"); +pub const REGSTR_VAL_CHECKASSOC: windows_sys::core::PCWSTR = windows_sys::core::w!("Check_Associations"); +pub const REGSTR_VAL_CODEDOWNLOAD: windows_sys::core::PCWSTR = windows_sys::core::w!("Code Download"); +pub const REGSTR_VAL_CODEDOWNLOAD_DEF: windows_sys::core::PCWSTR = windows_sys::core::w!("yes"); +pub const REGSTR_VAL_CODEPAGE: windows_sys::core::PCWSTR = windows_sys::core::w!("CodePage"); +pub const REGSTR_VAL_COVEREXCLUDE: windows_sys::core::PCWSTR = windows_sys::core::w!("CoverExclude"); +pub const REGSTR_VAL_DAYSTOKEEP: windows_sys::core::PCWSTR = windows_sys::core::w!("DaysToKeep"); +pub const REGSTR_VAL_DEFAULT_CODEPAGE: windows_sys::core::PCWSTR = windows_sys::core::w!("Default_CodePage"); +pub const REGSTR_VAL_DEFAULT_SCRIPT: windows_sys::core::PCWSTR = windows_sys::core::w!("Default_Script"); +pub const REGSTR_VAL_DEF_ENCODING: windows_sys::core::PCWSTR = windows_sys::core::w!("Default_Encoding"); +pub const REGSTR_VAL_DEF_INETENCODING: windows_sys::core::PCWSTR = windows_sys::core::w!("Default_InternetEncoding"); +pub const REGSTR_VAL_DESCRIPTION: windows_sys::core::PCWSTR = windows_sys::core::w!("Description"); +pub const REGSTR_VAL_DIRECTORY: windows_sys::core::PCWSTR = windows_sys::core::w!("Directory"); +pub const REGSTR_VAL_DISCONNECTIDLETIME: windows_sys::core::PCWSTR = windows_sys::core::w!("DisconnectIdleTime"); +pub const REGSTR_VAL_ENABLEAUTODIAL: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableAutodial"); +pub const REGSTR_VAL_ENABLEAUTODIALDISCONNECT: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableAutodisconnect"); +pub const REGSTR_VAL_ENABLEAUTODISCONNECT: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableAutodisconnect"); +pub const REGSTR_VAL_ENABLEEXITDISCONNECT: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableExitDisconnect"); +pub const REGSTR_VAL_ENABLESECURITYCHECK: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableSecurityCheck"); +pub const REGSTR_VAL_ENABLEUNATTENDED: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableUnattended"); +pub const REGSTR_VAL_ENCODENAME: windows_sys::core::PCWSTR = windows_sys::core::w!("EncodingName"); +pub const REGSTR_VAL_FAMILY: windows_sys::core::PCWSTR = windows_sys::core::w!("Family"); +pub const REGSTR_VAL_FIXEDWIDTHFONT: windows_sys::core::PCWSTR = windows_sys::core::w!("FixedWidthFont"); +pub const REGSTR_VAL_FIXED_FONT: windows_sys::core::PCWSTR = windows_sys::core::w!("IEFixedFontName"); +pub const REGSTR_VAL_FONT_SCRIPT: windows_sys::core::PCWSTR = windows_sys::core::w!("Script"); +pub const REGSTR_VAL_FONT_SCRIPTS: windows_sys::core::PCWSTR = windows_sys::core::w!("Scripts"); +pub const REGSTR_VAL_FONT_SCRIPT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("Script"); +pub const REGSTR_VAL_FONT_SIZE: windows_sys::core::PCWSTR = windows_sys::core::w!("IEFontSize"); +pub const REGSTR_VAL_FONT_SIZE_DEF: u32 = 2u32; +pub const REGSTR_VAL_HEADERCHARSET: windows_sys::core::PCWSTR = windows_sys::core::w!("HeaderCharset"); +pub const REGSTR_VAL_HTTP_ERRORS: windows_sys::core::PCWSTR = windows_sys::core::w!("Friendly http errors"); +pub const REGSTR_VAL_IE_CUSTOMCOLORS: windows_sys::core::PCWSTR = windows_sys::core::w!("Custom Colors"); +pub const REGSTR_VAL_INETCPL_ADVANCEDTAB: windows_sys::core::PCWSTR = windows_sys::core::w!("AdvancedTab"); +pub const REGSTR_VAL_INETCPL_CONNECTIONSTAB: windows_sys::core::PCWSTR = windows_sys::core::w!("ConnectionsTab"); +pub const REGSTR_VAL_INETCPL_CONTENTTAB: windows_sys::core::PCWSTR = windows_sys::core::w!("ContentTab"); +pub const REGSTR_VAL_INETCPL_GENERALTAB: windows_sys::core::PCWSTR = windows_sys::core::w!("GeneralTab"); +pub const REGSTR_VAL_INETCPL_IEAK: windows_sys::core::PCWSTR = windows_sys::core::w!("IEAKContext"); +pub const REGSTR_VAL_INETCPL_PRIVACYTAB: windows_sys::core::PCWSTR = windows_sys::core::w!("PrivacyTab"); +pub const REGSTR_VAL_INETCPL_PROGRAMSTAB: windows_sys::core::PCWSTR = windows_sys::core::w!("ProgramsTab"); +pub const REGSTR_VAL_INETCPL_SECURITYTAB: windows_sys::core::PCWSTR = windows_sys::core::w!("SecurityTab"); +pub const REGSTR_VAL_INETENCODING: windows_sys::core::PCWSTR = windows_sys::core::w!("InternetEncoding"); +pub const REGSTR_VAL_INTERNETENTRY: windows_sys::core::PCWSTR = windows_sys::core::w!("InternetProfile"); +pub const REGSTR_VAL_INTERNETENTRYBKUP: windows_sys::core::PCWSTR = windows_sys::core::w!("BackupInternetProfile"); +pub const REGSTR_VAL_INTERNETPROFILE: windows_sys::core::PCWSTR = windows_sys::core::w!("InternetProfile"); +pub const REGSTR_VAL_JAVAJIT: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableJIT"); +pub const REGSTR_VAL_JAVAJIT_DEF: u32 = 0u32; +pub const REGSTR_VAL_JAVALOGGING: windows_sys::core::PCWSTR = windows_sys::core::w!("EnableLogging"); +pub const REGSTR_VAL_JAVALOGGING_DEF: u32 = 0u32; +pub const REGSTR_VAL_LEVEL: windows_sys::core::PCWSTR = windows_sys::core::w!("Level"); +pub const REGSTR_VAL_LOADIMAGES: windows_sys::core::PCWSTR = windows_sys::core::w!("Display Inline Images"); +pub const REGSTR_VAL_LOCALPAGE: windows_sys::core::PCWSTR = windows_sys::core::w!("Local Page"); +pub const REGSTR_VAL_MOSDISCONNECT: windows_sys::core::PCWSTR = windows_sys::core::w!("DisconnectTimeout"); +pub const REGSTR_VAL_NEWDIRECTORY: windows_sys::core::PCWSTR = windows_sys::core::w!("NewDirectory"); +pub const REGSTR_VAL_NONETAUTODIAL: windows_sys::core::PCWSTR = windows_sys::core::w!("NoNetAutodial"); +pub const REGSTR_VAL_PLAYSOUNDS: windows_sys::core::PCWSTR = windows_sys::core::w!("Play_Background_Sounds"); +pub const REGSTR_VAL_PLAYVIDEOS: windows_sys::core::PCWSTR = windows_sys::core::w!("Display Inline Videos"); +pub const REGSTR_VAL_PRIVCONVERTER: windows_sys::core::PCWSTR = windows_sys::core::w!("PrivConverter"); +pub const REGSTR_VAL_PROPORTIONALFONT: windows_sys::core::PCWSTR = windows_sys::core::w!("ProportionalFont"); +pub const REGSTR_VAL_PROP_FONT: windows_sys::core::PCWSTR = windows_sys::core::w!("IEPropFontName"); +pub const REGSTR_VAL_PROXYENABLE: windows_sys::core::PCWSTR = windows_sys::core::w!("ProxyEnable"); +pub const REGSTR_VAL_PROXYOVERRIDE: windows_sys::core::PCWSTR = windows_sys::core::w!("ProxyOverride"); +pub const REGSTR_VAL_PROXYSERVER: windows_sys::core::PCWSTR = windows_sys::core::w!("ProxyServer"); +pub const REGSTR_VAL_REDIALATTEMPTS: windows_sys::core::PCWSTR = windows_sys::core::w!("RedialAttempts"); +pub const REGSTR_VAL_REDIALINTERVAL: windows_sys::core::PCWSTR = windows_sys::core::w!("RedialWait"); +pub const REGSTR_VAL_RNAINSTALLED: windows_sys::core::PCWSTR = windows_sys::core::w!("Installed"); +pub const REGSTR_VAL_SAFETYWARNINGLEVEL: windows_sys::core::PCWSTR = windows_sys::core::w!("Safety Warning Level"); +pub const REGSTR_VAL_SCHANNELENABLEPROTOCOL: windows_sys::core::PCWSTR = windows_sys::core::w!("Enabled"); +pub const REGSTR_VAL_SCHANNELENABLEPROTOCOL_DEF: u32 = 1u32; +pub const REGSTR_VAL_SCRIPT_FIXED_FONT: windows_sys::core::PCWSTR = windows_sys::core::w!("IEFixedFontName"); +pub const REGSTR_VAL_SCRIPT_PROP_FONT: windows_sys::core::PCWSTR = windows_sys::core::w!("IEPropFontName"); +pub const REGSTR_VAL_SEARCHPAGE: windows_sys::core::PCWSTR = windows_sys::core::w!("Search Page"); +pub const REGSTR_VAL_SECURITYACTICEXSCRIPTS: windows_sys::core::PCWSTR = windows_sys::core::w!("Security_RunScripts"); +pub const REGSTR_VAL_SECURITYACTICEXSCRIPTS_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYACTIVEX: windows_sys::core::PCWSTR = windows_sys::core::w!("Security_RunActiveXControls"); +pub const REGSTR_VAL_SECURITYACTIVEX_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYALLOWCOOKIES: windows_sys::core::PCWSTR = windows_sys::core::w!("AllowCookies"); +pub const REGSTR_VAL_SECURITYALLOWCOOKIES_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYDISABLECACHINGOFSSLPAGES: windows_sys::core::PCWSTR = windows_sys::core::w!("DisableCachingOfSSLPages"); +pub const REGSTR_VAL_SECURITYDISABLECACHINGOFSSLPAGES_DEF: u32 = 0u32; +pub const REGSTR_VAL_SECURITYJAVA: windows_sys::core::PCWSTR = windows_sys::core::w!("Security_RunJavaApplets"); +pub const REGSTR_VAL_SECURITYJAVA_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYWARNONBADCERTSENDING: windows_sys::core::PCWSTR = windows_sys::core::w!("WarnOnBadCertSending"); +pub const REGSTR_VAL_SECURITYWARNONBADCERTSENDING_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYWARNONBADCERTVIEWING: windows_sys::core::PCWSTR = windows_sys::core::w!("WarnOnBadCertRecving"); +pub const REGSTR_VAL_SECURITYWARNONBADCERTVIEWING_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYWARNONSEND: windows_sys::core::PCWSTR = windows_sys::core::w!("WarnOnPost"); +pub const REGSTR_VAL_SECURITYWARNONSENDALWAYS: windows_sys::core::PCWSTR = windows_sys::core::w!("WarnAlwaysOnPost"); +pub const REGSTR_VAL_SECURITYWARNONSENDALWAYS_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYWARNONSEND_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYWARNONVIEW: windows_sys::core::PCWSTR = windows_sys::core::w!("WarnOnView"); +pub const REGSTR_VAL_SECURITYWARNONVIEW_DEF: u32 = 1u32; +pub const REGSTR_VAL_SECURITYWARNONZONECROSSING: windows_sys::core::PCWSTR = windows_sys::core::w!("WarnOnZoneCrossing"); +pub const REGSTR_VAL_SECURITYWARNONZONECROSSING_DEF: u32 = 1u32; +pub const REGSTR_VAL_SHOWADDRESSBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("Show_URLToolBar"); +pub const REGSTR_VAL_SHOWFOCUS: windows_sys::core::PCWSTR = windows_sys::core::w!("Tabstop - MouseDown"); +pub const REGSTR_VAL_SHOWFOCUS_DEF: windows_sys::core::PCWSTR = windows_sys::core::w!("no"); +pub const REGSTR_VAL_SHOWFULLURLS: windows_sys::core::PCWSTR = windows_sys::core::w!("Show_FullURL"); +pub const REGSTR_VAL_SHOWTOOLBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("Show_ToolBar"); +pub const REGSTR_VAL_SMOOTHSCROLL: windows_sys::core::PCWSTR = windows_sys::core::w!("SmoothScroll"); +pub const REGSTR_VAL_SMOOTHSCROLL_DEF: u32 = 1u32; +pub const REGSTR_VAL_STARTPAGE: windows_sys::core::PCWSTR = windows_sys::core::w!("Start Page"); +pub const REGSTR_VAL_TEXTCOLOR: windows_sys::core::PCWSTR = windows_sys::core::w!("Text Color"); +pub const REGSTR_VAL_TRUSTWARNINGLEVEL_HIGH: windows_sys::core::PCWSTR = windows_sys::core::w!("High"); +pub const REGSTR_VAL_TRUSTWARNINGLEVEL_LOW: windows_sys::core::PCWSTR = windows_sys::core::w!("No Security"); +pub const REGSTR_VAL_TRUSTWARNINGLEVEL_MED: windows_sys::core::PCWSTR = windows_sys::core::w!("Medium"); +pub const REGSTR_VAL_USEAUTOAPPEND: windows_sys::core::PCWSTR = windows_sys::core::w!("Append Completion"); +pub const REGSTR_VAL_USEAUTOCOMPLETE: windows_sys::core::PCWSTR = windows_sys::core::w!("Use AutoComplete"); +pub const REGSTR_VAL_USEAUTOSUGGEST: windows_sys::core::PCWSTR = windows_sys::core::w!("AutoSuggest"); +pub const REGSTR_VAL_USEDLGCOLORS: windows_sys::core::PCWSTR = windows_sys::core::w!("Use_DlgBox_Colors"); +pub const REGSTR_VAL_USEHOVERCOLOR: windows_sys::core::PCWSTR = windows_sys::core::w!("Use Anchor Hover Color"); +pub const REGSTR_VAL_USEIBAR: windows_sys::core::PCWSTR = windows_sys::core::w!("UseBar"); +pub const REGSTR_VAL_USEICM: windows_sys::core::PCWSTR = windows_sys::core::w!("UseICM"); +pub const REGSTR_VAL_USEICM_DEF: u32 = 0u32; +pub const REGSTR_VAL_USERAGENT: windows_sys::core::PCWSTR = windows_sys::core::w!("User Agent"); +pub const REGSTR_VAL_USESTYLESHEETS: windows_sys::core::PCWSTR = windows_sys::core::w!("Use Stylesheets"); +pub const REGSTR_VAL_USESTYLESHEETS_DEF: windows_sys::core::PCWSTR = windows_sys::core::w!("yes"); +pub const REGSTR_VAL_VISIBLEBANDS: windows_sys::core::PCWSTR = windows_sys::core::w!("VisibleBands"); +pub const REGSTR_VAL_VISIBLEBANDS_DEF: u32 = 7u32; +pub const REGSTR_VAL_WEBCHARSET: windows_sys::core::PCWSTR = windows_sys::core::w!("WebCharset"); +pub const SCMP_BOTTOM: SCROLLABLECONTEXTMENU_PLACEMENT = 1i32; +pub const SCMP_FULL: SCROLLABLECONTEXTMENU_PLACEMENT = 4i32; +pub const SCMP_LEFT: SCROLLABLECONTEXTMENU_PLACEMENT = 2i32; +pub const SCMP_RIGHT: SCROLLABLECONTEXTMENU_PLACEMENT = 3i32; +pub const SCMP_TOP: SCROLLABLECONTEXTMENU_PLACEMENT = 0i32; +pub type SCROLLABLECONTEXTMENU_PLACEMENT = i32; +#[repr(C)] +#[derive(Clone, Copy)] +pub struct STATURL { + pub cbSize: u32, + pub pwcsUrl: windows_sys::core::PWSTR, + pub pwcsTitle: windows_sys::core::PWSTR, + pub ftLastVisited: super::super::Foundation::FILETIME, + pub ftLastUpdated: super::super::Foundation::FILETIME, + pub ftExpires: super::super::Foundation::FILETIME, + pub dwFlags: u32, +} +impl Default for STATURL { + fn default() -> Self { + unsafe { core::mem::zeroed() } + } +} +pub const STATURLFLAG_ISCACHED: u32 = 1u32; +pub const STATURLFLAG_ISTOPLEVEL: u32 = 2u32; +pub const STATURL_QUERYFLAG_ISCACHED: u32 = 65536u32; +pub const STATURL_QUERYFLAG_NOTITLE: u32 = 262144u32; +pub const STATURL_QUERYFLAG_NOURL: u32 = 131072u32; +pub const STATURL_QUERYFLAG_TOPLEVEL: u32 = 524288u32; +pub const SURFACE_LOCK_ALLOW_DISCARD: u32 = 2u32; +pub const SURFACE_LOCK_EXCLUSIVE: u32 = 1u32; +pub const SURFACE_LOCK_WAIT: u32 = 4u32; +pub const SZBACKBITMAP: windows_sys::core::PCSTR = windows_sys::core::s!("BackBitmap"); +pub const SZJAVAVMPATH: windows_sys::core::PCSTR = windows_sys::core::s!("\\Java VM"); +pub const SZNOTEXT: windows_sys::core::PCSTR = windows_sys::core::s!("NoText"); +pub const SZTOOLBAR: windows_sys::core::PCSTR = windows_sys::core::s!("\\Toolbar"); +pub const SZTRUSTWARNLEVEL: windows_sys::core::PCSTR = windows_sys::core::s!("Trust Warning Level"); +pub const SZVISIBLE: windows_sys::core::PCSTR = windows_sys::core::s!("VisibleBands"); +pub const SZ_IE_DEFAULT_HTML_EDITOR: windows_sys::core::PCSTR = windows_sys::core::s!("Default HTML Editor"); +pub const SZ_IE_IBAR: windows_sys::core::PCSTR = windows_sys::core::s!("Bar"); +pub const SZ_IE_IBAR_BANDS: windows_sys::core::PCSTR = windows_sys::core::s!("Bands"); +pub const SZ_IE_MAIN: windows_sys::core::PCSTR = windows_sys::core::s!("Main"); +pub const SZ_IE_SEARCHSTRINGS: windows_sys::core::PCSTR = windows_sys::core::s!("UrlTemplate"); +pub const SZ_IE_SECURITY: windows_sys::core::PCSTR = windows_sys::core::s!("Security"); +pub const SZ_IE_SETTINGS: windows_sys::core::PCSTR = windows_sys::core::s!("Settings"); +pub const SZ_IE_THRESHOLDS: windows_sys::core::PCSTR = windows_sys::core::s!("ErrorThresholds"); +pub const S_SURFACE_DISCARDED: i32 = 49155i32; +pub const TARGET_NOTIFY_OBJECT_NAME: windows_sys::core::PCWSTR = windows_sys::core::w!("863a99a0-21bc-11d0-82b4-00a0c90c29c5"); +pub const TF_NAVIGATE: u32 = 2142153644u32; +pub const TIMERMODE_NORMAL: u32 = 0u32; +pub const TIMERMODE_VISIBILITYAWARE: u32 = 1u32; +pub const TOOLSBAND: u32 = 1u32; +pub const TSZCALENDARPROTOCOL: windows_sys::core::PCWSTR = windows_sys::core::w!("unk"); +pub const TSZCALLTOPROTOCOL: windows_sys::core::PCWSTR = windows_sys::core::w!("callto"); +pub const TSZINTERNETCLIENTSPATH: windows_sys::core::PCWSTR = windows_sys::core::w!("Software\\Microsoft\\Internet Explorer\\Unix"); +pub const TSZLDAPPROTOCOL: windows_sys::core::PCWSTR = windows_sys::core::w!("ldap"); +pub const TSZMAILTOPROTOCOL: windows_sys::core::PCWSTR = windows_sys::core::w!("mailto"); +pub const TSZMICROSOFTPATH: windows_sys::core::PCWSTR = windows_sys::core::w!("Software\\Microsoft"); +pub const TSZNEWSPROTOCOL: windows_sys::core::PCWSTR = windows_sys::core::w!("news"); +pub const TSZPROTOCOLSPATH: windows_sys::core::PCWSTR = windows_sys::core::w!("Protocols\\"); +pub const TSZSCHANNELPATH: windows_sys::core::PCWSTR = windows_sys::core::w!("SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL"); +pub const TSZVSOURCEPROTOCOL: windows_sys::core::PCWSTR = windows_sys::core::w!("view source"); +pub const msodsvFailed: u32 = 3u32; +pub const msodsvLowSecurityLevel: u32 = 4u32; +pub const msodsvNoMacros: u32 = 0u32; +pub const msodsvPassedTrusted: u32 = 2u32; +pub const msodsvPassedTrustedCert: u32 = 5u32; +pub const msodsvUnsigned: u32 = 1u32; +pub const msoedmDisable: u32 = 2u32; +pub const msoedmDontOpen: u32 = 3u32; +pub const msoedmEnable: u32 = 1u32; +pub const msoslHigh: u32 = 3u32; +pub const msoslMedium: u32 = 2u32; +pub const msoslNone: u32 = 1u32; +pub const msoslUndefined: u32 = 0u32; +pub const wfolders: windows_sys::core::GUID = windows_sys::core::GUID::from_u128(0xbae31f9a_1b81_11d2_a97a_00c04f8ecb02); diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Web/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Web/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..1d1162768aa7f744080c980c24c4100c3e24cbe3 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/Web/mod.rs @@ -0,0 +1,2 @@ +#[cfg(feature = "Win32_Web_InternetExplorer")] +pub mod InternetExplorer; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..d0d93be7ea56468cbfbf2964bed9a58502a7ddf7 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/Win32/mod.rs @@ -0,0 +1,30 @@ +#[cfg(feature = "Win32_Data")] +pub mod Data; +#[cfg(feature = "Win32_Devices")] +pub mod Devices; +#[cfg(feature = "Win32_Foundation")] +pub mod Foundation; +#[cfg(feature = "Win32_Gaming")] +pub mod Gaming; +#[cfg(feature = "Win32_Globalization")] +pub mod Globalization; +#[cfg(feature = "Win32_Graphics")] +pub mod Graphics; +#[cfg(feature = "Win32_Management")] +pub mod Management; +#[cfg(feature = "Win32_Media")] +pub mod Media; +#[cfg(feature = "Win32_NetworkManagement")] +pub mod NetworkManagement; +#[cfg(feature = "Win32_Networking")] +pub mod Networking; +#[cfg(feature = "Win32_Security")] +pub mod Security; +#[cfg(feature = "Win32_Storage")] +pub mod Storage; +#[cfg(feature = "Win32_System")] +pub mod System; +#[cfg(feature = "Win32_UI")] +pub mod UI; +#[cfg(feature = "Win32_Web")] +pub mod Web; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..3d9b11abb899b0d323867bd788102e7cfaf54929 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/Windows/mod.rs @@ -0,0 +1,4 @@ +#[cfg(feature = "Wdk")] +pub mod Wdk; +#[cfg(feature = "Win32")] +pub mod Win32; diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/core/literals.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/core/literals.rs new file mode 100644 index 0000000000000000000000000000000000000000..d012fb1700f893f7c671d9ff92c81dfe4fb51386 --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/core/literals.rs @@ -0,0 +1,114 @@ +/// A literal UTF-8 string with a trailing null terminator. +#[macro_export] +macro_rules! s { + ($s:literal) => { + ::core::concat!($s, '\0').as_ptr() + }; +} + +/// A literal UTF-16 wide string with a trailing null terminator. +#[macro_export] +macro_rules! w { + ($s:literal) => {{ + const INPUT: &[u8] = $s.as_bytes(); + const OUTPUT_LEN: usize = $crate::core::utf16_len(INPUT) + 1; + const OUTPUT: &[u16; OUTPUT_LEN] = { + let mut buffer = [0; OUTPUT_LEN]; + let mut input_pos = 0; + let mut output_pos = 0; + while let Some((mut code_point, new_pos)) = $crate::core::decode_utf8_char(INPUT, input_pos) { + input_pos = new_pos; + if code_point <= 0xffff { + buffer[output_pos] = code_point as u16; + output_pos += 1; + } else { + code_point -= 0x10000; + buffer[output_pos] = 0xd800 + (code_point >> 10) as u16; + output_pos += 1; + buffer[output_pos] = 0xdc00 + (code_point & 0x3ff) as u16; + output_pos += 1; + } + } + &{ buffer } + }; + OUTPUT.as_ptr() + }}; +} + +pub use s; +pub use w; + +#[doc(hidden)] +pub const fn decode_utf8_char(bytes: &[u8], mut pos: usize) -> Option<(u32, usize)> { + if bytes.len() == pos { + return None; + } + let ch = bytes[pos] as u32; + pos += 1; + if ch <= 0x7f { + return Some((ch, pos)); + } + if (ch & 0xe0) == 0xc0 { + if bytes.len() - pos < 1 { + return None; + } + let ch2 = bytes[pos] as u32; + pos += 1; + if (ch2 & 0xc0) != 0x80 { + return None; + } + let result: u32 = ((ch & 0x1f) << 6) | (ch2 & 0x3f); + if result <= 0x7f { + return None; + } + return Some((result, pos)); + } + if (ch & 0xf0) == 0xe0 { + if bytes.len() - pos < 2 { + return None; + } + let ch2 = bytes[pos] as u32; + pos += 1; + let ch3 = bytes[pos] as u32; + pos += 1; + if (ch2 & 0xc0) != 0x80 || (ch3 & 0xc0) != 0x80 { + return None; + } + let result = ((ch & 0x0f) << 12) | ((ch2 & 0x3f) << 6) | (ch3 & 0x3f); + if result <= 0x7ff || (0xd800 <= result && result <= 0xdfff) { + return None; + } + return Some((result, pos)); + } + if (ch & 0xf8) == 0xf0 { + if bytes.len() - pos < 3 { + return None; + } + let ch2 = bytes[pos] as u32; + pos += 1; + let ch3 = bytes[pos] as u32; + pos += 1; + let ch4 = bytes[pos] as u32; + pos += 1; + if (ch2 & 0xc0) != 0x80 || (ch3 & 0xc0) != 0x80 || (ch4 & 0xc0) != 0x80 { + return None; + } + let result = ((ch & 0x07) << 18) | ((ch2 & 0x3f) << 12) | ((ch3 & 0x3f) << 6) | (ch4 & 0x3f); + if result <= 0xffff || 0x10ffff < result { + return None; + } + return Some((result, pos)); + } + None +} + +#[doc(hidden)] +pub const fn utf16_len(bytes: &[u8]) -> usize { + let mut pos = 0; + let mut len = 0; + while let Some((code_point, new_pos)) = decode_utf8_char(bytes, pos) { + pos = new_pos; + len += if code_point <= 0xffff { 1 } else { 2 }; + } + len +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/core/mod.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/core/mod.rs new file mode 100644 index 0000000000000000000000000000000000000000..e0419db87e4727e1698a5937a232c4cd48ac98fe --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/core/mod.rs @@ -0,0 +1,47 @@ +mod literals; + +#[doc(hidden)] +pub use literals::*; + +pub type BOOL = i32; +pub type HRESULT = i32; +pub type PSTR = *mut u8; +pub type PWSTR = *mut u16; +pub type PCSTR = *const u8; +pub type PCWSTR = *const u16; +pub type BSTR = *const u16; +pub type HSTRING = *mut core::ffi::c_void; + +#[repr(C)] +#[derive(Copy, Clone, Default)] +pub struct GUID { + pub data1: u32, + pub data2: u16, + pub data3: u16, + pub data4: [u8; 8], +} + +impl GUID { + pub const fn from_u128(uuid: u128) -> Self { + Self { data1: (uuid >> 96) as u32, data2: (uuid >> 80 & 0xffff) as u16, data3: (uuid >> 64 & 0xffff) as u16, data4: (uuid as u64).to_be_bytes() } + } +} + +pub const IID_IUnknown: GUID = GUID::from_u128(0x00000000_0000_0000_c000_000000000046); + +#[repr(C)] +pub struct IUnknown_Vtbl { + pub QueryInterface: unsafe extern "system" fn(this: *mut core::ffi::c_void, iid: *const GUID, interface: *mut *mut core::ffi::c_void) -> HRESULT, + pub AddRef: unsafe extern "system" fn(this: *mut core::ffi::c_void) -> u32, + pub Release: unsafe extern "system" fn(this: *mut core::ffi::c_void) -> u32, +} + +pub const IID_IInspectable: GUID = GUID::from_u128(0xaf86e2e0_b12d_4c6a_9c5a_d7aa65101e90); + +#[repr(C)] +pub struct IInspectable_Vtbl { + pub base: IUnknown_Vtbl, + pub GetIids: unsafe extern "system" fn(this: *mut core::ffi::c_void, count: *mut u32, values: *mut *mut GUID) -> HRESULT, + pub GetRuntimeClassName: unsafe extern "system" fn(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> HRESULT, + pub GetTrustLevel: unsafe extern "system" fn(this: *mut core::ffi::c_void, value: *mut i32) -> HRESULT, +} diff --git a/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/lib.rs b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..396dd24e1ba75aee2f7ac37e622ecc149573d58c --- /dev/null +++ b/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/windows-sys-0.61.2/src/lib.rs @@ -0,0 +1,17 @@ +/*! +Learn more about Rust for Windows here: + +[Feature search](https://microsoft.github.io/windows-rs/features/#/0.59.0) +*/ + +#![no_std] +#![doc(html_no_source)] +#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, missing_docs, clippy::all)] +#![cfg_attr(not(feature = "docs"), doc(hidden))] + +#[allow(unused_extern_crates)] +extern crate self as windows_sys; + +pub mod core; + +include!("Windows/mod.rs");